diff --git a/.gitignore b/.gitignore index d04479c..85db960 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /node_modules -.turbo/ \ No newline at end of file +.turbo/ + +**/.DS_Store \ No newline at end of file diff --git a/apps/govquests-api/rails_app/Gemfile b/apps/govquests-api/rails_app/Gemfile index 198c285..c746f36 100644 --- a/apps/govquests-api/rails_app/Gemfile +++ b/apps/govquests-api/rails_app/Gemfile @@ -56,8 +56,8 @@ group :development, :test do gem "rubocop-rails-omakase", require: false # Types - # gem "sorbet" - # gem "tapioca" + gem "sorbet" + gem "tapioca" end group :test do diff --git a/apps/govquests-api/rails_app/Gemfile.lock b/apps/govquests-api/rails_app/Gemfile.lock index eeaebcf..bade7af 100644 --- a/apps/govquests-api/rails_app/Gemfile.lock +++ b/apps/govquests-api/rails_app/Gemfile.lock @@ -232,6 +232,7 @@ GEM net-smtp (0.5.0) net-protocol net-ssh (7.2.3) + netrc (0.11.0) nio4r (2.7.3) nokogiri (1.16.7-aarch64-linux) racc (~> 1.4) @@ -250,6 +251,7 @@ GEM parser (3.3.5.0) ast (~> 2.4.1) racc + prism (0.30.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -300,6 +302,9 @@ GEM ruby_event_store-active_record (= 2.15.0) rainbow (3.1.1) rake (13.2.1) + rbi (0.1.13) + prism (>= 0.18.0, < 1.0.0) + sorbet-runtime (>= 0.5.9204) rdoc (6.7.0) psych (>= 4.0.0) regexp_parser (2.9.2) @@ -360,7 +365,18 @@ GEM fugit (~> 1.11.0) railties (>= 7.1) thor (~> 1.3.1) - sorbet-runtime (0.5.11585) + sorbet (0.5.11463) + sorbet-static (= 0.5.11463) + sorbet-runtime (0.5.11463) + sorbet-static (0.5.11463-universal-darwin) + sorbet-static-and-runtime (0.5.11463) + sorbet (= 0.5.11463) + sorbet-runtime (= 0.5.11463) + spoom (1.3.2) + erubi (>= 1.10.0) + prism (>= 0.19.0) + sorbet-static-and-runtime (>= 0.5.10187) + thor (>= 0.19.2) sqlite3 (2.1.0-aarch64-linux-gnu) sqlite3 (2.1.0-aarch64-linux-musl) sqlite3 (2.1.0-arm-linux-gnu) @@ -378,6 +394,15 @@ GEM net-ssh (>= 2.8.0) ostruct stringio (3.1.1) + tapioca (0.15.0) + bundler (>= 2.2.25) + netrc (>= 0.11.0) + parallel (>= 1.21.0) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) + thor (>= 1.2.0) + yard-sorbet thor (1.3.2) thruster (0.1.8) thruster (0.1.8-aarch64-linux) @@ -397,6 +422,10 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + yard (0.9.36) + yard-sorbet (0.9.0) + sorbet-runtime + yard zeitwerk (2.6.18) PLATFORMS @@ -437,7 +466,9 @@ DEPENDENCIES rubocop-rake solid_cache solid_queue + sorbet sqlite3 (>= 2.1) + tapioca thruster tzinfo-data diff --git a/apps/govquests-api/rails_app/Makefile b/apps/govquests-api/rails_app/Makefile index 1b0ddf1..2fd4bf3 100644 --- a/apps/govquests-api/rails_app/Makefile +++ b/apps/govquests-api/rails_app/Makefile @@ -7,4 +7,7 @@ test: lint: @bundle exec rubocop -A -.PHONY: install test \ No newline at end of file +sorbet: + @bundle exec srb tc + +.PHONY: install test lint sorbet \ No newline at end of file diff --git a/apps/govquests-api/rails_app/bin/tapioca b/apps/govquests-api/rails_app/bin/tapioca new file mode 100755 index 0000000..a6ae757 --- /dev/null +++ b/apps/govquests-api/rails_app/bin/tapioca @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tapioca' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tapioca", "tapioca") diff --git a/apps/govquests-api/rails_app/config/initializers/rails_event_store.rb b/apps/govquests-api/rails_app/config/initializers/rails_event_store.rb index f828ed8..bf0fa4c 100644 --- a/apps/govquests-api/rails_app/config/initializers/rails_event_store.rb +++ b/apps/govquests-api/rails_app/config/initializers/rails_event_store.rb @@ -14,5 +14,4 @@ end Configuration.new.call(Rails.configuration.event_store, Rails.configuration.command_bus) - puts " JOaNA" end diff --git a/apps/govquests-api/rails_app/sorbet/config b/apps/govquests-api/rails_app/sorbet/config new file mode 100644 index 0000000..9b2d35a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/config @@ -0,0 +1,5 @@ +--dir +. +--ignore=tmp/ +--ignore=vendor/ +--suppress-payload-superclass-redefinition-for=Reline::ANSI \ No newline at end of file diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/.gitattributes b/apps/govquests-api/rails_app/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 0000000..d2eacd2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionmailer.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionmailer.rbi new file mode 100644 index 0000000..3d2771d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionmailer.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActionMailer::Base + sig { params(headers: T.untyped, block: T.nilable(T.proc.params(arg0: ActionMailer::Collector).void)).returns(Mail::Message) } + def mail(headers = nil, &block); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionpack.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionpack.rbi new file mode 100644 index 0000000..9fdb5f2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionpack.rbi @@ -0,0 +1,429 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class 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, block: T.untyped).returns(ActionController::Parameters) } + def merge!(other_hash, &block); end + + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def merge(other_hash); end + + 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.untyped) } + def [](key); end + + sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) } + sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) } + def require(key); end + + sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) } + sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[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 { 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 { params(block: T.nilable(Proc)).returns(ActiveSupport::HashWithIndifferentAccess) } + def to_h(&block); 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 + + 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 +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(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(T.nilable(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/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionview.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionview.rbi new file mode 100644 index 0000000..9c939f0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/actionview.rbi @@ -0,0 +1,75 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module ActionView + TemplateError = T.type_alias { Template::Error } + + 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: T.nilable(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/apps/govquests-api/rails_app/sorbet/rbi/annotations/activejob.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activejob.rbi new file mode 100644 index 0000000..0f7441e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activejob.rbi @@ -0,0 +1,44 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActiveJob::Base + sig { params(blk: T.proc.bind(T.attached_class).params(job: T.attached_class).void).void } + def self.after_discard(&blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void } + def self.after_enqueue(*filters, &blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void } + def self.after_perform(*filters, &blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void } + def self.around_enqueue(*filters, &blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void } + def self.around_perform(*filters, &blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void } + def self.before_enqueue(*filters, &blk); end + + sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void } + def self.before_perform(*filters, &blk); end + + sig { type_parameters(:ExceptionType).params(exceptions: T::Class[T.type_parameter(:ExceptionType)], block: T.nilable(T.proc.params(job: T.attached_class, error: T.type_parameter(:ExceptionType)).void)).void } + sig { params(exceptions: T.any(Module, String), block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void } + def self.discard_on(*exceptions, &block); end + + sig { params(klasses: T.any(Module, String), with: T.nilable(Symbol), block: T.nilable(T.proc.params(exception: T.untyped).void)).void } + def self.rescue_from(*klasses, with: nil, &block); end + + sig { params(exceptions: T.any(Module, String), wait: T.any(ActiveSupport::Duration, Integer, Symbol, T.proc.params(executions: Integer).returns(Integer)), attempts: T.any(Integer, Symbol), queue: T.nilable(T.any(String, Symbol)), priority: T.untyped, jitter: Numeric, block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void } + def self.retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT, &block); end + + sig { params(part_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void } + def self.queue_as(part_name = nil, &block); end + + sig { params(priority: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void } + def self.queue_with_priority(priority = nil, &block); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/activemodel.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activemodel.rbi new file mode 100644 index 0000000..1e1a642 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activemodel.rbi @@ -0,0 +1,89 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActiveModel::Errors + Elem = type_member { { fixed: ActiveModel::Error } } + + sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) } + def [](attribute); end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(ActiveModel::Error) } + def add(attribute, type = :invalid, **options); end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Boolean) } + def added?(attribute, type = :invalid, options = {}); end + + sig { params(options: T.untyped).returns(T::Hash[T.untyped, T.untyped]) } + def as_json(options = nil); end + + sig { returns(T::Array[Symbol]) } + def attribute_names; end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T.nilable(T::Array[String])) } + def delete(attribute, type = nil, **options); end + + sig { returns(T::Hash[Symbol, T::Array[T::Hash[Symbol, T.untyped]]]) } + def details; end + + sig { returns(T::Array[Elem]) } + def errors; end + + sig { params(attribute: T.any(Symbol, String), message: String).returns(String) } + def full_message(attribute, message); end + + sig { returns(T::Array[String]) } + def full_messages; end + + sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) } + def full_messages_for(attribute); end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(String) } + def generate_message(attribute, type = :invalid, options = {}); end + + sig { returns(T::Hash[Symbol, T::Array[ActiveModel::Error]]) } + def group_by_attribute; end + + sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) } + def has_key?(attribute); end + + sig { params(error: ActiveModel::Error, override_options: T.untyped).returns(T::Array[ActiveModel::Error]) } + def import(error, override_options = {}); end + + sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) } + def include?(attribute); end + + sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) } + def key?(attribute); end + + sig { params(other: T.untyped).returns(T::Array[ActiveModel::Error]) } + def merge!(other); end + + sig { returns(T::Hash[Symbol, T::Array[String]]) } + def messages; end + + sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) } + def messages_for(attribute); end + + sig { returns(T::Array[Elem]) } + def objects; end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped).returns(T::Boolean) } + def of_kind?(attribute, type = :invalid); end + + sig { returns(T::Array[String]) } + def to_a; end + + sig { params(full_messages: T.untyped).returns(T::Hash[Symbol, T::Array[String]]) } + def to_hash(full_messages = false); end + + sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Array[ActiveModel::Error]) } + def where(attribute, type = nil, **options); end +end + +module ActiveModel::Validations + sig { returns(ActiveModel::Errors) } + def errors; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/activerecord.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activerecord.rbi new file mode 100644 index 0000000..c023f0d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activerecord.rbi @@ -0,0 +1,92 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class 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 `DatabaseStatements` using `method_missing` + include ActiveRecord::ConnectionAdapters::DatabaseStatements +end + +class ActiveRecord::Base + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + sig { returns(TrueClass) } + def present?; end + + 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 + +class ActiveRecord::Relation + sig { returns(T::Boolean) } + def blank?; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/activesupport.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activesupport.rbi new file mode 100644 index 0000000..716210d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/activesupport.rbi @@ -0,0 +1,452 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module 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 ActiveSupport::TimeWithZone + # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing + include ::DateAndTime::Zones + + # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing + include ::DateAndTime::Calculations + + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Object + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(FalseClass) } + def html_safe?; end + + sig { returns(T.nilable(T.self_type)) } + def presence; end + + sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) } + def presence_in(another_object); end + + sig { returns(T::Boolean) } + def present?; end +end + +class Hash + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + sig { returns(T::Boolean) } + def extractable_options?; end +end + +class Array + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + 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(block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T.any(T::Array[Elem], T::Enumerator[Elem])) } + def extract!(&block); end + + sig { returns(ActiveSupport::ArrayInquirer) } + def inquiry; end + + sig { params(object: T.untyped).returns(T::Array[T.untyped]) } + def self.wrap(object); end +end + +class Date + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class DateTime + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class NilClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class FalseClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class TrueClass + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Numeric + sig { returns(FalseClass) } + def blank?; end + + sig { returns(TrueClass) } + def html_safe?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Time + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end + + sig { returns(ActiveSupport::TimeZone) } + def self.zone; end + + sig { returns(T.any(ActiveSupport::TimeWithZone, ::Time)) } + def self.current; end +end + +class Symbol + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + # alias for `#start_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def starts_with?(*string_or_regexp); end + + # alias for `#end_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def ends_with?(*string_or_regexp); end +end + +class String + sig { returns(TrueClass) } + def acts_like_string?; end + + sig { params(position: Integer).returns(T.nilable(String)) } + sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) } + sig { params(position: String).returns(T.nilable(String)) } + def at(position); end + + sig { returns(String) } + def as_json; end + + sig { returns(T::Boolean) } + def blank?; end + + sig { params(first_letter: Symbol).returns(String) } + def camelcase(first_letter = :upper); end + + sig { params(first_letter: Symbol).returns(String) } + def camelize(first_letter = :upper); end + + sig { returns(String) } + def classify; end + + sig { returns(T.untyped) } + def constantize; end + + sig { returns(String) } + def dasherize; end + + sig { returns(String) } + def deconstantize; end + + sig { returns(String) } + def demodulize; end + + # alias for `#end_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def ends_with?(*string_or_regexp); end + + sig { returns(String) } + def downcase_first; end + + sig { params(string: String).returns(T::Boolean) } + def exclude?(string); end + + sig { params(limit: Integer).returns(String) } + def first(limit = 1); end + + sig { params(separate_class_name_and_id_with_underscore: T::Boolean).returns(String) } + def foreign_key(separate_class_name_and_id_with_underscore = true); end + + sig { params(position: Integer).returns(String) } + def from(position); end + + sig { returns(ActiveSupport::SafeBuffer) } + def html_safe; end + + sig { params(capitalize: T::Boolean, keep_id_suffix: T::Boolean).returns(String) } + def humanize(capitalize: true, keep_id_suffix: false); end + + sig { params(zone: T.nilable(T.any(ActiveSupport::TimeZone, String))).returns(T.any(ActiveSupport::TimeWithZone, Time)) } + def in_time_zone(zone = ::Time.zone); end + + sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(String) } + def indent(amount, indent_string = nil, indent_empty_lines = false); end + + sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(T.nilable(String)) } + def indent!(amount, indent_string = nil, indent_empty_lines = false); end + + sig { returns(ActiveSupport::StringInquirer) } + def inquiry; end + + sig { returns(T::Boolean) } + def is_utf8?; end + + sig { params(limit: Integer).returns(String) } + def last(limit = 1); end + + sig { returns(ActiveSupport::Multibyte::Chars) } + def mb_chars; end + + sig { params(separator: String, preserve_case: T::Boolean, locale: T.nilable(Symbol)).returns(String) } + def parameterize(separator: "-", preserve_case: false, locale: nil); end + + sig { params(count: T.nilable(T.any(Integer, Symbol)), locale: T.nilable(Symbol)).returns(String) } + def pluralize(count = nil, locale = :en); end + + sig { returns(T::Boolean) } + def present?; end + + sig { params(patterns: T.any(String, Regexp)).returns(String) } + def remove(*patterns); end + + sig { params(patterns: T.any(String, Regexp)).returns(String) } + def remove!(*patterns); end + + sig { returns(T.untyped) } + def safe_constantize; end + + sig { params(locale: Symbol).returns(String) } + def singularize(locale = :en); end + + sig { returns(String) } + def squish; end + + sig { returns(String) } + def squish!; end + + # alias for `#start_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def starts_with?(*string_or_regexp); end + + sig { returns(String) } + def strip_heredoc; end + + sig { returns(String) } + def tableize; end + + sig { params(keep_id_suffix: T::Boolean).returns(String) } + def titlecase(keep_id_suffix: false); end + + sig { params(keep_id_suffix: T::Boolean).returns(String) } + def titleize(keep_id_suffix: false); end + + sig { params(position: Integer).returns(String) } + def to(position); end + + sig { returns(::Date) } + def to_date; end + + sig { returns(::DateTime) } + def to_datetime; end + + sig { params(form: T.nilable(Symbol)).returns(T.nilable(Time)) } + def to_time(form = :local); end + + sig { params(truncate_to: Integer, options: T::Hash[Symbol, T.anything]).returns(String) } + def truncate(truncate_to, options = {}); end + + sig { params(truncate_to: Integer, omission: T.nilable(String)).returns(String) } + def truncate_bytes(truncate_to, omission: "…"); end + + sig { params(words_count: Integer, options: T::Hash[Symbol, T.anything]).returns(String) } + def truncate_words(words_count, options = {}); end + + sig { returns(String) } + def underscore; end + + sig { returns(String) } + def upcase_first; end +end + +class ActiveSupport::ErrorReporter + sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) } + def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end + + sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) } + def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end + + sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void } + def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # @version >= 7.2.0.beta1 + sig { params(error: T.any(Exception, String), severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void } + def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/globalid.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/globalid.rbi new file mode 100644 index 0000000..916b21d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/globalid.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class 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/apps/govquests-api/rails_app/sorbet/rbi/annotations/minitest.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/minitest.rbi new file mode 100644 index 0000000..64a8928 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/minitest.rbi @@ -0,0 +1,119 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Minitest::Assertions + sig { params(test: T.anything, msg: T.anything).returns(TrueClass) } + def assert(test, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_empty(obj, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def assert_equal(exp, act, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) } + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end + + sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) } + def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end + + sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_includes(collection, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_instance_of(cls, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_kind_of(cls, obj, msg = nil); end + + sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) } + def assert_match(matcher, obj, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_nil(obj, msg = nil); end + + sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) } + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end + + sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) } + def assert_output(stdout = nil, stderr = nil, &block); end + + sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) } + def assert_path_exists(path, msg = nil); end + + sig { params(block: T.proc.void).returns(TrueClass) } + def assert_pattern(&block); end + + sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) } + def assert_predicate(o1, op, msg = nil); end + + sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) } + sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) } + def assert_raises(*exp, &block); end + + sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) } + def assert_respond_to(obj, meth, msg = nil, include_all: false); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def assert_same(exp, act, msg = nil); end + + sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) } + def assert_send(send_ary, m = nil); end + + sig { params(block: T.proc.void).returns(T::Boolean) } + def assert_silent(&block); end + + sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) } + def assert_throws(sym, msg = nil, &block); end + + sig { params(test: T.anything, msg: T.anything).returns(TrueClass) } + def refute(test, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_empty(obj, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def refute_equal(exp, act, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) } + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end + + sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) } + def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end + + sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_includes(collection, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_instance_of(cls, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_kind_of(cls, obj, msg = nil); end + + sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_match(matcher, obj, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_nil(obj, msg = nil); end + + sig { params(block: T.proc.void).returns(TrueClass) } + def refute_pattern(&block); end + + sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) } + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end + + sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) } + def refute_path_exists(path, msg = nil); end + + sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) } + def refute_predicate(o1, op, msg = nil); end + + sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) } + def refute_respond_to(obj, meth, msg = nil, include_all: false); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def refute_same(exp, act, msg = nil); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/annotations/railties.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/railties.rbi new file mode 100644 index 0000000..cec2842 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/railties.rbi @@ -0,0 +1,61 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module 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::ErrorReporter) } + def error; 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/apps/govquests-api/rails_app/sorbet/rbi/annotations/rainbow.rbi b/apps/govquests-api/rails_app/sorbet/rbi/annotations/rainbow.rbi new file mode 100644 index 0000000..0d2cb4e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/annotations/rainbow.rbi @@ -0,0 +1,269 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module 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 { 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 + 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/apps/govquests-api/rails_app/sorbet/rbi/dsl/.gitattributes b/apps/govquests-api/rails_app/sorbet/rbi/dsl/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching.rbi new file mode 100644 index 0000000..826d65c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching.rbi @@ -0,0 +1,31 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::Caching`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::Caching`. + + +module AbstractController::Caching + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi new file mode 100644 index 0000000..d04a840 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::Caching::Fragments`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::Caching::Fragments`. + + +module AbstractController::Caching::Fragments + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/callbacks.rbi new file mode 100644 index 0000000..16926ae --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/callbacks.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::Callbacks`. + + +module AbstractController::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/helpers.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/helpers.rbi new file mode 100644 index 0000000..3f1bbc1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/helpers.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::Helpers`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::Helpers`. + + +module AbstractController::Helpers + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/rendering.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/rendering.rbi new file mode 100644 index 0000000..4a3bfe1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/rendering.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::Rendering`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::Rendering`. + + +module AbstractController::Rendering + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/url_for.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/url_for.rbi new file mode 100644 index 0000000..14ffe07 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/abstract_controller/url_for.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `AbstractController::UrlFor`. +# Please instead update this file by running `bin/tapioca dsl AbstractController::UrlFor`. + + +module AbstractController::UrlFor + include GeneratedInstanceMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/caching.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/caching.rbi new file mode 100644 index 0000000..f88717f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/caching.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Caching`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Caching`. + + +module ActionController::Caching + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/conditional_get.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/conditional_get.rbi new file mode 100644 index 0000000..a35b102 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/conditional_get.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::ConditionalGet`. +# Please instead update this file by running `bin/tapioca dsl ActionController::ConditionalGet`. + + +module ActionController::ConditionalGet + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/content_security_policy.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/content_security_policy.rbi new file mode 100644 index 0000000..04f6d59 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/content_security_policy.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::ContentSecurityPolicy`. +# Please instead update this file by running `bin/tapioca dsl ActionController::ContentSecurityPolicy`. + + +module ActionController::ContentSecurityPolicy + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/data_streaming.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/data_streaming.rbi new file mode 100644 index 0000000..91ac611 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/data_streaming.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::DataStreaming`. +# Please instead update this file by running `bin/tapioca dsl ActionController::DataStreaming`. + + +module ActionController::DataStreaming + mixes_in_class_methods ::ActionController::Rendering::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi new file mode 100644 index 0000000..ab5f950 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::EtagWithFlash`. +# Please instead update this file by running `bin/tapioca dsl ActionController::EtagWithFlash`. + + +module ActionController::EtagWithFlash + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi new file mode 100644 index 0000000..d6602b7 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi @@ -0,0 +1,31 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::EtagWithTemplateDigest`. +# Please instead update this file by running `bin/tapioca dsl ActionController::EtagWithTemplateDigest`. + + +module ActionController::EtagWithTemplateDigest + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/flash.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/flash.rbi new file mode 100644 index 0000000..d685467 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/flash.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Flash`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Flash`. + + +module ActionController::Flash + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _flash_types; end + def _flash_types=(value); end + def _flash_types?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/form_builder.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/form_builder.rbi new file mode 100644 index 0000000..059161c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/form_builder.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::FormBuilder`. +# Please instead update this file by running `bin/tapioca dsl ActionController::FormBuilder`. + + +module ActionController::FormBuilder + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/helpers.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/helpers.rbi new file mode 100644 index 0000000..dbfe5f4 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/helpers.rbi @@ -0,0 +1,37 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Helpers`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Helpers`. + + +module ActionController::Helpers + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/params_wrapper.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/params_wrapper.rbi new file mode 100644 index 0000000..4b12f1e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/params_wrapper.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::ParamsWrapper`. +# Please instead update this file by running `bin/tapioca dsl ActionController::ParamsWrapper`. + + +module ActionController::ParamsWrapper + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/redirecting.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/redirecting.rbi new file mode 100644 index 0000000..32ac3ea --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/redirecting.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Redirecting`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Redirecting`. + + +module ActionController::Redirecting + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers.rbi new file mode 100644 index 0000000..0c6e186 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Renderers`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Renderers`. + + +module ActionController::Renderers + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers/all.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers/all.rbi new file mode 100644 index 0000000..5d5b25b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/renderers/all.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Renderers::All`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Renderers::All`. + + +module ActionController::Renderers::All + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActionController::Renderers::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi new file mode 100644 index 0000000..2812530 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::RequestForgeryProtection`. +# Please instead update this file by running `bin/tapioca dsl ActionController::RequestForgeryProtection`. + + +module ActionController::RequestForgeryProtection + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/rescue.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/rescue.rbi new file mode 100644 index 0000000..b58f096 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/rescue.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::Rescue`. +# Please instead update this file by running `bin/tapioca dsl ActionController::Rescue`. + + +module ActionController::Rescue + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi new file mode 100644 index 0000000..ee0cd10 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::TestCase::Behavior`. +# Please instead update this file by running `bin/tapioca dsl ActionController::TestCase::Behavior`. + + +module ActionController::TestCase::Behavior + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/url_for.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/url_for.rbi new file mode 100644 index 0000000..8b1aa82 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_controller/url_for.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionController::UrlFor`. +# Please instead update this file by running `bin/tapioca dsl ActionController::UrlFor`. + + +module ActionController::UrlFor + include GeneratedInstanceMethods + + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/assertions.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/assertions.rbi new file mode 100644 index 0000000..002fcd5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/assertions.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionDispatch::Assertions`. +# Please instead update this file by running `bin/tapioca dsl ActionDispatch::Assertions`. + + +module ActionDispatch::Assertions + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/integration_test.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/integration_test.rbi new file mode 100644 index 0000000..ff92dad --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/integration_test.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionDispatch::IntegrationTest`. +# Please instead update this file by running `bin/tapioca dsl ActionDispatch::IntegrationTest`. + + +class ActionDispatch::IntegrationTest + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/route_set/mounted_helpers.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/route_set/mounted_helpers.rbi new file mode 100644 index 0000000..8810693 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/route_set/mounted_helpers.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionDispatch::Routing::RouteSet::MountedHelpers`. +# Please instead update this file by running `bin/tapioca dsl ActionDispatch::Routing::RouteSet::MountedHelpers`. + + +module ActionDispatch::Routing::RouteSet::MountedHelpers + include GeneratedInstanceMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi new file mode 100644 index 0000000..8bb4a03 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionDispatch::Routing::UrlFor`. +# Please instead update this file by running `bin/tapioca dsl ActionDispatch::Routing::UrlFor`. + + +module ActionDispatch::Routing::UrlFor + include GeneratedInstanceMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/inbound_email.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/inbound_email.rbi new file mode 100644 index 0000000..0398af0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/inbound_email.rbi @@ -0,0 +1,960 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailbox::InboundEmail`. +# Please instead update this file by running `bin/tapioca dsl ActionMailbox::InboundEmail`. + + +class ActionMailbox::InboundEmail + include GeneratedAssociationMethods + include EnumMethodsModule + extend CommonRelationMethods + extend GeneratedRelationMethods + + sig { returns(ActiveStorage::Attached::One) } + def raw_email; end + + sig { params(attachable: T.untyped).returns(T.untyped) } + def raw_email=(attachable); end + + private + + sig { returns(NilClass) } + def to_ary; end + + class << self + sig { returns(T::Hash[T.any(String, Symbol), Integer]) } + def statuses; end + end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionMailbox::InboundEmail).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::ActionMailbox::InboundEmail).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def fifth; end + + sig { returns(::ActionMailbox::InboundEmail) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActionMailbox::InboundEmail) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActionMailbox::InboundEmail]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActionMailbox::InboundEmail).void + ).returns(T.nilable(::ActionMailbox::InboundEmail)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActionMailbox::InboundEmail)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActionMailbox::InboundEmail) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActionMailbox::InboundEmail).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActionMailbox::InboundEmail]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActionMailbox::InboundEmail]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActionMailbox::InboundEmail]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActionMailbox::InboundEmail)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActionMailbox::InboundEmail) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActionMailbox::InboundEmail) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionMailbox::InboundEmail)) } + sig { params(limit: Integer).returns(T::Array[::ActionMailbox::InboundEmail]) } + def first(limit = nil); end + + sig { returns(::ActionMailbox::InboundEmail) } + def first!; end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def forty_two; end + + sig { returns(::ActionMailbox::InboundEmail) } + def forty_two!; end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def fourth; end + + sig { returns(::ActionMailbox::InboundEmail) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionMailbox::InboundEmail)) } + sig { params(limit: Integer).returns(T::Array[::ActionMailbox::InboundEmail]) } + def last(limit = nil); end + + sig { returns(::ActionMailbox::InboundEmail) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionMailbox::InboundEmail).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionMailbox::InboundEmail).void) + ).returns(::ActionMailbox::InboundEmail) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionMailbox::InboundEmail).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionMailbox::InboundEmail).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def second; end + + sig { returns(::ActionMailbox::InboundEmail) } + def second!; end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def second_to_last; end + + sig { returns(::ActionMailbox::InboundEmail) } + def second_to_last!; end + + sig { returns(::ActionMailbox::InboundEmail) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActionMailbox::InboundEmail).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionMailbox::InboundEmail)) } + sig { params(limit: Integer).returns(T::Array[::ActionMailbox::InboundEmail]) } + def take(limit = nil); end + + sig { returns(::ActionMailbox::InboundEmail) } + def take!; end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def third; end + + sig { returns(::ActionMailbox::InboundEmail) } + def third!; end + + sig { returns(T.nilable(::ActionMailbox::InboundEmail)) } + def third_to_last; end + + sig { returns(::ActionMailbox::InboundEmail) } + def third_to_last!; end + end + + module EnumMethodsModule + sig { void } + def bounced!; end + + sig { returns(T::Boolean) } + def bounced?; end + + sig { void } + def delivered!; end + + sig { returns(T::Boolean) } + def delivered?; end + + sig { void } + def failed!; end + + sig { returns(T::Boolean) } + def failed?; end + + sig { void } + def pending!; end + + sig { returns(T::Boolean) } + def pending?; end + + sig { void } + def processing!; end + + sig { returns(T::Boolean) } + def processing?; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_raw_email_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_raw_email_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_raw_email_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_raw_email_attachment!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_raw_email_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_raw_email_blob!(*args, &blk); end + + sig { returns(T.untyped) } + def raw_email_attachment; end + + sig { params(value: T.untyped).void } + def raw_email_attachment=(value); end + + sig { returns(T.untyped) } + def raw_email_blob; end + + sig { params(value: T.untyped).void } + def raw_email_blob=(value); end + + sig { returns(T.untyped) } + def reload_raw_email_attachment; end + + sig { returns(T.untyped) } + def reload_raw_email_blob; end + + sig { void } + def reset_raw_email_attachment; end + + sig { void } + def reset_raw_email_blob; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def bounced(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def delivered(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def not_bounced(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def not_delivered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def not_failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def not_pending(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def not_processing(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def pending(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def processing(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_attached_raw_email(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def bounced(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def delivered(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def not_bounced(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def not_delivered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def not_failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def not_pending(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def not_processing(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def pending(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def processing(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_attached_raw_email(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_a; end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig do + params( + records: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def load_target; end + + sig do + params( + records: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActionMailbox::InboundEmail, T::Enumerable[T.any(::ActionMailbox::InboundEmail, T::Enumerable[::ActionMailbox::InboundEmail])]) + ).returns(T::Array[::ActionMailbox::InboundEmail]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def target; end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_a; end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_a; end + + sig { returns(T::Array[::ActionMailbox::InboundEmail]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActionMailbox::InboundEmail } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/incineration_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/incineration_job.rbi new file mode 100644 index 0000000..48d9b0e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/incineration_job.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailbox::IncinerationJob`. +# Please instead update this file by running `bin/tapioca dsl ActionMailbox::IncinerationJob`. + + +class ActionMailbox::IncinerationJob + class << self + sig do + params( + inbound_email: T.untyped, + block: T.nilable(T.proc.params(job: ActionMailbox::IncinerationJob).void) + ).returns(T.any(ActionMailbox::IncinerationJob, FalseClass)) + end + def perform_later(inbound_email, &block); end + + sig { params(inbound_email: T.untyped).returns(T.untyped) } + def perform_now(inbound_email); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/routing_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/routing_job.rbi new file mode 100644 index 0000000..34b0e15 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailbox/routing_job.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailbox::RoutingJob`. +# Please instead update this file by running `bin/tapioca dsl ActionMailbox::RoutingJob`. + + +class ActionMailbox::RoutingJob + class << self + sig do + params( + inbound_email: T.untyped, + block: T.nilable(T.proc.params(job: ActionMailbox::RoutingJob).void) + ).returns(T.any(ActionMailbox::RoutingJob, FalseClass)) + end + def perform_later(inbound_email, &block); end + + sig { params(inbound_email: T.untyped).returns(T.untyped) } + def perform_now(inbound_email); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/callbacks.rbi new file mode 100644 index 0000000..829e1ad --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/callbacks.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::Callbacks`. + + +module ActionMailer::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/delivery_methods.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/delivery_methods.rbi new file mode 100644 index 0000000..a4d7c6c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/delivery_methods.rbi @@ -0,0 +1,54 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::DeliveryMethods`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::DeliveryMethods`. + + +module ActionMailer::DeliveryMethods + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/form_builder.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/form_builder.rbi new file mode 100644 index 0000000..ca921d3 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/form_builder.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::FormBuilder`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::FormBuilder`. + + +module ActionMailer::FormBuilder + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/mail_delivery_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/mail_delivery_job.rbi new file mode 100644 index 0000000..ef86f90 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/mail_delivery_job.rbi @@ -0,0 +1,35 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::MailDeliveryJob`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::MailDeliveryJob`. + + +class ActionMailer::MailDeliveryJob + class << self + sig do + params( + mailer: T.untyped, + mail_method: T.untyped, + delivery_method: T.untyped, + args: T.untyped, + kwargs: T.untyped, + params: T.untyped, + block: T.nilable(T.proc.params(job: ActionMailer::MailDeliveryJob).void) + ).returns(T.any(ActionMailer::MailDeliveryJob, FalseClass)) + end + def perform_later(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil), &block); end + + sig do + params( + mailer: T.untyped, + mail_method: T.untyped, + delivery_method: T.untyped, + args: T.untyped, + kwargs: T.untyped, + params: T.untyped + ).returns(T.untyped) + end + def perform_now(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil)); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi new file mode 100644 index 0000000..a510146 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/queued_delivery.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::QueuedDelivery`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::QueuedDelivery`. + + +module ActionMailer::QueuedDelivery + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end + + module GeneratedInstanceMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/rescuable.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/rescuable.rbi new file mode 100644 index 0000000..5bd7ad4 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/rescuable.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::Rescuable`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::Rescuable`. + + +module ActionMailer::Rescuable + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/test_case/behavior.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/test_case/behavior.rbi new file mode 100644 index 0000000..cab5a04 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_mailer/test_case/behavior.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionMailer::TestCase::Behavior`. +# Please instead update this file by running `bin/tapioca dsl ActionMailer::TestCase::Behavior`. + + +module ActionMailer::TestCase::Behavior + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/encrypted_rich_text.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/encrypted_rich_text.rbi new file mode 100644 index 0000000..1e12dab --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/encrypted_rich_text.rbi @@ -0,0 +1,860 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionText::EncryptedRichText`. +# Please instead update this file by running `bin/tapioca dsl ActionText::EncryptedRichText`. + + +class ActionText::EncryptedRichText + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + sig { returns(ActiveStorage::Attached::Many) } + def embeds; end + + sig { params(attachable: T.untyped).returns(T.untyped) } + def embeds=(attachable); end + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::EncryptedRichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::ActionText::EncryptedRichText).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def fifth; end + + sig { returns(::ActionText::EncryptedRichText) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActionText::EncryptedRichText) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActionText::EncryptedRichText]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActionText::EncryptedRichText).void + ).returns(T.nilable(::ActionText::EncryptedRichText)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActionText::EncryptedRichText)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActionText::EncryptedRichText) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActionText::EncryptedRichText).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActionText::EncryptedRichText]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActionText::EncryptedRichText]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActionText::EncryptedRichText]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActionText::EncryptedRichText)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActionText::EncryptedRichText) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActionText::EncryptedRichText) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::EncryptedRichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::EncryptedRichText]) } + def first(limit = nil); end + + sig { returns(::ActionText::EncryptedRichText) } + def first!; end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def forty_two; end + + sig { returns(::ActionText::EncryptedRichText) } + def forty_two!; end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def fourth; end + + sig { returns(::ActionText::EncryptedRichText) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::EncryptedRichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::EncryptedRichText]) } + def last(limit = nil); end + + sig { returns(::ActionText::EncryptedRichText) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::EncryptedRichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::EncryptedRichText).void) + ).returns(::ActionText::EncryptedRichText) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::EncryptedRichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::EncryptedRichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def second; end + + sig { returns(::ActionText::EncryptedRichText) } + def second!; end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def second_to_last; end + + sig { returns(::ActionText::EncryptedRichText) } + def second_to_last!; end + + sig { returns(::ActionText::EncryptedRichText) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActionText::EncryptedRichText).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::EncryptedRichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::EncryptedRichText]) } + def take(limit = nil); end + + sig { returns(::ActionText::EncryptedRichText) } + def take!; end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def third; end + + sig { returns(::ActionText::EncryptedRichText) } + def third!; end + + sig { returns(T.nilable(::ActionText::EncryptedRichText)) } + def third_to_last; end + + sig { returns(::ActionText::EncryptedRichText) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T::Array[T.untyped]) } + def embeds_attachment_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def embeds_attachment_ids=(ids); end + + # This method is created by ActiveRecord on the `ActionText::RichText` class because it declared `has_many :embeds_attachments`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def embeds_attachments; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def embeds_attachments=(value); end + + sig { returns(T::Array[T.untyped]) } + def embeds_blob_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def embeds_blob_ids=(ids); end + + # This method is created by ActiveRecord on the `ActionText::RichText` class because it declared `has_many :embeds_blobs, through: :embeds_attachments`. + # 🔗 [Rails guide for `has_many_through` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-through-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def embeds_blobs; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def embeds_blobs=(value); end + + sig { returns(T.untyped) } + def record; end + + sig { params(value: T.untyped).void } + def record=(value); end + + sig { returns(T.untyped) } + def reload_record; end + + sig { void } + def reset_record; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_attached_embeds(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_attached_embeds(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig do + params( + records: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def load_target; end + + sig do + params( + records: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActionText::EncryptedRichText, T::Enumerable[T.any(::ActionText::EncryptedRichText, T::Enumerable[::ActionText::EncryptedRichText])]) + ).returns(T::Array[::ActionText::EncryptedRichText]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def target; end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::EncryptedRichText]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActionText::EncryptedRichText } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/rich_text.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/rich_text.rbi new file mode 100644 index 0000000..48ad76a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_text/rich_text.rbi @@ -0,0 +1,855 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionText::RichText`. +# Please instead update this file by running `bin/tapioca dsl ActionText::RichText`. + + +class ActionText::RichText + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + sig { returns(ActiveStorage::Attached::Many) } + def embeds; end + + sig { params(attachable: T.untyped).returns(T.untyped) } + def embeds=(attachable); end + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::RichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::ActionText::RichText).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActionText::RichText]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActionText::RichText)) } + def fifth; end + + sig { returns(::ActionText::RichText) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActionText::RichText) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActionText::RichText]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActionText::RichText).void + ).returns(T.nilable(::ActionText::RichText)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActionText::RichText)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActionText::RichText) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActionText::RichText).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActionText::RichText]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActionText::RichText]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActionText::RichText]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActionText::RichText)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActionText::RichText) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActionText::RichText) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::RichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::RichText]) } + def first(limit = nil); end + + sig { returns(::ActionText::RichText) } + def first!; end + + sig { returns(T.nilable(::ActionText::RichText)) } + def forty_two; end + + sig { returns(::ActionText::RichText) } + def forty_two!; end + + sig { returns(T.nilable(::ActionText::RichText)) } + def fourth; end + + sig { returns(::ActionText::RichText) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::RichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::RichText]) } + def last(limit = nil); end + + sig { returns(::ActionText::RichText) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::RichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActionText::RichText).void) + ).returns(::ActionText::RichText) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::RichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActionText::RichText).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActionText::RichText)) } + def second; end + + sig { returns(::ActionText::RichText) } + def second!; end + + sig { returns(T.nilable(::ActionText::RichText)) } + def second_to_last; end + + sig { returns(::ActionText::RichText) } + def second_to_last!; end + + sig { returns(::ActionText::RichText) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActionText::RichText).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActionText::RichText)) } + sig { params(limit: Integer).returns(T::Array[::ActionText::RichText]) } + def take(limit = nil); end + + sig { returns(::ActionText::RichText) } + def take!; end + + sig { returns(T.nilable(::ActionText::RichText)) } + def third; end + + sig { returns(::ActionText::RichText) } + def third!; end + + sig { returns(T.nilable(::ActionText::RichText)) } + def third_to_last; end + + sig { returns(::ActionText::RichText) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T::Array[T.untyped]) } + def embeds_attachment_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def embeds_attachment_ids=(ids); end + + # This method is created by ActiveRecord on the `ActionText::RichText` class because it declared `has_many :embeds_attachments`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def embeds_attachments; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def embeds_attachments=(value); end + + sig { returns(T::Array[T.untyped]) } + def embeds_blob_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def embeds_blob_ids=(ids); end + + # This method is created by ActiveRecord on the `ActionText::RichText` class because it declared `has_many :embeds_blobs, through: :embeds_attachments`. + # 🔗 [Rails guide for `has_many_through` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-through-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def embeds_blobs; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def embeds_blobs=(value); end + + sig { returns(T.untyped) } + def record; end + + sig { params(value: T.untyped).void } + def record=(value); end + + sig { returns(T.untyped) } + def reload_record; end + + sig { void } + def reset_record; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_attached_embeds(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_attached_embeds(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { returns(T::Array[::ActionText::RichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::RichText]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig do + params( + records: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActionText::RichText]) } + def load_target; end + + sig do + params( + records: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActionText::RichText, T::Enumerable[T.any(::ActionText::RichText, T::Enumerable[::ActionText::RichText])]) + ).returns(T::Array[::ActionText::RichText]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActionText::RichText]) } + def target; end + + sig { returns(T::Array[::ActionText::RichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::RichText]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { returns(T::Array[::ActionText::RichText]) } + def to_a; end + + sig { returns(T::Array[::ActionText::RichText]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActionText::RichText } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers.rbi new file mode 100644 index 0000000..efa2fd8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers.rbi @@ -0,0 +1,14 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Helpers`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Helpers`. + + +module ActionView::Helpers + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi new file mode 100644 index 0000000..10a330a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Helpers::FormHelper`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Helpers::FormHelper`. + + +module ActionView::Helpers::FormHelper + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi new file mode 100644 index 0000000..ca1d562 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Helpers::FormTagHelper`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Helpers::FormTagHelper`. + + +module ActionView::Helpers::FormTagHelper + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi new file mode 100644 index 0000000..733cb5f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Helpers::TextHelper`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Helpers::TextHelper`. + + +module ActionView::Helpers::TextHelper + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/layouts.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/layouts.rbi new file mode 100644 index 0000000..4f1bd8e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/layouts.rbi @@ -0,0 +1,28 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Layouts`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Layouts`. + + +module ActionView::Layouts + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + mixes_in_class_methods ::ActionView::Rendering::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 + def _layout_conditions; end + def _layout_conditions?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/rendering.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/rendering.rbi new file mode 100644 index 0000000..52ac489 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/action_view/rendering.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActionView::Rendering`. +# Please instead update this file by running `bin/tapioca dsl ActionView::Rendering`. + + +module ActionView::Rendering + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/callbacks.rbi new file mode 100644 index 0000000..281a3bf --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/callbacks.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::Callbacks`. + + +module ActiveJob::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/concurrency_controls.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/concurrency_controls.rbi new file mode 100644 index 0000000..cac3147 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/concurrency_controls.rbi @@ -0,0 +1,36 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::ConcurrencyControls`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::ConcurrencyControls`. + + +module ActiveJob::ConcurrencyControls + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def concurrency_duration; end + def concurrency_duration=(value); end + def concurrency_duration?; end + def concurrency_group; end + def concurrency_group=(value); end + def concurrency_group?; end + def concurrency_key; end + def concurrency_key=(value); end + def concurrency_key?; end + def concurrency_limit; end + def concurrency_limit=(value); end + def concurrency_limit?; end + end + + module GeneratedInstanceMethods + def concurrency_duration; end + def concurrency_duration=(value); end + def concurrency_duration?; end + def concurrency_limit; end + def concurrency_limit=(value); end + def concurrency_limit?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/enqueuing.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/enqueuing.rbi new file mode 100644 index 0000000..a55a52e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/enqueuing.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::Enqueuing`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::Enqueuing`. + + +module ActiveJob::Enqueuing + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def enqueue_after_transaction_commit; end + def enqueue_after_transaction_commit=(value); end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/exceptions.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/exceptions.rbi new file mode 100644 index 0000000..f1c1f6c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/exceptions.rbi @@ -0,0 +1,26 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::Exceptions`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::Exceptions`. + + +module ActiveJob::Exceptions + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end + def retry_jitter; end + def retry_jitter=(value); end + end + + module GeneratedInstanceMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/execution.rbi new file mode 100644 index 0000000..7fa4a61 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/execution.rbi @@ -0,0 +1,25 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::Execution`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::Execution`. + + +module ActiveJob::Execution + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/logging.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/logging.rbi new file mode 100644 index 0000000..d375911 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/logging.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::Logging`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::Logging`. + + +module ActiveJob::Logging + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def log_arguments; end + def log_arguments=(value); end + def log_arguments?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_adapter.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_adapter.rbi new file mode 100644 index 0000000..7d7053a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_adapter.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::QueueAdapter`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::QueueAdapter`. + + +module ActiveJob::QueueAdapter + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_name.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_name.rbi new file mode 100644 index 0000000..e728614 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_name.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::QueueName`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::QueueName`. + + +module ActiveJob::QueueName + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_priority.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_priority.rbi new file mode 100644 index 0000000..ec03184 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/queue_priority.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::QueuePriority`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::QueuePriority`. + + +module ActiveJob::QueuePriority + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def priority; end + def priority=(value); end + def priority?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/test_helper/test_queue_adapter.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/test_helper/test_queue_adapter.rbi new file mode 100644 index 0000000..8539af1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_job/test_helper/test_queue_adapter.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveJob::TestHelper::TestQueueAdapter`. +# Please instead update this file by running `bin/tapioca dsl ActiveJob::TestHelper::TestQueueAdapter`. + + +module ActiveJob::TestHelper::TestQueueAdapter + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _test_adapter; end + def _test_adapter=(value); end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/api.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/api.rbi new file mode 100644 index 0000000..1f1608c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/api.rbi @@ -0,0 +1,32 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::API`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::API`. + + +module ActiveModel::API + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveModel::Validations::ClassMethods + mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _validators; end + def _validators=(value); end + def _validators?; end + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _validators; end + def _validators?; end + def param_delimiter=(value); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attribute_methods.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attribute_methods.rbi new file mode 100644 index 0000000..8e58d7b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attribute_methods.rbi @@ -0,0 +1,28 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::AttributeMethods`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::AttributeMethods`. + + +module ActiveModel::AttributeMethods + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attributes.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attributes.rbi new file mode 100644 index 0000000..d300cb5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/attributes.rbi @@ -0,0 +1,30 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Attributes`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Attributes`. + + +module ActiveModel::Attributes + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/conversion.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/conversion.rbi new file mode 100644 index 0000000..9289cdd --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/conversion.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Conversion`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Conversion`. + + +module ActiveModel::Conversion + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def param_delimiter=(value); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/dirty.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/dirty.rbi new file mode 100644 index 0000000..7eb00d3 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/dirty.rbi @@ -0,0 +1,29 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Dirty`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Dirty`. + + +module ActiveModel::Dirty + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/serializers/json.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/serializers/json.rbi new file mode 100644 index 0000000..ab70ce9 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/serializers/json.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Serializers::JSON`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Serializers::JSON`. + + +module ActiveModel::Serializers::JSON + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations.rbi new file mode 100644 index 0000000..38b2a27 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations.rbi @@ -0,0 +1,26 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Validations`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Validations`. + + +module ActiveModel::Validations + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _validators; end + def _validators=(value); end + def _validators?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _validators; end + def _validators?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations/callbacks.rbi new file mode 100644 index 0000000..16e3701 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_model/validations/callbacks.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveModel::Validations::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveModel::Validations::Callbacks`. + + +module ActiveModel::Validations::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods.rbi new file mode 100644 index 0000000..d65dd43 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods.rbi @@ -0,0 +1,57 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::AttributeMethods`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::AttributeMethods`. + + +module ActiveRecord::AttributeMethods + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + def partial_inserts; end + def partial_inserts=(value); end + def partial_inserts?; end + 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_patterns; end + def attribute_method_patterns?; 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi new file mode 100644 index 0000000..516acdb --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi @@ -0,0 +1,39 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::AttributeMethods::Dirty`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::AttributeMethods::Dirty`. + + +module ActiveRecord::AttributeMethods::Dirty + include GeneratedInstanceMethods + + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + def partial_inserts; end + def partial_inserts=(value); end + def partial_inserts?; end + 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_patterns; end + def attribute_method_patterns?; end + def partial_inserts; end + def partial_inserts?; end + def partial_updates; end + def partial_updates?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi new file mode 100644 index 0000000..9d06e27 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/serialization.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::AttributeMethods::Serialization`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::AttributeMethods::Serialization`. + + +module ActiveRecord::AttributeMethods::Serialization + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi new file mode 100644 index 0000000..be40114 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi @@ -0,0 +1,33 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::AttributeMethods::TimeZoneConversion`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::AttributeMethods::TimeZoneConversion`. + + +module ActiveRecord::AttributeMethods::TimeZoneConversion + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attributes.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attributes.rbi new file mode 100644 index 0000000..75bcc1a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/attributes.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Attributes`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Attributes`. + + +module ActiveRecord::Attributes + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/callbacks.rbi new file mode 100644 index 0000000..76e4574 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/callbacks.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Callbacks`. + + +module ActiveRecord::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/core.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/core.rbi new file mode 100644 index 0000000..b31cc1c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/core.rbi @@ -0,0 +1,68 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Core`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Core`. + + +module ActiveRecord::Core + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _destroy_association_async_job; end + def _destroy_association_async_job=(value); end + def _destroy_association_async_job?; end + def attributes_for_inspect; end + def attributes_for_inspect=(value); end + def attributes_for_inspect?; end + 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_batch_size; end + def destroy_association_async_batch_size=(value); end + def enumerate_columns_in_select_statements; end + def enumerate_columns_in_select_statements=(value); end + def enumerate_columns_in_select_statements?; end + 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 run_commit_callbacks_on_first_saved_instances_in_transaction; end + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + def shard_selector; end + def shard_selector=(value); end + def shard_selector?; end + def strict_loading_by_default; end + def strict_loading_by_default=(value); end + def strict_loading_by_default?; end + def strict_loading_mode; end + def strict_loading_mode=(value); end + def strict_loading_mode?; 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_batch_size; end + def logger; end + def logger?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/counter_cache.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/counter_cache.rbi new file mode 100644 index 0000000..9aff98e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/counter_cache.rbi @@ -0,0 +1,26 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::CounterCache`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::CounterCache`. + + +module ActiveRecord::CounterCache + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _counter_cache_columns; end + def _counter_cache_columns=(value); end + def _counter_cache_columns?; end + def counter_cached_association_names; end + def counter_cached_association_names=(value); end + def counter_cached_association_names?; end + end + + module GeneratedInstanceMethods + def counter_cached_association_names; end + def counter_cached_association_names?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi new file mode 100644 index 0000000..73b5a46 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Encryption::EncryptableRecord`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Encryption::EncryptableRecord`. + + +module ActiveRecord::Encryption::EncryptableRecord + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/inheritance.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/inheritance.rbi new file mode 100644 index 0000000..53130bd --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/inheritance.rbi @@ -0,0 +1,28 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Inheritance`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Inheritance`. + + +module ActiveRecord::Inheritance + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/integration.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/integration.rbi new file mode 100644 index 0000000..6fc6d69 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/integration.rbi @@ -0,0 +1,33 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Integration`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Integration`. + + +module ActiveRecord::Integration + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/locking/optimistic.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/locking/optimistic.rbi new file mode 100644 index 0000000..99efc8b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/locking/optimistic.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Locking::Optimistic`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Locking::Optimistic`. + + +module ActiveRecord::Locking::Optimistic + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/model_schema.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/model_schema.rbi new file mode 100644 index 0000000..85bd9da --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/model_schema.rbi @@ -0,0 +1,53 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::ModelSchema`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::ModelSchema`. + + +module ActiveRecord::ModelSchema + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/nested_attributes.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/nested_attributes.rbi new file mode 100644 index 0000000..6bbad79 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/nested_attributes.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::NestedAttributes`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::NestedAttributes`. + + +module ActiveRecord::NestedAttributes + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/normalization.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/normalization.rbi new file mode 100644 index 0000000..24b3404 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/normalization.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Normalization`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Normalization`. + + +module ActiveRecord::Normalization + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end + + module GeneratedInstanceMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/readonly_attributes.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/readonly_attributes.rbi new file mode 100644 index 0000000..c6477f5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/readonly_attributes.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::ReadonlyAttributes`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::ReadonlyAttributes`. + + +module ActiveRecord::ReadonlyAttributes + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def _attr_readonly; end + def _attr_readonly=(value); end + def _attr_readonly?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/reflection.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/reflection.rbi new file mode 100644 index 0000000..8328dd4 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/reflection.rbi @@ -0,0 +1,38 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Reflection`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Reflection`. + + +module ActiveRecord::Reflection + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations=(value); end + def automatically_invert_plural_associations?; 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 + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations?; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping.rbi new file mode 100644 index 0000000..229070b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Scoping`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Scoping`. + + +module ActiveRecord::Scoping + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping/default.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping/default.rbi new file mode 100644 index 0000000..28518b0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/scoping/default.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Scoping::Default`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Scoping::Default`. + + +module ActiveRecord::Scoping::Default + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/secure_password.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/secure_password.rbi new file mode 100644 index 0000000..6c06f86 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/secure_password.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::SecurePassword`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::SecurePassword`. + + +module ActiveRecord::SecurePassword + mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/serialization.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/serialization.rbi new file mode 100644 index 0000000..59b5278 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/serialization.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Serialization`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Serialization`. + + +module ActiveRecord::Serialization + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/signed_id.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/signed_id.rbi new file mode 100644 index 0000000..0db888f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/signed_id.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::SignedId`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::SignedId`. + + +module ActiveRecord::SignedId + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/timestamp.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/timestamp.rbi new file mode 100644 index 0000000..31ee319 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/timestamp.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::Timestamp`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::Timestamp`. + + +module ActiveRecord::Timestamp + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/token_for.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/token_for.rbi new file mode 100644 index 0000000..4e1eec6 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_record/token_for.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveRecord::TokenFor`. +# Please instead update this file by running `bin/tapioca dsl ActiveRecord::TokenFor`. + + +module ActiveRecord::TokenFor + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def generated_token_verifier; end + def generated_token_verifier=(value); end + def token_definitions; end + def token_definitions=(value); end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/analyze_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/analyze_job.rbi new file mode 100644 index 0000000..7b48068 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/analyze_job.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::AnalyzeJob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::AnalyzeJob`. + + +class ActiveStorage::AnalyzeJob + class << self + sig do + params( + blob: T.untyped, + block: T.nilable(T.proc.params(job: ActiveStorage::AnalyzeJob).void) + ).returns(T.any(ActiveStorage::AnalyzeJob, FalseClass)) + end + def perform_later(blob, &block); end + + sig { params(blob: T.untyped).returns(T.untyped) } + def perform_now(blob); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/attachment.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/attachment.rbi new file mode 100644 index 0000000..dfc975b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/attachment.rbi @@ -0,0 +1,847 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::Attachment`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::Attachment`. + + +class ActiveStorage::Attachment + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Attachment).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::ActiveStorage::Attachment).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def fifth; end + + sig { returns(::ActiveStorage::Attachment) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActiveStorage::Attachment) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActiveStorage::Attachment]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActiveStorage::Attachment).void + ).returns(T.nilable(::ActiveStorage::Attachment)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActiveStorage::Attachment)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActiveStorage::Attachment) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActiveStorage::Attachment).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActiveStorage::Attachment]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActiveStorage::Attachment]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActiveStorage::Attachment]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActiveStorage::Attachment)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActiveStorage::Attachment) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActiveStorage::Attachment) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Attachment)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Attachment]) } + def first(limit = nil); end + + sig { returns(::ActiveStorage::Attachment) } + def first!; end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def forty_two; end + + sig { returns(::ActiveStorage::Attachment) } + def forty_two!; end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def fourth; end + + sig { returns(::ActiveStorage::Attachment) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Attachment)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Attachment]) } + def last(limit = nil); end + + sig { returns(::ActiveStorage::Attachment) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Attachment).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void) + ).returns(::ActiveStorage::Attachment) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Attachment).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Attachment).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def second; end + + sig { returns(::ActiveStorage::Attachment) } + def second!; end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def second_to_last; end + + sig { returns(::ActiveStorage::Attachment) } + def second_to_last!; end + + sig { returns(::ActiveStorage::Attachment) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActiveStorage::Attachment).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Attachment)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Attachment]) } + def take(limit = nil); end + + sig { returns(::ActiveStorage::Attachment) } + def take!; end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def third; end + + sig { returns(::ActiveStorage::Attachment) } + def third!; end + + sig { returns(T.nilable(::ActiveStorage::Attachment)) } + def third_to_last; end + + sig { returns(::ActiveStorage::Attachment) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T.untyped) } + def blob; end + + sig { params(value: T.untyped).void } + def blob=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blob!(*args, &blk); end + + sig { returns(T.untyped) } + def record; end + + sig { params(value: T.untyped).void } + def record=(value); end + + sig { returns(T.untyped) } + def reload_blob; end + + sig { returns(T.untyped) } + def reload_record; end + + sig { void } + def reset_blob; end + + sig { void } + def reset_record; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_all_variant_records(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_all_variant_records(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig do + params( + records: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def load_target; end + + sig do + params( + records: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActiveStorage::Attachment, T::Enumerable[T.any(::ActiveStorage::Attachment, T::Enumerable[::ActiveStorage::Attachment])]) + ).returns(T::Array[::ActiveStorage::Attachment]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def target; end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Attachment]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::Attachment } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/blob.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/blob.rbi new file mode 100644 index 0000000..dc5a451 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/blob.rbi @@ -0,0 +1,972 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::Blob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::Blob`. + + +class ActiveStorage::Blob + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + include GeneratedSecureTokenMethods + include GeneratedStoredAttributesMethods + + sig { returns(ActiveStorage::Attached::One) } + def preview_image; end + + sig { params(attachable: T.untyped).returns(T.untyped) } + def preview_image=(attachable); end + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Blob).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::ActiveStorage::Blob).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def fifth; end + + sig { returns(::ActiveStorage::Blob) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActiveStorage::Blob) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActiveStorage::Blob]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActiveStorage::Blob).void + ).returns(T.nilable(::ActiveStorage::Blob)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActiveStorage::Blob)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActiveStorage::Blob) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActiveStorage::Blob).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActiveStorage::Blob]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActiveStorage::Blob]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActiveStorage::Blob]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActiveStorage::Blob)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActiveStorage::Blob) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActiveStorage::Blob) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Blob)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Blob]) } + def first(limit = nil); end + + sig { returns(::ActiveStorage::Blob) } + def first!; end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def forty_two; end + + sig { returns(::ActiveStorage::Blob) } + def forty_two!; end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def fourth; end + + sig { returns(::ActiveStorage::Blob) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Blob)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Blob]) } + def last(limit = nil); end + + sig { returns(::ActiveStorage::Blob) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Blob).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void) + ).returns(::ActiveStorage::Blob) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Blob).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::Blob).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def second; end + + sig { returns(::ActiveStorage::Blob) } + def second!; end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def second_to_last; end + + sig { returns(::ActiveStorage::Blob) } + def second_to_last!; end + + sig { returns(::ActiveStorage::Blob) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActiveStorage::Blob).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::Blob)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::Blob]) } + def take(limit = nil); end + + sig { returns(::ActiveStorage::Blob) } + def take!; end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def third; end + + sig { returns(::ActiveStorage::Blob) } + def third!; end + + sig { returns(T.nilable(::ActiveStorage::Blob)) } + def third_to_last; end + + sig { returns(::ActiveStorage::Blob) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T::Array[T.untyped]) } + def attachment_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def attachment_ids=(ids); end + + # This method is created by ActiveRecord on the `ActiveStorage::Blob` class because it declared `has_many :attachments`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def attachments; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def attachments=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_preview_image_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_preview_image_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_preview_image_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_preview_image_attachment!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_preview_image_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_preview_image_blob!(*args, &blk); end + + sig { returns(T.untyped) } + def preview_image_attachment; end + + sig { params(value: T.untyped).void } + def preview_image_attachment=(value); end + + sig { returns(T.untyped) } + def preview_image_blob; end + + sig { params(value: T.untyped).void } + def preview_image_blob=(value); end + + sig { returns(T.untyped) } + def reload_preview_image_attachment; end + + sig { returns(T.untyped) } + def reload_preview_image_blob; end + + sig { void } + def reset_preview_image_attachment; end + + sig { void } + def reset_preview_image_blob; end + + sig { returns(T::Array[T.untyped]) } + def variant_record_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def variant_record_ids=(ids); end + + # This method is created by ActiveRecord on the `ActiveStorage::Blob` class because it declared `has_many :variant_records`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def variant_records; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def variant_records=(value); end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unattached(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_attached_preview_image(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unattached(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_attached_preview_image(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + module GeneratedSecureTokenMethods + sig { returns(T::Boolean) } + def regenerate_key; end + end + + module GeneratedStoredAttributesMethods + sig { returns(T.untyped) } + def analyzed; end + + sig { params(value: T.untyped).returns(T.untyped) } + def analyzed=(value); end + + sig { returns(T.untyped) } + def analyzed_before_last_save; end + + sig { returns(T.untyped) } + def analyzed_change; end + + sig { returns(T::Boolean) } + def analyzed_changed?; end + + sig { returns(T.untyped) } + def analyzed_was; end + + sig { returns(T.untyped) } + def composed; end + + sig { params(value: T.untyped).returns(T.untyped) } + def composed=(value); end + + sig { returns(T.untyped) } + def composed_before_last_save; end + + sig { returns(T.untyped) } + def composed_change; end + + sig { returns(T::Boolean) } + def composed_changed?; end + + sig { returns(T.untyped) } + def composed_was; end + + sig { returns(T.untyped) } + def identified; end + + sig { params(value: T.untyped).returns(T.untyped) } + def identified=(value); end + + sig { returns(T.untyped) } + def identified_before_last_save; end + + sig { returns(T.untyped) } + def identified_change; end + + sig { returns(T::Boolean) } + def identified_changed?; end + + sig { returns(T.untyped) } + def identified_was; end + + sig { returns(T.untyped) } + def saved_change_to_analyzed; end + + sig { returns(T::Boolean) } + def saved_change_to_analyzed?; end + + sig { returns(T.untyped) } + def saved_change_to_composed; end + + sig { returns(T::Boolean) } + def saved_change_to_composed?; end + + sig { returns(T.untyped) } + def saved_change_to_identified; end + + sig { returns(T::Boolean) } + def saved_change_to_identified?; end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig do + params( + records: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def load_target; end + + sig do + params( + records: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActiveStorage::Blob, T::Enumerable[T.any(::ActiveStorage::Blob, T::Enumerable[::ActiveStorage::Blob])]) + ).returns(T::Array[::ActiveStorage::Blob]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def target; end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::Blob]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::Blob } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/current.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/current.rbi new file mode 100644 index 0000000..be334c3 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/current.rbi @@ -0,0 +1,26 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::Current`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::Current`. + + +class ActiveStorage::Current + include GeneratedAttributeMethods + + class << self + sig { returns(T.untyped) } + def url_options; end + + sig { params(value: T.untyped).returns(T.untyped) } + def url_options=(value); end + end + + module GeneratedAttributeMethods + sig { returns(T.untyped) } + def url_options; end + + sig { params(value: T.untyped).returns(T.untyped) } + def url_options=(value); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/mirror_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/mirror_job.rbi new file mode 100644 index 0000000..bf0cac6 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/mirror_job.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::MirrorJob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::MirrorJob`. + + +class ActiveStorage::MirrorJob + class << self + sig do + params( + key: T.untyped, + checksum: T.untyped, + block: T.nilable(T.proc.params(job: ActiveStorage::MirrorJob).void) + ).returns(T.any(ActiveStorage::MirrorJob, FalseClass)) + end + def perform_later(key, checksum:, &block); end + + sig { params(key: T.untyped, checksum: T.untyped).returns(T.untyped) } + def perform_now(key, checksum:); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/preview_image_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/preview_image_job.rbi new file mode 100644 index 0000000..59d6f46 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/preview_image_job.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::PreviewImageJob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::PreviewImageJob`. + + +class ActiveStorage::PreviewImageJob + class << self + sig do + params( + blob: T.untyped, + variations: T.untyped, + block: T.nilable(T.proc.params(job: ActiveStorage::PreviewImageJob).void) + ).returns(T.any(ActiveStorage::PreviewImageJob, FalseClass)) + end + def perform_later(blob, variations, &block); end + + sig { params(blob: T.untyped, variations: T.untyped).returns(T.untyped) } + def perform_now(blob, variations); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/purge_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/purge_job.rbi new file mode 100644 index 0000000..bbbc635 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/purge_job.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::PurgeJob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::PurgeJob`. + + +class ActiveStorage::PurgeJob + class << self + sig do + params( + blob: T.untyped, + block: T.nilable(T.proc.params(job: ActiveStorage::PurgeJob).void) + ).returns(T.any(ActiveStorage::PurgeJob, FalseClass)) + end + def perform_later(blob, &block); end + + sig { params(blob: T.untyped).returns(T.untyped) } + def perform_now(blob); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/reflection/active_record_extensions.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/reflection/active_record_extensions.rbi new file mode 100644 index 0000000..7e6fe68 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/reflection/active_record_extensions.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::Reflection::ActiveRecordExtensions`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::Reflection::ActiveRecordExtensions`. + + +module ActiveStorage::Reflection::ActiveRecordExtensions + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/streaming.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/streaming.rbi new file mode 100644 index 0000000..d4a390a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/streaming.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::Streaming`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::Streaming`. + + +module ActiveStorage::Streaming + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + mixes_in_class_methods ::ActionController::Live::ClassMethods +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/transform_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/transform_job.rbi new file mode 100644 index 0000000..e796264 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/transform_job.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::TransformJob`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::TransformJob`. + + +class ActiveStorage::TransformJob + class << self + sig do + params( + blob: T.untyped, + transformations: T.untyped, + block: T.nilable(T.proc.params(job: ActiveStorage::TransformJob).void) + ).returns(T.any(ActiveStorage::TransformJob, FalseClass)) + end + def perform_later(blob, transformations, &block); end + + sig { params(blob: T.untyped, transformations: T.untyped).returns(T.untyped) } + def perform_now(blob, transformations); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/variant_record.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/variant_record.rbi new file mode 100644 index 0000000..03fab77 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_storage/variant_record.rbi @@ -0,0 +1,883 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveStorage::VariantRecord`. +# Please instead update this file by running `bin/tapioca dsl ActiveStorage::VariantRecord`. + + +class ActiveStorage::VariantRecord + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + sig { returns(ActiveStorage::Attached::One) } + def image; end + + sig { params(attachable: T.untyped).returns(T.untyped) } + def image=(attachable); end + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::VariantRecord).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::ActiveStorage::VariantRecord).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def fifth; end + + sig { returns(::ActiveStorage::VariantRecord) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ActiveStorage::VariantRecord) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ActiveStorage::VariantRecord]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ActiveStorage::VariantRecord).void + ).returns(T.nilable(::ActiveStorage::VariantRecord)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ActiveStorage::VariantRecord)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ActiveStorage::VariantRecord) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ActiveStorage::VariantRecord).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ActiveStorage::VariantRecord]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ActiveStorage::VariantRecord]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ActiveStorage::VariantRecord]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ActiveStorage::VariantRecord)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ActiveStorage::VariantRecord) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ActiveStorage::VariantRecord) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::VariantRecord)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::VariantRecord]) } + def first(limit = nil); end + + sig { returns(::ActiveStorage::VariantRecord) } + def first!; end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def forty_two; end + + sig { returns(::ActiveStorage::VariantRecord) } + def forty_two!; end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def fourth; end + + sig { returns(::ActiveStorage::VariantRecord) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::VariantRecord)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::VariantRecord]) } + def last(limit = nil); end + + sig { returns(::ActiveStorage::VariantRecord) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::VariantRecord).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ActiveStorage::VariantRecord).void) + ).returns(::ActiveStorage::VariantRecord) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::VariantRecord).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ActiveStorage::VariantRecord).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def second; end + + sig { returns(::ActiveStorage::VariantRecord) } + def second!; end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def second_to_last; end + + sig { returns(::ActiveStorage::VariantRecord) } + def second_to_last!; end + + sig { returns(::ActiveStorage::VariantRecord) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ActiveStorage::VariantRecord).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ActiveStorage::VariantRecord)) } + sig { params(limit: Integer).returns(T::Array[::ActiveStorage::VariantRecord]) } + def take(limit = nil); end + + sig { returns(::ActiveStorage::VariantRecord) } + def take!; end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def third; end + + sig { returns(::ActiveStorage::VariantRecord) } + def third!; end + + sig { returns(T.nilable(::ActiveStorage::VariantRecord)) } + def third_to_last; end + + sig { returns(::ActiveStorage::VariantRecord) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T.untyped) } + def blob; end + + sig { params(value: T.untyped).void } + def blob=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_image_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_image_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blob!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_image_attachment(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_image_attachment!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_image_blob(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_image_blob!(*args, &blk); end + + sig { returns(T.untyped) } + def image_attachment; end + + sig { params(value: T.untyped).void } + def image_attachment=(value); end + + sig { returns(T.untyped) } + def image_blob; end + + sig { params(value: T.untyped).void } + def image_blob=(value); end + + sig { returns(T.untyped) } + def reload_blob; end + + sig { returns(T.untyped) } + def reload_image_attachment; end + + sig { returns(T.untyped) } + def reload_image_blob; end + + sig { void } + def reset_blob; end + + sig { void } + def reset_image_attachment; end + + sig { void } + def reset_image_blob; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_attached_image(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_attached_image(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig do + params( + records: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def load_target; end + + sig do + params( + records: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ActiveStorage::VariantRecord, T::Enumerable[T.any(::ActiveStorage::VariantRecord, T::Enumerable[::ActiveStorage::VariantRecord])]) + ).returns(T::Array[::ActiveStorage::VariantRecord]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def target; end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_a; end + + sig { returns(T::Array[::ActiveStorage::VariantRecord]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ActiveStorage::VariantRecord } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/actionable_error.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/actionable_error.rbi new file mode 100644 index 0000000..64b88fa --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/actionable_error.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::ActionableError`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::ActionableError`. + + +module ActiveSupport::ActionableError + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/callbacks.rbi new file mode 100644 index 0000000..15ee6be --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/callbacks.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Callbacks`. + + +module ActiveSupport::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/rescuable.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/rescuable.rbi new file mode 100644 index 0000000..cf65f82 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/rescuable.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Rescuable`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Rescuable`. + + +module ActiveSupport::Rescuable + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi new file mode 100644 index 0000000..ba004cf --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Testing::FileFixtures`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Testing::FileFixtures`. + + +module ActiveSupport::Testing::FileFixtures + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + 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 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_controller.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_controller.rbi new file mode 100644 index 0000000..09ab7d6 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_controller.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ApplicationController`. +# Please instead update this file by running `bin/tapioca dsl ApplicationController`. + + +class ApplicationController + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_mailer.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_mailer.rbi new file mode 100644 index 0000000..fcb7718 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/application_mailer.rbi @@ -0,0 +1,10 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ApplicationMailer`. +# Please instead update this file by running `bin/tapioca dsl ApplicationMailer`. + + +class ApplicationMailer + include GeneratedUrlHelpersModule +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/client_authentication/account.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/client_authentication/account.rbi new file mode 100644 index 0000000..ceb5e6c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/client_authentication/account.rbi @@ -0,0 +1,1264 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ClientAuthentication::Account`. +# Please instead update this file by running `bin/tapioca dsl ClientAuthentication::Account`. + + +class ClientAuthentication::Account + include GeneratedAttributeMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::ClientAuthentication::Account).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::ClientAuthentication::Account).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def fifth; end + + sig { returns(::ClientAuthentication::Account) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::ClientAuthentication::Account) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::ClientAuthentication::Account]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::ClientAuthentication::Account).void + ).returns(T.nilable(::ClientAuthentication::Account)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::ClientAuthentication::Account)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::ClientAuthentication::Account) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::ClientAuthentication::Account).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::ClientAuthentication::Account]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::ClientAuthentication::Account]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::ClientAuthentication::Account]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::ClientAuthentication::Account)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::ClientAuthentication::Account) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::ClientAuthentication::Account) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::ClientAuthentication::Account)) } + sig { params(limit: Integer).returns(T::Array[::ClientAuthentication::Account]) } + def first(limit = nil); end + + sig { returns(::ClientAuthentication::Account) } + def first!; end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def forty_two; end + + sig { returns(::ClientAuthentication::Account) } + def forty_two!; end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def fourth; end + + sig { returns(::ClientAuthentication::Account) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::ClientAuthentication::Account)) } + sig { params(limit: Integer).returns(T::Array[::ClientAuthentication::Account]) } + def last(limit = nil); end + + sig { returns(::ClientAuthentication::Account) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ClientAuthentication::Account).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::ClientAuthentication::Account).void) + ).returns(::ClientAuthentication::Account) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ClientAuthentication::Account).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::ClientAuthentication::Account).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def second; end + + sig { returns(::ClientAuthentication::Account) } + def second!; end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def second_to_last; end + + sig { returns(::ClientAuthentication::Account) } + def second_to_last!; end + + sig { returns(::ClientAuthentication::Account) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::ClientAuthentication::Account).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::ClientAuthentication::Account)) } + sig { params(limit: Integer).returns(T::Array[::ClientAuthentication::Account]) } + def take(limit = nil); end + + sig { returns(::ClientAuthentication::Account) } + def take!; end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def third; end + + sig { returns(::ClientAuthentication::Account) } + def third!; end + + sig { returns(T.nilable(::ClientAuthentication::Account)) } + def third_to_last; end + + sig { returns(::ClientAuthentication::Account) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedAttributeMethods + sig { returns(T.nilable(::String)) } + def account_id; end + + sig { params(value: T.nilable(::String)).returns(T.nilable(::String)) } + def account_id=(value); end + + sig { returns(T::Boolean) } + def account_id?; end + + sig { returns(T.nilable(::String)) } + def account_id_before_last_save; end + + sig { returns(T.untyped) } + def account_id_before_type_cast; end + + sig { returns(T::Boolean) } + def account_id_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def account_id_change; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def account_id_change_to_be_saved; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def account_id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def account_id_in_database; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def account_id_previous_change; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def account_id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def account_id_previously_was; end + + sig { returns(T.nilable(::String)) } + def account_id_was; end + + sig { void } + def account_id_will_change!; end + + sig { returns(T.nilable(::String)) } + def address; end + + sig { params(value: T.nilable(::String)).returns(T.nilable(::String)) } + def address=(value); end + + sig { returns(T::Boolean) } + def address?; end + + sig { returns(T.nilable(::String)) } + def address_before_last_save; end + + sig { returns(T.untyped) } + def address_before_type_cast; end + + sig { returns(T::Boolean) } + def address_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def address_change; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def address_change_to_be_saved; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def address_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def address_in_database; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def address_previous_change; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def address_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def address_previously_was; end + + sig { returns(T.nilable(::String)) } + def address_was; end + + sig { void } + def address_will_change!; end + + sig { returns(T.nilable(::Integer)) } + def chain_id; end + + sig { params(value: T.nilable(::Integer)).returns(T.nilable(::Integer)) } + def chain_id=(value); end + + sig { returns(T::Boolean) } + def chain_id?; end + + sig { returns(T.nilable(::Integer)) } + def chain_id_before_last_save; end + + sig { returns(T.untyped) } + def chain_id_before_type_cast; end + + sig { returns(T::Boolean) } + def chain_id_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def chain_id_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def chain_id_change_to_be_saved; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def chain_id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def chain_id_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def chain_id_previous_change; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def chain_id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def chain_id_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def chain_id_was; end + + sig { void } + def chain_id_will_change!; end + + sig { returns(::ActiveSupport::TimeWithZone) } + def created_at; end + + sig { params(value: ::ActiveSupport::TimeWithZone).returns(::ActiveSupport::TimeWithZone) } + def created_at=(value); end + + sig { returns(T::Boolean) } + def created_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_before_last_save; end + + sig { returns(T.untyped) } + def created_at_before_type_cast; end + + sig { returns(T::Boolean) } + def created_at_came_from_user?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change_to_be_saved; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_in_database; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_previous_change; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_previously_was; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_was; end + + sig { void } + def created_at_will_change!; end + + sig { returns(::Integer) } + def id; end + + sig { params(value: ::Integer).returns(::Integer) } + def id=(value); end + + sig { returns(T::Boolean) } + def id?; end + + sig { returns(T.nilable(::Integer)) } + def id_before_last_save; end + + sig { returns(T.untyped) } + def id_before_type_cast; end + + sig { returns(T::Boolean) } + def id_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_previously_was; end + + sig { returns(::Integer) } + def id_value; end + + sig { params(value: ::Integer).returns(::Integer) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + sig { returns(T.nilable(::Integer)) } + def id_was; end + + sig { void } + def id_will_change!; end + + sig { void } + def restore_account_id!; end + + sig { void } + def restore_address!; end + + sig { void } + def restore_chain_id!; end + + sig { void } + def restore_created_at!; end + + sig { void } + def restore_id!; end + + sig { void } + def restore_id_value!; end + + sig { void } + def restore_string!; end + + sig { void } + def restore_updated_at!; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def saved_change_to_account_id; end + + sig { returns(T::Boolean) } + def saved_change_to_account_id?; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def saved_change_to_address; end + + sig { returns(T::Boolean) } + def saved_change_to_address?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_chain_id; end + + sig { returns(T::Boolean) } + def saved_change_to_chain_id?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def saved_change_to_created_at; end + + sig { returns(T::Boolean) } + def saved_change_to_created_at?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id; end + + sig { returns(T::Boolean) } + def saved_change_to_id?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def saved_change_to_string; end + + sig { returns(T::Boolean) } + def saved_change_to_string?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def saved_change_to_updated_at; end + + sig { returns(T::Boolean) } + def saved_change_to_updated_at?; end + + sig { returns(T.nilable(::String)) } + def string; end + + sig { params(value: T.nilable(::String)).returns(T.nilable(::String)) } + def string=(value); end + + sig { returns(T::Boolean) } + def string?; end + + sig { returns(T.nilable(::String)) } + def string_before_last_save; end + + sig { returns(T.untyped) } + def string_before_type_cast; end + + sig { returns(T::Boolean) } + def string_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def string_change; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def string_change_to_be_saved; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def string_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def string_in_database; end + + sig { returns(T.nilable([T.nilable(::String), T.nilable(::String)])) } + def string_previous_change; end + + sig { params(from: T.nilable(::String), to: T.nilable(::String)).returns(T::Boolean) } + def string_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def string_previously_was; end + + sig { returns(T.nilable(::String)) } + def string_was; end + + sig { void } + def string_will_change!; end + + sig { returns(::ActiveSupport::TimeWithZone) } + def updated_at; end + + sig { params(value: ::ActiveSupport::TimeWithZone).returns(::ActiveSupport::TimeWithZone) } + def updated_at=(value); end + + sig { returns(T::Boolean) } + def updated_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def updated_at_before_last_save; end + + sig { returns(T.untyped) } + def updated_at_before_type_cast; end + + sig { returns(T::Boolean) } + def updated_at_came_from_user?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def updated_at_change; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def updated_at_change_to_be_saved; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def updated_at_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def updated_at_in_database; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def updated_at_previous_change; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def updated_at_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def updated_at_previously_was; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def updated_at_was; end + + sig { void } + def updated_at_will_change!; end + + sig { returns(T::Boolean) } + def will_save_change_to_account_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_address?; end + + sig { returns(T::Boolean) } + def will_save_change_to_chain_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_created_at?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + + sig { returns(T::Boolean) } + def will_save_change_to_string?; end + + sig { returns(T::Boolean) } + def will_save_change_to_updated_at?; end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_a; end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig do + params( + records: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def load_target; end + + sig do + params( + records: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::ClientAuthentication::Account, T::Enumerable[T.any(::ClientAuthentication::Account, T::Enumerable[::ClientAuthentication::Account])]) + ).returns(T::Array[::ClientAuthentication::Account]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def target; end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_a; end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_a; end + + sig { returns(T::Array[::ClientAuthentication::Account]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::ClientAuthentication::Account } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_path_helpers_module.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_path_helpers_module.rbi new file mode 100644 index 0000000..ba89ba4 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_path_helpers_module.rbi @@ -0,0 +1,104 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `GeneratedPathHelpersModule`. +# Please instead update this file by running `bin/tapioca dsl GeneratedPathHelpersModule`. + + +module GeneratedPathHelpersModule + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::Routing::PolymorphicRoutes + + sig { params(args: T.untyped).returns(String) } + def new_rails_conductor_inbound_email_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def new_rails_conductor_inbound_email_source_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_representation_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_representation_proxy_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_incinerate_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_reroute_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_sources_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_direct_uploads_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_disk_service_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_health_check_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_notes_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_properties_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_routes_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mailers_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mailgun_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mandrill_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mandrill_inbound_health_check_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_postmark_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_relay_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_representation_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_sendgrid_inbound_emails_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_service_blob_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_service_blob_proxy_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_storage_proxy_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_storage_redirect_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def ruby_event_store_browser_app_path(*args); end + + sig { params(args: T.untyped).returns(String) } + def update_rails_disk_service_path(*args); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_url_helpers_module.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_url_helpers_module.rbi new file mode 100644 index 0000000..8ce78c1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/generated_url_helpers_module.rbi @@ -0,0 +1,104 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `GeneratedUrlHelpersModule`. +# Please instead update this file by running `bin/tapioca dsl GeneratedUrlHelpersModule`. + + +module GeneratedUrlHelpersModule + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::Routing::PolymorphicRoutes + + sig { params(args: T.untyped).returns(String) } + def new_rails_conductor_inbound_email_source_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def new_rails_conductor_inbound_email_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_representation_proxy_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_representation_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_blob_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_incinerate_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_reroute_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_sources_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_email_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_conductor_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_direct_uploads_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_disk_service_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_health_check_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_notes_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_properties_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_routes_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_info_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mailers_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mailgun_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mandrill_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_mandrill_inbound_health_check_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_postmark_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_relay_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_representation_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_sendgrid_inbound_emails_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_service_blob_proxy_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_service_blob_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_storage_proxy_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def rails_storage_redirect_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def ruby_event_store_browser_app_url(*args); end + + sig { params(args: T.untyped).returns(String) } + def update_rails_disk_service_url(*args); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/rails/conductor/base_controller.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/rails/conductor/base_controller.rbi new file mode 100644 index 0000000..25c6812 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/rails/conductor/base_controller.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `Rails::Conductor::BaseController`. +# Please instead update this file by running `bin/tapioca dsl Rails::Conductor::BaseController`. + + +class Rails::Conductor::BaseController + include GeneratedUrlHelpersModule + include GeneratedPathHelpersModule +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event.rbi new file mode 100644 index 0000000..a7a99d5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event.rbi @@ -0,0 +1,1274 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RubyEventStore::ActiveRecord::Event`. +# Please instead update this file by running `bin/tapioca dsl RubyEventStore::ActiveRecord::Event`. + + +class RubyEventStore::ActiveRecord::Event + include GeneratedAttributeMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::Event).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def fifth; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::RubyEventStore::ActiveRecord::Event]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void + ).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::RubyEventStore::ActiveRecord::Event]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::RubyEventStore::ActiveRecord::Event]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::RubyEventStore::ActiveRecord::Event]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def first(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def first!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def forty_two; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def forty_two!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def fourth; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def last(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::Event).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).void) + ).returns(::RubyEventStore::ActiveRecord::Event) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::Event).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::Event).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def second; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def second!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def second_to_last; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def second_to_last!; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::Event).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def take(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def take!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def third; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def third!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def third_to_last; end + + sig { returns(::RubyEventStore::ActiveRecord::Event) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedAttributeMethods + sig { returns(::ActiveSupport::TimeWithZone) } + def created_at; end + + sig { params(value: ::ActiveSupport::TimeWithZone).returns(::ActiveSupport::TimeWithZone) } + def created_at=(value); end + + sig { returns(T::Boolean) } + def created_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_before_last_save; end + + sig { returns(T.untyped) } + def created_at_before_type_cast; end + + sig { returns(T::Boolean) } + def created_at_came_from_user?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change_to_be_saved; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_in_database; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_previous_change; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_previously_was; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_was; end + + sig { void } + def created_at_will_change!; end + + sig { returns(T.untyped) } + def data; end + + sig { params(value: T.untyped).returns(T.untyped) } + def data=(value); end + + sig { returns(T::Boolean) } + def data?; end + + sig { returns(T.untyped) } + def data_before_last_save; end + + sig { returns(T.untyped) } + def data_before_type_cast; end + + sig { returns(T::Boolean) } + def data_came_from_user?; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def data_change; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def data_change_to_be_saved; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def data_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def data_in_database; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def data_previous_change; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def data_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def data_previously_was; end + + sig { returns(T.untyped) } + def data_was; end + + sig { void } + def data_will_change!; end + + sig { returns(::String) } + def event_id; end + + sig { params(value: ::String).returns(::String) } + def event_id=(value); end + + sig { returns(T::Boolean) } + def event_id?; end + + sig { returns(T.nilable(::String)) } + def event_id_before_last_save; end + + sig { returns(T.untyped) } + def event_id_before_type_cast; end + + sig { returns(T::Boolean) } + def event_id_came_from_user?; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_change; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_change_to_be_saved; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_id_in_database; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_previous_change; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_id_previously_was; end + + sig { returns(T.nilable(::String)) } + def event_id_was; end + + sig { void } + def event_id_will_change!; end + + sig { returns(::String) } + def event_type; end + + sig { params(value: ::String).returns(::String) } + def event_type=(value); end + + sig { returns(T::Boolean) } + def event_type?; end + + sig { returns(T.nilable(::String)) } + def event_type_before_last_save; end + + sig { returns(T.untyped) } + def event_type_before_type_cast; end + + sig { returns(T::Boolean) } + def event_type_came_from_user?; end + + sig { returns(T.nilable([::String, ::String])) } + def event_type_change; end + + sig { returns(T.nilable([::String, ::String])) } + def event_type_change_to_be_saved; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_type_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_type_in_database; end + + sig { returns(T.nilable([::String, ::String])) } + def event_type_previous_change; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_type_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_type_previously_was; end + + sig { returns(T.nilable(::String)) } + def event_type_was; end + + sig { void } + def event_type_will_change!; end + + sig { returns(::Integer) } + def id; end + + sig { params(value: ::Integer).returns(::Integer) } + def id=(value); end + + sig { returns(T::Boolean) } + def id?; end + + sig { returns(T.nilable(::Integer)) } + def id_before_last_save; end + + sig { returns(T.untyped) } + def id_before_type_cast; end + + sig { returns(T::Boolean) } + def id_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_previously_was; end + + sig { returns(::Integer) } + def id_value; end + + sig { params(value: ::Integer).returns(::Integer) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + sig { returns(T.nilable(::Integer)) } + def id_was; end + + sig { void } + def id_will_change!; end + + sig { returns(T.untyped) } + def metadata; end + + sig { params(value: T.untyped).returns(T.untyped) } + def metadata=(value); end + + sig { returns(T::Boolean) } + def metadata?; end + + sig { returns(T.untyped) } + def metadata_before_last_save; end + + sig { returns(T.untyped) } + def metadata_before_type_cast; end + + sig { returns(T::Boolean) } + def metadata_came_from_user?; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def metadata_change; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def metadata_change_to_be_saved; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def metadata_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def metadata_in_database; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def metadata_previous_change; end + + sig { params(from: T.untyped, to: T.untyped).returns(T::Boolean) } + def metadata_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.untyped) } + def metadata_previously_was; end + + sig { returns(T.untyped) } + def metadata_was; end + + sig { void } + def metadata_will_change!; end + + sig { void } + def restore_created_at!; end + + sig { void } + def restore_data!; end + + sig { void } + def restore_event_id!; end + + sig { void } + def restore_event_type!; end + + sig { void } + def restore_id!; end + + sig { void } + def restore_id_value!; end + + sig { void } + def restore_metadata!; end + + sig { void } + def restore_valid_at!; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def saved_change_to_created_at; end + + sig { returns(T::Boolean) } + def saved_change_to_created_at?; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def saved_change_to_data; end + + sig { returns(T::Boolean) } + def saved_change_to_data?; end + + sig { returns(T.nilable([::String, ::String])) } + def saved_change_to_event_id; end + + sig { returns(T::Boolean) } + def saved_change_to_event_id?; end + + sig { returns(T.nilable([::String, ::String])) } + def saved_change_to_event_type; end + + sig { returns(T::Boolean) } + def saved_change_to_event_type?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id; end + + sig { returns(T::Boolean) } + def saved_change_to_id?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + + sig { returns(T.nilable([T.untyped, T.untyped])) } + def saved_change_to_metadata; end + + sig { returns(T::Boolean) } + def saved_change_to_metadata?; end + + sig { returns(T.nilable([T.nilable(::ActiveSupport::TimeWithZone), T.nilable(::ActiveSupport::TimeWithZone)])) } + def saved_change_to_valid_at; end + + sig { returns(T::Boolean) } + def saved_change_to_valid_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at; end + + sig { params(value: T.nilable(::ActiveSupport::TimeWithZone)).returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at=(value); end + + sig { returns(T::Boolean) } + def valid_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at_before_last_save; end + + sig { returns(T.untyped) } + def valid_at_before_type_cast; end + + sig { returns(T::Boolean) } + def valid_at_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::ActiveSupport::TimeWithZone), T.nilable(::ActiveSupport::TimeWithZone)])) } + def valid_at_change; end + + sig { returns(T.nilable([T.nilable(::ActiveSupport::TimeWithZone), T.nilable(::ActiveSupport::TimeWithZone)])) } + def valid_at_change_to_be_saved; end + + sig do + params( + from: T.nilable(::ActiveSupport::TimeWithZone), + to: T.nilable(::ActiveSupport::TimeWithZone) + ).returns(T::Boolean) + end + def valid_at_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at_in_database; end + + sig { returns(T.nilable([T.nilable(::ActiveSupport::TimeWithZone), T.nilable(::ActiveSupport::TimeWithZone)])) } + def valid_at_previous_change; end + + sig do + params( + from: T.nilable(::ActiveSupport::TimeWithZone), + to: T.nilable(::ActiveSupport::TimeWithZone) + ).returns(T::Boolean) + end + def valid_at_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at_previously_was; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def valid_at_was; end + + sig { void } + def valid_at_will_change!; end + + sig { returns(T::Boolean) } + def will_save_change_to_created_at?; end + + sig { returns(T::Boolean) } + def will_save_change_to_data?; end + + sig { returns(T::Boolean) } + def will_save_change_to_event_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_event_type?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + + sig { returns(T::Boolean) } + def will_save_change_to_metadata?; end + + sig { returns(T::Boolean) } + def will_save_change_to_valid_at?; end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def load_target; end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::Event, T::Enumerable[::RubyEventStore::ActiveRecord::Event])]) + ).returns(T::Array[::RubyEventStore::ActiveRecord::Event]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def target; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::Event]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::Event } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event_in_stream.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event_in_stream.rbi new file mode 100644 index 0000000..3d29e8d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/event_in_stream.rbi @@ -0,0 +1,1179 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RubyEventStore::ActiveRecord::EventInStream`. +# Please instead update this file by running `bin/tapioca dsl RubyEventStore::ActiveRecord::EventInStream`. + + +class RubyEventStore::ActiveRecord::EventInStream + include GeneratedAssociationMethods + include GeneratedAttributeMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::EventInStream).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def fifth; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void + ).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::RubyEventStore::ActiveRecord::EventInStream) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::RubyEventStore::ActiveRecord::EventInStream]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::RubyEventStore::ActiveRecord::EventInStream]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::RubyEventStore::ActiveRecord::EventInStream]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def find_or_initialize_by(attributes, &block); end + + sig do + params( + signed_id: T.untyped, + purpose: T.untyped + ).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) + end + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::RubyEventStore::ActiveRecord::EventInStream) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::RubyEventStore::ActiveRecord::EventInStream) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def first(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def first!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def forty_two; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def forty_two!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def fourth; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def last(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::EventInStream).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).void) + ).returns(::RubyEventStore::ActiveRecord::EventInStream) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::EventInStream).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::RubyEventStore::ActiveRecord::EventInStream).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def second; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def second!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def second_to_last; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def second_to_last!; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::RubyEventStore::ActiveRecord::EventInStream).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + sig { params(limit: Integer).returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def take(limit = nil); end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def take!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def third; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def third!; end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::EventInStream)) } + def third_to_last; end + + sig { returns(::RubyEventStore::ActiveRecord::EventInStream) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def build_event(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def create_event(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(::RubyEventStore::ActiveRecord::Event) } + def create_event!(*args, &blk); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def event; end + + sig { params(value: T.nilable(::RubyEventStore::ActiveRecord::Event)).void } + def event=(value); end + + sig { returns(T.nilable(::RubyEventStore::ActiveRecord::Event)) } + def reload_event; end + + sig { void } + def reset_event; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedAttributeMethods + sig { returns(::ActiveSupport::TimeWithZone) } + def created_at; end + + sig { params(value: ::ActiveSupport::TimeWithZone).returns(::ActiveSupport::TimeWithZone) } + def created_at=(value); end + + sig { returns(T::Boolean) } + def created_at?; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_before_last_save; end + + sig { returns(T.untyped) } + def created_at_before_type_cast; end + + sig { returns(T::Boolean) } + def created_at_came_from_user?; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_change_to_be_saved; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_in_database; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def created_at_previous_change; end + + sig { params(from: ::ActiveSupport::TimeWithZone, to: ::ActiveSupport::TimeWithZone).returns(T::Boolean) } + def created_at_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_previously_was; end + + sig { returns(T.nilable(::ActiveSupport::TimeWithZone)) } + def created_at_was; end + + sig { void } + def created_at_will_change!; end + + sig { returns(::String) } + def event_id; end + + sig { params(value: ::String).returns(::String) } + def event_id=(value); end + + sig { returns(T::Boolean) } + def event_id?; end + + sig { returns(T.nilable(::String)) } + def event_id_before_last_save; end + + sig { returns(T.untyped) } + def event_id_before_type_cast; end + + sig { returns(T::Boolean) } + def event_id_came_from_user?; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_change; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_change_to_be_saved; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_id_in_database; end + + sig { returns(T.nilable([::String, ::String])) } + def event_id_previous_change; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def event_id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def event_id_previously_was; end + + sig { returns(T.nilable(::String)) } + def event_id_was; end + + sig { void } + def event_id_will_change!; end + + sig { returns(::Integer) } + def id; end + + sig { params(value: ::Integer).returns(::Integer) } + def id=(value); end + + sig { returns(T::Boolean) } + def id?; end + + sig { returns(T.nilable(::Integer)) } + def id_before_last_save; end + + sig { returns(T.untyped) } + def id_before_type_cast; end + + sig { returns(T::Boolean) } + def id_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_previously_was; end + + sig { returns(::Integer) } + def id_value; end + + sig { params(value: ::Integer).returns(::Integer) } + def id_value=(value); end + + sig { returns(T::Boolean) } + def id_value?; end + + sig { returns(T.nilable(::Integer)) } + def id_value_before_last_save; end + + sig { returns(T.untyped) } + def id_value_before_type_cast; end + + sig { returns(T::Boolean) } + def id_value_came_from_user?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_change_to_be_saved; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_in_database; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def id_value_previous_change; end + + sig { params(from: ::Integer, to: ::Integer).returns(T::Boolean) } + def id_value_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def id_value_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def id_value_was; end + + sig { void } + def id_value_will_change!; end + + sig { returns(T.nilable(::Integer)) } + def id_was; end + + sig { void } + def id_will_change!; end + + sig { returns(T.nilable(::Integer)) } + def position; end + + sig { params(value: T.nilable(::Integer)).returns(T.nilable(::Integer)) } + def position=(value); end + + sig { returns(T::Boolean) } + def position?; end + + sig { returns(T.nilable(::Integer)) } + def position_before_last_save; end + + sig { returns(T.untyped) } + def position_before_type_cast; end + + sig { returns(T::Boolean) } + def position_came_from_user?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def position_change; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def position_change_to_be_saved; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def position_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def position_in_database; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def position_previous_change; end + + sig { params(from: T.nilable(::Integer), to: T.nilable(::Integer)).returns(T::Boolean) } + def position_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::Integer)) } + def position_previously_was; end + + sig { returns(T.nilable(::Integer)) } + def position_was; end + + sig { void } + def position_will_change!; end + + sig { void } + def restore_created_at!; end + + sig { void } + def restore_event_id!; end + + sig { void } + def restore_id!; end + + sig { void } + def restore_id_value!; end + + sig { void } + def restore_position!; end + + sig { void } + def restore_stream!; end + + sig { returns(T.nilable([::ActiveSupport::TimeWithZone, ::ActiveSupport::TimeWithZone])) } + def saved_change_to_created_at; end + + sig { returns(T::Boolean) } + def saved_change_to_created_at?; end + + sig { returns(T.nilable([::String, ::String])) } + def saved_change_to_event_id; end + + sig { returns(T::Boolean) } + def saved_change_to_event_id?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id; end + + sig { returns(T::Boolean) } + def saved_change_to_id?; end + + sig { returns(T.nilable([::Integer, ::Integer])) } + def saved_change_to_id_value; end + + sig { returns(T::Boolean) } + def saved_change_to_id_value?; end + + sig { returns(T.nilable([T.nilable(::Integer), T.nilable(::Integer)])) } + def saved_change_to_position; end + + sig { returns(T::Boolean) } + def saved_change_to_position?; end + + sig { returns(T.nilable([::String, ::String])) } + def saved_change_to_stream; end + + sig { returns(T::Boolean) } + def saved_change_to_stream?; end + + sig { returns(::String) } + def stream; end + + sig { params(value: ::String).returns(::String) } + def stream=(value); end + + sig { returns(T::Boolean) } + def stream?; end + + sig { returns(T.nilable(::String)) } + def stream_before_last_save; end + + sig { returns(T.untyped) } + def stream_before_type_cast; end + + sig { returns(T::Boolean) } + def stream_came_from_user?; end + + sig { returns(T.nilable([::String, ::String])) } + def stream_change; end + + sig { returns(T.nilable([::String, ::String])) } + def stream_change_to_be_saved; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def stream_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def stream_in_database; end + + sig { returns(T.nilable([::String, ::String])) } + def stream_previous_change; end + + sig { params(from: ::String, to: ::String).returns(T::Boolean) } + def stream_previously_changed?(from: T.unsafe(nil), to: T.unsafe(nil)); end + + sig { returns(T.nilable(::String)) } + def stream_previously_was; end + + sig { returns(T.nilable(::String)) } + def stream_was; end + + sig { void } + def stream_will_change!; end + + sig { returns(T::Boolean) } + def will_save_change_to_created_at?; end + + sig { returns(T::Boolean) } + def will_save_change_to_event_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id?; end + + sig { returns(T::Boolean) } + def will_save_change_to_id_value?; end + + sig { returns(T::Boolean) } + def will_save_change_to_position?; end + + sig { returns(T::Boolean) } + def will_save_change_to_stream?; end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def load_target; end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[T.any(::RubyEventStore::ActiveRecord::EventInStream, T::Enumerable[::RubyEventStore::ActiveRecord::EventInStream])]) + ).returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def target; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_a; end + + sig { returns(T::Array[::RubyEventStore::ActiveRecord::EventInStream]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::RubyEventStore::ActiveRecord::EventInStream } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/rails_migration_generator.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/rails_migration_generator.rbi new file mode 100644 index 0000000..1cf79d0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/ruby_event_store/active_record/rails_migration_generator.rbi @@ -0,0 +1,11 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `RubyEventStore::ActiveRecord::RailsMigrationGenerator`. +# Please instead update this file by running `bin/tapioca dsl RubyEventStore::ActiveRecord::RailsMigrationGenerator`. + + +class RubyEventStore::ActiveRecord::RailsMigrationGenerator + sig { returns(::String) } + def data_type; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/entry.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/entry.rbi new file mode 100644 index 0000000..a44ab3b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/entry.rbi @@ -0,0 +1,802 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidCache::Entry`. +# Please instead update this file by running `bin/tapioca dsl SolidCache::Entry`. + + +class SolidCache::Entry + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig { params(block: T.nilable(T.proc.params(record: ::SolidCache::Entry).returns(T.untyped))).returns(T::Boolean) } + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::SolidCache::Entry).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidCache::Entry]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def fifth; end + + sig { returns(::SolidCache::Entry) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidCache::Entry) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidCache::Entry]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidCache::Entry).void + ).returns(T.nilable(::SolidCache::Entry)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidCache::Entry)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidCache::Entry) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidCache::Entry).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidCache::Entry]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidCache::Entry]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidCache::Entry]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidCache::Entry)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidCache::Entry) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidCache::Entry) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidCache::Entry)) } + sig { params(limit: Integer).returns(T::Array[::SolidCache::Entry]) } + def first(limit = nil); end + + sig { returns(::SolidCache::Entry) } + def first!; end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def forty_two; end + + sig { returns(::SolidCache::Entry) } + def forty_two!; end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def fourth; end + + sig { returns(::SolidCache::Entry) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidCache::Entry)) } + sig { params(limit: Integer).returns(T::Array[::SolidCache::Entry]) } + def last(limit = nil); end + + sig { returns(::SolidCache::Entry) } + def last!; end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidCache::Entry).returns(T.untyped))).returns(T::Boolean) } + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidCache::Entry).void) + ).returns(::SolidCache::Entry) + end + def new(attributes = nil, &block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidCache::Entry).returns(T.untyped))).returns(T::Boolean) } + def none?(&block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidCache::Entry).returns(T.untyped))).returns(T::Boolean) } + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def second; end + + sig { returns(::SolidCache::Entry) } + def second!; end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def second_to_last; end + + sig { returns(::SolidCache::Entry) } + def second_to_last!; end + + sig { returns(::SolidCache::Entry) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidCache::Entry).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidCache::Entry)) } + sig { params(limit: Integer).returns(T::Array[::SolidCache::Entry]) } + def take(limit = nil); end + + sig { returns(::SolidCache::Entry) } + def take!; end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def third; end + + sig { returns(::SolidCache::Entry) } + def third!; end + + sig { returns(T.nilable(::SolidCache::Entry)) } + def third_to_last; end + + sig { returns(::SolidCache::Entry) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_key_hash_range(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def largest_byte_sizes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def up_to_byte_size(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_key_hash_range(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def largest_byte_sizes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def up_to_byte_size(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_a; end + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig do + params( + records: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidCache::Entry]) } + def load_target; end + + sig do + params( + records: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidCache::Entry, T::Enumerable[T.any(::SolidCache::Entry, T::Enumerable[::SolidCache::Entry])]) + ).returns(T::Array[::SolidCache::Entry]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidCache::Entry]) } + def target; end + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_a; end + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_a; end + + sig { returns(T::Array[::SolidCache::Entry]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidCache::Entry } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/expiry_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/expiry_job.rbi new file mode 100644 index 0000000..baac8de --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_cache/expiry_job.rbi @@ -0,0 +1,33 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidCache::ExpiryJob`. +# Please instead update this file by running `bin/tapioca dsl SolidCache::ExpiryJob`. + + +class SolidCache::ExpiryJob + class << self + sig do + params( + count: T.untyped, + shard: T.untyped, + max_age: T.untyped, + max_entries: T.untyped, + max_size: T.untyped, + block: T.nilable(T.proc.params(job: SolidCache::ExpiryJob).void) + ).returns(T.any(SolidCache::ExpiryJob, FalseClass)) + end + def perform_later(count, shard: T.unsafe(nil), max_age: T.unsafe(nil), max_entries: T.unsafe(nil), max_size: T.unsafe(nil), &block); end + + sig do + params( + count: T.untyped, + shard: T.untyped, + max_age: T.untyped, + max_entries: T.untyped, + max_size: T.untyped + ).returns(T.untyped) + end + def perform_now(count, shard: T.unsafe(nil), max_age: T.unsafe(nil), max_entries: T.unsafe(nil), max_size: T.unsafe(nil)); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/blocked_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/blocked_execution.rbi new file mode 100644 index 0000000..7869a20 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/blocked_execution.rbi @@ -0,0 +1,862 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::BlockedExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::BlockedExecution`. + + +class SolidQueue::BlockedExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::BlockedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::BlockedExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def fifth; end + + sig { returns(::SolidQueue::BlockedExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::BlockedExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::BlockedExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::BlockedExecution).void + ).returns(T.nilable(::SolidQueue::BlockedExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::BlockedExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::BlockedExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::BlockedExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::BlockedExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::BlockedExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::BlockedExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::BlockedExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::BlockedExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::BlockedExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::BlockedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::BlockedExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::BlockedExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::BlockedExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def fourth; end + + sig { returns(::SolidQueue::BlockedExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::BlockedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::BlockedExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::BlockedExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::BlockedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::BlockedExecution).void) + ).returns(::SolidQueue::BlockedExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::BlockedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::BlockedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def second; end + + sig { returns(::SolidQueue::BlockedExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::BlockedExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::BlockedExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::BlockedExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::BlockedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::BlockedExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::BlockedExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def third; end + + sig { returns(::SolidQueue::BlockedExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::BlockedExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::BlockedExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_semaphore(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_semaphore(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_semaphore!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { returns(T.untyped) } + def reload_semaphore; end + + sig { void } + def reset_job; end + + sig { void } + def reset_semaphore; end + + sig { returns(T.untyped) } + def semaphore; end + + sig { params(value: T.untyped).void } + def semaphore=(value); end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def expired(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def expired(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig do + params( + records: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::BlockedExecution, T::Enumerable[T.any(::SolidQueue::BlockedExecution, T::Enumerable[::SolidQueue::BlockedExecution])]) + ).returns(T::Array[::SolidQueue::BlockedExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::BlockedExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::BlockedExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/claimed_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/claimed_execution.rbi new file mode 100644 index 0000000..98e08ea --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/claimed_execution.rbi @@ -0,0 +1,862 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::ClaimedExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::ClaimedExecution`. + + +class SolidQueue::ClaimedExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ClaimedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::ClaimedExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def fifth; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::ClaimedExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::ClaimedExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::ClaimedExecution).void + ).returns(T.nilable(::SolidQueue::ClaimedExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::ClaimedExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::ClaimedExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::ClaimedExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::ClaimedExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::ClaimedExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::ClaimedExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::ClaimedExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ClaimedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ClaimedExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::ClaimedExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def fourth; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ClaimedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ClaimedExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::ClaimedExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ClaimedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ClaimedExecution).void) + ).returns(::SolidQueue::ClaimedExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ClaimedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ClaimedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def second; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::ClaimedExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ClaimedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ClaimedExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::ClaimedExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def third; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::ClaimedExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::ClaimedExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_process(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_process(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_process!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def process; end + + sig { params(value: T.untyped).void } + def process=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { returns(T.untyped) } + def reload_process; end + + sig { void } + def reset_job; end + + sig { void } + def reset_process; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def orphaned(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def orphaned(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig do + params( + records: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::ClaimedExecution, T::Enumerable[T.any(::SolidQueue::ClaimedExecution, T::Enumerable[::SolidQueue::ClaimedExecution])]) + ).returns(T::Array[::SolidQueue::ClaimedExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ClaimedExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ClaimedExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/execution/job_attributes.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/execution/job_attributes.rbi new file mode 100644 index 0000000..ad5f384 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/execution/job_attributes.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Execution::JobAttributes`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Execution::JobAttributes`. + + +module SolidQueue::Execution::JobAttributes + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def assumable_attributes_from_job; end + def assumable_attributes_from_job=(value); end + def assumable_attributes_from_job?; end + end + + module GeneratedInstanceMethods; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/failed_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/failed_execution.rbi new file mode 100644 index 0000000..29b4259 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/failed_execution.rbi @@ -0,0 +1,835 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::FailedExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::FailedExecution`. + + +class SolidQueue::FailedExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::FailedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::FailedExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def fifth; end + + sig { returns(::SolidQueue::FailedExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::FailedExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::FailedExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::FailedExecution).void + ).returns(T.nilable(::SolidQueue::FailedExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::FailedExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::FailedExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::FailedExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::FailedExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::FailedExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::FailedExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::FailedExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::FailedExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::FailedExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::FailedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::FailedExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::FailedExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::FailedExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def fourth; end + + sig { returns(::SolidQueue::FailedExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::FailedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::FailedExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::FailedExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::FailedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::FailedExecution).void) + ).returns(::SolidQueue::FailedExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::FailedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::FailedExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def second; end + + sig { returns(::SolidQueue::FailedExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::FailedExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::FailedExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::FailedExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::FailedExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::FailedExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::FailedExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def third; end + + sig { returns(::SolidQueue::FailedExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::FailedExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::FailedExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { void } + def reset_job; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig do + params( + records: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::FailedExecution, T::Enumerable[T.any(::SolidQueue::FailedExecution, T::Enumerable[::SolidQueue::FailedExecution])]) + ).returns(T::Array[::SolidQueue::FailedExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::FailedExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::FailedExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/job.rbi new file mode 100644 index 0000000..7b5e9f5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/job.rbi @@ -0,0 +1,937 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Job`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Job`. + + +class SolidQueue::Job + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Job).returns(T.untyped))).returns(T::Boolean) } + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::SolidQueue::Job).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::Job]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def fifth; end + + sig { returns(::SolidQueue::Job) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::Job) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::Job]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::Job).void + ).returns(T.nilable(::SolidQueue::Job)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::Job)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::Job) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::Job).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::Job]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::Job]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::Job]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::Job)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::Job) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::Job) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Job)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Job]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::Job) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def forty_two; end + + sig { returns(::SolidQueue::Job) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def fourth; end + + sig { returns(::SolidQueue::Job) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Job)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Job]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::Job) } + def last!; end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Job).returns(T.untyped))).returns(T::Boolean) } + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Job).void) + ).returns(::SolidQueue::Job) + end + def new(attributes = nil, &block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Job).returns(T.untyped))).returns(T::Boolean) } + def none?(&block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Job).returns(T.untyped))).returns(T::Boolean) } + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def second; end + + sig { returns(::SolidQueue::Job) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def second_to_last; end + + sig { returns(::SolidQueue::Job) } + def second_to_last!; end + + sig { returns(::SolidQueue::Job) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::Job).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Job)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Job]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::Job) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def third; end + + sig { returns(::SolidQueue::Job) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::Job)) } + def third_to_last; end + + sig { returns(::SolidQueue::Job) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { returns(T.untyped) } + def blocked_execution; end + + sig { params(value: T.untyped).void } + def blocked_execution=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_blocked_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_claimed_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_failed_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_ready_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_recurring_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_scheduled_execution(*args, &blk); end + + sig { returns(T.untyped) } + def claimed_execution; end + + sig { params(value: T.untyped).void } + def claimed_execution=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blocked_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_blocked_execution!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_claimed_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_claimed_execution!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_failed_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_failed_execution!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_ready_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_ready_execution!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_recurring_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_recurring_execution!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_scheduled_execution(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_scheduled_execution!(*args, &blk); end + + sig { returns(T.untyped) } + def failed_execution; end + + sig { params(value: T.untyped).void } + def failed_execution=(value); end + + sig { returns(T.untyped) } + def ready_execution; end + + sig { params(value: T.untyped).void } + def ready_execution=(value); end + + sig { returns(T.untyped) } + def recurring_execution; end + + sig { params(value: T.untyped).void } + def recurring_execution=(value); end + + sig { returns(T.untyped) } + def reload_blocked_execution; end + + sig { returns(T.untyped) } + def reload_claimed_execution; end + + sig { returns(T.untyped) } + def reload_failed_execution; end + + sig { returns(T.untyped) } + def reload_ready_execution; end + + sig { returns(T.untyped) } + def reload_recurring_execution; end + + sig { returns(T.untyped) } + def reload_scheduled_execution; end + + sig { void } + def reset_blocked_execution; end + + sig { void } + def reset_claimed_execution; end + + sig { void } + def reset_failed_execution; end + + sig { void } + def reset_ready_execution; end + + sig { void } + def reset_recurring_execution; end + + sig { void } + def reset_scheduled_execution; end + + sig { returns(T.untyped) } + def scheduled_execution; end + + sig { params(value: T.untyped).void } + def scheduled_execution=(value); end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def clearable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def finished(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def scheduled(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def clearable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def failed(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def finished(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def scheduled(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig do + params( + records: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::Job]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::Job, T::Enumerable[T.any(::SolidQueue::Job, T::Enumerable[::SolidQueue::Job])]) + ).returns(T::Array[::SolidQueue::Job]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::Job]) } + def target; end + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Job]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Job } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/pause.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/pause.rbi new file mode 100644 index 0000000..e86d074 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/pause.rbi @@ -0,0 +1,784 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Pause`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Pause`. + + +class SolidQueue::Pause + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Pause).returns(T.untyped))).returns(T::Boolean) } + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::SolidQueue::Pause).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def fifth; end + + sig { returns(::SolidQueue::Pause) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::Pause) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::Pause]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::Pause).void + ).returns(T.nilable(::SolidQueue::Pause)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::Pause)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::Pause) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::Pause).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::Pause]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::Pause]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::Pause]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::Pause)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::Pause) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::Pause) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Pause)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Pause]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::Pause) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def forty_two; end + + sig { returns(::SolidQueue::Pause) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def fourth; end + + sig { returns(::SolidQueue::Pause) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Pause)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Pause]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::Pause) } + def last!; end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Pause).returns(T.untyped))).returns(T::Boolean) } + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Pause).void) + ).returns(::SolidQueue::Pause) + end + def new(attributes = nil, &block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Pause).returns(T.untyped))).returns(T::Boolean) } + def none?(&block); end + + sig { params(block: T.nilable(T.proc.params(record: ::SolidQueue::Pause).returns(T.untyped))).returns(T::Boolean) } + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def second; end + + sig { returns(::SolidQueue::Pause) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def second_to_last; end + + sig { returns(::SolidQueue::Pause) } + def second_to_last!; end + + sig { returns(::SolidQueue::Pause) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::Pause).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Pause)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Pause]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::Pause) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def third; end + + sig { returns(::SolidQueue::Pause) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::Pause)) } + def third_to_last; end + + sig { returns(::SolidQueue::Pause) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig do + params( + records: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::Pause, T::Enumerable[T.any(::SolidQueue::Pause, T::Enumerable[::SolidQueue::Pause])]) + ).returns(T::Array[::SolidQueue::Pause]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def target; end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Pause]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Pause } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/process.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/process.rbi new file mode 100644 index 0000000..f2db64f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/process.rbi @@ -0,0 +1,858 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Process`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Process`. + + +class SolidQueue::Process + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Process).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::SolidQueue::Process).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::Process]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def fifth; end + + sig { returns(::SolidQueue::Process) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::Process) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::Process]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::Process).void + ).returns(T.nilable(::SolidQueue::Process)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::Process)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::Process) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::Process).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::Process]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::Process]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::Process]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::Process)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::Process) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::Process) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Process)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Process]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::Process) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def forty_two; end + + sig { returns(::SolidQueue::Process) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def fourth; end + + sig { returns(::SolidQueue::Process) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Process)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Process]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::Process) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Process).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Process).void) + ).returns(::SolidQueue::Process) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Process).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Process).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def second; end + + sig { returns(::SolidQueue::Process) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def second_to_last; end + + sig { returns(::SolidQueue::Process) } + def second_to_last!; end + + sig { returns(::SolidQueue::Process) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::Process).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Process)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Process]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::Process) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def third; end + + sig { returns(::SolidQueue::Process) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::Process)) } + def third_to_last; end + + sig { returns(::SolidQueue::Process) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_supervisor(*args, &blk); end + + sig { returns(T::Array[T.untyped]) } + def claimed_execution_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def claimed_execution_ids=(ids); end + + # This method is created by ActiveRecord on the `SolidQueue::Process` class because it declared `has_many :claimed_executions`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def claimed_executions; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def claimed_executions=(value); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_supervisor(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_supervisor!(*args, &blk); end + + sig { returns(T.untyped) } + def reload_supervisor; end + + sig { void } + def reset_supervisor; end + + sig { returns(T::Array[T.untyped]) } + def supervisee_ids; end + + sig { params(ids: T::Array[T.untyped]).returns(T::Array[T.untyped]) } + def supervisee_ids=(ids); end + + # This method is created by ActiveRecord on the `SolidQueue::Process` class because it declared `has_many :supervisees`. + # 🔗 [Rails guide for `has_many` association](https://guides.rubyonrails.org/association_basics.html#the-has-many-association) + sig { returns(ActiveRecord::Associations::CollectionProxy) } + def supervisees; end + + sig { params(value: T::Enumerable[T.untyped]).void } + def supervisees=(value); end + + sig { returns(T.untyped) } + def supervisor; end + + sig { params(value: T.untyped).void } + def supervisor=(value); end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def prunable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def prunable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig do + params( + records: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::Process]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::Process, T::Enumerable[T.any(::SolidQueue::Process, T::Enumerable[::SolidQueue::Process])]) + ).returns(T::Array[::SolidQueue::Process]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::Process]) } + def target; end + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Process]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Process } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/processes/callbacks.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/processes/callbacks.rbi new file mode 100644 index 0000000..99f23a5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/processes/callbacks.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Processes::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Processes::Callbacks`. + + +module SolidQueue::Processes::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/ready_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/ready_execution.rbi new file mode 100644 index 0000000..321ef7e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/ready_execution.rbi @@ -0,0 +1,841 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::ReadyExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::ReadyExecution`. + + +class SolidQueue::ReadyExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ReadyExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::ReadyExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def fifth; end + + sig { returns(::SolidQueue::ReadyExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::ReadyExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::ReadyExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::ReadyExecution).void + ).returns(T.nilable(::SolidQueue::ReadyExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::ReadyExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::ReadyExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::ReadyExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::ReadyExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::ReadyExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::ReadyExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::ReadyExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::ReadyExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::ReadyExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ReadyExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ReadyExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::ReadyExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::ReadyExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def fourth; end + + sig { returns(::SolidQueue::ReadyExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ReadyExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ReadyExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::ReadyExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ReadyExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ReadyExecution).void) + ).returns(::SolidQueue::ReadyExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ReadyExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ReadyExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def second; end + + sig { returns(::SolidQueue::ReadyExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::ReadyExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::ReadyExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::ReadyExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ReadyExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ReadyExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::ReadyExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def third; end + + sig { returns(::SolidQueue::ReadyExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::ReadyExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::ReadyExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { void } + def reset_job; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def queued_as(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def queued_as(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig do + params( + records: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::ReadyExecution, T::Enumerable[T.any(::SolidQueue::ReadyExecution, T::Enumerable[::SolidQueue::ReadyExecution])]) + ).returns(T::Array[::SolidQueue::ReadyExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ReadyExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ReadyExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_execution.rbi new file mode 100644 index 0000000..76dab20 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_execution.rbi @@ -0,0 +1,841 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::RecurringExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::RecurringExecution`. + + +class SolidQueue::RecurringExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::RecurringExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def fifth; end + + sig { returns(::SolidQueue::RecurringExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::RecurringExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::RecurringExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::RecurringExecution).void + ).returns(T.nilable(::SolidQueue::RecurringExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::RecurringExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::RecurringExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::RecurringExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::RecurringExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::RecurringExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::RecurringExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::RecurringExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::RecurringExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::RecurringExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::RecurringExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::RecurringExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def fourth; end + + sig { returns(::SolidQueue::RecurringExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::RecurringExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringExecution).void) + ).returns(::SolidQueue::RecurringExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def second; end + + sig { returns(::SolidQueue::RecurringExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::RecurringExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::RecurringExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::RecurringExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::RecurringExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def third; end + + sig { returns(::SolidQueue::RecurringExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::RecurringExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::RecurringExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { void } + def reset_job; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def clearable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def clearable(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig do + params( + records: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::RecurringExecution, T::Enumerable[T.any(::SolidQueue::RecurringExecution, T::Enumerable[::SolidQueue::RecurringExecution])]) + ).returns(T::Array[::SolidQueue::RecurringExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_job.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_job.rbi new file mode 100644 index 0000000..ac07142 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_job.rbi @@ -0,0 +1,21 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::RecurringJob`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::RecurringJob`. + + +class SolidQueue::RecurringJob + class << self + sig do + params( + command: T.untyped, + block: T.nilable(T.proc.params(job: SolidQueue::RecurringJob).void) + ).returns(T.any(SolidQueue::RecurringJob, FalseClass)) + end + def perform_later(command, &block); end + + sig { params(command: T.untyped).returns(T.untyped) } + def perform_now(command); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_task.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_task.rbi new file mode 100644 index 0000000..08c3860 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/recurring_task.rbi @@ -0,0 +1,811 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::RecurringTask`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::RecurringTask`. + + +class SolidQueue::RecurringTask + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringTask).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::RecurringTask).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def fifth; end + + sig { returns(::SolidQueue::RecurringTask) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::RecurringTask) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::RecurringTask]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::RecurringTask).void + ).returns(T.nilable(::SolidQueue::RecurringTask)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::RecurringTask)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::RecurringTask) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::RecurringTask).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::RecurringTask]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::RecurringTask]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::RecurringTask]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::RecurringTask)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::RecurringTask) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::RecurringTask) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringTask)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringTask]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::RecurringTask) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def forty_two; end + + sig { returns(::SolidQueue::RecurringTask) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def fourth; end + + sig { returns(::SolidQueue::RecurringTask) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringTask)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringTask]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::RecurringTask) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringTask).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::RecurringTask).void) + ).returns(::SolidQueue::RecurringTask) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringTask).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::RecurringTask).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def second; end + + sig { returns(::SolidQueue::RecurringTask) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def second_to_last; end + + sig { returns(::SolidQueue::RecurringTask) } + def second_to_last!; end + + sig { returns(::SolidQueue::RecurringTask) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::RecurringTask).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::RecurringTask)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::RecurringTask]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::RecurringTask) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def third; end + + sig { returns(::SolidQueue::RecurringTask) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::RecurringTask)) } + def third_to_last; end + + sig { returns(::SolidQueue::RecurringTask) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def static(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def static(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig do + params( + records: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::RecurringTask, T::Enumerable[T.any(::SolidQueue::RecurringTask, T::Enumerable[::SolidQueue::RecurringTask])]) + ).returns(T::Array[::SolidQueue::RecurringTask]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def target; end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::RecurringTask]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::RecurringTask } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/scheduled_execution.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/scheduled_execution.rbi new file mode 100644 index 0000000..175b25f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/scheduled_execution.rbi @@ -0,0 +1,847 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::ScheduledExecution`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::ScheduledExecution`. + + +class SolidQueue::ScheduledExecution + include GeneratedAssociationMethods + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ScheduledExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig do + params( + column_name: NilClass, + block: T.proc.params(object: ::SolidQueue::ScheduledExecution).void + ).returns(Integer) + end + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def fifth; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::ScheduledExecution) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::ScheduledExecution]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::ScheduledExecution).void + ).returns(T.nilable(::SolidQueue::ScheduledExecution)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::ScheduledExecution) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::ScheduledExecution).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::ScheduledExecution]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::ScheduledExecution]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::ScheduledExecution]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::ScheduledExecution) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::ScheduledExecution) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ScheduledExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ScheduledExecution]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::ScheduledExecution) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def forty_two; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def fourth; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ScheduledExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ScheduledExecution]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::ScheduledExecution) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ScheduledExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::ScheduledExecution).void) + ).returns(::SolidQueue::ScheduledExecution) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ScheduledExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::ScheduledExecution).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def second; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def second_to_last; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def second_to_last!; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::ScheduledExecution).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::ScheduledExecution)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::ScheduledExecution]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::ScheduledExecution) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def third; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::ScheduledExecution)) } + def third_to_last; end + + sig { returns(::SolidQueue::ScheduledExecution) } + def third_to_last!; end + end + + module GeneratedAssociationMethods + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def build_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.untyped) } + def create_job!(*args, &blk); end + + sig { returns(T.untyped) } + def job; end + + sig { params(value: T.untyped).void } + def job=(value); end + + sig { returns(T.untyped) } + def reload_job; end + + sig { void } + def reset_job; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def due(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def next_batch(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def due(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def next_batch(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def ordered(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig do + params( + records: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::ScheduledExecution, T::Enumerable[T.any(::SolidQueue::ScheduledExecution, T::Enumerable[::SolidQueue::ScheduledExecution])]) + ).returns(T::Array[::SolidQueue::ScheduledExecution]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def target; end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::ScheduledExecution]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::ScheduledExecution } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/semaphore.rbi b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/semaphore.rbi new file mode 100644 index 0000000..16842ad --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/dsl/solid_queue/semaphore.rbi @@ -0,0 +1,812 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `SolidQueue::Semaphore`. +# Please instead update this file by running `bin/tapioca dsl SolidQueue::Semaphore`. + + +class SolidQueue::Semaphore + extend CommonRelationMethods + extend GeneratedRelationMethods + + private + + sig { returns(NilClass) } + def to_ary; end + + module CommonRelationMethods + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Semaphore).returns(T.untyped)) + ).returns(T::Boolean) + end + def any?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def average(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def build(attributes = nil, &block); end + + sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.any(Integer, Float, BigDecimal)) } + def calculate(operation, column_name); end + + sig { params(column_name: T.nilable(T.any(String, Symbol))).returns(Integer) } + sig { params(column_name: NilClass, block: T.proc.params(object: ::SolidQueue::Semaphore).void).returns(Integer) } + def count(column_name = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def create(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def create!(attributes = nil, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def create_or_find_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def create_or_find_by!(attributes, &block); end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def destroy_all; end + + sig { params(conditions: T.untyped).returns(T::Boolean) } + def exists?(conditions = :none); end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def fifth; end + + sig { returns(::SolidQueue::Semaphore) } + def fifth!; end + + sig do + params( + args: T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything]) + ).returns(::SolidQueue::Semaphore) + end + sig do + params( + args: T::Array[T.any(String, Symbol, ::ActiveSupport::Multibyte::Chars, T::Boolean, BigDecimal, Numeric, ::ActiveRecord::Type::Binary::Data, ::ActiveRecord::Type::Time::Value, Date, Time, ::ActiveSupport::Duration, T::Class[T.anything])] + ).returns(T::Enumerable[::SolidQueue::Semaphore]) + end + sig do + params( + args: NilClass, + block: T.proc.params(object: ::SolidQueue::Semaphore).void + ).returns(T.nilable(::SolidQueue::Semaphore)) + end + def find(args = nil, &block); end + + sig { params(args: T.untyped).returns(T.nilable(::SolidQueue::Semaphore)) } + def find_by(*args); end + + sig { params(args: T.untyped).returns(::SolidQueue::Semaphore) } + def find_by!(*args); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: ::SolidQueue::Semaphore).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[::SolidQueue::Semaphore]) + end + def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol, + block: T.proc.params(object: T::Array[::SolidQueue::Semaphore]).void + ).void + end + sig do + params( + start: T.untyped, + finish: T.untyped, + batch_size: Integer, + error_on_ignore: T.untyped, + order: Symbol + ).returns(T::Enumerator[T::Enumerator[::SolidQueue::Semaphore]]) + end + def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: :asc, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def find_or_create_by(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def find_or_create_by!(attributes, &block); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def find_or_initialize_by(attributes, &block); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(T.nilable(::SolidQueue::Semaphore)) } + def find_signed(signed_id, purpose: nil); end + + sig { params(signed_id: T.untyped, purpose: T.untyped).returns(::SolidQueue::Semaphore) } + def find_signed!(signed_id, purpose: nil); end + + sig { params(arg: T.untyped, args: T.untyped).returns(::SolidQueue::Semaphore) } + def find_sole_by(arg, *args); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Semaphore)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Semaphore]) } + def first(limit = nil); end + + sig { returns(::SolidQueue::Semaphore) } + def first!; end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def forty_two; end + + sig { returns(::SolidQueue::Semaphore) } + def forty_two!; end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def fourth; end + + sig { returns(::SolidQueue::Semaphore) } + def fourth!; end + + sig { returns(Array) } + def ids; end + + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped, + block: T.proc.params(object: PrivateRelation).void + ).void + end + sig do + params( + of: Integer, + start: T.untyped, + finish: T.untyped, + load: T.untyped, + error_on_ignore: T.untyped, + order: Symbol, + use_ranges: T.untyped + ).returns(::ActiveRecord::Batches::BatchEnumerator) + end + def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: :asc, use_ranges: nil, &block); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def include?(record); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Semaphore)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Semaphore]) } + def last(limit = nil); end + + sig { returns(::SolidQueue::Semaphore) } + def last!; end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Semaphore).returns(T.untyped)) + ).returns(T::Boolean) + end + def many?(&block); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def maximum(column_name); end + + sig { params(record: T.untyped).returns(T::Boolean) } + def member?(record); end + + sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) } + def minimum(column_name); end + + sig do + params( + attributes: T.untyped, + block: T.nilable(T.proc.params(object: ::SolidQueue::Semaphore).void) + ).returns(::SolidQueue::Semaphore) + end + def new(attributes = nil, &block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Semaphore).returns(T.untyped)) + ).returns(T::Boolean) + end + def none?(&block); end + + sig do + params( + block: T.nilable(T.proc.params(record: ::SolidQueue::Semaphore).returns(T.untyped)) + ).returns(T::Boolean) + end + def one?(&block); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pick(*column_names); end + + sig { params(column_names: T.untyped).returns(T.untyped) } + def pluck(*column_names); end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def second; end + + sig { returns(::SolidQueue::Semaphore) } + def second!; end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def second_to_last; end + + sig { returns(::SolidQueue::Semaphore) } + def second_to_last!; end + + sig { returns(::SolidQueue::Semaphore) } + def sole; end + + sig { params(initial_value_or_column: T.untyped).returns(T.any(Integer, Float, BigDecimal)) } + sig do + type_parameters(:U) + .params( + initial_value_or_column: T.nilable(T.type_parameter(:U)), + block: T.proc.params(object: ::SolidQueue::Semaphore).returns(T.type_parameter(:U)) + ).returns(T.type_parameter(:U)) + end + def sum(initial_value_or_column = nil, &block); end + + sig { params(limit: NilClass).returns(T.nilable(::SolidQueue::Semaphore)) } + sig { params(limit: Integer).returns(T::Array[::SolidQueue::Semaphore]) } + def take(limit = nil); end + + sig { returns(::SolidQueue::Semaphore) } + def take!; end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def third; end + + sig { returns(::SolidQueue::Semaphore) } + def third!; end + + sig { returns(T.nilable(::SolidQueue::Semaphore)) } + def third_to_last; end + + sig { returns(::SolidQueue::Semaphore) } + def third_to_last!; end + end + + module GeneratedAssociationRelationMethods + sig { returns(PrivateAssociationRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def available(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateAssociationRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def expired(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) } + def without(*args, &blk); end + end + + module GeneratedRelationMethods + sig { returns(PrivateRelation) } + def all; end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def and(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def annotate(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def available(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def create_with(*args, &blk); end + + sig { params(value: T::Boolean).returns(PrivateRelation) } + def distinct(value = true); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def eager_load(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def except(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def excluding(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def expired(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def extending(*args, &blk); end + + sig { params(association: Symbol).returns(T::Array[T.untyped]) } + def extract_associated(association); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def from(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) } + def group(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def having(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def in_order_of(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def includes(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def invert_where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def left_outer_joins(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def limit(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def lock(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def merge(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def none(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def null_relation?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def offset(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def only(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def optimizer_hints(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def or(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def preload(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def readonly(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def references(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def regroup(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reorder(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reselect(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def reverse_order(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def rewhere(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def select(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def strict_loading(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def structurally_compatible?(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def uniq!(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def unscope(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationWhereChain) } + def where(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def with_recursive(*args, &blk); end + + sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) } + def without(*args, &blk); end + end + + class PrivateAssociationRelation < ::ActiveRecord::AssociationRelation + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_ary; end + end + + class PrivateAssociationRelationGroupChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateAssociationRelationWhereChain < PrivateAssociationRelation + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateAssociationRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateAssociationRelation) } + def not(opts, *rest); end + end + + class PrivateCollectionProxy < ::ActiveRecord::Associations::CollectionProxy + include CommonRelationMethods + include GeneratedAssociationRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig do + params( + records: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(PrivateCollectionProxy) + end + def <<(*records); end + + sig do + params( + records: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(PrivateCollectionProxy) + end + def append(*records); end + + sig { returns(PrivateCollectionProxy) } + def clear; end + + sig do + params( + records: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(PrivateCollectionProxy) + end + def concat(*records); end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def load_target; end + + sig do + params( + records: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(PrivateCollectionProxy) + end + def prepend(*records); end + + sig do + params( + records: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(PrivateCollectionProxy) + end + def push(*records); end + + sig do + params( + other_array: T.any(::SolidQueue::Semaphore, T::Enumerable[T.any(::SolidQueue::Semaphore, T::Enumerable[::SolidQueue::Semaphore])]) + ).returns(T::Array[::SolidQueue::Semaphore]) + end + def replace(other_array); end + + sig { returns(PrivateAssociationRelation) } + def scope; end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def target; end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_ary; end + end + + class PrivateRelation < ::ActiveRecord::Relation + include CommonRelationMethods + include GeneratedRelationMethods + + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_a; end + + sig { returns(T::Array[::SolidQueue::Semaphore]) } + def to_ary; end + end + + class PrivateRelationGroupChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) } + def average(column_name); end + + sig do + params( + operation: Symbol, + column_name: T.any(String, Symbol) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def calculate(operation, column_name); end + + sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) } + def count(column_name = nil); end + + sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) } + def having(*args, &blk); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def maximum(column_name); end + + sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) } + def minimum(column_name); end + + sig do + params( + column_name: T.nilable(T.any(String, Symbol)), + block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped)) + ).returns(T::Hash[T.untyped, T.any(Integer, Float, BigDecimal)]) + end + def sum(column_name = nil, &block); end + end + + class PrivateRelationWhereChain < PrivateRelation + Elem = type_member { { fixed: ::SolidQueue::Semaphore } } + + sig { params(args: T.untyped).returns(PrivateRelation) } + def associated(*args); end + + sig { params(args: T.untyped).returns(PrivateRelation) } + def missing(*args); end + + sig { params(opts: T.untyped, rest: T.untyped).returns(PrivateRelation) } + def not(opts, *rest); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/.gitattributes b/apps/govquests-api/rails_app/sorbet/rbi/gems/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/actioncable@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actioncable@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..065d77d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actioncable@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailbox@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailbox@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..d4ce309 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailbox@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,1919 @@ +# 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`. + + +# :markup: markdown +# :include: ../README.md +# +# source://actionmailbox//lib/action_mailbox/gem_version.rb#3 +module ActionMailbox + extend ::ActiveSupport::Autoload + + # source://actionmailbox//lib/action_mailbox.rb#22 + def incinerate; end + + # source://actionmailbox//lib/action_mailbox.rb#22 + def incinerate=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#23 + def incinerate_after; end + + # source://actionmailbox//lib/action_mailbox.rb#23 + def incinerate_after=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#20 + def ingress; end + + # source://actionmailbox//lib/action_mailbox.rb#20 + def ingress=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#21 + def logger; end + + # source://actionmailbox//lib/action_mailbox.rb#21 + def logger=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#24 + def queues; end + + # source://actionmailbox//lib/action_mailbox.rb#24 + def queues=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#25 + def storage_service; end + + # source://actionmailbox//lib/action_mailbox.rb#25 + def storage_service=(val); end + + class << self + # source://actionmailbox//lib/action_mailbox/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. + # + # source://actionmailbox//lib/action_mailbox/gem_version.rb#5 + def gem_version; end + + # source://actionmailbox//lib/action_mailbox.rb#22 + def incinerate; end + + # source://actionmailbox//lib/action_mailbox.rb#22 + def incinerate=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#23 + def incinerate_after; end + + # source://actionmailbox//lib/action_mailbox.rb#23 + def incinerate_after=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#20 + def ingress; end + + # source://actionmailbox//lib/action_mailbox.rb#20 + def ingress=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#21 + def logger; end + + # source://actionmailbox//lib/action_mailbox.rb#21 + def logger=(val); end + + # source://actionmailbox//lib/action_mailbox.rb#24 + def queues; end + + # source://actionmailbox//lib/action_mailbox.rb#24 + def queues=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#413 + def railtie_helpers_paths; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#396 + def railtie_namespace; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#417 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://actionmailbox//lib/action_mailbox.rb#25 + def storage_service; end + + # source://actionmailbox//lib/action_mailbox.rb#25 + def storage_service=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#402 + def table_name_prefix; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#409 + def use_relative_model_naming?; end + + # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. + # + # source://actionmailbox//lib/action_mailbox/version.rb#7 + def version; end + end +end + +# = Action Mailbox \Base +# +# The base class for all application mailboxes. Not intended to be inherited from directly. Inherit from +# +ApplicationMailbox+ instead, as that's where the app-specific routing is configured. This routing +# is specified in the following ways: +# +# 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 to ensure that certain preconditions to processing are fulfilled +# using +before_processing+ callbacks. +# +# If a precondition fails to be met, you can halt the processing using the +#bounced!+ method, +# 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.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 +# ActiveSupport::Rescuable approach: +# +# class ForwardsMailbox < ApplicationMailbox +# rescue_from(ApplicationSpecificVerificationError) { bounced! } +# end +# +# source://actionmailbox//lib/action_mailbox/base.rb#66 +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#79 + def initialize(inbound_email); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _process_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_process_callbacks(&block); end + + # Immediately sends the given +message+ and changes the inbound email's status to +:bounced+. + # + # source://actionmailbox//lib/action_mailbox/base.rb#111 + def bounce_now_with(message); end + + # Enqueues the given +message+ for delivery and changes the inbound email's status to +:bounced+. + # + # source://actionmailbox//lib/action_mailbox/base.rb#105 + def bounce_with(message); end + + # source://actionmailbox//lib/action_mailbox/base.rb#71 + def bounced!(*_arg0, **_arg1, &_arg2); end + + # source://actionmailbox//lib/action_mailbox/base.rb#71 + def delivered!(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://actionmailbox//lib/action_mailbox/base.rb#100 + def finished_processing?; end + + # Returns the value of attribute inbound_email. + # + # source://actionmailbox//lib/action_mailbox/base.rb#70 + def inbound_email; end + + # source://actionmailbox//lib/action_mailbox/base.rb#73 + def logger(&_arg0); end + + # source://actionmailbox//lib/action_mailbox/base.rb#71 + def mail(*_arg0, **_arg1, &_arg2); end + + # source://actionmailbox//lib/action_mailbox/base.rb#83 + def perform_processing; end + + # source://actionmailbox//lib/action_mailbox/base.rb#96 + def process; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + 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#117 + def instrumentation_payload; end + + # source://actionmailbox//lib/action_mailbox/base.rb#124 + def track_status_of_inbound_email; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _process_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _process_callbacks=(value); end + + # source://actionmailbox//lib/action_mailbox/base.rb#75 + def receive(inbound_email); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def authenticate_by_password; end + def ensure_configured; end + def ingress_name; end + def password; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# = Action Mailbox \Callbacks +# +# Defines the callbacks related to processing. +# +# source://actionmailbox//lib/action_mailbox/callbacks.rb#9 +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 + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://actionmailbox//lib/action_mailbox/callbacks.rb#0 +module ActionMailbox::Callbacks::ClassMethods + # source://actionmailbox//lib/action_mailbox/callbacks.rb#27 + def after_processing(*methods, &block); end + + # source://actionmailbox//lib/action_mailbox/callbacks.rb#31 + def around_processing(*methods, &block); end + + # source://actionmailbox//lib/action_mailbox/callbacks.rb#23 + def before_processing(*methods, &block); end +end + +# source://actionmailbox//lib/action_mailbox/callbacks.rb#13 +ActionMailbox::Callbacks::TERMINATOR = T.let(T.unsafe(nil), Proc) + +# source://actionmailbox//lib/action_mailbox/engine.rb#12 +class ActionMailbox::Engine < ::Rails::Engine + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_raw_email_attachment(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_raw_email_blob(*args); end + + def instrumentation_payload; end + def mail; end + def processed?; end + def source; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def bounced(*args, **_arg1); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def delivered(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def failed(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def not_bounced(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def not_delivered(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def not_failed(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def not_pending(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def not_processing(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def pending(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def processing(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/enum.rb#250 + def statuses; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def with_attached_raw_email(*args, **_arg1); end + end +end + +module ActionMailbox::InboundEmail::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_raw_email_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_raw_email_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_raw_email_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_raw_email_attachment!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_raw_email_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_raw_email_blob!(*args, &block); end + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/attached/model.rb#113 + def raw_email; end + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/attached/model.rb#118 + def raw_email=(attachable); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def raw_email_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def raw_email_attachment=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def raw_email_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def raw_email_blob=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_raw_email_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_raw_email_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_raw_email_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def authenticate; end + def authenticated?; end + def key; end + def mail; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def authenticate; end + def authenticated?; end + def events; end + def key; end + def raw_emails; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def mail; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +module ActionMailbox::Ingresses::Relay; end + +class ActionMailbox::Ingresses::Relay::InboundEmailsController < ::ActionMailbox::BaseController + def create; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def require_valid_rfc822_message; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +module ActionMailbox::Ingresses::Sendgrid; end + +class ActionMailbox::Ingresses::Sendgrid::InboundEmailsController < ::ActionMailbox::BaseController + def create; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def envelope; end + def mail; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class ActionMailbox::Record < ::ActiveRecord::Base + include ::ActionMailbox::Record::GeneratedAttributeMethods + include ::ActionMailbox::Record::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +module ActionMailbox::Record::GeneratedAssociationMethods; end +module ActionMailbox::Record::GeneratedAttributeMethods; end + +# = Action Mailbox \Router +# +# Encapsulates the routes that live on the ApplicationMailbox and performs the actual routing when +# an inbound_email is received. +# +# source://actionmailbox//lib/action_mailbox/router.rb#8 +class ActionMailbox::Router + # @return [Router] a new instance of Router + # + # source://actionmailbox//lib/action_mailbox/router.rb#11 + def initialize; end + + # source://actionmailbox//lib/action_mailbox/router.rb#21 + def add_route(address, to:); end + + # source://actionmailbox//lib/action_mailbox/router.rb#15 + def add_routes(routes); end + + # source://actionmailbox//lib/action_mailbox/router.rb#35 + def mailbox_for(inbound_email); end + + # source://actionmailbox//lib/action_mailbox/router.rb#25 + def route(inbound_email); end + + private + + # Returns the value of attribute routes. + # + # source://actionmailbox//lib/action_mailbox/router.rb#40 + 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#9 +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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); 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/gem_version.rb#9 +module ActionMailbox::VERSION; end + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#10 +ActionMailbox::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#11 +ActionMailbox::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#13 +ActionMailbox::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#15 +ActionMailbox::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionmailbox//lib/action_mailbox/gem_version.rb#12 +ActionMailbox::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://actionmailbox//lib/action_mailbox/mail_ext/address_equality.rb#3 +module Mail + class << self + # 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#29 + def x_forwarded_to_addresses; 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://actionmailbox//lib/action_mailbox/mail_ext/addresses.rb#34 + def address_list(obj); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#45 + def application; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#43 + def application=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#126 + def autoloaders; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#56 + def backtrace_cleaner; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#52 + def configuration; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#75 + def env; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#82 + def env=(environment); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#93 + def error; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/gem_version.rb#5 + def gem_version; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#106 + def groups(*groups); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialize!(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialized?(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#122 + def public_path; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#65 + def root; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class Rails::Conductor::ActionMailbox::IncineratesController < ::Rails::Conductor::BaseController + def create; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class Rails::Conductor::ActionMailbox::ReroutesController < ::Rails::Conductor::BaseController + def create; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def reroute(inbound_email); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class Rails::Conductor::BaseController < ::ActionController::Base + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def ensure_development_env; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailer@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailer@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..7caef0d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionmailer@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,2668 @@ +# 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`. + + +# :include: ../README.rdoc +# +# source://actionmailer//lib/action_mailer/gem_version.rb#3 +module ActionMailer + extend ::ActiveSupport::Autoload + + class << self + # source://actionmailer//lib/action_mailer/deprecator.rb#4 + def deprecator; end + + # source://actionmailer//lib/action_mailer.rb#61 + def eager_load!; end + + # Returns the currently loaded version of Action Mailer as a +Gem::Version+. + # + # 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 \Base +# +# 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.first).deliver_now # sends the email +# mail = NotifierMailer.welcome(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.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.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, +# and using before_deliver and after_deliver for wrapping the delivery process. +# For example, when you want to add default inline attachments and log delivery for all messages +# sent out by a certain mailer class: +# +# class NotifierMailer < ApplicationMailer +# before_action :add_inline_attachment! +# after_deliver :log_delivery +# +# def welcome +# mail +# end +# +# private +# def add_inline_attachment! +# attachments.inline["footer.jpg"] = File.read('/path/to/filename.jpg') +# end +# +# def log_delivery +# Rails.logger.info "Sent email with message id '#{message.message_id}' at #{Time.current}." +# end +# end +# +# Action callbacks in Action Mailer are implemented using +# AbstractController::Callbacks, so you can define and configure +# callbacks in the same manner that you would use callbacks in classes that +# inherit from ActionController::Base. +# +# 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_paths. Since most emails do something interesting +# with database data, you'll need to write some scenarios to load messages with fake data: +# +# class NotifierMailerPreview < ActionMailer::Preview +# def welcome +# NotifierMailer.welcome(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 preview directories can be configured using the preview_paths option which has a default +# of test/mailers/previews: +# +# config.action_mailer.preview_paths << "#{Rails.root}/lib/mailer_previews" +# +# An overview of all previews is accessible at http://localhost:3000/rails/mailers +# on a running development server instance. +# +# 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. Requires at least version 2.7 of the Mail gem. +# * :enable_starttls_auto - Detects if STARTTLS is enabled in your SMTP server and starts +# to use it. Defaults to true. +# * :openssl_verify_mode - When using TLS, you can set how OpenSSL checks the certificate. This is +# really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name +# of an OpenSSL verify constant ('none' or 'peer') or directly the constant +# (+OpenSSL::SSL::VERIFY_NONE+ or +OpenSSL::SSL::VERIFY_PEER+). +# * :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 %w[ -i ] with -f sender@address +# added automatically before the message is sent. +# +# * file_settings - Allows you to override options for the :file delivery method. +# * :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. Mailers can set this to use a +# custom delivery job. Defaults to +ActionMailer::MailDeliveryJob+. +# +# * deliver_later_queue_name - The queue name used by deliver_later with the default +# delivery_job. Mailers can set this to use a custom queue name. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://actionmailer//lib/action_mailer/base.rb#476 +class ActionMailer::Base < ::AbstractController::Base + include ::ActionMailer::Callbacks + include ::ActiveSupport::Callbacks + include ::ActionMailer::DeliveryMethods + include ::ActionMailer::QueuedDelivery + include ::ActiveSupport::Rescuable + include ::ActionMailer::Rescuable + include ::ActionMailer::Parameterized + include ::ActionMailer::Previews + include ::ActionMailer::FormBuilder + include ::ActionView::ViewPaths + include ::AbstractController::Rendering + include ::AbstractController::Logger + include ::ActiveSupport::Benchmarkable + include ::AbstractController::Helpers + include ::AbstractController::Translation + include ::AbstractController::AssetPaths + include ::AbstractController::Callbacks + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching + include ::ActionView::Rendering + include ::ActionView::Layouts + extend ::ActionMailer::Callbacks::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActionMailer::DeliveryMethods::ClassMethods + extend ::ActiveSupport::Rescuable::ClassMethods + extend ::ActionMailer::Rescuable::ClassMethods + extend ::ActionMailer::Parameterized::ClassMethods + extend ::ActionMailer::Previews::ClassMethods + extend ::ActionMailer::FormBuilder::ClassMethods + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::Resolution + extend ::AbstractController::Helpers::ClassMethods + extend ::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#643 + def initialize; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _deliver_callbacks; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _process_action_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_deliver_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_process_action_callbacks(&block); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + 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+, and +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#760 + def attachments; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_asset_host_protocol=(value); end + + # source://actionmailer//lib/action_mailer/base.rb#502 + def default_params; end + + # source://actionmailer//lib/action_mailer/base.rb#502 + def default_params=(_arg0); end + + # source://actionmailer//lib/action_mailer/base.rb#502 + def default_params?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name; end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name=(_arg0); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name?; end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 + def delivery_job; end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 + def delivery_job=(_arg0); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 + def delivery_job?; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 + def delivery_method; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 + def delivery_method=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 + def delivery_method?; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + def delivery_methods; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + def delivery_methods=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + def delivery_methods?; end + + # Returns an email in the format "Name ". + # + # If the name is a blank string, it returns just the address. + # + # source://actionmailer//lib/action_mailer/base.rb#684 + def email_address_with_name(address, name); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def file_settings; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def file_settings=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def file_settings?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + 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#722 + def headers(args = T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + 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#869 + def mail(headers = T.unsafe(nil), &block); end + + # Returns the name of the mailer object. + # + # source://actionmailer//lib/action_mailer/base.rb#677 + def mailer_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def message; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def message=(_arg0); end + + # source://actionmailer//lib/action_mailer/parameterized.rb#95 + def params; end + + # source://actionmailer//lib/action_mailer/parameterized.rb#93 + def params=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 + def perform_deliveries; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 + def perform_deliveries=(val); end + + # source://actionmailer//lib/action_mailer/preview.rb#25 + def preview_interceptors; end + + # source://actionmailer//lib/action_mailer/preview.rb#14 + def preview_paths; end + + # source://actionmailer//lib/action_mailer/base.rb#649 + def process(method_name, *args, **_arg2); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + def raise_delivery_errors; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + def raise_delivery_errors=(val); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def sendmail_settings; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def sendmail_settings=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def sendmail_settings?; end + + # source://actionmailer//lib/action_mailer/preview.rb#22 + def show_previews; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def smtp_settings; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def smtp_settings=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def smtp_settings?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def test_settings; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def test_settings=(_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def test_settings?; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://actionmailer//lib/action_mailer/base.rb#1070 + def _protected_ivars; end + + # source://actionmailer//lib/action_mailer/base.rb#946 + def apply_defaults(headers); end + + # source://actionmailer//lib/action_mailer/base.rb#966 + def assign_headers_to_message(message, headers); end + + # source://actionmailer//lib/action_mailer/base.rb#972 + def collect_responses(headers, &block); end + + # @yield [collector] + # + # source://actionmailer//lib/action_mailer/base.rb#982 + def collect_responses_from_block(headers); end + + # source://actionmailer//lib/action_mailer/base.rb#996 + def collect_responses_from_templates(headers); end + + # source://actionmailer//lib/action_mailer/base.rb#989 + def collect_responses_from_text(headers); end + + # source://actionmailer//lib/action_mailer/base.rb#956 + def compute_default(value); end + + # source://actionmailer//lib/action_mailer/base.rb#1039 + 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#936 + def default_i18n_subject(interpolations = T.unsafe(nil)); end + + # source://actionmailer//lib/action_mailer/base.rb#1009 + def each_template(paths, name, &block); end + + # source://actionmailer//lib/action_mailer/base.rb#1052 + def insert_part(container, response, charset); end + + # source://actionmailer//lib/action_mailer/base.rb#1066 + def instrument_name; end + + # This and #instrument_name is for caching instrument + # + # source://actionmailer//lib/action_mailer/base.rb#1059 + 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#914 + def set_content_type(m, user_content_type, class_default); end + + # source://actionmailer//lib/action_mailer/base.rb#1018 + def wrap_inline_attachments(message); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _default_form_builder; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end + + # source://actionmailer//lib/action_mailer/form_builder.rb#18 + def _default_form_builder?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _deliver_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _deliver_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _helper_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#17 + def _helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#211 + def _layout?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _process_action_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _process_action_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _view_cache_dependencies; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def assets_dir=(value); end + + # Returns the name of the current mailer. This method is also being used as a path for a view lookup. + # If this is an anonymous mailer, this method will return +anonymous+ instead. + # + # source://actionmailer//lib/action_mailer/base.rb#570 + 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#582 + def default(value = T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + 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#582 + def default_options=(value = T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_params; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_params=(new_value); end + + # source://actionmailer//lib/action_mailer/base.rb#502 + def default_params?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def deliver_later_queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def deliver_later_queue_name=(new_value); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 + def deliver_later_queue_name?; end + + # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation. + # + # 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#597 + def deliver_mail(mail); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def delivery_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def delivery_job=(new_value); end + + # source://actionmailer//lib/action_mailer/queued_delivery.rb#8 + def delivery_job?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def delivery_method; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def delivery_method=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#19 + def delivery_method?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def delivery_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def delivery_methods=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#18 + def delivery_methods?; end + + # Returns an email in the format "Name ". + # + # If the name is a blank string, it returns just the address. + # + # source://actionmailer//lib/action_mailer/base.rb#607 + def email_address_with_name(address, name); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def file_settings; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def file_settings=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def file_settings?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def fragment_cache_keys; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # Returns the name of the current mailer. This method is also being used as a path for a view lookup. + # If this is an anonymous mailer, this method will return +anonymous+ instead. + # + # source://actionmailer//lib/action_mailer/base.rb#570 + def mailer_name; end + + # Allows to set the name of current mailer. + # + # source://actionmailer//lib/action_mailer/base.rb#574 + def mailer_name=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 + def perform_deliveries; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 + def perform_deliveries=(val); end + + # source://actionmailer//lib/action_mailer/preview.rb#25 + def preview_interceptors; end + + # source://actionmailer//lib/action_mailer/preview.rb#25 + def preview_interceptors=(val); end + + # source://actionmailer//lib/action_mailer/preview.rb#14 + def preview_paths; end + + # source://actionmailer//lib/action_mailer/preview.rb#14 + def preview_paths=(val); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + def raise_delivery_errors; end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 + def raise_delivery_errors=(val); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # Register an Interceptor which will be called before mail is sent. + # Either a class, string, or symbol can be passed in as the Interceptor. + # If a string or symbol is passed in it will be camelized and constantized. + # + # source://actionmailer//lib/action_mailer/base.rb#547 + def register_interceptor(interceptor); end + + # Register one or more Interceptors which will be called before mail is sent. + # + # source://actionmailer//lib/action_mailer/base.rb#521 + def register_interceptors(*interceptors); end + + # Register an Observer which will be notified when mail is delivered. + # Either a class, string, or symbol can be passed in as the Observer. + # If a string or symbol is passed in it will be camelized and constantized. + # + # source://actionmailer//lib/action_mailer/base.rb#533 + def register_observer(observer); end + + # Register one or more Observers which will be notified when mail is delivered. + # + # source://actionmailer//lib/action_mailer/base.rb#511 + def register_observers(*observers); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def sendmail_settings; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def sendmail_settings=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def smtp_settings; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def smtp_settings=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + def smtp_settings?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); end + + # Emails do not support relative path links. + # + # @return [Boolean] + # + # source://actionmailer//lib/action_mailer/base.rb#942 + def supports_path?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def test_settings; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def test_settings=(new_value); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#52 + 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#554 + def unregister_interceptor(interceptor); end + + # Unregister one or more previously registered Interceptors. + # + # source://actionmailer//lib/action_mailer/base.rb#526 + def unregister_interceptors(*interceptors); end + + # Unregister a previously registered Observer. + # Either a class, string, or symbol can be passed in as the Observer. + # If a string or symbol is passed in it will be camelized and constantized. + # + # source://actionmailer//lib/action_mailer/base.rb#540 + def unregister_observer(observer); end + + # Unregister one or more previously registered Observers. + # + # source://actionmailer//lib/action_mailer/base.rb#516 + def unregister_observers(*observers); end + + private + + # source://actionmailer//lib/action_mailer/base.rb#628 + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end + + # source://actionmailer//lib/action_mailer/base.rb#558 + def observer_class_for(value); end + + # @return [Boolean] + # + # source://actionmailer//lib/action_mailer/base.rb#636 + def respond_to_missing?(method, include_all = T.unsafe(nil)); end + + # source://actionmailer//lib/action_mailer/base.rb#615 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#34 + def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#45 + def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end +end + +# source://actionmailer//lib/action_mailer/base.rb#768 +class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator + # source://actionmailer//lib/action_mailer/base.rb#770 + def []=(_name, _content); end + + # source://actionmailer//lib/action_mailer/base.rb#769 + def inline; end + + private + + # @raise [RuntimeError] + # + # source://actionmailer//lib/action_mailer/base.rb#773 + def _raise_error; end +end + +# source://actionmailer//lib/action_mailer/base.rb#663 +class ActionMailer::Base::NullMail + # source://actionmailer//lib/action_mailer/base.rb#664 + def body; end + + # source://actionmailer//lib/action_mailer/base.rb#665 + def header; end + + # source://actionmailer//lib/action_mailer/base.rb#671 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://actionmailer//lib/action_mailer/base.rb#667 + def respond_to?(string, include_all = T.unsafe(nil)); end +end + +# source://actionmailer//lib/action_mailer/base.rb#498 +ActionMailer::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) + +# source://actionmailer//lib/action_mailer/callbacks.rb#4 +module ActionMailer::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionMailer::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://actionmailer//lib/action_mailer/callbacks.rb#12 +module ActionMailer::Callbacks::ClassMethods + # Defines a callback that will get called right after the + # message's delivery method is finished. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#21 + def after_deliver(*filters, &blk); end + + # Defines a callback that will get called around the message's deliver method. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#26 + def around_deliver(*filters, &blk); end + + # Defines a callback that will get called right before the + # message is sent to the delivery method. + # + # source://actionmailer//lib/action_mailer/callbacks.rb#15 + def before_deliver(*filters, &blk); end +end + +# source://actionmailer//lib/action_mailer/collector.rb#8 +class ActionMailer::Collector + include ::AbstractController::Collector + + # @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 + +# = Action Mailer \DeliveryMethods +# +# This module handles everything related to mail delivery, from registering +# new delivery methods to configuring the mail object to be sent. +# +# source://actionmailer//lib/action_mailer/delivery_methods.rb#10 +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#79 + 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#41 +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: %w[ -i ] + # + # source://actionmailer//lib/action_mailer/delivery_methods.rb#51 + def add_delivery_method(symbol, klass, default_options = T.unsafe(nil)); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#43 + def deliveries(&_arg0); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#43 + def deliveries=(arg); end + + # source://actionmailer//lib/action_mailer/delivery_methods.rb#57 + def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# = Action Mailer Form Builder +# +# Override the default form builder for all views rendered by this +# mailer and any of its descendants. Accepts a subclass of +# ActionView::Helpers::FormBuilder. +# +# While emails typically will not include forms, this can be used +# by views that are shared between controllers and mailers. +# +# For more information, see +ActionController::FormBuilder+. +# +# source://actionmailer//lib/action_mailer/form_builder.rb#14 +module ActionMailer::FormBuilder + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionMailer::FormBuilder::ClassMethods + + # Default form builder for the mailer + # + # source://actionmailer//lib/action_mailer/form_builder.rb#33 + def default_form_builder; end + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end + +# source://actionmailer//lib/action_mailer/form_builder.rb#21 +module ActionMailer::FormBuilder::ClassMethods + # Set the form builder to be used as the default for all forms + # in the views rendered by this mailer and its subclasses. + # + # ==== Parameters + # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder + # + # source://actionmailer//lib/action_mailer/form_builder.rb#27 + def default_form_builder(builder); end +end + +# = Action Mailer \InlinePreviewInterceptor +# +# Implements a mailer preview interceptor that converts image tag src attributes +# that use inline cid: style URLs to data: style URLs so that they are visible +# when previewing an HTML email in a web browser. +# +# 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#17 +class ActionMailer::InlinePreviewInterceptor + include ::Base64 + + # @return [InlinePreviewInterceptor] a new instance of InlinePreviewInterceptor + # + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#26 + def initialize(message); end + + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#30 + def transform!; end + + private + + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#51 + def data_url(part); end + + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#55 + def find_part(cid); end + + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#47 + def html_part; end + + # Returns the value of attribute message. + # + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#45 + def message; end + + class << self + # source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#22 + def previewing_email(message); end + end +end + +# source://actionmailer//lib/action_mailer/inline_preview_interceptor.rb#18 +ActionMailer::InlinePreviewInterceptor::PATTERN = T.let(T.unsafe(nil), Regexp) + +# = Action Mailer \LogSubscriber +# +# Implements the ActiveSupport::LogSubscriber for logging notifications when +# email is delivered or received. +# +# source://actionmailer//lib/action_mailer/log_subscriber.rb#10 +class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber + # An email was delivered. + # + # source://actionmailer//lib/action_mailer/log_subscriber.rb#12 + def deliver(event); end + + # Use the logger configured for ActionMailer::Base. + # + # source://actionmailer//lib/action_mailer/log_subscriber.rb#38 + def logger; end + + # An email was generated. + # + # source://actionmailer//lib/action_mailer/log_subscriber.rb#28 + def process(event); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + end +end + +# = Action Mailer \MailDeliveryJob +# +# The +ActionMailer::MailDeliveryJob+ class is used when you +# want to send emails outside of the request-response cycle. It supports +# sending either parameterized or normal mail. +# +# Exceptions are rescued and handled by the mailer class. +# +# source://actionmailer//lib/action_mailer/mail_delivery_job.rb#13 +class ActionMailer::MailDeliveryJob < ::ActiveJob::Base + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#21 + def perform(mailer, mail_method, delivery_method, args:, kwargs: T.unsafe(nil), params: T.unsafe(nil)); end + + private + + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#40 + def handle_exception_with_mailer_class(exception); end + + # "Deserialize" the mailer class name by hand in case another argument + # (like a Global ID reference) raised DeserializationError. + # + # source://actionmailer//lib/action_mailer/mail_delivery_job.rb#34 + def mailer_class; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +# = Action Mailer \MailHelper +# +# Provides helper methods for ActionMailer::Base that can be used for easily +# formatting messages, accessing mailer or message instances, and the +# attachments list. +# +# source://actionmailer//lib/action_mailer/mail_helper.rb#9 +module ActionMailer::MailHelper + # Access the message attachments list. + # + # source://actionmailer//lib/action_mailer/mail_helper.rb#45 + def attachments; end + + # Take the text and format it, indented two spaces for each line, and + # 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#22 + 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#57 + def format_paragraph(text, len = T.unsafe(nil), indent = T.unsafe(nil)); end + + # Access the mailer instance. + # + # source://actionmailer//lib/action_mailer/mail_helper.rb#35 + def mailer; end + + # Access the message instance. + # + # source://actionmailer//lib/action_mailer/mail_helper.rb#40 + def message; end +end + +# = Action Mailer \MessageDelivery +# +# The +ActionMailer::MessageDelivery+ class is used by +# ActionMailer::Base when creating a new mailer. +# MessageDelivery is a wrapper (+Delegator+ subclass) around a lazy +# created +Mail::Message+. You can get direct access to the +# +Mail::Message+, deliver the email or schedule the email to be sent +# through Active Job. +# +# Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object +# Notifier.welcome(User.first).deliver_now # sends the email +# Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job +# Notifier.welcome(User.first).message # a Mail::Message object +# +# source://actionmailer//lib/action_mailer/message_delivery.rb#19 +class ActionMailer::MessageDelivery + # @return [MessageDelivery] a new instance of MessageDelivery + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#20 + def initialize(mailer_class, action, *args, **_arg3); end + + # Method calls are delegated to the Mail::Message that's ready to deliver. + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#31 + def __getobj__; end + + # Unused except for delegator internals (dup, marshalling). + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#36 + def __setobj__(mail_message); end + + # Enqueues the email to be delivered through Active Job. When the + # job runs it will send the email using +deliver_now+. + # + # Notifier.welcome(User.first).deliver_later + # Notifier.welcome(User.first).deliver_later(wait: 1.hour) + # Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now) + # Notifier.welcome(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 on + # the default queue. Mailer classes can customize the queue name used for the default + # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job + # by assigning a +delivery_job+. When a custom job is used, it controls the queue name. + # + # class AccountRegistrationMailer < ApplicationMailer + # self.delivery_job = RegistrationDeliveryJob + # end + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#102 + 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.first).deliver_later! + # Notifier.welcome(User.first).deliver_later!(wait: 1.hour) + # Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now) + # Notifier.welcome(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 on + # the default queue. Mailer classes can customize the queue name used for the default + # job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job + # by assigning a +delivery_job+. When a custom job is used, it controls the queue name. + # + # class AccountRegistrationMailer < ApplicationMailer + # self.delivery_job = RegistrationDeliveryJob + # end + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#75 + def deliver_later!(options = T.unsafe(nil)); end + + # Delivers an email: + # + # Notifier.welcome(User.first).deliver_now + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#123 + def deliver_now; end + + # Delivers an email without checking +perform_deliveries+ and +raise_delivery_errors+, + # so use with caution. + # + # Notifier.welcome(User.first).deliver_now! + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#111 + def deliver_now!; end + + # Returns the resulting Mail::Message + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#41 + def message; end + + # Was the delegate loaded, causing the mailer action to be processed? + # + # @return [Boolean] + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#46 + def processed?; end + + private + + # source://actionmailer//lib/action_mailer/message_delivery.rb#140 + def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end + + # Returns the processed Mailer instance. We keep this instance + # on hand so we can run callbacks and delegate exception handling to it. + # + # source://actionmailer//lib/action_mailer/message_delivery.rb#134 + 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 + +# = Action Mailer \Parameterized +# +# 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#89 +module ActionMailer::Parameterized + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionMailer::Parameterized::ClassMethods +end + +# source://actionmailer//lib/action_mailer/parameterized.rb#100 +module ActionMailer::Parameterized::ClassMethods + # Provide the parameters to the mailer in order to use them in the instance methods and callbacks. + # + # 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#106 + def with(params); end +end + +# source://actionmailer//lib/action_mailer/parameterized.rb#111 +class ActionMailer::Parameterized::Mailer + # @return [Mailer] a new instance of Mailer + # + # source://actionmailer//lib/action_mailer/parameterized.rb#112 + def initialize(mailer, params); end + + private + + # source://actionmailer//lib/action_mailer/parameterized.rb#117 + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://actionmailer//lib/action_mailer/parameterized.rb#125 + def respond_to_missing?(method, include_all = T.unsafe(nil)); end +end + +# source://actionmailer//lib/action_mailer/parameterized.rb#130 +class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery + # @return [MessageDelivery] a new instance of MessageDelivery + # + # source://actionmailer//lib/action_mailer/parameterized.rb#131 + def initialize(mailer_class, action, params, *_arg3, **_arg4, &_arg5); end + + private + + # source://actionmailer//lib/action_mailer/parameterized.rb#144 + def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end + + # source://actionmailer//lib/action_mailer/parameterized.rb#137 + 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_paths; 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/queued_delivery.rb#4 +module ActionMailer::QueuedDelivery + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end + + module GeneratedInstanceMethods + def deliver_later_queue_name; end + def deliver_later_queue_name=(value); end + def deliver_later_queue_name?; end + def delivery_job; end + def delivery_job=(value); end + def delivery_job?; end + end +end + +# source://actionmailer//lib/action_mailer/railtie.rb#9 +class ActionMailer::Railtie < ::Rails::Railtie; end + +# = Action Mailer \Rescuable +# +# Provides +# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from] +# for mailers. Wraps mailer action processing, mail job processing, and mail +# delivery to handle configured errors. +# +# source://actionmailer//lib/action_mailer/rescuable.rb#10 +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#20 + def handle_exceptions; end + + private + + # source://actionmailer//lib/action_mailer/rescuable.rb#27 + 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#15 + 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 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _mailer_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _mailer_class=(new_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 + 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 + + # Reads the fixture file for the given mailer. + # + # This is useful when testing mailers by being able to write the body of + # an email inside a fixture. See the testing guide for a concrete example: + # https://guides.rubyonrails.org/testing.html#revenge-of-the-fixtures + # + # source://actionmailer//lib/action_mailer/test_case.rb#82 + def read_fixture(action); end + + private + + # source://actionmailer//lib/action_mailer/test_case.rb#115 + def charset; end + + # source://actionmailer//lib/action_mailer/test_case.rb#119 + def encode(subject); end + + # source://actionmailer//lib/action_mailer/test_case.rb#87 + def initialize_test_deliveries; end + + # source://actionmailer//lib/action_mailer/test_case.rb#104 + def restore_delivery_method; end + + # source://actionmailer//lib/action_mailer/test_case.rb#94 + def restore_test_deliveries; end + + # source://actionmailer//lib/action_mailer/test_case.rb#99 + def set_delivery_method(method); end + + # source://actionmailer//lib/action_mailer/test_case.rb#109 + 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#9 +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#35 + def assert_emails(number, &block); end + + # Asserts that a specific email has been enqueued, optionally + # matching arguments and/or params. + # + # def test_email + # ContactMailer.welcome.deliver_later + # assert_enqueued_email_with ContactMailer, :welcome + # end + # + # def test_email_with_parameters + # ContactMailer.with(greeting: "Hello").welcome.deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, args: { greeting: "Hello" } + # end + # + # def test_email_with_arguments + # ContactMailer.welcome("Hello", "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] + # end + # + # def test_email_with_named_arguments + # ContactMailer.welcome(greeting: "Hello", farewell: "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, args: [{ greeting: "Hello", farewell: "Goodbye" }] + # end + # + # def test_email_with_parameters_and_arguments + # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: ["Cheers", "Goodbye"] + # end + # + # def test_email_with_parameters_and_named_arguments + # ContactMailer.with(greeting: "Hello").welcome(farewell: "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, params: { greeting: "Hello" }, args: [{farewell: "Goodbye"}] + # end + # + # def test_email_with_parameterized_mailer + # ContactMailer.with(greeting: "Hello").welcome.deliver_later + # assert_enqueued_email_with ContactMailer.with(greeting: "Hello"), :welcome + # end + # + # def test_email_with_matchers + # ContactMailer.with(greeting: "Hello").welcome("Cheers", "Goodbye").deliver_later + # assert_enqueued_email_with ContactMailer, :welcome, + # params: ->(params) { /hello/i.match?(params[:greeting]) }, + # args: ->(args) { /cheers/i.match?(args[0]) } + # end + # + # If a block is passed, that block should cause the specified email + # to be enqueued. + # + # 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#157 + def assert_enqueued_email_with(mailer, method, params: T.unsafe(nil), args: T.unsafe(nil), queue: T.unsafe(nil), &block); end + + # Asserts that the number of emails enqueued for later delivery matches + # the given number. + # + # 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#91 + 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#63 + 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#191 + def assert_no_enqueued_emails(&block); end + + # Returns any emails that are sent in the block. + # + # def test_emails + # emails = capture_emails do + # ContactMailer.welcome.deliver_now + # end + # assert_equal "Hi there", emails.first.subject + # + # emails = capture_emails do + # ContactMailer.welcome.deliver_now + # ContactMailer.welcome.deliver_later + # end + # assert_equal "Hi there", emails.first.subject + # end + # + # source://actionmailer//lib/action_mailer/test_helper.rb#249 + def capture_emails(&block); end + + # Delivers all enqueued emails. If a block is given, delivers all of the emails + # that were enqueued throughout the duration of the block. If a block is + # not given, delivers all the enqueued emails up to this point in the test. + # + # def test_deliver_enqueued_emails + # deliver_enqueued_emails do + # ContactMailer.welcome.deliver_later + # end + # + # assert_emails 1 + # end + # + # def test_deliver_enqueued_emails_without_block + # ContactMailer.welcome.deliver_later + # + # deliver_enqueued_emails + # + # assert_emails 1 + # end + # + # If the +:queue+ option is specified, + # then only the emails(s) enqueued to a specific queue will be performed. + # + # def test_deliver_enqueued_emails_with_queue + # deliver_enqueued_emails queue: :external_mailers do + # CustomerMailer.deliver_later_queue_name = :external_mailers + # CustomerMailer.welcome.deliver_later # will be performed + # EmployeeMailer.deliver_later_queue_name = :internal_mailers + # EmployeeMailer.welcome.deliver_later # will not be performed + # end + # + # assert_emails 1 + # end + # + # If the +:at+ option is specified, then only delivers emails enqueued to deliver + # immediately or before the given time. + # + # source://actionmailer//lib/action_mailer/test_helper.rb#231 + def deliver_enqueued_emails(queue: T.unsafe(nil), at: T.unsafe(nil), &block); end + + private + + # source://actionmailer//lib/action_mailer/test_helper.rb#258 + 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/apps/govquests-api/rails_app/sorbet/rbi/gems/actionpack@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionpack@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..e776a63 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionpack@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,20770 @@ +# 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`. + + +# :markup: markdown +# +# source://actionpack//lib/abstract_controller/deprecator.rb#5 +module AbstractController + extend ::ActiveSupport::Autoload + + class << self + # source://actionpack//lib/abstract_controller/deprecator.rb#6 + def deprecator; end + + # source://actionpack//lib/abstract_controller.rb#27 + def eager_load!; end + end +end + +# Raised when a non-existing controller action is triggered. +# +# source://actionpack//lib/abstract_controller/base.rb#13 +class AbstractController::ActionNotFound < ::StandardError + include ::DidYouMean::Correctable + + # @return [ActionNotFound] a new instance of ActionNotFound + # + # source://actionpack//lib/abstract_controller/base.rb#16 + def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end + + # source://actionpack//lib/abstract_controller/base.rb#14 + def action; end + + # source://actionpack//lib/abstract_controller/base.rb#14 + def controller; end + + # source://actionpack//lib/abstract_controller/base.rb#25 + def corrections; end +end + +# source://actionpack//lib/abstract_controller/asset_paths.rb#6 +module AbstractController::AssetPaths + extend ::ActiveSupport::Concern +end + +# # Abstract Controller Base +# +# AbstractController::Base is a low-level API. Nobody should be using it +# directly, and subclasses (like ActionController::Base) are expected to provide +# their own `render` method, since rendering means 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#37 +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#172 + def action_methods; end + + # Returns the name of the action this controller is processing. + # + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def action_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + 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#187 + def available_action?(action_name); end + + # Delegates to the class's ::controller_path. + # + # source://actionpack//lib/abstract_controller/base.rb#167 + def controller_path; end + + # Returns the formats that can be processed by the controller. + # + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def formats; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def formats=(_arg0); end + + # source://actionpack//lib/abstract_controller/base.rb#204 + 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#193 + 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#154 + def process(action, *_arg1, **_arg2, &_arg3); end + + # Returns the body of the HTTP response sent by the controller. + # + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def response_body; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + 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#258 + 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#238 + 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#295 + 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#215 + 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#286 + 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#225 + def process_action(*_arg0, **_arg1, &_arg2); end + + class << self + # Returns the value of attribute abstract. + # + # source://actionpack//lib/abstract_controller/base.rb#54 + def abstract; end + + # Define a controller as abstract. See internal_methods for more details. + # + # source://actionpack//lib/abstract_controller/base.rb#58 + def abstract!; end + + # Returns the value of attribute abstract. + # + # source://actionpack//lib/abstract_controller/base.rb#54 + 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#97 + 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#112 + 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#127 + def controller_path; end + + # source://actionpack//lib/abstract_controller/base.rb#137 + def eager_load!; end + + # source://actionpack//lib/abstract_controller/base.rb#62 + 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#77 + def internal_methods; end + + # Refresh the cached action_methods when a new action_method is added. + # + # source://actionpack//lib/abstract_controller/base.rb#132 + 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#200 + def supports_path?; end + end +end + +# source://actionpack//lib/abstract_controller/caching.rb#6 +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#54 + def view_cache_dependencies; end + + private + + # Convenience accessor. + # + # source://actionpack//lib/abstract_controller/caching.rb#60 + 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#48 +module AbstractController::Caching::ClassMethods + # source://actionpack//lib/abstract_controller/caching.rb#49 + def view_cache_dependency(&dependency); end +end + +# source://actionpack//lib/abstract_controller/caching.rb#14 +module AbstractController::Caching::ConfigMethods + # source://actionpack//lib/abstract_controller/caching.rb#15 + def cache_store; end + + # source://actionpack//lib/abstract_controller/caching.rb#19 + def cache_store=(store); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/caching.rb#24 + def cache_configured?; end +end + +# # Abstract Controller Caching Fragments +# +# Fragment caching is used for caching various blocks within views without +# caching the entire action as a whole. This is useful when certain elements of +# an action change frequently or 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#21 +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#131 + 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#144 + 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#38 +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#58 + 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` +# +# 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#259 + def process_action(*_arg0, **_arg1, &_arg2); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://actionpack//lib/abstract_controller/callbacks.rb#39 +class AbstractController::Callbacks::ActionFilter + # @return [ActionFilter] a new instance of ActionFilter + # + # source://actionpack//lib/abstract_controller/callbacks.rb#40 + def initialize(filters, conditional_key, actions); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#46 + def after(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#46 + def around(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#46 + def before(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#46 + def match?(controller); end +end + +# source://actionpack//lib/abstract_controller/callbacks.rb#74 +module AbstractController::Callbacks::ClassMethods + # Take callback names and an optional callback proc, normalize them, then call + # the block with each callback. This allows us to abstract 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#120 + def _insert_callbacks(callbacks, block = T.unsafe(nil)); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#98 + 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#93 + def _normalize_callback_options(options); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def append_after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def append_around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def append_before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#231 + def before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#237 + def prepend_after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#237 + def prepend_around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#237 + def prepend_before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#245 + def skip_after_action(*names); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#245 + def skip_around_action(*names); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#245 + def skip_before_action(*names); end +end + +# source://actionpack//lib/abstract_controller/collector.rb#8 +module AbstractController::Collector + # source://actionpack//lib/abstract_controller/collector.rb#12 + def atom(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def bmp(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def css(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def csv(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def gif(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def gzip(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def html(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def ics(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def jpeg(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def js(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def json(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def m4a(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def mp3(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def mp4(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def mpeg(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def multipart_form(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def ogg(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def otf(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def pdf(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def png(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def rss(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def svg(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def text(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def tiff(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def ttf(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def url_encoded_form(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def vcf(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def vtt(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def webm(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def webp(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def woff(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def woff2(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def xml(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def yaml(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/collector.rb#12 + def zip(*_arg0, **_arg1, &_arg2); end + + private + + # source://actionpack//lib/abstract_controller/collector.rb#27 + def method_missing(symbol, *_arg1, **_arg2, &_arg3); end + + class << self + # source://actionpack//lib/abstract_controller/collector.rb#9 + def generate_method_for_mime(mime); end + end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#11 +class AbstractController::DoubleRenderError < ::AbstractController::Error + # @return [DoubleRenderError] a new instance of DoubleRenderError + # + # source://actionpack//lib/abstract_controller/rendering.rb#14 + def initialize(message = T.unsafe(nil)); end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#12 +AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/abstract_controller/error.rb#6 +class AbstractController::Error < ::StandardError; end + +# source://actionpack//lib/abstract_controller/helpers.rb#9 +module AbstractController::Helpers + extend ::ActiveSupport::Concern + extend ::AbstractController::Helpers::Resolution + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + + # source://actionpack//lib/abstract_controller/helpers.rb#28 + 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#64 +module AbstractController::Helpers::ClassMethods + include ::AbstractController::Helpers::Resolution + + # Sets the attribute _helpers + # + # @param value the value to set the attribute _helpers to. + # + # source://actionpack//lib/abstract_controller/helpers.rb#76 + def _helpers=(_arg0); end + + # source://actionpack//lib/abstract_controller/helpers.rb#216 + 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#207 + 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#196 + 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? + # + # private + # def current_user + # @current_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#126 + 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#68 + def inherited(klass); end + + private + + # source://actionpack//lib/abstract_controller/helpers.rb#235 + def default_helper_module!; end + + # source://actionpack//lib/abstract_controller/helpers.rb#224 + def define_helpers_module(klass, helpers = T.unsafe(nil)); end +end + +# source://actionpack//lib/abstract_controller/helpers.rb#32 +module AbstractController::Helpers::Resolution + # source://actionpack//lib/abstract_controller/helpers.rb#48 + def all_helpers_from_path(path); end + + # source://actionpack//lib/abstract_controller/helpers.rb#57 + def helper_modules_from_paths(paths); end + + # source://actionpack//lib/abstract_controller/helpers.rb#33 + def modules_for_helpers(modules_or_helper_prefixes); end +end + +# source://actionpack//lib/abstract_controller/logger.rb#8 +module AbstractController::Logger + extend ::ActiveSupport::Concern + include ::ActiveSupport::Benchmarkable +end + +# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#8 +module AbstractController::Railties; end + +# source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#9 +module AbstractController::Railties::RoutesHelpers + class << self + # source://actionpack//lib/abstract_controller/railties/routes_helpers.rb#10 + def with(routes, include_path_helpers = T.unsafe(nil)); end + end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#19 +module AbstractController::Rendering + extend ::ActiveSupport::Concern + include ::ActionView::ViewPaths + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + + # Normalizes arguments and options, and then delegates to render_to_body and + # sticks the result in `self.response_body`. + # + # Supported options depend on the underlying `render_to_body` implementation. + # + # source://actionpack//lib/abstract_controller/rendering.rb#27 + 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 + + # Similar to #render, but only returns the rendered template as a string, + # instead of setting `self.response_body`. + # + # 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#74 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Normalize options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#89 + def _normalize_options(options); end + + # Normalize args and options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#115 + def _normalize_render(*args, &block); end + + # Process the rendered format. + # + # source://actionpack//lib/abstract_controller/rendering.rb#99 + def _process_format(format); end + + # Process extra options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#94 + def _process_options(options); end + + # source://actionpack//lib/abstract_controller/rendering.rb#102 + def _process_variant(options); end + + # source://actionpack//lib/abstract_controller/rendering.rb#122 + def _protected_ivars; end + + # source://actionpack//lib/abstract_controller/rendering.rb#105 + def _set_html_content_type; end + + # source://actionpack//lib/abstract_controller/rendering.rb#111 + def _set_rendered_content_type(format); end + + # source://actionpack//lib/abstract_controller/rendering.rb#108 + 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#8 +module AbstractController::Translation + # Delegates to `I18n.localize`. + # + # source://actionpack//lib/abstract_controller/translation.rb#37 + def l(object, **options); end + + # Delegates to `I18n.localize`. + # + # source://actionpack//lib/abstract_controller/translation.rb#37 + def localize(object, **options); end + + # Delegates to `I18n.translate`. + # + # 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`. + # + # 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 +end + +# # URL For +# +# Includes `url_for` into the host class (e.g. an abstract controller or +# mailer). The class has to provide a `RouteSet` by implementing the `_routes` +# methods. Otherwise, an exception will be raised. +# +# 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#14 +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#18 + 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#23 +module AbstractController::UrlFor::ClassMethods + # source://actionpack//lib/abstract_controller/url_for.rb#24 + def _routes; end + + # source://actionpack//lib/abstract_controller/url_for.rb#28 + def action_methods; end +end + +# # Action Controller +# +# Action Controller is a module of Action Pack. +# +# Action Controller provides a base controller class that can be subclassed to +# implement filters and actions to handle requests. The result of an action is +# typically content generated from views. +# +# source://actionpack//lib/action_controller/deprecator.rb#5 +module ActionController + extend ::ActiveSupport::Autoload + + class << self + # See Renderers.add + # + # source://actionpack//lib/action_controller/metal/renderers.rb#9 + def add_renderer(key, &block); end + + # source://actionpack//lib/action_controller/deprecator.rb#6 + def deprecator; end + + # See Renderers.remove + # + # source://actionpack//lib/action_controller/metal/renderers.rb#14 + def remove_renderer(key); end + end +end + +# # Action Controller API +# +# API Controller is a lightweight version of ActionController::Base, created for +# applications that don't require all functionalities that a complete Rails +# controller provides, allowing you to create controllers with just the 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#92 +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::RateLimiting + include ::ActionController::Caching + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching + 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::RateLimiting::ClassMethods + extend ::AbstractController::Caching::Fragments::ClassMethods + extend ::AbstractController::Caching::ClassMethods + extend ::AbstractController::Caching::ConfigMethods + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _process_action_callbacks; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_process_action_callbacks(&block); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies; end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys; end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _process_action_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _process_action_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _renderers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _view_cache_dependencies; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _wrapper_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etaggers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def fragment_cache_keys; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + 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#107 + def without_modules(*modules); end + end +end + +# source://actionpack//lib/action_controller/api.rb#115 +ActionController::API::MODULES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/exceptions.rb#6 +class ActionController::ActionControllerError < ::StandardError; end + +# source://actionpack//lib/action_controller/metal/allow_browser.rb#6 +module ActionController::AllowBrowser + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::AllowBrowser::ClassMethods + + private + + # source://actionpack//lib/action_controller/metal/allow_browser.rb#53 + def allow_browser(versions:, block:); end +end + +# source://actionpack//lib/action_controller/metal/allow_browser.rb#63 +class ActionController::AllowBrowser::BrowserBlocker + # @return [BrowserBlocker] a new instance of BrowserBlocker + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#70 + def initialize(request, versions:); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#74 + def blocked?; end + + # Returns the value of attribute request. + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#68 + def request; end + + # Returns the value of attribute versions. + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#68 + def versions; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#95 + def bot?; end + + # source://actionpack//lib/action_controller/metal/allow_browser.rb#111 + def expanded_versions; end + + # source://actionpack//lib/action_controller/metal/allow_browser.rb#107 + def minimum_browser_version_for_browser; end + + # source://actionpack//lib/action_controller/metal/allow_browser.rb#115 + def normalized_browser_name; end + + # source://actionpack//lib/action_controller/metal/allow_browser.rb#79 + def parsed_user_agent; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#87 + def unsupported_browser?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#83 + def user_agent_version_reported?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#99 + def version_below_minimum_required?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#91 + def version_guarded_browser?; end +end + +# source://actionpack//lib/action_controller/metal/allow_browser.rb#64 +ActionController::AllowBrowser::BrowserBlocker::SETS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/metal/allow_browser.rb#9 +module ActionController::AllowBrowser::ClassMethods + # Specify the browser versions that will be allowed to access all actions (or + # some, as limited by `only:` or `except:`). Only browsers matched in the hash + # or named set passed to `versions:` will be blocked if they're below the + # versions specified. This means that all other browsers, as well as agents that + # aren't reporting a user-agent header, will be allowed access. + # + # A browser that's blocked will by default be served the file in + # public/406-unsupported-browser.html with a HTTP status code of "406 Not + # Acceptable". + # + # In addition to specifically named browser versions, you can also pass + # `:modern` as the set to restrict support to browsers natively supporting webp + # images, web push, badges, import maps, CSS nesting, and CSS :has. This + # includes Safari 17.2+, Chrome 120+, Firefox 121+, Opera 106+. + # + # You can use https://caniuse.com to check for browser versions supporting the + # features you use. + # + # You can use `ActiveSupport::Notifications` to subscribe to events of browsers + # being blocked using the `browser_block.action_controller` event name. + # + # Examples: + # + # class ApplicationController < ActionController::Base + # # Allow only browsers natively supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has + # allow_browser versions: :modern + # end + # + # class ApplicationController < ActionController::Base + # # All versions of Chrome and Opera will be allowed, but no versions of "internet explorer" (ie). Safari needs to be 16.4+ and Firefox 121+. + # allow_browser versions: { safari: 16.4, firefox: 121, ie: false } + # end + # + # class MessagesController < ApplicationController + # # In addition to the browsers blocked by ApplicationController, also block Opera below 104 and Chrome below 119 for the show action. + # allow_browser versions: { opera: 104, chrome: 119 }, only: :show + # end + # + # source://actionpack//lib/action_controller/metal/allow_browser.rb#47 + def allow_browser(versions:, block: T.unsafe(nil), **options); end +end + +# source://actionpack//lib/action_controller/api/api_rendering.rb#6 +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#13 + def render_to_body(options = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#9 +class ActionController::BadRequest < ::ActionController::ActionControllerError + # @return [BadRequest] a new instance of BadRequest + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#10 + def initialize(msg = T.unsafe(nil)); end +end + +# # Action Controller Base +# +# Action Controllers are the core of a web request in Rails. They are made up of +# one or more actions that are executed on request and then either it renders a +# template or redirects to another action. An action is defined as a public +# method on the controller, which will automatically be made accessible to the +# web-server through Rails Routes. +# +# By default, only the ApplicationController in a Rails application inherits +# from `ActionController::Base`. All other 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 perform only a single render or a single redirect. Attempting 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 +# "return" to halt execution. +# +# def do_something +# if monkeys.nil? +# redirect_to(action: "elsewhere") +# return +# end +# 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#207 +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::RateLimiting + include ::ActionController::AllowBrowser + 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 + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::Resolution + 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::RateLimiting::ClassMethods + extend ::ActionController::AllowBrowser::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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://actionpack//lib/abstract_controller/helpers.rb#13 + def _helper_methods; end + + # source://actionpack//lib/abstract_controller/helpers.rb#13 + def _helper_methods=(_arg0); end + + # source://actionpack//lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _process_action_callbacks; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_process_action_callbacks(&block); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies; end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + 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#38 + def alert; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def allow_forgery_protection; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def allow_forgery_protection=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def assets_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_asset_host_protocol=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest; end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest=(_arg0); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest?; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://actionpack//lib/action_controller/metal/flash.rb#12 + def flash(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_origin_check; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_origin_check=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_strategy=(value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys; end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#70 + def helpers_path; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#70 + def helpers_path=(_arg0); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#70 + def helpers_path?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#71 + def include_all_helpers; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#71 + def include_all_helpers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#71 + def include_all_helpers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def log_warning_on_csrf_failure; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://actionpack//lib/action_controller/metal/flash.rb#38 + def notice; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def per_form_csrf_tokens; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def per_form_csrf_tokens=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def request_forgery_protection_token; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def request_forgery_protection_token=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://actionpack//lib/action_controller/base.rb#324 + def _protected_ivars; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _default_form_builder; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end + + # source://actionpack//lib/action_controller/form_builder.rb#35 + def _default_form_builder?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _flash_types; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _flash_types=(new_value); end + + # source://actionpack//lib/action_controller/metal/flash.rb#10 + def _flash_types?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _helper_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://actionpack//lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionpack//lib/abstract_controller/helpers.rb#17 + def _helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#211 + def _layout?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _process_action_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _process_action_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _renderers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _view_cache_dependencies; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end + + # source://actionpack//lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _wrapper_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def allow_forgery_protection; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def allow_forgery_protection=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def assets_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_asset_host_protocol=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etag_with_template_digest; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etaggers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_origin_check; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_origin_check=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def fragment_cache_keys; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def helpers_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def helpers_path=(new_value); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#70 + def helpers_path?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def include_all_helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def include_all_helpers=(new_value); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#71 + def include_all_helpers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def log_warning_on_csrf_failure; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def per_form_csrf_tokens; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def per_form_csrf_tokens=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack//lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def request_forgery_protection_token; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def request_forgery_protection_token=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); 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#222 + 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 + + # source://actionpack//lib/action_controller/metal/flash.rb#41 + def alert(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#34 + def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#13 + def content_security_policy?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#14 + def content_security_policy_nonce(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/cookies.rb#10 + def cookies(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#102 + def form_authenticity_token(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/flash.rb#41 + def notice(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#103 + def protect_against_forgery?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/abstract_controller/caching.rb#45 + def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end +end + +# source://actionpack//lib/action_controller/base.rb#230 +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#318 +ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#6 +module ActionController::BasicImplicitRender + # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#13 + def default_render; end + + # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#7 + def send_action(method, *args); end +end + +# # Action Controller Caching +# +# Caching is a cheap way of speeding up slow applications by keeping the result +# of calculations, renderings, and database calls around for subsequent +# requests. +# +# 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#29 +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#45 + def instrument_name; end + + # source://actionpack//lib/action_controller/caching.rb#37 + 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#9 +module ActionController::ConditionalGet + include ::ActionController::Head + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + # Sets the `Cache-Control` header, overwriting existing directives. This method + # will also ensure an HTTP `Date` header for client compatibility. + # + # Defaults to issuing the `private` directive, so that intermediate caches must + # not cache the response. + # + # #### Options + # + # `:public` + # : If true, replaces the default `private` directive with the `public` + # directive. + # + # `:must_revalidate` + # : If true, adds the `must-revalidate` directive. + # + # `:stale_while_revalidate` + # : Sets the value of the `stale-while-revalidate` directive. + # + # `:stale_if_error` + # : Sets the value of the `stale-if-error` directive. + # + # `:immutable` + # : If true, adds the `immutable` directive. + # + # + # Any additional key-value pairs are concatenated as directives. For a list of + # supported `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). + # + # #### Examples + # + # expires_in 10.minutes + # # => Cache-Control: max-age=600, private + # + # expires_in 10.minutes, public: true + # # => Cache-Control: max-age=600, public + # + # expires_in 10.minutes, public: true, must_revalidate: true + # # => Cache-Control: max-age=600, public, must-revalidate + # + # expires_in 1.hour, stale_while_revalidate: 60.seconds + # # => Cache-Control: max-age=3600, private, stale-while-revalidate=60 + # + # expires_in 1.hour, stale_if_error: 5.minutes + # # => Cache-Control: max-age=3600, private, stale-if-error=300 + # + # expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true + # # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#290 + 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#309 + 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. + # + # #### Options + # + # `: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 specify an + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches 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 specify an + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches exactly. + # + # : A strong ETag implies exact equality -- the response must match byte for + # byte. This is necessary for serving `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 specify an `If-Modified-Since` header may receive a `304 Not + # Modified` response if `last_modified` <= `If-Modified-Since`. + # + # `:public` + # : By default the `Cache-Control` header is private. Set this option to + # `true` if you want your application to be cacheable by other devices, such + # as proxy caches. + # + # `:cache_control` + # : When given, will overwrite an existing `Cache-Control` header. For a list + # of `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). + # + # `: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. + # + # + # #### Examples + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) + # end + # + # This will send a `304 Not Modified` response if the request specifies a + # matching ETag and `If-Modified-Since` header. Otherwise, it will render the + # `show` template. + # + # You can also just pass a record: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article) + # end + # + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. + # + # You can also pass an object that responds to `maximum`, such as a collection + # of records: + # + # def index + # @articles = Article.all + # fresh_when(@articles) + # end + # + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). + # + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article, public: true, cache_control: { no_cache: true }) + # end + # + # The above will set `Cache-Control: public, no-cache` in the response. + # + # When rendering a different template than the controller/action's default + # template, 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#137 + 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#321 + 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#331 + def no_store; end + + # Sets the `etag` and/or `last_modified` on the response and checks them against + # the request. If the request doesn't match the provided options, it is + # considered stale, and the response should be rendered from scratch. Otherwise, + # it is fresh, and a `304 Not Modified` is sent. + # + # #### Options + # + # See #fresh_when for supported options. + # + # #### Examples + # + # 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: + # + # 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 + # + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. + # + # You can also pass an object that responds to `maximum`, such as a collection + # of records: + # + # def index + # @articles = Article.all + # + # if stale?(@articles) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). + # + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: + # + # 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 + # + # The above will set `Cache-Control: public, no-cache` in the response. + # + # When rendering a different template than the controller/action's default + # template, 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#236 + def stale?(object = T.unsafe(nil), **freshness_kwargs); end + + private + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#336 + 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#18 +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#33 + def etag(&etagger); end +end + +# source://actionpack//lib/action_controller/metal/content_security_policy.rb#6 +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#74 + def content_security_policy?; end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#78 + def content_security_policy_nonce; end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#82 + def current_content_security_policy; end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + 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#17 +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#40 + 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#66 + def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end +end + +# source://actionpack//lib/action_controller/metal/cookies.rb#6 +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#16 + def cookies; end +end + +# # Action Controller Data Streaming +# +# Methods for sending arbitrary data and for streaming files to the browser, +# instead of rendering. +# +# source://actionpack//lib/action_controller/metal/data_streaming.rb#13 +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#120 + 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 + # + # You can use other `Content-*` HTTP headers to provide additional information + # to the client. See MDN for a [list of HTTP + # headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers). + # + # 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 [RFC + # 9111](https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control) for the + # `Cache-Control` header spec. + # + # @raise [MissingFile] + # + # source://actionpack//lib/action_controller/metal/data_streaming.rb#76 + def send_file(path, options = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_controller/metal/data_streaming.rb#125 + def send_file_headers!(options); end +end + +# source://actionpack//lib/action_controller/metal/data_streaming.rb#19 +ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/data_streaming.rb#18 +ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) + +# # Action Controller Default Headers +# +# Allows configuring default headers that will be automatically merged into each +# response. +# +# source://actionpack//lib/action_controller/metal/default_headers.rb#10 +module ActionController::DefaultHeaders + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/default_headers.rb#13 +module ActionController::DefaultHeaders::ClassMethods + # source://actionpack//lib/action_controller/metal/default_headers.rb#14 + def make_response!(request); end +end + +# # Action Controller Etag With Flash +# +# When you're using the flash, it's generally used as a conditional on the view. +# This means the content of the view depends on the flash. Which in turn means +# that the ETag for a response should be computed with the content of the flash +# in mind. This does that by including the content of the flash as a component +# in the ETag that's generated for a response. +# +# source://actionpack//lib/action_controller/metal/etag_with_flash.rb#13 +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 + +# # Action Controller Etag With Template Digest +# +# When our views change, they should bubble up into HTTP cache freshness and +# bust browser caches. So the template digest for the current action is +# automatically included in the ETag. +# +# 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#25 +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#39 + def determine_template_etag(options); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#55 + 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#49 + 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 + +# Raised from `expect!` when an expected parameter is missing or is of an +# incompatible type. +# +# params = ActionController::Parameters.new(a: {}) +# params.expect!(:a) +# # => ActionController::ExpectedParameterMissing: param is missing or the value is empty or invalid: a +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#50 +class ActionController::ExpectedParameterMissing < ::ActionController::ParameterMissing; end + +# source://actionpack//lib/action_controller/metal/flash.rb#6 +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#53 + 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#16 +module ActionController::Flash::ClassMethods + # source://actionpack//lib/action_controller/metal/flash.rb#47 + 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#34 + def add_flash_types(*types); end +end + +# # Action Controller Form Builder +# +# Override the default form builder for all views rendered by this controller +# and any of its descendants. Accepts a subclass of +# ActionView::Helpers::FormBuilder. +# +# 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#31 +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#51 + 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#38 +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#45 + def default_form_builder(builder); end +end + +# source://actionpack//lib/action_controller/metal/head.rb#6 +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#23 + def head(status, options = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/head.rb#56 + def include_content?(status); end +end + +# # Action Controller Helpers +# +# The Rails framework provides a large number of helpers for working with +# assets, dates, forms, numbers and model objects, to name a few. These helpers +# are available to all templates by default. +# +# 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#63 +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#125 + def helpers; end + + class << self + # Returns the value of attribute helpers_path. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#66 + 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#66 + 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#74 +module ActionController::Helpers::ClassMethods + # 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#84 + 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 behavior with capture methods. Consider using + # [helper](rdoc-ref:AbstractController::Helpers::ClassMethods#helper) instead + # when using `capture`. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#94 + 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#112 + 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#119 + def all_application_helpers; end +end + +# HTTP Basic, Digest, and Token authentication. +# +# source://actionpack//lib/action_controller/metal/http_authentication.rb#11 +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#69 +module ActionController::HttpAuthentication::Basic + extend ::ActionController::HttpAuthentication::Basic + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#130 + def auth_param(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#126 + def auth_scheme(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#108 + def authenticate(request, &login_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#138 + def authentication_request(controller, realm, message); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#122 + def decode_credentials(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#134 + def encode_credentials(user_name, password); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#114 + def has_basic_credentials?(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#118 + def user_name_and_password(request); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#72 +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#95 + 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#99 + def authenticate_with_http_basic(&login_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#86 + 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#103 + def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#75 +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#79 + 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#189 +module ActionController::HttpAuthentication::Digest + extend ::ActionController::HttpAuthentication::Digest + + # Returns true on a valid response, false otherwise. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#215 + def authenticate(request, realm, &password_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#274 + def authentication_header(controller, realm); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#281 + def authentication_request(controller, realm, message = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#267 + def decode_credentials(header); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#263 + def decode_credentials_header(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#258 + 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#248 + def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#254 + 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#330 + 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#348 + def opaque(secret_key); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#288 + 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#222 + 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#341 + def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#192 +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#197 + 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#203 + 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#209 + 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#425 +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#472 + 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#558 + 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#542 + 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#507 + 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#522 + def raw_params(auth); end + + # This removes the `"` characters wrapping the value. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#512 + 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#494 + def token_and_options(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#502 + def token_params_from(auth); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#428 +ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#431 +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. For the authentication to be + # considered successful, `login_procedure` must not return a false value. + # Typically, the authenticated user is returned. + # + # See ActionController::HttpAuthentication::Token for example usage. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#438 + 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 the return value of + # `login_procedure` if a token is found. Returns `nil` if no token is found. + # + # See ActionController::HttpAuthentication::Token for example usage. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#446 + 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#452 + def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#426 +ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#427 +ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#516 +ActionController::HttpAuthentication::Token::WHITESPACED_AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) + +# # Action Controller Implicit Render +# +# Handles implicit rendering for a controller action that does not explicitly +# respond with `render`, `respond_to`, `redirect`, or `head`. +# +# 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#33 +module ActionController::ImplicitRender + include ::ActionController::BasicImplicitRender + + # source://actionpack//lib/action_controller/metal/implicit_render.rb#37 + def default_render; end + + # source://actionpack//lib/action_controller/metal/implicit_render.rb#56 + def method_for_action(action_name); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/implicit_render.rb#63 + def interactive_browser_request?; end +end + +# # Action Controller Instrumentation +# +# Adds instrumentation to several ends in ActionController::Base. It also +# provides some hooks related with process_action. This allows an ORM like +# Active Record and/or DataMapper to plug in ActionController and show related +# information. +# +# Check ActiveRecord::Railties::ControllerRuntime for an example. +# +# source://actionpack//lib/action_controller/metal/instrumentation.rb#16 +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#23 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#49 + def redirect_to(*_arg0); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#28 + def render(*_arg0); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#43 + def send_data(data, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#36 + 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#105 + 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#99 + def cleanup_view_runtime; end + + # A hook invoked every time a before callback is halted. + # + # source://actionpack//lib/action_controller/metal/instrumentation.rb#89 + def halted_callback_hook(filter, _); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#59 + def process_action(*_arg0); end +end + +# source://actionpack//lib/action_controller/metal/instrumentation.rb#109 +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#113 + def log_process_action(payload); end +end + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#10 +class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#13 +class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end + +# Raised when initializing Parameters with keys that aren't strings or symbols. +# +# ActionController::Parameters.new(123 => 456) +# # => ActionController::InvalidParameterKey: all keys must be Strings or Symbols, got: Integer +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#85 +class ActionController::InvalidParameterKey < ::ArgumentError; end + +# # Action Controller Live +# +# Mix this module into your controller, and all actions in that controller will +# be able to stream data to the client as it's written. +# +# 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). +# +# Note that Rails includes `Rack::ETag` by default, which will buffer your +# response. As a result, streaming responses may not work properly with Rack +# 2.2.x, and you may need to implement workarounds in your application. You can +# either set the `ETag` or `Last-Modified` response headers or remove +# `Rack::ETag` from the middleware stack to address this issue. +# +# Here's an example of how you can set the `Last-Modified` header if your Rack +# version is 2.2.x: +# +# def stream +# response.headers["Content-Type"] = "text/event-stream" +# response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x +# ... +# end +# +# source://actionpack//lib/action_controller/metal/live.rb#56 +module ActionController::Live + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Live::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#28 + def new_controller_thread; end + + # source://actionpack//lib/action_controller/metal/live.rb#276 + def process(name); end + + # source://actionpack//lib/action_controller/metal/live.rb#326 + 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#355 + def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#389 + def log_error(exception); end + + # Spawn a new thread to serve up the controller in. This is to get around the + # fact that Rack isn't based around IOs and we need to use a thread to stream + # data from the response bodies. Nobody should call this method except in Rails + # internals. Seriously! + # Disable controller / rendering threads in tests. User tests can access the + # database on the main thread, so they could open a txn, then the controller + # thread will open a new connection and try to access data that's only visible + # to the main thread's txn. This is the problem in #23483. + # + # source://actionpack//lib/action_controller/metal/live.rb#377 + def original_new_controller_thread; end + + class << self + # source://actionpack//lib/action_controller/metal/live.rb#385 + def live_thread_pool_executor; end + end +end + +# source://actionpack//lib/action_controller/metal/live.rb#151 +class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer + include ::MonitorMixin + + # @return [Buffer] a new instance of Buffer + # + # source://actionpack//lib/action_controller/metal/live.rb#166 + 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#220 + def abort; end + + # source://actionpack//lib/action_controller/metal/live.rb#239 + 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#208 + 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#231 + 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#164 + 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#164 + def ignore_disconnect=(_arg0); end + + # source://actionpack//lib/action_controller/metal/live.rb#235 + def on_error(&block); end + + # source://actionpack//lib/action_controller/metal/live.rb#180 + 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#200 + def writeln(string); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#255 + def build_queue(queue_size); end + + # source://actionpack//lib/action_controller/metal/live.rb#244 + def each_chunk(&block); end + + class << self + # Returns the value of attribute queue_size. + # + # source://actionpack//lib/action_controller/metal/live.rb#155 + 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#155 + def queue_size=(_arg0); end + end +end + +# source://actionpack//lib/action_controller/metal/live.rb#59 +module ActionController::Live::ClassMethods + # source://actionpack//lib/action_controller/metal/live.rb#60 + def make_response!(request); end +end + +# source://actionpack//lib/action_controller/metal/live.rb#148 +class ActionController::Live::ClientDisconnected < ::RuntimeError; end + +# source://actionpack//lib/action_controller/metal/live.rb#260 +class ActionController::Live::Response < ::ActionDispatch::Response + private + + # source://actionpack//lib/action_controller/metal/live.rb#262 + def before_committed; end + + # source://actionpack//lib/action_controller/metal/live.rb#269 + def build_buffer(response, body); end +end + +# # Action Controller Live Server Sent Events +# +# This class provides the ability to write an SSE (Server Sent Event) to an IO +# stream. The class is initialized with a stream and can be used to either write +# a JSON string or an object which can be converted to JSON. +# +# Writing an object will convert it into standard SSE format with whatever +# options you have configured. You may choose to set the following options: +# +# `:event` +# : If specified, an event with this name will be dispatched on the browser. +# +# `:retry` +# : The reconnection time in milliseconds used when attempting to send the event. +# +# `: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#112 +class ActionController::Live::SSE + # @return [SSE] a new instance of SSE + # + # source://actionpack//lib/action_controller/metal/live.rb#115 + def initialize(stream, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/live.rb#120 + def close; end + + # source://actionpack//lib/action_controller/metal/live.rb#124 + def write(object, options = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#134 + def perform_write(json, options); end +end + +# source://actionpack//lib/action_controller/metal/live.rb#113 +ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/test_case.rb#176 +class ActionController::LiveTestResponse < ::ActionController::Live::Response + # Was there a server-side error? + # + # source://rack/3.1.7/lib/rack/response.rb#187 + def error?; end + + # Was the URL not found? + # + # source://rack/3.1.7/lib/rack/response.rb#197 + def missing?; end + + # Was the response successful? + # + # source://rack/3.1.7/lib/rack/response.rb#184 + def success?; end +end + +# source://actionpack//lib/action_controller/log_subscriber.rb#6 +class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://actionpack//lib/action_controller/log_subscriber.rb#80 + def exist_fragment?(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#80 + def expire_fragment(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#47 + def halted_callback(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#90 + def logger; end + + # source://actionpack//lib/action_controller/log_subscriber.rb#26 + def process_action(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#80 + def read_fragment(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#57 + def redirect_to(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#62 + def send_data(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#52 + def send_file(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#9 + def start_processing(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#67 + def unpermitted_parameters(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#80 + def write_fragment(event); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + end +end + +# source://actionpack//lib/action_controller/log_subscriber.rb#7 +ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/logging.rb#6 +module ActionController::Logging + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Logging::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/logging.rb#9 +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#17 + def log_at(level, **options); end +end + +# # Action Controller Metal +# +# `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 +# +# By default, `ActionController::Metal` provides no utilities for rendering +# views, partials, or other responses aside from some low-level setters such +# as #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#121 +class ActionController::Metal < ::AbstractController::Base + include ::ActionController::Testing::Functional + + # @return [Metal] a new instance of Metal + # + # source://actionpack//lib/action_controller/metal.rb#210 + def initialize; end + + # Delegates to ActionDispatch::Response#content_type + # + # source://actionpack//lib/action_controller/metal.rb#204 + def content_type(*_arg0, **_arg1, &_arg2); end + + # Delegates to ActionDispatch::Response#content_type= + # + # source://actionpack//lib/action_controller/metal.rb#192 + def content_type=(arg); end + + # Delegates to the class's ::controller_name. + # + # source://actionpack//lib/action_controller/metal.rb#156 + def controller_name; end + + # source://actionpack//lib/action_controller/metal.rb#249 + def dispatch(name, request, response); end + + # Delegates to ActionDispatch::Response#headers. + # + # source://actionpack//lib/action_controller/metal.rb#180 + def headers(*_arg0, **_arg1, &_arg2); end + + # Delegates to ActionDispatch::Response#location + # + # source://actionpack//lib/action_controller/metal.rb#200 + def location(*_arg0, **_arg1, &_arg2); end + + # Delegates to ActionDispatch::Response#location= + # + # source://actionpack//lib/action_controller/metal.rb#188 + def location=(arg); end + + # Delegates to ActionDispatch::Response#media_type + # + # source://actionpack//lib/action_controller/metal.rb#208 + def media_type(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#288 + def middleware_stack; end + + # source://actionpack//lib/action_controller/metal.rb#288 + def middleware_stack=(_arg0); end + + # source://actionpack//lib/action_controller/metal.rb#288 + def middleware_stack?; end + + # source://actionpack//lib/action_controller/metal.rb#219 + def params; end + + # source://actionpack//lib/action_controller/metal.rb#223 + def params=(val); end + + # Tests if render or redirect has already happened. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal.rb#245 + def performed?; end + + # :attr_reader: request + # + # The ActionDispatch::Request instance for the current request. + # + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def request; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def request=(_arg0); end + + # source://actionpack//lib/action_controller/metal.rb#284 + def reset_session; end + + # :attr_reader: response + # + # The ActionDispatch::Response instance for the current response. + # + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def response; end + + # Assign the response and mark it as committed. No further processing will + # occur. + # + # source://actionpack//lib/action_controller/metal.rb#268 + def response=(response); end + + # source://actionpack//lib/action_controller/metal.rb#234 + def response_body=(body); end + + # Delegates to ActionDispatch::Response#status + # + # source://actionpack//lib/action_controller/metal.rb#196 + def response_code(*_arg0, **_arg1, &_arg2); end + + # The ActionDispatch::Request::Session instance for the current request. + # See further details in the + # [Active Controller Session guide](https://guides.rubyonrails.org/action_controller_overview.html#session). + # + # source://actionpack//lib/action_controller/metal.rb#176 + def session(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#275 + def set_request!(request); end + + # source://actionpack//lib/action_controller/metal.rb#257 + def set_response!(response); end + + # Delegates to ActionDispatch::Response#status + # + # source://actionpack//lib/action_controller/metal.rb#196 + def status(*_arg0, **_arg1, &_arg2); end + + # Delegates to ActionDispatch::Response#status= + # + # source://actionpack//lib/action_controller/metal.rb#184 + def status=(arg); end + + # source://actionpack//lib/action_controller/metal.rb#280 + def to_a; end + + # Basic `url_for` that can be overridden for more robust functionality. + # + # source://actionpack//lib/action_controller/metal.rb#230 + def url_for(string); end + + class << self + # Returns a Rack endpoint for the given action name. + # + # source://actionpack//lib/action_controller/metal.rb#315 + def action(name); end + + # source://actionpack//lib/action_controller/metal.rb#140 + def action_encoding_template(action); end + + # Returns the last part of the controller's name, underscored, without the + # ending `Controller`. For instance, `PostsController` returns `posts`. + # Namespaces are left out, so `Admin::PostsController` returns `posts` as well. + # + # #### Returns + # * `string` + # + # source://actionpack//lib/action_controller/metal.rb#130 + def controller_name; end + + # Direct dispatch to the controller. Instantiates the controller, then executes + # the action named `name`. + # + # source://actionpack//lib/action_controller/metal.rb#331 + def dispatch(name, req, res); end + + # source://actionpack//lib/action_controller/metal.rb#134 + def make_response!(request); end + + # The middleware stack used by this controller. + # + # By default uses a variation of ActionDispatch::MiddlewareStack which allows + # for the following syntax: + # + # class PostsController < ApplicationController + # use AuthenticationMiddleware, except: [:index, :show] + # end + # + # Read more about [Rails middleware stack] + # (https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) + # in the guides. + # + # source://actionpack//lib/action_controller/metal.rb#310 + def middleware; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://actionpack//lib/action_controller/metal.rb#288 + 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#293 + def use(*_arg0, **_arg1, &_arg2); end + + private + + # @private + # + # source://actionpack//lib/action_controller/metal.rb#146 + def inherited(subclass); end + end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#52 +class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError + # @return [MethodNotAllowed] a new instance of MethodNotAllowed + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#53 + def initialize(*allowed_methods); end +end + +# # Action Controller MiddlewareStack +# +# Extend ActionDispatch middleware stack to make it aware of options allowing +# the following syntax in controllers: +# +# class PostsController < ApplicationController +# use AuthenticationMiddleware, except: [:index, :show] +# end +# +# source://actionpack//lib/action_controller/metal.rb#18 +class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack + # source://actionpack//lib/action_controller/metal.rb#31 + def build(action, app = T.unsafe(nil), &block); end + + private + + # source://actionpack//lib/action_controller/metal.rb#44 + def build_middleware(klass, args, block); end +end + +# source://actionpack//lib/action_controller/metal.rb#41 +ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal.rb#40 +ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal.rb#19 +class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_controller/metal.rb#20 + def initialize(klass, args, actions, strategy, block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal.rb#26 + def valid?(action); end +end + +# source://actionpack//lib/action_controller/metal.rb#42 +ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal/mime_responds.rb#8 +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#211 + 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#251 +class ActionController::MimeResponds::Collector + include ::AbstractController::Collector + + # @return [Collector] a new instance of Collector + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#255 + def initialize(mimes, variant = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#262 + def all(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#262 + def any(*args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#280 + def any_response?; end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#271 + def custom(mime_type, &block); end + + # Returns the value of attribute format. + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 + 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#253 + def format=(_arg0); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#297 + def negotiate_format(request); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#284 + def response; end +end + +# source://actionpack//lib/action_controller/metal/mime_responds.rb#301 +class ActionController::MimeResponds::Collector::VariantCollector + # @return [VariantCollector] a new instance of VariantCollector + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#302 + def initialize(variant = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#307 + def all(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#307 + def any(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#318 + def method_missing(name, *_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#322 + def variant; end + + private + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#331 + def variant_key; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#96 +class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat + # @return [MissingExactTemplate] a new instance of MissingExactTemplate + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#99 + def initialize(message, controller, action_name); end + + # Returns the value of attribute action_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#97 + def action_name; end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#97 + def controller; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#61 +class ActionController::MissingFile < ::ActionController::ActionControllerError; end + +# See `Responder#api_behavior` +# +# source://actionpack//lib/action_controller/metal/renderers.rb#19 +class ActionController::MissingRenderer < ::LoadError + # @return [MissingRenderer] a new instance of MissingRenderer + # + # source://actionpack//lib/action_controller/metal/renderers.rb#20 + def initialize(format); end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#58 +class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end + +# Specify binary encoding for parameters for a given action. +# +# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#7 +module ActionController::ParameterEncoding + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#10 +module ActionController::ParameterEncoding::ClassMethods + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#20 + def action_encoding_template(action); end + + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#11 + 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#79 + def param_encoding(action, param, encoding); end + + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#16 + 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#50 + 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 or invalid: b +# params.require(:a) +# # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a +# params.expect(a: []) +# # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#26 +class ActionController::ParameterMissing < ::KeyError + # @return [ParameterMissing] a new instance of ParameterMissing + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#29 + def initialize(param, keys = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#38 + def corrections; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#27 + def keys; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#27 + 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 methods for filtering and requiring params: +# +# * `expect` to safely permit and require parameters in one step. +# * `permit` to filter params for mass assignment. +# * `require` to require a parameter or raise an error. +# +# params = ActionController::Parameters.new({ +# person: { +# name: "Francesco", +# age: 22, +# role: "admin" +# } +# }) +# +# permitted = params.expect(person: [:name, :age]) +# permitted # => #"Francesco", "age"=>22} permitted: true> +# +# Person.first.update!(permitted) +# # => # +# +# Paramaters provides two options that control 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 an 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#159 +class ActionController::Parameters + include ::ActiveSupport::DeepMergeable + + # Returns a new `ActionController::Parameters` instance. 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#300 + 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#314 + 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#810 + 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#816 + def []=(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#262 + def always_permitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#262 + def always_permitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def as_json(*_arg0, **_arg1, &_arg2); end + + # Returns a new `ActionController::Parameters` instance with `nil` values + # removed. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#987 + 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#993 + def compact!; end + + # Returns a new `ActionController::Parameters` instance without the blank + # values. Uses Object#blank? for determining if a value is blank. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#999 + 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#1005 + 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#448 + def converted_arrays; end + + # Returns a duplicate `ActionController::Parameters` instance with the same + # permitted parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1105 + def deep_dup; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1040 + def deep_merge?(other_hash); end + + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every key. This includes the keys from the root hash + # and from all nested hashes and arrays. The values are unchanged. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#937 + def deep_transform_keys(&block); end + + # Returns the same `ActionController::Parameters` instance with changed keys. + # This includes the keys from the root hash and from all nested hashes and + # arrays. The values are unchanged. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#946 + 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). This method is similar to #extract!, which returns the + # corresponding `ActionController::Parameters` object. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#955 + 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#979 + 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#854 + 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#415 + def each(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + 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#415 + 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#427 + def each_value(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1099 + def encode_with(coder); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#322 + 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#882 + def except(*keys); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def exclude?(*_arg0, **_arg1, &_arg2); end + + # `expect` is the preferred way to require and permit parameters. + # It is safer than the previous recommendation to call `permit` and `require` + # in sequence, which could allow user triggered 500 errors. + # + # `expect` is more strict with types to avoid a number of potential pitfalls + # that may be encountered with the `.require.permit` pattern. + # + # For example: + # + # params = ActionController::Parameters.new(comment: { text: "hello" }) + # params.expect(comment: [:text]) + # # => # + # + # params = ActionController::Parameters.new(comment: [{ text: "hello" }, { text: "world" }]) + # params.expect(comment: [:text]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: comment + # + # In order to permit an array of parameters, the array must be defined + # explicitly. Use double array brackets, an array inside an array, to + # declare that an array of parameters is expected. + # + # params = ActionController::Parameters.new(comments: [{ text: "hello" }, { text: "world" }]) + # params.expect(comments: [[:text]]) + # # => [# "hello" } permitted: true>, + # # # "world" } permitted: true>] + # + # params = ActionController::Parameters.new(comments: { text: "hello" }) + # params.expect(comments: [[:text]]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: comments + # + # `expect` is intended to protect against array tampering. + # + # params = ActionController::Parameters.new(user: "hack") + # # The previous way of requiring and permitting parameters will error + # params.require(:user).permit(:name, pets: [:name]) # wrong + # # => NoMethodError: undefined method `permit' for an instance of String + # + # # similarly with nested parameters + # params = ActionController::Parameters.new(user: { name: "Martin", pets: { name: "hack" } }) + # user_params = params.require(:user).permit(:name, pets: [:name]) # wrong + # # user_params[:pets] is expected to be an array but is a hash + # + # `expect` solves this by being more strict with types. + # + # params = ActionController::Parameters.new(user: "hack") + # params.expect(user: [ :name, pets: [[:name]] ]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: user + # + # # with nested parameters + # params = ActionController::Parameters.new(user: { name: "Martin", pets: { name: "hack" } }) + # user_params = params.expect(user: [:name, pets: [[:name]] ]) + # user_params[:pets] # => nil + # + # As the examples show, `expect` requires the `:user` key, and any root keys + # similar to the `.require.permit` pattern. If multiple root keys are + # expected, they will all be required. + # + # params = ActionController::Parameters.new(name: "Martin", pies: [{ type: "dessert", flavor: "pumpkin"}]) + # name, pies = params.expect(:name, pies: [[:type, :flavor]]) + # name # => "Martin" + # pies # => [#"dessert", "flavor"=>"pumpkin"} permitted: true>] + # + # When called with a hash with multiple keys, `expect` will permit the + # parameters and require the keys in the order they are given in the hash, + # returning an array of the permitted parameters. + # + # params = ActionController::Parameters.new(subject: { name: "Martin" }, object: { pie: "pumpkin" }) + # subject, object = params.expect(subject: [:name], object: [:pie]) + # subject # => #"Martin"} permitted: true> + # object # => #"pumpkin"} permitted: true> + # + # Besides being more strict about array vs hash params, `expect` uses permit + # internally, so it will behave similarly. + # + # params = ActionController::Parameters.new({ + # person: { + # name: "Francesco", + # age: 22, + # pets: [{ + # name: "Purplish", + # category: "dogs" + # }] + # } + # }) + # + # permitted = params.expect(person: [ :name, { pets: [[:name]] } ]) + # permitted.permitted? # => true + # permitted[:name] # => "Francesco" + # permitted[:age] # => nil + # permitted[:pets][0][:name] # => "Purplish" + # permitted[:pets][0][:category] # => nil + # + # An array of permitted scalars may be expected with the following: + # + # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) + # permitted = params.expect(tags: []) + # permitted.permitted? # => true + # permitted.is_a?(Array) # => true + # permitted.size # => 2 + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#785 + def expect(*filters); end + + # Same as `expect`, but raises an `ActionController::ExpectedParameterMissing` + # instead of `ActionController::ParameterMissing`. Unlike `expect` which + # will render a 400 response, `expect!` will raise an exception that is + # not handled. This is intended for debugging invalid params for an + # internal API where incorrectly formatted params would indicate a bug + # in a client library that should be fixed. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#799 + def expect!(*filters); 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#892 + def extract!(*keys); end + + # Returns parameter value for the given `key` separated by `delimiter`. + # + # params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails") + # params.extract_value(:id) # => ["1", "123"] + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails"] + # params.extract_value(:non_existent_key) # => nil + # + # Note that if the given `key`'s value contains blank elements, then the + # returned array will include empty strings. + # + # params = ActionController::Parameters.new(tags: "ruby,rails,,web") + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails", "", "web"] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1123 + def extract_value(key, delimiter: T.unsafe(nil)); end + + # Returns a parameter for the given `key`. If the `key` can't be found, there + # are several options: With no other arguments, it will raise an + # ActionController::ParameterMissing error; 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 or invalid: none + # params.fetch(:none, {}) # => # + # params.fetch(:none, "Francesco") # => "Francesco" + # params.fetch(:none) { "Francesco" } # => "Francesco" + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#833 + def fetch(key, *args); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def has_key?(*_arg0, **_arg1, &_arg2); end + + # Returns true if the given value is present for some key in the parameters. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1010 + def has_value?(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#328 + def hash; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def include?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1081 + def init_with(coder); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1068 + 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#966 + def keep_if(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def key?(*_arg0, **_arg1, &_arg2); end + + # :method: to_s + # + # :call-seq: + # to_s() + # + # Returns the content of the parameters as a string. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + def member?(*_arg0, **_arg1, &_arg2); end + + # Returns a new `ActionController::Parameters` instance with all keys from + # `other_hash` merged into current hash. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1024 + def merge(other_hash); end + + # :call-seq: merge!(other_hash) + # + # Returns the current `ActionController::Parameters` instance with `other_hash` + # merged into current hash. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1035 + def merge!(other_hash, &block); 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(name: "Francesco", age: 22, role: "admin") + # permitted = params.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: + # + # 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 + # + # This has the added benefit of rejecting user-modified inputs that send a + # string when a hash is expected. + # + # When followed by `require`, you can both filter and require parameters + # following the typical pattern of a Rails form. The `expect` method was + # made specifically for this use case and is the recommended way to require + # and permit parameters. + # + # permitted = params.expect(person: [:name, :age]) + # + # When using `permit` and `require` separately, pay careful attention to the + # order of the method calls. + # + # params = ActionController::Parameters.new(person: { name: "Martin", age: 40, role: "admin" }) + # permitted = params.permit(person: [:name, :age]).require(:person) # correct + # + # When require is used first, it is possible for users of your application to + # trigger a NoMethodError when the user, for example, sends a string for :person. + # + # params = ActionController::Parameters.new(person: "tampered") + # permitted = params.require(:person).permit(:name, :age) # not recommended + # # => NoMethodError: undefined method `permit' for an instance of String + # + # 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.permit(person: :contact).require(:person) + # # => # + # + # params.permit(person: { contact: :phone }).require(:person) + # # => ##"555-1234"} permitted: true>} permitted: true> + # + # params.permit(person: { contact: [ :email, :phone ] }).require(:person) + # # => ##"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#681 + 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#474 + 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#458 + def permitted?; end + + # Returns a new `ActionController::Parameters` instance with items that the + # block evaluates to true removed. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#974 + def reject(&block); end + + # Removes items that the block evaluates to true and returns self. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#979 + 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 or invalid: person + # + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person + # + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person + # + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: 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 or invalid: user + # + # This method is not recommended for fetching terminal values because it does + # not permit the values. For example, this can cause problems: + # + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL + # + # It is recommended to use `expect` instead: + # + # def person_params + # # params.expect(person: :name).require(:name) + # end + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#532 + 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 or invalid: person + # + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person + # + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person + # + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: 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 or invalid: user + # + # This method is not recommended for fetching terminal values because it does + # not permit the values. For example, this can cause problems: + # + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL + # + # It is recommended to use `expect` instead: + # + # def person_params + # # params.expect(person: :name).require(:name) + # end + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#532 + def required(key); end + + # Returns a new `ActionController::Parameters` instance with all keys from + # current hash merged into `other_hash`. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1046 + def reverse_merge(other_hash); end + + # Returns the current `ActionController::Parameters` instance with current hash + # merged into `other_hash`. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1055 + def reverse_merge!(other_hash); end + + # Returns a new `ActionController::Parameters` instance with only items that the + # block evaluates to true. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#961 + 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#966 + 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#865 + def slice(*keys); end + + # Returns the current `ActionController::Parameters` instance which contains + # only the given `keys`. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#871 + 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#1064 + 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#344 + def to_h(&block); 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#364 + 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. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#394 + 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. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#394 + def to_query(*args); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#249 + 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#408 + 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#408 + 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#919 + def transform_keys(&block); end + + # Performs keys transformation and returns the altered + # `ActionController::Parameters` instance. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#928 + def transform_keys!(&block); end + + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every value. The keys are unchanged. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.transform_values { |x| x * 2 } + # # => #2, "b"=>4, "c"=>6} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#902 + def transform_values; end + + # Performs values transformation and returns the altered + # `ActionController::Parameters` instance. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#911 + def transform_values!; end + + # Returns true if the given value is present for some key in the parameters. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1010 + def value?(value); end + + # Returns a new array of the values of the parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#437 + def values; 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#1018 + def values_at(*keys); end + + # Returns a new `ActionController::Parameters` instance with all keys from + # current hash merged into `other_hash`. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1046 + def with_defaults(other_hash); end + + # Returns the current `ActionController::Parameters` instance with current hash + # merged into `other_hash`. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1055 + def with_defaults!(other_hash); end + + # Returns a new `ActionController::Parameters` instance that filters out the + # given `keys`. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#882 + def without(*keys); end + + protected + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1136 + def each_nested_attribute; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1132 + def nested_attributes?; end + + # Returns the value of attribute parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1128 + def parameters; end + + # Filters self and optionally checks for unpermitted keys + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1143 + def permit_filters(filters, on_unpermitted: T.unsafe(nil), explicit_arrays: T.unsafe(nil)); end + + # Sets the attribute permitted + # + # @param value the value to set the attribute permitted to. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1130 + def permitted=(_arg0); end + + private + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1205 + def _deep_transform_keys_in_object(object, &block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1224 + def _deep_transform_keys_in_object!(object, &block); end + + # When an array is expected, you must specify an array explicitly + # using the following format: + # + # params.expect(comments: [[:flavor]]) + # + # Which will match only the following array formats: + # + # { pies: [{ flavor: "rhubarb" }, { flavor: "apple" }] } + # { pies: { "0" => { flavor: "key lime" }, "1" => { flavor: "mince" } } } + # + # When using `permit`, arrays are specified the same way as hashes: + # + # params.expect(pies: [:flavor]) + # + # In this case, `permit` would also allow matching with a hash (or vice versa): + # + # { pies: { flavor: "cherry" } } + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1269 + def array_filter?(filter); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1185 + def convert_hashes_to_parameters(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1169 + def convert_parameters_to_hashes(value, using, &block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1191 + def convert_value_to_parameters(value); end + + # Called when an explicit array filter is encountered. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1274 + def each_array_element(object, filter, &block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1365 + def hash_filter(params, filter, on_unpermitted: T.unsafe(nil), explicit_arrays: T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1450 + def initialize_copy(source); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1163 + def new_instance_with_inherited_permitted_status(hash); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1359 + def non_scalar?(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1433 + def permit_any_in_array(array); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1416 + def permit_any_in_parameters(params); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1395 + def permit_array_of_hashes(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1391 + def permit_array_of_scalars(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1401 + def permit_hash(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1411 + def permit_hash_or_array(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1377 + def permit_value(value, filter, on_unpermitted:, explicit_arrays:); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1330 + 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#1344 + def permitted_scalar_filter(params, permitted_key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1245 + def specify_numeric_keys?(filter); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1299 + def unpermitted_keys(params); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1285 + def unpermitted_parameters!(params, on_unpermitted: T.unsafe(nil)); end + + class << self + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#164 + def action_on_unpermitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#164 + def action_on_unpermitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#265 + def allow_deprecated_parameters_hash_equality; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#272 + def allow_deprecated_parameters_hash_equality=(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#262 + def always_permitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#262 + def always_permitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1072 + def hook_into_yaml_loading; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#279 + def nested_attribute?(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#162 + def permit_all_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#162 + def permit_all_parameters=(val); end + end +end + +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1363 +ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1364 +ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# --- Filtering ---------------------------------------------------------- +# +# 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 one in the #permit doc as +# well. +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1314 +ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) + +# # Action Controller Params Wrapper +# +# Wraps the parameters hash into a nested hash. This will allow clients to +# submit requests without having to specify any root elements. +# +# 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.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 fall back 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#83 +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#221 + def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#86 +ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#88 +class ActionController::ParamsWrapper::Options < ::Struct + # @return [Options] a new instance of Options + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#97 + 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 + + # 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 + + 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. + # + # 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#89 + def from_hash(hash); end + end +end + +# source://actionpack//lib/action_controller/metal/permissions_policy.rb#6 +module ActionController::PermissionsPolicy + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/permissions_policy.rb#9 +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#27 + def permissions_policy(**options, &block); end +end + +# source://actionpack//lib/action_controller/railtie.rb#13 +class ActionController::Railtie < ::Rails::Railtie; end + +# source://actionpack//lib/action_controller/railties/helpers.rb#6 +module ActionController::Railties; end + +# source://actionpack//lib/action_controller/railties/helpers.rb#7 +module ActionController::Railties::Helpers + # source://actionpack//lib/action_controller/railties/helpers.rb#8 + def inherited(klass); end +end + +# source://actionpack//lib/action_controller/metal/rate_limiting.rb#6 +module ActionController::RateLimiting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::RateLimiting::ClassMethods + + private + + # source://actionpack//lib/action_controller/metal/rate_limiting.rb#61 + def rate_limiting(to:, within:, by:, with:, store:, name:); end +end + +# source://actionpack//lib/action_controller/metal/rate_limiting.rb#9 +module ActionController::RateLimiting::ClassMethods + # Applies a rate limit to all actions or those specified by the normal + # `before_action` filters with `only:` and `except:`. + # + # The maximum number of requests allowed is specified `to:` and constrained to + # the window of time given by `within:`. + # + # Rate limits are by default unique to the ip address making the request, but + # you can provide your own identity function by passing a callable in the `by:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Requests that exceed the rate limit are refused with a `429 Too Many Requests` + # response. You can specialize this by passing a callable in the `with:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Rate limiting relies on a backing `ActiveSupport::Cache` store and defaults to + # `config.action_controller.cache_store`, which itself defaults to the global + # `config.cache_store`. If you don't want to store rate limits in the same + # datastore as your general caches, you can pass a custom store in the `store` + # parameter. + # + # If you want to use multiple rate limits per controller, you need to give each of + # them and explicit name via the `name:` option. + # + # Examples: + # + # class SessionsController < ApplicationController + # rate_limit to: 10, within: 3.minutes, only: :create + # end + # + # class SignupsController < ApplicationController + # rate_limit to: 1000, within: 10.seconds, + # by: -> { request.domain }, with: -> { redirect_to busy_controller_url, alert: "Too many signups on domain!" }, only: :new + # end + # + # class APIController < ApplicationController + # RATE_LIMIT_STORE = ActiveSupport::Cache::RedisCacheStore.new(url: ENV["REDIS_URL"]) + # rate_limit to: 10, within: 3.minutes, store: RATE_LIMIT_STORE + # end + # + # class SessionsController < ApplicationController + # rate_limit to: 3, within: 2.seconds, name: "short-term" + # rate_limit to: 10, within: 5.minutes, name: "long-term" + # end + # + # source://actionpack//lib/action_controller/metal/rate_limiting.rb#55 + def rate_limit(to:, within:, by: T.unsafe(nil), with: T.unsafe(nil), store: T.unsafe(nil), name: T.unsafe(nil), **options); end +end + +# source://actionpack//lib/action_controller/metal/redirecting.rb#6 +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#158 + 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#121 + 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#148 + 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#103 + 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 fall back 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#202 + def url_from(location); end + + private + + # source://actionpack//lib/action_controller/metal/redirecting.rb#208 + def _allow_other_host; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#222 + def _enforce_open_redirect_protection(location, allow_other_host:); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#241 + def _ensure_url_is_http_header_safe(url); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#212 + def _extract_redirect_to_status(options, response_options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#230 + def _url_host_allowed?(url); end + + class << self + # source://actionpack//lib/action_controller/metal/redirecting.rb#158 + 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#14 +ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_controller/metal/redirecting.rb#12 +class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#16 +class ActionController::RenderError < ::ActionController::ActionControllerError; end + +# # Action Controller Renderer +# +# ActionController::Renderer allows you to render arbitrary templates without +# being inside a controller action. +# +# You can get a renderer instance by calling `renderer` on a controller class: +# +# ApplicationController.renderer +# PostsController.renderer +# +# and render a template by calling the #render method: +# +# ApplicationController.renderer.render template: "posts/show", assigns: { post: Post.first } +# PostsController.renderer.render :show, assigns: { post: Post.first } +# +# As a shortcut, you can also call `render` directly on the controller class +# itself: +# +# ApplicationController.render template: "posts/show", assigns: { post: Post.first } +# PostsController.render :show, assigns: { post: Post.first } +# +# source://actionpack//lib/action_controller/renderer.rb#27 +class ActionController::Renderer + # Initializes a new Renderer. + # + # #### Parameters + # + # * `controller` - The controller class to instantiate for rendering. + # * `env` - The Rack env to use for mocking a request when rendering. Entries + # can be typical Rack env keys and values, or they can be any of the + # following, which will be converted appropriately: + # * `:http_host` - The HTTP host for the incoming request. Converts to + # Rack's `HTTP_HOST`. + # * `:https` - Boolean indicating whether the incoming request uses HTTPS. + # Converts to Rack's `HTTPS`. + # * `:method` - The HTTP method for the incoming request, + # case-insensitive. Converts to Rack's `REQUEST_METHOD`. + # * `:script_name` - The portion of the incoming request's URL path that + # corresponds to the application. Converts to Rack's `SCRIPT_NAME`. + # * `:input` - The input stream. Converts to Rack's `rack.input`. + # + # * `defaults` - Default values for the Rack env. Entries are specified in the + # same format as `env`. `env` will be merged on top of these values. + # `defaults` will be retained when calling #new on a renderer instance. + # + # + # If no `http_host` is specified, the env HTTP host will be derived from the + # routes' `default_url_options`. In this case, the `https` boolean and the + # `script_name` will also be derived from `default_url_options` if they were not + # specified. Additionally, the `https` boolean will fall back to + # `Rails.application.config.force_ssl` if `default_url_options` does not specify + # a `protocol`. + # + # @return [Renderer] a new instance of Renderer + # + # source://actionpack//lib/action_controller/renderer.rb#111 + def initialize(controller, env, defaults); end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_controller/renderer.rb#28 + def controller; end + + # source://actionpack//lib/action_controller/renderer.rb#122 + def defaults; end + + # Creates a new renderer using the same controller, but with a new Rack env. + # + # ApplicationController.renderer.new(method: "post") + # + # source://actionpack//lib/action_controller/renderer.rb#72 + def new(env = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/renderer.rb#151 + def normalize_env(env, &_arg1); end + + # Renders a template to a string, just like + # ActionController::Rendering#render_to_string. + # + # source://actionpack//lib/action_controller/renderer.rb#129 + def render(*args); end + + # Renders a template to a string, just like + # ActionController::Rendering#render_to_string. + # + # source://actionpack//lib/action_controller/renderer.rb#129 + def render_to_string(*args); end + + # Creates a new renderer using the same controller, but with the given defaults + # merged on top of the previous defaults. + # + # source://actionpack//lib/action_controller/renderer.rb#78 + def with_defaults(defaults); end + + private + + # source://actionpack//lib/action_controller/renderer.rb#153 + def env_for_request; end + + class << self + # Creates a new renderer using the given controller class. See ::new. + # + # source://actionpack//lib/action_controller/renderer.rb#64 + def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/renderer.rb#35 + def normalize_env(env); end + end +end + +# source://actionpack//lib/action_controller/renderer.rb#30 +ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/renderer.rb#149 +ActionController::Renderer::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/renderer.rb#141 +ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/metal/renderers.rb#25 +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#145 + def _render_to_body_with_renderer(options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#172 + def _render_with_renderer_js(js, options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#156 + def _render_with_renderer_json(json, options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#177 + 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#141 + def render_to_body(options); end + + class << self + # source://actionpack//lib/action_controller/metal/renderers.rb#91 + 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#75 + 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#85 + 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#38 +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#95 +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#129 + 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#129 + 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#30 +ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_controller/metal/rendering.rb#6 +module ActionController::Rendering + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + # Renders a template and assigns the result to `self.response_body`. + # + # If no rendering mode option is specified, the template will be derived from + # the first argument. + # + # render "posts/show" + # # => renders app/views/posts/show.html.erb + # + # # In a PostsController action... + # render :show + # # => renders app/views/posts/show.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

Hello, World

" + # end + # + # def format + # :html + # end + # end + # + # render(Greeting.new) + # # => "

Hello, World

" + # + # render(renderable: Greeting.new) + # # => "

Hello, World

" + # + # #### Rendering Mode + # + # `:partial` + # : See ActionView::PartialRenderer for details. + # + # render partial: "posts/form", locals: { post: Post.new } + # # => renders app/views/posts/_form.html.erb + # + # `:file` + # : Renders the contents of a file. This option should **not** be used with + # unsanitized user input. + # + # render file: "/path/to/some/file" + # # => renders /path/to/some/file + # + # `:inline` + # : Renders an ERB template string. + # + # @name = "World" + # render inline: "

Hello, <%= @name %>!

" + # # => renders "

Hello, World!

" + # + # `:body` + # : Renders the provided text, and sets the content type as `text/plain`. + # + # render body: "Hello, World!" + # # => renders "Hello, World!" + # + # `:plain` + # : Renders the provided text, and sets the content type as `text/plain`. + # + # render plain: "Hello, World!" + # # => renders "Hello, World!" + # + # `:html` + # : Renders the provided HTML string, and sets the content type as + # `text/html`. If the string is not `html_safe?`, performs HTML escaping on + # the string before rendering. + # + # render html: "

Hello, World!

".html_safe + # # => renders "

Hello, World!

" + # + # render html: "

Hello, World!

" + # # => renders "<h1>Hello, World!</h1>" + # + # `:json` + # : Renders the provided object as JSON, and sets the content type as + # `application/json`. If the object is not a string, it will be converted to + # JSON by calling `to_json`. + # + # render json: { hello: "world" } + # # => renders "{\"hello\":\"world\"}" + # + # `:renderable` + # : Renders the provided object by calling `render_in` with the current view + # context. The response format is determined by calling `format` on the + # renderable if it responds to `format`, falling back to `text/html` by + # default. + # + # render renderable: Greeting.new + # # => renders "

Hello, World

" + # + # + # By default, when a rendering mode is specified, no layout template is + # rendered. + # + # #### Options + # + # `:assigns` + # : Hash of instance variable assignments for the template. + # + # render inline: "

Hello, <%= @name %>!

", assigns: { name: "World" } + # # => renders "

Hello, World!

" + # + # `:locals` + # : Hash of local variable assignments for the template. + # + # render inline: "

Hello, <%= name %>!

", locals: { name: "World" } + # # => renders "

Hello, World!

" + # + # `:layout` + # : The layout template to render. Can also be `false` or `true` to disable or + # (re)enable the default layout template. + # + # render "posts/show", layout: "holiday" + # # => renders app/views/posts/show.html.erb with the app/views/layouts/holiday.html.erb layout + # + # render "posts/show", layout: false + # # => renders app/views/posts/show.html.erb with no layout + # + # render inline: "

Hello, World!

", layout: true + # # => renders "

Hello, World!

" with the default layout + # + # `:status` + # : The HTTP status code to send with the response. Can be specified as a + # number or as the status name in Symbol form. Defaults to 200. + # + # render "posts/new", status: 422 + # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # + # render "posts/new", status: :unprocessable_entity + # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # + # -- + # Check for double render errors and set the content_type after rendering. + # + # @raise [::AbstractController::DoubleRenderError] + # + # source://actionpack//lib/action_controller/metal/rendering.rb#165 + def render(*args); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#185 + def render_to_body(options = T.unsafe(nil)); end + + # Similar to #render, but only returns the rendered template as a string, + # instead of setting `self.response_body`. + # -- + # Override render_to_string because body can now be set to a Rack body. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#174 + def render_to_string(*_arg0); end + + private + + # Normalize both text and status options. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#227 + def _normalize_options(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#241 + def _normalize_text(options); end + + # Process controller specific options, as status, content-type and location. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#250 + def _process_options(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#196 + def _process_variant(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#202 + def _render_in_priorities(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#210 + def _set_html_content_type; end + + # source://actionpack//lib/action_controller/metal/rendering.rb#214 + def _set_rendered_content_type(format); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#220 + def _set_vary_header; end + + # Before processing, set the request formats in current controller formats. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#191 + def process_action(*_arg0); end +end + +# source://actionpack//lib/action_controller/metal/rendering.rb#11 +module ActionController::Rendering::ClassMethods + # source://actionpack//lib/action_controller/metal/rendering.rb#23 + def inherited(klass); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#13 + 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#17 + def renderer; end + + # source://actionpack//lib/action_controller/metal/rendering.rb#19 + def setup_renderer!; end +end + +# source://actionpack//lib/action_controller/metal/rendering.rb#9 +ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) + +# # Action Controller Request Forgery Protection +# +# Controller actions are protected from Cross-Site Request Forgery (CSRF) +# attacks by including a token in the rendered HTML for your application. This +# token is stored as a random string in the session, to which an attacker does +# not have 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 +# +# Rack 3+ compatible servers all support streaming. +# +# source://actionpack//lib/action_controller/metal/streaming.rb#169 +module ActionController::Streaming + private + + # Call render_body if we are streaming instead of usual `render`. + # + # source://actionpack//lib/action_controller/metal/streaming.rb#172 + 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.expect(person: [: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.expect(person: [ :name, :age, pets_attributes: [ :id, :name, :category ] ]) +# end +# end +# +# See ActionController::Parameters.expect, +# See ActionController::Parameters.require, and +# ActionController::Parameters.permit for more information. +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1524 +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#1527 + 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#1542 + def params=(value); end +end + +# source://actionpack//lib/action_controller/template_assertions.rb#6 +module ActionController::TemplateAssertions + # @raise [NoMethodError] + # + # source://actionpack//lib/action_controller/template_assertions.rb#7 + def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# # Action Controller Test Case +# +# Superclass for ActionController functional tests. Functional tests allow you +# to test a single controller action per test method. +# +# ## Use integration style controller tests over functional style controller tests. +# +# Rails discourages the use of functional tests in favor of integration tests +# (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: +# +# : The controller instance that will be tested. +# +# : 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. +# +# : 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#360 +class ActionController::TestCase < ::ActiveSupport::TestCase + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionController::TestCase::Behavior + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions + extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods + extend ::ActionController::TestCase::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#591 + def _controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#591 + def _controller_class=(_arg0); end + + # source://actionpack//lib/action_controller/test_case.rb#591 + def _controller_class?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _controller_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _controller_class=(new_value); end + + # source://actionpack//lib/action_controller/test_case.rb#591 + def _controller_class?; end + + # source://actionpack//lib/action_controller/test_case.rb#361 + def executor_around_each_request; end + + # source://actionpack//lib/action_controller/test_case.rb#361 + def executor_around_each_request=(_arg0); end + end +end + +# source://actionpack//lib/action_controller/test_case.rb#363 +module ActionController::TestCase::Behavior + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#584 + def build_response(klass); end + + # source://actionpack//lib/action_controller/test_case.rb#544 + 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#455 + def delete(action, **args); end + + # source://actionpack//lib/action_controller/test_case.rb#548 + 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#431 + 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#461 + 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#443 + 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#437 + 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#504 + 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#449 + def put(action, **args); end + + # source://actionpack//lib/action_controller/test_case.rb#552 + def query_parameter_names(generated_extras); end + + # Returns the value of attribute request. + # + # source://actionpack//lib/action_controller/test_case.rb#369 + def request; end + + # Returns the value of attribute response. + # + # source://actionpack//lib/action_controller/test_case.rb#369 + def response; end + + # source://actionpack//lib/action_controller/test_case.rb#556 + def setup_controller_request_and_response; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#677 + def check_required_ivars; end + + # source://actionpack//lib/action_controller/test_case.rb#673 + def document_root_element; end + + # source://actionpack//lib/action_controller/test_case.rb#627 + def process_controller_response(action, cookies, xhr); end + + # source://actionpack//lib/action_controller/test_case.rb#663 + def scrub_env!(env); end + + # source://actionpack//lib/action_controller/test_case.rb#597 + def setup_request(controller_class_name, action, parameters, session, flash, xhr); end + + # source://actionpack//lib/action_controller/test_case.rb#619 + 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#371 +module ActionController::TestCase::Behavior::ClassMethods + # source://actionpack//lib/action_controller/test_case.rb#393 + def controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#389 + def controller_class=(new_class); end + + # source://actionpack//lib/action_controller/test_case.rb#401 + 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#378 + 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#38 +class ActionController::TestRequest < ::ActionDispatch::TestRequest + # @return [TestRequest] a new instance of TestRequest + # + # source://actionpack//lib/action_controller/test_case.rb#61 + def initialize(env, session, controller_class); end + + # source://actionpack//lib/action_controller/test_case.rb#80 + def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end + + # source://actionpack//lib/action_controller/test_case.rb#76 + def content_type=(type); end + + # Returns the value of attribute controller_class. + # + # source://actionpack//lib/action_controller/test_case.rb#46 + def controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#72 + def query_string=(string); end + + private + + # source://actionpack//lib/action_controller/test_case.rb#171 + def params_parsers; end + + class << self + # Create a new test request with default `env` values. + # + # source://actionpack//lib/action_controller/test_case.rb#49 + def create(controller_class); end + + # source://actionpack//lib/action_controller/test_case.rb#42 + def new_session; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#56 + def default_env; end + end +end + +# source://actionpack//lib/action_controller/test_case.rb#39 +ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/test_case.rb#143 +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#189 +class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash + # @return [TestSession] a new instance of TestSession + # + # source://actionpack//lib/action_controller/test_case.rb#192 + def initialize(session = T.unsafe(nil), id = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/test_case.rb#212 + def destroy; end + + # source://actionpack//lib/action_controller/test_case.rb#216 + def dig(*keys); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/test_case.rb#225 + def enabled?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/test_case.rb#200 + def exists?; end + + # source://actionpack//lib/action_controller/test_case.rb#221 + def fetch(key, *args, &block); end + + # source://actionpack//lib/action_controller/test_case.rb#229 + def id_was; end + + # source://actionpack//lib/action_controller/test_case.rb#204 + def keys; end + + # source://actionpack//lib/action_controller/test_case.rb#208 + def values; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#234 + def load!; end +end + +# source://actionpack//lib/action_controller/test_case.rb#190 +ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/metal/testing.rb#6 +module ActionController::Testing; end + +# Behavior specific to functional tests +# +# source://actionpack//lib/action_controller/metal/testing.rb#8 +module ActionController::Testing::Functional + # source://actionpack//lib/action_controller/metal/testing.rb#9 + def clear_instance_variables_between_requests; end + + # source://actionpack//lib/action_controller/metal/testing.rb#18 + 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#75 +class ActionController::UnfilteredParameters < ::ArgumentError + # @return [UnfilteredParameters] a new instance of UnfilteredParameters + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#76 + def initialize; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#75 +class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#72 +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#60 +class ActionController::UnpermittedParameters < ::IndexError + # @return [UnpermittedParameters] a new instance of UnpermittedParameters + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#63 + def initialize(params); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#61 + def params; end +end + +# # Action Controller UrlFor +# +# Includes `url_for` into the host class. The class has to provide a `RouteSet` +# by implementing the `_routes` method. Otherwise, an exception will be raised. +# +# 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 returns an ActionDispatch::Request instance. +# +# 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#27 +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#32 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/url_for.rb#37 + 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#27 +class ActionController::UrlGenerationError < ::ActionController::ActionControllerError + include ::DidYouMean::Correctable + + # @return [UrlGenerationError] a new instance of UrlGenerationError + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#30 + 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#41 + def corrections; end + + # Returns the value of attribute method_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#28 + def method_name; end + + # Returns the value of attribute route_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#28 + def route_name; end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#28 + def routes; end +end + +# # Action Dispatch +# +# Action Dispatch is a module of Action Pack. +# +# Action Dispatch parses information about the web request, handles routing as +# defined by the user, and does advanced processing related to HTTP such as +# MIME-type negotiation, decoding parameters in POST, PATCH, or PUT bodies, +# handling HTTP caching logic, cookies and sessions. +# +# source://actionpack//lib/action_dispatch/deprecator.rb#5 +module ActionDispatch + extend ::ActiveSupport::Autoload + + # source://actionpack//lib/action_dispatch.rb#135 + def eager_load!; end + + # source://actionpack//lib/action_dispatch.rb#121 + def test_app; end + + # source://actionpack//lib/action_dispatch.rb#121 + def test_app=(val); end + + class << self + # source://actionpack//lib/action_dispatch/deprecator.rb#6 + def deprecator; end + + # source://actionpack//lib/action_dispatch.rb#121 + def test_app; end + + # source://actionpack//lib/action_dispatch.rb#121 + def test_app=(val); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 +class ActionDispatch::ActionableExceptions + # @return [ActionableExceptions] a new instance of ActionableExceptions + # + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#12 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#16 + def call(env); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#10 + def endpoint; end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#10 + def endpoint=(val); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#26 + def actionable_request?(request); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#30 + def redirect_to(location); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#10 + def endpoint; end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#10 + 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#9 +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#22 + def initialize(code_or_name); end + + # Returns the value of attribute code. + # + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#10 + def code; end + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#35 + def code_and_name; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#10 + def name; end + + private + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#40 + def code_from_name(name); end + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#44 + def name_from_code(code); end +end + +# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#12 +ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#6 +module ActionDispatch::Assertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + extend ::ActiveSupport::Concern + include ::ActionDispatch::Assertions::RoutingAssertions + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # source://actionpack//lib/action_dispatch/testing/assertions.rb#17 + 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#8 +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) + # + # # Asserts that the redirection has the HTTP status code 301 (Moved + # # Permanently). + # assert_redirected_to "/some/path", status: :moved_permanently + # + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#60 + def assert_redirected_to(url_options = T.unsafe(nil), options = T.unsafe(nil), message = T.unsafe(nil)); end + + # Asserts that the response is one of the following types: + # + # * `: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#33 + def assert_response(type, message = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#105 + def code_with_name(code_or_name); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#89 + def generate_response_message(expected, actual = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#99 + def location_if_redirected; end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#80 + 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#76 + def parameterize(value); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#94 + def response_body_if_short; end +end + +# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#9 +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#14 +module ActionDispatch::Assertions::RoutingAssertions + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # Asserts that the provided options can be used to generate the provided path. + # This is the inverse of `assert_recognizes`. The `extras` parameter is used to + # tell the request the names and values of additional request parameters that + # would be in a query string. The `message` parameter allows you to specify a + # custom error message for assertion failures. + # + # 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#204 + 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#164 + 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#248 + 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#261 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#103 + 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#121 + def with_routing(&block); end + + private + + # @yield [@routes] + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#270 + def create_routes; end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#336 + def fail_on(exception_class, message); end + + # Recognizes the route for a given path. + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#302 + def recognized_request_for(path, extras = T.unsafe(nil), msg); end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#294 + def reset_routes(old_routes, old_controller); end +end + +# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#76 +module ActionDispatch::Assertions::RoutingAssertions::ClassMethods + # A helper to make it easier to test different route configurations. This method + # temporarily replaces @routes with a new RouteSet instance before each test. + # + # The new instance is yielded to the passed block. Typically the block will + # create some routes using `set.draw { match ... }`: + # + # with_routing do |set| + # set.draw do + # resources :users + # end + # end + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#89 + def with_routing(&block); end +end + +# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#17 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#37 + def with_routing(&block); end + + private + + # @yield [routes] + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#46 + def create_routes; end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#66 + def reset_routes(old_routes, old_integration_session); end +end + +# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#20 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#21 + def with_routing(&block); end +end + +# # Action Dispatch AssumeSSL +# +# When proxying through a load balancer that terminates SSL, the forwarded +# request will appear as though it's HTTP instead of HTTPS to the application. +# This makes redirects and cookie security target HTTP instead of HTTPS. This +# middleware makes the server assume that the proxy already terminated SSL, and +# that the request really is HTTPS. +# +# source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#13 +class ActionDispatch::AssumeSSL + # @return [AssumeSSL] a new instance of AssumeSSL + # + # source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#14 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/assume_ssl.rb#18 + def call(env); end +end + +# # Action Dispatch Callbacks +# +# Provides callbacks to be executed before and after dispatching the request. +# +# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#9 +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#24 + def initialize(app); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _call_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_call_callbacks(&block); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#28 + def call(env); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _call_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _call_callbacks=(value); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#19 + def after(*args, &block); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#15 + def before(*args, &block); end + end +end + +# source://actionpack//lib/action_dispatch/constants.rb#8 +module ActionDispatch::Constants; end + +# source://actionpack//lib/action_dispatch/constants.rb#23 +ActionDispatch::Constants::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#24 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#25 +ActionDispatch::Constants::CONTENT_SECURITY_POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#27 +ActionDispatch::Constants::FEATURE_POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#26 +ActionDispatch::Constants::LOCATION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#30 +ActionDispatch::Constants::SERVER_TIMING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#31 +ActionDispatch::Constants::STRICT_TRANSPORT_SECURITY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#22 +ActionDispatch::Constants::VARY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#29 +ActionDispatch::Constants::X_CASCADE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/constants.rb#28 +ActionDispatch::Constants::X_REQUEST_ID = T.let(T.unsafe(nil), String) + +# # Action Dispatch Content Security Policy +# +# Configures the HTTP [Content-Security-Policy] +# (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) +# response header to help protect against XSS and +# injection attacks. +# +# 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#29 +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#178 + def initialize; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + 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#206 + def block_all_mixed_content(enabled = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#298 + 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#188 + def child_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def connect_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def default_src(*sources); end + + # Returns the value of attribute directives. + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#176 + def directives; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def font_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def form_action(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def frame_ancestors(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def frame_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def img_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def manifest_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def media_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + 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#222 + def plugin_types(*types); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + 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#237 + 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#250 + def require_sri_for(*types); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + 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#272 + def sandbox(*values); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def script_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def script_src_attr(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def script_src_elem(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def style_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def style_src_attr(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def style_src_elem(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + 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#290 + def upgrade_insecure_requests(enabled = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#188 + def worker_src(*sources); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#317 + def apply_mapping(source); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#304 + def apply_mappings(sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#339 + def build_directive(sources, context); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#323 + def build_directives(context, nonce, nonce_directives); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#183 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#361 + def nonce_directive?(directive, nonce_directives); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#343 + def resolve_source(source, context); end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#172 +ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#147 +ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#126 +ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#30 +class ActionDispatch::ContentSecurityPolicy::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#31 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#35 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#57 + def header_name(request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#65 + def policy_present?(headers); end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#71 +module ActionDispatch::ContentSecurityPolicy::Request + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#78 + def content_security_policy; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#82 + def content_security_policy=(policy); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#110 + def content_security_policy_nonce; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#102 + def content_security_policy_nonce_directives; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#106 + def content_security_policy_nonce_directives=(generator); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#94 + def content_security_policy_nonce_generator; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#98 + def content_security_policy_nonce_generator=(generator); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#86 + def content_security_policy_report_only; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#90 + def content_security_policy_report_only=(value); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#121 + def generate_content_security_policy_nonce; end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#75 +ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#76 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#74 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#72 +ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#73 +ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# Read and write data to cookies through ActionController::Cookies#cookies. +# +# When reading cookie data, the data is read from the HTTP request header, +# Cookie. When writing cookie data, the data is sent out in the HTTP response +# header, `Set-Cookie`. +# +# 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. +# cookies.signed[:user_id] = current_user.id +# # It can be read using the signed method. +# cookies.signed[:user_id] # => 123 +# +# # Sets an encrypted cookie value before sending it to the client which +# # prevent users from reading and tampering with its value. +# cookies.encrypted[:discount] = 45 +# # It can be read using the encrypted method. +# 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. For more flexibility +# you can set the domain on a per-request basis by specifying `:domain` with +# a proc. +# +# domain: nil # Does not set cookie domain. (default) +# domain: :all # Allow the cookie for the top most level +# # domain and subdomains. +# domain: %w(.example.com .example.org) # Allow the cookie +# # for concrete domain names. +# domain: proc { Tenant.current.cookie_domain } # Set cookie domain dynamically +# domain: proc { |req| ".sub.#{req.host}" } # Set cookie domain dynamically based on request +# +# * `:tld_length` - When using `:domain => :all`, this option can be used to +# explicitly set the TLD length when using a short (<= 3 character) domain +# that is being interpreted as part of a TLD. 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 `nil`, `:none`, `:lax`, and `:strict`. Defaults to +# `:lax`. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 +class ActionDispatch::Cookies + # @return [Cookies] a new instance of Cookies + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#700 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#704 + def call(env); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#201 +ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#506 +class ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::ChainedCookieJars + + # @return [AbstractCookieJar] a new instance of AbstractCookieJar + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#509 + def initialize(parent_jar); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#513 + def [](name); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#525 + def []=(name, options); end + + protected + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#537 + def request; end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#555 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#548 + def cookie_metadata(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#540 + def expiry_options(options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#554 + def parse(name, data, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#207 +ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#208 +ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#209 +ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#206 +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#219 +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#274 + 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#234 + 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#253 + 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#281 + def signed_or_encrypted; end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#304 + def encrypted_cookie_cipher; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#298 + def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#308 + def signed_cookie_digest; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#291 + def upgrade_legacy_hmac_aes_cbc_cookies?; end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#313 +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#324 + 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#345 + 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#379 + def []=(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#441 + def always_write_cookie; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#441 + 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#425 + def clear(options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#334 + def commit!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#332 + 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`. + # + # Returns the value of the cookie, or `nil` if the cookie does not exist. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#404 + 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#418 + def deleted?(name, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#340 + def each(&block); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#349 + def fetch(name, *args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#353 + def has_key?(name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#353 + def key?(name); end + + # Returns the value of attribute request. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#322 + def request; end + + # Returns the cookies as Hash. + def to_hash(*_arg0); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#373 + def to_header; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#361 + def update(other_hash); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#366 + def update_cookies_from_jar; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#429 + def write(response); end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#444 + def escape(string); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#452 + def handle_options(options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#448 + def write_cookie?(cookie); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#441 + def always_write_cookie; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#441 + def always_write_cookie=(val); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#316 + def build(req, cookies); end + end +end + +# Raised when storing more than 4K of session data. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#216 +class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#203 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#199 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#200 +ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#648 +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#651 + def initialize(parent_jar); end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#693 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#685 + def parse(name, encrypted_message, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 +ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 +ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) + +# Cookies can typically store 4096 bytes. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#213 +ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#558 +class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#560 + def commit(name, options); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#205 +ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#204 +ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#198 +ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#565 +module ActionDispatch::Cookies::SerializedCookieJars + protected + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#569 + def digest; end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#612 + def check_for_overflow!(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#608 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#594 + def parse(name, dumped, force_reserialize: T.unsafe(nil), **_arg3); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#588 + def reserialize?(dumped); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#574 + def serializer; end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#566 +ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#619 +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#622 + def initialize(parent_jar); end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#641 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#635 + def parse(name, signed_message, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#202 +ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#210 +ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) + +# # Action Dispatch DebugExceptions +# +# This middleware is responsible for logging exceptions and showing a debugging +# page in case the request is local. +# +# source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#15 +class ActionDispatch::DebugExceptions + # @return [DebugExceptions] a new instance of DebugExceptions + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#23 + 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#30 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#198 + def api_request?(content_type); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#116 + def create_template(request, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#50 + def invoke_interceptors(request, exception, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#172 + def log_array(logger, lines, request); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#135 + def log_error(request, wrapper); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#202 + def log_rescued_responses?(request); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#184 + def logger(request); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#131 + def render(status, body, format); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#58 + def render_exception(request, exception, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#92 + def render_for_api_request(content_type, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#78 + def render_for_browser_request(request, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#192 + def routes_inspector(exception); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#188 + def stderr_logger; end + + class << self + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#16 + def interceptors; end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#18 + def register_interceptor(object = T.unsafe(nil), &block); end + end +end + +# # Action Dispatch DebugLocks +# +# This middleware can be used to diagnose deadlocks in the autoload interlock. +# +# To use it, insert it near the top of the middleware stack, using +# `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#29 +class ActionDispatch::DebugLocks + # @return [DebugLocks] a new instance of DebugLocks + # + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#30 + def initialize(app, path = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#35 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#108 + def blocked_by?(victim, blocker, all_threads); end + + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#49 + def render_details(req); end +end + +# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#11 +class ActionDispatch::DebugView < ::ActionView::Base + # @return [DebugView] a new instance of DebugView + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#14 + def initialize(assigns); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#21 + def compiled_method_container; end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#49 + def debug_hash(object); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#41 + def debug_headers(headers); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#29 + def debug_params(params); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#25 + def error_highlight_available?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#67 + def params_valid?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#63 + def protect_against_forgery?; end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#53 + def render(*_arg0); end +end + +# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#12 +ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#11 +class ActionDispatch::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#50 + def initialize(backtrace_cleaner, exception); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#101 + def actions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#113 + def annotated_source_code; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#135 + def application_trace; end + + # Returns the value of attribute backtrace_cleaner. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#48 + def backtrace_cleaner; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#89 + def corrections; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#204 + def error_highlight_available?; end + + # Returns the value of attribute exception. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#48 + def exception; end + + # Returns the value of attribute exception_class_name. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#48 + def exception_class_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#234 + def exception_id; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#230 + def exception_inspect; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#222 + def exception_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#129 + def exception_trace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#77 + def failures; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#93 + def file_name; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#139 + def framework_trace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#143 + def full_trace; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#73 + def has_cause?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#81 + def has_corrections?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#97 + def line_number; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#226 + def message; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#85 + def original_message; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#194 + def rescue_response?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#12 + def rescue_responses; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#12 + def rescue_responses=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#121 + def rescue_template; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#30 + def rescue_templates; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#30 + def rescue_templates=(val); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#61 + def routing_error?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#179 + def show?(request); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#43 + def silent_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#43 + def silent_exceptions=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#198 + def source_extracts; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#218 + def source_to_show_id; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#125 + def status_code; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#69 + def sub_template_message; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#65 + def template_error?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#210 + def trace_to_show; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#147 + def traces; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#105 + def unwrapped_exception; end + + # Returns the value of attribute wrapped_causes. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#48 + def wrapped_causes; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def wrapper_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def wrapper_exceptions=(val); end + + private + + # Returns the value of attribute backtrace. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#258 + def backtrace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#260 + def build_backtrace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#283 + def causes_for(exception); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#293 + def clean_backtrace(*args); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#346 + def extract_file_and_line_number(trace); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#301 + def extract_source(trace); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#330 + def extract_source_fragment_lines(source_lines, line); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#336 + def source_fragment(path, line); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#289 + def wrapped_causes_for(exception, backtrace_cleaner); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#12 + def rescue_responses; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#12 + def rescue_responses=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#30 + def rescue_templates; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#30 + def rescue_templates=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#43 + def silent_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#43 + def silent_exceptions=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#175 + def status_code_for_exception(class_name); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def wrapper_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def wrapper_exceptions=(val); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#239 +class ActionDispatch::ExceptionWrapper::SourceMapLocation + # @return [SourceMapLocation] a new instance of SourceMapLocation + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#240 + def initialize(location, template); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#245 + def spot(exc); end +end + +# source://actionpack//lib/action_dispatch/middleware/executor.rb#8 +class ActionDispatch::Executor + # @return [Executor] a new instance of Executor + # + # source://actionpack//lib/action_dispatch/middleware/executor.rb#9 + def initialize(app, executor); end + + # source://actionpack//lib/action_dispatch/middleware/executor.rb#13 + def call(env); end +end + +# # Action Dispatch FileHandler +# +# This endpoint serves static files from disk using `Rack::Files`. +# +# URL paths are matched with static files according to expected conventions: +# `path`, `path`.html, `path`/index.html. +# +# Precompressed versions of these files are checked first. Brotli (.br) and gzip +# (.gz) files are supported. If `path`.br exists, this endpoint returns that +# +# 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#47 +class ActionDispatch::FileHandler + # @return [FileHandler] a new instance of FileHandler + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#55 + 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#69 + def attempt(env); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#65 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/static.rb#185 + def clean_path(path_info); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#149 + def compressible?(content_type); end + + # @yield [path, content_type || "text/plain"] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#162 + def each_candidate_filepath(path_info); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#153 + def each_precompressed_filepath(filepath); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#144 + 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#104 + def find_file(path_info, accept_encoding:); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#80 + def serve(request, filepath, content_headers); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#112 + def try_files(filepath, content_type, accept_encoding:); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#122 + def try_precompressed_files(filepath, headers, accept_encoding:); end +end + +# `Accept-Encoding` value -> file extension +# +# source://actionpack//lib/action_dispatch/middleware/static.rb#49 +ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) + +# # Action Dispatch Flash +# +# The flash provides a way to pass temporary primitive-types (String, Array, +# Hash) between actions. Anything you place in the flash will be exposed to the +# very next action and then cleared out. This is a great way of doing notices +# and alerts, such as a create action that sets `flash[:notice] = "Post +# successfully created"` before redirecting to a display action that can 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#50 +class ActionDispatch::Flash + class << self + # source://actionpack//lib/action_dispatch/middleware/flash.rb#312 + def new(app); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#119 +class ActionDispatch::Flash::FlashHash + include ::Enumerable + + # @return [FlashHash] a new instance of FlashHash + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#149 + def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#169 + def [](k); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#163 + def []=(k, v); end + + # Convenience accessor for `flash[:alert]`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#280 + def alert; end + + # Convenience accessor for `flash[:alert]=`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#285 + def alert=(message); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#204 + def clear; end + + # Immediately deletes the single flash entry. Use this method when you want + # remove the message within the current action. See also #discard. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 + 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 + # + # Use this method when you want to display the message in the current action but + # not in the next one. See also #delete. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#264 + def discard(k = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#209 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#200 + 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#250 + def keep(k = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#183 + def key?(name); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#179 + def keys; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#173 + def merge!(h); end + + # Convenience accessor for `flash[:notice]`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#290 + def notice; end + + # Convenience accessor for `flash[:notice]=`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#295 + 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#241 + def now; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#215 + 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#274 + def sweep; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#196 + 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#143 + def to_session_value; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#173 + def update(h); end + + protected + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#300 + def now_is_loaded?; end + + private + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#155 + def initialize_copy(other); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#305 + def stringify_array(array); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/flash.rb#122 + def from_session_value(value); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#90 +class ActionDispatch::Flash::FlashNow + # @return [FlashNow] a new instance of FlashNow + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#93 + def initialize(flash); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#104 + def [](k); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#97 + def []=(k, v); end + + # Convenience accessor for `flash.now[:alert]=`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#109 + def alert=(message); end + + # Returns the value of attribute flash. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#91 + 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#91 + def flash=(_arg0); end + + # Convenience accessor for `flash.now[:notice]=`. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#114 + def notice=(message); end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#51 +ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#53 +module ActionDispatch::Flash::RequestMethods + # source://actionpack//lib/action_dispatch/middleware/flash.rb#71 + 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#57 + def flash; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#63 + def flash=(flash); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#67 + def flash_hash; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 + def reset_session; end +end + +# # Action Dispatch HostAuthorization +# +# This middleware guards from DNS rebinding attacks by explicitly permitting the +# hosts a request can be sent to, and is passed the options set in +# `config.host_authorization`. +# +# 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#22 +class ActionDispatch::HostAuthorization + # @return [HostAuthorization] a new instance of HostAuthorization + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#127 + def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#135 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#151 + def blocked_hosts(request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#163 + def excluded?(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#167 + def mark_as_authorized(request); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 +ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#88 +class ActionDispatch::HostAuthorization::DefaultResponseApp + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#91 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#122 + def available_logger(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#114 + def log_error(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#107 + def response(format, body); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#100 + def response_body(request); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#89 +ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#26 +ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#27 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#28 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 +ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#35 +class ActionDispatch::HostAuthorization::Permissions + # @return [Permissions] a new instance of Permissions + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#36 + def initialize(hosts); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#44 + def allows?(host); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#40 + def empty?; end + + private + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#83 + def extract_hostname(host); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#61 + def sanitize_hosts(hosts); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#71 + def sanitize_regexp(host); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#75 + def sanitize_string(host); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#25 +ActionDispatch::HostAuthorization::SUBDOMAIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#29 +ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch.rb#89 +module ActionDispatch::Http + extend ::ActiveSupport::Autoload +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#7 +module ActionDispatch::Http::Cache; end + +# source://actionpack//lib/action_dispatch/http/cache.rb#8 +module ActionDispatch::Http::Cache::Request + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#32 + 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, based on configuration, either `ETag` is preferred over `Last-Modified` + # or both are considered equally. You can adjust the preference with + # `config.action_dispatch.strict_freshness`. + # Reference: http://tools.ietf.org/html/rfc7232#section-6 + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#45 + def fresh?(response); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#14 + def if_modified_since; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#20 + def if_none_match; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#24 + def if_none_match_etags; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#28 + def not_modified?(modified_at); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#12 + def strict_freshness; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#12 + def strict_freshness=(val); end + + class << self + # source://actionpack//lib/action_dispatch/http/cache.rb#12 + def strict_freshness; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#12 + def strict_freshness=(val); end + end +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#9 +ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#10 +ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#68 +module ActionDispatch::Http::Cache::Response + # Returns the value of attribute cache_control. + # + # source://actionpack//lib/action_dispatch/http/cache.rb#69 + def cache_control; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#85 + def date; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#95 + def date=(utc_time); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#91 + 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#117 + def etag=(weak_validators); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#129 + def etag?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#71 + def last_modified; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#81 + def last_modified=(utc_time); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#77 + def last_modified?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#125 + 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#138 + def strong_etag?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#121 + 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#132 + def weak_etag?; end + + private + + # source://actionpack//lib/action_dispatch/http/cache.rb#161 + def cache_control_headers; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#155 + def cache_control_segments; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#151 + def generate_strong_etag(validators); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#147 + def generate_weak_etag(validators); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#191 + def handle_conditional_get!; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#200 + def merge_and_normalize_cache_control!(cache_control); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#179 + def prepare_cache_control!; end +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#143 +ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#183 +ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#189 +ActionDispatch::Http::Cache::Response::IMMUTABLE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#144 +ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#188 +ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#185 +ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#184 +ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#187 +ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#186 +ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#145 +ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#7 +class ActionDispatch::Http::ContentDisposition + # @return [ContentDisposition] a new instance of ContentDisposition + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#14 + def initialize(disposition:, filename:); end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#21 + def ascii_filename; end + + # Returns the value of attribute disposition. + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#12 + def disposition; end + + # Returns the value of attribute filename. + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#12 + def filename; end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#31 + def to_s; end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#27 + def utf8_filename; end + + private + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#40 + def percent_escape(string, pattern); end + + class << self + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#8 + def format(disposition:, filename:); end + end +end + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#25 +ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#19 +ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch HTTP Filter Parameters +# +# Allows you to specify sensitive query string and POST parameters to filter +# from the request log. +# +# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. +# env["action_dispatch.parameter_filter"] = [:foo, "bar"] +# +# For more information about filter behavior, see +# ActiveSupport::ParameterFilter. +# +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#19 +module ActionDispatch::Http::FilterParameters + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#24 + def initialize; end + + # Returns a hash of request.env with all sensitive data replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#40 + def filtered_env; end + + # Returns a hash of parameters with all sensitive data replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#33 + def filtered_parameters; end + + # Reconstructs a path with all sensitive GET parameters replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#45 + def filtered_path; end + + # Returns the `ActiveSupport::ParameterFilter` object used to filter in this + # request. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#51 + def parameter_filter; end + + private + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#60 + def env_filter; end + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#73 + def filtered_query_string; end + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#67 + def parameter_filter_for(filters); end +end + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#20 +ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#71 +ActionDispatch::Http::FilterParameters::KV_RE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#22 +ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#21 +ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#72 +ActionDispatch::Http::FilterParameters::PAIR_RE = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#7 +module ActionDispatch::Http::FilterRedirect + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#10 + def filtered_location; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#27 + def location_filter_match?; end + + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#19 + def location_filters; end + + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#37 + def parameter_filtered_location; end +end + +# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#8 +ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) + +# # Action Dispatch HTTP Headers +# +# Provides access to the request's HTTP headers from the environment. +# +# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } +# 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#28 +class ActionDispatch::Http::Headers + include ::Enumerable + + # @return [Headers] a new instance of Headers + # + # source://actionpack//lib/action_dispatch/http/headers.rb#58 + def initialize(request); end + + # Returns the value for the given key mapped to @env. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#63 + def [](key); end + + # Sets the given value for the key mapped to @env. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#68 + def []=(key, value); end + + # Add a value to a multivalued header like `Vary` or `Accept-Encoding`. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#73 + def add(key, value); end + + # source://actionpack//lib/action_dispatch/http/headers.rb#98 + def each(&block); end + + # source://actionpack//lib/action_dispatch/http/headers.rb#118 + 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#90 + def fetch(key, default = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/headers.rb#77 + def include?(key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/headers.rb#77 + 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#104 + 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#112 + 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#123 + def env_name(key); end + + class << self + # source://actionpack//lib/action_dispatch/http/headers.rb#54 + def from_hash(hash); end + end +end + +# source://actionpack//lib/action_dispatch/http/headers.rb#29 +ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_dispatch/http/headers.rb#82 +ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/http/headers.rb#50 +ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#9 +module ActionDispatch::Http::MimeNegotiation + extend ::ActiveSupport::Concern + + # Returns the accepted MIME type for the request. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#42 + def accepts; end + + # The MIME type of the HTTP request, such as [Mime](:xml). + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#24 + def content_mime_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#63 + 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#115 + def format=(extension); end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#67 + 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 fall back 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#135 + def formats=(extensions); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#37 + 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#143 + def negotiate_mime(order); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#155 + def should_apply_vary_header?; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#100 + def variant; end + + # Sets the variant for template. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#90 + def variant=(variant); end + + private + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#179 + def format_from_path_extension; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#164 + def params_readable?; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#175 + def use_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#170 + 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#162 +ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#12 +class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#14 +ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/parameters.rb#7 +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#52 + def parameters; end + + # Returns both GET and POST parameters in a single hash. + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#52 + def params; end + + # Returns a hash with the parameters used to form the path of the request. + # Returned hash keys are symbols: + # + # { action: "my_action", controller: "my_controller" } + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#84 + def path_parameters; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#67 + def path_parameters=(parameters); end + + private + + # source://actionpack//lib/action_dispatch/http/parameters.rb#102 + def log_parse_error_once; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#114 + def params_parsers; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#89 + def parse_formatted_parameters(parsers); end +end + +# source://actionpack//lib/action_dispatch/http/parameters.rb#36 +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#46 + def parameter_parsers=(parsers); end +end + +# source://actionpack//lib/action_dispatch/http/parameters.rb#12 +ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/parameters.rb#10 +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#21 +class ActionDispatch::Http::Parameters::ParseError < ::StandardError + # @return [ParseError] a new instance of ParseError + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#22 + def initialize(message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/http/url.rb#9 +module ActionDispatch::Http::URL + # source://actionpack//lib/action_dispatch/http/url.rb#181 + 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#324 + 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#228 + 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#244 + 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#294 + 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#255 + 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#306 + 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#202 + 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#216 + def raw_host_with_port; end + + # source://actionpack//lib/action_dispatch/http/url.rb#14 + def secure_protocol; end + + # source://actionpack//lib/action_dispatch/http/url.rb#14 + 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#317 + 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#267 + 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#282 + 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#339 + 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#332 + def subdomains(tld_length = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/url.rb#15 + def tld_length; end + + # source://actionpack//lib/action_dispatch/http/url.rb#15 + 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#191 + 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#24 + 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#48 + 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#34 + def extract_subdomains(host, tld_length); end + + # source://actionpack//lib/action_dispatch/http/url.rb#60 + def full_url_for(options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#72 + def path_for(options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#14 + def secure_protocol; end + + # source://actionpack//lib/action_dispatch/http/url.rb#14 + def secure_protocol=(val); end + + # source://actionpack//lib/action_dispatch/http/url.rb#15 + def tld_length; end + + # source://actionpack//lib/action_dispatch/http/url.rb#15 + def tld_length=(val); end + + # source://actionpack//lib/action_dispatch/http/url.rb#52 + def url_for(options); end + + private + + # source://actionpack//lib/action_dispatch/http/url.rb#92 + def add_anchor(path, anchor); end + + # source://actionpack//lib/action_dispatch/http/url.rb#85 + def add_params(path, params); end + + # source://actionpack//lib/action_dispatch/http/url.rb#107 + def build_host_url(host, port, protocol, options, path); end + + # source://actionpack//lib/action_dispatch/http/url.rb#98 + def extract_domain_from(host, tld_length); end + + # source://actionpack//lib/action_dispatch/http/url.rb#102 + def extract_subdomains_from(host, tld_length); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/url.rb#131 + def named_host?(host); end + + # source://actionpack//lib/action_dispatch/http/url.rb#148 + def normalize_host(_host, options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#168 + def normalize_port(port, protocol); end + + # source://actionpack//lib/action_dispatch/http/url.rb#135 + def normalize_protocol(protocol); end + end +end + +# source://actionpack//lib/action_dispatch/http/url.rb#11 +ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/url.rb#10 +ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/url.rb#12 +ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch HTTP UploadedFile +# +# Models uploaded files. +# +# The actual file is accessible via the `tempfile` accessor, though some 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#17 +class ActionDispatch::Http::UploadedFile + # @raise [ArgumentError] + # @return [UploadedFile] a new instance of UploadedFile + # + # source://actionpack//lib/action_dispatch/http/upload.rb#31 + def initialize(hash); end + + # Shortcut for `tempfile.close`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#73 + 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#22 + def content_type; end + + # A string with the MIME type of the file. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#22 + def content_type=(_arg0); end + + # Shortcut for `tempfile.eof?`. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/upload.rb#98 + def eof?; end + + # A string with the headers of the multipart request. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#29 + def headers; end + + # A string with the headers of the multipart request. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#29 + def headers=(_arg0); end + + # Shortcut for `tempfile.open`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#68 + def open; end + + # The basename of the file in the client. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#19 + def original_filename; end + + # The basename of the file in the client. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#19 + def original_filename=(_arg0); end + + # Shortcut for `tempfile.path`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#78 + def path; end + + # Shortcut for `tempfile.read`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#63 + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end + + # Shortcut for `tempfile.rewind`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#88 + def rewind; end + + # Shortcut for `tempfile.size`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#93 + 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#26 + 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#26 + def tempfile=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/upload.rb#102 + def to_io; end + + # Shortcut for `tempfile.to_path`. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#83 + def to_path; end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#14 +module ActionDispatch::Integration; end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#15 +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#42 + 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. + # + # The HTTP_REFERER header will be set to the previous url. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#65 + def follow_redirect!(headers: T.unsafe(nil), **args); end + + # Performs a GET request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#18 + 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#48 + 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#54 + 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#30 + 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#24 + 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#36 + def put(path, **args); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#324 +module ActionDispatch::Integration::Runner + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # source://actionpack//lib/action_dispatch/testing/integration.rb#332 + def initialize(*args, &blk); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#329 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#402 + def assertions; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#406 + def assertions=(assertions); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def assigns(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#337 + def before_setup; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + 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#412 + def copy_session_variables!; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#352 + def create_session(app); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#418 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#422 + def default_url_options=(options); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def follow_redirect!(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def get(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def head(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#342 + 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#394 + def open_session; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def patch(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def post(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#375 + def put(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#364 + 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#348 + def reset!; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#330 + def root_session; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#330 + def root_session=(_arg0); end + + private + + # Delegate unhandled messages to the current session instance. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#432 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#427 + def respond_to_missing?(method, _); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#327 +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 Runner#open_session, +# rather than instantiating a Session directly. +# +# source://actionpack//lib/action_dispatch/testing/integration.rb#91 +class ActionDispatch::Integration::Session + include ::Minitest::Assertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + 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 + extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + + # Create and initialize a new Session instance. + # + # @return [Session] a new instance of Session + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#133 + def initialize(app); end + + # The Accept header to send. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#110 + def accept; end + + # The Accept header to send. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#110 + def accept=(_arg0); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + 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#119 + 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#114 + def cookies; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + def headers(*_arg0, **_arg1, &_arg2); end + + # The hostname used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#101 + 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#104 + 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#104 + 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#180 + 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#189 + def https?; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#98 + 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 RequestHelpers#get, + # RequestHelpers#post, or other standard HTTP methods in integration tests. + # `#process` is only required when using a request method that doesn't have a + # method defined in the integration tests. + # + # This method returns the response status, after performing the request. + # Furthermore, if this method was called from an ActionDispatch::IntegrationTest + # object, 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#225 + 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#97 + def redirect?(*_arg0, **_arg1, &_arg2); end + + # The remote_addr used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#107 + def remote_addr; end + + # The remote_addr used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#107 + def remote_addr=(_arg0); end + + # A reference to the request instance used by the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#122 + def request; end + + # A running counter of the number of requests processed. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#128 + def request_count; end + + # A running counter of the number of requests processed. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#128 + 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#156 + def reset!; end + + # A reference to the response instance used by the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#125 + def response; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + def status(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + def status_message(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#140 + def url_options; end + + private + + # source://actionpack//lib/action_dispatch/testing/integration.rb#308 + def _mock_session; end + + # @yield [location] + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#316 + def build_expanded_path(path); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#312 + def build_full_uri(path, env); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#92 +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 Integration::RequestHelpers#get and/or +# Integration::RequestHelpers#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 TestResponse#parsed_body on the response parses the response body +# based on the last response MIME type. +# +# Out of the box, only `:json` is supported. But for any custom MIME 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 +# TestResponse#parsed_body. +# +# Consult the [Rails Testing Guide](https://guides.rubyonrails.org/testing.html) +# for more. +# +# source://actionpack//lib/action_dispatch/testing/integration.rb#640 +class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper + include ::ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#650 +module ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper + extend ::ActiveSupport::Concern + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + + mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + + # source://actionpack//lib/action_dispatch/testing/integration.rb#683 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#687 + def document_root_element; end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#665 +module ActionDispatch::IntegrationTest::Behavior::ClassMethods + # source://actionpack//lib/action_dispatch/testing/integration.rb#666 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#674 + def app=(app); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#678 + def register_encoder(*args, **options); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#643 +module ActionDispatch::IntegrationTest::UrlOptions + extend ::ActiveSupport::Concern + + # source://actionpack//lib/action_dispatch/testing/integration.rb#645 + def url_options; end +end + +# :stopdoc: +# +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#6 +module ActionDispatch::Journey; end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#9 +class ActionDispatch::Journey::Ast + # @return [Ast] a new instance of Ast + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#13 + def initialize(tree, formatted); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#38 + def glob?; end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def names; end + + # Returns the value of attribute path_params. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def path_params; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#25 + def requirements=(requirements); end + + # Returns the value of attribute tree. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def root; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#34 + def route=(route); end + + # Returns the value of attribute terminals. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def terminals; end + + # Returns the value of attribute tree. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def tree; end + + # Returns the value of attribute wildcard_options. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#10 + def wildcard_options; end + + private + + # Returns the value of attribute stars. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#43 + def stars; end + + # Returns the value of attribute symbols. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#43 + def symbols; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#45 + def visit_tree(formatted); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#8 +class ActionDispatch::Journey::Format + # @return [Format] a new instance of Format + # + # source://actionpack//lib/action_dispatch/journey/visitors.rb#24 + def initialize(parts); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#39 + def evaluate(hash); end + + class << self + # source://actionpack//lib/action_dispatch/journey/visitors.rb#16 + def required_path(symbol); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#20 + def required_segment(symbol); end + end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#9 +ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#10 +ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#12 +class ActionDispatch::Journey::Format::Parameter < ::Struct + # source://actionpack//lib/action_dispatch/journey/visitors.rb#13 + 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#12 +class ActionDispatch::Journey::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#15 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#105 + def clear; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#109 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#61 + def generate(name, options, path_parameters); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#13 + def routes; end + + private + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#209 + def build_cache; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#220 + def cache; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#115 + def extract_parameterized_parts(route, options, recall); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#142 + 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#181 + def missing_keys(route, parts); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#138 + def named_routes; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#164 + def non_recursive(cache, options); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#201 + def possibles(cache, options, depth = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/journey/formatter.rb#34 +class ActionDispatch::Journey::Formatter::MissingRoute + # @return [MissingRoute] a new instance of MissingRoute + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#37 + def initialize(constraints, missing_keys, unmatched_keys, routes, name); end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def constraints; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#53 + def message; end + + # Returns the value of attribute missing_keys. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def missing_keys; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def name; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#49 + def params; end + + # @raise [ActionController::UrlGenerationError] + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#45 + def path(method_name); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def routes; end + + # Returns the value of attribute unmatched_keys. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def unmatched_keys; end +end + +# source://actionpack//lib/action_dispatch/journey/formatter.rb#20 +class ActionDispatch::Journey::Formatter::RouteWithParams + # @return [RouteWithParams] a new instance of RouteWithParams + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#23 + def initialize(route, parameterized_parts, params); end + + # Returns the value of attribute params. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#21 + def params; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#29 + def path(_); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#9 +module ActionDispatch::Journey::GTG; end + +# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#10 +class ActionDispatch::Journey::GTG::Builder + # @return [Builder] a new instance of Builder + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#15 + def initialize(root); end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 + def ast; end + + # Returns the value of attribute endpoints. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 + def endpoints; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#87 + def firstpos(node); end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#108 + def lastpos(node); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#66 + def nullable?(node); end + + # Returns the value of attribute root. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 + def root; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#21 + def transition_table; end + + private + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#130 + def build_followpos; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#143 + def symbol(edge); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 +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#10 +class ActionDispatch::Journey::GTG::MatchData + # @return [MatchData] a new instance of MatchData + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#13 + def initialize(memos); end + + # Returns the value of attribute memos. + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#11 + def memos; end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#18 +class ActionDispatch::Journey::GTG::Simulator + # @return [Simulator] a new instance of Simulator + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#23 + def initialize(transition_table); end + + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#27 + def memos(string); end + + # Returns the value of attribute tt. + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#21 + def tt; end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#19 +ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#10 +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#18 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#165 + def []=(from, to, sym); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#34 + def accepting?(state); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#30 + def accepting_states; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#26 + def add_accepting(state); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#38 + def add_memo(idx, memo); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#100 + def as_json(options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#46 + def eclosure(t); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#42 + def memo(idx); end + + # Returns the value of attribute memos. + # + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#13 + def memos; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#50 + def move(t, full_string, start_index, end_index); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#182 + def states; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#117 + def to_svg; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#189 + def transitions; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#127 + def visualizer(paths, title = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#200 + def states_hash_for(sym); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#15 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#16 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#7 +module ActionDispatch::Journey::NFA; end + +# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#8 +module ActionDispatch::Journey::NFA::Dot + # source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#9 + def to_dot; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#68 +module ActionDispatch::Journey::Nodes; end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 +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#184 + def initialize(left, right); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#189 + def children; end + + # Returns the value of attribute right. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#182 + 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#182 + def right=(_arg0); end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#192 +class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#193 + def cat?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#194 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#133 +class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#134 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#121 +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#122 + def initialize(x = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#126 + def literal?; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#158 +class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#160 + def group?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#159 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#116 +class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#117 + def literal?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#118 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#69 +class ActionDispatch::Journey::Nodes::Node + include ::Enumerable + + # @return [Node] a new instance of Node + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#74 + def initialize(left); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#107 + def cat?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#79 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#108 + def group?; end + + # Returns the value of attribute left. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#72 + 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#72 + def left=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#104 + def literal?; end + + # Returns the value of attribute memo. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#72 + 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#72 + def memo=(_arg0); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#95 + def name; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#106 + def star?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#103 + def symbol?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#105 + def terminal?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#87 + def to_dot; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#83 + def to_s; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#91 + def to_sym; end + + # @raise [NotImplementedError] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#99 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#197 +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#200 + def initialize(children); end + + # Returns the value of attribute children. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#198 + def children; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#204 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#129 +class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#130 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 +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#166 + def initialize(left); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#176 + def name; end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#164 + 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#164 + def regexp=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#173 + def star?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#174 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 +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#144 + def initialize(left, regexp = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#140 + def name; end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#138 + 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#138 + def regexp=(_arg0); end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#138 + def symbol; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#151 + def symbol?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#150 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#142 +ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#143 +ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#111 +class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#72 + def symbol; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#113 + def terminal?; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#154 +class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#155 + def children; end +end + +# source://actionpack//lib/action_dispatch/journey/parser.rb#8 +class ActionDispatch::Journey::Parser + include ::ActionDispatch::Journey::Nodes + + # @return [Parser] a new instance of Parser + # + # source://actionpack//lib/action_dispatch/journey/parser.rb#15 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#20 + def parse(string); end + + private + + # source://actionpack//lib/action_dispatch/journey/parser.rb#27 + def advance_token; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#31 + def do_parse; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#58 + def parse_expression; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#35 + def parse_expressions; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#74 + def parse_group; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#52 + def parse_or(lhs); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#68 + def parse_star; end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#86 + def parse_terminal; end + + class << self + # source://actionpack//lib/action_dispatch/journey/parser.rb#11 + def parse(string); end + end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 +module ActionDispatch::Journey::Path; end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#8 +class ActionDispatch::Journey::Path::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#11 + def initialize(ast, requirements, separators, anchored); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#159 + def =~(other); end + + # Returns the value of attribute anchored. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def anchored; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#25 + def build_formatter; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#29 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#159 + def match(other); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#165 + def match?(other); end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#62 + def optional_names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#58 + def required_names; end + + # Returns the value of attribute requirements. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def requirements; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#36 + def requirements_anchored?; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#177 + def requirements_for_missing_keys_check; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#169 + def source; end + + # Returns the value of attribute spec. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def spec; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#173 + def to_regexp; end + + private + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#188 + def offsets; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#184 + def regexp_visitor; end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#68 +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#69 + def initialize(separator, matchers); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#76 + def accept(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#80 + def visit_CAT(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#97 + def visit_DOT(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#93 + def visit_GROUP(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#97 + def visit_LITERAL(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#111 + def visit_OR(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#102 + def visit_SLASH(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#106 + def visit_STAR(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#84 + def visit_SYMBOL(node); end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#124 +class ActionDispatch::Journey::Path::Pattern::MatchData + # @return [MatchData] a new instance of MatchData + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#127 + def initialize(names, offsets, match); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#141 + def [](x); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#133 + def captures; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#146 + def length; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#137 + def named_captures; end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#125 + def names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#150 + def post_match; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#154 + def to_s; end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#117 +class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#118 + def accept(node); end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#8 +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#58 + def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil), source_location: T.unsafe(nil)); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def app; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def ast; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def conditions; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def constraints; end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def defaults; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#144 + def dispatcher?; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#80 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#122 + def format(path_options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#140 + def glob?; end + + # Returns the value of attribute internal. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def internal; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#166 + def ip; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#148 + def matches?(request); end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def name; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#117 + def parts; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def path; end + + # Returns the value of attribute precedence. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def precedence; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#130 + def required_default?(key); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#134 + def required_defaults; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#105 + def required_keys; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#126 + 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){5}/} as + # requirements. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#95 + def requirements; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#170 + def requires_matching_verb?; end + + # Returns the value of attribute scope_options. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def scope_options; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#109 + def score(supplied_keys); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#117 + def segment_keys; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#101 + def segments; end + + # Returns the value of attribute source_location. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#9 + def source_location; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#174 + def verb; end + + private + + # source://actionpack//lib/action_dispatch/journey/route.rb#183 + def match_verb(request); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#179 + def verbs; end + + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#49 + def verb_matcher(verb); end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#14 +module ActionDispatch::Journey::Route::VerbMatchers; end + +# source://actionpack//lib/action_dispatch/journey/route.rb#36 +class ActionDispatch::Journey::Route::VerbMatchers::All + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#37 + def call(_); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#38 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::DELETE + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::GET + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::HEAD + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::LINK + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::PATCH + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::POST + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::PUT + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::TRACE + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#19 +class ActionDispatch::Journey::Route::VerbMatchers::UNLINK + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#21 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#20 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#26 +class ActionDispatch::Journey::Route::VerbMatchers::Unknown + # @return [Unknown] a new instance of Unknown + # + # source://actionpack//lib/action_dispatch/journey/route.rb#29 + def initialize(verb); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#33 + def call(request); end + + # Returns the value of attribute verb. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#27 + def verb; end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#15 +ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/route.rb#41 +ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#7 +class ActionDispatch::Journey::Router + # @return [Router] a new instance of Router + # + # source://actionpack//lib/action_dispatch/journey/router.rb#22 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#26 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#68 + def recognize(rails_req); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/router.rb#20 + 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#20 + def routes=(_arg0); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#33 + def serve(req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#81 + def visualizer; end + + private + + # source://actionpack//lib/action_dispatch/journey/router.rb#95 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#103 + def custom_routes; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#107 + def filter_routes(path); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#112 + def find_routes(req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#137 + def match_head_routes(routes, req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#89 + def partitioned_routes; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#99 + def simulator; end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#8 +class ActionDispatch::Journey::Router::Utils + class << self + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#91 + def escape_fragment(fragment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#83 + def escape_path(path); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#87 + 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#19 + 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#99 + def unescape_uri(uri); end + end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#81 +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#34 +class ActionDispatch::Journey::Router::Utils::UriEncoder + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#52 + def escape_fragment(fragment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#56 + def escape_path(path); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#60 + def escape_segment(segment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#64 + def unescape_uri(uri); end + + private + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#70 + def escape(component, pattern); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#74 + def percent_encode(unsafe); end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#41 +ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#39 +ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#42 +ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#38 +ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#35 +ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#46 +ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#48 +ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#50 +ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#49 +ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#44 +ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#43 +ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#36 +ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#37 +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#9 +class ActionDispatch::Journey::Routes + include ::Enumerable + + # @return [Routes] a new instance of Routes + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#14 + def initialize(routes = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#67 + def add_route(name, mapping); end + + # Returns the value of attribute anchored_routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#12 + def anchored_routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#53 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#39 + def clear; end + + # Returns the value of attribute custom_routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#12 + def custom_routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#35 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#22 + def empty?; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#31 + def last; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#26 + def length; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#45 + def partition_route(route); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#12 + def routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#60 + def simulator; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#26 + def size; end + + private + + # source://actionpack//lib/action_dispatch/journey/routes.rb#76 + def clear_cache!; end +end + +# source://actionpack//lib/action_dispatch/journey/scanner.rb#9 +class ActionDispatch::Journey::Scanner + # @return [Scanner] a new instance of Scanner + # + # source://actionpack//lib/action_dispatch/journey/scanner.rb#28 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#48 + def last_literal; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#44 + def last_string; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#37 + def next_token; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#33 + def scan_setup(str); end + + private + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#55 + def scan; end +end + +# source://actionpack//lib/action_dispatch/journey/scanner.rb#10 +ActionDispatch::Journey::Scanner::STATIC_TOKENS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/scanner.rb#20 +class ActionDispatch::Journey::Scanner::Scanner < ::StringScanner + # source://actionpack//lib/action_dispatch/journey/scanner.rb#22 + def peek_byte; end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#55 +module ActionDispatch::Journey::Visitors; end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#196 +class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # @return [Dot] a new instance of Dot + # + # source://actionpack//lib/action_dispatch/journey/visitors.rb#197 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#202 + def accept(node, seed = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#217 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#224 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#256 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#231 + def unary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#241 + def visit_CAT(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#236 + def visit_GROUP(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#251 + def visit_OR(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#246 + def visit_STAR(node, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#262 +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#161 +class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#162 + def visit(node, block); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#167 +ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#136 +class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#137 + def accept(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#140 + def binary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#138 + def terminal(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#144 + def visit_GROUP(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#146 + def visit_STAR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#150 + def visit_SYMBOL(n); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#97 +class ActionDispatch::Journey::Visitors::FunctionalVisitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#100 + def accept(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#108 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#113 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#124 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#118 + def unary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#104 + def visit(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#111 + def visit_CAT(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#128 + def visit_DOT(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#121 + def visit_GROUP(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#125 + def visit_LITERAL(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#116 + def visit_OR(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#127 + def visit_SLASH(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#122 + def visit_STAR(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#126 + def visit_SYMBOL(n, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#98 +ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#170 +class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#172 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#176 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#185 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#189 + def visit_GROUP(node, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#193 +ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#56 +class ActionDispatch::Journey::Visitors::Visitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#59 + def accept(node); end + + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#68 + def binary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#74 + def nary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#85 + def terminal(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#79 + def unary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#64 + def visit(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#72 + def visit_CAT(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#89 + def visit_DOT(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#82 + def visit_GROUP(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#86 + def visit_LITERAL(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#77 + def visit_OR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#88 + def visit_SLASH(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#83 + def visit_STAR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#87 + def visit_SYMBOL(n); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#57 +ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/log_subscriber.rb#6 +class ActionDispatch::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://actionpack//lib/action_dispatch/log_subscriber.rb#7 + def redirect(event); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + end +end + +# # Action Dispatch MiddlewareStack +# +# Read more about [Rails middleware +# stack](https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) +# in the guides. +# +# source://actionpack//lib/action_dispatch/middleware/stack.rb#14 +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#76 + def initialize(*args); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#93 + def [](i); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#166 + 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#131 + 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#139 + def delete!(target); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#81 + def each(&block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#106 + def insert(index, klass, *args, **_arg3, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#114 + def insert_after(index, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#106 + def insert_before(index, klass, *args, **_arg3, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#89 + def last; end + + # Returns the value of attribute middlewares. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#74 + 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#74 + def middlewares=(_arg0); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#143 + def move(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#153 + def move_after(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#143 + def move_before(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#85 + def size; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#120 + def swap(target, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#97 + def unshift(klass, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#161 + def use(klass, *args, **_arg2, &block); end + + private + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#178 + def assert_index(index, where); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#184 + def build_middleware(klass, args, block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#188 + def index_of(klass); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#102 + 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#54 +class ActionDispatch::MiddlewareStack::InstrumentationProxy + # @return [InstrumentationProxy] a new instance of InstrumentationProxy + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#57 + def initialize(middleware, class_name); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#65 + def call(env); end +end + +# source://actionpack//lib/action_dispatch/middleware/stack.rb#55 +ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/stack.rb#15 +class ActionDispatch::MiddlewareStack::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#18 + def initialize(klass, args, block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#26 + def ==(middleware); end + + # Returns the value of attribute args. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#16 + def args; end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#16 + def block; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#43 + def build(app); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#47 + def build_instrumented(app); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#35 + def inspect; end + + # Returns the value of attribute klass. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#16 + def klass; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#24 + def name; end +end + +# source://actionpack//lib/action_dispatch.rb#50 +class ActionDispatch::MissingController < ::NameError; end + +# # Action Dispatch PermissionsPolicy +# +# Configures the HTTP +# [Feature-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy) +# response header to specify which browser features the current +# document and 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 +# +# 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#31 +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 display_capture(*sources); 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 hid(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def idle_detection(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def keyboard_map(*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 screen_wake_lock(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def serial(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def sync_xhr(*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 web_share(*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/main/features.md#policy-controlled-features +# +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#84 +ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#77 +ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#32 +class ActionDispatch::PermissionsPolicy::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#33 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#37 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#60 + def policy_empty?(policy); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#56 + def policy_present?(headers); end +end + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#65 +module ActionDispatch::PermissionsPolicy::Request + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#68 + def permissions_policy; end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#72 + def permissions_policy=(policy); end +end + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#66 +ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# # Action Dispatch PublicExceptions +# +# When called, this middleware renders an error page. By default if an HTML +# response is expected it will render static error pages from the `/public` +# directory. For example when this middleware receives a 500 response it will +# 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#18 +class ActionDispatch::PublicExceptions + # @return [PublicExceptions] a new instance of PublicExceptions + # + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#21 + def initialize(public_path); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#25 + def call(env); end + + # Returns the value of attribute public_path. + # + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#19 + 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#19 + def public_path=(_arg0); end + + private + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#39 + def render(status, content_type, body); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#48 + def render_format(status, content_type, body); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#53 + def render_html(status); end +end + +# source://actionpack//lib/action_dispatch/railtie.rb#10 +class ActionDispatch::Railtie < ::Rails::Railtie; end + +# # Action Dispatch Reloader +# +# ActionDispatch::Reloader wraps the request with callbacks provided by +# ActiveSupport::Reloader, intended to assist with code reloading during +# development. +# +# ActionDispatch::Reloader is included in the middleware stack only if reloading +# is enabled, which it is by the default in `development` mode. +# +# source://actionpack//lib/action_dispatch/middleware/reloader.rb#14 +class ActionDispatch::Reloader < ::ActionDispatch::Executor; end + +# # Action Dispatch RemoteIp +# +# This middleware calculates the IP address of the remote client that is making +# the request. It does this by checking various headers that could contain the +# address, and then picking the last-set address that is not on the list of +# trusted IPs. This follows the precedent set by e.g. [the Tomcat +# server](https://issues.apache.org/bugzilla/show_bug.cgi?id=50453). 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. Alternatively, remove this middleware to avoid inadvertently +# relying on it. +# +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#33 +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#65 + 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#93 + def call(env); end + + # Returns the value of attribute check_ip. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#49 + def check_ip; end + + # Returns the value of attribute proxies. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#49 + 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#102 +class ActionDispatch::RemoteIp::GetIp + # @return [GetIp] a new instance of GetIp + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#103 + 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://web.archive.org/web/20170626095448/https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/), + # while the first IP in the list is likely to be the "originating" IP, it + # could also have been set by the client maliciously. + # + # 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#127 + 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#171 + def to_s; end + + private + + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#191 + def filter_proxies(ips); end + + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#176 + def ips_from(header); end +end + +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#34 +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#40 +ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#20 +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#64 + def initialize(env); end + + # Override Rack's GET method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#389 + def GET; end + + # Override Rack's POST method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#405 + def POST; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def accept; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def accept_charset; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def accept_encoding; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def accept_language; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#421 + 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#351 + def body; end + + # source://actionpack//lib/action_dispatch/http/request.rb#371 + def body_stream; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def cache_control; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def client_ip; end + + # source://actionpack//lib/action_dispatch/http/request.rb#74 + def commit_cookie_jar!; end + + # source://actionpack//lib/action_dispatch/http/request.rb#453 + def commit_csrf_token; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#71 + def commit_flash; end + + # Returns the content length of the request as an integer. + # + # source://actionpack//lib/action_dispatch/http/request.rb#286 + def content_length; end + + # source://actionpack//lib/action_dispatch/http/request.rb#83 + def controller_class; end + + # source://actionpack//lib/action_dispatch/http/request.rb#89 + def controller_class_for(name); end + + # source://actionpack//lib/action_dispatch/http/request.rb#185 + def controller_instance; end + + # source://actionpack//lib/action_dispatch/http/request.rb#189 + def controller_instance=(controller); end + + # source://actionpack//lib/action_dispatch/http/request.rb#171 + def engine_script_name(_routes); end + + # source://actionpack//lib/action_dispatch/http/request.rb#175 + 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#367 + def form_data?; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#265 + def fullpath; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#227 + def headers; end + + # source://actionpack//lib/action_dispatch/http/request.rb#193 + def http_auth_salt; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#20 + def ignore_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#20 + def ignore_accept_header=(val); end + + # source://actionpack//lib/action_dispatch/http/request.rb#445 + def inspect; end + + # Returns the IP address of client as a `String`. + # + # source://actionpack//lib/action_dispatch/http/request.rb#300 + 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#110 + 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#429 + def local?; end + + # source://actionpack//lib/action_dispatch/http/request.rb#438 + 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#281 + 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. + # + # For debugging purposes, when called with arguments this method will fall back + # to Object#method + # + # source://actionpack//lib/action_dispatch/http/request.rb#207 + def method(*args, **_arg1); end + + # Returns a symbol form of the #method. + # + # source://actionpack//lib/action_dispatch/http/request.rb#220 + def method_symbol; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def negotiate; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#254 + def original_fullpath; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#273 + def original_url; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def path_translated; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def pragma; end + + # Override Rack's GET method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#389 + 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#342 + def raw_post; end + + # source://rack/3.1.7/lib/rack/request.rb#197 + def raw_request_method; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def remote_addr; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def remote_host; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#306 + def remote_ip; end + + # source://actionpack//lib/action_dispatch/http/request.rb#310 + def remote_ip=(remote_ip); end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#325 + def request_id; end + + # source://actionpack//lib/action_dispatch/http/request.rb#329 + 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#147 + def request_method; end + + # source://actionpack//lib/action_dispatch/http/request.rb#179 + def request_method=(request_method); end + + # Returns a symbol form of the #request_method. + # + # source://actionpack//lib/action_dispatch/http/request.rb#198 + def request_method_symbol; end + + # Override Rack's POST method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#405 + def request_parameters; end + + # source://actionpack//lib/action_dispatch/http/request.rb#433 + def request_parameters=(params); end + + # source://actionpack//lib/action_dispatch/http/request.rb#449 + def reset_csrf_token; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 + def reset_session; end + + # Returns the URI pattern of the matched route for the request, using the same + # format as `bin/rails routes`: + # + # request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)" + # + # source://actionpack//lib/action_dispatch/http/request.rb#155 + def route_uri_pattern; end + + # source://actionpack//lib/action_dispatch/http/request.rb#159 + def route_uri_pattern=(pattern); end + + # source://actionpack//lib/action_dispatch/http/request.rb#163 + def routes; end + + # source://actionpack//lib/action_dispatch/http/request.rb#167 + 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,; 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#243 + def send_early_hints(links); end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def server_name; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def server_protocol; end + + # Returns the lowercase name of the HTTP server software. + # + # source://actionpack//lib/action_dispatch/http/request.rb#336 + def server_software; end + + # source://actionpack//lib/action_dispatch/http/request.rb#380 + def session=(session); end + + # source://actionpack//lib/action_dispatch/http/request.rb#384 + def session_options=(options); 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#325 + def uuid; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def version; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def x_csrf_token; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def x_forwarded_for; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + def x_forwarded_host; end + + # source://actionpack//lib/action_dispatch/http/request.rb#52 + 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#294 + 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#294 + def xml_http_request?; end + + private + + # source://actionpack//lib/action_dispatch/http/request.rb#458 + def check_method(name); end + + # source://actionpack//lib/action_dispatch/http/request.rb#466 + def default_session; end + + # source://actionpack//lib/action_dispatch/http/request.rb#470 + def read_body_stream; end + + # source://actionpack//lib/action_dispatch/http/request.rb#482 + def reset_stream(body_stream); end + + class << self + # source://actionpack//lib/action_dispatch/http/request.rb#60 + def empty; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#20 + def ignore_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#20 + def ignore_accept_header=(val); end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#30 + def parameter_parsers; end + end +end + +# source://actionpack//lib/action_dispatch/http/request.rb#315 +ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/request.rb#36 +ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#131 +ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#133 +ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/request.rb#34 +ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/request.rb#77 +class ActionDispatch::Request::PASS_NOT_FOUND + class << self + # source://actionpack//lib/action_dispatch/http/request.rb#78 + def action(_); end + + # source://actionpack//lib/action_dispatch/http/request.rb#80 + def action_encoding_template(action); end + + # source://actionpack//lib/action_dispatch/http/request.rb#79 + def call(_); end + end +end + +# HTTP methods from [RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV](https://www.ietf.org/rfc/rfc2518.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#117 +ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1](https://www.ietf.org/rfc/rfc2616.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#115 +ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3253: Versioning Extensions to WebDAV](https://www.ietf.org/rfc/rfc3253.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#119 +ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3648: WebDAV Ordered Collections Protocol](https://www.ietf.org/rfc/rfc3648.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#121 +ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 3744: WebDAV Access Control Protocol](https://www.ietf.org/rfc/rfc3744.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#123 +ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 4791: Calendaring Extensions to WebDAV](https://www.ietf.org/rfc/rfc4791.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#127 +ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 5323: WebDAV SEARCH](https://www.ietf.org/rfc/rfc5323.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#125 +ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) + +# HTTP methods from [RFC 5789: PATCH Method for HTTP](https://www.ietf.org/rfc/rfc5789.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#129 +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#10 +class ActionDispatch::Request::Session + # @return [Session] a new instance of Session + # + # source://actionpack//lib/action_dispatch/request/session.rb#76 + 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#114 + def [](key); end + + # Writes given value to given key of the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#154 + def []=(key, value); end + + # Clears the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#160 + def clear; end + + # Deletes given key from the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#193 + def delete(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#99 + 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#127 + def dig(*keys); end + + # source://actionpack//lib/action_dispatch/request/session.rb#244 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#239 + def empty?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#91 + def enabled?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#229 + 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#212 + 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#134 + def has_key?(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#87 + def id; end + + # source://actionpack//lib/action_dispatch/request/session.rb#248 + def id_was; end + + # Returns true if the session has the given key or false. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#134 + def include?(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#221 + def inspect; end + + # Returns true if the session has the given key or false. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#134 + def key?(key); end + + # Returns keys of the session as Array. + # + # source://actionpack//lib/action_dispatch/request/session.rb#142 + def keys; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#235 + def loaded?; 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#182 + def merge!(hash); end + + # source://actionpack//lib/action_dispatch/request/session.rb#95 + def options; end + + # Returns the session as Hash. + # + # source://actionpack//lib/action_dispatch/request/session.rb#166 + def to_h; end + + # Returns the session as Hash. + # + # source://actionpack//lib/action_dispatch/request/session.rb#166 + 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#182 + def update(hash); end + + # Returns values of the session as Array. + # + # source://actionpack//lib/action_dispatch/request/session.rb#148 + def values; end + + private + + # source://actionpack//lib/action_dispatch/request/session.rb#270 + def load!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#266 + def load_for_delete!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#254 + def load_for_read!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#258 + 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#19 + def create(store, req, default_options); end + + # source://actionpack//lib/action_dispatch/request/session.rb#43 + def delete(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#29 + def disabled(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#35 + def find(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#39 + def set(req, session); end + end +end + +# source://actionpack//lib/action_dispatch/request/session.rb#11 +class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end + +# source://actionpack//lib/action_dispatch/request/session.rb#12 +ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/request/session.rb#13 +ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/request/session.rb#47 +class ActionDispatch::Request::Session::Options + # @return [Options] a new instance of Options + # + # source://actionpack//lib/action_dispatch/request/session.rb#56 + def initialize(by, default_options); end + + # source://actionpack//lib/action_dispatch/request/session.rb#61 + def [](key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#71 + def []=(k, v); end + + # source://actionpack//lib/action_dispatch/request/session.rb#65 + def id(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#72 + def to_hash; end + + # source://actionpack//lib/action_dispatch/request/session.rb#73 + def values_at(*args); end + + class << self + # source://actionpack//lib/action_dispatch/request/session.rb#52 + def find(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#48 + 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#16 +ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/http/request.rb#58 +ActionDispatch::Request::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/request/utils.rb#9 +class ActionDispatch::Request::Utils + # source://actionpack//lib/action_dispatch/request/utils.rb#10 + def perform_deep_munge; end + + # source://actionpack//lib/action_dispatch/request/utils.rb#10 + def perform_deep_munge=(val); end + + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#31 + def check_param_encoding(params); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#12 + def each_param_value(params, &block); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#23 + def normalize_encode_params(params); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#10 + def perform_deep_munge; end + + # source://actionpack//lib/action_dispatch/request/utils.rb#10 + def perform_deep_munge=(val); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#46 + def set_binary_encoding(request, params, controller, action); end + end +end + +# source://actionpack//lib/action_dispatch/request/utils.rb#85 +class ActionDispatch::Request::Utils::CustomParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#101 + def action_encoding_template(request, controller, action); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#86 + def encode(request, params, controller, action); end + end +end + +# Remove nils from the params hash. +# +# source://actionpack//lib/action_dispatch/request/utils.rb#77 +class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#78 + def handle_array(params); end + end +end + +# source://actionpack//lib/action_dispatch/request/utils.rb#50 +class ActionDispatch::Request::Utils::ParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#71 + def handle_array(params); end + + # Convert nested Hash to HashWithIndifferentAccess. + # + # source://actionpack//lib/action_dispatch/request/utils.rb#52 + def normalize_encode_params(params); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#12 +module ActionDispatch::RequestCookieMethods + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#50 + def authenticated_encrypted_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#13 + def cookie_jar; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#30 + def cookie_jar=(jar); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#78 + def cookies_digest; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#82 + def cookies_rotations; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#74 + def cookies_same_site_protection; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#70 + def cookies_serializer; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#58 + def encrypted_cookie_cipher; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#42 + def encrypted_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#46 + def encrypted_signed_cookie_salt; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#26 + def have_cookie_jar?; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#34 + def key_generator; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#66 + def secret_key_base; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#62 + def signed_cookie_digest; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#38 + def signed_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#54 + def use_authenticated_cookie_encryption; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#86 + def use_cookies_with_metadata; end +end + +# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 +class ActionDispatch::RequestEncoder + # @return [RequestEncoder] a new instance of RequestEncoder + # + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#20 + def initialize(mime_name, param_encoder, response_parser); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#36 + def accept_header; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#32 + def content_type; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#40 + def encode_params(params); end + + # Returns the value of attribute response_parser. + # + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#18 + def response_parser; end + + class << self + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#49 + def encoder(name); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#44 + def parser(content_type); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#53 + 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#9 +class ActionDispatch::RequestEncoder::IdentityEncoder + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#11 + def accept_header; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#10 + def content_type; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#12 + def encode_params(params); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#13 + def response_parser; end +end + +# # Action Dispatch RequestId +# +# Makes a unique request id available to the `action_dispatch.request_id` env +# variable (which is then accessible through ActionDispatch::Request#request_id +# or the alias ActionDispatch::Request#uuid) and sends the same id to the client +# via the `X-Request-Id` header. +# +# 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#24 +class ActionDispatch::RequestId + # @return [RequestId] a new instance of RequestId + # + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#25 + def initialize(app, header:); end + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#31 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#46 + def internal_request_id; end + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#38 + def make_request_id(request_id); end +end + +# # Action Dispatch Response +# +# Represents an HTTP response generated by a controller action. Use it to +# retrieve the current state of the response, or customize the response. It can +# either represent a real HTTP response (i.e. one that is meant to be sent back +# to the web browser) or a TestResponse (i.e. one that is generated from +# integration tests). +# +# The Response object for the current request is exposed on controllers as +# ActionController::Metal#response. ActionController::Metal also provides a few +# additional methods that delegate to attributes of the Response such as +# ActionController::Metal#headers. +# +# Integration tests will likely also want to inspect responses in more detail. +# Methods such as Integration::RequestHelpers#get and +# Integration::RequestHelpers#post return instances of TestResponse (which +# inherits from Response) for this purpose. +# +# For example, the following demo integration test prints the body of the +# controller response to the console: +# +# 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#38 +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#171 + def initialize(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#75 + def [](*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/http/response.rb#75 + def []=(*_arg0, **_arg1, &_arg2); end + + # Aliasing these off because AD::Http::Cache::Response defines them. + # + # source://rack/3.1.7/lib/rack/response.rb#290 + def _cache_control; end + + # source://rack/3.1.7/lib/rack/response.rb#294 + def _cache_control=(value); end + + # source://actionpack//lib/action_dispatch/http/response.rb#396 + def abort; end + + # source://actionpack//lib/action_dispatch/http/response.rb#197 + def await_commit; end + + # source://actionpack//lib/action_dispatch/http/response.rb#203 + 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#330 + def body; end + + # Allows you to manually set or override the response body. + # + # source://actionpack//lib/action_dispatch/http/response.rb#339 + def body=(body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#383 + 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#300 + 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#289 + def charset=(charset); end + + # source://actionpack//lib/action_dispatch/http/response.rb#392 + def close; end + + # Returns a string to ensure compatibility with `Net::HTTPResponse`. + # + # source://actionpack//lib/action_dispatch/http/response.rb#311 + def code; end + + # source://actionpack//lib/action_dispatch/http/response.rb#207 + def commit!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#231 + def committed?; end + + # Content type of response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#269 + 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#259 + 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#419 + def cookies; end + + # source://actionpack//lib/action_dispatch/http/response.rb#88 + def default_charset; end + + # source://actionpack//lib/action_dispatch/http/response.rb#88 + def default_charset=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#89 + def default_headers; end + + # source://actionpack//lib/action_dispatch/http/response.rb#89 + def default_headers=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#195 + def delete_header(key); end + + # source://actionpack//lib/action_dispatch/http/response.rb#77 + def each(&block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#193 + def get_header(key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#192 + def has_header?(key); end + + # The headers for the response. + # + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" + # + # Also aliased as `headers`. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" + # + # Also aliased as `header` for compatibility. + # + # source://actionpack//lib/action_dispatch/http/response.rb#71 + def header; end + + # The headers for the response. + # + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" + # + # Also aliased as `headers`. + # + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" + # + # Also aliased as `header` for compatibility. + # + # source://actionpack//lib/action_dispatch/http/response.rb#71 + def headers; end + + # Media type of response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#274 + 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#323 + 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#410 + def prepare!; end + + # The location header we'll be responding with. + # + # source://rack/3.1.7/lib/rack/response.rb#262 + def redirect_url; end + + # The request that the response is responding to. + # + # source://actionpack//lib/action_dispatch/http/response.rb#53 + def request; end + + # The request that the response is responding to. + # + # source://actionpack//lib/action_dispatch/http/response.rb#53 + def request=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/response.rb#379 + def reset_body!; end + + # The response code of the request. + # + # source://actionpack//lib/action_dispatch/http/response.rb#306 + def response_code; end + + # Send the file stored at `path` as the response body. + # + # source://actionpack//lib/action_dispatch/http/response.rb#374 + def send_file(path); end + + # source://actionpack//lib/action_dispatch/http/response.rb#215 + def sending!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#230 + def sending?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#278 + def sending_file=(v); end + + # source://actionpack//lib/action_dispatch/http/response.rb#223 + def sent!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#232 + def sent?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#194 + def set_header(key, v); end + + # The HTTP status code. + # + # source://actionpack//lib/action_dispatch/http/response.rb#56 + def status; end + + # Sets the HTTP status code. + # + # source://actionpack//lib/action_dispatch/http/response.rb#247 + 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#323 + def status_message; end + + # The underlying body, as a streamable object. + # + # source://actionpack//lib/action_dispatch/http/response.rb#169 + 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#410 + def to_a; end + + # source://actionpack//lib/action_dispatch/http/response.rb#334 + def write(string); end + + private + + # source://actionpack//lib/action_dispatch/http/response.rb#489 + def assign_default_content_type_and_charset!; end + + # source://actionpack//lib/action_dispatch/http/response.rb#463 + def before_committed; end + + # source://actionpack//lib/action_dispatch/http/response.rb#471 + def before_sending; end + + # source://actionpack//lib/action_dispatch/http/response.rb#481 + def build_buffer(response, body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#539 + def handle_no_content!; end + + # source://actionpack//lib/action_dispatch/http/response.rb#485 + def munge_body_object(body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#443 + 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#453 + def parsed_content_type_header; end + + # source://actionpack//lib/action_dispatch/http/response.rb#546 + def rack_response(status, headers); end + + # source://actionpack//lib/action_dispatch/http/response.rb#457 + def set_content_type(content_type, charset); end + + class << self + # source://actionpack//lib/action_dispatch/http/response.rb#159 + def create(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#88 + def default_charset; end + + # source://actionpack//lib/action_dispatch/http/response.rb#88 + def default_charset=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#89 + def default_headers; end + + # source://actionpack//lib/action_dispatch/http/response.rb#89 + def default_headers=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#164 + def merge_default_headers(original, default); end + end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#100 +class ActionDispatch::Response::Buffer + # @return [Buffer] a new instance of Buffer + # + # source://actionpack//lib/action_dispatch/http/response.rb#101 + def initialize(response, buf); end + + # @raise [IOError] + # + # source://actionpack//lib/action_dispatch/http/response.rb#122 + def <<(string); end + + # source://actionpack//lib/action_dispatch/http/response.rb#141 + def abort; end + + # source://actionpack//lib/action_dispatch/http/response.rb#114 + def body; end + + # source://actionpack//lib/action_dispatch/http/response.rb#144 + def close; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#149 + def closed?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#131 + def each(&block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#108 + def to_ary; end + + # @raise [IOError] + # + # source://actionpack//lib/action_dispatch/http/response.rb#122 + def write(string); end + + private + + # source://actionpack//lib/action_dispatch/http/response.rb#154 + def each_chunk(&block); end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#84 +ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/response.rb#437 +ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/response.rb#434 +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#352 +class ActionDispatch::Response::FileBody + # @return [FileBody] a new instance of FileBody + # + # source://actionpack//lib/action_dispatch/http/response.rb#355 + def initialize(path); end + + # source://actionpack//lib/action_dispatch/http/response.rb#359 + def body; end + + # Stream the file's contents if Rack::Sendfile isn't present. + # + # source://actionpack//lib/action_dispatch/http/response.rb#364 + def each; end + + # source://actionpack//lib/action_dispatch/http/response.rb#353 + def to_path; end +end + +# To be deprecated: +# +# source://actionpack//lib/action_dispatch/http/response.rb#50 +ActionDispatch::Response::Header = Rack::Headers + +# source://actionpack//lib/action_dispatch/http/response.rb#42 +ActionDispatch::Response::Headers = Rack::Headers + +# source://actionpack//lib/action_dispatch/http/response.rb#86 +ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/response.rb#435 +ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) + +# source://actionpack//lib/action_dispatch/http/response.rb#497 +class ActionDispatch::Response::RackBody + # @return [RackBody] a new instance of RackBody + # + # source://actionpack//lib/action_dispatch/http/response.rb#498 + def initialize(response); end + + # source://actionpack//lib/action_dispatch/http/response.rb#508 + def body; end + + # source://actionpack//lib/action_dispatch/http/response.rb#530 + def call(*arguments, &block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#502 + def close; end + + # source://actionpack//lib/action_dispatch/http/response.rb#526 + def each(*args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#514 + def respond_to?(method, include_private = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#522 + def to_ary; end + + # source://actionpack//lib/action_dispatch/http/response.rb#534 + def to_path; end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#512 +ActionDispatch::Response::RackBody::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/response.rb#85 +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' => :list +# get 'blog/delete' => :delete +# get 'blog/edit' => :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 +# +# $ bin/rails routes +# +# Target a specific controller with `-c`, or grep routes using `-g`. Useful in +# conjunction with `--expanded` which displays routes vertically. +# +# source://actionpack//lib/action_dispatch/routing.rb#248 +module ActionDispatch::Routing + extend ::ActiveSupport::Autoload +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#155 +module ActionDispatch::Routing::ConsoleFormatter; end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#156 +class ActionDispatch::Routing::ConsoleFormatter::Base + # @return [Base] a new instance of Base + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#157 + def initialize; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#171 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#174 + def no_routes(routes, filter); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#161 + def result; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#168 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#165 + def section_title(title); end +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#228 +class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base + # @return [Expanded] a new instance of Expanded + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#229 + def initialize(width: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#238 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#234 + def section_title(title); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#243 + def draw_expanded_section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#258 + def route_header(index:); end +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#192 +class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base + # source://actionpack//lib/action_dispatch/routing/inspector.rb#201 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#197 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#193 + def section_title(title); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#215 + def draw_header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#206 + def draw_section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#221 + def widths(routes); end +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#263 +class ActionDispatch::Routing::ConsoleFormatter::Unused < ::ActionDispatch::Routing::ConsoleFormatter::Sheet + # source://actionpack//lib/action_dispatch/routing/inspector.rb#264 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#272 + def no_routes(routes, filter); end +end + +# source://actionpack//lib/action_dispatch/routing/endpoint.rb#7 +class ActionDispatch::Routing::Endpoint + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#11 + def app; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#8 + def dispatcher?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#14 + def engine?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#10 + def matches?(req); end + + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#12 + def rack_app; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#9 + def redirect?; end +end + +# source://actionpack//lib/action_dispatch/routing.rb#260 +ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#285 +class ActionDispatch::Routing::HtmlTableFormatter + # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#286 + 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#300 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#303 + def no_routes(*_arg0); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#316 + def result; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#295 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#291 + def section_title(title); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#14 +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#2357 + def initialize(set); end + + class << self + # source://actionpack//lib/action_dispatch/routing/mapper.rb#27 + def backtrace_cleaner; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#27 + def backtrace_cleaner=(val); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#429 + 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#414 + def normalize_path(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#26 + def route_source_locations; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#26 + def route_source_locations=(val); end + end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#15 +class ActionDispatch::Routing::Mapper::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + def initialize; end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#433 +module ActionDispatch::Routing::Mapper::Base + # source://actionpack//lib/action_dispatch/routing/mapper.rb#657 + def default_url_options(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#657 + 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#669 + 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', 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.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#609 + def match(path, options = T.unsafe(nil)); end + + # Mount a Rack-based application to be used within the application. + # + # mount SomeRackApp, at: "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, at: "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#627 + def mount(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#662 + def with_default_scope(scope, &block); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#678 + def app_name(app, rails_app); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#687 + def define_generate_prefix(app, name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#674 + 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#2070 +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#2125 + 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#2141 + def concerns(*args); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#29 +class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint + # @return [Constraints] a new instance of Constraints + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#35 + def initialize(app, constraints, strategy); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#30 + def app; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#30 + def constraints; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#50 + def dispatcher?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#52 + def matches?(req); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#59 + def serve(req); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#66 + def constraint_args(constraint, request); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#33 +ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#32 +ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2153 +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#2203 + 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#2255 + def resolve(*args, &block); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#722 +module ActionDispatch::Routing::Mapper::HttpHelpers + # Define a route that recognizes HTTP CONNECT (and GET) requests. More + # specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2 + # CONNECT requests with the protocol pseudo header. For supported arguments, + # see [match](rdoc-ref:Base#match) + # + # connect 'live', to: 'live#index' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#777 + def connect(*args, &block); end + + # 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#759 + 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#727 + 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#767 + 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#743 + 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#735 + 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#751 + def put(*args, &block); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#782 + def map_method(method, args, &block); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#83 +class ActionDispatch::Routing::Mapper::Mapping + # @return [Mapping] a new instance of Mapping + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#132 + 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#190 + def application; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def ast; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#194 + def conditions; end + + # Returns the value of attribute default_action. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def default_action; end + + # Returns the value of attribute default_controller. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def default_controller; end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def defaults; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#183 + def make_route(name, precedence); end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def path; end + + # Returns the value of attribute required_defaults. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def required_defaults; end + + # Returns the value of attribute requirements. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def requirements; end + + # Returns the value of attribute scope_options. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def scope_options; end + + # Returns the value of attribute to. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#87 + def to; end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#334 + def add_controller_module(controller, modyoule); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#295 + def app(blocks); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#353 + def blocks(callable_constraint); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#198 + def build_conditions(current_conditions, request_class); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#307 + def check_controller_and_action(path_params, controller, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#322 + def check_part(name, part, path_params, hash); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#360 + def constraints(options, path_params); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#374 + def dispatcher(raise_on_name_error); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#213 + def intern(object); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#291 + def normalize_defaults(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#259 + def normalize_format(formatted); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#217 + def normalize_options!(options, path_params, modyoule); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#207 + def request_method; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#379 + def route_source_location; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#253 + def split_constraints(path_params, constraints); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#346 + def translate_controller(controller); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#275 + def verify_regexp_requirements(requirements, wildcard_options); end + + class << self + # source://actionpack//lib/action_dispatch/routing/mapper.rb#90 + def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#104 + def check_via(via); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#116 + def normalize_path(path, format); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#128 + def optional_format?(path, format); end + end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#84 +ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#181 +ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#85 +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#1174 +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#1553 + def collection(&block); end + + # Loads another routes file with the given `name` located inside the + # `config/routes` directory. In that file, you can use the normal routing DSL, + # but *do not* surround it with a `Rails.application.routes.draw` block. + # + # # config/routes.rb + # Rails.application.routes.draw do + # draw :admin # Loads `config/routes/admin.rb` + # draw "third_party/some_gem" # Loads `config/routes/third_party/some_gem.rb` + # end + # + # # config/routes/admin.rb + # namespace :admin do + # resources :accounts + # end + # + # # config/routes/third_party/some_gem.rb + # mount SomeGem::Engine, at: "/some_gem" + # + # **CAUTION:** Use this feature with care. Having multiple routes files can + # negatively impact discoverability and readability. For most applications — + # even those with a few hundred routes — it's easier for developers to have a + # single routes file. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1662 + def draw(name); end + + # Matches a URL pattern to one or more routes. For more information, see + # [match](rdoc-ref:Base#match). + # + # match 'path', to: 'controller#action', via: :post + # match 'path', 'otherpath', on: :member, via: :get + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1683 + 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#1574 + def member(&block); end + + # See ActionDispatch::Routing::Mapper::Scoping#namespace. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1621 + def namespace(path, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1600 + def nested(&block); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1590 + 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#1342 + 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#1512 + def resources(*resources, &block); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1309 + 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#1730 + def root(path, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1629 + def shallow; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1636 + def shallow?; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1794 + def action_options?(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1876 + def action_path(name); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2017 + def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1930 + def api_only?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1789 + def apply_action_options(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 + def apply_common_behavior_for(method, resources, options, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1852 + def canonical_action?(action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2002 + def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1987 + def get_to_from_path(path, to, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1941 + def map_match(paths, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2044 + def match_root_route(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1892 + def name_for_action(as, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1829 + def nested_options; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1810 + def nested_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1848 + def param_constraint; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1844 + def param_constraint?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1751 + def parent_resource; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1866 + def path_for_action(action, path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1934 + def path_scope(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1880 + def prefix_name_for_action(as, action); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1806 + def resource_method_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1821 + def resource_scope(resource, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1802 + def resource_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1798 + def scope_action_options; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1918 + def set_member_mappings_for_resource; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1838 + def shallow_nesting_depth; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1856 + def shallow_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1998 + def using_match_shorthand?(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1814 + def with_scope_level(kind); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1179 +ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1178 +ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 +class ActionDispatch::Routing::Mapper::Resources::Resource + # @return [Resource] a new instance of Resource + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1184 + def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 + def actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 + 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#1241 + def collection_name; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def collection_scope; end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1201 + def default_actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1233 + def member_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1251 + def member_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1225 + def name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1261 + def nested_param; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1265 + def nested_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 + def new_scope(new_path); end + + # Returns the value of attribute param. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def param; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def path; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1229 + def plural; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1245 + def resource_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1269 + def shallow?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1251 + def shallow_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1273 + def singleton?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1233 + def singular; end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1276 +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#1277 + def initialize(entities, api_only, shallow, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1296 + def collection_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1284 + def default_actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1296 + def member_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def member_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1182 + def nested_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1292 + def plural; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1306 + def singleton?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1296 + 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#1177 +ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2269 +class ActionDispatch::Routing::Mapper::Scope + include ::Enumerable + + # @return [Scope] a new instance of Scope + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2279 + def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2338 + def [](key); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2305 + def action_name(name_prefix, prefix, collection_name, member_name); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2346 + def each; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2342 + def frame; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2285 + def nested?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2330 + def new(hash); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2334 + def new_level(level); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2289 + def null?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2326 + def options; end + + # Returns the value of attribute parent. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2277 + def parent; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2301 + def resource_method_scope?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2322 + def resource_scope?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2297 + def resources?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2293 + def root?; end + + # Returns the value of attribute scope_level. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2277 + def scope_level; end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2270 +ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2275 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2354 +ActionDispatch::Routing::Mapper::Scope::ROOT = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) + +# 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#843 +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#1051 + 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#933 + 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#1062 + 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#978 + 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#874 + def scope(*args); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1094 + def merge_action_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 + def merge_as_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1118 + def merge_blocks_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1110 + def merge_constraints_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1090 + def merge_controller_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1114 + def merge_defaults_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1102 + def merge_format_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1086 + def merge_module_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1124 + def merge_options_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1106 + def merge_path_names_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 + def merge_path_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1074 + def merge_shallow_path_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1082 + def merge_shallow_prefix_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1128 + def merge_shallow_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1132 + def merge_to_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1098 + def merge_via_scope(parent, child); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#926 +ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#24 +ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#114 +class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect + # source://actionpack//lib/action_dispatch/routing/redirection.rb#143 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 + def options; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#117 + def path(params, request); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#89 +class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect + # source://actionpack//lib/action_dispatch/routing/redirection.rb#104 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#92 + def path(params, request); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#109 + def interpolation_required?(string, params); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#90 +ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) + +# # Action Dispatch Routing PolymorphicRoutes +# +# Polymorphic URL helpers are methods for smart resolution to a named route call +# when given an Active Record model instance. They are to be used in combination +# with ActionController::Resources. +# +# 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#66 +module ActionDispatch::Routing::PolymorphicRoutes + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#162 + def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#158 + def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#162 + def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#158 + 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#133 + 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#110 + def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#177 + def polymorphic_mapping(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#173 + def polymorphic_path_for_action(action, record_or_hash, options); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#169 + def polymorphic_url_for_action(action, record_or_hash, options); end +end + +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#185 +class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder + # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#248 + def initialize(key_strategy, prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#262 + def handle_class(klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#266 + def handle_class_call(target, klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#293 + def handle_list(list); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#270 + def handle_model(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#284 + def handle_model_call(target, record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#254 + def handle_string(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#258 + def handle_string_call(target, str); end + + # Returns the value of attribute prefix. + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#246 + def prefix; end + + # Returns the value of attribute suffix. + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#246 + def suffix; end + + private + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#347 + def get_method_for_class(klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#352 + def get_method_for_string(str); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#339 + def polymorphic_mapping(target, record); end + + class << self + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#196 + def build(action, type); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#188 + def get(action, type); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#194 + def path; end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#210 + def plural(prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#214 + def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#206 + def singular(prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#193 + def url; end + end +end + +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#186 +ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#12 +class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint + # @return [Redirect] a new instance of Redirect + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#15 + def initialize(status, block); end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 + def block; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#35 + def build_response(req); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#22 + def call(env); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#67 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#63 + def path(params, request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#20 + def redirect?; end + + # Returns the value of attribute status. + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 + def status; end + + private + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#76 + def escape(params); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#80 + def escape_fragment(params); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#84 + def escape_path(params); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#72 + def relative_path?(path); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#148 +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#204 + def redirect(*args, &block); end +end + +# The RouteSet contains a collection of Route instances, representing the routes +# typically defined in `config/routes.rb`. +# +# source://actionpack//lib/action_dispatch/routing/route_set.rb#17 +class ActionDispatch::Routing::RouteSet + # @return [RouteSet] a new instance of RouteSet + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#388 + def initialize(config = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#676 + def add_polymorphic_mapping(klass, options, &block); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#645 + def add_route(mapping, name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#680 + def add_url_helper(name, options, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#419 + def api_only?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#466 + def append(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#905 + def call(env); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#490 + def clear!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#440 + def default_env; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#423 + def default_scope; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#427 + def default_scope=(new_default_scope); end + + # Returns the value of attribute default_url_options. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#356 + 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#356 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#511 + 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#355 + 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#355 + def disable_clear_and_finalize=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#459 + def draw(&block); end + + # Returns the value of attribute draw_paths. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#356 + 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#356 + def draw_paths=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#408 + def eager_load!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#641 + def empty?; end + + # Returns the value of attribute env_key. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#357 + 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#820 + def extra_keys(options, recall = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#484 + def finalize!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#848 + def find_script_name(options); end + + # Returns the value of attribute formatter. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#354 + 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#354 + def formatter=(_arg0); end + + # Returns a Route matching the given requirements, or `nil` if none are found. + # + # This is intended for use by tools such as Language Servers. + # + # Given the routes are defined as: + # + # resources :posts + # + # Then the following will return the Route for the `show` action: + # + # Rails.application.routes.from_requirements(controller: "posts", action: "show") + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#29 + def from_requirements(requirements); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#824 + def generate_extras(options, recall = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#538 + 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#507 + def mounted_helpers; end + + # Returns the value of attribute named_routes. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#354 + 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#354 + def named_routes=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#844 + def optimize_routes_generation?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#852 + 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#357 + def polymorphic_mappings; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#470 + def prepend(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#911 + def recognize_path(path, environment = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#926 + def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#415 + def relative_url_root; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#431 + def request_class; end + + # Returns the value of attribute resources_path_names. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#355 + 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#355 + def resources_path_names=(_arg0); end + + # Returns the value of attribute router. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#354 + 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#354 + def router=(_arg0); end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#354 + def routes; end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#354 + 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#354 + def set=(_arg0); end + + # The `options` argument must be a hash whose keys are **symbols**. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#857 + 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#530 + def url_helpers(supports_path = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#474 + def eval_block(block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#835 + def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#435 + def make_request(env); end + + class << self + # source://actionpack//lib/action_dispatch/routing/route_set.rb#361 + def default_resources_path_names; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#365 + def new_with_config(config); end + end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#384 +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 default_scope + # + # @return [Object] the current value of default_scope + def default_scope; end + + # Sets the attribute default_scope + # + # @param value [Object] the value to set the attribute default_scope to. + # @return [Object] the newly set value + def default_scope=(_); 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#684 +class ActionDispatch::Routing::RouteSet::CustomUrlHelper + # @return [CustomUrlHelper] a new instance of CustomUrlHelper + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#687 + def initialize(name, defaults, &block); end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#685 + def block; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#693 + 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#685 + def defaults; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#685 + def name; end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#705 + def eval_block(t, args, options); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#709 + def merge_defaults(options); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#386 +ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#39 +class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint + # @return [Dispatcher] a new instance of Dispatcher + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#40 + def initialize(raise_on_name_error); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#44 + def dispatcher?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#46 + def serve(req); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#60 + def controller(req); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#66 + def dispatch(controller, action, req, res); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#714 +class ActionDispatch::Routing::RouteSet::Generator + # @return [Generator] a new instance of Generator + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#717 + def initialize(named_route, options, recall, set); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#729 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#733 + def current_controller; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#803 + 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#799 + def generate; end + + # Returns the value of attribute named_route. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#715 + def named_route; end + + # Remove leading slashes from controllers + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#787 + 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#769 + def normalize_controller_action_id!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#745 + def normalize_options!; end + + # Returns the value of attribute options. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#715 + def options; end + + # Returns the value of attribute recall. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#715 + def recall; end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#715 + def set; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#737 + 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#777 + def use_relative_controller!; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#809 + def named_route_exists?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#813 + def segment_keys; end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#499 +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#84 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection + include ::Enumerable + + # @return [NamedRouteCollection] a new instance of NamedRouteCollection + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#89 + def initialize; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#139 + def [](name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#120 + def []=(name, route); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#120 + 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#167 + def add_url_helper(name, defaults, &block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#106 + def clear; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#106 + def clear!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#152 + def each(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#139 + def get(name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 + def helper_names; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#143 + def key?(name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#161 + def length; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#157 + def names; end + + # Returns the value of attribute path_helpers_module. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#86 + def path_helpers_module; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#97 + def route_defined?(name); end + + # Returns the value of attribute url_helpers_module. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#86 + 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#335 + 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#86 + def routes; end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#190 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper + # @return [UrlHelper] a new instance of UrlHelper + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#273 + def initialize(route, options, route_name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#280 + def call(t, method_name, args, inner_options, url_strategy); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#292 + 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#203 + def route_name; end + + class << self + # source://actionpack//lib/action_dispatch/routing/route_set.rb#191 + def create(route, options, route_name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#199 + def optimize_helper?(route); end + end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#205 +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#208 + def initialize(route, options, route_name); end + + # Returns the value of attribute arg_size. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#206 + def arg_size; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#214 + def call(t, method_name, args, inner_options, url_strategy); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#245 + def optimize_routes_generation?(t); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#237 + def optimized_helper(args); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#249 + def parameterize_args(args); end + + # @raise [ActionController::UrlGenerationError] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#260 + 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#351 +ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#840 +ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#71 +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#72 + def initialize(controller_class); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#78 + def controller(_); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#352 +ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#10 +class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator + # source://actionpack//lib/action_dispatch/routing/inspector.rb#56 + def action; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#28 + def constraints; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#52 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#17 + def endpoint; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#64 + def engine?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#60 + def internal?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#11 + def matches_filter?(filter, value); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#40 + def name; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#36 + def path; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#32 + def rack_app; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#44 + 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#73 +class ActionDispatch::Routing::RoutesInspector + # @return [RoutesInspector] a new instance of RoutesInspector + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#74 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#79 + def format(formatter, filter = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#143 + def collect_engine_routes(route); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#129 + def collect_routes(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#118 + def filter_routes(filter); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#99 + def normalize_filter(filter); end +end + +# source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#9 +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#15 + 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#12 + def _routes; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#12 + 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#12 + def routes=(_arg0); end + + # Returns the value of attribute scope. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#12 + 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#12 + def scope=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#21 + 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#55 + def merge_script_names(previous_script_name, new_script_name); end + + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#32 + def method_missing(method, *args); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#28 + def respond_to_missing?(method, _); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + end +end + +# source://actionpack//lib/action_dispatch/routing.rb#259 +ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) + +# # Action Dispatch Routing UrlFor +# +# In `config/routes.rb` you define URL-to-controller mappings, but the reverse +# is also possible: a URL can be generated from one of your routing definitions. +# URL generation functionality is centralized in this module. +# +# See ActionDispatch::Routing for general information about routing and +# `config/routes.rb`. +# +# **Tip:** If you need to generate URLs from your models or some other place, +# then ActionDispatch::Routing::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 ActionDispatch::Routing::UrlFor under the hood. And in +# particular, they use the ActionDispatch::Routing::UrlFor#url_for method. One +# can generate the same path as the above example by using the following code: +# +# include ActionDispatch::Routing::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, mailers also include ActionDispatch::Routing::UrlFor. So +# within mailers, you can use url_for. However, mailers cannot access incoming +# web requests in order to derive hostname information, so you have to provide +# the `:host` option or set the default host using `default_url_options`. For +# more information on url_for in mailers see 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.find(1).base_uri # => "/users/1" +# +# source://actionpack//lib/action_dispatch/routing/url_for.rb#92 +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#111 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#182 + 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#222 + def route_for(name, *args); end + + # Generate a URL based on the options provided, `default_url_options`, and the + # routes defined in `config/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. + # * `:path_params` - The query parameters that will only be used for the named + # dynamic segments of path. If unused, they will be discarded. + # * `:trailing_slash` - If true, adds a trailing slash, as in + # `"/archive/2009/"`. + # * `:script_name` - Specifies application path relative to domain root. If + # provided, prepends application path. + # + # + # 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#178 + 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#118 + def url_options; end + + protected + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/url_for.rb#227 + def optimize_routes_generation?; end + + private + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#239 + def _routes_context; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#232 + 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 + +# # Action Dispatch SSL +# +# This middleware is added to the stack when `config.force_ssl = true`, and is +# passed the options set in `config.ssl_options`. It does three jobs to enforce +# secure HTTP requests: +# +# 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: +# +# config.ssl_options = { redirect: { host: "secure.widgets.com", port: 8080 }` +# +# Or set `redirect: false` to disable redirection. +# +# Requests can opt-out of redirection with `exclude`: +# +# config.ssl_options = { redirect: { exclude: -> request { request.path == "/up" } } } +# +# Cookies will not be flagged as secure for excluded requests. +# +# When proxying through a load balancer that terminates SSL, the forwarded +# request will appear as though it's HTTP instead of HTTPS to the application. +# This makes redirects and cookie security target HTTP instead of HTTPS. +# To make the server assume that the proxy already terminated SSL, and +# that the request really is HTTPS, set `config.assume_ssl` to `true`: +# +# config.assume_ssl = true +# +# 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#66 +class ActionDispatch::SSL + # @return [SSL] a new instance of SSL + # + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#76 + 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#88 + def call(env); end + + private + + # https://tools.ietf.org/html/rfc6797#section-6.1 + # + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#122 + def build_hsts_header(hsts); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#129 + def flag_cookies_as_secure!(headers); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#170 + def https_location_for(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#107 + def normalize_hsts_options(options); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#153 + def redirect_to_https(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#160 + def redirection_status(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#103 + def set_hsts_header!(headers); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#72 + def default_hsts_options; end + end +end + +# :stopdoc: Default to 2 years as recommended on hstspreload.org. +# +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#68 +ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#70 +ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#8 +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#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 + + class << self + private + + def allocate; end + def new(*_arg0); end + 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#100 +module ActionDispatch::Session + class << self + # source://actionpack//lib/action_dispatch.rb#107 + def resolve_store(session_store); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#97 +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#102 + def generate_sid; end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#107 + def set_cookie(request, response, cookie); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#86 +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#92 + def set_cookie(request, response, cookie); end +end + +# # Action Dispatch Session CacheStore +# +# A session store that uses an ActiveSupport::Cache::Store to store the +# sessions. This store is most useful if you don't store critical data in your +# sessions and you don't need them to live for extended periods of time. +# +# #### 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#22 +class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore + # @return [CacheStore] a new instance of CacheStore + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#23 + def initialize(app, options = T.unsafe(nil)); end + + # Remove a session from the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#49 + def delete_session(env, sid, options); end + + # Get a session from the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#30 + def find_session(env, sid); end + + # Set a session in the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#38 + 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#57 + def cache_key(id); end + + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#61 + def get_session_with_fallback(sid); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#22 +module ActionDispatch::Session::Compatibility + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#23 + def initialize(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#28 + def generate_sid; end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#35 + def initialize_sid; end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#40 + def make_request(env); end +end + +# # Action Dispatch Session CookieStore +# +# This cookie-based session store is the Rails default. It is dramatically +# faster than the alternatives. +# +# Sessions typically contain at most a user ID and flash message; both fit +# 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/local_secret.txt`. In all other environments, it is stored encrypted in +# the `config/credentials.yml.enc` file. +# +# If your application was not updated to Rails 5.2 defaults, the +# `secret_key_base` 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#52 +class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore + # @return [CookieStore] a new instance of CookieStore + # + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#64 + def initialize(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#70 + def delete_session(req, session_id, options); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#77 + def load_session(req); end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#124 + def cookie_jar(request); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#86 + def extract_session_id(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#120 + def get_cookie(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#105 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#116 + def set_cookie(request, session_id, cookie); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#93 + def unpacked_cookie_data(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#111 + def write_session(req, sid, session_data, options); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#62 +ActionDispatch::Session::CookieStore::DEFAULT_SAME_SITE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 +class ActionDispatch::Session::CookieStore::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#56 + 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#54 + def cookie_value; end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#71 +module ActionDispatch::Session::SessionObject + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#72 + def commit_session(req, res); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#81 + def loaded_session?(session); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#77 + def prepare_session(req); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#13 +class ActionDispatch::Session::SessionRestoreError < ::StandardError + # @return [SessionRestoreError] a new instance of SessionRestoreError + # + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#14 + def initialize; end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#45 +module ActionDispatch::Session::StaleSessionCheck + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#50 + def extract_session_id(env); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#46 + def load_session(env); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#54 + def stale_session_check!; end +end + +# # Action Dispatch ShowExceptions +# +# This middleware rescues any exception returned by the application and calls an +# exceptions app that will wrap it in a format for the end user. +# +# The exceptions app should be passed as a parameter on initialization of +# `ShowExceptions`. Every time there is an exception, `ShowExceptions` will +# store the exception in `env["action_dispatch.exception"]`, rewrite the +# `PATH_INFO` to the exception status code, and call the Rack app. +# +# In Rails applications, the exceptions app can be configured with +# `config.exceptions_app`, which defaults to ActionDispatch::PublicExceptions. +# +# If the application returns a response with the `X-Cascade` header set to +# `"pass"`, this middleware will send an empty response as a result with the +# correct status code. If any exception happens inside the exceptions app, this +# middleware catches the exceptions and returns a failsafe response. +# +# source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#25 +class ActionDispatch::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#26 + def initialize(app, exceptions_app); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#31 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#67 + def fallback_to_html_format_if_invalid_mime_type(request); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#83 + def pass_response(status); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#48 + def render_exception(request, wrapper); end +end + +# # Action Dispatch Static +# +# This middleware serves static files from disk, if available. If no file is +# found, it hands off to the main app. +# +# In Rails apps, this middleware is configured to serve assets from 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#20 +class ActionDispatch::Static + # @return [Static] a new instance of Static + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#21 + def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#26 + def call(env); end +end + +# source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#4 +module ActionDispatch::TestHelpers; end + +# source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#5 +module ActionDispatch::TestHelpers::PageDumpHelper + # Saves the content of response body to a file and tries to open it in your browser. + # Launchy must be present in your Gemfile for the page to open automatically. + # + # source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#10 + def save_and_open_page(path = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#30 + def html_dump_default_path; end + + # source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#23 + def open_file(path); end + + # @raise [InvalidResponse] + # + # source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#15 + def save_page(path = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#6 +class ActionDispatch::TestHelpers::PageDumpHelper::InvalidResponse < ::StandardError; end + +# source://actionpack//lib/action_dispatch/testing/test_process.rb#9 +module ActionDispatch::TestProcess + include ::ActionDispatch::TestProcess::FixtureFile + + # @raise [NoMethodError] + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#35 + def assigns(key = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#49 + def cookies; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#45 + def flash; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#53 + def redirect_to_url; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#41 + def session; end +end + +# source://actionpack//lib/action_dispatch/testing/test_process.rb#10 +module ActionDispatch::TestProcess::FixtureFile + # Shortcut for + # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_f + # ixture_path, path), type)`: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # + # Default fixture files location is `test/fixtures/files`. + # + # To upload binary files on Windows, pass `:binary` as the last parameter. This + # will not affect other platforms: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#23 + def file_fixture_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end + + # Shortcut for + # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_f + # ixture_path, path), type)`: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # + # Default fixture files location is `test/fixtures/files`. + # + # To upload binary files on Windows, pass `:binary` as the last parameter. This + # will not affect other platforms: + # + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#23 + 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#9 +class ActionDispatch::TestRequest < ::ActionDispatch::Request + # source://actionpack//lib/action_dispatch/testing/test_request.rb#68 + def accept=(mime_types); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#48 + def action=(action_name); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#32 + def host=(host); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#52 + def if_modified_since=(last_modified); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#56 + def if_none_match=(etag); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#44 + def path=(path); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#36 + def port=(number); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#60 + def remote_addr=(addr); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#28 + def request_method=(method); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#40 + def request_uri=(uri); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#64 + 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#17 + def create(env = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#23 + def default_env; end + end +end + +# source://actionpack//lib/action_dispatch/testing/test_request.rb#10 +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#13 +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 # => Nokogiri::HTML5::Document + # response.parsed_body.to_html # => "\n\n..." + # + # assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } } + # + # response.parsed_body.at("main") => {name:, content:} + # assert_equal "main", name + # assert_equal "Some main content", content + # + # get "/posts.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Array + # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # + # assert_pattern { response.parsed_body => [{ id: 42 }] } + # + # get "/posts/42.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess + # response.parsed_body # => {"id"=>42, "title"=>"Title"} + # + # assert_pattern { response.parsed_body => [{ title: /title/i }] } + # + # response.parsed_body => {id:, title:} + # assert_equal 42, id + # assert_equal "Title", title + # + # source://actionpack//lib/action_dispatch/testing/test_response.rb#50 + def parsed_body; end + + # source://actionpack//lib/action_dispatch/testing/test_response.rb#54 + def response_parser; end + + class << self + # source://actionpack//lib/action_dispatch/testing/test_response.rb#14 + def from_response(response); end + end +end + +# :markup: markdown +# +# source://actionpack//lib/action_pack/gem_version.rb#5 +module ActionPack + class << self + # Returns the currently loaded version of Action Pack as a `Gem::Version`. + # + # source://actionpack//lib/action_pack/gem_version.rb#7 + def gem_version; end + + # Returns the currently loaded version of Action Pack as a `Gem::Version`. + # + # source://actionpack//lib/action_pack/version.rb#9 + def version; end + end +end + +# source://actionpack//lib/action_pack/gem_version.rb#11 +module ActionPack::VERSION; end + +# source://actionpack//lib/action_pack/gem_version.rb#12 +ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_pack/gem_version.rb#13 +ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_pack/gem_version.rb#15 +ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_pack/gem_version.rb#17 +ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_pack/gem_version.rb#14 +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#7 +module Mime + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#51 + def [](type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#64 + def fetch(type, &block); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#56 + def symbols; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#60 + def valid_symbols?(symbols); 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#363 +Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#349 +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#352 + def initialize; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#356 + def all?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#357 + def html?; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#47 +Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#48 +Mime::LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#8 +class Mime::Mimes + include ::Enumerable + + # @return [Mimes] a new instance of Mimes + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#13 + def initialize; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#23 + def <<(type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#30 + def delete_if; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#19 + def each(&block); end + + # Returns the value of attribute symbols. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#9 + def symbols; end + + # :nodoc + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#41 + def valid_symbols?(symbols); end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#365 +class Mime::NullType + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#368 + def nil?; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#376 + def ref; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#372 + def to_s; end + + private + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#383 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#379 + def respond_to_missing?(method, _); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#46 +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#84 +class Mime::Type + # @return [Type] a new instance of Type + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#264 + def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 + def ==(mime_type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#289 + def ===(list); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#311 + def =~(mime_type); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 + def all?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 + def eql?(other); end + + # Returns the value of attribute hash. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#255 + def hash; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#323 + def html?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#317 + def match?(mime_type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#285 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#85 + def symbol; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#273 + def to_s; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#277 + def to_str; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#281 + def to_sym; end + + protected + + # Returns the value of attribute string. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#330 + def string; end + + # Returns the value of attribute synonyms. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#330 + def synonyms; end + + private + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#336 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#344 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#334 + def to_a; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#333 + def to_ary; end + + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#167 + def lookup(string); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#175 + def lookup_by_extension(extension); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#200 + 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#236 + def parse_data_with_trailing_star(type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#227 + def parse_trailing_star(accept_header); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#186 + 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#182 + def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#163 + 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#245 + 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#90 +class Mime::Type::AcceptItem + # @return [AcceptItem] a new instance of AcceptItem + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#94 + def initialize(index, name, q = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#101 + def <=>(item); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def index; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def index=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def name; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def name=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def q; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def q=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#91 + def to_s; end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#108 +class Mime::Type::AcceptList + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#151 + def find_item_by_name(array, name); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#109 + def sort!(list); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#262 +class Mime::Type::InvalidMimeType < ::StandardError; end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#257 +Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#259 +Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#258 +Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#260 +Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch.rb#35 +module Rack + class << self + # source://rack/3.1.7/lib/rack/version.rb#18 + def release; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/actiontext@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actiontext@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..70ff16e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actiontext@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,1841 @@ +# 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`. + + +# :markup: markdown +# :include: ../README.md +# +# source://actiontext//lib/action_text/gem_version.rb#5 +module ActionText + extend ::ActiveSupport::Autoload + + class << self + # source://actiontext//lib/action_text/deprecator.rb#6 + def deprecator; end + + # Returns the currently loaded version of Action Text as a `Gem::Version`. + # + # source://actiontext//lib/action_text/gem_version.rb#7 + def gem_version; end + + # source://actiontext//lib/action_text.rb#47 + def html_document_class; end + + # source://actiontext//lib/action_text.rb#53 + def html_document_fragment_class; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#413 + def railtie_helpers_paths; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#396 + def railtie_namespace; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#417 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#402 + def table_name_prefix; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#409 + def use_relative_model_naming?; end + + # Returns the currently loaded version of Action Text as a `Gem::Version`. + # + # source://actiontext//lib/action_text/version.rb#9 + def version; end + end +end + +# # Action Text Attachable +# +# Include this module to make a record attachable to an ActionText::Content. +# +# class Person < ApplicationRecord +# include ActionText::Attachable +# end +# +# person = Person.create! name: "Javan" +# html = %Q() +# content = ActionText::Content.new(html) +# content.attachables # => [person] +# +# source://actiontext//lib/action_text/attachable.rb#18 +module ActionText::Attachable + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionText::Attachable::ClassMethods + + # source://actiontext//lib/action_text/attachable.rb#83 + def attachable_content_type; end + + # source://actiontext//lib/action_text/attachable.rb#87 + def attachable_filename; end + + # source://actiontext//lib/action_text/attachable.rb#91 + def attachable_filesize; end + + # source://actiontext//lib/action_text/attachable.rb#95 + def attachable_metadata; end + + # Returns the Signed Global ID for the attachable. The purpose of the ID is set + # to 'attachable' so it can't be reused for other purposes. + # + # source://actiontext//lib/action_text/attachable.rb#79 + def attachable_sgid; end + + # @return [Boolean] + # + # source://actiontext//lib/action_text/attachable.rb#99 + def previewable_attachable?; end + + # Returns the path to the partial that is used for rendering the attachable. + # Defaults to `to_partial_path`. + # + # Override to render a different partial: + # + # class User < ApplicationRecord + # def to_attachable_partial_path + # "users/attachable" + # end + # end + # + # source://actiontext//lib/action_text/attachable.rb#127 + def to_attachable_partial_path; end + + # source://actiontext//lib/action_text/attachable.rb#131 + def to_rich_text_attributes(attributes = T.unsafe(nil)); end + + # Returns the path to the partial that is used for rendering the attachable in + # Trix. Defaults to `to_partial_path`. + # + # Override to render a different partial: + # + # class User < ApplicationRecord + # def to_trix_content_attachment_partial_path + # "users/trix_content_attachment" + # end + # end + # + # source://actiontext//lib/action_text/attachable.rb#113 + def to_trix_content_attachment_partial_path; end + + private + + # source://actiontext//lib/action_text/attachable.rb#144 + def attribute_names_for_serialization; end + + # source://actiontext//lib/action_text/attachable.rb#148 + def read_attribute_for_serialization(key); end + + class << self + # source://actiontext//lib/action_text/attachable.rb#43 + def from_attachable_sgid(sgid, options = T.unsafe(nil)); end + + # Extracts the `ActionText::Attachable` from the attachment HTML node: + # + # person = Person.create! name: "Javan" + # html = %Q() + # fragment = ActionText::Fragment.wrap(html) + # attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first + # ActionText::Attachable.from_node(attachment_node) # => person + # + # source://actiontext//lib/action_text/attachable.rb#31 + def from_node(node); end + + private + + # source://actiontext//lib/action_text/attachable.rb#50 + 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#58 + def from_attachable_sgid(sgid); end + + # source://actiontext//lib/action_text/attachable.rb#72 + def to_missing_attachable_partial_path; end +end + +# source://actiontext//lib/action_text/attachable.rb#21 +ActionText::Attachable::LOCATOR_NAME = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text.rb#30 +module ActionText::Attachables + extend ::ActiveSupport::Autoload +end + +# source://actiontext//lib/action_text/attachables/content_attachment.rb#7 +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::Access + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validate_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validate_callbacks; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#20 + def attachable_plain_text_representation(caption); end + + # Returns the value of attribute content. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#15 + def content; end + + # Sets the attribute content + # + # @param value the value to set the attribute content to. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#15 + def content=(_arg0); end + + # Returns the value of attribute content_type. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#15 + def content_type; end + + # Sets the attribute content_type + # + # @param value the value to set the attribute content_type to. + # + # source://actiontext//lib/action_text/attachables/content_attachment.rb#15 + def content_type=(_arg0); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#24 + def to_html; end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#32 + def to_partial_path; end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#28 + def to_s; end + + private + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#37 + def content_instance; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validate_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://actiontext//lib/action_text/attachables/content_attachment.rb#10 + def from_node(node); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def param_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter?; end + end +end + +# source://actiontext//lib/action_text/attachables/missing_attachable.rb#7 +class ActionText::Attachables::MissingAttachable + extend ::ActiveModel::Naming + + # @return [MissingAttachable] a new instance of MissingAttachable + # + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#12 + def initialize(sgid); end + + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#24 + def model; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); end + + # source://actiontext//lib/action_text/attachables/missing_attachable.rb#16 + def to_partial_path; end +end + +# source://actiontext//lib/action_text/attachables/missing_attachable.rb#10 +ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/attachables/remote_image.rb#7 +class ActionText::Attachables::RemoteImage + extend ::ActiveModel::Naming + + # @return [RemoteImage] a new instance of RemoteImage + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#32 + def initialize(attributes = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attachables/remote_image.rb#39 + def attachable_plain_text_representation(caption); end + + # Returns the value of attribute content_type. + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#30 + def content_type; end + + # Returns the value of attribute height. + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#30 + def height; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); end + + # source://actiontext//lib/action_text/attachables/remote_image.rb#43 + def to_partial_path; end + + # Returns the value of attribute url. + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#30 + def url; end + + # Returns the value of attribute width. + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#30 + def width; end + + class << self + # source://actiontext//lib/action_text/attachables/remote_image.rb#11 + def from_node(node); end + + private + + # source://actiontext//lib/action_text/attachables/remote_image.rb#22 + def attributes_from_node(node); end + + # @return [Boolean] + # + # source://actiontext//lib/action_text/attachables/remote_image.rb#18 + def content_type_is_image?(content_type); end + end +end + +# # Action Text Attachment +# +# Attachments serialize attachables to HTML or plain text. +# +# class Person < ApplicationRecord +# include ActionText::Attachable +# end +# +# attachable = Person.create! name: "Javan" +# attachment = ActionText::Attachment.from_attachable(attachable) +# attachment.to_html # => " " "[racecar.jpg]" + # + # Use the `caption` when set: + # + # attachment = ActionText::Attachment.from_attachable(attachable, caption: "Vroom vroom") + # attachment.to_plain_text # => "[Vroom vroom]" + # + # The presentation can be overridden by implementing the + # `attachable_plain_text_representation` method: + # + # class Person < ApplicationRecord + # include ActionText::Attachable + # + # def attachable_plain_text_representation + # "[#{name}]" + # end + # end + # + # attachable = Person.create! name: "Javan" + # attachment = ActionText::Attachment.from_attachable(attachable) + # attachment.to_plain_text # => "[Javan]" + # + # source://actiontext//lib/action_text/attachment.rb#110 + def to_plain_text; end + + # source://actiontext//lib/action_text/attachment.rb#127 + def to_s; end + + # source://actiontext//lib/action_text/attachment.rb#81 + def with_full_attributes; end + + private + + # source://actiontext//lib/action_text/attachment.rb#140 + def attachable_attributes; end + + # source://actiontext//lib/action_text/attachment.rb#136 + def node_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#179 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attachment.rb#144 + def sgid_attributes; end + + class << self + # source://actiontext//lib/action_text/attachment.rb#27 + def fragment_by_canonicalizing_attachments(content); end + + # source://actiontext//lib/action_text/attachment.rb#39 + def from_attachable(attachable, attributes = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attachment.rb#35 + def from_attachables(attachables); end + + # source://actiontext//lib/action_text/attachment.rb#45 + def from_attributes(attributes, attachable = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attachment.rb#31 + def from_node(node, attachable = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attachment.rb#22 + def tag_name; end + + # source://actiontext//lib/action_text/attachment.rb#22 + def tag_name=(val); end + + private + + # source://actiontext//lib/action_text/attachment.rb#52 + def node_from_attributes(attributes); end + + # source://actiontext//lib/action_text/attachment.rb#58 + def process_attributes(attributes); end + end +end + +# source://actiontext//lib/action_text/attachment.rb#24 +ActionText::Attachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://actiontext//lib/action_text/attachment_gallery.rb#6 +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::Access + 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#54 + def initialize(node); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validate_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validate_callbacks; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://actiontext//lib/action_text/attachment_gallery.rb#58 + def attachments; end + + # source://actiontext//lib/action_text/attachment_gallery.rb#68 + def inspect; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); end + + # Returns the value of attribute node. + # + # source://actiontext//lib/action_text/attachment_gallery.rb#52 + def node; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://actiontext//lib/action_text/attachment_gallery.rb#64 + def size; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validate_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://actiontext//lib/action_text/attachment_gallery.rb#43 + def attachment_selector; end + + # source://actiontext//lib/action_text/attachment_gallery.rb#27 + def find_attachment_gallery_nodes(content); end + + # source://actiontext//lib/action_text/attachment_gallery.rb#13 + def fragment_by_canonicalizing_attachment_galleries(content); end + + # source://actiontext//lib/action_text/attachment_gallery.rb#19 + def fragment_by_replacing_attachment_gallery_nodes(content); end + + # source://actiontext//lib/action_text/attachment_gallery.rb#39 + def from_node(node); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def param_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter?; end + + # source://actiontext//lib/action_text/attachment_gallery.rb#47 + def selector; end + end +end + +# source://actiontext//lib/action_text/attachment_gallery.rb#9 +ActionText::AttachmentGallery::TAG_NAME = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text.rb#38 +module ActionText::Attachments + extend ::ActiveSupport::Autoload +end + +# source://actiontext//lib/action_text/attachments/caching.rb#7 +module ActionText::Attachments::Caching + # source://actiontext//lib/action_text/attachments/caching.rb#8 + def cache_key(*args); end + + private + + # source://actiontext//lib/action_text/attachments/caching.rb#13 + def cache_digest; end +end + +# source://actiontext//lib/action_text/attachments/minification.rb#7 +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#11 + def fragment_by_minifying_attachments(content); end +end + +# source://actiontext//lib/action_text/attachments/trix_conversion.rb#9 +module ActionText::Attachments::TrixConversion + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionText::Attachments::TrixConversion::ClassMethods + + # source://actiontext//lib/action_text/attachments/trix_conversion.rb#24 + def to_trix_attachment(content = T.unsafe(nil)); end + + private + + # source://actiontext//lib/action_text/attachments/trix_conversion.rb#31 + 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#13 + def fragment_by_converting_trix_attachments(content); end + + # source://actiontext//lib/action_text/attachments/trix_conversion.rb#19 + def from_trix_attachment(trix_attachment); end +end + +# source://actiontext//lib/action_text/attribute.rb#6 +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#53 + def has_rich_text(name, encrypted: T.unsafe(nil), strict_loading: T.unsafe(nil), store_if_blank: T.unsafe(nil)); end + + # source://actiontext//lib/action_text/attribute.rb#100 + def rich_text_association_names; end + + # source://actiontext//lib/action_text/attribute.rb#95 + def with_all_rich_text; end +end + +# # Action Text Content +# +# The `ActionText::Content` class wraps an HTML fragment to add support for +# parsing, rendering and serialization. It can be used to extract links and +# attachments, convert the fragment to plain text, or serialize the fragment to +# the database. +# +# The ActionText::RichText record serializes the `body` attribute as +# `ActionText::Content`. +# +# class Message < ActiveRecord::Base +# has_rich_text :content +# end +# +# message = Message.create!(content: "

Funny times!

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

Funny times!

" +# body.to_plain_text # => "Funny times!" +# +# source://actiontext//lib/action_text/content.rb#24 +class ActionText::Content + include ::ActionText::ContentHelper + 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#40 + def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/content.rb#169 + def ==(other); end + + # source://actiontext//lib/action_text/content.rb#93 + def append_attachables(attachables); end + + # source://actiontext//lib/action_text/content.rb#161 + def as_json(*_arg0); end + + # Extracts +ActionText::Attachable+s from the HTML fragment: + # + # attachable = ActiveStorage::Blob.first + # html = %Q() + # content = ActionText::Content.new(html) + # content.attachables # => [attachable] + # + # source://actiontext//lib/action_text/content.rb#87 + def attachables; end + + # source://actiontext//lib/action_text/content.rb#71 + def attachment_galleries; end + + # Extracts +ActionText::Attachment+s from the HTML fragment: + # + # attachable = ActiveStorage::Blob.first + # html = %Q() + # content = ActionText::Content.new(html) + # content.attachments # => [# ["http://example.com/"] + # + # source://actiontext//lib/action_text/content.rb#55 + def links; end + + # source://actiontext//lib/action_text/content.rb#30 + def present?(*_arg0, **_arg1, &_arg2); end + + # source://actiontext//lib/action_text/rendering.rb#14 + def render(*_arg0, **_arg1, &_arg2); end + + # source://actiontext//lib/action_text/content.rb#109 + def render_attachment_galleries(&block); end + + # source://actiontext//lib/action_text/content.rb#98 + def render_attachments(**options, &block); end + + # source://actiontext//lib/action_text/content.rb#138 + def to_html; end + + # source://actiontext//lib/action_text/content.rb#146 + def to_partial_path; end + + # Returns a plain-text version of the markup contained by the content, with tags + # removed but HTML entities encoded. + # + # content = ActionText::Content.new("

Funny times!

") + # content.to_plain_text # => "Funny times!" + # + # content = ActionText::Content.new("
safe
") + # content.to_plain_text # => "safeunsafe" + # + # NOTE: that the returned string is not HTML safe and should not be rendered in + # browsers. + # + # content = ActionText::Content.new("<script>alert()</script>") + # content.to_plain_text # => "" + # + # source://actiontext//lib/action_text/content.rb#130 + def to_plain_text; end + + # source://actiontext//lib/action_text/content.rb#142 + def to_rendered_html_with_layout; end + + # Safely transforms Content into an HTML String. + # + # content = ActionText::Content.new(content: "

Funny times!

") + # content.to_s # => "

Funny times!

" + # + # content = ActionText::Content.new("
safe
") + # content.to_s # => "
safeunsafe
" + # + # source://actiontext//lib/action_text/content.rb#157 + def to_s; end + + # source://actiontext//lib/action_text/content.rb#134 + def to_trix_html; end + + private + + # source://actiontext//lib/action_text/content.rb#186 + def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end + + # source://actiontext//lib/action_text/content.rb#191 + def attachment_gallery_for_node(node); end + + # source://actiontext//lib/action_text/content.rb#182 + def attachment_gallery_nodes; end + + # source://actiontext//lib/action_text/content.rb#178 + def attachment_nodes; end + + class << self + # source://actiontext//lib/action_text/content.rb#33 + def fragment_by_canonicalizing_content(content); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + def renderer; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + 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 sanitize_content_attachment(content_attachment); end + def sanitizer; end + def sanitizer=(val); end + def sanitizer_allowed_attributes; end + def sanitizer_allowed_tags; end + def scrubber; end + def scrubber=(val); end + + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def encrypted_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def encrypted_attributes=(new_value); end + end +end + +module ActionText::EncryptedRichText::GeneratedAssociationMethods; end +module ActionText::EncryptedRichText::GeneratedAttributeMethods; end + +# source://actiontext//lib/action_text/encryption.rb#6 +module ActionText::Encryption + # source://actiontext//lib/action_text/encryption.rb#14 + def decrypt; end + + # source://actiontext//lib/action_text/encryption.rb#7 + def encrypt; end + + private + + # source://actiontext//lib/action_text/encryption.rb#26 + def decrypt_rich_texts; end + + # source://actiontext//lib/action_text/encryption.rb#22 + def encrypt_rich_texts; end + + # source://actiontext//lib/action_text/encryption.rb#34 + def encryptable_rich_texts; end + + # @return [Boolean] + # + # source://actiontext//lib/action_text/encryption.rb#30 + def has_encrypted_rich_texts?; end +end + +# source://actiontext//lib/action_text/engine.rb#13 +class ActionText::Engine < ::Rails::Engine + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# # Action Text FixtureSet +# +# Fixtures are a way of organizing data that you want to test against; in short, +# sample data. +# +# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation. +# +# ### YAML +# +# Like other Active Record-backed models, 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#41 +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#61 + def attachment(fixture_set_name, label, column_type: T.unsafe(nil)); end + end +end + +# source://actiontext//lib/action_text/fragment.rb#6 +class ActionText::Fragment + # @return [Fragment] a new instance of Fragment + # + # source://actiontext//lib/action_text/fragment.rb#28 + def initialize(source); end + + # source://actiontext//lib/action_text/fragment.rb#26 + def deconstruct(*_arg0, **_arg1, &_arg2); end + + # source://actiontext//lib/action_text/fragment.rb#32 + def find_all(selector); end + + # source://actiontext//lib/action_text/fragment.rb#41 + def replace(selector); end + + # Returns the value of attribute source. + # + # source://actiontext//lib/action_text/fragment.rb#24 + def source; end + + # source://actiontext//lib/action_text/fragment.rb#54 + def to_html; end + + # source://actiontext//lib/action_text/fragment.rb#50 + def to_plain_text; end + + # source://actiontext//lib/action_text/fragment.rb#58 + def to_s; end + + # @yield [source = self.source.dup] + # + # source://actiontext//lib/action_text/fragment.rb#36 + def update; end + + class << self + # source://actiontext//lib/action_text/fragment.rb#19 + def from_html(html); end + + # source://actiontext//lib/action_text/fragment.rb#8 + def wrap(fragment_or_html); end + end +end + +# source://actiontext//lib/action_text/html_conversion.rb#6 +module ActionText::HtmlConversion + extend ::ActionText::HtmlConversion + + # source://actiontext//lib/action_text/html_conversion.rb#17 + def create_element(tag_name, attributes = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/html_conversion.rb#13 + def fragment_for_html(html); end + + # source://actiontext//lib/action_text/html_conversion.rb#9 + def node_to_html(node); end + + private + + # source://actiontext//lib/action_text/html_conversion.rb#22 + def document; end +end + +# source://actiontext//lib/action_text/plain_text_conversion.rb#6 +module ActionText::PlainTextConversion + extend ::ActionText::PlainTextConversion + + # source://actiontext//lib/action_text/plain_text_conversion.rb#9 + def node_to_plain_text(node); end + + private + + # source://actiontext//lib/action_text/plain_text_conversion.rb#106 + def break_if_nested_list(node, text); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#83 + def bullet_for_li_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#95 + def indentation_for_li_node(node); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#102 + def list_node_depth_for_node(node); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#91 + def list_node_name_for_li_node(node); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#34 + def plain_text_for_block(node, index = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#66 + def plain_text_for_blockquote_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#50 + def plain_text_for_br_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#58 + def plain_text_for_div_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#62 + def plain_text_for_figcaption_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#34 + def plain_text_for_h1_node(node, index = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#71 + def plain_text_for_li_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#42 + def plain_text_for_list(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#14 + def plain_text_for_node(node, index = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#22 + def plain_text_for_node_children(node); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#42 + def plain_text_for_ol_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#34 + def plain_text_for_p_node(node, index = T.unsafe(nil)); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#54 + def plain_text_for_text_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#42 + def plain_text_for_ul_node(node, index); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#30 + def plain_text_method_for_node(node); end + + # source://actiontext//lib/action_text/plain_text_conversion.rb#79 + def remove_trailing_newlines(text); end +end + +class ActionText::Record < ::ActiveRecord::Base + include ::ActionText::Record::GeneratedAttributeMethods + include ::ActionText::Record::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +module ActionText::Record::GeneratedAssociationMethods; end +module ActionText::Record::GeneratedAttributeMethods; end + +# source://actiontext//lib/action_text/rendering.rb#9 +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#18 + def action_controller_renderer; end + + # source://actiontext//lib/action_text/rendering.rb#30 + def render(*args, &block); end + + # source://actiontext//lib/action_text/rendering.rb#22 + def with_renderer(renderer); end +end + +class ActionText::RichText < ::ActionText::Record + include ::ActionText::RichText::GeneratedAttributeMethods + include ::ActionText::RichText::GeneratedAssociationMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_embeds_attachments(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_embeds_blobs(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_embeds_attachments(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_embeds_blobs(*args); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def with_attached_embeds(*args, **_arg1); end + end +end + +module ActionText::RichText::GeneratedAssociationMethods + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/attached/model.rb#215 + def embeds; end + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/attached/model.rb#220 + def embeds=(attachables); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def embeds_attachment_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def embeds_attachment_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def embeds_attachments; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def embeds_attachments=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def embeds_blob_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def embeds_blob_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def embeds_blobs; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def embeds_blobs=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def record; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def record=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def record_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def record_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_record; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_record; end +end + +module ActionText::RichText::GeneratedAttributeMethods; end + +# source://actiontext//lib/action_text/serialization.rb#6 +module ActionText::Serialization + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionText::Serialization::ClassMethods + + # source://actiontext//lib/action_text/serialization.rb#34 + def _dump(*_arg0); end +end + +# source://actiontext//lib/action_text/serialization.rb#0 +module ActionText::Serialization::ClassMethods + # source://actiontext//lib/action_text/serialization.rb#10 + def _load(content); end + + # source://actiontext//lib/action_text/serialization.rb#14 + def dump(content); end + + # source://actiontext//lib/action_text/serialization.rb#10 + def load(content); end +end + +module ActionText::TagHelper + def rich_text_area_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + def rich_textarea_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#6 +class ActionText::TrixAttachment + # @return [TrixAttachment] a new instance of TrixAttachment + # + # source://actiontext//lib/action_text/trix_attachment.rb#53 + def initialize(node); end + + # source://actiontext//lib/action_text/trix_attachment.rb#57 + def attributes; end + + # Returns the value of attribute node. + # + # source://actiontext//lib/action_text/trix_attachment.rb#51 + def node; end + + # source://actiontext//lib/action_text/trix_attachment.rb#61 + def to_html; end + + # source://actiontext//lib/action_text/trix_attachment.rb#65 + def to_s; end + + private + + # source://actiontext//lib/action_text/trix_attachment.rb#70 + def attachment_attributes; end + + # source://actiontext//lib/action_text/trix_attachment.rb#74 + def composed_attributes; end + + # source://actiontext//lib/action_text/trix_attachment.rb#82 + def read_json_attribute(name); end + + # source://actiontext//lib/action_text/trix_attachment.rb#78 + def read_json_object_attribute(name); end + + class << self + # source://actiontext//lib/action_text/trix_attachment.rb#21 + def from_attributes(attributes); end + + private + + # source://actiontext//lib/action_text/trix_attachment.rb#35 + def process_attributes(attributes); end + + # source://actiontext//lib/action_text/trix_attachment.rb#39 + def transform_attribute_keys(attributes); end + + # source://actiontext//lib/action_text/trix_attachment.rb#43 + def typecast_attribute_values(attributes); end + end +end + +# source://actiontext//lib/action_text/trix_attachment.rb#11 +ActionText::TrixAttachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://actiontext//lib/action_text/trix_attachment.rb#12 +ActionText::TrixAttachment::ATTRIBUTE_TYPES = T.let(T.unsafe(nil), Hash) + +# source://actiontext//lib/action_text/trix_attachment.rb#10 +ActionText::TrixAttachment::COMPOSED_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://actiontext//lib/action_text/trix_attachment.rb#8 +ActionText::TrixAttachment::SELECTOR = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/trix_attachment.rb#7 +ActionText::TrixAttachment::TAG_NAME = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/gem_version.rb#11 +module ActionText::VERSION; end + +# source://actiontext//lib/action_text/gem_version.rb#12 +ActionText::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actiontext//lib/action_text/gem_version.rb#13 +ActionText::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actiontext//lib/action_text/gem_version.rb#15 +ActionText::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/gem_version.rb#17 +ActionText::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actiontext//lib/action_text/gem_version.rb#14 +ActionText::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers.rb#35 + def eager_load!; end + end +end + +class ActionView::Helpers::FormBuilder + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1719 + def initialize(object_name, object, template, options); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2648 + def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2472 + def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2472 + def checkbox(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#909 + def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#909 + def collection_checkboxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#922 + def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#861 + def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def color_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def date_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/date_helper.rb#1237 + def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def datetime_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def datetime_local_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/date_helper.rb#1261 + def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def email_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2669 + def emitted_hidden_id?; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1684 + def field_helpers; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1684 + def field_helpers=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1684 + def field_helpers?; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1776 + def field_id(method, *suffixes, namespace: T.unsafe(nil), index: T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1796 + def field_name(method, *methods, multiple: T.unsafe(nil), index: T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2326 + def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2288 + def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2556 + def file_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#873 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2517 + def hidden_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1756 + def id; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1696 + def index; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2403 + def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def month_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1696 + def multipart; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1699 + def multipart=(multipart); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1696 + def multipart?; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def number_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def object; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def object=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def object_name; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def object_name=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def options; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1694 + def options=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def password_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def phone_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2495 + def radio_button(method, tag_value, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def range_field(method, options = T.unsafe(nil)); end + + def rich_text_area(method, options = T.unsafe(nil)); end + def rich_textarea(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def search_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#849 + def select(method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2588 + def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def telephone_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def text_area(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def text_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def textarea(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def time_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/date_helper.rb#1249 + def time_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#885 + def time_zone_select(method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1715 + def to_model; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1711 + def to_partial_path; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def url_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2023 + def week_field(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_options_helper.rb#897 + def weekday_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2754 + def convert_to_legacy_options(options); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2736 + def fields_for_nested_model(name, object, fields_options, block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2707 + def fields_for_with_nested_attributes(association_name, association, options, block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2703 + def nested_attributes_association?(association_name); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2749 + def nested_child_index(name); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2674 + def objectify_options(options); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#2680 + def submit_default_value; end + + class << self + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1707 + def _to_partial_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def field_helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def field_helpers=(new_value); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1684 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1590 + def _object_for_form_builder(object); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1346 + def check_box(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1346 + def checkbox(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1377 + def color_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1441 + def date_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1514 + def datetime_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1514 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1568 + def email_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1079 + def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1028 + def fields_for(record_name, record_object = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1247 + def file_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#435 + def form_for(record, options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#755 + def form_with(model: T.unsafe(nil), scope: T.unsafe(nil), url: T.unsafe(nil), format: T.unsafe(nil), **options, &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1214 + def hidden_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1151 + def label(object_name, method, content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1533 + def month_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1577 + def number_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1196 + def password_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1409 + def phone_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1369 + def radio_button(object_name, method, tag_value, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1586 + def range_field(object_name, method, options = T.unsafe(nil)); end + + def rich_text_area(object_name, method, options = T.unsafe(nil)); end + def rich_textarea(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1400 + def search_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1409 + def telephone_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1277 + def text_area(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1175 + def text_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1277 + def textarea(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1479 + def time_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1559 + def url_field(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1550 + def week_field(object_name, method, options = T.unsafe(nil)); end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#465 + def apply_form_for_options!(object, options); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1624 + def default_form_builder_class; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1595 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#1610 + def instantiate_builder(record_name, record_object, options); end + + class << self + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/form_helper.rb#483 + 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/apps/govquests-api/rails_app/sorbet/rbi/gems/actionview@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionview@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..e1c1d00 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/actionview@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,16238 @@ +# 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 + extend ::AbstractController::Helpers::Resolution + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionview//lib/action_view/layouts.rb#212 + def _layout_conditions; end + + # source://actionview//lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _process_action_callbacks; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/renderers.rb#33 + def _renderers; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/renderers.rb#33 + def _renderers=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_process_action_callbacks(&block); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/flash.rb#38 + def alert; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def allow_forgery_protection; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def allow_forgery_protection=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def assets_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_asset_host_protocol=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#100 + def default_url_options; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#100 + def default_url_options=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/conditional_get.rb#15 + def etaggers; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/conditional_get.rb#15 + def etaggers=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/flash.rb#12 + def flash(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_origin_check; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_origin_check=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_strategy=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#70 + def helpers_path; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#70 + def helpers_path=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#70 + def helpers_path?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#71 + def include_all_helpers; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#71 + def include_all_helpers=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#71 + def include_all_helpers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def log_warning_on_csrf_failure; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/flash.rb#38 + def notice; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def per_form_csrf_tokens; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def per_form_csrf_tokens=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def request_forgery_protection_token; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def request_forgery_protection_token=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); end + + private + + # source://actionview//lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/base.rb#324 + def _protected_ivars; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _default_form_builder; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/form_builder.rb#35 + def _default_form_builder?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _flash_types; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _flash_types=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/flash.rb#10 + def _flash_types?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _helper_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#17 + def _helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://actionview//lib/action_view/layouts.rb#211 + def _layout?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://actionview//lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _process_action_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _process_action_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _renderers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/renderers.rb#33 + def _renderers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _view_cache_dependencies; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _wrapper_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def allow_forgery_protection; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def allow_forgery_protection=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def asset_host; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def asset_host=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def assets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def assets_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def csrf_token_storage_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def csrf_token_storage_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_asset_host_protocol; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_asset_host_protocol=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#100 + def default_url_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etag_with_template_digest; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/etag_with_template_digest.rb#31 + def etag_with_template_digest?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etaggers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/conditional_get.rb#15 + def etaggers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_origin_check; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_origin_check=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def forgery_protection_strategy; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def forgery_protection_strategy=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def fragment_cache_keys; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def helpers_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def helpers_path=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#70 + def helpers_path?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def include_all_helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def include_all_helpers=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/helpers.rb#71 + def include_all_helpers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def javascripts_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def javascripts_dir=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def log_warning_on_csrf_failure; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def logger=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def per_form_csrf_tokens; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def per_form_csrf_tokens=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def perform_caching=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/callbacks.rb#36 + def raise_on_missing_callback_actions=(val); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/metal/redirecting.rb#17 + def raise_on_open_redirects=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def relative_url_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def relative_url_root=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def request_forgery_protection_token; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def request_forgery_protection_token=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#115 + def stylesheets_dir; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/configurable.rb#116 + def stylesheets_dir=(value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_controller/base.rb#222 + def without_modules(*modules); end + end +end + +# :include: ../README.rdoc +# +# source://actionview//lib/action_view/gem_version.rb#3 +module ActionView + extend ::ActiveSupport::Autoload + + class << self + # source://actionview//lib/action_view/deprecator.rb#4 + def deprecator; end + + # source://actionview//lib/action_view.rb#93 + def eager_load!; end + + # Returns the currently loaded version of Action View as a +Gem::Version+. + # + # 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#8 +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 "application/header" %> +# Something really specific and terrific +# <%= render "application/footer" %> +# +# As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the +# result of the rendering. The output embedding writes it to the current template. +# +# 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 "application/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 "application/header", { headline: "Welcome", person: person } %> +# +# These can now be accessed in application/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. +# +# By default, templates will accept any locals as keyword arguments. To restrict what locals a template accepts, add a locals: magic comment: +# +# <%# locals: (headline:) %> +# +# Headline: <%= headline %> +# +# In cases where the local variables are optional, declare the keyword argument with a default value: +# +# <%# locals: (headline: nil) %> +# +# <% unless headline.nil? %> +# Headline: <%= headline %> +# <% end %> +# +# Read more about strict locals in {Action View Overview}[https://guides.rubyonrails.org/action_view_overview.html#strict-locals] +# in the guides. +# +# === 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/rails/builder]. +# +# source://actionview//lib/action_view/base.rb#157 +class ActionView::Base + include ::ActionView::Context + include ::ERB::Escape + include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::Benchmarkable + include ::ActionView::Helpers::ActiveModelHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + 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 + 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#244 + def initialize(lookup_context, assigns, controller); end + + # source://actionview//lib/action_view/base.rb#181 + def _routes; end + + # source://actionview//lib/action_view/base.rb#181 + def _routes=(_arg0); end + + # source://actionview//lib/action_view/base.rb#181 + def _routes?; end + + # source://actionview//lib/action_view/base.rb#261 + def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/base.rb#179 + def annotate_rendered_view_with_filenames; end + + # source://actionview//lib/action_view/base.rb#179 + def annotate_rendered_view_with_filenames=(val); end + + # source://actionview//lib/action_view/base.rb#223 + def assign(new_assigns); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def assigns; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def assigns=(_arg0); end + + # source://actionview//lib/action_view/base.rb#176 + def automatically_disable_submit_tag; end + + # source://actionview//lib/action_view/base.rb#176 + def automatically_disable_submit_tag=(val); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/base.rb#287 + def compiled_method_container; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + def config; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attr_internal.rb#44 + 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#173 + def default_formats; end + + # source://actionview//lib/action_view/base.rb#173 + def default_formats=(val); end + + # source://actionview//lib/action_view/base.rb#161 + def field_error_proc; end + + # source://actionview//lib/action_view/base.rb#161 + def field_error_proc=(val); end + + # source://actionview//lib/action_view/base.rb#221 + def formats(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#221 + def formats=(arg); end + + # source://actionview//lib/action_view/base.rb#295 + def in_rendering_context(options); end + + # source://actionview//lib/action_view/base.rb#221 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#221 + def locale=(arg); end + + # source://actionview//lib/action_view/base.rb#182 + def logger; end + + # source://actionview//lib/action_view/base.rb#182 + def logger=(_arg0); end + + # source://actionview//lib/action_view/base.rb#182 + def logger?; end + + # Returns the value of attribute lookup_context. + # + # source://actionview//lib/action_view/base.rb#218 + def lookup_context; end + + # source://actionview//lib/action_view/base.rb#170 + def prefix_partial_path_with_controller_namespace; end + + # source://actionview//lib/action_view/base.rb#170 + def prefix_partial_path_with_controller_namespace=(_arg0); end + + # source://actionview//lib/action_view/base.rb#170 + def prefix_partial_path_with_controller_namespace?; end + + # source://actionview//lib/action_view/base.rb#165 + def streaming_completion_on_exception; end + + # source://actionview//lib/action_view/base.rb#165 + def streaming_completion_on_exception=(val); end + + # source://actionview//lib/action_view/base.rb#221 + def view_paths(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#221 + def view_paths=(arg); end + + # Returns the value of attribute view_renderer. + # + # source://actionview//lib/action_view/base.rb#218 + def view_renderer; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _routes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _routes=(new_value); end + + # source://actionview//lib/action_view/base.rb#181 + def _routes?; end + + # source://actionview//lib/action_view/base.rb#179 + def annotate_rendered_view_with_filenames; end + + # source://actionview//lib/action_view/base.rb#179 + def annotate_rendered_view_with_filenames=(val); end + + # source://actionview//lib/action_view/base.rb#176 + def automatically_disable_submit_tag; end + + # source://actionview//lib/action_view/base.rb#176 + def automatically_disable_submit_tag=(val); end + + # source://actionview//lib/action_view/base.rb#187 + def cache_template_loading; end + + # source://actionview//lib/action_view/base.rb#191 + def cache_template_loading=(value); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/base.rb#213 + 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#2763 + def default_form_builder; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#2763 + def default_form_builder=(val); end + + # source://actionview//lib/action_view/base.rb#173 + def default_formats; end + + # source://actionview//lib/action_view/base.rb#173 + def default_formats=(val); end + + # :stopdoc: + # + # source://actionview//lib/action_view/base.rb#230 + def empty; end + + # source://actionview//lib/action_view/base.rb#185 + def erb_trim_mode=(arg); end + + # source://actionview//lib/action_view/base.rb#161 + def field_error_proc; end + + # source://actionview//lib/action_view/base.rb#161 + def field_error_proc=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def logger=(new_value); end + + # source://actionview//lib/action_view/base.rb#182 + def logger?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def prefix_partial_path_with_controller_namespace; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def prefix_partial_path_with_controller_namespace=(new_value); end + + # source://actionview//lib/action_view/base.rb#170 + def prefix_partial_path_with_controller_namespace?; end + + # source://actionview//lib/action_view/base.rb#165 + def streaming_completion_on_exception; end + + # source://actionview//lib/action_view/base.rb#165 + def streaming_completion_on_exception=(val); end + + # source://actionview//lib/action_view/base.rb#238 + def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end + + # source://actionview//lib/action_view/base.rb#199 + def with_empty_template_cache; end + + # source://actionview//lib/action_view/base.rb#234 + def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/base.rb#195 + def xss_safe?; end + end +end + +# source://actionview//lib/action_view/cache_expiry.rb#4 +module ActionView::CacheExpiry; end + +# source://actionview//lib/action_view/cache_expiry.rb#5 +class ActionView::CacheExpiry::ViewReloader + # @return [ViewReloader] a new instance of ViewReloader + # + # source://actionview//lib/action_view/cache_expiry.rb#6 + def initialize(watcher:, &block); end + + # source://actionview//lib/action_view/cache_expiry.rb#21 + def execute; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/cache_expiry.rb#16 + def updated?; end + + private + + # source://actionview//lib/action_view/cache_expiry.rb#64 + def all_view_paths; end + + # source://actionview//lib/action_view/cache_expiry.rb#37 + def build_watcher; end + + # source://actionview//lib/action_view/cache_expiry.rb#60 + def dirs_to_watch; end + + # source://actionview//lib/action_view/cache_expiry.rb#55 + def rebuild_watcher; end + + # source://actionview//lib/action_view/cache_expiry.rb#33 + def reload!; 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#71 + 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#91 + 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#130 + def render_collection_derive_partial(collection, context, block); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#112 + def render_collection_with_partial(collection, partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#182 + def collection_with_template(view, template, layout, collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#153 + def render_collection(collection, view, path, template, layout, block); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#148 + 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#55 + def preload!; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#47 + def size; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#100 +class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator + # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#101 + def initialize(collection, paths); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#106 + def each_with_info; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#78 +class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator + # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#79 + def initialize(collection, path, variables, relation); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#89 + def each_with_info; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 + def from_collection(collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#95 + def preload!; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#60 +class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator + # @return [SameCollectionIterator] a new instance of SameCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#61 + def initialize(collection, path, variables); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#71 + def each_with_info; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 + 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#17 + def find_dependencies(name, template, view_paths = T.unsafe(nil)); end + + # source://actionview//lib/action_view/dependency_tracker.rb#24 + def register_tracker(extension, tracker); end + + # source://actionview//lib/action_view/dependency_tracker.rb#35 + 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#157 + 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#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/ruby_tracker.rb#5 +class ActionView::DependencyTracker::RubyTracker + # @return [RubyTracker] a new instance of RubyTracker + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#20 + def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#12 + def dependencies; end + + private + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#38 + def explicit_dependencies; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def name; end + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#28 + def render_dependencies; end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def template; end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def view_paths; end + + class << self + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#8 + def call(name, template, view_paths = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#16 + def supports_view_paths?; end + end +end + +# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#6 +ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#5 +class ActionView::DependencyTracker::WildcardResolver + # @return [WildcardResolver] a new instance of WildcardResolver + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#6 + def initialize(view_paths, dependencies); end + + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#13 + def resolve; end + + private + + # Returns the value of attribute explicit_dependencies. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def explicit_dependencies; end + + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#22 + def resolved_wildcard_dependencies; end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def view_paths; end + + # Returns the value of attribute wildcard_dependencies. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def wildcard_dependencies; end +end + +# 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#35 +ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/template/error.rb#11 +class ActionView::EncodingError < ::StandardError; end + +# A resolver that loads files from the filesystem. +# +# source://actionview//lib/action_view/template/resolver.rb#90 +class ActionView::FileSystemResolver < ::ActionView::Resolver + # @raise [ArgumentError] + # @return [FileSystemResolver] a new instance of FileSystemResolver + # + # source://actionview//lib/action_view/template/resolver.rb#93 + def initialize(path); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/resolver.rb#112 + def ==(resolver); end + + # source://actionview//lib/action_view/template/resolver.rb#117 + def all_template_paths; end + + # source://actionview//lib/action_view/template/resolver.rb#126 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#101 + def clear_cache; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/resolver.rb#112 + def eql?(resolver); end + + # Returns the value of attribute path. + # + # source://actionview//lib/action_view/template/resolver.rb#91 + def path; end + + # source://actionview//lib/action_view/template/resolver.rb#107 + def to_path; end + + # source://actionview//lib/action_view/template/resolver.rb#107 + def to_s; end + + private + + # source://actionview//lib/action_view/template/resolver.rb#131 + def _find_all(name, prefix, partial, details, key, locals); end + + # source://actionview//lib/action_view/template/resolver.rb#150 + def build_unbound_template(template); end + + # source://actionview//lib/action_view/template/resolver.rb#208 + def escape_entry(entry); end + + # source://actionview//lib/action_view/template/resolver.rb#180 + def filter_and_sort_by_details(templates, requested_details); end + + # source://actionview//lib/action_view/template/resolver.rb#146 + def source_for_template(template); end + + # Safe glob within @path + # + # source://actionview//lib/action_view/template/resolver.rb#195 + def template_glob(glob); end + + # source://actionview//lib/action_view/template/resolver.rb#163 + def unbound_templates_from_path(path); end +end + +# source://actionview//lib/action_view/helpers/capture_helper.rb#6 +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::ContentExfiltrationPreventionHelper + 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#35 + def eager_load!; end + end +end + +# source://actionview//lib/action_view/helpers/active_model_helper.rb#8 +module ActionView::Helpers::ActiveModelHelper; end + +# = Active \Model Instance Tag \Helpers +# +# source://actionview//lib/action_view/helpers/active_model_helper.rb#12 +module ActionView::Helpers::ActiveModelInstanceTag + # source://actionview//lib/action_view/helpers/active_model_helper.rb#20 + 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 + +# = Action View Asset Tag \Helpers +# +# This module provides methods for generating HTML that links views to assets such +# as images, JavaScripts, stylesheets, and feeds. These methods do not verify +# the assets exist before linking to them: +# +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#21 +module ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default=(val); end + + # Returns an HTML audio tag for the +sources+. If +sources+ is a string, + # a single audio tag will be returned. If +sources+ is an array, an audio + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public audios + # directory, or Active Storage attachments. + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. + # + # audio_tag("sound") + # # => + # audio_tag("sound.wav") + # # => + # audio_tag("sound.wav", autoplay: true, controls: true) + # # => + # audio_tag("sound.wav", "sound.mid") + # # => + # + # Active Storage blobs (audios that are uploaded by the users of your app): + # + # audio_tag(user.name_pronunciation_audio) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#593 + 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#271 + 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#312 + def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + 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" height="45", and "50" becomes width="50" height="50". + # :size will be ignored if the value is not in the correct format. + # * :srcset - If supplied as a hash or array of [source, descriptor] + # pairs, each image path will be expanded before the list is formatted as a string. + # + # ==== 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#430 + 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 HTTP Early Hints, and the +defer+ option is not + # enabled, \Rails will push a 103 Early Hints response that links + # to the assets. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. This includes but is not limited to the following options: + # + # * :extname - Append an extension to the generated URL unless the extension + # already exists. This only applies for relative URLs. + # * :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. + # * :async - When set to +true+, adds the +async+ HTML + # attribute, allowing the script to be fetched in parallel to be parsed + # and evaluated as soon as possible. + # * :defer - When set to +true+, adds the +defer+ HTML + # attribute, which indicates to the browser that the script is meant to + # be executed after the document has been parsed. Additionally, prevents + # sending the Preload Links header. + # * :nopush - Specify if the use of server push is not desired + # for the script. Defaults to +true+. + # + # Any other specified options will be treated as HTML attributes for the + # +script+ tag. + # + # For more information regarding how the :async and :defer + # options affect the + # + # 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 + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", async: true + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", defer: true + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#113 + def javascript_include_tag(*sources); end + + # Returns an HTML picture tag for the +sources+. If +sources+ is a string, + # a single picture tag will be returned. If +sources+ is an array, a picture + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public images + # directory, or Active Storage attachments. Since the picture tag requires + # an img tag, the last element you provide will be used for the img tag. + # For complete control over the picture tag, a block can be passed, which + # will populate the contents of the tag accordingly. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. Apart from all the HTML supported options, the following are supported: + # + # * :image - Hash of options that are passed directly to the +image_tag+ helper. + # + # ==== Examples + # + # picture_tag("picture.webp") + # # => + # picture_tag("gold.png", :image => { :size => "20" }) + # # => + # picture_tag("gold.png", :image => { :size => "45x70" }) + # # => + # picture_tag("picture.webp", "picture.png") + # # => + # picture_tag("picture.webp", "picture.png", :image => { alt: "Image" }) + # # => Image + # picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" }) + # # => Image + # picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # picture_tag { tag(:source, :srcset => image_path("picture-small.webp"), :media => "(min-width: 600px)") + tag(:source, :srcset => image_path("picture-big.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # + # Active Storage blobs (images that are uploaded by the users of your app): + # + # picture_tag(user.profile_picture) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#491 + def picture_tag(*sources, &block); end + + # Returns a link tag that browsers can use to preload the +source+. + # The +source+ can be the path of a resource managed by asset pipeline, + # a full path, or an URI. + # + # ==== 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#355 + def preload_link_tag(source, options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + 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 HTTP Early Hints, \Rails will push a 103 Early + # Hints response that links to the assets. + # + # ==== 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. + # * :nonce - When set to true, adds an automatic nonce value if + # you have Content Security Policy enabled. + # * :nopush - Specify if the use of server push is not desired + # for the stylesheet. Defaults 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" + # # => + # # + # + # stylesheet_link_tag "style", nonce: true + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#202 + 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, files that exist in your public videos + # directory, or Active Storage attachments. + # + # ==== 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" height="45", and "50" becomes width="50" height="50". + # :size will be ignored if the value is not in the correct format. + # * :poster_skip_pipeline will bypass the asset pipeline when using + # the :poster option instead using an asset in the public folder. + # + # ==== 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") + # # => + # + # Active Storage blobs (videos that are uploaded by the users of your app): + # + # video_tag(user.intro_video) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#561 + def video_tag(*sources); end + + private + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#634 + def check_for_image_tag_errors(options); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#625 + def extract_dimensions(size); end + + # @yield [options] + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#598 + def multiple_sources_tag_builder(type, sources); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#615 + def resolve_asset_source(asset_type, source, skip_pipeline); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#640 + def resolve_link_as(extname, mime_type); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#654 + 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#28 + def apply_stylesheet_media_default; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header=(val); end + end +end + +# Some HTTP client and proxies have a 4kiB header limit, but more importantly +# including preload links has diminishing returns so it's best to not go overboard +# +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#652 +ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) + +# = Action View Asset URL \Helpers +# +# This module provides methods for generating asset paths and +# URLs. +# +# 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#121 +module ActionView::Helpers::AssetUrlHelper + # This is the entry point for all assets. + # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the + # 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#187 + 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#231 + 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#430 + 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#442 + def audio_url(source, options = T.unsafe(nil)); end + + # Compute extname to append to asset path. Returns +nil+ if + # nothing should be added. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#243 + def compute_asset_extname(source, options = T.unsafe(nil)); end + + # Pick an asset host for this source. Returns +nil+ if no host is set, + # 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#277 + def compute_asset_host(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # Computes asset path to public directory. Plugins and + # extensions can override this method to point to custom assets + # or generate digested paths or query strings. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#266 + 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#455 + 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#467 + 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#378 + 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#390 + 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#321 + 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#333 + 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#187 + 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#430 + 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#455 + 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#378 + 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#321 + 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#348 + 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#404 + def path_to_video(source, options = T.unsafe(nil)); end + + # Computes asset path to public directory. Plugins and + # extensions can override this method to point to custom assets + # or generate digested paths or query strings. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#266 + 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#348 + 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#360 + 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#231 + 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#442 + 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#467 + 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#390 + 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#333 + 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#360 + 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#416 + 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#404 + 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#416 + def video_url(source, options = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#236 +ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# Maps asset types to public directory. +# +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#254 +ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#122 +ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp) + +# = Action View Atom Feed \Helpers +# +# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#8 +module ActionView::Helpers::AtomFeedHelper + # Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other + # 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 + +# = Action View Cache \Helpers +# +# source://actionview//lib/action_view/helpers/cache_helper.rb#6 +module ActionView::Helpers::CacheHelper + # This helper exposes a method for caching fragments of a view + # 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') + # + # One last type of dependency can be determined implicitly: + # + # render "maintenance_tasks/runs/info/#{run.status}" + # + # Because the value passed to render ends in interpolation, Action View + # will mark all partials within the "maintenace_tasks/runs/info" folder as + # dependencies. + # + # === 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#176 + 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#248 + 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#223 + 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#239 + 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#196 + def caching?; end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#256 + 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#213 + def uncacheable!; end + + private + + # source://actionview//lib/action_view/helpers/cache_helper.rb#278 + def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#267 + def fragment_name_with_digest(name, digest_path); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#288 + def read_fragment_for(name, options); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#292 + def write_fragment_for(name, options, &block); end +end + +# source://actionview//lib/action_view/helpers/cache_helper.rb#297 +module ActionView::Helpers::CacheHelper::CachingRegistry + extend ::ActionView::Helpers::CacheHelper::CachingRegistry + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#300 + def caching?; end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#304 + def track_caching; end +end + +# source://actionview//lib/action_view/helpers/cache_helper.rb#7 +class ActionView::Helpers::CacheHelper::UncacheableFragmentError < ::StandardError; end + +# = Action View Capture \Helpers +# +# \CaptureHelper exposes methods to let you extract generated markup which +# can be used in other parts of a template or layout file. +# +# It provides a method to capture blocks into variables through #capture and +# a way to capture a block of markup for use in a layout through #content_for. +# +# As well as provides a method when using streaming responses through #provide. +# See ActionController::Streaming for more information. +# +# source://actionview//lib/action_view/helpers/capture_helper.rb#17 +module ActionView::Helpers::CaptureHelper + # The capture method extracts part of a template as a string object. + # 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#47 + def capture(*args, &block); end + + # Calling content_for stores a block of markup in an identifier for later use. + # In order to access this stored content in other templates, helper modules + # 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#172 + def content_for(name, content = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # content_for? checks whether any content has been captured yet using content_for. + # + # Useful to render parts of your layout differently based on what is in your views. + # + # <%# This is the layout %> + # + # + # My Website + # <%= yield :script %> + # + # + # <%= yield %> + # <%= yield :right_col %> + # + # + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#215 + def content_for?(name); end + + # The same as +content_for+ but when used with streaming flushes + # 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. + # + # See ActionController::Streaming for more information. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#194 + def provide(name, content = T.unsafe(nil), &block); end + + # Use an alternate output buffer for the duration of the block. + # Defaults to a new empty string. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#221 + def with_output_buffer(buf = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#5 +module ActionView::Helpers::ContentExfiltrationPreventionHelper + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#61 + def prevent_content_exfiltration(html); end + + class << self + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + end +end + +# Close any open tags that support CDATA (textarea, xmp) before each form tag. +# This prevents attackers from injecting unclosed tags that could capture +# form contents. +# +# For example, an attacker might inject: +# +#
    or +# the end of the document would be captured by the attacker's +# + # + # textarea(:comment, :text, size: "20x30") + # # => + # + # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') + # # => + # + # textarea(:entry, :body, size: "20x20", disabled: 'disabled') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1277 + def text_area(object_name, method, options = T.unsafe(nil)); end + + # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object + # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a + # hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example + # shown. + # + # ==== Examples + # text_field(:article, :title, size: 20) + # # => + # + # text_field(:article, :title, class: "create_input") + # # => + # + # text_field(:article, :title, maxlength: 30, class: "title_input") + # # => + # + # text_field(:session, :user, onchange: "if ($('#session_user').val() === 'admin') { alert('Your login cannot be admin!'); }") + # # => + # + # text_field(:snippet, :code, size: 20, class: 'code_input') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1175 + def text_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+) + # on an object assigned to the template (identified by +object+). Additional options on the input tag can be passed as a + # hash with +options+. + # + # ==== Examples + # textarea(:article, :body, cols: 20, rows: 40) + # # => + # + # textarea(:comment, :text, size: "20x30") + # # => + # + # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') + # # => + # + # textarea(:entry, :body, size: "20x20", disabled: 'disabled') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1277 + def textarea(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "time". + # + # The default value is generated by trying to call +strftime+ with "%T.%L" + # on the object's value. If you pass include_seconds: false, it will be + # formatted by trying to call +strftime+ with "%H:%M" on the object's value. + # It is also possible to override this by passing the "value" option. + # + # ==== Options + # + # Supports the same options as FormTagHelper#time_field_tag. + # + # ==== Examples + # + # time_field("task", "started_at") + # # => + # + # You can create values for the "min" and "max" attributes by passing + # instances of Date or Time to the options hash. + # + # time_field("task", "started_at", min: Time.now) + # # => + # + # Alternatively, you can pass a String formatted as an ISO8601 time as the + # values for "min" and "max." + # + # time_field("task", "started_at", min: "01:00:00") + # # => + # + # By default, provided times will be formatted including seconds. You can render just the hour + # and minute by passing include_seconds: false. Some browsers will render a simpler UI + # if you exclude seconds in the timestamp format. + # + # time_field("task", "started_at", value: Time.now, include_seconds: false) + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1479 + def time_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "url". + # + # url_field("user", "homepage") + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1559 + def url_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "week". + # + # week_field("user", "born_on") + # # => + # + # The default value is generated by trying to call +strftime+ with "%Y-W%W" + # on the object's value, which makes it behave as expected for instances + # of DateTime and ActiveSupport::TimeWithZone. + # + # @user.born_on = Date.new(1984, 5, 12) + # week_field("user", "born_on") + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1550 + def week_field(object_name, method, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/form_helper.rb#465 + def apply_form_for_options!(object, options); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1624 + def default_form_builder_class; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1595 + def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1610 + def instantiate_builder(record_name, record_object, options); end + + class << self + # source://actionview//lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids=(val); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms=(val); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden=(val); end + end +end + +# = Action View Form Option \Helpers +# +# Provides a number of methods for turning different kinds of containers into a set of option tags. +# +# The collection_select, select and time_zone_select methods take an options parameter, a hash: +# +# * :include_blank - set to true or a prompt string if the first option element of the select element is a blank. Useful if there is not a default value required for the select element. +# +# select(:post, :category, Post::CATEGORIES, { include_blank: true }) +# +# could become: +# +# +# +# Another common case is a select tag for a belongs_to-associated object. +# +# Example with @post.person_id => 2: +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" }) +# +# could become: +# +# +# +# * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string. +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" }) +# +# could become: +# +# +# +# * :index - like the other form helpers, select can accept an :index option to manually set the ID used in the resulting output. Unlike other helpers, select expects this +# option to be in the +html_options+ parameter. +# +# select("album[]", :genre, %w[ rap rock country ], {}, { index: nil }) +# +# becomes: +# +# +# +# * :disabled - can be a single value or an array of values that will be disabled options in the final output. +# +# select(:post, :category, Post::CATEGORIES, { disabled: "restricted" }) +# +# could become: +# +# +# +# When used with the collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled. +# +# collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } }) +# +# If the categories "2008 stuff" and "Christmas" return true when the method archived? is called, this would return: +# +# +# source://actionview//lib/action_view/helpers/form_options_helper.rb#94 +module ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::TextHelper + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # Returns check box tags for the collection of existing return values of + # +method+ for +object+'s class. The value returned from calling +method+ + # on the instance +object+ will be selected. If calling +method+ returns + # +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each check box tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # class Post < ActiveRecord::Base + # has_and_belongs_to_many :authors + # end + # class Author < ActiveRecord::Base + # has_and_belongs_to_many :posts + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) + # + # If @post.author_ids is already [1], this would return: + # + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label { b.checkbox } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and check box + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and check box display order or even + # use the label as wrapper, as in the example above. + # + # The builder methods label and checkbox also accept + # extra HTML options: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.checkbox + b.text } + # end + # + # ==== Gotcha + # + # When no selection is made for a collection of checkboxes most + # web browsers will not send any value. + # + # For example, if we have a +User+ model with +category_ids+ field and we + # have the following code in our update action: + # + # @user.update(params[:user]) + # + # If no +category_ids+ are selected then we can safely assume this field + # will not be updated. + # + # This is possible thanks to a hidden field generated by the helper method + # for every collection of checkboxes. + # This hidden field is given the same field name as the checkboxes with a + # blank value. + # + # In the rare case you don't want this hidden field, you can pass the + # include_hidden: false option to the helper method. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#782 + def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns check box tags for the collection of existing return values of + # +method+ for +object+'s class. The value returned from calling +method+ + # on the instance +object+ will be selected. If calling +method+ returns + # +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each check box tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # class Post < ActiveRecord::Base + # has_and_belongs_to_many :authors + # end + # class Author < ActiveRecord::Base + # has_and_belongs_to_many :posts + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) + # + # If @post.author_ids is already [1], this would return: + # + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label { b.checkbox } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and check box + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and check box display order or even + # use the label as wrapper, as in the example above. + # + # The builder methods label and checkbox also accept + # extra HTML options: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.checkbox + b.text } + # end + # + # ==== Gotcha + # + # When no selection is made for a collection of checkboxes most + # web browsers will not send any value. + # + # For example, if we have a +User+ model with +category_ids+ field and we + # have the following code in our update action: + # + # @user.update(params[:user]) + # + # If no +category_ids+ are selected then we can safely assume this field + # will not be updated. + # + # This is possible thanks to a hidden field generated by the helper method + # for every collection of checkboxes. + # This hidden field is given the same field name as the checkboxes with a + # blank value. + # + # In the rare case you don't want this hidden field, you can pass the + # include_hidden: false option to the helper method. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#782 + def collection_checkboxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns radio button tags for the collection of existing return values + # of +method+ for +object+'s class. The value returned from calling + # +method+ on the instance +object+ will be selected. If calling +method+ + # returns +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each radio button tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # + # class Post < ActiveRecord::Base + # belongs_to :author + # end + # + # class Author < ActiveRecord::Base + # has_many :posts + # + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) + # + # If @post.author_id is already 1, this would return: + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label { b.radio_button } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and radio button + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and radio button display order or + # even use the label as wrapper, as in the example above. + # + # The builder methods label and radio_button also accept + # extra HTML options: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "radio_button") { b.radio_button(class: "radio_button") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.radio_button + b.text } + # end + # + # ==== Gotcha + # + # The HTML specification says when nothing is selected on a collection of radio buttons + # web browsers do not send any value to server. + # Unfortunately this introduces a gotcha: + # if a +User+ model has a +category_id+ field and in the form no category is selected, no +category_id+ parameter is sent. So, + # any strong parameters idiom like: + # + # params.expect(user: [...]) + # + # will raise an error since no {user: ...} will be present. + # + # To prevent this the helper generates an auxiliary hidden field before + # every collection of radio buttons. The hidden field has the same name as collection radio button and blank value. + # + # In case if you don't want the helper to generate this hidden field you can specify + # include_hidden: false option. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#698 + def collection_radio_buttons(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns + # + # + # + # + # + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#199 + def collection_select(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns + # + # + # + # + # + # + # + # + # + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#258 + def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns a string of tags, like options_for_select, but + # wraps them with tags: + # + # grouped_options = [ + # ['North America', + # [['United States','US'],'Canada']], + # ['Europe', + # ['Denmark','Germany','France']] + # ] + # grouped_options_for_select(grouped_options) + # + # grouped_options = { + # 'North America' => [['United States','US'], 'Canada'], + # 'Europe' => ['Denmark','Germany','France'] + # } + # grouped_options_for_select(grouped_options) + # + # Possible output: + # + # + # + # + # + # + # + # + # + # + # Parameters: + # * +grouped_options+ - Accepts a nested array or hash of strings. The first value serves as the + # label while the second value must be an array of options. The second value can be a + # nested array of text-value pairs. See options_for_select for more info. + # Ex. ["North America",[["United States","US"],["Canada","CA"]]] + # An optional third value can be provided as HTML attributes for the optgroup. + # Ex. ["North America",[["United States","US"],["Canada","CA"]], { disabled: "disabled" }] + # * +selected_key+ - A value equal to the +value+ attribute for one of the tags, + # which will have the +selected+ attribute set. Note: It is possible for this value to match multiple options + # as you might have the same option in multiple groups. Each will then get selected="selected". + # + # Options: + # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this + # prepends an option with a generic prompt - "Please select" - or the given prompt string. + # * :divider - the divider for the options groups. + # + # grouped_options = [ + # [['United States','US'], 'Canada'], + # ['Denmark','Germany','France'] + # ] + # grouped_options_for_select(grouped_options, nil, divider: '---------') + # + # Possible output: + # + # + # + # + # + # + # + # + # + # + # Note: Only the and tags are returned, so you still have to + # wrap the output in an appropriate tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#462 + def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = T.unsafe(nil)); end + + # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container + # where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and + # the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values + # become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag. +selected+ + # may also be an array of values to be selected when using a multiple select. + # + # options_for_select([["Dollar", "$"], ["Kroner", "DKK"]]) + # # => + # # => + # + # options_for_select([ "VISA", "MasterCard" ], "MasterCard") + # # => + # # => + # + # options_for_select({ "Basic" => "$20", "Plus" => "$40" }, "$40") + # # => + # # => + # + # options_for_select([ "VISA", "MasterCard", "Discover" ], ["VISA", "Discover"]) + # # => + # # => + # # => + # + # You can optionally provide HTML attributes as the last element of the array. + # + # options_for_select([ "Denmark", ["USA", { class: 'bold' }], "Sweden" ], ["USA", "Sweden"]) + # # => + # # => + # # => + # + # options_for_select([["Dollar", "$", { class: "bold" }], ["Kroner", "DKK", { onclick: "alert('HI');" }]]) + # # => + # # => + # + # If you wish to specify disabled option tags, set +selected+ to be a hash, with :disabled being either a value + # or array of values to be disabled. In this case, you can use :selected to specify selected option tags. + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: "Super Platinum") + # # => + # # => + # # => + # # => + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: ["Advanced", "Super Platinum"]) + # # => + # # => + # # => + # # => + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], selected: "Free", disabled: "Super Platinum") + # # => + # # => + # # => + # # => + # + # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#358 + def options_for_select(container, selected = T.unsafe(nil)); end + + # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning + # the result of a call to the +value_method+ as the option value and the +text_method+ as the option text. + # + # options_from_collection_for_select(@people, 'id', 'name') + # # => + # + # This is more often than not used inside a #select_tag like this example: + # + # select_tag 'person', options_from_collection_for_select(@people, 'id', 'name') + # + # If +selected+ is specified as a value or array of values, the element(s) returning a match on +value_method+ + # will be selected option tag(s). + # + # If +selected+ is specified as a Proc, those members of the collection that return true for the anonymous + # function are the selected values. + # + # +selected+ can also be a hash, specifying both :selected and/or :disabled values as required. + # + # Be sure to specify the same class as the +value_method+ when specifying selected or disabled options. + # Failure to do this will produce undesired results. Example: + # options_from_collection_for_select(@people, 'id', 'name', '1') + # Will not select a person with the id of 1 because 1 (an Integer) is not the same as '1' (a string) + # options_from_collection_for_select(@people, 'id', 'name', 1) + # should produce the desired results. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#401 + def options_from_collection_for_select(collection, value_method, text_method, selected = T.unsafe(nil)); end + + # Create a select tag and a series of contained option tags for the provided object and method. + # The option currently held by the object will be selected, provided that the object is available. + # + # There are two possible formats for the +choices+ parameter, corresponding to other helpers' output: + # + # * A flat collection (see options_for_select). + # * A nested collection (see grouped_options_for_select). + # + # Example with @post.person_id => 2: + # + # select :post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: true }) + # + # would become: + # + # + # + # This can be used to provide a default set of options in the standard way: before rendering the create form, a + # new model instance is assigned the default options and bound to @model_name. Usually this model is not saved + # to the database. Instead, a second model object is created when the create request is received. + # This allows the user to submit a form page more than once with the expected results of creating multiple records. + # In addition, this allows a single partial to be used to generate form inputs for both edit and create forms. + # + # By default, post.person_id is the selected option. Specify selected: value to use a different selection + # or selected: nil to leave all options unselected. Similarly, you can specify values to be disabled in the option + # tags by specifying the :disabled option. This can either be a single value or an array of values to be disabled. + # + # A block can be passed to +select+ to customize how the options tags will be rendered. This + # is useful when the options tag has complex attributes. + # + # select(report, :campaign_ids) do + # available_campaigns.each do |c| + # tag.option(c.name, value: c.id, data: { tags: c.tags.to_json }) + # end + # end + # + # ==== Gotcha + # + # The HTML specification says when +multiple+ parameter passed to select and all options got deselected + # web browsers do not send any value to server. Unfortunately this introduces a gotcha: + # if a +User+ model has many +roles+ and have +role_ids+ accessor, and in the form that edits roles of the user + # the user deselects all roles from +role_ids+ multiple select box, no +role_ids+ parameter is sent. So, + # any mass-assignment idiom like + # + # @user.update(params[:user]) + # + # wouldn't update roles. + # + # To prevent this the helper generates an auxiliary hidden field before + # every multiple select. The hidden field has the same name as multiple select and blank value. + # + # Note: The client either sends only the hidden field (representing + # the deselected multiple select box), or both fields. This means that the resulting array + # always contains a blank string. + # + # In case if you don't want the helper to generate this hidden field you can specify + # include_hidden: false option. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#159 + def select(object, method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns a string of option tags for pretty much any time zone in the + # world. Supply an ActiveSupport::TimeZone name as +selected+ to have it + # marked as the selected option tag. You can also supply an array of + # ActiveSupport::TimeZone objects as +priority_zones+, so that they will + # be listed above the rest of the (long) list. (You can use + # ActiveSupport::TimeZone.us_zones as a convenience for obtaining a list + # of the US time zones, or a Regexp to select the zones of your choice) + # + # The +selected+ parameter must be either +nil+, or a string that names + # an ActiveSupport::TimeZone. + # + # By default, +model+ is the ActiveSupport::TimeZone constant (which can + # be obtained in Active Record as a value object). The +model+ parameter + # must respond to +all+ and return an array of objects that represent time + # zones; each object must respond to +name+. If a Regexp is given it will + # attempt to match the zones using match? method. + # + # NOTE: Only the option tags are returned, you have to wrap this call in + # a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#579 + def time_zone_options_for_select(selected = T.unsafe(nil), priority_zones = T.unsafe(nil), model = T.unsafe(nil)); end + + # Returns select and option tags for the given object and method, using + # #time_zone_options_for_select to generate the list of option tags. + # + # In addition to the :include_blank option documented above, + # this method also supports a :model option, which defaults + # to ActiveSupport::TimeZone. This may be used by users to specify a + # different time zone model object. (See +time_zone_options_for_select+ + # for more information.) + # + # You can also supply an array of ActiveSupport::TimeZone objects + # as +priority_zones+ so that they will be listed above the rest of the + # (long) list. You can use ActiveSupport::TimeZone.us_zones for a list + # of US time zones, ActiveSupport::TimeZone.country_zones(country_code) + # for another country's time zones, or a Regexp to select the zones of + # your choice. + # + # Finally, this method supports a :default option, which selects + # a default ActiveSupport::TimeZone if the object's time zone is +nil+. + # + # time_zone_select(:user, :time_zone, nil, include_blank: true) + # + # time_zone_select(:user, :time_zone, nil, default: "Pacific Time (US & Canada)") + # + # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.us_zones, default: "Pacific Time (US & Canada)") + # + # time_zone_select(:user, :time_zone, [ ActiveSupport::TimeZone["Alaska"], ActiveSupport::TimeZone["Hawaii"] ]) + # + # time_zone_select(:user, :time_zone, /Australia/) + # + # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#292 + def time_zone_select(object, method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns a string of option tags for the days of the week. + # + # Options: + # * :index_as_value - Defaults to false, set to true to use the indexes from + # I18n.translate("date.day_names") as the values. By default, Sunday is always 0. + # * :day_format - The I18n key of the array to use for the weekday options. + # Defaults to +:day_names+, set to +:abbr_day_names+ for abbreviations. + # * :beginning_of_week - Defaults to Date.beginning_of_week. + # + # NOTE: Only the option tags are returned, you have to wrap this call in + # a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#611 + def weekday_options_for_select(selected = T.unsafe(nil), index_as_value: T.unsafe(nil), day_format: T.unsafe(nil), beginning_of_week: T.unsafe(nil)); end + + # Returns select and option tags for the given object and method, using + # weekday_options_for_select to generate the list of option tags. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#298 + def weekday_select(object, method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + private + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#810 + def extract_selected_and_disabled(selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#821 + def extract_values_from_collection(collection, value_method, selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#788 + def option_html_attributes(element); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#796 + def option_text_and_value(option); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#806 + def option_value_selected?(value, selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#835 + def prompt_text(prompt); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#831 + def value_for_collection(item, value); end +end + +# = Action View Form Tag \Helpers +# +# Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like +# FormHelper does. Instead, you provide the names and values manually. +# +# NOTE: The HTML options disabled, readonly, and multiple can all be treated as booleans. So specifying +# disabled: true will give disabled="disabled". +# +# source://actionview//lib/action_view/helpers/form_tag_helper.rb#19 +module ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + extend ::ActiveSupport::Concern + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # Creates a button element that defines a submit button, + # reset button or a generic button which can be used in + # JavaScript, for example. You can use the button tag as a regular + # submit tag but it isn't supported in legacy browsers. However, + # the button tag does allow for richer labels such as images and emphasis, + # so this helper will also accept a block. By default, it will create + # a button tag with type submit, if type is not given. + # + # ==== Options + # * :data - This option can be used to add custom data attributes. + # * :disabled - If true, the user will not be able to + # use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # button_tag + # # => + # + # button_tag 'Reset', type: 'reset' + # # => + # + # button_tag 'Button', type: 'button' + # # => + # + # button_tag 'Reset', type: 'reset', disabled: true + # # => + # + # button_tag(type: 'button') do + # content_tag(:strong, 'Ask me!') + # end + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#568 + def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # :call-seq: + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) + # + # Creates a check box form input tag. + # + # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # checkbox_tag 'accept' + # # => + # + # checkbox_tag 'rock', 'rock music' + # # => + # + # checkbox_tag 'receive_email', 'yes', true + # # => + # + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' + # # => + # + # checkbox_tag 'eula', 'accepted', false, disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#456 + def check_box_tag(name, *args); end + + # :call-seq: + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) + # + # Creates a check box form input tag. + # + # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # checkbox_tag 'accept' + # # => + # + # checkbox_tag 'rock', 'rock music' + # # => + # + # checkbox_tag 'receive_email', 'yes', true + # # => + # + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' + # # => + # + # checkbox_tag 'eula', 'accepted', false, disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#456 + def checkbox_tag(name, *args); end + + # Creates a text field of type "color". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # color_field_tag 'name' + # # => + # + # color_field_tag 'color', '#DEF726' + # # => + # + # color_field_tag 'color', nil, class: 'special_input' + # # => + # + # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#668 + def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "date". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # date_field_tag 'name' + # # => + # + # date_field_tag 'date', '2014-12-31' + # # => + # + # date_field_tag 'date', nil, class: 'special_input' + # # => + # + # date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#738 + def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "datetime-local". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). + # + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#797 + def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "datetime-local". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). + # + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#797 + def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 + def default_enforce_utf8; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 + def default_enforce_utf8=(val); end + + # Creates a text field of type "email". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # email_field_tag 'name' + # # => + # + # email_field_tag 'email', 'email@example.com' + # # => + # + # email_field_tag 'email', nil, class: 'special_input' + # # => + # + # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#899 + def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + def embed_authenticity_token_in_remote_forms; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + def embed_authenticity_token_in_remote_forms=(val); end + + # Generate an HTML id attribute value for the given name and + # field combination + # + # Return the value generated by the FormBuilder for the given + # attribute name. + # + # <%= label_tag :post, :title %> + # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> + # <%= tag.span("is blank", id: field_id(:post, :title, :error) %> + # + # In the example above, the element built by + # the call to text_field declares an + # aria-describedby attribute referencing the + # element, sharing a common id root (post_title, in this + # case). + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#102 + def field_id(object_name, method_name, *suffixes, index: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # Generate an HTML name attribute value for the given name and + # field combination + # + # Return the value generated by the FormBuilder for the given + # attribute name. + # + # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %> + # <%# => %> + # + # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> + # <%# => %> + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#132 + def field_name(object_name, method_name, *method_names, multiple: T.unsafe(nil), index: T.unsafe(nil)); end + + # Creates a field set for grouping HTML form elements. + # + # legend will become the fieldset's title (optional as per W3C). + # options accept the same values as tag. + # + # ==== Examples + # <%= field_set_tag do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>

    + # + # <%= field_set_tag 'Your details' do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>
    Your details

    + # + # <%= field_set_tag nil, class: 'format' do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>

    + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#640 + def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Creates a field set for grouping HTML form elements. + # + # legend will become the fieldset's title (optional as per W3C). + # options accept the same values as tag. + # + # ==== Examples + # <%= field_set_tag do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>

    + # + # <%= field_set_tag 'Your details' do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>
    Your details

    + # + # <%= field_set_tag nil, class: 'format' do %> + #

    <%= text_field_tag 'name' %>

    + # <% end %> + # # =>

    + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#640 + def fieldset_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Creates a file upload field. If you are using file uploads then you will also need + # to set the multipart option for the form tag: + # + # <%= form_tag '/upload', multipart: true do %> + # <%= file_field_tag "file" %> + # <%= submit_tag %> + # <% end %> + # + # The specified URL will then be passed a File object containing the selected file, or if the field + # was left blank, a StringIO object. + # + # ==== Options + # * Creates standard HTML attributes for the tag. + # * :disabled - If set to true, the user will not be able to use this input. + # * :multiple - If set to true, *in most updated browsers* the user will be allowed to select multiple files. + # * :accept - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations. + # + # ==== Examples + # file_field_tag 'attachment' + # # => + # + # file_field_tag 'avatar', class: 'profile_input' + # # => + # + # file_field_tag 'picture', disabled: true + # # => + # + # file_field_tag 'resume', value: '~/resume.doc' + # # => + # + # file_field_tag 'user_pic', accept: 'image/png,image/gif,image/jpeg' + # # => + # + # file_field_tag 'file', accept: 'text/html', class: 'upload', value: 'index.html' + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#347 + def file_field_tag(name, options = T.unsafe(nil)); end + + # Starts a form tag that points the action to a URL configured with url_for_options just like + # ActionController::Base#url_for. The method for the form defaults to POST. + # + # ==== Options + # * :multipart - If set to true, the enctype is set to "multipart/form-data". + # * :method - The method to use when submitting the form, usually either "get" or "post". + # If "patch", "put", "delete", or another verb is used, a hidden input with name _method + # is added to simulate the verb over post. + # * :authenticity_token - Authenticity token to use in the form. Use only if you need to + # pass custom authenticity token string, or to not add authenticity_token field at all + # (by passing false). Remote forms may omit the embedded authenticity token + # by setting config.action_view.embed_authenticity_token_in_remote_forms = false. + # This is helpful when you're fragment-caching the form. Remote forms get the + # authenticity token from the meta tag, so embedding is unnecessary unless you + # support browsers without JavaScript. + # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the + # submit behavior. By default this behavior is an ajax submit. + # * :enforce_utf8 - If set to false, a hidden input with name utf8 is not output. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # form_tag('/posts') + # # => + # + # form_tag('/posts/1', method: :put) + # # => ... ... + # + # form_tag('/upload', multipart: true) + # # => + # + # <%= form_tag('/posts') do -%> + #
    <%= submit_tag 'Save' %>
    + # <% end -%> + # # =>
    + # + # <%= form_tag('/posts', remote: true) %> + # # =>
    + # + # form_tag(false, method: :get) + # # => + # + # form_tag('http://far.away.com/form', authenticity_token: false) + # # form without authenticity token + # + # form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") + # # form with custom authenticity token + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#78 + def form_tag(url_for_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Creates a hidden form input field used to transmit data that would be lost due to HTTP's statelessness or + # data that should be hidden from the user. + # + # ==== Options + # * Creates standard HTML attributes for the tag. + # + # ==== Examples + # hidden_field_tag 'tags_list' + # # => + # + # hidden_field_tag 'token', 'VUBJKB23UIVI1UU1VOBVI@' + # # => + # + # hidden_field_tag 'collected_input', '', onchange: "alert('Input collected!')" + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#308 + def hidden_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Displays an image which when clicked will submit the form. + # + # source is passed to AssetTagHelper#path_to_image + # + # ==== Options + # * :data - This option can be used to add custom data attributes. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Data attributes + # + # * confirm: 'question?' - This will add a JavaScript confirm + # prompt with the question specified. If the user accepts, the form is + # processed normally, otherwise no action is taken. + # + # ==== Examples + # image_submit_tag("login.png") + # # => + # + # image_submit_tag("purchase.png", disabled: true) + # # => + # + # image_submit_tag("search.png", class: 'search_button', alt: 'Find') + # # => + # + # image_submit_tag("agree.png", disabled: true, class: "agree_disagree_button") + # # => + # + # image_submit_tag("save.png", data: { confirm: "Are you sure?" }) + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#614 + def image_submit_tag(source, options = T.unsafe(nil)); end + + # Creates a label element. Accepts a block. + # + # ==== Options + # * Creates standard HTML attributes for the tag. + # + # ==== Examples + # label_tag 'name' + # # => + # + # label_tag 'name', 'Your name' + # # => + # + # label_tag 'name', nil, class: 'small_label' + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#281 + def label_tag(name = T.unsafe(nil), content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Creates a text field of type "month". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # + # ==== Examples + # + # month_field_tag 'name' + # # => + # + # month_field_tag 'month', '2014-01' + # # => + # + # month_field_tag 'month', nil, class: 'special_input' + # # => + # + # month_field_tag 'month', '2014-01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#826 + def month_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a number field. + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :in - A range specifying the :min and + # :max values. + # * :within - Same as :in. + # * :step - The acceptable value granularity. + # + # ==== Examples + # + # number_field_tag 'quantity' + # # => + # + # number_field_tag 'quantity', '1' + # # => + # + # number_field_tag 'quantity', nil, class: 'special_input' + # # => + # + # number_field_tag 'quantity', nil, min: 1 + # # => + # + # number_field_tag 'quantity', nil, max: 9 + # # => + # + # number_field_tag 'quantity', nil, in: 1...10 + # # => + # + # number_field_tag 'quantity', nil, within: 1...10 + # # => + # + # number_field_tag 'quantity', nil, min: 1, max: 10 + # # => + # + # number_field_tag 'quantity', nil, min: 1, max: 10, step: 2 + # # => + # + # number_field_tag 'quantity', '1', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#947 + def number_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a password field, a masked text field that will hide the users input behind a mask character. + # + # ==== Options + # * :disabled - If set to true, the user will not be able to use this input. + # * :size - The number of visible characters that will fit in the input. + # * :maxlength - The maximum number of characters that the browser will allow the user to enter. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # password_field_tag 'pass' + # # => + # + # password_field_tag 'secret', 'Your secret here' + # # => + # + # password_field_tag 'masked', nil, class: 'masked_input_field' + # # => + # + # password_field_tag 'token', '', size: 15 + # # => + # + # password_field_tag 'key', nil, maxlength: 16 + # # => + # + # password_field_tag 'confirm_pass', nil, disabled: true + # # => + # + # password_field_tag 'pin', '1234', maxlength: 4, size: 6, class: "pin_input" + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#380 + def password_field_tag(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "tel". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # telephone_field_tag 'name' + # # => + # + # telephone_field_tag 'tel', '0123456789' + # # => + # + # telephone_field_tag 'tel', nil, class: 'special_input' + # # => + # + # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#714 + def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # radio_button_tag(name, value, options = {}) + # radio_button_tag(name, value, checked, options = {}) + # + # Creates a radio button; use groups of radio buttons named the same to allow users to + # select from a group of options. + # + # ==== Options + # * :checked - If set to true, the radio button will be selected by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # radio_button_tag 'favorite_color', 'maroon' + # # => + # + # radio_button_tag 'receive_updates', 'no', true + # # => + # + # radio_button_tag 'time_slot', "3:00 p.m.", false, disabled: true + # # => + # + # radio_button_tag 'color', "green", true, class: "color_input" + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#493 + def radio_button_tag(name, value, *args); end + + # Creates a range form element. + # + # ==== Options + # + # Supports the same options as #number_field_tag. + # + # ==== Examples + # + # range_field_tag 'quantity', '1' + # # => + # + # range_field_tag 'quantity', in: 1...10 + # # => + # + # range_field_tag 'quantity', min: 1, max: 10, step: 2 + # # => + # + # search_field_tag 'search', 'Enter your search query here' + # # => + # + # search_field_tag 'search', nil, class: 'special_input' + # # => + # + # search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#691 + def search_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple + # choice selection box. + # + # Helpers::FormOptions can be used to create common select boxes such as countries, time zones, or + # associated records. option_tags is a string containing the option tags for the select box. + # + # ==== Options + # * :multiple - If set to true, the selection will allow multiple choices. + # * :disabled - If set to true, the user will not be able to use this input. + # * :include_blank - If set to true, an empty option will be created. If set to a string, the string will be used as the option's content and the value will be empty. + # * :prompt - Create a prompt option with blank value and the text asking user to select something. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # select_tag "people", options_from_collection_for_select(@people, "id", "name") + # # + # + # select_tag "people", options_from_collection_for_select(@people, "id", "name", "1") + # # + # + # select_tag "people", raw("") + # # => + # + # select_tag "count", raw("") + # # => + # + # select_tag "colors", raw(""), multiple: true + # # => + # + # select_tag "locations", raw("") + # # => + # + # select_tag "access", raw(""), multiple: true, class: 'form_input', id: 'unique_id' + # # => + # + # select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: true + # # => + # + # select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: "All" + # # => + # + # select_tag "people", options_from_collection_for_select(@people, "id", "name"), prompt: "Select something" + # # => + # + # select_tag "destination", raw(""), disabled: true + # # => + # + # select_tag "credit_card", options_for_select([ "VISA", "MasterCard" ], "MasterCard") + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#201 + def select_tag(name, option_tags = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a submit button with the text value as the caption. + # + # ==== Options + # * :data - This option can be used to add custom data attributes. + # * :disabled - If true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # submit_tag + # # => + # + # submit_tag "Edit this article" + # # => + # + # submit_tag "Save edits", disabled: true + # # => + # + # submit_tag nil, class: "form_submit" + # # => + # + # submit_tag "Edit", class: "edit_button" + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#527 + def submit_tag(value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "tel". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # telephone_field_tag 'name' + # # => + # + # telephone_field_tag 'tel', '0123456789' + # # => + # + # telephone_field_tag 'tel', nil, class: 'special_input' + # # => + # + # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#714 + def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. + # + # ==== Options + # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). + # * :rows - Specify the number of rows in the textarea + # * :cols - Specify the number of columns in the textarea + # * :disabled - If set to true, the user will not be able to use this input. + # * :escape - By default, the contents of the text input are HTML escaped. + # If you need unescaped contents, set this to false. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # textarea_tag 'post' + # # => + # + # textarea_tag 'bio', @user.bio + # # => + # + # textarea_tag 'body', nil, rows: 10, cols: 25 + # # => + # + # textarea_tag 'body', nil, size: "25x10" + # # => + # + # textarea_tag 'description', "Description goes here.", disabled: true + # # => + # + # textarea_tag 'comment', nil, class: 'comment_input' + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#413 + def text_area_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a standard text field; use these text fields to input smaller chunks of text like a username + # or a search query. + # + # ==== Options + # * :disabled - If set to true, the user will not be able to use this input. + # * :size - The number of visible characters that will fit in the input. + # * :maxlength - The maximum number of characters that the browser will allow the user to enter. + # * :placeholder - The text contained in the field by default which is removed when the field receives focus. + # If set to true, use the translation found in the current I18n locale + # (through helpers.placeholder..). + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # text_field_tag 'name' + # # => + # + # text_field_tag 'query', 'Enter your search query here' + # # => + # + # text_field_tag 'search', nil, placeholder: 'Enter search term...' + # # => + # + # text_field_tag 'request', nil, class: 'special_input' + # # => + # + # text_field_tag 'address', '', size: 75 + # # => + # + # text_field_tag 'zip', nil, maxlength: 5 + # # => + # + # text_field_tag 'payment_amount', '$0.00', disabled: true + # # => + # + # text_field_tag 'ip', '0.0.0.0', maxlength: 15, size: 20, class: "ip-input" + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#263 + def text_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. + # + # ==== Options + # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). + # * :rows - Specify the number of rows in the textarea + # * :cols - Specify the number of columns in the textarea + # * :disabled - If set to true, the user will not be able to use this input. + # * :escape - By default, the contents of the text input are HTML escaped. + # If you need unescaped contents, set this to false. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # textarea_tag 'post' + # # => + # + # textarea_tag 'bio', @user.bio + # # => + # + # textarea_tag 'body', nil, rows: 10, cols: 25 + # # => + # + # textarea_tag 'body', nil, size: "25x10" + # # => + # + # textarea_tag 'description', "Description goes here.", disabled: true + # # => + # + # textarea_tag 'comment', nil, class: 'comment_input' + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#413 + def textarea_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "time". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds and ms in the output timestamp format (true by default). + # + # ==== Examples + # + # time_field_tag 'name' + # # => + # + # time_field_tag 'time', '01:01' + # # => + # + # time_field_tag 'time', nil, class: 'special_input' + # # => + # + # time_field_tag 'time', '01:01', include_seconds: true + # # => + # + # time_field_tag 'time', '01:01', min: '00:00', max: '23:59', step: 1 + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#769 + def time_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "url". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # url_field_tag 'name' + # # => + # + # url_field_tag 'url', 'http://rubyonrails.org' + # # => + # + # url_field_tag 'url', nil, class: 'special_input' + # # => + # + # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#876 + def url_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates the hidden UTF-8 enforcer tag. Override this method in a helper + # to customize the tag. + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#978 + def utf8_enforcer_tag; end + + # Creates a text field of type "week". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # + # ==== Examples + # + # week_field_tag 'name' + # # => + # + # week_field_tag 'week', '2014-W01' + # # => + # + # week_field_tag 'week', nil, class: 'special_input' + # # => + # + # week_field_tag 'week', '2014-W01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#853 + def week_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1075 + def convert_direct_upload_option_to_url(options); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1013 + def extra_tags_for_form(html_options); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1043 + def form_tag_html(html_options); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1049 + def form_tag_with_body(html_options, content); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#986 + def html_options_for_form(url_for_options, options); end + + # see http://www.w3.org/TR/html4/types.html#type-name + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1056 + def sanitize_to_id(name); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1060 + def set_default_disable_with(value, tag_options); end + + class << self + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 + def default_enforce_utf8; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 + def default_enforce_utf8=(val); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + def embed_authenticity_token_in_remote_forms; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 + def embed_authenticity_token_in_remote_forms=(val); end + end +end + +# = Action View JavaScript \Helpers +# +# source://actionview//lib/action_view/helpers/javascript_helper.rb#6 +module ActionView::Helpers::JavaScriptHelper + # Escapes carriage returns and single and double quotes for JavaScript segments. + # + # Also available through the alias j(). This is particularly helpful in JavaScript + # responses, like: + # + # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); + # + # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 + def escape_javascript(javascript); end + + # Escapes carriage returns and single and double quotes for JavaScript segments. + # + # Also available through the alias j(). This is particularly helpful in JavaScript + # responses, like: + # + # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); + # + # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 + def j(javascript); end + + # source://actionview//lib/action_view/helpers/javascript_helper.rb#91 + def javascript_cdata_section(content); end + + # Returns a JavaScript tag with the +content+ inside. Example: + # javascript_tag "alert('All is good')" + # + # Returns: + # + # + # +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#75 + def javascript_tag(content_or_options_with_block = T.unsafe(nil), html_options = T.unsafe(nil), &block); end +end + +# source://actionview//lib/action_view/helpers/javascript_helper.rb#7 +ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# = Action View Number \Helpers +# +# Provides methods for converting numbers into formatted strings. +# Methods are provided for phone numbers, currency, percentage, +# precision, positional notation, file size, and pretty printing. +# +# 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#17 +module ActionView::Helpers::NumberHelper + # Delegates to ActiveSupport::NumberHelper#number_to_currency. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_to_currency("12x34") # => "$12x34" + # number_to_currency("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#51 + def number_to_currency(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_human. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_to_human("12x34") # => "12x34" + # number_to_human("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#111 + def number_to_human(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_human_size. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_to_human_size("12x34") # => "12x34" + # number_to_human_size("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#99 + def number_to_human_size(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_percentage. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_to_percentage("99x") # => "99x%" + # number_to_percentage("99x", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#63 + def number_to_percentage(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_phone. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_to_phone("12x34") # => "12x34" + # number_to_phone("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#35 + def number_to_phone(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_delimited. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_with_delimiter("12x34") # => "12x34" + # number_with_delimiter("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#75 + def number_with_delimiter(number, options = T.unsafe(nil)); end + + # Delegates to ActiveSupport::NumberHelper#number_to_rounded. + # + # Additionally, supports a +:raise+ option that will cause + # InvalidNumberError to be raised if +number+ is not a valid number: + # + # number_with_precision("12x34") # => "12x34" + # number_with_precision("12x34", raise: true) # => InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#87 + def number_with_precision(number, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/number_helper.rb#116 + def delegate_number_helper_method(method, number, options); end + + # source://actionview//lib/action_view/helpers/number_helper.rb#135 + def escape_units(units); end + + # source://actionview//lib/action_view/helpers/number_helper.rb#125 + def escape_unsafe_options(options); end + + # @raise [InvalidNumberError] + # + # source://actionview//lib/action_view/helpers/number_helper.rb#158 + def parse_float(number, raise_error); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/number_helper.rb#154 + def valid_float?(number); end + + # @raise [InvalidNumberError] + # + # source://actionview//lib/action_view/helpers/number_helper.rb#141 + def wrap_with_output_safety_handling(number, raise_on_invalid, &block); end +end + +# Raised when argument +number+ param given to the helpers is invalid and +# the option +:raise+ is set to +true+. +# +# source://actionview//lib/action_view/helpers/number_helper.rb#20 +class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError + # @return [InvalidNumberError] a new instance of InvalidNumberError + # + # source://actionview//lib/action_view/helpers/number_helper.rb#22 + def initialize(number); end + + # Returns the value of attribute number. + # + # source://actionview//lib/action_view/helpers/number_helper.rb#21 + def number; end + + # Sets the attribute number + # + # @param value the value to set the attribute number to. + # + # source://actionview//lib/action_view/helpers/number_helper.rb#21 + def number=(_arg0); end +end + +# = Action View Raw Output \Helpers +# +# source://actionview//lib/action_view/helpers/output_safety_helper.rb#8 +module ActionView::Helpers::OutputSafetyHelper + # This method outputs without escaping a string. Since escaping tags is + # now default, this can be used when you don't want \Rails to automatically + # 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([tag.p("foo"), "

    bar

    "], "
    ") + # # => "

    foo

    <br><p>bar</p>" + # + # safe_join([tag.p("foo"), tag.p("bar")], tag.br) + # # => "

    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 Helpers +# +# 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#12 +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#207 + def _layout_for(*args, &block); end + + # Renders a template and returns the result. + # + # Pass the template to render as the first argument. This is shorthand + # syntax for partial rendering, so the template filename should be + # prefixed with an underscore. The partial renderer looks for the partial + # template in the directory of the calling template first. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form" %> + # # => renders app/views/posts/_form.html.erb + # + # Use the complete view path to render a partial from another directory. + # + # <% # app/views/posts/show.html.erb %> + # <%= render "comments/form" %> + # # => renders app/views/comments/_form.html.erb + # + # Without the rendering mode, the second argument can be a Hash of local + # variable assignments for the template. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form", post: Post.new %> + # # => renders app/views/posts/_form.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

    Hello, World

    " + # end + # + # def format + # :html + # end + # end + # + # <%= render Greeting.new %> + # # => "

    Hello, World

    " + # + # #### Rendering Mode + # + # Pass the rendering mode as first argument to override it. + # + # `:partial` + # : See ActionView::PartialRenderer for details. + # + # <%= render partial: "form", locals: { post: Post.new } %> + # # => renders app/views/posts/_form.html.erb + # + # `:file` + # : Renders the contents of a file. This option should **not** be used with + # unsanitized user input. + # + # <%= render file: "/path/to/some/file" %> + # # => renders /path/to/some/file + # + # `:inline` + # : Renders an ERB template string. + # + # <% name = "World" %> + # <%= render inline: "

    Hello, <%= name %>!

    " %> + # # => renders "

    Hello, World!

    " + # + # `:body` + # : Renders the provided text, and sets the format as `:text`. + # + # <%= render body: "Hello, World!" %> + # # => renders "Hello, World!" + # + # `:plain` + # : Renders the provided text, and sets the format as `:text`. + # + # <%= render plain: "Hello, World!" %> + # # => renders "Hello, World!" + # + # `:html` + # : Renders the provided HTML string, and sets the format as + # `:html`. If the string is not `html_safe?`, performs HTML escaping on + # the string before rendering. + # + # <%= render html: "

    Hello, World!

    ".html_safe %> + # # => renders "

    Hello, World!

    " + # + # <%= render html: "

    Hello, World!

    " %> + # # => renders "<h1>Hello, World!</h1>" + # + # `:renderable` + # : Renders the provided object by calling `render_in` with the current view + # context. The format is determined by calling `format` on the + # renderable if it responds to `format`, falling back to `:html` by + # default. + # + # <%= render renderable: Greeting.new %> + # # => renders "

    Hello, World

    " + # + # + # #### Options + # + # `:locals` + # : Hash of local variable assignments for the template. + # + # <%= render inline: "

    Hello, <%= name %>!

    ", locals: { name: "World" } %> + # # => renders "

    Hello, World!

    " + # + # `:formats` + # : Override the current format to render a template for a different format. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", formats: [:text] %> + # # => renders app/views/posts/content.text.erb + # + # `:variants` + # : Render a template for a different variant. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", variants: [:tablet] %> + # # => renders app/views/posts/content.html+tablet.erb + # + # `:handlers` + # : Render a template for a different handler. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", handlers: [:builder] %> + # # => renders app/views/posts/content.html.builder + # + # source://actionview//lib/action_view/helpers/rendering_helper.rb#138 + def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end +end + +# = Action View Sanitize \Helpers +# +# The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. +# These helper methods extend Action View making them callable within your template files. +# +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#11 +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. + # + # The default sanitizer is +Rails::HTML5::SafeListSanitizer+. See {Rails HTML + # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. + # + # Custom sanitization rules can also be provided. + # + # 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. + # + # ==== Global Configuration + # + # 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'] + # + # The default, starting in \Rails 7.1, is to use an HTML5 parser for sanitization (if it is + # available, see NOTE below). If you wish to revert back to the previous HTML4 behavior, you + # can do so by setting the following in your application configuration: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer + # + # Or, if you're upgrading from a previous version of \Rails and wish to opt into the HTML5 + # behavior: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML5::Sanitizer + # + # NOTE: +Rails::HTML5::Sanitizer+ is not supported on JRuby, so on JRuby platforms \Rails will + # fall back to using +Rails::HTML4::Sanitizer+. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#111 + def sanitize(html, options = T.unsafe(nil)); end + + # Sanitizes a block of CSS code. Used by #sanitize when it comes across a style attribute. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#116 + def sanitize_css(style); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + + # Strips all link tags from +html+ leaving just the link text. + # + # strip_links('Ruby on Rails') + # # => 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#150 + 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#133 + def strip_tags(html); end + + class << self + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + end +end + +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#154 +module ActionView::Helpers::SanitizeHelper::ClassMethods + # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with + # any object that responds to +sanitize+. + # + # class Application < Rails::Application + # config.action_view.full_sanitizer = MySpecialSanitizer.new + # end + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#175 + def full_sanitizer; end + + # Sets the attribute full_sanitizer + # + # @param value the value to set the attribute full_sanitizer to. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 + 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#185 + def link_sanitizer; end + + # Sets the attribute link_sanitizer + # + # @param value the value to set the attribute link_sanitizer to. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 + 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#195 + def safe_list_sanitizer; end + + # Sets the attribute safe_list_sanitizer + # + # @param value the value to set the attribute safe_list_sanitizer to. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 + def safe_list_sanitizer=(_arg0); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#165 + def sanitized_allowed_attributes; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#34 + def sanitized_allowed_attributes=(attributes); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_keywords; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_keywords=(_); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_properties; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_properties=(_); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_protocols; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_protocols=(_); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#161 + def sanitized_allowed_tags; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#24 + def sanitized_allowed_tags=(tags); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_bad_tags; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_bad_tags=(_); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_protocol_separator; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_protocol_separator=(_); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_shorthand_css_properties; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_shorthand_css_properties=(_); end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#47 + def sanitized_uri_attributes; end + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#48 + def sanitized_uri_attributes=(_); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#157 + def sanitizer_vendor; end + + private + + # source://rails-html-sanitizer/1.6.0/lib/rails-html-sanitizer.rb#52 + def deprecate_option(name); end +end + +# = Action View Tag \Helpers +# +# Provides methods to generate HTML tags programmatically both as a modern +# HTML5 compliant builder style and legacy XHTML compliant tags. +# +# source://actionview//lib/action_view/helpers/tag_helper.rb#17 +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#574 + 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#554 + 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#532 + 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#586 + 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 # =>
    + # + # Note that when using the block form options should be wrapped in + # parenthesis. + # + # <%= tag.a(href: "/about", class: "font-bold") do %> + # About the author + # <% end %> + # # => About the author + # + # === 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#495 + 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#554 + def token_list(*args); end + + private + + # source://actionview//lib/action_view/helpers/tag_helper.rb#596 + def build_tag_values(*args); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#591 + def ensure_valid_html5_tag_name(name); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#616 + def tag_builder; end + + class << self + # source://actionview//lib/action_view/helpers/tag_helper.rb#596 + def build_tag_values(*args); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#591 + def ensure_valid_html5_tag_name(name); end + end +end + +# source://actionview//lib/action_view/helpers/tag_helper.rb#34 +ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#21 +ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#35 +ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#43 +ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#37 +ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#47 +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#232 + def initialize(view_context); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#128 + def a(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#129 + def abbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#130 + def address(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#114 + def animate(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#115 + def animate_motion(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#116 + def animate_transform(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#100 + def area(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#131 + def article(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#132 + def aside(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # Transforms a Hash into HTML Attributes, ready to be interpolated into + # ERB. + # + # > + # # => + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#241 + def attributes(attributes); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#133 + def audio(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#134 + def b(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#101 + def base(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#135 + def bdi(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#136 + def bdo(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#137 + def blockquote(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#138 + def body(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#306 + def boolean_tag_option(key); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#102 + def br(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#139 + def button(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#140 + def canvas(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#141 + def caption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#117 + def circle(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#142 + def cite(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#143 + def code(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#103 + def col(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#144 + def colgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#255 + def content_tag_string(name, content, options, escape = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#145 + def data(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#146 + def datalist(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#147 + def dd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#148 + def del(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#51 + def deprecated_void_content(name); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#149 + def details(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#150 + def dfn(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#151 + def dialog(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#152 + def div(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#153 + def dl(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#154 + def dt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#118 + def ellipse(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#155 + def em(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#104 + def embed(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#156 + def fieldset(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#157 + def figcaption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#158 + def figure(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#159 + def footer(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#160 + def form(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#161 + def h1(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#162 + def h2(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#163 + def h3(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#164 + def h4(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#165 + def h5(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#166 + def h6(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#167 + def head(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#168 + def header(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#169 + def hgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#105 + def hr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#170 + def html(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#171 + def i(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#172 + def iframe(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#106 + def img(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#107 + def input(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#173 + def ins(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#174 + def kbd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#108 + def keygen(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#175 + def label(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#176 + def legend(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#177 + def li(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#119 + def line(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#109 + def link(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#178 + def main(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#179 + def map(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#180 + def mark(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#181 + def menu(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#110 + def meta(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#182 + def meter(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#183 + def nav(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#184 + def noscript(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#185 + def object(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#186 + def ol(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#187 + def optgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#188 + def option(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#189 + def output(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#190 + def p(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#120 + def path(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#191 + def picture(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#121 + def polygon(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#122 + def polyline(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#192 + def portal(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#193 + def pre(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#194 + def progress(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#195 + def q(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#123 + def rect(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#196 + def rp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#197 + def rt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#198 + def ruby(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#199 + def s(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#200 + def samp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#201 + def script(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#202 + def search(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#203 + def section(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#204 + def select(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#251 + def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#124 + def set(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#205 + def slot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#206 + def small(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#111 + def source(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#207 + def span(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#125 + def stop(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#208 + def strong(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#209 + def style(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#210 + def sub(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#211 + def summary(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#212 + def sup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#213 + def table(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#310 + def tag_option(key, value, escape); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#264 + def tag_options(options, escape = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#245 + def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#214 + def tbody(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#215 + def td(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#216 + def template(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#217 + def textarea(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#218 + def tfoot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#219 + def th(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#220 + def thead(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#221 + def time(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#222 + def title(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#223 + def tr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#112 + def track(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#224 + def u(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#225 + def ul(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#126 + def use(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#226 + def var(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#227 + def video(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#127 + def view(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#113 + def wbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + private + + # source://actionview//lib/action_view/helpers/tag_helper.rb#340 + def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#328 + def prefix_tag_option(prefix, key, value, escape); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#336 + def respond_to_missing?(*args); end + + class << self + # source://actionview//lib/action_view/helpers/tag_helper.rb#61 + def define_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#86 + def define_self_closing_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#72 + def define_void_element(name, code_generator:, method_name: T.unsafe(nil)); end + end +end + +# 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::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ActiveModelInstanceTag + 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#11 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + + # Returns the value of attribute object. + # + # source://actionview//lib/action_view/helpers/tags/base.rb#9 + def object; end + + # This is what child classes implement. + # + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#31 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/base.rb#96 + def add_default_name_and_id(options); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#83 + def add_default_name_and_id_for_value(tag_value, options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#132 + def generate_ids?; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#124 + def name_and_id_index(options); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#74 + def retrieve_autoindex(pre_match); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#63 + def retrieve_object(object); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#116 + def sanitized_method_name; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#120 + def sanitized_value(value); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#112 + def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#108 + def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#36 + def value; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#46 + def value_before_type_cast; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#58 + 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 + include ::ActionView::Helpers::FormOptionsHelper + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#22 + def render(&block); end + + private + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#31 + def hidden_field_name; end + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#27 + def render_component(builder); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 +class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 + def check_box(extra_html_options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 + def checkbox(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 + include ::ActionView::Helpers::FormOptionsHelper + + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#20 + def render(&block); end + + private + + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#25 + def render_component(builder); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 +class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#13 + def radio_button(extra_html_options = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_select.rb#6 +class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [CollectionSelect] a new instance of CollectionSelect + # + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#10 + def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#19 + 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_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/date_select.rb#8 +class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + + # @return [DateSelect] a new instance of DateSelect + # + # source://actionview//lib/action_view/helpers/tags/date_select.rb#11 + def initialize(object_name, method_name, template_object, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#17 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#32 + def datetime_selector(options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#45 + def default_datetime(options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#28 + def select_type; end + + class << self + # source://actionview//lib/action_view/helpers/tags/date_select.rb#22 + 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#17 + def datetime_value(value); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#25 + def format_datetime(value); end + + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#29 + def parse_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 +class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField + # @return [DatetimeLocalField] a new instance of DatetimeLocalField + # + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#7 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#19 + def format_datetime(value); end + + class << self + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#13 + 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 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect + # + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#10 + def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#21 + 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_datetime(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 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [Select] a new instance of Select + # + # source://actionview//lib/action_view/helpers/tags/select.rb#10 + def initialize(object_name, method_name, template_object, choices, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/select.rb#19 + def render; end + + private + + # Grouped choices look like this: + # + # [nil, []] + # { nil => [] } + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/select.rb#39 + def grouped_choices?; end +end + +# source://actionview//lib/action_view/helpers/tags/select_renderer.rb#6 +module ActionView::Helpers::Tags::SelectRenderer + private + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#36 + def add_options(option_tags, options, value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#31 + def placeholder_required?(html_options); end + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#8 + def select_content_tag(option_tags, options, html_options); end +end + +# source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 +class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end + +# 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_datetime(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 + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [TimeZoneSelect] a new instance of TimeZoneSelect + # + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#10 + def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#17 + 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_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 +class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [WeekdaySelect] a new instance of WeekdaySelect + # + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#10 + def initialize(object_name, method_name, template_object, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#16 + def render; end +end + +# = Action View Text \Helpers +# +# The TextHelper module provides a set of methods for filtering, formatting +# and transforming strings, which can reduce the amount of inline Ruby code in +# your views. These helper methods extend Action View making them callable +# 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#36 +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 equivalent to <%= "hello" %> + # + # <% + # unless signed_in? + # concat link_to("Sign In", action: :sign_in) + # end + # %> + # + # is equivalent to + # + # <% unless signed_in? %> + # <%= link_to "Sign In", action: :sign_in %> + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#63 + def concat(string); end + + # Returns the current cycle string after a cycle has been started. Useful + # for complex table highlighting or any other design need which requires + # the current cycle string in more than one place. + # + # <%# Alternate background colors %> + # <% @items = [1,2,3,4] %> + # <% @items.each do |item| %> + #
    "> + # <%= item %> + #
    + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#454 + def current_cycle(name = T.unsafe(nil)); end + + # Creates a Cycle object whose +to_s+ method cycles through elements of an + # 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 = [ + # { 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#430 + def cycle(first_value, *values); end + + # Extracts the first occurrence of +phrase+ plus surrounding text from + # +text+. An omission marker is prepended / appended if the start / end of + # the result does not coincide with the start / end of +text+. The result + # is always stripped in any case. Returns +nil+ if +phrase+ isn't found. + # + # ==== Options + # + # [+:radius+] + # The number of characters (or tokens — see +:separator+ option) around + # +phrase+ to include in the result. Defaults to 100. + # + # [+:omission+] + # The marker to prepend / append when the start / end of the excerpt + # does not coincide with the start / end of +text+. Defaults to + # "...". + # + # [+:separator+] + # The separator between tokens to count for +:radius+. Defaults to + # "", which treats each character as a token. + # + # ==== Examples + # + # excerpt('This is an example', 'an', radius: 5) + # # => "...s is an exam..." + # + # 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#235 + def excerpt(text, phrase, options = T.unsafe(nil)); end + + # Highlights occurrences of +phrases+ in +text+ by formatting them with a + # highlighter string. +phrases+ can be one or more strings or regular + # expressions. The result will be marked HTML safe. By default, +text+ is + # sanitized before highlighting to prevent possible XSS attacks. + # + # If a block is specified, it will be used instead of the highlighter + # string. Each occurrence of a phrase will be passed to the block, and its + # return value will be inserted into the final result. + # + # ==== Options + # + # [+:highlighter+] + # The highlighter string. Uses \1 as the placeholder for a + # phrase, similar to +String#sub+. Defaults to "\1". + # This option is ignored if a block is specified. + # + # [+:sanitize+] + # Whether to sanitize +text+ before highlighting. Defaults to true. + # + # ==== Examples + # + # highlight('You searched for: rails', 'rails') + # # => "You searched for: rails" + # + # 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#174 + def highlight(text, phrases, options = T.unsafe(nil), &block); end + + # Attempts to pluralize the +singular+ word unless +count+ is 1. If + # +plural+ is supplied, it will use that when count is > 1, otherwise + # it will use the Inflector to determine the plural form for the given locale, + # which defaults to +I18n.locale+. + # + # 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#290 + def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Resets a cycle so that it starts from the first element the next time + # it is called. Pass in +name+ to reset a named cycle. + # + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %> + # + # <% @items.each do |item| %> + # "> + # <% item.each do |value| %> + # "> + # <%= value %> + # + # <% end %> + # + # <% reset_cycle("colors") %> + # + # <% end %> + #
    + # + # source://actionview//lib/action_view/helpers/text_helper.rb#477 + def reset_cycle(name = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/text_helper.rb#67 + 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+. + # * :sanitize_options - Any extra options you want appended to the sanitize. + # * :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.

    " + # + # simple_format("Continue", {}, { sanitize_options: { attributes: %w[target href] } }) + # # => "

    Continue

    " + # + # source://actionview//lib/action_view/helpers/text_helper.rb#376 + def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end + + # Truncates +text+ if it is longer than a specified +:length+. If +text+ + # is truncated, an omission marker will be appended to the result for a + # total length not exceeding +:length+. + # + # You can also pass a block to render and append extra content after the + # omission marker when +text+ is truncated. However, this content _can_ + # cause the total length to exceed +:length+ characters. + # + # The result will be escaped unless escape: false is specified. + # In any case, the result will be marked HTML-safe. Care should be taken + # if +text+ might contain HTML tags or entities, because truncation could + # produce invalid HTML, such as unbalanced or incomplete tags. + # + # ==== Options + # + # [+:length+] + # The maximum number of characters that should be returned, excluding + # any extra content from the block. Defaults to 30. + # + # [+:omission+] + # The string to append after truncating. Defaults to "...". + # + # [+:separator+] + # A string or regexp used to find a breaking point at which to truncate. + # By default, truncation can occur at any character in +text+. + # + # [+:escape+] + # Whether to escape the result. Defaults to true. + # + # ==== Examples + # + # truncate("Once upon a time in a world far far away") + # # => "Once upon a time in a world..." + # + # 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 world...Continue" + # + # source://actionview//lib/action_view/helpers/text_helper.rb#122 + def truncate(text, options = T.unsafe(nil), &block); end + + # Wraps the +text+ into lines no longer than +line_width+ width. This method + # 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#320 + def word_wrap(text, line_width: T.unsafe(nil), break_sequence: T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/text_helper.rb#540 + def cut_excerpt_part(part_position, part, separator, options); end + + # The cycle helpers need to store the cycles in a place that is + # guaranteed to be reset every time a page is rendered, so it + # uses an instance variable of ActionView::Base. + # + # source://actionview//lib/action_view/helpers/text_helper.rb#522 + def get_cycle(name); end + + # source://actionview//lib/action_view/helpers/text_helper.rb#527 + def set_cycle(name, cycle_object); end + + # source://actionview//lib/action_view/helpers/text_helper.rb#532 + def split_paragraphs(text); end +end + +# source://actionview//lib/action_view/helpers/text_helper.rb#482 +class ActionView::Helpers::TextHelper::Cycle + # @return [Cycle] a new instance of Cycle + # + # source://actionview//lib/action_view/helpers/text_helper.rb#485 + def initialize(first_value, *values); end + + # source://actionview//lib/action_view/helpers/text_helper.rb#494 + def current_value; end + + # source://actionview//lib/action_view/helpers/text_helper.rb#490 + def reset; end + + # source://actionview//lib/action_view/helpers/text_helper.rb#498 + def to_s; end + + # Returns the value of attribute values. + # + # source://actionview//lib/action_view/helpers/text_helper.rb#483 + def values; end + + private + + # source://actionview//lib/action_view/helpers/text_helper.rb#505 + def next_index; end + + # source://actionview//lib/action_view/helpers/text_helper.rb#509 + def previous_index; end + + # source://actionview//lib/action_view/helpers/text_helper.rb#513 + def step_index(n); end +end + +# = Action View Translation \Helpers +# +# source://actionview//lib/action_view/helpers/translation_helper.rb#9 +module ActionView::Helpers::TranslationHelper + include ::ActionView::Helpers::CaptureHelper + 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) + +# = Action View URL \Helpers +# +# Provides a set of methods for making links and getting URLs that +# depend on the routing subsystem (see ActionDispatch::Routing). +# This allows you to use the same format for links in views +# and controllers. +# +# source://actionview//lib/action_view/helpers/url_helper.rb#17 +module ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + + # 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. + # + # 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 if the object is not persisted; + # conversely, if the object is persisted, it will submit a PATCH request. + # To specify a different HTTP verb use the +:method+ option within +html_options+. + # + # If the HTML button generated from +button_to+ does not work with your layout, you can + # consider using the +link_to+ method with the +data-turbo-method+ + # attribute as described in the +link_to+ documentation. + # + # ==== Options + # The +options+ hash accepts the same options as +url_for+. To generate a + # element without an [action] attribute, pass + # 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" } %> + # # => "
    + # # + # # + # #
    " + # + # source://actionview//lib/action_view/helpers/url_helper.rb#296 + 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#35 + def button_to_generates_button_tag; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag=(val); end + + # True if the current request URI was generated by the given +options+. + # + # ==== Examples + # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. + # + # current_page?(action: 'process') + # # => false + # + # current_page?(action: 'checkout') + # # => true + # + # current_page?(controller: 'library', action: 'checkout') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'asc') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2') + # # => false + # + # current_page?('http://www.example.com/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout', check_parameters: true) + # # => false + # + # current_page?('/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout?order=desc&page=1') + # # => true + # + # Let's say we're in the http://www.example.com/products action with method POST in case of invalid product. + # + # current_page?(controller: 'product', action: 'index') + # # => false + # + # We can also pass in the symbol arguments instead of strings. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#548 + 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 + # + # ==== Turbo + # + # Rails 7 ships with Turbo enabled by default. Turbo provides the following +:data+ options: + # + # * turbo_method: symbol of HTTP verb - Performs a Turbo link visit + # with the given HTTP verb. Forms are recommended when performing non-+GET+ requests. + # Only use data-turbo-method where a form is not possible. + # + # * turbo_confirm: "question?" - Adds a confirmation dialog to the link with the + # given value. + # + # {Consult the Turbo Handbook for more information on the options + # above.}[https://turbo.hotwired.dev/handbook/drive#performing-visits-with-a-different-method] + # + # ===== \Examples + # + # link_to "Delete profile", @profile, data: { turbo_method: :delete } + # # => Delete profile + # + # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } + # # => Visit Other Site + # + # source://actionview//lib/action_view/helpers/url_helper.rb#198 + 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#437 + 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#414 + 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#390 + 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#487 + 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#669 + 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#618 + 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#38 + def url_for(options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/url_helper.rb#50 + def _back_url; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#55 + def _filtered_referrer; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#712 + def add_method_to_attributes!(html_options, method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#683 + def convert_options_to_data_attributes(options, html_options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#706 + def link_to_remote_options?(options); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#723 + def method_for_options(options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#741 + def method_not_get_method?(method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#760 + def method_tag(method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#806 + 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#780 + def to_form_params(attribute, namespace = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#746 + def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#698 + def url_target(name, options); end + + class << self + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + 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#23 +ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/helpers/url_helper.rb#29 +module ActionView::Helpers::UrlHelper::ClassMethods + # source://actionview//lib/action_view/helpers/url_helper.rb#30 + def _url_for_modules; end +end + +# source://actionview//lib/action_view/helpers/url_helper.rb#733 +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#17 + def locale; end + + # source://actionview//lib/action_view/rendering.rb#21 + 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 + +# = Action View \Layouts +# +# Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in +# repeated setups. The inclusion pattern has pages that look like this: +# +# <%= render "application/header" %> +# Hello World +# <%= render "application/footer" %> +# +# This approach is a decent way of keeping common structures isolated from the changing content, but it's verbose +# and if you ever want to change the structure of these two includes, you'll have to change all the templates. +# +# 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 falls back to the parent behavior if none exists. +# Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: +# +# class ApplicationController < ActionController::Base +# layout "application" +# end +# +# class PostsController < ApplicationController +# # Will use "application" layout +# end +# +# class CommentsController < ApplicationController +# # Will search for "comments" layout and fall back to "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#205 +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#350 + def _process_render_template_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 + def _layout_conditions; end + def _layout_conditions?; end + 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 + include ::ActionView::LogSubscriber::Utils + + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://actionview//lib/action_view/log_subscriber.rb#12 + def initialize; end + + # source://actionview//lib/action_view/log_subscriber.rb#45 + def render_collection(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#37 + def render_layout(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#26 + def render_partial(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#17 + def render_template(event); end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#121 + def cache_message(payload); end + + # source://actionview//lib/action_view/log_subscriber.rb#113 + def render_count(payload); end + + class << self + # source://actionview//lib/action_view/log_subscriber.rb#105 + def attach_to(*_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + end +end + +# source://actionview//lib/action_view/log_subscriber.rb#76 +class ActionView::LogSubscriber::Start + include ::ActionView::LogSubscriber::Utils + + # source://actionview//lib/action_view/log_subscriber.rb#97 + def finish(name, id, payload); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/log_subscriber.rb#100 + def silenced?(_); end + + # source://actionview//lib/action_view/log_subscriber.rb#79 + def start(name, id, payload); end +end + +# source://actionview//lib/action_view/log_subscriber.rb#57 +module ActionView::LogSubscriber::Utils + # source://actionview//lib/action_view/log_subscriber.rb#58 + def logger; end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#63 + def from_rails_root(string); end + + # source://actionview//lib/action_view/log_subscriber.rb#69 + def rails_root; end +end + +# source://actionview//lib/action_view/log_subscriber.rb#10 +ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# = 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#232 + def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#242 + def digest_cache; end + + # Override formats= to expand ["*/*"] values and automatically + # add :html as fallback to :js. + # + # source://actionview//lib/action_view/lookup_context.rb#263 + def formats=(values); end + + # Override locale to return a symbol instead of array. + # + # source://actionview//lib/action_view/lookup_context.rb#283 + def locale; end + + # Overload locale= to also set the I18n.locale. If the current I18n.config object responds + # to original_config, it means that it has a copy of the original I18n configuration and it's + # acting as proxy, which we need to skip. + # + # source://actionview//lib/action_view/lookup_context.rb#290 + 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#246 + def with_prepended_formats(formats); end + + private + + # source://actionview//lib/action_view/lookup_context.rb#253 + 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#98 +module ActionView::LookupContext::DetailsCache + # Returns the value of attribute cache. + # + # source://actionview//lib/action_view/lookup_context.rb#99 + def cache; end + + # Sets the attribute cache + # + # @param value the value to set the attribute cache to. + # + # source://actionview//lib/action_view/lookup_context.rb#99 + def cache=(_arg0); end + + # Calculate the details key. Remove the handlers from calculation to improve performance + # since the user cannot modify it explicitly. + # + # source://actionview//lib/action_view/lookup_context.rb#103 + def details_key; end + + # Temporary skip passing the details_key forward. + # + # source://actionview//lib/action_view/lookup_context.rb#108 + def disable_cache; end + + private + + # source://actionview//lib/action_view/lookup_context.rb#116 + 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#77 + 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#86 + def digest_caches; end + + # source://actionview//lib/action_view/lookup_context.rb#90 + def view_context_class; end + end +end + +# Helpers related to template lookup using the lookup context information. +# +# source://actionview//lib/action_view/lookup_context.rb#125 +module ActionView::LookupContext::ViewPaths + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#148 + def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#148 + def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#155 + def append_view_paths(paths); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#141 + def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # source://actionview//lib/action_view/lookup_context.rb#128 + def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#135 + def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#128 + def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute html_fallback_for_js. + # + # source://actionview//lib/action_view/lookup_context.rb#126 + def html_fallback_for_js; end + + # source://actionview//lib/action_view/lookup_context.rb#159 + def prepend_view_paths(paths); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#141 + def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/lookup_context.rb#126 + 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#166 + def build_view_paths(paths); end + + # Compute details hash and key according to user options (e.g. passed from #render). + # + # source://actionview//lib/action_view/lookup_context.rb#175 + def detail_args_for(options); end + + # source://actionview//lib/action_view/lookup_context.rb#188 + def detail_args_for_any; end + + # Fix when prefix is specified as part of the template name + # + # source://actionview//lib/action_view/lookup_context.rb#209 + def normalize_name(name, prefixes); end +end + +# source://actionview//lib/action_view/template/error.rb#30 +class ActionView::MissingTemplate < ::ActionView::ActionViewError + include ::DidYouMean::Correctable + + # @return [MissingTemplate] a new instance of MissingTemplate + # + # source://actionview//lib/action_view/template/error.rb#33 + 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#93 + def corrections; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template/error.rb#31 + def partial; end + + # Returns the value of attribute path. + # + # source://actionview//lib/action_view/template/error.rb#31 + def path; end + + # Returns the value of attribute paths. + # + # source://actionview//lib/action_view/template/error.rb#31 + def paths; end + + # Returns the value of attribute prefixes. + # + # source://actionview//lib/action_view/template/error.rb#31 + def prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#60 +class ActionView::MissingTemplate::Results + # @return [Results] a new instance of Results + # + # source://actionview//lib/action_view/template/error.rb#63 + def initialize(size); end + + # source://actionview//lib/action_view/template/error.rb#80 + def add(path, score); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/error.rb#72 + def should_record?(score); end + + # source://actionview//lib/action_view/template/error.rb#68 + def to_a; end +end + +# source://actionview//lib/action_view/template/error.rb#61 +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 + # @return [OutputBuffer] a new instance of OutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#22 + def initialize(buffer = T.unsafe(nil)); end + + # source://actionview//lib/action_view/buffers.rb#42 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#81 + def ==(other); end + + # source://actionview//lib/action_view/buffers.rb#42 + def append=(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def blank?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#72 + def capture(*args); end + + # source://actionview//lib/action_view/buffers.rb#42 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encode!(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def force_encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#29 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#38 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#27 + def length(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#85 + def raw; end + + # Returns the value of attribute raw_buffer. + # + # source://actionview//lib/action_view/buffers.rb#89 + def raw_buffer; end + + # source://actionview//lib/action_view/buffers.rb#56 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#56 + def safe_concat(value); end + + # source://actionview//lib/action_view/buffers.rb#62 + def safe_expr_append=(val); end + + # source://actionview//lib/action_view/buffers.rb#29 + def to_s; end + + # source://actionview//lib/action_view/buffers.rb#34 + def to_str; end + + private + + # source://actionview//lib/action_view/buffers.rb#68 + def initialize_copy(other); end +end + +# source://actionview//lib/action_view/flows.rb#6 +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#262 + 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 + +# source://actionview//lib/action_view/path_registry.rb#4 +module ActionView::PathRegistry + class << self + # source://actionview//lib/action_view/path_registry.rb#53 + def all_file_system_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#47 + def all_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#22 + def cast_file_system_resolvers(paths); end + + # Returns the value of attribute file_system_resolver_hooks. + # + # source://actionview//lib/action_view/path_registry.rb#11 + def file_system_resolver_hooks; end + + # source://actionview//lib/action_view/path_registry.rb#14 + def get_view_paths(klass); end + + # source://actionview//lib/action_view/path_registry.rb#18 + def set_view_paths(klass, paths); end + end +end + +# = Action View PathSet +# +# This class is used to store and access paths in Action View. A number of +# 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 +(other); 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#16 + def each(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/path_set.rb#53 + def exists?(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#40 + def find(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#45 + def find_all(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#16 + def include?(*_arg0, **_arg1, &_arg2); end + + # 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 size(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#27 + def to_ary; end + + private + + # source://actionview//lib/action_view/path_set.rb#22 + def initialize_copy(other); end + + # source://actionview//lib/action_view/path_set.rb#58 + def search_combinations(prefixes); end + + # source://actionview//lib/action_view/path_set.rb#67 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# source://actionview//lib/action_view/buffers.rb#92 +class ActionView::RawOutputBuffer + # @return [RawOutputBuffer] a new instance of RawOutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#93 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#97 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#103 + def raw; end +end + +# source://actionview//lib/action_view/buffers.rb#150 +class ActionView::RawStreamingBuffer + # @return [RawStreamingBuffer] a new instance of RawStreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#151 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#155 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#161 + def raw; end +end + +# = Action View \Record \Identifier +# +# RecordIdentifier encapsulates methods used by various ActionView helpers +# to associate records with DOM elements. +# +# 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_post" +# dom_class(Post) # => "post" +# 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#60 +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#78 + def dom_class(record_or_class, prefix = T.unsafe(nil)); end + + # The DOM id convention is to use the singular form of an object or class with the id following an underscore. + # If no id is found, prefix with "new_" instead. + # + # dom_id(Post.find(45)) # => "post_45" + # dom_id(Post) # => "new_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, :custom) # => "custom_post" + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/record_identifier.rb#93 + def dom_id(record_or_class, 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#113 + def record_key_for_dom_id(record); end +end + +# source://actionview//lib/action_view/record_identifier.rb#66 +ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/record_identifier.rb#67 +ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/render_parser.rb#4 +module ActionView::RenderParser; end + +# source://actionview//lib/action_view/render_parser.rb#5 +ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/render_parser.rb#8 +class ActionView::RenderParser::Base + # @return [Base] a new instance of Base + # + # source://actionview//lib/action_view/render_parser.rb#9 + def initialize(name, code); end + + private + + # source://actionview//lib/action_view/render_parser.rb#15 + def directory; end + + # source://actionview//lib/action_view/render_parser.rb#19 + def partial_to_virtual_path(render_type, partial_path); end +end + +# source://actionview//lib/action_view/render_parser.rb#37 +ActionView::RenderParser::Default = ActionView::RenderParser::PrismRenderParser + +# source://actionview//lib/action_view/render_parser/prism_render_parser.rb#5 +class ActionView::RenderParser::PrismRenderParser < ::ActionView::RenderParser::Base + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#6 + def render_calls; end + + private + + # Accept a call node and return a hash of options for the render call. + # If it doesn't match the expected format, return nil. + # + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#43 + def render_call_options(node); end + + # Accept the node that is being passed in the position of the template + # and return the template name and whether or not it is an object + # template. + # + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#97 + def render_call_template(node); end +end + +# source://actionview//lib/action_view/render_parser.rb#6 +ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) + +# = Action View \Renderer +# +# This is the main entry point for rendering. It basically delegates +# to other objects like TemplateRenderer and PartialRenderer which +# actually renders the template. +# +# 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#15 +class ActionView::Renderer + # @return [Renderer] a new instance of Renderer + # + # source://actionview//lib/action_view/renderer/renderer.rb#18 + def initialize(lookup_context); end + + # source://actionview//lib/action_view/renderer/renderer.rb#52 + def cache_hits; end + + # Returns the value of attribute lookup_context. + # + # source://actionview//lib/action_view/renderer/renderer.rb#16 + def lookup_context; end + + # Sets the attribute lookup_context + # + # @param value the value to set the attribute lookup_context to. + # + # source://actionview//lib/action_view/renderer/renderer.rb#16 + def lookup_context=(_arg0); end + + # Main render entry point shared by Action View and Action Controller. + # + # source://actionview//lib/action_view/renderer/renderer.rb#23 + 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#40 + def render_body(context, options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#48 + def render_partial(context, options, &block); end + + # source://actionview//lib/action_view/renderer/renderer.rb#27 + def render_to_object(context, options); end + + private + + # source://actionview//lib/action_view/renderer/renderer.rb#103 + def collection_from_object(object); end + + # source://actionview//lib/action_view/renderer/renderer.rb#96 + def collection_from_options(options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#61 + def render_partial_to_object(context, options, &block); end + + # source://actionview//lib/action_view/renderer/renderer.rb#57 + def render_template_to_object(context, options); end +end + +# source://actionview//lib/action_view/rendering.rb#26 +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#32 + def initialize; end + + # Override process to set up I18n proxy. + # + # source://actionview//lib/action_view/rendering.rb#38 + def process(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/rendering.rb#119 + def render_to_body(options = T.unsafe(nil)); end + + 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#109 + def view_context; end + + # source://actionview//lib/action_view/rendering.rb#95 + def view_context_class; end + + # Returns an object that is able to render templates. + # + # source://actionview//lib/action_view/rendering.rb#114 + def view_renderer; end + + private + + # Normalize args by converting render "foo" to render action: "foo" and + # render "foo/bar" to render template: "foo/bar". + # + # source://actionview//lib/action_view/rendering.rb#153 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Assign the rendered format to look up context. + # + # source://actionview//lib/action_view/rendering.rb#146 + def _process_format(format); end + + # Normalize options. + # + # source://actionview//lib/action_view/rendering.rb#177 + def _process_render_template_options(options); end + + # Find and render a template based on the options given. + # + # source://actionview//lib/action_view/rendering.rb#127 + def _render_template(options); end +end + +# source://actionview//lib/action_view/rendering.rb#45 +module ActionView::Rendering::ClassMethods + # source://actionview//lib/action_view/rendering.rb#49 + def _helpers; end + + # source://actionview//lib/action_view/rendering.rb#46 + def _routes; end + + # source://actionview//lib/action_view/rendering.rb#59 + def build_view_context_class(klass, supports_path, routes, helpers); end + + # source://actionview//lib/action_view/rendering.rb#76 + def eager_load!; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/rendering.rb#52 + def inherit_view_context_class?; end + + # source://actionview//lib/action_view/rendering.rb#82 + def view_context_class; end +end + +# = Action View Resolver +# +# source://actionview//lib/action_view/template/resolver.rb#11 +class ActionView::Resolver + # source://actionview//lib/action_view/template/resolver.rb#69 + def all_template_paths; end + + # source://actionview//lib/action_view/template/resolver.rb#64 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#79 + def caching?(&_arg0); end + + # source://actionview//lib/action_view/template/resolver.rb#56 + def clear_cache; end + + # Normalizes the arguments and passes it on to find_templates. + # + # source://actionview//lib/action_view/template/resolver.rb#60 + 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#75 + 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#84 + def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end + + class << self + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching?; end + end +end + +# source://actionview//lib/action_view/template/resolver.rb#12 +class ActionView::Resolver::PathParser + # source://actionview//lib/action_view/template/resolver.rb#15 + def build_path_regex; end + + # source://actionview//lib/action_view/template/resolver.rb#36 + def parse(path); end +end + +# source://actionview//lib/action_view/template/resolver.rb#13 +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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#102 + 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 ActionDispatch::Routing::UrlFor#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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_dispatch/routing/url_for.rb#102 + def default_url_options=(val); end + end +end + +# source://actionview//lib/action_view/buffers.rb#108 +class ActionView::StreamingBuffer + # @return [StreamingBuffer] a new instance of StreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#109 + def initialize(block); end + + # source://actionview//lib/action_view/buffers.rb#113 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#113 + def append=(value); end + + # Returns the value of attribute block. + # + # source://actionview//lib/action_view/buffers.rb#147 + def block; end + + # source://actionview//lib/action_view/buffers.rb#126 + def capture; end + + # source://actionview//lib/action_view/buffers.rb#113 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#139 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#135 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#143 + def raw; end + + # source://actionview//lib/action_view/buffers.rb#121 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#121 + 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#12 +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#44 + 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#56 + 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#13 +class ActionView::StreamingTemplateRenderer::Body + # @return [Body] a new instance of Body + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 + def initialize(&start); end + + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#18 + 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#30 + def log_error(exception); end +end + +# source://actionview//lib/action_view/template/error.rb#245 +class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error + # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate + # + # source://actionview//lib/action_view/template/error.rb#246 + def initialize(template, offending_code_string); end + + # source://actionview//lib/action_view/template/error.rb#257 + def annotated_source_code; end + + # source://actionview//lib/action_view/template/error.rb#251 + def message; end +end + +# = Action View \Template +# +# source://actionview//lib/action_view/template.rb#7 +class ActionView::Template + extend ::ActiveSupport::Autoload + extend ::ActionView::Template::Handlers + + # @return [Template] a new instance of Template + # + # source://actionview//lib/action_view/template.rb#199 + 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#311 + def encode!; end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/template.rb#195 + def format; end + + # Returns the value of attribute handler. + # + # source://actionview//lib/action_view/template.rb#194 + def handler; end + + # Returns the value of attribute identifier. + # + # source://actionview//lib/action_view/template.rb#194 + def identifier; end + + # source://actionview//lib/action_view/template.rb#290 + def inspect; end + + # The locals this template has been or will be compiled for, or nil if this + # is a strict locals template. + # + # source://actionview//lib/action_view/template.rb#223 + 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#377 + def marshal_dump; end + + # source://actionview//lib/action_view/template.rb#381 + def marshal_load(array); end + + # source://actionview//lib/action_view/template.rb#386 + def method_name; 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#261 + def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/template.rb#286 + def short_identifier; end + + # source://actionview//lib/action_view/template.rb#294 + def source; end + + # source://actionview//lib/action_view/template.rb#231 + def spot(location); end + + # This method is responsible for marking a template as having strict locals + # which means the template can only accept the locals defined in a magic + # comment. For example, if your template acceps the locals +title+ and + # +comment_count+, add the following to your template file: + # + # <%# locals: (title: "Default title", comment_count: 0) %> + # + # Strict locals are useful for validating template arguments and for + # specifying defaults. + # + # source://actionview//lib/action_view/template.rb#356 + def strict_locals!; end + + # Returns whether a template is using strict locals. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#370 + def strict_locals?; end + + # Returns whether the underlying handler supports streaming. If so, + # a streaming buffer *may* be passed when it starts rendering. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#251 + def supports_streaming?; end + + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template.rb#241 + def translate_location(backtrace_location, spot); end + + # source://actionview//lib/action_view/template.rb#282 + def type; end + + # Returns the value of attribute variable. + # + # source://actionview//lib/action_view/template.rb#195 + def variable; end + + # Returns the value of attribute variant. + # + # source://actionview//lib/action_view/template.rb#195 + def variant; end + + # Returns the value of attribute virtual_path. + # + # source://actionview//lib/action_view/template.rb#195 + 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#490 + 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#408 + def compile!(view); end + + # This method compiles the source of the template. The compilation of templates + # involves setting strict_locals! if applicable, encoding the template, and setting + # frozen string literal. + # + # source://actionview//lib/action_view/template.rb#433 + def compiled_source; end + + # source://actionview//lib/action_view/template.rb#395 + def find_node_by_id(node, node_id); end + + # source://actionview//lib/action_view/template.rb#539 + def handle_render_error(view, e); end + + # source://actionview//lib/action_view/template.rb#564 + def identifier_method_name; end + + # source://actionview//lib/action_view/template.rb#568 + def instrument(action, &block); end + + # source://actionview//lib/action_view/template.rb#576 + def instrument_payload; end + + # source://actionview//lib/action_view/template.rb#572 + def instrument_render_template(&block); end + + # source://actionview//lib/action_view/template.rb#551 + def locals_code; end + + # source://actionview//lib/action_view/template.rb#531 + def offset; end + + class << self + # source://actionview//lib/action_view/template.rb#180 + def frozen_string_literal; end + + # source://actionview//lib/action_view/template.rb#180 + def frozen_string_literal=(_arg0); end + + # source://actionview//lib/action_view/template.rb#184 + def mime_types_implementation=(implementation); 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#154 +class ActionView::Template::Error < ::ActionView::ActionViewError + # @return [Error] a new instance of Error + # + # source://actionview//lib/action_view/template/error.rb#162 + def initialize(template); end + + # source://actionview//lib/action_view/template/error.rb#220 + def annotated_source_code; end + + # source://actionview//lib/action_view/template/error.rb#171 + def backtrace; end + + # source://actionview//lib/action_view/template/error.rb#175 + def backtrace_locations; end + + # Override to prevent #cause resetting during re-raise. + # + # source://actionview//lib/action_view/template/error.rb#158 + def cause; end + + # source://actionview//lib/action_view/template/error.rb#179 + def file_name; end + + # source://actionview//lib/action_view/template/error.rb#212 + def line_number; end + + # source://actionview//lib/action_view/template/error.rb#192 + def source_extract(indentation = T.unsafe(nil)); end + + # source://actionview//lib/action_view/template/error.rb#183 + def sub_template_message; end + + # source://actionview//lib/action_view/template/error.rb#207 + def sub_template_of(template_path); end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/template/error.rb#160 + def template; end + + private + + # source://actionview//lib/action_view/template/error.rb#233 + def formatted_code_for(source_code, line_counter, indent); end + + # source://actionview//lib/action_view/template/error.rb#225 + def source_location; end +end + +# source://actionview//lib/action_view/template/error.rb#155 +ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) + +# = Action View HTML Template +# +# source://actionview//lib/action_view/template/html.rb#6 +class ActionView::Template::HTML + # @return [HTML] a new instance of HTML + # + # 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 + +# = Action View Template Handlers +# +# source://actionview//lib/action_view/template/handlers.rb#6 +module ActionView::Template::Handlers + # source://actionview//lib/action_view/template/handlers.rb#61 + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_format; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_format=(new_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#9 +class ActionView::Template::Handlers::ERB + # source://actionview//lib/action_view/template/handlers/erb.rb#61 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#37 + def handles_encoding?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#33 + def supports_streaming?; end + + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template/handlers/erb.rb#43 + def translate_location(spot, backtrace_location, source); end + + private + + # source://actionview//lib/action_view/template/handlers/erb.rb#108 + def find_offset(compiled, source_tokens, error_column); end + + # @raise [WrongEncodingError] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#93 + def valid_encoding(string, encoding); end + + class << self + # source://actionview//lib/action_view/template/handlers/erb.rb#29 + def call(template, source); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def erb_implementation; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def erb_implementation=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def erb_trim_mode; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def erb_trim_mode=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def escape_ignore_list; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def escape_ignore_list=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def strip_trailing_newlines; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def strip_trailing_newlines=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines?; end + end +end + +# source://actionview//lib/action_view/template/handlers/erb.rb#25 +ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#9 +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 + + private + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#65 + def add_code(code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#47 + def add_expression(indicator, code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#70 + def add_postamble(_); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#30 + def add_text(text); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#75 + def flush_newline_if_pending(src); end +end + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#45 +ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/erb.rb#27 +class ActionView::Template::Handlers::ERB::LocationParsingError < ::StandardError; end + +# source://actionview//lib/action_view/template/handlers/html.rb#5 +class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw + # source://actionview//lib/action_view/template/handlers/html.rb#6 + 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.rb#298 +ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template.rb#197 +ActionView::Template::NONE = T.let(T.unsafe(nil), Object) + +# source://actionview//lib/action_view/template.rb#548 +ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# = Action View RawFile Template +# +# source://actionview//lib/action_view/template/raw_file.rb#6 +class ActionView::Template::RawFile + # @return [RawFile] a new instance of RawFile + # + # 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 + +# = Action View Renderable Template for objects that respond to #render_in +# +# source://actionview//lib/action_view/template/renderable.rb#6 +class ActionView::Template::Renderable + # @return [Renderable] a new instance of Renderable + # + # source://actionview//lib/action_view/template/renderable.rb#7 + def initialize(renderable); end + + # source://actionview//lib/action_view/template/renderable.rb#25 + 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.rb#10 +ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) + +# SimpleType is mostly just a stub implementation for when Action View +# is used without Action Dispatch. +# +# source://actionview//lib/action_view/template/types.rb#9 +class ActionView::Template::SimpleType + # @return [SimpleType] a new instance of SimpleType + # + # source://actionview//lib/action_view/template/types.rb#29 + def initialize(symbol); end + + # source://actionview//lib/action_view/template/types.rb#43 + def ==(type); end + + # source://actionview//lib/action_view/template/types.rb#38 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionview//lib/action_view/template/types.rb#27 + def symbol; end + + # source://actionview//lib/action_view/template/types.rb#33 + def to_s; end + + # source://actionview//lib/action_view/template/types.rb#33 + def to_str; end + + # source://actionview//lib/action_view/template/types.rb#38 + def to_sym; end + + class << self + # source://actionview//lib/action_view/template/types.rb#14 + def [](type); end + + # Returns the value of attribute symbols. + # + # source://actionview//lib/action_view/template/types.rb#12 + def symbols; end + + # :nodoc + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template/types.rb#22 + def valid_symbols?(symbols); end + end +end + +# source://actionview//lib/action_view/template/sources.rb#5 +module ActionView::Template::Sources + extend ::ActiveSupport::Autoload +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 + +# = Action View Text Template +# +# 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.rb#189 +ActionView::Template::Types = Mime + +# 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#243 +ActionView::TemplateError = ActionView::Template::Error + +# = Action View \TemplatePath +# +# Represents a template path within ActionView's lookup and rendering system, +# like "users/show" +# +# TemplatePath makes it convenient to convert between separate name, prefix, +# partial arguments and the virtual path. +# +# source://actionview//lib/action_view/template_path.rb#11 +class ActionView::TemplatePath + # @return [TemplatePath] a new instance of TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#47 + def initialize(name, prefix, partial, virtual); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#61 + def ==(other); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#61 + def eql?(other); end + + # source://actionview//lib/action_view/template_path.rb#57 + def hash; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/template_path.rb#12 + def name; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#12 + def partial; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#12 + def partial?; end + + # Returns the value of attribute prefix. + # + # source://actionview//lib/action_view/template_path.rb#12 + def prefix; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#12 + def to_s; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#12 + def to_str; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#12 + def virtual; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#12 + def virtual_path; end + + class << self + # Convert name, prefix, and partial into a TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#43 + def build(name, prefix, partial); end + + # Build a TemplatePath form a virtual path + # + # source://actionview//lib/action_view/template_path.rb#28 + def parse(virtual); end + + # Convert name, prefix, and partial into a virtual path string + # + # source://actionview//lib/action_view/template_path.rb#17 + 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#88 + 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#71 + def render_with_layout(view, template, path, locals); end + + # source://actionview//lib/action_view/renderer/template_renderer.rb#92 + def resolve_layout(layout, keys, formats); end +end + +# = Action View Test Case +# +# Read more about ActionView::TestCase in {Testing Rails Applications}[https://guides.rubyonrails.org/testing.html#testing-view-partials] +# in the guides. +# +# source://actionview//lib/action_view/test_case.rb#15 +class ActionView::TestCase < ::ActiveSupport::TestCase + include ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::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::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + include ::ActionView::Helpers::DateHelper + include ::ActionView::Helpers::DebugHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + 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 ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + extend ::AbstractController::Helpers::Resolution + extend ::AbstractController::Helpers::ClassMethods + extend ::ActionView::Helpers::UrlHelper::ClassMethods + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods + extend ::ActionView::TestCase::Behavior::ClassMethods + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods=(_arg0); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _helper_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#13 + def _helper_methods?; end + + # source://actionpack/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/abstract_controller/helpers.rb#17 + def _helpers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def content_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def content_class=(new_value); end + + # source://actionview//lib/action_view/test_case.rb#200 + def content_class?; 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#45 +module ActionView::TestCase::Behavior + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::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 ::ActionDispatch::Assertions::RoutingAssertions + include ::ActionDispatch::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 ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods + + # :method: rendered + # + # Returns the content rendered by the last +render+ call. + # + # The returned object behaves like a string but also exposes a number of methods + # that allows you to parse the content string in formats registered using + # .register_parser. + # + # By default includes the following parsers: + # + # +.html+ + # + # Parse the rendered content String into HTML. By default, this means + # a Nokogiri::XML::Node. + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # To parse the rendered content into a Capybara::Simple::Node, + # re-register an :html parser with a call to + # Capybara.string: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # +.json+ + # + # Parse the rendered content String into JSON. By default, this means + # a ActiveSupport::HashWithIndifferentAccess. + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # source://actionview//lib/action_view/test_case.rb#297 + def _routes; end + + # source://actionview//lib/action_view/test_case.rb#232 + def config; end + + # Returns the value of attribute controller. + # + # source://actionview//lib/action_view/test_case.rb#63 + def controller; end + + # Sets the attribute controller + # + # @param value the value to set the attribute controller to. + # + # source://actionview//lib/action_view/test_case.rb#63 + def controller=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#62 + def lookup_context(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute output_buffer. + # + # source://actionview//lib/action_view/test_case.rb#63 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://actionview//lib/action_view/test_case.rb#63 + def output_buffer=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#236 + 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#63 + 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#63 + def rendered=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#242 + def rendered_views; end + + # Returns the value of attribute request. + # + # source://actionview//lib/action_view/test_case.rb#63 + def request; end + + # Sets the attribute request + # + # @param value the value to set the attribute request to. + # + # source://actionview//lib/action_view/test_case.rb#63 + def request=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#220 + def setup_with_controller; end + + private + + # source://actionview//lib/action_view/test_case.rb#404 + def _user_defined_ivars; end + + # The instance of ActionView::Base that is used by +render+. + # + # source://actionview//lib/action_view/test_case.rb#356 + def _view; end + + # Need to experiment if this priority is the best one: rendered => output_buffer + # + # source://actionview//lib/action_view/test_case.rb#332 + def document_root_element; end + + # source://actionview//lib/action_view/test_case.rb#418 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/test_case.rb#434 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + # The instance of ActionView::Base that is used by +render+. + # + # source://actionview//lib/action_view/test_case.rb#356 + 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#412 + def view_assigns; end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + def content_class; end + def content_class=(value); end + def content_class?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# source://actionview//lib/action_view/test_case.rb#65 +module ActionView::TestCase::Behavior::ClassMethods + # source://actionview//lib/action_view/test_case.rb#164 + def determine_default_helper_class(name); end + + # source://actionview//lib/action_view/test_case.rb#183 + 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#181 + def helper_class=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#170 + def helper_method(*methods); end + + # source://actionview//lib/action_view/test_case.rb#66 + def inherited(descendant); end + + # source://actionview//lib/action_view/test_case.rb#187 + def new(*_arg0); end + + # Register a callable to parse rendered content for a given template + # format. + # + # Each registered parser will also define a +#rendered.[FORMAT]+ helper + # method, where +[FORMAT]+ corresponds to the value of the + # +format+ argument. + # + # By default, ActionView::TestCase defines parsers for: + # + # * +:html+ - returns an instance of +Nokogiri::XML::Node+ + # * +:json+ - returns an instance of ActiveSupport::HashWithIndifferentAccess + # + # These pre-registered parsers also define corresponding helpers: + # + # * +:html+ - defines +rendered.html+ + # * +:json+ - defines +rendered.json+ + # + # ==== Parameters + # + # [+format+] + # The name (as a +Symbol+) of the format used to render the content. + # + # [+callable+] + # The parser. A callable object that accepts the rendered string as + # its sole argument. Alternatively, the parser can be specified as a + # block. + # + # ==== Examples + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } + # end + # + # test "renders JSON" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :json, partial: "articles/article", locals: { article: article } + # + # assert_pattern { rendered.json => { title: "Hello, world" } } + # end + # + # To parse the rendered content into RSS, register a call to +RSS::Parser.parse+: + # + # register_parser :rss, -> rendered { RSS::Parser.parse(rendered) } + # + # test "renders RSS" do + # article = Article.create!(title: "Hello, world") + # + # render formats: :rss, partial: article + # + # assert_equal "Hello, world", rendered.rss.items.last.title + # end + # + # To parse the rendered content into a +Capybara::Simple::Node+, + # re-register an +:html+ parser with a call to +Capybara.string+: + # + # register_parser :html, -> rendered { Capybara.string(rendered) } + # + # test "renders HTML" do + # article = Article.create!(title: "Hello, world") + # + # render partial: article + # + # rendered.html.assert_css "h1", text: "Hello, world" + # end + # + # source://actionview//lib/action_view/test_case.rb#148 + def register_parser(format, callable = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/test_case.rb#155 + def tests(helper_class); end + + private + + # source://actionview//lib/action_view/test_case.rb#193 + def include_helper_modules!; end +end + +# source://actionview//lib/action_view/test_case.rb#369 +ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/test_case.rb#336 +module ActionView::TestCase::Behavior::Locals + # source://actionview//lib/action_view/test_case.rb#339 + 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#337 + 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#337 + def rendered_views=(_arg0); end +end + +# source://actionview//lib/action_view/test_case.rb#301 +class ActionView::TestCase::Behavior::RenderedViewContent < ::String + # source://actionview//lib/action_view/test_case.rb#150 + def html; end + + # source://actionview//lib/action_view/test_case.rb#150 + def json; end +end + +# Need to experiment if this priority is the best one: rendered => output_buffer +# +# source://actionview//lib/action_view/test_case.rb#305 +class ActionView::TestCase::Behavior::RenderedViewsCollection + # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection + # + # source://actionview//lib/action_view/test_case.rb#306 + def initialize; end + + # source://actionview//lib/action_view/test_case.rb#310 + def add(view, locals); end + + # source://actionview//lib/action_view/test_case.rb#315 + def locals_for(view); end + + # source://actionview//lib/action_view/test_case.rb#319 + def rendered_views; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/test_case.rb#323 + 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#214 + def _test_case; end + + # source://actionview//lib/action_view/test_case.rb#210 + def protect_against_forgery?; end +end + +# source://actionview//lib/action_view/test_case.rb#16 +class ActionView::TestCase::TestController < ::ActionController::Base + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + + # @return [TestController] a new instance of TestController + # + # source://actionview//lib/action_view/test_case.rb#34 + def initialize; end + + # source://actionview//lib/action_view/test_case.rb#26 + def controller_path=(path); end + + # Returns the value of attribute params. + # + # source://actionview//lib/action_view/test_case.rb#19 + def params; end + + # Sets the attribute params + # + # @param value the value to set the attribute params to. + # + # source://actionview//lib/action_view/test_case.rb#19 + def params=(_arg0); end + + # Returns the value of attribute request. + # + # source://actionview//lib/action_view/test_case.rb#19 + def request; end + + # Sets the attribute request + # + # @param value the value to set the attribute request to. + # + # source://actionview//lib/action_view/test_case.rb#19 + def request=(_arg0); end + + # Returns the value of attribute response. + # + # source://actionview//lib/action_view/test_case.rb#19 + def response; end + + # Sets the attribute response + # + # @param value the value to set the attribute response to. + # + # source://actionview//lib/action_view/test_case.rb#19 + def response=(_arg0); end + + private + + # source://actionview//lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://actionview//lib/action_view/test_case.rb#30 + def controller_name; end + + # Overrides AbstractController::Base#controller_path + # + # source://actionview//lib/action_view/test_case.rb#23 + def controller_path; end + + # Overrides AbstractController::Base#controller_path + # + # source://actionview//lib/action_view/test_case.rb#23 + def controller_path=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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 + + # source://actionview//lib/action_view/unbound_template.rb#44 + def built_templates; end + + # Returns the value of attribute details. + # + # source://actionview//lib/action_view/unbound_template.rb#7 + 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#49 + def build_template(locals); end + + # source://actionview//lib/action_view/unbound_template.rb#63 + 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#81 + 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#103 + def append_view_path(path); end + + # source://actionview//lib/action_view/view_paths.rb#93 + 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#88 + 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#113 + 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 +end + +# source://actionview//lib/action_view/view_paths.rb#14 +module ActionView::ViewPaths::ClassMethods + # source://actionview//lib/action_view/view_paths.rb#31 + def _build_view_paths(paths); end + + # source://actionview//lib/action_view/view_paths.rb#23 + def _prefixes; end + + # 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#44 + 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#54 + def prepend_view_path(path); end + + # A list of all of the default view paths for this controller. + # + # source://actionview//lib/action_view/view_paths.rb#59 + 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#68 + 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#75 + def local_prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#14 +class ActionView::WrongEncodingError < ::ActionView::EncodingError + # @return [WrongEncodingError] a new instance of WrongEncodingError + # + # source://actionview//lib/action_view/template/error.rb#15 + def initialize(string, encoding); end + + # source://actionview//lib/action_view/template/error.rb#19 + def message; end +end + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/activejob@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/activejob@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..a8a74c7 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/activejob@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,2874 @@ +# 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`. + + +# :markup: markdown +# :include: ../README.md +# +# source://activejob//lib/active_job/gem_version.rb#3 +module ActiveJob + extend ::ActiveSupport::Autoload + + class << self + # source://activejob//lib/active_job/queue_adapter.rb#7 + def adapter_name(adapter); end + + # source://activejob//lib/active_job/deprecator.rb#4 + def deprecator; end + + # Returns the currently loaded version of Active Job as a +Gem::Version+. + # + # source://activejob//lib/active_job/gem_version.rb#5 + def gem_version; end + + # Push many jobs onto the queue at once without running enqueue callbacks. + # Queue adapters may communicate the enqueue status of each job by setting + # successfully_enqueued and/or enqueue_error on the passed-in job instances. + # + # source://activejob//lib/active_job/enqueuing.rb#14 + def perform_all_later(*jobs); end + + # source://activejob//lib/active_job.rb#52 + def use_big_decimal_serializer; end + + # source://activejob//lib/active_job.rb#58 + def use_big_decimal_serializer=(value); end + + # source://activejob//lib/active_job.rb#69 + def verbose_enqueue_logs; end + + # source://activejob//lib/active_job.rb#69 + def verbose_enqueue_logs=(_arg0); end + + # Returns the currently loaded version of Active Job as a +Gem::Version+. + # + # source://activejob//lib/active_job/version.rb#7 + def version; end + + private + + # source://activejob//lib/active_job/instrumentation.rb#6 + def instrument_enqueue_all(queue_adapter, jobs); end + end +end + +# 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#190 + def convert_to_global_id_hash(argument); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/arguments.rb#137 + def custom_serialized?(hash); end + + # source://activejob//lib/active_job/arguments.rb#110 + def deserialize_argument(argument); end + + # source://activejob//lib/active_job/arguments.rb#133 + def deserialize_global_id(hash); end + + # source://activejob//lib/active_job/arguments.rb#147 + def deserialize_hash(serialized_hash); end + + # source://activejob//lib/active_job/arguments.rb#71 + def serialize_argument(argument); end + + # source://activejob//lib/active_job/arguments.rb#141 + def serialize_hash(argument); end + + # source://activejob//lib/active_job/arguments.rb#160 + def serialize_hash_key(key); end + + # source://activejob//lib/active_job/arguments.rb#171 + def serialize_indifferent_hash(indifferent_hash); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/arguments.rb#129 + def serialized_global_id?(hash); end + + # source://activejob//lib/active_job/arguments.rb#177 + def transform_symbol_keys(hash, symbol_keys); end +end + +# source://activejob//lib/active_job/arguments.rb#50 +ActiveJob::Arguments::GLOBALID_KEY = T.let(T.unsafe(nil), String) + +# source://activejob//lib/active_job/arguments.rb#58 +ActiveJob::Arguments::OBJECT_SERIALIZER_KEY = T.let(T.unsafe(nil), String) + +# source://activejob//lib/active_job/arguments.rb#61 +ActiveJob::Arguments::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# source://activejob//lib/active_job/arguments.rb#54 +ActiveJob::Arguments::RUBY2_KEYWORDS_KEY = T.let(T.unsafe(nil), String) + +# source://activejob//lib/active_job/arguments.rb#52 +ActiveJob::Arguments::SYMBOL_KEYS_KEY = T.let(T.unsafe(nil), String) + +# source://activejob//lib/active_job/arguments.rb#56 +ActiveJob::Arguments::WITH_INDIFFERENT_ACCESS_KEY = T.let(T.unsafe(nil), String) + +# = Active Job \Base +# +# 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::ConcurrencyControls + 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::ConcurrencyControls::ClassMethods + extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _enqueue_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _perform_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_enqueue_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_perform_callbacks(&block); end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs; end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs=(_arg0); end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#14 + def concurrency_duration; end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#14 + def concurrency_duration=(_arg0); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#14 + def concurrency_duration?; end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#13 + def concurrency_limit; end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#13 + def concurrency_limit=(_arg0); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#13 + def concurrency_limit?; end + + # source://activejob//lib/active_job/logging.rb#15 + def logger; end + + # source://activejob//lib/active_job/logging.rb#15 + def logger=(val); end + + # source://activejob//lib/active_job/queue_adapter.rb#27 + def queue_adapter(&_arg0); end + + # source://activejob//lib/active_job/queue_name.rb#57 + def queue_name_prefix; end + + # source://activejob//lib/active_job/queue_name.rb#57 + def queue_name_prefix=(_arg0); end + + # source://activejob//lib/active_job/queue_name.rb#57 + def queue_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _enqueue_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _enqueue_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _perform_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _perform_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _queue_adapter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _queue_adapter=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _queue_adapter_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _queue_adapter_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _test_adapter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _test_adapter=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def after_discard_procs; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def after_discard_procs=(new_value); end + + # source://activejob//lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_duration; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_duration=(new_value); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#14 + def concurrency_duration?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_group; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_group=(new_value); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#11 + def concurrency_group?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_key; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_key=(new_value); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#10 + def concurrency_key?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_limit; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_limit=(new_value); end + + # source://solid_queue/1.0.0/lib/active_job/concurrency_controls.rb#13 + def concurrency_limit?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def enqueue_after_transaction_commit; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def enqueue_after_transaction_commit=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_arguments; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_arguments=(new_value); end + + # source://activejob//lib/active_job/logging.rb#26 + def log_arguments?; end + + # source://activejob//lib/active_job/logging.rb#15 + def logger; end + + # source://activejob//lib/active_job/logging.rb#15 + def logger=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def priority; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def priority=(new_value); end + + # source://activejob//lib/active_job/queue_priority.rb#49 + def priority?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activejob//lib/active_job/queue_name.rb#55 + def queue_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name_delimiter=(new_value); end + + # source://activejob//lib/active_job/queue_name.rb#56 + def queue_name_delimiter?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name_prefix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name_prefix=(new_value); end + + # source://activejob//lib/active_job/queue_name.rb#57 + def queue_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def retry_jitter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def retry_jitter=(new_value); 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 +# +# source://activejob//lib/active_job/callbacks.rb#18 +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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#8 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _execute_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_execute_callbacks(&block); end + end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + 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#34 +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| + # result = job.successfully_enqueued? ? "success" : "failure" + # $statsd.increment "enqueue-video-job.#{result}" + # end + # + # def perform(video_id) + # Video.find(video_id).process + # end + # end + # + # source://activejob//lib/active_job/callbacks.rb#141 + 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#69 + 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#162 + 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#102 + 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#121 + 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#50 + 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#18 + def perform_all_later(multi_args); 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 + +# = Active Job \Core +# +# Provides general behavior that will be included into every Active Job +# object that inherits from ActiveJob::Base. +# +# source://activejob//lib/active_job/core.rb#8 +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#93 + def initialize(*arguments, **_arg1); end + + # Job arguments + # + # source://activejob//lib/active_job/core.rb#12 + def arguments; end + + # Job arguments + # + # source://activejob//lib/active_job/core.rb#12 + 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#150 + 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#56 + def enqueue_error; end + + # Track any exceptions raised by the backend so callers can inspect the errors. + # + # source://activejob//lib/active_job/core.rb#56 + def enqueue_error=(_arg0); end + + # Track when a job was enqueued + # + # source://activejob//lib/active_job/core.rb#46 + def enqueued_at; end + + # Track when a job was enqueued + # + # source://activejob//lib/active_job/core.rb#46 + 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#37 + 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#37 + 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#31 + 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#31 + def executions=(_arg0); end + + # Job Identifier + # + # source://activejob//lib/active_job/core.rb#19 + def job_id; end + + # Job Identifier + # + # source://activejob//lib/active_job/core.rb#19 + def job_id=(_arg0); end + + # I18n.locale to be used during the job. + # + # source://activejob//lib/active_job/core.rb#40 + def locale; end + + # I18n.locale to be used during the job. + # + # source://activejob//lib/active_job/core.rb#40 + def locale=(_arg0); end + + # Priority that the job will have (lower is more priority). + # + # source://activejob//lib/active_job/core.rb#25 + def priority=(_arg0); end + + # ID optionally provided by adapter + # + # source://activejob//lib/active_job/core.rb#28 + def provider_job_id; end + + # ID optionally provided by adapter + # + # source://activejob//lib/active_job/core.rb#28 + def provider_job_id=(_arg0); end + + # Queue in which the job will reside. + # + # source://activejob//lib/active_job/core.rb#22 + def queue_name=(_arg0); end + + # Time when the job should be performed + # + # source://activejob//lib/active_job/core.rb#16 + def scheduled_at; end + + # Time when the job should be performed + # + # source://activejob//lib/active_job/core.rb#16 + 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#107 + 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#13 + def serialized_arguments=(_arg0); end + + # Configures the job with the given options. + # + # source://activejob//lib/active_job/core.rb#165 + def set(options = T.unsafe(nil)); end + + # Track whether the adapter received the job successfully. + # + # source://activejob//lib/active_job/core.rb#49 + def successfully_enqueued=(_arg0); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/core.rb#51 + def successfully_enqueued?; end + + # Timezone to be used during the job. + # + # source://activejob//lib/active_job/core.rb#43 + def timezone; end + + # Timezone to be used during the job. + # + # source://activejob//lib/active_job/core.rb#43 + def timezone=(_arg0); end + + private + + # @return [Boolean] + # + # source://activejob//lib/active_job/core.rb#198 + def arguments_serialized?; end + + # source://activejob//lib/active_job/core.rb#194 + def deserialize_arguments(serialized_args); end + + # source://activejob//lib/active_job/core.rb#183 + def deserialize_arguments_if_needed; end + + # source://activejob//lib/active_job/core.rb#190 + def serialize_arguments(arguments); end + + # source://activejob//lib/active_job/core.rb#175 + 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#60 +module ActiveJob::Core::ClassMethods + # Creates a new job instance from a hash created with +serialize+ + # + # source://activejob//lib/active_job/core.rb#62 + 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#86 + 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 + +# source://activejob//lib/active_job/enqueue_after_transaction_commit.rb#4 +module ActiveJob::EnqueueAfterTransactionCommit + private + + # source://activejob//lib/active_job/enqueue_after_transaction_commit.rb#6 + def raw_enqueue; 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#8 +class ActiveJob::EnqueueError < ::StandardError; end + +# source://activejob//lib/active_job/enqueuing.rb#40 +module ActiveJob::Enqueuing + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + 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#113 + def enqueue(options = T.unsafe(nil)); end + + private + + # source://activejob//lib/active_job/enqueuing.rb#129 + def raw_enqueue; end + + module GeneratedClassMethods + def enqueue_after_transaction_commit; end + def enqueue_after_transaction_commit=(value); end + end + + module GeneratedInstanceMethods; end +end + +# Includes the +perform_later+ method for job initialization. +# +# source://activejob//lib/active_job/enqueuing.rb#58 +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. + # + # If Active Job is used conjointly with Active Record, and #perform_later is called + # inside an Active Record transaction, then the enqueue is implicitly deferred to after + # the transaction is committed, or dropped if it's rolled back. In such case #perform_later + # will return the job instance like if it was successfully enqueued, but will still return + # +false+ if a callback prevented the job from being enqueued. + # + # This behavior can be changed on a per job basis: + # + # class NotificationJob < ApplicationJob + # self.enqueue_after_transaction_commit = false + # end + # + # @yield [job] + # + # source://activejob//lib/active_job/enqueuing.rb#82 + def perform_later(*_arg0, **_arg1, &_arg2); end + + private + + # source://activejob//lib/active_job/enqueuing.rb#92 + 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 + # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]. + # 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#151 + def retry_job(options = T.unsafe(nil)); end + + private + + # source://activejob//lib/active_job/exceptions.rb#161 + def determine_delay(seconds_or_duration_or_algorithm:, executions:, jitter: T.unsafe(nil)); end + + # source://activejob//lib/active_job/exceptions.rb#182 + def determine_jitter_for_delay(delay, jitter); end + + # source://activejob//lib/active_job/exceptions.rb#187 + def executions_for(exceptions); end + + # source://activejob//lib/active_job/exceptions.rb#196 + def run_after_discard_procs(exception); end + + module GeneratedClassMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end + def retry_jitter; end + def retry_jitter=(value); end + end + + module GeneratedInstanceMethods + def after_discard_procs; end + def after_discard_procs=(value); end + def after_discard_procs?; end + end +end + +# source://activejob//lib/active_job/exceptions.rb#15 +module ActiveJob::Exceptions::ClassMethods + # A block to run when a job is about to be discarded for any reason. + # + # ==== Example + # + # class WorkJob < ActiveJob::Base + # after_discard do |job, exception| + # ExceptionNotifier.report(exception) + # end + # + # ... + # + # end + # + # source://activejob//lib/active_job/exceptions.rb#124 + def after_discard(&blk); end + + # Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job, + # like an Active Record, is no longer available, and the job is thus no longer relevant. + # + # You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter. + # + # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if any. + # + # ==== Example + # + # class SearchIndexingJob < ActiveJob::Base + # 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#103 + 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. + # + # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if any. + # + # ==== Options + # * :wait - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds), + # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of + # :polynomially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 + # (first wait ~3s, then ~18s, then ~83s, etc) + # * :attempts - Enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited + # to retry the job until it succeeds. The number of attempts includes the original job execution. + # * :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: :polynomially_longer, attempts: 10 # retries at most 10 times for Net::OpenTimeout and Timeout::Error combined + # # To retry at most 10 times for each individual exception: + # # retry_on Net::OpenTimeout, wait: :polynomially_longer, attempts: 10 + # # retry_on Net::ReadTimeout, wait: 5.seconds, jitter: 0.30, attempts: 10 + # # retry_on Timeout::Error, wait: :polynomially_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#62 + def retry_on(*exceptions, wait: T.unsafe(nil), attempts: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), jitter: T.unsafe(nil)); end +end + +# source://activejob//lib/active_job/exceptions.rb#158 +ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object) + +# = Active Job \Execution +# +# Provides methods to execute jobs immediately, and wraps job execution so +# that exceptions configured with +# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from] +# are handled. +# +# source://activejob//lib/active_job/execution.rb#12 +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#60 + 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#45 + def perform_now; end + + private + + # source://activejob//lib/active_job/execution.rb#65 + 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#17 +module ActiveJob::Execution::ClassMethods + # source://activejob//lib/active_job/execution.rb#26 + def execute(job_data); end + + # Performs the job immediately. + # + # MyJob.perform_now("mike") + # + # source://activejob//lib/active_job/execution.rb#22 + def perform_now(*_arg0, **_arg1, &_arg2); end +end + +# source://activejob//lib/active_job/instrumentation.rb#16 +module ActiveJob::Instrumentation + extend ::ActiveSupport::Concern + + # source://activejob//lib/active_job/instrumentation.rb#25 + def perform_now; end + + private + + # source://activejob//lib/active_job/instrumentation.rb#30 + def _perform_job; end + + # source://activejob//lib/active_job/instrumentation.rb#47 + def halted_callback_hook(*_arg0); end + + # source://activejob//lib/active_job/instrumentation.rb#35 + def instrument(operation, payload = T.unsafe(nil), &block); end +end + +# source://activejob//lib/active_job/log_subscriber.rb#6 +class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner; end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner=(_arg0); end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner?; end + + # source://activejob//lib/active_job/log_subscriber.rb#130 + def discard(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#9 + def enqueue(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#49 + def enqueue_all(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#29 + def enqueue_at(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#105 + def enqueue_retry(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#86 + def perform(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#76 + def perform_start(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#120 + def retry_stopped(event); end + + private + + # source://activejob//lib/active_job/log_subscriber.rb#145 + def args_info(job); end + + # source://activejob//lib/active_job/log_subscriber.rb#200 + def enqueue_source_location; end + + # source://activejob//lib/active_job/log_subscriber.rb#217 + def enqueued_jobs_message(adapter, enqueued_jobs); end + + # source://activejob//lib/active_job/log_subscriber.rb#183 + def error(progname = T.unsafe(nil), &block); end + + # source://activejob//lib/active_job/log_subscriber.rb#154 + def format(arg); end + + # source://activejob//lib/active_job/log_subscriber.rb#175 + def info(progname = T.unsafe(nil), &block); end + + # source://activejob//lib/active_job/log_subscriber.rb#191 + def log_enqueue_source; end + + # source://activejob//lib/active_job/log_subscriber.rb#171 + def logger; end + + # source://activejob//lib/active_job/log_subscriber.rb#141 + def queue_name(event); end + + # source://activejob//lib/active_job/log_subscriber.rb#167 + def scheduled_at(event); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def backtrace_cleaner; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def backtrace_cleaner=(new_value); end + + # source://activejob//lib/active_job/log_subscriber.rb#7 + def backtrace_cleaner?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + 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#31 + def perform_now; end + + private + + # @return [Boolean] + # + # source://activejob//lib/active_job/logging.rb#45 + def logger_tagged_by_active_job?; end + + # source://activejob//lib/active_job/logging.rb#36 + 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 + +# = Active Job Queue adapter +# +# The +ActiveJob::QueueAdapter+ module is used to load the +# correct adapter. The default queue adapter is +:async+, +# which loads the ActiveJob::QueueAdapters::AsyncAdapter. +# +# source://activejob//lib/active_job/queue_adapter.rb#20 +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#31 +module ActiveJob::QueueAdapter::ClassMethods + # Returns the backend queue provider. The default queue adapter + # is +:async+. See QueueAdapters for more information. + # + # source://activejob//lib/active_job/queue_adapter.rb#34 + 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#49 + 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#41 + def queue_adapter_name; end + + private + + # source://activejob//lib/active_job/queue_adapter.rb#66 + def assign_adapter(adapter_name, queue_adapter); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapter.rb#73 + def queue_adapter?(object); end +end + +# source://activejob//lib/active_job/queue_adapter.rb#71 +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] +# * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details. +# +# For testing and development Active Job has three built-in adapters: +# +# * {Active Job Async}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html] +# * {Active Job Inline}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html] +# * {Active Job Test}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/TestAdapter.html] +# +# === Backends Features +# +# | | Async | Queues | Delayed | Priorities | Timeout | Retries | +# |-------------------|-------|--------|------------|------------|---------|---------| +# | 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 | +# | Active Job Async | Yes | Yes | Yes | No | No | No | +# | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A | +# | Active Job Test | No | Yes | N/A | N/A | N/A | N/A | +# +# ==== Async +# +# 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. +# +# source://activejob//lib/active_job/queue_adapters.rb#112 +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#135 + def lookup(name); end + end +end + +# source://activejob//lib/active_job/queue_adapters.rb#127 +ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) + +# = Active Job Abstract Adapter +# +# Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter +# forms the abstraction layer which makes this possible. +# +# source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#9 +class ActiveJob::QueueAdapters::AbstractAdapter + # @raise [NotImplementedError] + # + # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#18 + def enqueue(job); end + + # Defines whether enqueuing should happen implicitly to after commit when called + # from inside a transaction. Most adapters should return true, but some adapters + # that use the same database as Active Record and are transaction aware can return + # false to continue enqueuing jobs as part of the transaction. + # + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#14 + def enqueue_after_transaction_commit?; end + + # @raise [NotImplementedError] + # + # source://activejob//lib/active_job/queue_adapters/abstract_adapter.rb#22 + def enqueue_at(job, timestamp); end +end + +# = 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 < ::ActiveJob::QueueAdapters::AbstractAdapter + # 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 < ::ActiveJob::QueueAdapters::AbstractAdapter + # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#18 + def enqueue(job); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#14 + def enqueue_after_transaction_commit?; end + + # @raise [NotImplementedError] + # + # source://activejob//lib/active_job/queue_adapters/inline_adapter.rb#22 + 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 < ::ActiveJob::QueueAdapters::AbstractAdapter + # @return [TestAdapter] a new instance of TestAdapter + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#18 + def initialize(enqueue_after_transaction_commit: T.unsafe(nil)); end + + # 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#36 + def enqueue(job); end + + # Returns the value of attribute enqueue_after_transaction_commit. + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 + def enqueue_after_transaction_commit; end + + # Sets the attribute enqueue_after_transaction_commit + # + # @param value the value to set the attribute enqueue_after_transaction_commit to. + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#15 + def enqueue_after_transaction_commit=(_arg0); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#22 + def enqueue_after_transaction_commit?; end + + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#41 + 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#27 + 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#32 + 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#87 + def filter_as_proc(filter); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#65 + def filtered?(job); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#79 + def filtered_job_class?(job); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#73 + def filtered_queue?(job); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#69 + def filtered_time?(job); end + + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#47 + def job_to_hash(job, extras = T.unsafe(nil)); end + + # source://activejob//lib/active_job/queue_adapters/test_adapter.rb#56 + 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#61 + 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 + # 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#39 + def queue_as(part_name = T.unsafe(nil), &block); end + + # source://activejob//lib/active_job/queue_name.rb#47 + 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#53 + 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 + # + # Can be given a block that will evaluate in the context of the job + # so that a dynamic priority can be applied: + # + # class PublishToFeedJob < ApplicationJob + # queue_with_priority do + # post = self.arguments.first + # + # if post.paid? + # 10 + # else + # 50 + # end + # end + # + # def perform(post) + # post.to_feed! + # end + # end + # + # source://activejob//lib/active_job/queue_priority.rb#39 + 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 + +# = Active Job \Serializers +# +# The +ActiveJob::Serializers+ module is used to store a list of known serializers +# and to add new ones. It also has helpers to serialize/deserialize objects. +# +# source://activejob//lib/active_job/serializers.rb#10 +module ActiveJob::Serializers + extend ::ActiveSupport::Autoload + + # source://activejob//lib/active_job/serializers.rb#25 + def _additional_serializers; end + + # source://activejob//lib/active_job/serializers.rb#25 + def _additional_serializers=(val); end + + class << self + # source://activejob//lib/active_job/serializers.rb#25 + def _additional_serializers; end + + # source://activejob//lib/active_job/serializers.rb#25 + def _additional_serializers=(val); end + + # Adds new serializers to a list of known serializers. + # + # source://activejob//lib/active_job/serializers.rb#57 + 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#41 + def deserialize(argument); end + + # Returns serialized representative of the passed object. + # Will look up through all known serializers. + # Raises ActiveJob::SerializationError if it can't find a proper serializer. + # + # @raise [SerializationError] + # + # source://activejob//lib/active_job/serializers.rb#32 + def serialize(argument); end + + # Returns list of known serializers. + # + # source://activejob//lib/active_job/serializers.rb#52 + def serializers; end + end +end + +# source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#7 +class ActiveJob::Serializers::BigDecimalSerializer < ::ActiveJob::Serializers::ObjectSerializer + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#12 + def deserialize(hash); end + + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#8 + def serialize(big_decimal); end + + private + + # source://activejob//lib/active_job/serializers/big_decimal_serializer.rb#17 + def klass; end +end + +# source://activejob//lib/active_job/serializers/date_serializer.rb#5 +class ActiveJob::Serializers::DateSerializer < ::ActiveJob::Serializers::ObjectSerializer + # source://activejob//lib/active_job/serializers/date_serializer.rb#10 + 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#12 + 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#20 + 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#26 +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#44 + def deserialize(json); end + + # Serializes an argument to a JSON primitive type. + # + # source://activejob//lib/active_job/serializers/object_serializer.rb#39 + 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#34 + 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#50 + def klass; end + + class << self + # source://activejob//lib/active_job/serializers/object_serializer.rb#30 + def deserialize(*_arg0, **_arg1, &_arg2); end + + # source://activejob//lib/active_job/serializers/object_serializer.rb#30 + def serialize(*_arg0, **_arg1, &_arg2); end + + # source://activejob//lib/active_job/serializers/object_serializer.rb#30 + def serialize?(*_arg0, **_arg1, &_arg2); end + + private + + def allocate; end + def new(*_arg0); 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::ObjectSerializer + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#15 + def deserialize(hash); end + + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#8 + def serialize(time_with_zone); end + + private + + # source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#20 + def klass; end +end + +# source://activejob//lib/active_job/serializers/time_with_zone_serializer.rb#6 +ActiveJob::Serializers::TimeWithZoneSerializer::NANO_PRECISION = T.let(T.unsafe(nil), Integer) + +# source://activejob//lib/active_job/test_case.rb#6 +class ActiveJob::TestCase < ::ActiveSupport::TestCase + include ::ActiveJob::TestHelper +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#56 + 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#122 + 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 + # + # For keyword arguments, specify them as a hash inside an array: + # + # def test_assert_enqueued_with_keyword_arguments + # MyJob.perform_later(arg1: 'value1', arg2: 'value2') + # assert_enqueued_with(job: MyJob, args: [{ arg1: 'value1', arg2: 'value2' }]) + # end + # + # The given arguments may also be specified as matcher procs that return a + # boolean value indicating whether a job's attribute meets certain criteria. + # + # 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#406 + 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#186 + 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#348 + 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#278 + 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#510 + 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#41 + 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 jobs that have been enqueued + # to run at or before the given time will be performed. This includes jobs + # that have been enqueued without a time. + # + # If queue_adapter_for_test is overridden to return a different adapter, + # +perform_enqueued_jobs+ will merely execute the block. + # + # source://activejob//lib/active_job/test_helper.rb#620 + 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#661 + def queue_adapter; end + + # Returns a queue adapter instance to use with all Active Job test helpers. + # By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter. + # Override this method to specify a different adapter. The adapter must + # implement the same interface as ActiveJob::QueueAdapters::TestAdapter. + # + # source://activejob//lib/active_job/test_helper.rb#66 + def queue_adapter_for_test; end + + private + + # source://activejob//lib/active_job/test_helper.rb#676 + def clear_enqueued_jobs; end + + # source://activejob//lib/active_job/test_helper.rb#680 + def clear_performed_jobs; end + + # source://activejob//lib/active_job/test_helper.rb#745 + def deserialize_args_for_assertion(job); end + + # source://activejob//lib/active_job/test_helper.rb#716 + 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#710 + def filter_as_proc(filter); end + + # source://activejob//lib/active_job/test_helper.rb#724 + 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#752 + def instantiate_job(payload, skip_deserialize_arguments: T.unsafe(nil)); end + + # source://activejob//lib/active_job/test_helper.rb#684 + 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#720 + 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#732 + def prepare_args_for_assertion(args); end + + # source://activejob//lib/active_job/test_helper.rb#759 + def queue_adapter_changed_jobs; end + + # source://activejob//lib/active_job/test_helper.rb#666 + def require_active_job_test_adapter!(method); end + + # @return [Boolean] + # + # source://activejob//lib/active_job/test_helper.rb#672 + def using_test_adapter?; end + + # @raise [ArgumentError] + # + # source://activejob//lib/active_job/test_helper.rb#766 + 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/apps/govquests-api/rails_app/sorbet/rbi/gems/activemodel@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/activemodel@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..c43b7e9 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/activemodel@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,6844 @@ +# 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`. + + +# :include: ../README.rdoc +# +# source://activemodel//lib/active_model/gem_version.rb#3 +module ActiveModel + extend ::ActiveSupport::Autoload + + class << self + # source://activemodel//lib/active_model/deprecator.rb#4 + def deprecator; end + + # source://activemodel//lib/active_model.rb#76 + def eager_load!; end + + # Returns the currently loaded version of \Active \Model as a +Gem::Version+. + # + # 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 ( ::new ), 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 _validators; end + def _validators=(value); end + def _validators?; end + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _validators; end + def _validators?; end + def param_delimiter=(value); end + end +end + +# source://activemodel//lib/active_model/access.rb#7 +module ActiveModel::Access + # source://activemodel//lib/active_model/access.rb#8 + def slice(*methods); end + + # source://activemodel//lib/active_model/access.rb#12 + def values_at(*methods); end +end + +# source://activemodel//lib/active_model/attribute.rb#6 +class ActiveModel::Attribute + # This method should not be called directly. + # 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#115 + def ==(other); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#107 + def came_from_user?; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#66 + def changed?; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#70 + def changed_in_place?; end + + # source://activemodel//lib/active_model/attribute.rb#135 + def encode_with(coder); end + + # source://activemodel//lib/active_model/attribute.rb#115 + def eql?(other); end + + # source://activemodel//lib/active_model/attribute.rb#74 + def forgetting_assignment; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#111 + def has_been_read?; end + + # source://activemodel//lib/active_model/attribute.rb#123 + def hash; end + + # source://activemodel//lib/active_model/attribute.rb#127 + def init_with(coder); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#103 + 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#143 + def original_value_for_database; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#62 + 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#99 + 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#87 + def with_cast_value(value); end + + # source://activemodel//lib/active_model/attribute.rb#91 + def with_type(type); end + + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#7 + def with_user_default(value); end + + # source://activemodel//lib/active_model/attribute.rb#83 + def with_value_from_database(value); end + + # source://activemodel//lib/active_model/attribute.rb#78 + def with_value_from_user(value); end + + private + + # source://activemodel//lib/active_model/attribute.rb#169 + def _original_value_for_database; end + + # source://activemodel//lib/active_model/attribute.rb#165 + def _value_for_database; end + + # Returns the value of attribute original_attribute. + # + # source://activemodel//lib/active_model/attribute.rb#152 + def assigned?; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#161 + def changed_from_assignment?; end + + # source://activemodel//lib/active_model/attribute.rb#155 + def initialize_dup(other); end + + # Returns the value of attribute original_attribute. + # + # source://activemodel//lib/active_model/attribute.rb#152 + 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#173 +class ActiveModel::Attribute::FromDatabase < ::ActiveModel::Attribute + # source://activemodel//lib/active_model/attribute.rb#178 + def forgetting_assignment; end + + # source://activemodel//lib/active_model/attribute.rb#174 + def type_cast(value); end + + private + + # source://activemodel//lib/active_model/attribute.rb#192 + def _original_value_for_database; end +end + +# source://activemodel//lib/active_model/attribute.rb#197 +class ActiveModel::Attribute::FromUser < ::ActiveModel::Attribute + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#202 + def came_from_user?; end + + # source://activemodel//lib/active_model/attribute.rb#198 + def type_cast(value); end + + private + + # source://activemodel//lib/active_model/attribute.rb#207 + def _value_for_database; end +end + +# source://activemodel//lib/active_model/attribute.rb#222 +class ActiveModel::Attribute::Null < ::ActiveModel::Attribute + # @return [Null] a new instance of Null + # + # source://activemodel//lib/active_model/attribute.rb#223 + def initialize(name); end + + # source://activemodel//lib/active_model/attribute.rb#227 + def type_cast(*_arg0); end + + # @raise [ActiveModel::MissingAttributeError] + # + # source://activemodel//lib/active_model/attribute.rb#235 + def with_cast_value(value); end + + # source://activemodel//lib/active_model/attribute.rb#231 + def with_type(type); end + + # @raise [ActiveModel::MissingAttributeError] + # + # source://activemodel//lib/active_model/attribute.rb#235 + def with_value_from_database(value); end + + # @raise [ActiveModel::MissingAttributeError] + # + # source://activemodel//lib/active_model/attribute.rb#235 + def with_value_from_user(value); end +end + +# source://activemodel//lib/active_model/attribute.rb#242 +class ActiveModel::Attribute::Uninitialized < ::ActiveModel::Attribute + # @return [Uninitialized] a new instance of Uninitialized + # + # source://activemodel//lib/active_model/attribute.rb#245 + def initialize(name, type); end + + # source://activemodel//lib/active_model/attribute.rb#266 + def forgetting_assignment; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#262 + def initialized?; end + + # source://activemodel//lib/active_model/attribute.rb#255 + def original_value; end + + # source://activemodel//lib/active_model/attribute.rb#249 + def value; end + + # source://activemodel//lib/active_model/attribute.rb#259 + def value_for_database; end + + # source://activemodel//lib/active_model/attribute.rb#270 + def with_type(type); end +end + +# source://activemodel//lib/active_model/attribute.rb#243 +ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.unsafe(nil), Object) + +# source://activemodel//lib/active_model/attribute/user_provided_default.rb#11 +class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute::FromUser + # @return [UserProvidedDefault] a new instance of UserProvidedDefault + # + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#12 + def initialize(name, value, type, database_default); end + + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#29 + def marshal_dump; end + + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#40 + def marshal_load(values); end + + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#17 + def value_before_type_cast; end + + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#25 + def with_type(type); end + + private + + # Returns the value of attribute user_provided_value. + # + # source://activemodel//lib/active_model/attribute/user_provided_default.rb#52 + def user_provided_value; end +end + +# source://activemodel//lib/active_model/attribute.rb#212 +class ActiveModel::Attribute::WithCastValue < ::ActiveModel::Attribute + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute.rb#217 + def changed_in_place?; end + + # source://activemodel//lib/active_model/attribute.rb#213 + 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 + + # Like `BasicObject#method_missing`, `#attribute_writer_missing` is invoked + # when `#assign_attributes` is passed an unknown attribute name. + # + # By default, `#attribute_writer_missing` raises an UnknownAttributeError. + # + # class Rectangle + # include ActiveModel::AttributeAssignment + # + # attr_accessor :length, :width + # + # def attribute_writer_missing(name, value) + # Rails.logger.warn "Tried to assign to unknown attribute #{name}" + # end + # end + # + # rectangle = Rectangle.new + # rectangle.assign_attributes(height: 10) # => Logs "Tried to assign to unknown attribute 'height'" + # + # @raise [UnknownAttributeError] + # + # source://activemodel//lib/active_model/attribute_assignment.rb#56 + def attribute_writer_missing(name, value); 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#67 + def _assign_attribute(k, v); end + + # source://activemodel//lib/active_model/attribute_assignment.rb#61 + 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#64 +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#520 + def attribute_missing(match, *_arg1, **_arg2, &_arg3); 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#507 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_methods.rb#528 + 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#556 + def _read_attribute(attr); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_methods.rb#541 + 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#547 + def matched_attribute_method(method_name); end + + # @raise [ActiveModel::MissingAttributeError] + # + # source://activemodel//lib/active_model/attribute_methods.rb#552 + 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_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end + +# source://activemodel//lib/active_model/attribute_methods.rb#560 +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#577 + def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end + end +end + +# source://activemodel//lib/active_model/attribute_methods.rb#561 +ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://activemodel//lib/active_model/attribute_methods.rb#68 +ActiveModel::AttributeMethods::CALL_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activemodel//lib/active_model/attribute_methods.rb#75 +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#203 + def alias_attribute(new_name, old_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#226 + def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#382 + def aliases_by_attribute_name; end + + # Returns the original name for the alias +name+ + # + # source://activemodel//lib/active_model/attribute_methods.rb#245 + def attribute_alias(name); end + + # Is +new_name+ an alias? + # + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_methods.rb#240 + 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#175 + 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#106 + 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#140 + 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), as: T.unsafe(nil)); end + + # source://activemodel//lib/active_model/attribute_methods.rb#320 + def define_attribute_method_pattern(pattern, attr_name, owner:, as:, override: 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#272 + def define_attribute_methods(*attr_names); end + + # source://activemodel//lib/active_model/attribute_methods.rb#211 + def eagerly_generate_alias_attribute_methods(new_name, old_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#217 + def generate_alias_attribute_methods(code_generator, new_name, old_name); end + + # Removes all the previously dynamically defined methods from the class, including alias attribute methods. + # + # class Person + # include ActiveModel::AttributeMethods + # + # attr_accessor :name + # attribute_method_suffix '_short?' + # define_attribute_method :name + # alias_attribute :first_name, :name + # + # private + # def attribute_short?(attr) + # send(attr).length < 5 + # end + # end + # + # person = Person.new + # person.name = 'Bob' + # person.first_name # => "Bob" + # person.name_short? # => true + # + # Person.undefine_attribute_methods + # + # person.name_short? # => NoMethodError + # person.first_name # => NoMethodError + # + # source://activemodel//lib/active_model/attribute_methods.rb#375 + 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#417 + def attribute_method_patterns_cache; end + + # source://activemodel//lib/active_model/attribute_methods.rb#421 + def attribute_method_patterns_matching(method_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#445 + def build_mangled_name(name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#455 + def define_call(code_generator, name, target_name, mangled_name, parameters, call_args, namespace:, as:); 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#430 + def define_proxy_call(code_generator, name, proxy_target, parameters, *call_args, namespace:, as: T.unsafe(nil)); end + + # source://activemodel//lib/active_model/attribute_methods.rb#400 + def generated_attribute_methods; end + + # source://activemodel//lib/active_model/attribute_methods.rb#387 + def inherited(base); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_methods.rb#404 + def instance_method_already_implemented?(method_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#396 + def resolve_attribute_name(name); end +end + +# source://activemodel//lib/active_model/attribute_methods.rb#471 +class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern + # @return [AttributeMethodPattern] a new instance of AttributeMethodPattern + # + # source://activemodel//lib/active_model/attribute_methods.rb#476 + def initialize(prefix: T.unsafe(nil), suffix: T.unsafe(nil), parameters: T.unsafe(nil)); end + + # source://activemodel//lib/active_model/attribute_methods.rb#485 + def match(method_name); end + + # source://activemodel//lib/active_model/attribute_methods.rb#491 + def method_name(attr_name); end + + # Returns the value of attribute parameters. + # + # source://activemodel//lib/active_model/attribute_methods.rb#472 + def parameters; end + + # Returns the value of attribute prefix. + # + # source://activemodel//lib/active_model/attribute_methods.rb#472 + def prefix; end + + # Returns the value of attribute proxy_target. + # + # source://activemodel//lib/active_model/attribute_methods.rb#472 + def proxy_target; end + + # Returns the value of attribute suffix. + # + # source://activemodel//lib/active_model/attribute_methods.rb#472 + def suffix; end +end + +# source://activemodel//lib/active_model/attribute_methods.rb#474 +class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern::AttributeMethod < ::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 proxy_target + # + # @return [Object] the current value of proxy_target + def proxy_target; end + + # Sets the attribute proxy_target + # + # @param value [Object] the value to set the attribute proxy_target to. + # @return [Object] the newly set value + def proxy_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#67 +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 + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#86 + def type_cast(attr_name, value); 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_registration.rb#8 +module ActiveModel::AttributeRegistration + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods +end + +# source://activemodel//lib/active_model/attribute_registration.rb#11 +module ActiveModel::AttributeRegistration::ClassMethods + # source://activemodel//lib/active_model/attribute_registration.rb#31 + def _default_attributes; end + + # source://activemodel//lib/active_model/attribute_registration.rb#12 + def attribute(name, type = T.unsafe(nil), default: T.unsafe(nil), **options); end + + # source://activemodel//lib/active_model/attribute_registration.rb#37 + def attribute_types; end + + # source://activemodel//lib/active_model/attribute_registration.rb#23 + def decorate_attributes(names = T.unsafe(nil), &decorator); end + + # source://activemodel//lib/active_model/attribute_registration.rb#43 + def type_for_attribute(attribute_name, &block); end + + private + + # source://activemodel//lib/active_model/attribute_registration.rb#81 + def apply_pending_attribute_modifications(attribute_set); end + + # Hook for other modules to override. The attribute type is passed + # through this method immediately after it is resolved, before any type + # decorations are applied. + # + # source://activemodel//lib/active_model/attribute_registration.rb#112 + def hook_attribute_type(attribute, type); end + + # source://activemodel//lib/active_model/attribute_registration.rb#77 + def pending_attribute_modifications; end + + # source://activemodel//lib/active_model/attribute_registration.rb#91 + def reset_default_attributes; end + + # source://activemodel//lib/active_model/attribute_registration.rb#96 + def reset_default_attributes!; end + + # source://activemodel//lib/active_model/attribute_registration.rb#101 + def resolve_attribute_name(name); end + + # source://activemodel//lib/active_model/attribute_registration.rb#105 + def resolve_type_name(name, **options); end +end + +# source://activemodel//lib/active_model/attribute_registration.rb#67 +class ActiveModel::AttributeRegistration::ClassMethods::PendingDecorator < ::Struct + # source://activemodel//lib/active_model/attribute_registration.rb#68 + def apply_to(attribute_set); end + + # Returns the value of attribute decorator + # + # @return [Object] the current value of decorator + def decorator; end + + # Sets the attribute decorator + # + # @param value [Object] the value to set the attribute decorator to. + # @return [Object] the newly set value + def decorator=(_); end + + # Returns the value of attribute names + # + # @return [Object] the current value of names + def names; end + + # Sets the attribute names + # + # @param value [Object] the value to set the attribute names to. + # @return [Object] the newly set value + def names=(_); 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_registration.rb#61 +class ActiveModel::AttributeRegistration::ClassMethods::PendingDefault < ::Struct + # source://activemodel//lib/active_model/attribute_registration.rb#62 + def apply_to(attribute_set); end + + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + # 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://activemodel//lib/active_model/attribute_registration.rb#54 +class ActiveModel::AttributeRegistration::ClassMethods::PendingType < ::Struct + # source://activemodel//lib/active_model/attribute_registration.rb#55 + def apply_to(attribute_set); 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 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://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#106 + 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#93 + def accessed; end + + # source://activemodel//lib/active_model/attribute_set.rb#24 + def cast_types; end + + # source://activemodel//lib/active_model/attribute_set.rb#73 + def deep_dup; end + + # source://activemodel//lib/active_model/attribute_set.rb#10 + 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#50 + def fetch_value(name, &block); end + + # source://activemodel//lib/active_model/attribute_set.rb#68 + def freeze; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_set.rb#41 + def include?(name); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_set.rb#41 + def key?(name); end + + # source://activemodel//lib/active_model/attribute_set.rb#46 + def keys; end + + # source://activemodel//lib/active_model/attribute_set.rb#97 + def map(&block); end + + # source://activemodel//lib/active_model/attribute_set.rb#87 + def reset(key); end + + # source://activemodel//lib/active_model/attribute_set.rb#102 + def reverse_merge!(target_attributes); end + + # source://activemodel//lib/active_model/attribute_set.rb#36 + def to_h; end + + # source://activemodel//lib/active_model/attribute_set.rb#36 + def to_hash; end + + # source://activemodel//lib/active_model/attribute_set.rb#28 + def values_before_type_cast; end + + # source://activemodel//lib/active_model/attribute_set.rb#32 + def values_for_database; end + + # source://activemodel//lib/active_model/attribute_set.rb#64 + def write_cast_value(name, value); end + + # source://activemodel//lib/active_model/attribute_set.rb#54 + def write_from_database(name, value); end + + # @raise [FrozenError] + # + # source://activemodel//lib/active_model/attribute_set.rb#58 + def write_from_user(name, value); end + + protected + + # Returns the value of attribute attributes. + # + # source://activemodel//lib/active_model/attribute_set.rb#111 + def attributes; end + + private + + # source://activemodel//lib/active_model/attribute_set.rb#114 + def default_attribute(name); end + + # source://activemodel//lib/active_model/attribute_set.rb#82 + def initialize_clone(_); end + + # source://activemodel//lib/active_model/attribute_set.rb#77 + 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 + +# = Active \Model \Attributes +# +# The Attributes module allows models to define attributes beyond simple Ruby +# readers and writers. Similar to Active Record attributes, which are +# typically inferred from the database schema, Active Model Attributes are +# aware of data types, can have default values, and can handle casting and +# serialization. +# +# To use Attributes, include the module in your model class and define your +# attributes using the +attribute+ macro. It accepts a name, a type, a default +# value, and any other options supported by the attribute type. +# +# ==== Examples +# +# class Person +# include ActiveModel::Attributes +# +# attribute :name, :string +# attribute :active, :boolean, default: true +# end +# +# person = Person.new +# person.name = "Volmer" +# +# person.name # => "Volmer" +# person.active # => true +# +# source://activemodel//lib/active_model/attributes.rb#30 +module ActiveModel::Attributes + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveModel::AttributeRegistration + include ::ActiveModel::AttributeMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + mixes_in_class_methods ::ActiveModel::Attributes::ClassMethods + + # source://activemodel//lib/active_model/attributes.rb#106 + 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#146 + 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 + # person.name = "Francesco" + # person.age = 22 + # + # person.attributes # => { "name" => "Francesco", "age" => 22} + # + # source://activemodel//lib/active_model/attributes.rb#131 + def attributes; end + + # source://activemodel//lib/active_model/attributes.rb#150 + def freeze; end + + private + + # source://activemodel//lib/active_model/attributes.rb#156 + def _write_attribute(attr_name, value); end + + # source://activemodel//lib/active_model/attributes.rb#161 + def attribute(attr_name); end + + # source://activemodel//lib/active_model/attributes.rb#156 + def attribute=(attr_name, value); end + + # source://activemodel//lib/active_model/attributes.rb#111 + def initialize_dup(other); end + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end + +# source://activemodel//lib/active_model/attributes.rb#39 +module ActiveModel::Attributes::ClassMethods + # :call-seq: attribute(name, cast_type = nil, default: nil, **options) + # + # Defines a model attribute. In addition to the attribute name, a cast + # type and default value may be specified, as well as any options + # supported by the given cast type. + # + # class Person + # include ActiveModel::Attributes + # + # attribute :name, :string + # attribute :active, :boolean, default: true + # end + # + # person = Person.new + # person.name = "Volmer" + # + # person.name # => "Volmer" + # person.active # => true + # + # source://activemodel//lib/active_model/attributes.rb#59 + def attribute(name, *_arg1, **_arg2, &_arg3); end + + # Returns an array of attribute names as strings. + # + # class Person + # include ActiveModel::Attributes + # + # attribute :name, :string + # attribute :age, :integer + # end + # + # Person.attribute_names # => ["name", "age"] + # + # source://activemodel//lib/active_model/attributes.rb#74 + def attribute_names; end + + private + + # source://activemodel//lib/active_model/attributes.rb#92 + def define_method_attribute=(canonical_name, owner:, as: T.unsafe(nil)); end +end + +# +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#179 +class ActiveModel::BlockValidator < ::ActiveModel::EachValidator + # @return [BlockValidator] a new instance of BlockValidator + # + # source://activemodel//lib/active_model/validator.rb#180 + def initialize(options, &block); end + + private + + # source://activemodel//lib/active_model/validator.rb#186 + 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: Defining 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 :initialize, only: :after + # + # Note, the only: hash will apply to all callbacks defined + # on that method call. To get around this you can call the +define_model_callbacks+ + # 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 + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods + + # Returns an Array of all key attributes if any of the attributes is set, whether or not + # 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#67 + 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#49 + 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#90 + 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#103 + def to_partial_path; end + + module GeneratedClassMethods + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def param_delimiter=(value); end + end +end + +# source://activemodel//lib/active_model/conversion.rb#107 +module ActiveModel::Conversion::ClassMethods + # Provide a class level cache for #to_partial_path. This is an + # internal method and should not be accessed directly. + # + # source://activemodel//lib/active_model/conversion.rb#110 + 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 *_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 +# {*_will_change!}[rdoc-label:method-i-2A_will_change-21] to mark that the attribute is changing. +# Otherwise \Active \Model can't track changes to in-place attributes. Note +# that Active Record can detect in-place modifications automatically. You do +# not need to call *_will_change! on Active Record models. +# +# person.name_will_change! +# person.name_change # => ["Bill", "Bill"] +# person.name << 'y' +# person.name_change # => ["Bill", "Billy"] +# +# Methods can be invoked as +name_changed?+ or by passing an argument to the +# generic method attribute_changed?("name"). +# +# source://activemodel//lib/active_model/dirty.rb#123 +module ActiveModel::Dirty + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveModel::AttributeMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods + + # source://activemodel//lib/active_model/dirty.rb#258 + def as_json(options = T.unsafe(nil)); end + + # Dispatch target for {*_changed?}[rdoc-label:method-i-2A_changed-3F] attribute methods. + # + # @return [Boolean] + # + # source://activemodel//lib/active_model/dirty.rb#294 + def attribute_changed?(attr_name, **options); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/dirty.rb#361 + def attribute_changed_in_place?(attr_name); end + + # Dispatch target for {*_previously_changed?}[rdoc-label:method-i-2A_previously_changed-3F] attribute methods. + # + # @return [Boolean] + # + # source://activemodel//lib/active_model/dirty.rb#304 + def attribute_previously_changed?(attr_name, **options); end + + # Dispatch target for {*_previously_was}[rdoc-label:method-i-2A_previously_was] attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#309 + def attribute_previously_was(attr_name); end + + # Dispatch target for {*_was}[rdoc-label:method-i-2A_was] attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#299 + 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#289 + 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#280 + 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#337 + 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#347 + 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#266 + def changes_applied; end + + # source://activemodel//lib/active_model/dirty.rb#325 + def clear_attribute_changes(attr_names); end + + # Clears all dirty data: current changes and previous changes. + # + # source://activemodel//lib/active_model/dirty.rb#319 + 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#357 + def previous_changes; end + + # Restore all previous data of the provided attributes. + # + # source://activemodel//lib/active_model/dirty.rb#314 + def restore_attributes(attr_names = T.unsafe(nil)); end + + private + + # Dispatch target for *_change attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#393 + def attribute_change(attr_name); end + + # Dispatch target for *_previous_change attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#398 + def attribute_previous_change(attr_name); end + + # Dispatch target for *_will_change! attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#403 + def attribute_will_change!(attr_name); end + + # source://activemodel//lib/active_model/dirty.rb#372 + def clear_attribute_change(attr_name); end + + # source://activemodel//lib/active_model/dirty.rb#384 + def forget_attribute_assignments; end + + # source://activemodel//lib/active_model/dirty.rb#366 + def init_internals; end + + # source://activemodel//lib/active_model/dirty.rb#248 + def initialize_dup(other); end + + # source://activemodel//lib/active_model/dirty.rb#388 + def mutations_before_last_save; end + + # source://activemodel//lib/active_model/dirty.rb#376 + def mutations_from_database; end + + # Dispatch target for restore_*! attribute methods. + # + # source://activemodel//lib/active_model/dirty.rb#408 + def restore_attribute!(attr_name); end + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + end + + module GeneratedInstanceMethods + def attribute_aliases; end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns?; end + end +end + +# = Active \Model \EachValidator +# +# +EachValidator+ is a validator which iterates through the attributes given +# in the options hash invoking the validate_each method passing in the +# record, attribute, and value. +# +# All \Active \Model validations are built on top of this validator. +# +# source://activemodel//lib/active_model/validator.rb#134 +class ActiveModel::EachValidator < ::ActiveModel::Validator + # Returns a new validator instance. All options will be available via the + # +options+ reader, however the :attributes option will be removed + # 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#140 + def initialize(options); end + + # Returns the value of attribute attributes. + # + # source://activemodel//lib/active_model/validator.rb#135 + def attributes; end + + # Hook method that gets called by the initializer allowing verification + # that the arguments supplied are valid. You could for example raise an + # +ArgumentError+ when invalid options are supplied. + # + # source://activemodel//lib/active_model/validator.rb#168 + def check_validity!; end + + # Performs validation on the supplied record. By default this will call + # +validate_each+ to determine validity therefore subclasses should + # override +validate_each+ with validation logic. + # + # source://activemodel//lib/active_model/validator.rb#150 + 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#161 + def validate_each(record, attribute, value); end + + private + + # source://activemodel//lib/active_model/validator.rb#172 + 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#190 + 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#149 + 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#149 + def details; end + + # source://activemodel//lib/active_model/error.rb#190 + 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#159 + def full_message; end + + # source://activemodel//lib/active_model/error.rb#195 + 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#199 + 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#166 + 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#135 + def message; end + + # The options provided when calling errors#add + # + # source://activemodel//lib/active_model/error.rb#128 + def options; end + + # The raw value provided as the second parameter when calling + # errors#add + # + # source://activemodel//lib/active_model/error.rb#126 + 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#184 + 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#204 + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def i18n_customize_full_message; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def i18n_customize_full_message=(new_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#61 +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#117 + 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#229 + 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#342 + 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#372 + def added?(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a Hash that can be used as the JSON representation for this + # object. You can pass the :full_messages option. This determines + # if the JSON object should contain full messages or not (false by default). + # + # 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#247 + 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#237 + def attribute_names; end + + # source://forwardable/1.3.3/forwardable.rb#231 + 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#138 + 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#215 + def delete(attribute, type = T.unsafe(nil), **options); end + + # Returns a Hash of attributes with an array of their error details. + # + # source://activemodel//lib/active_model/errors.rb#276 + def details; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def empty?(*args, **_arg1, &block); end + + # The actual array of +Error+ objects + # This method is aliased to objects. + # + # source://activemodel//lib/active_model/errors.rb#107 + def errors; end + + # Returns a full message for a given attribute. + # + # person.errors.full_message(:name, 'is invalid') # => "Name is invalid" + # + # source://activemodel//lib/active_model/errors.rb#451 + 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#415 + 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#430 + 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#479 + def generate_message(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a Hash of attributes with an array of their Error objects. + # + # person.errors.group_by_attribute + # # => {:name=>[<#ActiveModel::Error>, <#ActiveModel::Error>]} + # + # source://activemodel//lib/active_model/errors.rb#289 + def group_by_attribute; end + + # Returns +true+ if the error messages include an error for the given key + # +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#202 + 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#154 + 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#202 + def include?(attribute); end + + # source://activemodel//lib/active_model/errors.rb#483 + 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#202 + 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#174 + def merge!(other); end + + # Returns a Hash of attributes with an array of their error messages. + # + # source://activemodel//lib/active_model/errors.rb#268 + 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#444 + def messages_for(attribute); end + + # The actual array of +Error+ objects + # This method is aliased to objects. + # + # source://activemodel//lib/active_model/errors.rb#107 + def objects; end + + # Returns +true+ if an error on the attribute with the given type is + # present, or +false+ otherwise. +type+ is treated the same as for +add+. + # + # person.errors.add :age + # person.errors.add :name, :too_long, count: 25 + # person.errors.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#395 + def of_kind?(attribute, type = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + 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#415 + 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#256 + def to_hash(full_messages = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + 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#189 + def where(attribute, type = T.unsafe(nil), **options); end + + private + + # source://activemodel//lib/active_model/errors.rb#122 + def initialize_dup(other); end + + # source://activemodel//lib/active_model/errors.rb#490 + def normalize_arguments(attribute, type, **options); end +end + +# source://activemodel//lib/active_model/errors.rb#265 +ActiveModel::Errors::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# = Active \Model \ForbiddenAttributesError +# +# Raised when forbidden attributes are used for mass assignment. +# +# class Person < ActiveRecord::Base +# 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#18 +class ActiveModel::ForbiddenAttributesError < ::StandardError; end + +# source://activemodel//lib/active_model/forbidden_attributes_protection.rb#21 +module ActiveModel::ForbiddenAttributesProtection + private + + # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#23 + def sanitize_for_mass_assignment(attributes); end + + # source://activemodel//lib/active_model/forbidden_attributes_protection.rb#23 + def sanitize_forbidden_attributes(attributes); end +end + +# source://activemodel//lib/active_model/attribute_mutation_tracker.rb#91 +class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTracker + # @return [ForcedMutationTracker] a new instance of ForcedMutationTracker + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#92 + def initialize(attributes); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#101 + def change_to_attribute(attr_name); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#97 + def changed_in_place?(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#125 + def finalize_changes; end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#121 + def force_change(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#109 + def forget_change(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#113 + def original_value(attr_name); end + + private + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#132 + def attr_names; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#136 + def attribute_changed?(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#144 + def clone_value(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#140 + def fetch_value(attr_name); end + + # Returns the value of attribute finalized_changes. + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#130 + def finalized_changes; end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#151 + def type_cast(attr_name, value); 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.first +# user.pets.select(:id).first.user_id +# # => ActiveModel::MissingAttributeError: missing attribute 'user_id' for Pet +# +# source://activemodel//lib/active_model/attribute_methods.rb#15 +class ActiveModel::MissingAttributeError < ::NoMethodError; end + +# = Active \Model \Basic \Model +# +# 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 + include ::ActiveModel::Access + 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 _validators; end + def _validators=(value); end + def _validators?; end + def param_delimiter; end + def param_delimiter=(value); end + def param_delimiter?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def _validators; end + def _validators?; end + def param_delimiter=(value); 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#209 + def uncountable?; end + + private + + # source://activemodel//lib/active_model/naming.rb#216 + def _singularize(string); end + + # source://activemodel//lib/active_model/naming.rb#220 + def i18n_keys; end + + # source://activemodel//lib/active_model/naming.rb#228 + def i18n_scope; end +end + +# source://activemodel//lib/active_model/naming.rb#214 +ActiveModel::Name::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) + +# = Active \Model \Naming +# +# Creates a +model_name+ method on your object. +# +# 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#252 +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#270 + def model_name; end + + private + + # source://activemodel//lib/active_model/naming.rb#352 + def inherited(base); end + + class << self + # source://activemodel//lib/active_model/naming.rb#253 + 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#338 + 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#283 + 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#326 + 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#291 + 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#311 + 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#299 + def uncountable?(record_or_class); end + + private + + # source://activemodel//lib/active_model/naming.rb#342 + 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.3/forwardable.rb#231 + def message(*args, **_arg1, &block); end +end + +# source://activemodel//lib/active_model/attribute_mutation_tracker.rb#156 +class ActiveModel::NullMutationTracker + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#174 + def any_changes?; end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#171 + def change_to_attribute(attr_name); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#178 + def changed?(attr_name, **_arg1); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#159 + def changed_attribute_names; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#182 + def changed_in_place?(attr_name); end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#163 + def changed_values; end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#167 + def changes; end + + # source://activemodel//lib/active_model/attribute_mutation_tracker.rb#186 + def original_value(attr_name); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://activemodel//lib/active_model/railtie.rb#7 +class ActiveModel::Railtie < ::Rails::Railtie; end + +# = Active \Model \RangeError +# +# Raised when attribute values are out of range. +# +# source://activemodel//lib/active_model/errors.rb#523 +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. + # + # Additionally, a +XXX_challenge+ attribute is created. When set to a + # value other than +nil+, it will validate against the currently persisted + # password. This validation relies on dirty tracking, as provided by + # ActiveModel::Dirty; if dirty tracking methods are not defined, this + # validation will fail. + # + # All of the above validations can be omitted by passing + # validations: false as an argument. This allows complete + # customizability of validation behavior. + # + # Finally, a password reset token that's valid for 15 minutes after issue + # is automatically configured when +reset_token+ is set to true (which it is by default) + # and the object reponds to +generates_token_for+ (which Active Records do). + # + # To use +has_secure_password+, add bcrypt (~> 3.1.7) to your Gemfile: + # + # 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.new(name: "david", password: "", password_confirmation: "nomatch") + # + # user.save # => false, password required + # user.password = "vr00m" + # user.save # => false, confirmation doesn't match + # user.password_confirmation = "vr00m" + # user.save # => true + # + # user.authenticate("notright") # => false + # user.authenticate("vr00m") # => user + # User.find_by(name: "david")&.authenticate("notright") # => false + # User.find_by(name: "david")&.authenticate("vr00m") # => user + # + # user.recovery_password = "42password" + # user.recovery_password_digest # => "$2a$04$iOfhwahFymCs5weB3BNH/uXkTG65HR.qpW.bNhEjFP3ftli3o5DQC" + # user.save # => true + # + # user.authenticate_recovery_password("42password") # => user + # + # user.update(password: "pwn3d", password_challenge: "") # => false, challenge doesn't authenticate + # user.update(password: "nohack4u", password_challenge: "vr00m") # => true + # + # user.authenticate("vr00m") # => false, old password + # user.authenticate("nohack4u") # => user + # + # ===== Conditionally requiring a password + # + # 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 + # + # ===== Using the password reset token + # + # user = User.create!(name: "david", password: "123", password_confirmation: "123") + # token = user.password_reset_token + # User.find_by_password_reset_token(token) # returns user + # + # # 16 minutes later... + # User.find_by_password_reset_token(token) # returns nil + # + # # raises ActiveSupport::MessageVerifier::InvalidSignature since the token is expired + # User.find_by_password_reset_token!(token) + # + # source://activemodel//lib/active_model/secure_password.rb#116 + def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil), reset_token: T.unsafe(nil)); end +end + +# source://activemodel//lib/active_model/secure_password.rb#182 +class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module + # @return [InstanceMethodsOnActivation] a new instance of InstanceMethodsOnActivation + # + # source://activemodel//lib/active_model/secure_password.rb#183 + def initialize(attribute, reset_token:); 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, override +# the +read_attribute_for_serialization+ method. +# +# 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.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#170 + 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#68 +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.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.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.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.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 + +# = Active \Model \StrictValidationFailed +# +# 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#517 +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#48 + 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#28 + 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#36 + def lookup_ancestors; end + + class << self + # source://activemodel//lib/active_model/translation.rb#25 + def raise_on_missing_translations; end + + # source://activemodel//lib/active_model/translation.rb#25 + def raise_on_missing_translations=(_arg0); end + end +end + +# source://activemodel//lib/active_model/translation.rb#40 +ActiveModel::Translation::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) + +# source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#4 +module ActiveModel::Type + class << self + # source://activemodel//lib/active_model/type.rb#38 + def default_value; end + + # source://activemodel//lib/active_model/type.rb#34 + def lookup(*_arg0, **_arg1, &_arg2); end + + # Add a new type to the registry, allowing it to be referenced as a + # symbol by {attribute}[rdoc-ref:Attributes::ClassMethods#attribute]. + # + # source://activemodel//lib/active_model/type.rb#30 + def register(type_name, klass = T.unsafe(nil), &block); end + + # source://activemodel//lib/active_model/type.rb#26 + def registry; end + + # source://activemodel//lib/active_model/type.rb#26 + def registry=(_arg0); end + end +end + +# = Active Model \BigInteger \Type +# +# Attribute type for integers that can be serialized to an unlimited number +# of bytes. This type is registered under the +:big_integer+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :id, :big_integer +# end +# +# person = Person.new +# person.id = "18_000_000_000" +# +# person.id # => 18000000000 +# +# All casting and serialization are performed in the same way as the +# standard ActiveModel::Type::Integer type. +# +# source://activemodel//lib/active_model/type/big_integer.rb#25 +class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer + # source://activemodel//lib/active_model/type/big_integer.rb#26 + def serialize_cast_value(value); end + + private + + # source://activemodel//lib/active_model/type/big_integer.rb#31 + def max_value; end +end + +# = Active Model \Binary \Type +# +# Attribute type for representation of binary data. This type is registered +# under the +:binary+ key. +# +# Non-string values are coerced to strings using their +to_s+ method. +# +# source://activemodel//lib/active_model/type/binary.rb#11 +class ActiveModel::Type::Binary < ::ActiveModel::Type::Value + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/binary.rb#16 + def binary?; end + + # source://activemodel//lib/active_model/type/binary.rb#20 + def cast(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/binary.rb#35 + def changed_in_place?(raw_old_value, value); end + + # source://activemodel//lib/active_model/type/binary.rb#30 + def serialize(value); end + + # source://activemodel//lib/active_model/type/binary.rb#12 + def type; end +end + +# source://activemodel//lib/active_model/type/binary.rb#40 +class ActiveModel::Type::Binary::Data + # @return [Data] a new instance of Data + # + # source://activemodel//lib/active_model/type/binary.rb#41 + def initialize(value); end + + # source://activemodel//lib/active_model/type/binary.rb#56 + def ==(other); end + + # source://activemodel//lib/active_model/type/binary.rb#52 + def hex; end + + # source://activemodel//lib/active_model/type/binary.rb#47 + def to_s; end + + # source://activemodel//lib/active_model/type/binary.rb#47 + def to_str; end +end + +# = Active Model \Boolean \Type +# +# A class that behaves like a boolean type, including rules for coercion of +# user input. +# +# - "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#14 +class ActiveModel::Type::Boolean < ::ActiveModel::Type::Value + # source://activemodel//lib/active_model/type/boolean.rb#30 + def serialize(value); end + + # source://activemodel//lib/active_model/type/boolean.rb#34 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/boolean.rb#26 + def type; end + + private + + # source://activemodel//lib/active_model/type/boolean.rb#39 + def cast_value(value); end +end + +# source://activemodel//lib/active_model/type/boolean.rb#15 +ActiveModel::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Set) + +# = Active Model \Date \Type +# +# Attribute type for date representation. It is registered under the +# +:date+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :birthday, :date +# end +# +# person = Person.new +# person.birthday = "1989-07-13" +# +# person.birthday.class # => Date +# person.birthday.year # => 1989 +# person.birthday.month # => 7 +# person.birthday.day # => 13 +# +# String values are parsed using the ISO 8601 date format. Any other values +# are cast using their +to_date+ method, if it exists. +# +# source://activemodel//lib/active_model/type/date.rb#26 +class ActiveModel::Type::Date < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Timezone + include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + + # source://activemodel//lib/active_model/type/date.rb#30 + def type; end + + # source://activemodel//lib/active_model/type/date.rb#34 + def type_cast_for_schema(value); end + + private + + # source://activemodel//lib/active_model/type/date.rb#39 + def cast_value(value); end + + # source://activemodel//lib/active_model/type/date.rb#57 + def fallback_string_to_date(string); end + + # source://activemodel//lib/active_model/type/date.rb#51 + def fast_string_to_date(string); end + + # source://activemodel//lib/active_model/type/date.rb#66 + def new_date(year, mon, mday); end + + # source://activemodel//lib/active_model/type/date.rb#72 + def value_from_multiparameter_assignment(*_arg0); end +end + +# source://activemodel//lib/active_model/type/date.rb#50 +ActiveModel::Type::Date::ISO_DATE = T.let(T.unsafe(nil), Regexp) + +# = Active Model \DateTime \Type +# +# Attribute type to represent dates and times. It is registered under the +# +:datetime+ key. +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :datetime +# end +# +# event = Event.new +# event.start = "Wed, 04 Sep 2013 03:00:00 EAT" +# +# event.start.class # => Time +# event.start.year # => 2013 +# event.start.month # => 9 +# event.start.day # => 4 +# event.start.hour # => 3 +# event.start.min # => 0 +# event.start.sec # => 0 +# event.start.zone # => "EAT" +# +# String values are parsed using the ISO 8601 datetime format. Partial +# time-only formats are also accepted. +# +# event.start = "06:07:08+09:00" +# event.start.utc # => 1999-12-31 21:07:08 UTC +# +# The degree of sub-second precision can be customized when declaring an +# attribute: +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :datetime, precision: 4 +# end +# +# source://activemodel//lib/active_model/type/date_time.rb#42 +class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Timezone + include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + include ::ActiveModel::Type::Helpers::TimeValue + + # source://activemodel//lib/active_model/type/date_time.rb#49 + def type; end + + private + + # source://activemodel//lib/active_model/type/date_time.rb#54 + def cast_value(value); end + + # source://activemodel//lib/active_model/type/date_time.rb#67 + def fallback_string_to_time(string); end + + # '0.123456' -> 123456 + # '1.123456' -> 123456 + # + # source://activemodel//lib/active_model/type/date_time.rb#63 + def microseconds(time); end + + # source://activemodel//lib/active_model/type/date_time.rb#79 + def value_from_multiparameter_assignment(values_hash); end +end + +# = Active Model \Decimal \Type +# +# Attribute type for decimal, high-precision floating point numeric +# representation. It is registered under the +:decimal+ key. +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :decimal +# end +# +# Numeric instances are converted to BigDecimal instances. Any other objects +# are cast using their +to_d+ method, except for blank strings, which are +# cast to +nil+. If a +to_d+ method is not defined, the object is converted +# to a string using +to_s+, which is then cast using +to_d+. +# +# bag = BagOfCoffee.new +# +# bag.weight = 0.01 +# bag.weight # => 0.1e-1 +# +# bag.weight = "0.01" +# bag.weight # => 0.1e-1 +# +# bag.weight = "" +# bag.weight # => nil +# +# bag.weight = :arbitrary +# bag.weight # => nil (the result of `.to_s.to_d`) +# +# Decimal precision defaults to 18, and can be customized when declaring an +# attribute: +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :decimal, precision: 24 +# end +# +# source://activemodel//lib/active_model/type/decimal.rb#45 +class ActiveModel::Type::Decimal < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Numeric + + # source://activemodel//lib/active_model/type/decimal.rb#49 + def type; end + + # source://activemodel//lib/active_model/type/decimal.rb#53 + def type_cast_for_schema(value); end + + private + + # source://activemodel//lib/active_model/type/decimal.rb#98 + def apply_scale(value); end + + # source://activemodel//lib/active_model/type/decimal.rb#58 + def cast_value(value); end + + # source://activemodel//lib/active_model/type/decimal.rb#82 + def convert_float_to_big_decimal(value); end + + # source://activemodel//lib/active_model/type/decimal.rb#90 + def float_precision; end +end + +# source://activemodel//lib/active_model/type/decimal.rb#47 +ActiveModel::Type::Decimal::BIGDECIMAL_PRECISION = T.let(T.unsafe(nil), Integer) + +# = Active Model \Float \Type +# +# Attribute type for floating point numeric values. It is registered under +# the +:float+ key. +# +# class BagOfCoffee +# include ActiveModel::Attributes +# +# attribute :weight, :float +# end +# +# Values are cast using their +to_f+ method, except for the following +# strings: +# +# - Blank strings are cast to +nil+. +# - "Infinity" is cast to +Float::INFINITY+. +# - "-Infinity" is cast to -Float::INFINITY. +# - "NaN" is cast to +Float::NAN+. +# +# bag = BagOfCoffee.new +# +# bag.weight = "0.25" +# bag.weight # => 0.25 +# +# bag.weight = "" +# bag.weight # => nil +# +# bag.weight = "NaN" +# bag.weight # => Float::NAN +# +# source://activemodel//lib/active_model/type/float.rb#36 +class ActiveModel::Type::Float < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Numeric + + # source://activemodel//lib/active_model/type/float.rb#39 + def type; end + + # source://activemodel//lib/active_model/type/float.rb#43 + def type_cast_for_schema(value); end + + private + + # source://activemodel//lib/active_model/type/float.rb#53 + 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#37 + def initialize(defaults: T.unsafe(nil)); end +end + +# source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#7 +module ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#24 + def assert_valid_value(value); end + + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#16 + def cast(value); end + + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#8 + def serialize(value); end + + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#12 + def serialize_cast_value(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/accepts_multiparameter_time.rb#32 + def value_constructed_by_mass_assignment?(value); end +end + +# source://activemodel//lib/active_model/type/helpers/mutable.rb#6 +module ActiveModel::Type::Helpers::Mutable + # source://activemodel//lib/active_model/type/helpers/mutable.rb#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 + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/mutable.rb#18 + def mutable?; end +end + +# source://activemodel//lib/active_model/type/helpers/numeric.rb#6 +module ActiveModel::Type::Helpers::Numeric + # source://activemodel//lib/active_model/type/helpers/numeric.rb#15 + def cast(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/numeric.rb#31 + def changed?(old_value, _new_value, new_value_before_type_cast); end + + # source://activemodel//lib/active_model/type/helpers/numeric.rb#7 + def serialize(value); end + + # source://activemodel//lib/active_model/type/helpers/numeric.rb#11 + def serialize_cast_value(value); end + + private + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/numeric.rb#37 + def equal_nan?(old_value, new_value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/numeric.rb#49 + def non_numeric_string?(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/numeric.rb#44 + def number_to_non_number?(old_value, new_value_before_type_cast); end +end + +# source://activemodel//lib/active_model/type/helpers/numeric.rb#56 +ActiveModel::Type::Helpers::Numeric::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activemodel//lib/active_model/type/helpers/time_value.rb#9 +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_cast_value(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 + + # BUG: Wrapping the Time object with Time.at because Time.new with `in:` in Ruby 3.2.0 + # used to return an invalid Time object + # see: https://bugs.ruby-lang.org/issues/19292 + # + # source://activemodel//lib/active_model/type/helpers/time_value.rb#88 + 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#17 + def default_timezone; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/helpers/timezone.rb#9 + def is_utc?; end +end + +# = Active Model \ImmutableString \Type +# +# Attribute type to represent immutable strings. It casts incoming values to +# frozen strings. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :name, :immutable_string +# end +# +# person = Person.new +# person.name = 1 +# +# person.name # => "1" +# person.name.frozen? # => true +# +# Values are coerced to strings using their +to_s+ method. Boolean values +# are treated differently, however: +true+ will be cast to "t" and +# +false+ will be cast to "f". These strings can be customized when +# declaring an attribute: +# +# class Person +# include ActiveModel::Attributes +# +# attribute :active, :immutable_string, true: "aye", false: "nay" +# end +# +# person = Person.new +# person.active = true +# +# person.active # => "aye" +# +# source://activemodel//lib/active_model/type/immutable_string.rb#37 +class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value + # @return [ImmutableString] a new instance of ImmutableString + # + # source://activemodel//lib/active_model/type/immutable_string.rb#38 + def initialize(**args); end + + # source://activemodel//lib/active_model/type/immutable_string.rb#48 + def serialize(value); end + + # source://activemodel//lib/active_model/type/immutable_string.rb#57 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/immutable_string.rb#44 + def type; end + + private + + # source://activemodel//lib/active_model/type/immutable_string.rb#62 + def cast_value(value); end +end + +# = Active Model \Integer \Type +# +# Attribute type for integer representation. This type is registered under +# the +:integer+ key. +# +# class Person +# include ActiveModel::Attributes +# +# attribute :age, :integer +# end +# +# Values are cast using their +to_i+ method, except for blank strings, which +# are cast to +nil+. If a +to_i+ method is not defined or raises an error, +# the value will be cast to +nil+. +# +# person = Person.new +# +# person.age = "18" +# person.age # => 18 +# +# person.age = "" +# person.age # => nil +# +# person.age = :not_an_integer +# person.age # => nil (because Symbol does not define #to_i) +# +# Serialization also works under the same principle. Non-numeric strings are +# serialized as +nil+, for example. +# +# Serialization also validates that the integer can be stored using a +# limited number of bytes. If it cannot, an ActiveModel::RangeError will be +# raised. The default limit is 4 bytes, and can be customized when declaring +# an attribute: +# +# class Person +# include ActiveModel::Attributes +# +# attribute :age, :integer, limit: 6 +# end +# +# source://activemodel//lib/active_model/type/integer.rb#44 +class ActiveModel::Type::Integer < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Numeric + + # @return [Integer] a new instance of Integer + # + # source://activemodel//lib/active_model/type/integer.rb#51 + def initialize(**_arg0); end + + # source://activemodel//lib/active_model/type/integer.rb#60 + def deserialize(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/integer.rb#74 + def serializable?(value); end + + # source://activemodel//lib/active_model/type/integer.rb#65 + def serialize(value); end + + # source://activemodel//lib/active_model/type/integer.rb#70 + def serialize_cast_value(value); end + + # source://activemodel//lib/active_model/type/integer.rb#56 + def type; end + + private + + # source://activemodel//lib/active_model/type/integer.rb#108 + def _limit; end + + # source://activemodel//lib/active_model/type/integer.rb#89 + def cast_value(value); end + + # source://activemodel//lib/active_model/type/integer.rb#93 + def ensure_in_range(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/integer.rb#85 + def in_range?(value); end + + # source://activemodel//lib/active_model/type/integer.rb#100 + def max_value; end + + # source://activemodel//lib/active_model/type/integer.rb#104 + def min_value; end + + # Returns the value of attribute range. + # + # source://activemodel//lib/active_model/type/integer.rb#83 + def range; end +end + +# Column storage size in bytes. +# 4 bytes means an integer as opposed to smallint etc. +# +# source://activemodel//lib/active_model/type/integer.rb#49 +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, *_arg1, **_arg2, &_arg3); 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#34 + def registrations; end +end + +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#5 +module ActiveModel::Type::SerializeCastValue + extend ::ActiveSupport::Concern + include ::ActiveModel::Type::SerializeCastValue::DefaultImplementation + + mixes_in_class_methods ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#41 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#37 + def itself_if_serialize_cast_value_compatible; end + + class << self + # @private + # + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#21 + def included(klass); end + + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#25 + def serialize(type, value); end + end +end + +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#8 +module ActiveModel::Type::SerializeCastValue::ClassMethods + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#9 + def serialize_cast_value_compatible?; end +end + +# source://activemodel//lib/active_model/type/serialize_cast_value.rb#15 +module ActiveModel::Type::SerializeCastValue::DefaultImplementation + # source://activemodel//lib/active_model/type/serialize_cast_value.rb#16 + def serialize_cast_value(value); end +end + +# = Active Model \String \Type +# +# Attribute type for strings. It is registered under the +:string+ key. +# +# This class is a specialization of ActiveModel::Type::ImmutableString. It +# performs coercion in the same way, and can be configured in the same way. +# However, it accounts for mutable strings, so dirty tracking can properly +# check if a string has changed. +# +# source://activemodel//lib/active_model/type/string.rb#15 +class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/string.rb#16 + def changed_in_place?(raw_old_value, new_value); end + + # source://activemodel//lib/active_model/type/string.rb#22 + def to_immutable_string; end + + private + + # source://activemodel//lib/active_model/type/string.rb#33 + def cast_value(value); end +end + +# = Active Model \Time \Type +# +# Attribute type for time of day representation. It is registered under the +# +:time+ key. +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :time +# end +# +# String values are parsed using the ISO 8601 datetime format, but are +# normalized to have a date of 2000-01-01 and be in the UTC time zone. +# +# event = Event.new +# event.start = "2004-10-25T01:23:45-06:00" +# +# event.start.class # => Time +# event.start # => 2000-01-01 07:23:45 UTC +# +# Partial time-only formats are also accepted. +# +# event.start = "00:01:02+03:00" +# event.start # => 1999-12-31 21:01:02 UTC +# +# The degree of sub-second precision can be customized when declaring an +# attribute: +# +# class Event +# include ActiveModel::Attributes +# +# attribute :start, :time, precision: 4 +# end +# +# source://activemodel//lib/active_model/type/time.rb#38 +class ActiveModel::Type::Time < ::ActiveModel::Type::Value + include ::ActiveModel::Type::Helpers::Timezone + include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods + include ::ActiveModel::Type::Helpers::TimeValue + + # source://activemodel//lib/active_model/type/time.rb#45 + def type; end + + # source://activemodel//lib/active_model/type/time.rb#49 + def user_input_in_time_zone(value); end + + private + + # source://activemodel//lib/active_model/type/time.rb#69 + def cast_value(value); end +end + +# = Active Model \Value \Type +# +# The base class for all attribute types. This class also serves as the +# default type for attributes that do not specify a type. +# +# source://activemodel//lib/active_model/type/value.rb#9 +class ActiveModel::Type::Value + include ::ActiveModel::Type::SerializeCastValue + include ::ActiveModel::Type::SerializeCastValue::DefaultImplementation + extend ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # Initializes a type with three basic configuration settings: precision, + # limit, and scale. The Value base class does not define behavior for + # these settings. It uses them for equality comparison and hash key + # generation only. + # + # @return [Value] a new instance of Value + # + # source://activemodel//lib/active_model/type/value.rb#17 + def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end + + # source://activemodel//lib/active_model/type/value.rb#121 + def ==(other); end + + # @raise [NoMethodError] + # + # source://activemodel//lib/active_model/type/value.rb#144 + def as_json(*_arg0); end + + # source://activemodel//lib/active_model/type/value.rb#133 + def assert_valid_value(_); end + + # These predicates are not documented, as I need to look further into + # their use, and see if they can be removed entirely. + # + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#77 + def binary?; end + + # Type casts a value from user input (e.g. from a setter). This value may + # 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#57 + 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#84 + 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#105 + 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#43 + def deserialize(value); end + + # source://activemodel//lib/active_model/type/value.rb#121 + def eql?(other); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#113 + def force_equality?(_value); end + + # source://activemodel//lib/active_model/type/value.rb#129 + def hash; end + + # Returns the value of attribute limit. + # + # source://activemodel//lib/active_model/type/value.rb#11 + def limit; end + + # @yield [value] + # + # source://activemodel//lib/active_model/type/value.rb#117 + def map(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#140 + def mutable?; end + + # Returns the value of attribute precision. + # + # source://activemodel//lib/active_model/type/value.rb#11 + def precision; end + + # Returns the value of attribute scale. + # + # source://activemodel//lib/active_model/type/value.rb#11 + def scale; end + + # Returns true if this type can convert +value+ to a type that is usable + # 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#28 + 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#65 + def serialize(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#136 + def serialized?; end + + # Returns the unique type name as a Symbol. Subclasses should override + # this method. + # + # source://activemodel//lib/active_model/type/value.rb#34 + def type; end + + # Type casts a value for schema dumping. This method is private, as we are + # hoping to remove it entirely. + # + # source://activemodel//lib/active_model/type/value.rb#71 + def type_cast_for_schema(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/type/value.rb#109 + 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#152 + def cast_value(value); end +end + +# = Active \Model \UnknownAttributeError +# +# 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#538 +class ActiveModel::UnknownAttributeError < ::NoMethodError + # @return [UnknownAttributeError] a new instance of UnknownAttributeError + # + # source://activemodel//lib/active_model/errors.rb#541 + def initialize(record, attribute); end + + # Returns the value of attribute attribute. + # + # source://activemodel//lib/active_model/errors.rb#539 + def attribute; end + + # Returns the value of attribute record. + # + # source://activemodel//lib/active_model/errors.rb#539 + 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) + +# source://activemodel//lib/active_model/validations.rb#484 +class ActiveModel::ValidationContext + # Returns the value of attribute context. + # + # source://activemodel//lib/active_model/validations.rb#485 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://activemodel//lib/active_model/validations.rb#485 + def context=(_arg0); end +end + +# = 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#474 +class ActiveModel::ValidationError < ::StandardError + # @return [ValidationError] a new instance of ValidationError + # + # source://activemodel//lib/active_model/validations.rb#477 + def initialize(model); end + + # Returns the value of attribute model. + # + # source://activemodel//lib/active_model/validations.rb#475 + 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#309 + def errors; end + + # source://activemodel//lib/active_model/validations.rb#353 + def freeze; 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#389 + 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#342 + 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#342 + 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#398 + 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#144 + def validates_with(*args, &block); end + + # Returns the context when running validations. + # + # This is useful when running validations except a certain context (opposite to the +on+ option). + # + # class Person + # include ActiveModel::Validations + # + # attr_accessor :name + # validates :name, presence: true, if: -> { validation_context != :custom } + # end + # + # person = Person.new + # person.valid? #=> false + # person.valid?(:new) #=> false + # person.valid?(:custom) #=> true + # + # source://activemodel//lib/active_model/validations.rb#435 + def validation_context; end + + private + + # source://activemodel//lib/active_model/validations.rb#444 + def context_for_validation; end + + # source://activemodel//lib/active_model/validations.rb#448 + def init_internals; end + + # Clean the +Errors+ object if instance is duped. + # + # source://activemodel//lib/active_model/validations.rb#291 + def initialize_dup(other); end + + # @raise [ValidationError] + # + # source://activemodel//lib/active_model/validations.rb#459 + def raise_validation_error; end + + # source://activemodel//lib/active_model/validations.rb#454 + def run_validations!; end + + # source://activemodel//lib/active_model/validations.rb#440 + def validation_context=(context); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def _validators; end + def _validators=(value); end + def _validators?; end + end + + module GeneratedInstanceMethods + 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 ClassMethods#before_validation and +# ClassMethods#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#114 + def run_validations!; end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + 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#88 + 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#55 + def before_validation(*args, &block); end + + private + + # source://activemodel//lib/active_model/validations/callbacks.rb#99 + def set_options_for_callback(options); end +end + +# source://activemodel//lib/active_model/validations.rb#53 +module ActiveModel::Validations::ClassMethods + # Returns +true+ if +attribute+ is an attribute method, +false+ otherwise. + # + # class Person + # include ActiveModel::Validations + # + # attr_accessor :name + # end + # + # User.attribute_method?(:name) # => true + # User.attribute_method?(:age) # => false + # + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations.rb#263 + 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#227 + def clear_validators!; end + + # Copy validators on inheritance. + # + # source://activemodel//lib/active_model/validations.rb#268 + 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#150 + 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: { is: 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#83 + 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 + # + # There is no default error message for +validates_with+. You must + # manually add errors to the record's errors collection in the validator + # class. + # + # To implement the validate method, you must have a +record+ parameter + # defined, which is the record to be validated. + # + # Configuration options: + # * :on - Specifies the contexts where this validation is active. + # Runs in all validation contexts by default +nil+. You can pass a symbol + # 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#88 + 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#185 + 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#247 + 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 + + # source://activemodel//lib/active_model/validations.rb#277 + def predicate_for_validation_context(context); end +end + +# source://activemodel//lib/active_model/validations.rb#87 +ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array) + +# source://activemodel//lib/active_model/validations/clusivity.rb#8 +module ActiveModel::Validations::Clusivity + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/clusivity.rb#14 + def check_validity!; end + + private + + # source://activemodel//lib/active_model/validations/clusivity.rb#31 + def delimiter; end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/clusivity.rb#21 + def include?(record, value); end + + # After Ruby 2.2, Range#include? on non-number-or-time-ish ranges checks all + # 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#40 + def inclusion_method(enumerable); end +end + +# source://activemodel//lib/active_model/validations/clusivity.rb#11 +ActiveModel::Validations::Clusivity::ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://activemodel//lib/active_model/validations/comparability.rb#5 +module ActiveModel::Validations::Comparability + # source://activemodel//lib/active_model/validations/comparability.rb#10 + def error_options(value, option_value); end +end + +# source://activemodel//lib/active_model/validations/comparability.rb#6 +ActiveModel::Validations::Comparability::COMPARE_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activemodel//lib/active_model/validations/comparison.rb#8 +class ActiveModel::Validations::ComparisonValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::Comparability + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/comparison.rb#12 + def check_validity!; end + + # source://activemodel//lib/active_model/validations/comparison.rb#19 + 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::ResolveValue + include ::ActiveModel::Validations::Clusivity + + # source://activemodel//lib/active_model/validations/exclusion.rb#10 + def validate_each(record, attribute, value); end +end + +# source://activemodel//lib/active_model/validations/format.rb#7 +class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/format.rb#20 + def check_validity!; end + + # source://activemodel//lib/active_model/validations/format.rb#10 + def validate_each(record, attribute, value); end + + private + + # source://activemodel//lib/active_model/validations/format.rb#34 + def check_options_validity(name); end + + # source://activemodel//lib/active_model/validations/format.rb#30 + def record_error(record, attribute, name, value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/format.rb#48 + def regexp_using_multiline_anchors?(regexp); end +end + +# source://activemodel//lib/active_model/validations/absence.rb#12 +module ActiveModel::Validations::HelperMethods + # Validates that the specified attributes are blank (as defined by + # Object#present?). + # + # 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+. + # + # 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. The default error message for this option is _"must be + # greater than %{count}"_. + # * :greater_than_or_equal_to - Specifies the value must be + # greater than or equal to the supplied value. The default error message + # for this option is _"must be greater than or equal to %{count}"_. + # * :equal_to - Specifies the value must be equal to the supplied + # value. The default error message for this option is _"must be equal to + # %{count}"_. + # * :less_than - Specifies the value must be less than the + # supplied value. The default error message for this option is _"must be + # less than %{count}"_. + # * :less_than_or_equal_to - Specifies the value must be less + # than or equal to the supplied value. The default error message for + # this option is _"must be less than or equal to %{count}"_. + # * :other_than - Specifies the value must not be equal to the + # supplied value. The default error message for this option is _"must be + # other than %{count}"_. + # + # There is also a list of default options supported by every validator: + # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . + # 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#85 + 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#107 + 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#123 + def validates_length_of(*attr_names); end + + # Validates whether the value of the specified attribute is numeric by + # trying to convert it to a float with +Kernel.Float+ (if + # only_integer is +false+) or applying it to the regular + # expression /\A[\+\-]?\d+\z/ (if only_integer is set to + # +true+). Precision of +Kernel.Float+ values are guaranteed up to 15 + # digits. + # + # 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+). + # * :only_numeric - Specifies whether the value has to be an + # instance of Numeric (default is +false+). The default behavior is to + # attempt parsing the value if it is a String. + # * :allow_nil - Skip validation if attribute is +nil+ (default is + # +false+). Notice that for Integer and Float columns empty strings are + # converted to +nil+. + # * :greater_than - Specifies the value must be greater than the + # supplied value. The default error message for this option is _"must be + # greater than %{count}"_. + # * :greater_than_or_equal_to - Specifies the value must be + # greater than or equal the supplied value. The default error message + # for this option is _"must be greater than or equal to %{count}"_. + # * :equal_to - Specifies the value must be equal to the supplied + # value. The default error message for this option is _"must be equal to + # %{count}"_. + # * :less_than - Specifies the value must be less than the + # supplied value. The default error message for this option is _"must be + # less than %{count}"_. + # * :less_than_or_equal_to - Specifies the value must be less + # than or equal the supplied value. The default error message for this + # option is _"must be less than or equal to %{count}"_. + # * :other_than - Specifies the value must be other than the + # supplied value. The default error message for this option is _"must be + # other than %{count}"_. + # * :odd - Specifies the value must be an odd number. The default + # error message for this option is _"must be odd"_. + # * :even - Specifies the value must be an even number. The + # default error message for this option is _"must be even"_. + # * :in - Check that the value is within a range. The default + # error message for this option is _"must be in %{count}"_. + # + # There is also a list of default options supported by every validator: + # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . + # 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#217 + def validates_numericality_of(*attr_names); end + + # Validates that the specified attributes are not blank (as defined by + # Object#blank?). + # + # 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#123 + 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::ResolveValue + include ::ActiveModel::Validations::Clusivity + + # source://activemodel//lib/active_model/validations/inclusion.rb#10 + def validate_each(record, attribute, value); end +end + +# source://activemodel//lib/active_model/validations/length.rb#7 +class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::ResolveValue + + # @return [LengthValidator] a new instance of LengthValidator + # + # source://activemodel//lib/active_model/validations/length.rb#15 + def initialize(options); end + + # source://activemodel//lib/active_model/validations/length.rb#29 + def check_validity!; end + + # source://activemodel//lib/active_model/validations/length.rb#47 + def validate_each(record, attribute, value); end + + private + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/length.rb#69 + def skip_nil_check?(key); end +end + +# source://activemodel//lib/active_model/validations/length.rb#11 +ActiveModel::Validations::LengthValidator::CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activemodel//lib/active_model/validations/length.rb#10 +ActiveModel::Validations::LengthValidator::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://activemodel//lib/active_model/validations/length.rb#13 +ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://activemodel//lib/active_model/validations/numericality.rb#9 +class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValidator + include ::ActiveModel::Validations::Comparability + include ::ActiveModel::Validations::ResolveValue + + # source://activemodel//lib/active_model/validations/numericality.rb#22 + def check_validity!; end + + # source://activemodel//lib/active_model/validations/numericality.rb#36 + def validate_each(record, attr_name, value, precision: T.unsafe(nil), scale: T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/numericality.rb#118 + def allow_only_integer?(record); end + + # source://activemodel//lib/active_model/validations/numericality.rb#112 + def filtered_options(value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/numericality.rb#108 + def is_hexadecimal_literal?(raw_value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/numericality.rb#104 + def is_integer?(raw_value); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/numericality.rb#94 + def is_number?(raw_value, precision, scale); end + + # source://activemodel//lib/active_model/validations/numericality.rb#68 + def option_as_number(record, option_value, precision, scale); end + + # source://activemodel//lib/active_model/validations/numericality.rb#72 + def parse_as_number(raw_value, precision, scale); end + + # source://activemodel//lib/active_model/validations/numericality.rb#86 + def parse_float(raw_value, precision, scale); end + + # source://activemodel//lib/active_model/validations/numericality.rb#122 + def prepare_value_for_validation(value, record, attr_name); end + + # @return [Boolean] + # + # source://activemodel//lib/active_model/validations/numericality.rb#143 + def record_attribute_changed_in_place?(record, attr_name); end + + # source://activemodel//lib/active_model/validations/numericality.rb#90 + def round(raw_value, scale); end +end + +# source://activemodel//lib/active_model/validations/numericality.rb#20 +ActiveModel::Validations::NumericalityValidator::HEXADECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activemodel//lib/active_model/validations/numericality.rb#18 +ActiveModel::Validations::NumericalityValidator::INTEGER_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activemodel//lib/active_model/validations/numericality.rb#14 +ActiveModel::Validations::NumericalityValidator::NUMBER_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activemodel//lib/active_model/validations/numericality.rb#13 +ActiveModel::Validations::NumericalityValidator::RANGE_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activemodel//lib/active_model/validations/numericality.rb#16 +ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://activemodel//lib/active_model/validations/presence.rb#5 +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/resolve_value.rb#5 +module ActiveModel::Validations::ResolveValue + # source://activemodel//lib/active_model/validations/resolve_value.rb#6 + def resolve_value(record, value); end +end + +# source://activemodel//lib/active_model/validations/with.rb#7 +class ActiveModel::Validations::WithValidator < ::ActiveModel::EachValidator + # source://activemodel//lib/active_model/validations/with.rb#8 + def validate_each(record, attr, val); end +end + +# = Active \Model \Validator +# +# 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. +# +# 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/apps/govquests-api/rails_app/sorbet/rbi/gems/activerecord@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/activerecord@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..0f2bedb --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/activerecord@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,42829 @@ +# 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`. + + +# :include: ../README.rdoc +# +# source://activerecord//lib/active_record/gem_version.rb#3 +module ActiveRecord + include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor + extend ::ActiveSupport::Autoload + + class << self + # source://activerecord//lib/active_record.rb#392 + def action_on_strict_loading_violation; end + + # source://activerecord//lib/active_record.rb#392 + def action_on_strict_loading_violation=(_arg0); end + + # Registers a block to be called after all the current transactions have been + # committed. + # + # If there is no currently open transaction, the block is called immediately. + # + # If there are multiple nested transactions, the block is called after the outermost one + # has been committed, + # + # If any of the currently open transactions is rolled back, the block is never called. + # + # If multiple transactions are open across multiple databases, the block will be invoked + # if and once all of them have been committed. But note that nesting transactions across + # two distinct databases is a sharding anti-pattern that comes with a world of hurts. + # + # source://activerecord//lib/active_record.rb#572 + def after_all_transactions_commit(&block); end + + # source://activerecord//lib/active_record.rb#592 + def all_open_transactions; end + + # source://activerecord//lib/active_record.rb#462 + def allow_deprecated_singular_associations_name; end + + # source://activerecord//lib/active_record.rb#469 + def allow_deprecated_singular_associations_name=(value); end + + # source://activerecord//lib/active_record.rb#385 + def application_record_class; end + + # source://activerecord//lib/active_record.rb#385 + def application_record_class=(_arg0); end + + # source://activerecord//lib/active_record.rb#291 + def async_query_executor; end + + # source://activerecord//lib/active_record.rb#291 + def async_query_executor=(_arg0); end + + # source://activerecord//lib/active_record.rb#356 + def before_committed_on_all_records; end + + # source://activerecord//lib/active_record.rb#356 + def before_committed_on_all_records=(_arg0); end + + # source://activerecord//lib/active_record.rb#353 + def belongs_to_required_validates_foreign_key; end + + # source://activerecord//lib/active_record.rb#353 + def belongs_to_required_validates_foreign_key=(_arg0); end + + # source://activerecord//lib/active_record.rb#362 + def commit_transaction_on_non_local_return; end + + # source://activerecord//lib/active_record.rb#369 + def commit_transaction_on_non_local_return=(value); end + + # source://activerecord//lib/active_record.rb#211 + def database_cli; end + + # source://activerecord//lib/active_record.rb#211 + def database_cli=(_arg0); end + + # source://activerecord//lib/active_record.rb#233 + def db_warnings_action; end + + # source://activerecord//lib/active_record.rb#235 + def db_warnings_action=(action); end + + # source://activerecord//lib/active_record.rb#262 + def db_warnings_ignore; end + + # source://activerecord//lib/active_record.rb#262 + def db_warnings_ignore=(_arg0); end + + # source://activerecord//lib/active_record.rb#214 + 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#218 + def default_timezone=(default_timezone); end + + # source://activerecord//lib/active_record/deprecator.rb#4 + def deprecator; end + + # source://activerecord//lib/active_record.rb#182 + def disable_prepared_statements; end + + # source://activerecord//lib/active_record.rb#182 + def disable_prepared_statements=(_arg0); end + + # Explicitly closes all database connections in all pools. + # + # source://activerecord//lib/active_record.rb#555 + def disconnect_all!; end + + # source://activerecord//lib/active_record.rb#440 + def dump_schema_after_migration; end + + # source://activerecord//lib/active_record.rb#440 + def dump_schema_after_migration=(_arg0); end + + # source://activerecord//lib/active_record.rb#450 + def dump_schemas; end + + # source://activerecord//lib/active_record.rb#450 + def dump_schemas=(_arg0); end + + # source://activerecord//lib/active_record.rb#544 + def eager_load!; end + + # source://activerecord//lib/active_record.rb#411 + def error_on_ignored_order; end + + # source://activerecord//lib/active_record.rb#411 + 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#505 + def generate_secure_token_on; end + + # source://activerecord//lib/active_record.rb#505 + def generate_secure_token_on=(_arg0); end + + # source://activerecord//lib/active_record.rb#314 + 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#306 + def global_executor_concurrency=(global_executor_concurrency); end + + # source://activerecord//lib/active_record.rb#294 + def global_thread_pool_async_query_executor; end + + # source://activerecord//lib/active_record.rb#329 + def index_nested_attribute_errors; end + + # source://activerecord//lib/active_record.rb#329 + def index_nested_attribute_errors=(_arg0); end + + # source://activerecord//lib/active_record.rb#189 + def lazily_load_schema_cache; end + + # source://activerecord//lib/active_record.rb#189 + def lazily_load_schema_cache=(_arg0); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record.rb#271 + def legacy_connection_handling=(_); end + + # source://activerecord//lib/active_record.rb#347 + def maintain_test_schema; end + + # source://activerecord//lib/active_record.rb#347 + def maintain_test_schema=(_arg0); end + + # source://activerecord//lib/active_record.rb#508 + def marshalling_format_version; end + + # source://activerecord//lib/active_record.rb#512 + def marshalling_format_version=(value); end + + # source://activerecord//lib/active_record.rb#431 + def migration_strategy; end + + # source://activerecord//lib/active_record.rb#431 + def migration_strategy=(_arg0); end + + # source://activerecord//lib/active_record.rb#319 + def permanent_connection_checkout; end + + # Defines whether +ActiveRecord::Base.connection+ is allowed, deprecated, or entirely disallowed. + # + # source://activerecord//lib/active_record.rb#322 + def permanent_connection_checkout=(value); end + + # source://activerecord//lib/active_record.rb#535 + def protocol_adapters; end + + # source://activerecord//lib/active_record.rb#535 + def protocol_adapters=(_arg0); end + + # source://activerecord//lib/active_record.rb#476 + def query_transformers; end + + # source://activerecord//lib/active_record.rb#476 + def query_transformers=(_arg0); end + + # source://activerecord//lib/active_record.rb#344 + def queues; end + + # source://activerecord//lib/active_record.rb#344 + def queues=(_arg0); end + + # source://activerecord//lib/active_record.rb#491 + def raise_int_wider_than_64bit; end + + # source://activerecord//lib/active_record.rb#491 + def raise_int_wider_than_64bit=(_arg0); end + + # source://activerecord//lib/active_record.rb#350 + def raise_on_assign_to_attr_readonly; end + + # source://activerecord//lib/active_record.rb#350 + def raise_on_assign_to_attr_readonly=(_arg0); end + + # source://activerecord//lib/active_record.rb#268 + def reading_role; end + + # source://activerecord//lib/active_record.rb#268 + def reading_role=(_arg0); end + + # source://activerecord//lib/active_record.rb#359 + def run_after_transaction_callbacks_in_order_defined; end + + # source://activerecord//lib/active_record.rb#359 + def run_after_transaction_callbacks_in_order_defined=(_arg0); end + + # Checks to see if the +table_name+ is ignored by checking + # against the +schema_cache_ignored_tables+ option. + # + # ActiveRecord.schema_cache_ignored_table?(:developers) + # + # @return [Boolean] + # + # source://activerecord//lib/active_record.rb#205 + def schema_cache_ignored_table?(table_name); end + + # source://activerecord//lib/active_record.rb#197 + def schema_cache_ignored_tables; end + + # source://activerecord//lib/active_record.rb#197 + def schema_cache_ignored_tables=(_arg0); end + + # source://activerecord//lib/active_record.rb#403 + def schema_format; end + + # source://activerecord//lib/active_record.rb#403 + def schema_format=(_arg0); end + + # source://activerecord//lib/active_record.rb#417 + def timestamped_migrations; end + + # source://activerecord//lib/active_record.rb#417 + def timestamped_migrations=(_arg0); end + + # source://activerecord//lib/active_record.rb#483 + def use_yaml_unsafe_load; end + + # source://activerecord//lib/active_record.rb#483 + def use_yaml_unsafe_load=(_arg0); end + + # source://activerecord//lib/active_record.rb#425 + def validate_migration_timestamps; end + + # source://activerecord//lib/active_record.rb#425 + def validate_migration_timestamps=(_arg0); end + + # source://activerecord//lib/active_record.rb#337 + def verbose_query_logs; end + + # source://activerecord//lib/active_record.rb#337 + def verbose_query_logs=(_arg0); end + + # source://activerecord//lib/active_record.rb#459 + def verify_foreign_keys_for_fixtures; end + + # source://activerecord//lib/active_record.rb#459 + 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#382 + def warn_on_records_fetched_greater_than; end + + # source://activerecord//lib/active_record.rb#382 + def warn_on_records_fetched_greater_than=(_arg0); end + + # source://activerecord//lib/active_record.rb#265 + def writing_role; end + + # source://activerecord//lib/active_record.rb#265 + def writing_role=(_arg0); end + + # source://activerecord//lib/active_record.rb#498 + def yaml_column_permitted_classes; end + + # source://activerecord//lib/active_record.rb#498 + def yaml_column_permitted_classes=(_arg0); end + end +end + +# = Active Record Errors +# +# Generic Active Record exception class. +# +# source://activerecord//lib/active_record/errors.rb#11 +class ActiveRecord::ActiveRecordError < ::StandardError; end + +# Superclass for all errors raised from an Active Record adapter. +# +# source://activerecord//lib/active_record/errors.rb#55 +class ActiveRecord::AdapterError < ::ActiveRecord::ActiveRecordError + # @return [AdapterError] a new instance of AdapterError + # + # source://activerecord//lib/active_record/errors.rb#56 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # Returns the value of attribute connection_pool. + # + # source://activerecord//lib/active_record/errors.rb#61 + def connection_pool; end +end + +# Raised when Active Record cannot find database adapter specified in +# +config/database.yml+ or programmatically. +# +# source://activerecord//lib/active_record/errors.rb#51 +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#577 +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 \Aggregations +# +# Active Record implements aggregation through a macro-like class method called #composed_of +# for representing attributes as value objects. It expresses relationships like "Account [is] +# composed of Money [among other things]" or "Person [is] composed of [an] address". Each call +# 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: { balance: :amount } +# composed_of :address, mapping: { address_street: :street, address_city: :city } +# end +# +# The customer class now has the following methods to manipulate the value objects: +# * 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: { network_address: :network, cidr_range: :bits }, +# allow_nil: true, +# constructor: Proc.new { |network_address, cidr_range| NetAddr::CIDR.create("#{network_address}/#{cidr_range}") }, +# converter: Proc.new { |value| NetAddr::CIDR.create(value.is_a?(Array) ? value.join('/') : value) } +# 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#183 +module ActiveRecord::Aggregations::ClassMethods + # Adds reader and writer methods for manipulating a value object: + # composed_of :address adds address and address=(new_address) methods. + # + # 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 a key-value pair where the key is the name of the + # entity attribute and the value is the name of the attribute in the value object. The + # order in which mappings are defined determines the order in which attributes are sent to the + # value class constructor. The mapping can be written as a hash or as an array of pairs. + # * :allow_nil - Specifies that the value object will not be instantiated when all mapped + # attributes are +nil+. Setting the value object to +nil+ has the effect of writing +nil+ to all + # mapped attributes. + # 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: { reading: :celsius } + # composed_of :balance, class_name: "Money", mapping: { balance: :amount } + # composed_of :address, mapping: { address_street: :street, address_city: :city } + # composed_of :address, mapping: [ %w(address_street street), %w(address_city city) ] + # composed_of :gps_location + # composed_of :gps_location, allow_nil: true + # composed_of :ip_address, + # class_name: 'IPAddr', + # mapping: { 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#225 + def composed_of(part_id, options = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/aggregations.rb#248 + def reader_method(name, class_name, mapping, allow_nil, constructor); end + + # source://activerecord//lib/active_record/aggregations.rb#261 + def writer_method(name, class_name, mapping, allow_nil, converter); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#203 +class ActiveRecord::AmbiguousSourceReflectionForThroughAssociation < ::ActiveRecord::ActiveRecordError + # @return [AmbiguousSourceReflectionForThroughAssociation] a new instance of AmbiguousSourceReflectionForThroughAssociation + # + # source://activerecord//lib/active_record/associations/errors.rb#204 + def initialize(klass, macro, association_name, options, possible_sources); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#4 +class ActiveRecord::AssociationNotFoundError < ::ActiveRecord::ConfigurationError + include ::DidYouMean::Correctable + + # @return [AssociationNotFoundError] a new instance of AssociationNotFoundError + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#5 + def association_name; end + + # source://activerecord//lib/active_record/associations/errors.rb#20 + def corrections; end + + # Returns the value of attribute record. + # + # source://activerecord//lib/active_record/associations/errors.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 + + # source://activerecord//lib/active_record/association_relation.rb#20 + def insert(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 + def insert!(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 + def insert_all(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 + def insert_all!(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#10 + def proxy_association; end + + # source://activerecord//lib/active_record/association_relation.rb#20 + def upsert(attributes, **kwargs); end + + # source://activerecord//lib/active_record/association_relation.rb#20 + def upsert_all(attributes, **kwargs); end + + private + + # 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#5 +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#51 + def association(name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations.rb#65 + def association_cached?(name); end + + private + + # Returns the specified association instance if it exists, +nil+ otherwise. + # + # source://activerecord//lib/active_record/associations.rb#81 + def association_instance_get(name); end + + # Set the specified association instance. + # + # source://activerecord//lib/active_record/associations.rb#86 + def association_instance_set(name, association); end + + # source://activerecord//lib/active_record/associations.rb#75 + def init_internals; end + + # source://activerecord//lib/active_record/associations.rb#69 + def initialize_dup(*_arg0); end + + class << self + # source://activerecord//lib/active_record/associations.rb#44 + 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#51 + def initialize(table_alias_length, aliases); end + + # source://activerecord//lib/active_record/associations/alias_tracker.rb#56 + 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#78 + def aliases; end + + private + + # source://activerecord//lib/active_record/associations/alias_tracker.rb#81 + def table_alias_for(table_name); end + + # source://activerecord//lib/active_record/associations/alias_tracker.rb#85 + def truncate(name); end + + class << self + # source://activerecord//lib/active_record/associations/alias_tracker.rb#9 + def create(pool, initial_table, joins, aliases = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/alias_tracker.rb#28 + 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#41 + def initialize(owner, reflection); end + + # source://activerecord//lib/active_record/associations/association.rb#190 + def async_load_target; end + + # Whether the association represent a single record + # or a collection of records. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#229 + def collection?; end + + # source://activerecord//lib/active_record/associations/association.rb#219 + def create(attributes = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/association.rb#223 + def create!(attributes = T.unsafe(nil), &block); end + + # Returns the value of attribute disable_joins. + # + # source://activerecord//lib/active_record/associations/association.rb#37 + def disable_joins; end + + # source://activerecord//lib/active_record/associations/association.rb#161 + def extensions; end + + # source://activerecord//lib/active_record/associations/association.rb#209 + def initialize_attributes(record, except_from_scope_attributes = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/association.rb#145 + def inversed_from(record); end + + # source://activerecord//lib/active_record/associations/association.rb#149 + 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#157 + 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#181 + def load_target; end + + # Asserts the \target has been loaded setting the \loaded flag to +true+. + # + # source://activerecord//lib/active_record/associations/association.rb#86 + def loaded!; end + + # Has the \target been already \loaded? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#81 + 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#198 + def marshal_dump; end + + # source://activerecord//lib/active_record/associations/association.rb#203 + def marshal_load(data); end + + # source://activerecord//lib/active_record/associations/association.rb#39 + def options(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/association.rb#36 + def owner; end + + # source://activerecord//lib/active_record/associations/association.rb#36 + def owner=(_arg0); end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/association.rb#37 + def reflection; end + + # Reloads the \target and returns +self+ on success. + # The QueryCache is cleared if +force+ is true. + # + # source://activerecord//lib/active_record/associations/association.rb#72 + def reload(force = T.unsafe(nil)); end + + # Remove the inverse association, if possible + # + # source://activerecord//lib/active_record/associations/association.rb#139 + 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#61 + def reset; end + + # source://activerecord//lib/active_record/associations/association.rb#66 + def reset_negative_cache; end + + # source://activerecord//lib/active_record/associations/association.rb#119 + def reset_scope; end + + # source://activerecord//lib/active_record/associations/association.rb#107 + def scope; end + + # Set the inverse association, if possible + # + # source://activerecord//lib/active_record/associations/association.rb#124 + def set_inverse_instance(record); end + + # source://activerecord//lib/active_record/associations/association.rb#131 + 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#97 + def stale_target?; end + + # source://activerecord//lib/active_record/associations/association.rb#53 + 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#102 + 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#296 + def association_scope; end + + # source://activerecord//lib/active_record/associations/association.rb#379 + def build_record(attributes); end + + # source://activerecord//lib/active_record/associations/association.rb#394 + 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#236 + def ensure_klass_exists!; end + + # source://activerecord//lib/active_record/associations/association.rb#240 + def find_target(async: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#316 + def find_target?; end + + # Returns true if record contains the foreign_key + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#366 + 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#328 + def foreign_key_present?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#402 + def inversable?(record); end + + # source://activerecord//lib/active_record/associations/association.rb#346 + 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#355 + 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#361 + def invertible_for?(record); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#407 + 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#335 + def raise_on_type_mismatch!(record); end + + # source://activerecord//lib/active_record/associations/association.rb#312 + 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#387 + def skip_statement_cache?(scope); end + + # source://activerecord//lib/active_record/associations/association.rb#272 + def skip_strict_loading(&block); end + + # This should be implemented to return the values of the relevant key(s) on the owner, + # so that when stale_state is different from the value stored on the last find_target, + # the target is stale. + # + # This is only relevant to certain associations, which is why it returns +nil+ by default. + # + # source://activerecord//lib/active_record/associations/association.rb#376 + 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#308 + def target_scope; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/association.rb#280 + 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#124 + def add_constraints(scope, owner, chain); end + + # source://activerecord//lib/active_record/associations/association_scope.rb#161 + def apply_scope(scope, table, key, value); end + + # source://activerecord//lib/active_record/associations/association_scope.rb#169 + def eval_scope(reflection, scope, owner); end + + # source://activerecord//lib/active_record/associations/association_scope.rb#112 + def get_chain(reflection, association, tracker); end + + # source://activerecord//lib/active_record/associations/association_scope.rb#54 + 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#81 + def next_chain_scope(scope, reflection, next_reflection); end + + # source://activerecord//lib/active_record/associations/association_scope.rb#77 + 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#101 +class ActiveRecord::Associations::AssociationScope::ReflectionProxy < ::SimpleDelegator + # @return [ReflectionProxy] a new instance of ReflectionProxy + # + # source://activerecord//lib/active_record/associations/association_scope.rb#104 + def initialize(reflection, aliased_table); end + + # Returns the value of attribute aliased_table. + # + # source://activerecord//lib/active_record/associations/association_scope.rb#102 + def aliased_table; end + + # source://activerecord//lib/active_record/associations/association_scope.rb#109 + 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#53 + def decrement_counters; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#61 + def decrement_counters_before_last_save; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#40 + def default(&block); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#7 + def handle_dependency; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#57 + def increment_counters; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#35 + def inversed_from(record); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#44 + def reset; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#84 + def saved_change_to_target?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#76 + def target_changed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#80 + def target_previously_changed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#49 + def updated?; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#118 + def find_target?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#149 + def foreign_key_present?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#153 + def invertible_for?(record); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#145 + def primary_key(klass); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#89 + def replace(record); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#126 + def replace_keys(record, force: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#122 + def require_counter_update?; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#158 + def stale_state; end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#103 + def update_counters(by); end + + # source://activerecord//lib/active_record/associations/belongs_to_association.rb#113 + 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#18 +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#145 + def add_after_commit_jobs_callback(model, dependent); end + + # source://activerecord//lib/active_record/associations/builder/association.rb#140 + 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#130 + 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#95 + def define_accessors(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/association.rb#77 + def define_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/association.rb#122 + 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#102 + def define_readers(mixin, name); end + + # source://activerecord//lib/active_record/associations/builder/association.rb#118 + def define_validations(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/association.rb#110 + 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#126 + 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#44 + def touch_record(o, changes, foreign_key, name, touch); 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#103 + def add_default_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#109 + def add_destroy_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#79 + 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#144 + def define_change_tracking_methods(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/belongs_to.rb#113 + 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#59 + 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#92 + def belongs_to_options(options); end + + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#71 + def middle_options(join_model); end + + # source://activerecord//lib/active_record/associations/builder/has_and_belongs_to_many.rb#80 + 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#17 + 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#37 + def touch_record(record, name, touch); end + + private + + # source://activerecord//lib/active_record/associations/builder/has_one.rb#26 + def add_destroy_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/has_one.rb#46 + def add_touch_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/has_one.rb#21 + def define_callbacks(model, reflection); end + + # source://activerecord//lib/active_record/associations/builder/has_one.rb#30 + 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#17 + 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#30 + def define_constructors(mixin, name); end + + # source://activerecord//lib/active_record/associations/builder/singular_association.rb#7 + def valid_options(options); end + end +end + +# = Active Record \Associations +# +# \Associations are a set of macro-like class methods for tying objects together through +# foreign keys. They express relationships like "Project has one Project Manager" +# or "Project belongs to a Portfolio". Each macro adds a number of methods to the +# 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 = Project.first +# project.portfolio +# project.portfolio = Portfolio.first +# project.reload_portfolio +# +# project.project_manager +# project.project_manager = ProjectManager.first +# project.reload_project_manager +# +# project.milestones.empty? +# project.milestones.size +# project.milestones +# project.milestones << Milestone.first +# project.milestones.delete(Milestone.first) +# project.milestones.destroy(Milestone.first) +# project.milestones.find(Milestone.first.id) +# project.milestones.build +# project.milestones.create +# +# project.categories.empty? +# project.categories.size +# project.categories +# project.categories << Category.first +# project.categories.delete(category1) +# project.categories.destroy(category1) +# +# === A word of warning +# +# Don't create associations that have the same name as {instance methods}[rdoc-ref:ActiveRecord::Core] of +# +ActiveRecord::Base+. Since the association adds a method with that name to +# its model, using an association with the same name as one provided by +ActiveRecord::Base+ will override the method inherited through +ActiveRecord::Base+ and will break things. +# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of +ActiveRecord::Base+ instance methods. +# +# == Auto-generated methods +# See also "Instance Public methods" below ( from #belongs_to ) 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 or eager loading such associations is not possible because +# those operations happen before instance creation. Such associations +# _can_ be preloaded, but doing so will perform N+1 queries because there +# will be a different scope for each record (similar to preloading +# polymorphic scopes). +# +# == 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(client) +# # ... +# end +# +# def log_after_remove(client) +# # ... +# end +# end +# +# Callbacks can be defined in three ways: +# +# 1. A symbol that references a method defined on the class with the +# associated collection. For example, after_add: :congratulate_client +# invokes Firm#congratulate_client(client). +# 2. A callable with a signature that accepts both the record with the +# associated collection and the record being added or removed. For +# example, after_add: ->(firm, client) { ... }. +# 3. An object that responds to the callback name. For example, passing +# after_add: CallbackObject.new invokes CallbackObject#after_add(firm, +# client). +# +# It's possible to stack callbacks by passing them as an array. Example: +# +# class CallbackObject +# def after_add(firm, client) +# firm.log << "after_adding #{client.id}" +# end +# end +# +# class Firm < ActiveRecord::Base +# has_many :clients, +# dependent: :destroy, +# after_add: [ +# :congratulate_client, +# -> (firm, client) { firm.log << "after_adding #{client.id}" }, +# CallbackObject.new +# ], +# 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 fall back +# to the previous implementation of eager loading and will raise ActiveRecord::EagerLoadPolymorphicError. +# The reason is that the parent model's type is a column value so its corresponding table +# name cannot be put in the +FROM+/+JOIN+ clauses of that query. +# +# == 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 and the +# {Active Record Associations guide}[https://guides.rubyonrails.org/association_basics.html#bi-directional-associations]. +# +# == 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#1032 +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. + # [reset_association] + # Unloads the associated object. The next access will query it from the database. + # [association_changed?] + # Returns true if a new associate object has been assigned and the next save will update the foreign key. + # [association_previously_changed?] + # Returns true if the previous save updated the association to reference a new associate object. + # + # ==== Example + # + # class Post < ActiveRecord::Base + # belongs_to :author + # end + # + # Declaring belongs_to :author adds the following methods (and more): + # + # post = Post.find(7) + # author = Author.find(19) + # + # post.author # similar to Author.find(post.author_id) + # post.author = author # similar to post.author_id = author.id + # post.build_author # similar to post.author = Author.new + # post.create_author # similar to post.author = Author.new; post.author.save; post.author + # post.create_author! # similar to post.author = Author.new; post.author.save!; post.author + # post.reload_author + # post.reset_author + # post.author_changed? + # post.author_previously_changed? + # + # ==== Scopes + # + # 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 + # + # The declaration can also include an +options+ hash to specialize the behavior of the association. + # + # [+:class_name+] + # Specify the class name of the association. Use it only if that name can't be inferred + # from the association name. So belongs_to :author will by default be linked to the Author class, but + # if the real class name is Person, you'll have to specify it with this option. + # [+:foreign_key+] + # 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". + # + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] + # Specify the column used to store the associated object's type, if this is a polymorphic + # association. By default this is guessed to be the name of the association with a "_type" + # suffix. So a class that defines a belongs_to :taggable, polymorphic: true + # association will use "taggable_type" as the default :foreign_type. + # [+:primary_key+] + # 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). 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.) + # + # Starting to use counter caches on existing large tables can be troublesome, because the column + # values must be backfilled separately of the column addition (to not lock the table for too long) + # and before the use of +:counter_cache+ (otherwise methods like +size+/+any?+/etc, which use + # counter caches internally, can produce incorrect results). To safely backfill the values while keeping + # counter cache columns updated with the child records creation/removal and to avoid the mentioned methods + # use the possibly incorrect counter cache column values and always get the results from the database, + # use counter_cache: { active: false }. + # If you also need to specify a custom column name, use counter_cache: { active: false, column: :my_custom_counter }. + # + # 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). + # [+:polymorphic+] + # Specify this association is a polymorphic association by passing +true+. + # Note: Since polymorphic associations rely on storing class names in the database, make sure to update the class names in the + # *_type polymorphic type column of the corresponding rows. + # [+: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+ / +updated_on+ attributes set to current time) + # when this record is either saved or destroyed. If you specify a symbol, that attribute + # will be updated with the current time in addition to the +updated_at+ / +updated_on+ attribute. + # Please note that no validation will be performed when touching, and only the +after_touch+, + # +after_commit+, and +after_rollback+ callbacks will be executed. + # [+:inverse_of+] + # 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. + # Please note that callable won't be executed if the record exists. + # [+:strict_loading+] + # Enforces strict loading every time the associated record is loaded through this association. + # [+:ensuring_owner_was+] + # Specifies an instance method to be called on the owner. The method must return true in order for the + # associated records to be deleted in a background job. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. + # + # Option examples: + # belongs_to :firm, foreign_key: "client_of" + # 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 + # belongs_to :note, query_constraints: [:organization_id, :note_id] + # + # source://activerecord//lib/active_record/associations.rb#1677 + 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[8.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 + # + # class Developer < ActiveRecord::Base + # has_and_belongs_to_many :projects + # end + # + # Declaring has_and_belongs_to_many :projects adds the following methods (and more): + # + # developer = Developer.find(11) + # project = Project.find(9) + # + # developer.projects + # developer.projects << project + # developer.projects.delete(project) + # developer.projects.destroy(project) + # developer.projects = [project] + # developer.project_ids + # developer.project_ids = [9] + # developer.projects.clear + # developer.projects.empty? + # developer.projects.size + # developer.projects.find(9) + # developer.projects.exists?(9) + # developer.projects.build # similar to Project.new(developer_id: 11) + # developer.projects.create # similar to Project.create(developer_id: 11) + # developer.projects.reload + # + # The declaration may include an +options+ hash to specialize the behavior of the association. + # + # ==== Scopes + # + # 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. + # + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:association_foreign_key+] + # Specify the foreign key used for the association on the receiving side of the association. + # By default this is guessed to be the name of the associated class in lower-case and "_id" suffixed. + # So if a Person class makes a #has_and_belongs_to_many association to Project, + # the association will use "project_id" as the default :association_foreign_key. + # [+:validate+] + # 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#1858 + 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 + # + # class Firm < ActiveRecord::Base + # has_many :clients + # end + # + # Declaring has_many :clients adds the following methods (and more): + # + # firm = Firm.find(2) + # client = Client.find(6) + # + # firm.clients # similar to Client.where(firm_id: 2) + # firm.clients << client + # firm.clients.delete(client) + # firm.clients.destroy(client) + # firm.clients = [client] + # firm.client_ids + # firm.client_ids = [6] + # firm.clients.clear + # firm.clients.empty? # similar to firm.clients.size == 0 + # firm.clients.size # similar to Client.count "firm_id = 2" + # firm.clients.find # similar to Client.where(firm_id: 2).find(6) + # firm.clients.exists?(name: 'ACME') # similar to Client.exists?(name: 'ACME', firm_id: 2) + # firm.clients.build # similar to Client.new(firm_id: 2) + # firm.clients.create # similar to Client.create(firm_id: 2) + # firm.clients.create! # similar to Client.create!(firm_id: 2) + # firm.clients.reload + # + # The declaration can also include an +options+ hash to specialize the behavior of the association. + # + # ==== Scopes + # + # 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. + # + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] + # Specify the column used to store the associated object's type, if this is a polymorphic + # association. By default this is guessed to be the name of the polymorphic association + # specified on "as" option with a "_type" suffix. So a class that defines a + # has_many :tags, as: :taggable association will use "taggable_type" as the + # default :foreign_type. + # [+:primary_key+] + # 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' + # and 'Setting Inverses' sections above.) + # [+:disable_joins+] + # Specifies whether joins should be skipped for an association. If set to true, two or more queries + # will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory + # due to database limitations. This option is only applicable on has_many :through associations as + # +has_many+ alone do not perform a join. + # [+:source+] + # 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. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. + # [+:index_errors+] + # Allows differentiation of multiple validation errors from the association records, by including + # an index in the error attribute name, e.g. +roles[2].level+. + # When set to +true+, the index is based on association order, i.e. database order, with yet to be + # persisted new records placed at the end. + # When set to +:nested_attributes_order+, the index is based on the record order received by + # nested attributes setter, when accepts_nested_attributes_for is used. + # [:before_add] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered before an object is added to the association collection. + # [:after_add] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered after an object is added to the association collection. + # [:before_remove] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered before an object is removed from the association collection. + # [:after_remove] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered after an object is removed from the association collection. + # + # 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 + # has_many :comments, query_constraints: [:blog_id, :post_id] + # has_many :comments, index_errors: :nested_attributes_order + # + # source://activerecord//lib/active_record/associations.rb#1298 + 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. + # [reset_association] + # Unloads the associated object. The next access will query it from the database. + # + # ==== Example + # + # class Account < ActiveRecord::Base + # has_one :beneficiary + # end + # + # Declaring has_one :beneficiary adds the following methods (and more): + # + # account = Account.find(5) + # beneficiary = Beneficiary.find(8) + # + # account.beneficiary # similar to Beneficiary.find_by(account_id: 5) + # account.beneficiary = beneficiary # similar to beneficiary.update(account_id: 5) + # account.build_beneficiary # similar to Beneficiary.new(account_id: 5) + # account.create_beneficiary # similar to Beneficiary.create(account_id: 5) + # account.create_beneficiary! # similar to Beneficiary.create!(account_id: 5) + # account.reload_beneficiary + # account.reset_beneficiary + # + # ==== Scopes + # + # 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. + # + # Setting the :foreign_key option prevents automatic detection of the association's + # inverse, so it is generally a good idea to set the :inverse_of option as well. + # [+:foreign_type+] + # Specify the column used to store the associated object's type, if this is a polymorphic + # association. By default this is guessed to be the name of the polymorphic association + # specified on "as" option with a "_type" suffix. So a class that defines a + # has_one :tag, as: :taggable association will use "taggable_type" as the + # default :foreign_type. + # [+:primary_key+] + # 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' + # and 'Setting Inverses' sections above.) + # [+:disable_joins+] + # Specifies whether joins should be skipped for an association. If set to true, two or more queries + # will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory + # due to database limitations. This option is only applicable on has_one :through associations as + # +has_one+ alone does not perform a join. + # [+:source+] + # 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 saves the associated object or destroys it if marked for destruction, + # when saving the parent object. + # If +false+, never save or destroy the associated object. + # + # By default, only saves the associated object if it's a new record. Setting this option + # to +true+ also enables validations on the associated object unless explicitly disabled + # with validate: false. This is because saving an object with invalid associated + # objects would fail, so any associated objects will go through validation checks. + # + # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets + # :autosave to true. + # [+:touch+] + # If true, the associated object will be touched (the +updated_at+ / +updated_on+ attributes set to current time) + # when this record is either saved or destroyed. If you specify a symbol, that attribute + # will be updated with the current time in addition to the +updated_at+ / +updated_on+ attribute. + # Please note that no validation will be performed when touching, and only the +after_touch+, + # +after_commit+, and +after_rollback+ callbacks will be executed. + # [+:inverse_of+] + # 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. + # [+:query_constraints+] + # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. + # This is an optional option. By default Rails will attempt to derive the value automatically. + # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. + # + # Option examples: + # has_one :credit_card, dependent: :destroy # destroys the associated credit card + # 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 + # has_one :employment_record_book, query_constraints: [:organization_id, :employee_id] + # + # source://activerecord//lib/active_record/associations.rb#1489 + 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#30 +class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associations::Association + # source://activerecord//lib/active_record/associations/collection_association.rb#281 + 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#117 + def build(attributes = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#316 + def collection?; 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#127 + 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#186 + 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#150 + 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#195 + 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#172 + 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#232 + def empty?; end + + # source://activerecord//lib/active_record/associations/collection_association.rb#94 + def find(*args); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#308 + 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#51 + 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#62 + def ids_writer(ids); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#258 + def include?(record); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#272 + def load_target; end + + # source://activerecord//lib/active_record/associations/collection_association.rb#31 + def nested_attributes_target; end + + # source://activerecord//lib/active_record/associations/collection_association.rb#31 + def nested_attributes_target=(_arg0); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#304 + 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#34 + 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#242 + def replace(other_array); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#87 + def reset; end + + # source://activerecord//lib/active_record/associations/collection_association.rb#298 + 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#209 + def size; end + + # source://activerecord//lib/active_record/associations/collection_association.rb#285 + 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#46 + def writer(records); end + + private + + # source://activerecord//lib/active_record/associations/collection_association.rb#354 + def _create_record(attributes, raise = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#492 + def callback(method, record); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#498 + def callbacks_for(callback_name); end + + # @raise [ActiveRecord::Rollback] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#438 + def concat_records(records, raise = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#385 + 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#414 + 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#521 + def find_by_scan(*args); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_association.rb#507 + 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#377 + 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#335 + def merge_target_lists(persisted, memory); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#399 + def remove_records(existing_records, records, method); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#430 + def replace_common_records_in_memory(new_target, original_target); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#457 + def replace_on_target(record, skip_callbacks, replace:, inversing: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#418 + def replace_records(new_target, original_target); end + + # source://activerecord//lib/active_record/associations/collection_association.rb#321 + def transaction(&block); end +end + +# = Active Record Collection Proxy +# +# 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#31 +class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation + # @return [CollectionProxy] a new instance of CollectionProxy + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#32 + def initialize(klass, association, **_arg2); end + + # Adds one or more +records+ to the collection by setting their foreign keys + # 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#1049 + 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 + # + # + # Note that unpersisted records can still be seen as equal: + # + # other = [Pet.new(id: 1), Pet.new(id: 2)] + # + # person.pets == other + # # => true + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#980 + def ==(other); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def _select!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def and(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def and!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def annotate(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def annotate!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def annotate_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#1049 + def append(*records); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#318 + def build(attributes = T.unsafe(nil), &block); end + + # -- + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#724 + def calculate(operation, column_name); end + + # Equivalent to +delete_all+. The difference is that returns +self+, instead + # 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#1066 + 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#1049 + def concat(*records); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#349 + 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#365 + def create!(attributes = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def create_with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def create_with!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def create_with_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#620 + 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#474 + 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#692 + 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#501 + def destroy_all; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def distinct(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def distinct!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def distinct_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def distinct_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def eager_load(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def eager_load!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def eager_load_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#831 + def empty?; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def except(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def excluding(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def excluding!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extending(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extending!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extending_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extending_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extensions(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def extract_associated(*_arg0, **_arg1, &_arg2); end + + # Finds an object in the collection responding to the +id+. Uses the same + # rules as ActiveRecord::FinderMethods.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#138 + def find(*args); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def from(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def from!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def from_clause(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def from_clause=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def group(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def group!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def group_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def group_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def having(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def having!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def having_clause(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def having_clause=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#927 + def include?(record); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def includes(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def includes!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def includes_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def includes_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def insert!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def insert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def insert_all!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1118 + def inspect; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def invert_where(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def invert_where!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def joins!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def joins_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#259 + def last(limit = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def left_joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def left_outer_joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def left_outer_joins!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def left_outer_joins_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def left_outer_joins_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def limit(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def limit!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def limit_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def limit_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def load_async(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#44 + 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#53 + 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#53 + def loaded?; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def lock(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def lock!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def lock_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def lock_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#318 + def new(attributes = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def none(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def none!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def null_relation?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def offset(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def offset!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def offset_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def offset_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def only(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def optimizer_hints(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def optimizer_hints!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def optimizer_hints_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def optimizer_hints_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def or(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def or!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def order(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def order!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def order_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def order_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#728 + def pluck(*column_names); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def preload(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def preload!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def preload_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def preload_values=(arg); end + + # @raise [NoMethodError] + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1056 + def prepend(*args); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1123 + def pretty_print(pp); end + + # Returns the association object for the collection. + # + # class Person < ActiveRecord::Base + # has_many :pets + # end + # + # person.pets.proxy_association + # # => # + # + # Returns the same object as person.association(:pets), + # allowing you to make calls like person.pets.proxy_association.owner. + # + # See Associations::ClassMethods@Association+extensions for more. + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#944 + 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#1049 + def push(*records); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def readonly(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def readonly!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def readonly_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#1024 + def records; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def references(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def references!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def references_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def references_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def regroup(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def regroup!(*_arg0, **_arg1, &_arg2); 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#1085 + def reload; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reorder(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reorder!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reordering_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#391 + def replace(other_array); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reselect(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#1106 + def reset; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1112 + def reset_scope; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reverse_order(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reverse_order!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reverse_order_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def reverse_order_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#949 + def scope; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def scoping(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def select_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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#782 + def size; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def skip_preloading!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def skip_query_cache!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def skip_query_cache_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def skip_query_cache_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def spawn(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def strict_loading(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def strict_loading!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def strict_loading_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def strict_loading_value=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + 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::FinderMethods.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#289 + def take(limit = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#40 + def target; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def uniq!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def unscope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def unscope!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def unscope_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def unscope_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def upsert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def upsert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def where(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def where!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def where_clause(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def where_clause=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with_recursive(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with_recursive!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with_values(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def with_values=(arg); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1137 + def without(*_arg0, **_arg1, &_arg2); end + + private + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1158 + def exec_queries; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1154 + def find_from_target?; end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1145 + def find_nth_from_last(index); end + + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1140 + def find_nth_with_limit(index, limit); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/collection_proxy.rb#1150 + 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#11 +class ActiveRecord::Associations::HasManyAssociation < ::ActiveRecord::Associations::CollectionAssociation + include ::ActiveRecord::Associations::ForeignAssociation + + # source://activerecord//lib/active_record/associations/has_many_association.rb#14 + def handle_dependency; end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#61 + def insert_record(record, validate = T.unsafe(nil), raise = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/associations/has_many_association.rb#143 + def _create_record(attributes, *_arg1); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#139 + def concat_records(records, *_arg1); end + + # Returns the number of records in this collection. + # + # 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#80 + def count_records; end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#112 + def delete_count(method, scope); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#120 + def delete_or_nullify_all_records(method); end + + # Deletes the records according to the :dependent option. + # + # source://activerecord//lib/active_record/associations/has_many_association.rb#127 + def delete_records(records, method); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#158 + def difference(a, b); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#162 + def intersection(a, b); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#98 + def update_counter(difference, reflection = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#151 + def update_counter_if_success(saved_successfully, difference); end + + # source://activerecord//lib/active_record/associations/has_many_association.rb#104 + 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#90 + 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#130 + def delete_or_nullify_all_records(method); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#134 + def delete_records(records, method); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#203 + def delete_through_records(records); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#171 + def difference(a, b); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#187 + def distribution(array); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#219 + def find_target(async: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#177 + def intersection(a, b); end + + # NOTE - not sure that we can actually cope with inverses here + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#227 + def invertible_for?(record); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#183 + def mark_occurrence(distribution, record); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#110 + def remove_records(existing_records, records, method); end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#81 + def save_through_record(record); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#115 + def target_reflection_has_associated_record?; end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#193 + def through_records_for(record); end + + # Returns the value of attribute through_scope. + # + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#69 + def through_scope; end + + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#71 + def through_scope_attributes; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/has_many_through_association.rb#119 + 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#133 + def _create_record(attributes, raise_error = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/has_one_association.rb#119 + def nullify_owner_attributes(record); end + + # source://activerecord//lib/active_record/associations/has_one_association.rb#95 + def remove_target!(method); end + + # source://activerecord//lib/active_record/associations/has_one_association.rb#59 + 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#91 + def set_new_record(record); end + + # source://activerecord//lib/active_record/associations/has_one_association.rb#125 + 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#81 + 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#87 + 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#94 + def append_constraints(connection, 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 + +# source://activerecord//lib/active_record/associations/nested_error.rb#7 +class ActiveRecord::Associations::NestedError < ::ActiveModel::NestedError + # @return [NestedError] a new instance of NestedError + # + # source://activerecord//lib/active_record/associations/nested_error.rb#8 + def initialize(association, inner_error); end + + private + + # Returns the value of attribute association. + # + # source://activerecord//lib/active_record/associations/nested_error.rb#16 + def association; end + + # source://activerecord//lib/active_record/associations/nested_error.rb#18 + def compute_attribute(inner_error); end + + # source://activerecord//lib/active_record/associations/nested_error.rb#33 + def index; end + + # source://activerecord//lib/active_record/associations/nested_error.rb#28 + def index_errors_setting; end + + # source://activerecord//lib/active_record/associations/nested_error.rb#37 + def ordered_records; end +end + +# = Active Record \Preloader +# +# Implements the details of eager loading of Active Record associations. +# +# Suppose that you have the following two Active Record models: +# +# 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#46 +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 their + # books. + # - a Hash which specifies multiple association names, as well as + # association names for the to-be-preloaded association objects. For + # example, specifying { author: :avatar } will preload a + # book's author, as well as that author's avatar. + # + # +:associations+ has the same format as the arguments to + # ActiveRecord::QueryMethods#includes. 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#99 + def initialize(records:, associations:, scope: T.unsafe(nil), available_records: T.unsafe(nil), associate_by_default: T.unsafe(nil)); end + + # Returns the value of attribute associate_by_default. + # + # source://activerecord//lib/active_record/associations/preloader.rb#56 + def associate_by_default; end + + # Returns the value of attribute associations. + # + # source://activerecord//lib/active_record/associations/preloader.rb#56 + def associations; end + + # source://activerecord//lib/active_record/associations/preloader.rb#126 + def branches; end + + # source://activerecord//lib/active_record/associations/preloader.rb#120 + def call; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader.rb#116 + def empty?; end + + # source://activerecord//lib/active_record/associations/preloader.rb#130 + def loaders; end + + # Returns the value of attribute records. + # + # source://activerecord//lib/active_record/associations/preloader.rb#56 + def records; end + + # Returns the value of attribute scope. + # + # source://activerecord//lib/active_record/associations/preloader.rb#56 + def scope; end +end + +# source://activerecord//lib/active_record/associations/preloader/association.rb#8 +class ActiveRecord::Associations::Preloader::Association + # @return [Association] a new instance of Association + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#104 + def initialize(klass, owners, reflection, preload_scope, reflection_scope, associate_by_default); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#218 + def associate_records_from_unscoped(unscoped_records); end + + # The name of the key on the associated records + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#161 + def association_key_name; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#119 + def future_classes; end + + # Returns the value of attribute klass. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#102 + def klass; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#197 + def load_records(raw_records = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#176 + def loaded?(owner); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#165 + def loader_query; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#169 + def owners_by_key; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#154 + def preloaded_records; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#148 + def records_by_owner; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#135 + def run; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#131 + def run?; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#127 + def runnable_loaders; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#184 + def scope; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#188 + def set_inverse(record); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#115 + def table_name; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#180 + def target_for(owner); end + + private + + # source://activerecord//lib/active_record/associations/preloader/association.rb#245 + def associate_records_to_owner(owner, records); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#282 + def association_key_type; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#294 + def build_scope; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#310 + def cascade_strict_loading(scope); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#274 + def convert_key(key); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#266 + def derive_key(owner, key); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#258 + def key_conversion_required?; end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 + def model; end + + # The name of the key on the model which declares the association + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#241 + def owner_key_name; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#286 + def owner_key_type; end + + # Returns the value of attribute owners. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 + def owners; end + + # Returns the value of attribute preload_scope. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 + def preload_scope; end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#238 + def reflection; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#290 + def reflection_scope; end +end + +# source://activerecord//lib/active_record/associations/preloader/association.rb#9 +class ActiveRecord::Associations::Preloader::Association::LoaderQuery + # @return [LoaderQuery] a new instance of LoaderQuery + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#12 + def initialize(scope, association_key_name); end + + # Returns the value of attribute association_key_name. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#10 + def association_key_name; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#17 + def eql?(other); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#24 + def hash; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#41 + def load_records_for_keys(keys, &block); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#32 + def load_records_in_batch(loaders); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#28 + def records_for(loaders); end + + # Returns the value of attribute scope. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#10 + def scope; end +end + +# source://activerecord//lib/active_record/associations/preloader/association.rb#60 +class ActiveRecord::Associations::Preloader::Association::LoaderRecords + # @return [LoaderRecords] a new instance of LoaderRecords + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#61 + def initialize(loaders, loader_query); end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#70 + def records; end + + private + + # source://activerecord//lib/active_record/associations/preloader/association.rb#97 + def already_loaded_records; end + + # Returns the value of attribute already_loaded_records_by_key. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 + def already_loaded_records_by_key; end + + # Returns the value of attribute keys_to_load. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 + def keys_to_load; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#91 + def load_records; end + + # Returns the value of attribute loader_query. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 + def loader_query; end + + # Returns the value of attribute loaders. + # + # source://activerecord//lib/active_record/associations/preloader/association.rb#75 + def loaders; end + + # source://activerecord//lib/active_record/associations/preloader/association.rb#77 + 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#72 + def done?; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#27 + def future_classes; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#80 + def grouped_records; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#31 + def immediate_future_classes; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#53 + def likely_reflections; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#118 + 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#108 + def polymorphic?; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#68 + 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#91 + def preloaders_for_reflection(reflection, reflection_records); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/branch.rb#60 + def root?; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#76 + 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#64 + def source_records; end + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#43 + def target_classes; end + + private + + # source://activerecord//lib/active_record/associations/preloader/branch.rb#126 + 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#143 + 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#49 + 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#39 + def runnable_loaders; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#65 + def data_available?; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#74 + def middle_records; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#98 + def preload_index; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#70 + def source_preloaders; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#90 + def source_records_by_owner; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#86 + def source_reflection; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#78 + def through_preloaders; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#94 + def through_records_by_owner; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#82 + def through_reflection; end + + # source://activerecord//lib/active_record/associations/preloader/through_association.rb#104 + 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#29 + 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#37 + 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 + + # Resets the \loaded flag to +false+ and sets the \target to +nil+. + # + # source://activerecord//lib/active_record/associations/singular_association.rb#18 + def reset; end + + # Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar + # + # source://activerecord//lib/active_record/associations/singular_association.rb#25 + def writer(record); end + + private + + # @raise [RecordInvalid] + # + # source://activerecord//lib/active_record/associations/singular_association.rb#67 + def _create_record(attributes, raise_error = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/associations/singular_association.rb#47 + def find_target(async: T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/associations/singular_association.rb#59 + def replace(record); end + + # source://activerecord//lib/active_record/associations/singular_association.rb#43 + def scope_for_create; end + + # source://activerecord//lib/active_record/associations/singular_association.rb#63 + 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#116 + 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#57 + def construct_join_attributes(*records); end + + # source://activerecord//lib/active_record/associations/through_association.rb#96 + def ensure_mutable; end + + # source://activerecord//lib/active_record/associations/through_association.rb#106 + def ensure_not_nested; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/associations/through_association.rb#90 + def foreign_key_present?; end + + # Note: this does not capture all cases, for example it would be impractical + # to try to properly support stale-checking for nested associations. + # + # source://activerecord//lib/active_record/associations/through_association.rb#82 + 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#34 + def target_scope; end + + # source://activerecord//lib/active_record/associations/through_association.rb#26 + def through_association; end + + # source://activerecord//lib/active_record/associations/through_association.rb#14 + def through_reflection; end + + # source://activerecord//lib/active_record/associations/through_association.rb#10 + def transaction(&block); end +end + +# source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#7 +class ActiveRecord::AsynchronousQueriesTracker + # @return [AsynchronousQueriesTracker] a new instance of AsynchronousQueriesTracker + # + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#45 + def initialize; end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#49 + def current_session; end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#58 + def finalize_session(wait = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#53 + def start_session; end + + class << self + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#40 + def complete(asynchronous_queries_tracker); end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#32 + def install_executor_hooks(executor = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#36 + def run; end + end +end + +# source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#8 +class ActiveRecord::AsynchronousQueriesTracker::Session + # @return [Session] a new instance of Session + # + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#9 + def initialize; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#14 + def active?; end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#22 + def finalize(wait = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/asynchronous_queries_tracker.rb#18 + def synchronize(&block); end +end + +# AsynchronousQueryInsideTransactionError will be raised when attempting +# to perform an asynchronous query from inside a transaction +# +# source://activerecord//lib/active_record/errors.rb#536 +class ActiveRecord::AsynchronousQueryInsideTransactionError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/attribute_assignment.rb#4 +module ActiveRecord::AttributeAssignment + private + + # source://activerecord//lib/active_record/attribute_assignment.rb#6 + 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#36 + 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#26 + def assign_nested_parameter_attributes(pairs); end + + # source://activerecord//lib/active_record/attribute_assignment.rb#42 + def execute_callstack_for_multiparameter_attributes(callstack); end + + # source://activerecord//lib/active_record/attribute_assignment.rb#60 + def extract_callstack_for_multiparameter_attributes(pairs); end + + # source://activerecord//lib/active_record/attribute_assignment.rb#78 + def find_parameter_position(multiparameter_name); end + + # source://activerecord//lib/active_record/attribute_assignment.rb#74 + 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#449 +class ActiveRecord::AttributeAssignmentError < ::ActiveRecord::ActiveRecordError + # @return [AttributeAssignmentError] a new instance of AttributeAssignmentError + # + # source://activerecord//lib/active_record/errors.rb#452 + 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#450 + def attribute; end + + # Returns the value of attribute exception. + # + # source://activerecord//lib/active_record/errors.rb#450 + def exception; end +end + +# = Active Record Attribute Methods +# +# source://activerecord//lib/active_record/attribute_methods.rb#7 +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::Serialization::ClassMethods + + # Returns the value of the attribute identified by +attr_name+ after it has + # been type cast. (For information about specific type casting behavior, see + # the types under ActiveModel::Type.) + # + # class Person < ActiveRecord::Base + # belongs_to :organization + # end + # + # person = Person.new(name: "Francesco", date_of_birth: "2004-12-12") + # person[:name] # => "Francesco" + # person[:date_of_birth] # => Date.new(2004, 12, 12) + # person[:organization_id] # => nil + # + # Raises ActiveModel::MissingAttributeError if the attribute is missing. + # Note, however, that the +id+ attribute will never be considered missing. + # + # person = Person.select(:name).first + # person[:name] # => "Francesco" + # person[:date_of_birth] # => ActiveModel::MissingAttributeError: missing attribute 'date_of_birth' for Person + # person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute 'organization_id' for Person + # person[:id] # => nil + # + # source://activerecord//lib/active_record/attribute_methods.rb#414 + def [](attr_name); end + + # Updates the attribute identified by +attr_name+ using the specified + # +value+. The attribute value will be type cast upon being read. + # + # class Person < ActiveRecord::Base + # end + # + # person = Person.new + # person[:date_of_birth] = "2004-12-12" + # person[:date_of_birth] # => Date.new(2004, 12, 12) + # + # source://activerecord//lib/active_record/attribute_methods.rb#427 + def []=(attr_name, value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#321 + 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#459 + 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#364 + 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#333 + 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#386 + 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#345 + 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#315 + 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#290 + def respond_to?(name, include_private = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#494 + 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#514 + 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#503 + def attributes_for_update(attribute_names); end + + # source://activerecord//lib/active_record/attribute_methods.rb#498 + def attributes_with_values(attribute_names); end + + # source://activerecord//lib/active_record/attribute_methods.rb#522 + def format_for_inspect(name, value); end + + # source://activerecord//lib/active_record/attribute_methods.rb#474 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#538 + def pk_attribute?(name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#464 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # source://activerecord//lib/active_record/attribute_methods.rb#30 + def dangerous_attribute_methods; end + end + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + def partial_inserts; end + def partial_inserts=(value); end + def partial_inserts?; end + 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_patterns; end + def attribute_method_patterns?; 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#82 + def attributes_before_type_cast; end + + # Returns a hash of attributes for assignment to the database. + # + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#87 + 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 + + # Returns the value of the attribute identified by +attr_name+ after + # serialization. + # + # class Book < ActiveRecord::Base + # enum :status, { draft: 1, published: 2 } + # end + # + # book = Book.new(status: "published") + # book.read_attribute(:status) # => "published" + # book.read_attribute_for_database(:status) # => 2 + # + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#65 + def read_attribute_for_database(attr_name); end + + private + + # Dispatch target for *_before_type_cast attribute methods. + # + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#93 + def attribute_before_type_cast(attr_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#101 + def attribute_came_from_user?(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods/before_type_cast.rb#97 + 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#259 + def _has_attribute?(attr_name); end + + # Allows you to make aliases for attributes. + # + # class Person < ActiveRecord::Base + # alias_attribute :nickname, :name + # end + # + # person = Person.create(name: 'Bob') + # person.name # => "Bob" + # person.nickname # => "Bob" + # + # The alias can also be used for querying: + # + # Person.where(nickname: "Bob") + # # SELECT "people".* FROM "people" WHERE "people"."name" = "Bob" + # + # source://activerecord//lib/active_record/attribute_methods.rb#66 + def alias_attribute(new_name, old_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#87 + def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end + + # Returns +true+ if +attribute+ is an attribute method and table exists, + # +false+ otherwise. + # + # 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#223 + def attribute_method?(attribute); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#98 + def attribute_methods_generated?; 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#235 + 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#182 + 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#200 + 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#104 + def define_attribute_methods; end + + # source://activerecord//lib/active_record/attribute_methods.rb#76 + def eagerly_generate_alias_attribute_methods(_new_name, _old_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#80 + def generate_alias_attribute_methods(code_generator, new_name, old_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#126 + def generate_alias_attributes; 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#253 + def has_attribute?(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods.rb#42 + 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#164 + def instance_method_already_implemented?(method_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods.rb#186 + def method_defined_within?(name, klass, superklass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/attribute_methods.rb#142 + def undefine_attribute_methods; end + + private + + # source://activerecord//lib/active_record/attribute_methods.rb#264 + def inherited(child_class); end +end + +# source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#5 +module ActiveRecord::AttributeMethods::CompositePrimaryKey + # Returns the primary key column's value. If the primary key is composite, + # returns an array of the primary key column values. + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#8 + def id; end + + # Sets the primary key column's value. If the primary key is composite, + # raises TypeError when the set value not enumerable. + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#26 + def id=(value); end + + # Queries the primary key column's value. If the primary key is composite, + # all primary key column values must be queryable. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#37 + def id?; end + + # Returns the primary key column's value before type cast. If the primary key is composite, + # returns an array of primary key column values before type cast. + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#47 + def id_before_type_cast; end + + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#75 + def id_for_database; end + + # Returns the primary key column's value from the database. If the primary key is composite, + # returns an array of primary key column values from database. + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#67 + def id_in_database; end + + # Returns the primary key column's previous value. If the primary key is composite, + # returns an array of primary key column previous values. + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#57 + def id_was; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/composite_primary_key.rb#16 + def primary_key_values_present?; end +end + +# = Active Record Attribute Methods \Dirty +# +# Provides a way to track changes in your Active Record models. It adds all +# methods from ActiveModel::Dirty and adds database-specific methods. +# +# A newly created +Person+ object is unchanged: +# +# class Person < ActiveRecord::Base +# end +# +# person = Person.create(name: "Allison") +# person.changed? # => false +# +# Change the name: +# +# person.name = 'Alice' +# person.name_in_database # => "Allison" +# person.will_save_change_to_name? # => true +# person.name_change_to_be_saved # => ["Allison", "Alice"] +# person.changes_to_save # => {"name"=>["Allison", "Alice"]} +# +# Save the changes: +# +# person.save +# person.name_in_database # => "Alice" +# person.saved_change_to_name? # => true +# person.saved_change_to_name # => ["Allison", "Alice"] +# person.name_before_last_save # => "Allison" +# +# Similar to ActiveModel::Dirty, methods can be invoked as +# +saved_change_to_name?+ or by passing an argument to the generic method +# saved_change_to_attribute?("name"). +# +# source://activerecord//lib/active_record/attribute_methods/dirty.rb#39 +module ActiveRecord::AttributeMethods::Dirty + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveModel::AttributeMethods + include ::ActiveModel::Dirty + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::AttributeMethods::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#108 + 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#152 + 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#164 + 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#191 + def attributes_in_database; end + + # Returns an array of the names of any attributes that will change when + # the record is next saved. + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#181 + def changed_attribute_names_to_save; end + + # Returns a hash containing all the changes that will be persisted during + # the next save. + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#175 + def changes_to_save; end + + # Will the next call to +save+ have any changes to persist? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#169 + def has_changes_to_save?; end + + # reload the record and clears changed attributes. + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#63 + def reload(*_arg0); end + + # Returns the change to an attribute during the last save. If the + # 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#98 + 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 specified, this method will return false unless the original + # value is equal to the given value. + # + # [+to+] + # When specified, this method will return false unless the value will be + # changed to the given value. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#86 + def saved_change_to_attribute?(attr_name, **options); end + + # Returns a hash containing all the changes that were just saved. + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#118 + def saved_changes; end + + # Did the last call to +save+ have any changes to change? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#113 + 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 specified, this method will return false unless the original + # value is equal to the given value. + # + # [+to+] + # When specified, this method will return false unless the value will be + # changed to the given value. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#138 + def will_save_change_to_attribute?(attr_name, **options); end + + private + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#239 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#204 + def _touch_row(attribute_names, time); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#233 + def _update_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#249 + def attribute_names_for_partial_inserts; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#245 + def attribute_names_for_partial_updates; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#196 + def init_internals; end + + module GeneratedClassMethods + def attribute_aliases; end + def attribute_aliases=(value); end + def attribute_aliases?; end + def attribute_method_patterns; end + def attribute_method_patterns=(value); end + def attribute_method_patterns?; end + def partial_inserts; end + def partial_inserts=(value); end + def partial_inserts?; end + 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_patterns; end + def attribute_method_patterns?; 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.rb#25 +class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module; end + +# source://activerecord//lib/active_record/attribute_methods.rb#26 +ActiveRecord::AttributeMethods::GeneratedAttributeMethods::LOCK = T.let(T.unsafe(nil), Monitor) + +# = Active Record Attribute Methods Primary Key +# +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#8 +module ActiveRecord::AttributeMethods::PrimaryKey + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods + + # Returns the primary key column's value. If the primary key is composite, + # returns an array of the primary key column values. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#20 + def id; end + + # Sets the primary key column's value. If the primary key is composite, + # raises TypeError when the set value not enumerable. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#30 + def id=(value); end + + # Queries the primary key column's value. If the primary key is composite, + # all primary key column values must be queryable. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#36 + def id?; end + + # Returns the primary key column's value before type cast. If the primary key is composite, + # returns an array of primary key column values before type cast. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#42 + def id_before_type_cast; end + + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#58 + def id_for_database; end + + # Returns the primary key column's value from the database. If the primary key is composite, + # returns an array of primary key column values from database. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#54 + def id_in_database; end + + # Returns the primary key column's previous value. If the primary key is composite, + # returns an array of primary key column previous values. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#48 + def id_was; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#24 + def primary_key_values_present?; end + + # Returns this record's primary key value wrapped in an array if one is + # available. + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#13 + def to_key; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#63 + def attribute_method?(attr_name); end +end + +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#67 +module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#87 + def composite_primary_key?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#75 + def dangerous_attribute_method?(method_name); end + + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#106 + def get_primary_key(base_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#71 + 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#82 + 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#133 + 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#94 + def quoted_primary_key; end + + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#98 + def reset_primary_key; end + + private + + # source://activerecord//lib/active_record/attribute_methods/primary_key.rb#146 + def inherited(base); end +end + +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#68 +ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::ID_ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Set) + +# source://activerecord//lib/active_record/attribute_methods/primary_key.rb#69 +ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::PRIMARY_KEY_NOT_SET = T.let(T.unsafe(nil), BasicObject) + +# = Active Record Attribute Methods \Query +# +# source://activerecord//lib/active_record/attribute_methods/query.rb#6 +module ActiveRecord::AttributeMethods::Query + extend ::ActiveSupport::Concern + + # source://activerecord//lib/active_record/attribute_methods/query.rb#19 + def _query_attribute(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods/query.rb#13 + def query_attribute(attr_name); end + + private + + # source://activerecord//lib/active_record/attribute_methods/query.rb#13 + def attribute?(attr_name); end + + # source://activerecord//lib/active_record/attribute_methods/query.rb#29 + def query_cast_attribute(attr_name, value); end +end + +# source://activerecord//lib/active_record/attribute_methods.rb#23 +ActiveRecord::AttributeMethods::RESTRICTED_CLASS_METHODS = T.let(T.unsafe(nil), Array) + +# = Active Record Attribute Methods \Read +# +# source://activerecord//lib/active_record/attribute_methods/read.rb#6 +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#38 + def _read_attribute(attr_name, &block); end + + # Returns the value of the attribute identified by +attr_name+ after it + # has been type cast. For example, a date attribute will cast "2004-12-12" + # to Date.new(2004, 12, 12). (For information about specific type + # casting behavior, see the types under ActiveModel::Type.) + # + # source://activerecord//lib/active_record/attribute_methods/read.rb#29 + 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#38 + def attribute(attr_name, &block); end +end + +# source://activerecord//lib/active_record/attribute_methods/read.rb#9 +module ActiveRecord::AttributeMethods::Read::ClassMethods + private + + # source://activerecord//lib/active_record/attribute_methods/read.rb#11 + def define_method_attribute(canonical_name, owner:, as: T.unsafe(nil)); end +end + +# = Active Record Attribute Methods \Serialization +# +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#6 +module ActiveRecord::AttributeMethods::Serialization + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::AttributeMethods::Serialization::ClassMethods + + module GeneratedClassMethods + def default_column_serializer; end + def default_column_serializer=(value); end + def default_column_serializer?; end + end + + module GeneratedInstanceMethods; end +end + +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#23 +module ActiveRecord::AttributeMethods::Serialization::ClassMethods + # If you have an attribute that needs to be saved to the database as a + # serialized object, and retrieved by deserializing into the same object, + # 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. + # * +coder+ The serializer implementation to use, e.g. +JSON+. + # * The attribute value will be serialized + # using the coder's dump(value) method, and will be + # deserialized using the coder's load(string) method. The + # +dump+ method may return +nil+ to serialize the value as +NULL+. + # * +type+ - Optional. What the type of the serialized object should be. + # * Attempting to serialize another type will raise an + # ActiveRecord::SerializationTypeMismatch error. + # * If the column is +NULL+ or starting from a new record, the default value + # will set to +type.new+ + # * +yaml+ - Optional. Yaml specific options. The allowed config is: + # * +:permitted_classes+ - +Array+ with the permitted classes. + # * +:unsafe_load+ - Unsafely load YAML blobs, allow YAML to load any class. + # + # ==== Options + # + # * +: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+. + # + # ==== Choosing a serializer + # + # While any serialization format can be used, it is recommended to carefully + # evaluate the properties of a serializer before using it, as migrating to + # another format later on can be difficult. + # + # ===== Avoid accepting arbitrary types + # + # When serializing data in a column, it is heavily recommended to make sure + # only expected types will be serialized. For instance some serializer like + # +Marshal+ or +YAML+ are capable of serializing almost any Ruby object. + # + # This can lead to unexpected types being serialized, and it is important + # that type serialization remains backward and forward compatible as long + # as some database records still contain these serialized types. + # + # class Address + # def initialize(line, city, country) + # @line, @city, @country = line, city, country + # end + # end + # + # In the above example, if any of the +Address+ attributes is renamed, + # instances that were persisted before the change will be loaded with the + # old attributes. This problem is even worse when the serialized type comes + # from a dependency which doesn't expect to be serialized this way and may + # change its internal representation without notice. + # + # As such, it is heavily recommended to instead convert these objects into + # primitives of the serialization format, for example: + # + # class Address + # attr_reader :line, :city, :country + # + # def self.load(payload) + # data = YAML.safe_load(payload) + # new(data["line"], data["city"], data["country"]) + # end + # + # def self.dump(address) + # YAML.safe_dump( + # "line" => address.line, + # "city" => address.city, + # "country" => address.country, + # ) + # end + # + # def initialize(line, city, country) + # @line, @city, @country = line, city, country + # end + # end + # + # class User < ActiveRecord::Base + # serialize :address, coder: Address + # end + # + # This pattern allows to be more deliberate about what is serialized, and + # to evolve the format in a backward compatible way. + # + # ===== Ensure serialization stability + # + # Some serialization methods may accept some types they don't support by + # silently casting them to other types. This can cause bugs when the + # data is deserialized. + # + # For instance the +JSON+ serializer provided in the standard library will + # silently cast unsupported types to +String+: + # + # >> JSON.parse(JSON.dump(Struct.new(:foo))) + # => "#" + # + # ==== Examples + # + # ===== Serialize the +preferences+ attribute using YAML + # + # class User < ActiveRecord::Base + # serialize :preferences, coder: YAML + # end + # + # ===== Serialize the +preferences+ attribute using JSON + # + # class User < ActiveRecord::Base + # serialize :preferences, coder: JSON + # end + # + # ===== Serialize the +preferences+ +Hash+ using YAML + # + # class User < ActiveRecord::Base + # serialize :preferences, type: Hash, coder: YAML + # end + # + # ===== Serializes +preferences+ to YAML, permitting select classes + # + # class User < ActiveRecord::Base + # serialize :preferences, coder: YAML, yaml: { permitted_classes: [Symbol, Time] } + # end + # + # ===== Serialize the +preferences+ attribute using a custom coder + # + # 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, coder: Rot13JSON + # end + # + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#183 + def serialize(attr_name, coder: T.unsafe(nil), type: T.unsafe(nil), yaml: T.unsafe(nil), **options); end + + private + + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#208 + def build_column_serializer(attr_name, coder, type, yaml = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#225 + def type_incompatible_with_serialize?(cast_type, coder, type); end +end + +# source://activerecord//lib/active_record/attribute_methods/serialization.rb#9 +class ActiveRecord::AttributeMethods::Serialization::ColumnNotSerializableError < ::StandardError + # @return [ColumnNotSerializableError] a new instance of ColumnNotSerializableError + # + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#10 + 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 + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#85 + def create_time_zone_conversion_attribute?(name, cast_type); end + + # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#77 + def hook_attribute_type(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#35 + def ==(other); end + + # 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#40 + 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 + +# = Active Record Attribute Methods \Write +# +# source://activerecord//lib/active_record/attribute_methods/write.rb#6 +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+ using the specified + # +value+. The attribute value will be type cast upon being read. + # + # source://activerecord//lib/active_record/attribute_methods/write.rb#31 + def write_attribute(attr_name, value); end + + 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#13 +module ActiveRecord::AttributeMethods::Write::ClassMethods + private + + # source://activerecord//lib/active_record/attribute_methods/write.rb#15 + def define_method_attribute=(canonical_name, owner:, as: T.unsafe(nil)); end +end + +# See ActiveRecord::Attributes::ClassMethods for documentation +# +# source://activerecord//lib/active_record/attributes.rb#7 +module ActiveRecord::Attributes + extend ::ActiveSupport::Concern + include ::ActiveModel::AttributeRegistration + + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods + mixes_in_class_methods ::ActiveRecord::Attributes::ClassMethods +end + +# = Active Record \Attributes +# +# source://activerecord//lib/active_record/attributes.rb#12 +module ActiveRecord::Attributes::ClassMethods + # source://activerecord//lib/active_record/attributes.rb#241 + def _default_attributes; end + + # This API only accepts type objects, and will do its work immediately instead of + # waiting for the schema to load. 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#231 + def define_attribute(name, cast_type, default: T.unsafe(nil), user_provided_default: T.unsafe(nil)); end + + protected + + # source://activerecord//lib/active_record/attributes.rb#268 + def reload_schema_from_cache(*_arg0); end + + private + + # source://activerecord//lib/active_record/attributes.rb#277 + def define_default_attribute(name, value, type, from_user:); end + + # source://activerecord//lib/active_record/attributes.rb#293 + def reset_default_attributes; end + + # source://activerecord//lib/active_record/attributes.rb#297 + def resolve_type_name(name, **options); end + + # source://activerecord//lib/active_record/attributes.rb#301 + def type_for_column(connection, column); end +end + +# source://activerecord//lib/active_record/attributes.rb#274 +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#140 +module ActiveRecord::AutosaveAssociation + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::AutosaveAssociation::ClassMethods + + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#284 + def autosaving_belongs_to_for?(association); end + + # 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#275 + 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#269 + 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#262 + 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#249 + 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#256 + 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#238 + def reload(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#279 + def validating_belongs_to_for?(association); end + + private + + # source://activerecord//lib/active_record/autosave_association.rb#582 + 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#500 + 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#392 + 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#298 + def associated_records_to_validate_or_save(association, new_record, autosave); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#507 + 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#371 + def association_valid?(association, record); end + + # source://activerecord//lib/active_record/autosave_association.rb#566 + def compute_primary_key(reflection, record); end + + # source://activerecord//lib/active_record/autosave_association.rb#290 + def init_internals; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#516 + def inverse_polymorphic_association_changed?(reflection, record); end + + # Go through nested autosave associations that are loaded in memory (without loading + # any new ones), and return true if any are changed for autosave. + # Returns false if already called to prevent an infinite loop. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/autosave_association.rb#311 + def nested_records_changed_for_autosave?; 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#526 + 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#409 + 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#463 + def save_has_one_association(reflection); end + + # Validate the association if :validate or :autosave is + # turned on for the belongs_to association. + # + # source://activerecord//lib/active_record/autosave_association.rb#343 + def validate_belongs_to_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#360 + def validate_collection_association(reflection); end + + # Validate the association if :validate or :autosave is + # turned on for the has_one association. + # + # source://activerecord//lib/active_record/autosave_association.rb#329 + def validate_has_one_association(reflection); end +end + +# source://activerecord//lib/active_record/autosave_association.rb#143 +module ActiveRecord::AutosaveAssociation::AssociationBuilderExtension + class << self + # source://activerecord//lib/active_record/autosave_association.rb#144 + def build(model, reflection); end + + # source://activerecord//lib/active_record/autosave_association.rb#148 + def valid_options; end + end +end + +# source://activerecord//lib/active_record/autosave_association.rb#157 +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#189 + def add_autosave_association_callbacks(reflection); end + + # source://activerecord//lib/active_record/autosave_association.rb#219 + def define_autosave_validation_callbacks(reflection); end + + # source://activerecord//lib/active_record/autosave_association.rb#159 + 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.new(name: "David", occupation: "Code Artist") +# user.name # => "David" +# +# You can also use block initialization: +# +# 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.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.new(name: "David") +# user.name? # => true +# +# anonymous = 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.create(preferences: { "background" => "black", "display" => large }) +# 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.create(preferences: %w( one two three )) +# 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.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.lease_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 ::ActiveModel::Validations + include ::ActiveSupport::Callbacks + include ::ActiveModel::Validations::HelperMethods + include ::ActiveModel::Conversion + include ::ActiveModel::ForbiddenAttributesProtection + include ::ActiveModel::AttributeAssignment + include ::ActiveModel::API + include ::ActiveModel::Access + 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 ::ActiveRecord::AttributeAssignment + include ::ActiveRecord::Integration + include ::ActiveRecord::Validations + include ::ActiveRecord::CounterCache + include ::ActiveModel::AttributeRegistration + include ::ActiveRecord::Attributes + include ::ActiveRecord::Locking::Optimistic + include ::ActiveRecord::Locking::Pessimistic + include ::ActiveRecord::Encryption::EncryptableRecord + include ::ActiveModel::AttributeMethods + include ::ActiveRecord::AttributeMethods + include ::ActiveRecord::Base::GeneratedAttributeMethods + 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::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::TokenFor + include ::ActiveRecord::SignedId + include ::ActiveRecord::Suppressor + include ::ActiveRecord::Normalization + include ::ActiveRecord::Marshalling::Methods + 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 + extend ::ActiveSupport::Benchmarkable + extend ::ActiveRecord::ConnectionHandling + extend ::ActiveRecord::QueryCache::ClassMethods + extend ::ActiveRecord::Querying + 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 ::ActiveRecord::Integration::ClassMethods + extend ::ActiveRecord::Validations::ClassMethods + extend ::ActiveRecord::CounterCache::ClassMethods + extend ::ActiveModel::AttributeRegistration::ClassMethods + extend ::ActiveRecord::Attributes::ClassMethods + extend ::ActiveRecord::Locking::Optimistic::ClassMethods + extend ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods + extend ::ActiveModel::AttributeMethods::ClassMethods + extend ::ActiveRecord::AttributeMethods::ClassMethods + extend ::ActiveRecord::AttributeMethods::Read::ClassMethods + extend ::ActiveRecord::AttributeMethods::Write::ClassMethods + extend ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods + extend ::ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods + extend ::ActiveRecord::AttributeMethods::Serialization::ClassMethods + extend ::ActiveRecord::Callbacks::ClassMethods + extend ::ActiveModel::Validations::Callbacks::ClassMethods + extend ::ActiveRecord::Timestamp::ClassMethods + extend ::ActiveRecord::Associations::ClassMethods + extend ::ActiveModel::SecurePassword::ClassMethods + extend ::ActiveRecord::SecurePassword::ClassMethods + extend ::ActiveRecord::AutosaveAssociation::ClassMethods + extend ::ActiveRecord::NestedAttributes::ClassMethods + extend ::ActiveRecord::Transactions::ClassMethods + extend ::ActiveRecord::NoTouching::ClassMethods + extend ::ActiveRecord::Reflection::ClassMethods + extend ::ActiveRecord::Store::ClassMethods + extend ::ActiveRecord::SecureToken::ClassMethods + extend ::ActiveRecord::TokenFor::ClassMethods + extend ::ActiveRecord::SignedId::ClassMethods + extend ::ActiveRecord::Suppressor::ClassMethods + extend ::ActiveRecord::Normalization::ClassMethods + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _before_commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _create_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _destroy_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _find_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _rollback_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_before_commit_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_commit_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_create_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_destroy_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_find_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_initialize_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_rollback_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_save_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_touch_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_update_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validate_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validation_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _save_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _touch_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _update_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validation_callbacks; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/reflection.rb#53 + def attachment_reflections; end + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/reflection.rb#53 + def attachment_reflections?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns?; 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/reflection.rb#14 + def automatically_invert_plural_associations; end + + # source://activerecord//lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; 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#183 + def column_for_attribute(name, &_arg1); end + + # source://activerecord//lib/active_record/counter_cache.rb#10 + def counter_cached_association_names; end + + # source://activerecord//lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord//lib/active_record/core.rb#98 + def default_connection_handler; end + + # source://activerecord//lib/active_record/core.rb#98 + def default_connection_handler?; end + + # source://activerecord//lib/active_record/core.rb#100 + def default_role; end + + # source://activerecord//lib/active_record/core.rb#100 + 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#102 + def default_shard; end + + # source://activerecord//lib/active_record/core.rb#102 + def default_shard?; end + + # source://activerecord//lib/active_record/enum.rb#167 + def defined_enums; end + + # source://activerecord//lib/active_record/enum.rb#167 + def defined_enums?; end + + # source://activerecord//lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end + + # source://activerecord//lib/active_record/core.rb#37 + def destroy_association_async_job(&_arg0); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/serializers/json.rb#15 + def include_root_in_json; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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#22 + def logger; end + + # source://activerecord//lib/active_record/core.rb#22 + def logger?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); 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/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes=(_arg0); end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts?; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates; end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates?; end + + # source://activerecord//lib/active_record/model_schema.rb#168 + def pluralize_table_names; end + + # source://activerecord//lib/active_record/model_schema.rb#168 + def pluralize_table_names?; end + + # source://activerecord//lib/active_record/model_schema.rb#163 + def primary_key_prefix_type; end + + # source://activerecord//lib/active_record/model_schema.rb#163 + 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#43 + def store_full_class_name; end + + # source://activerecord//lib/active_record/inheritance.rb#43 + def store_full_class_name?; end + + # source://activerecord//lib/active_record/inheritance.rb#47 + def store_full_sti_class; end + + # source://activerecord//lib/active_record/inheritance.rb#47 + def store_full_sti_class?; end + + # source://activerecord//lib/active_record/model_schema.rb#164 + def table_name_prefix; end + + # source://activerecord//lib/active_record/model_schema.rb#164 + def table_name_prefix?; end + + # source://activerecord//lib/active_record/model_schema.rb#165 + def table_name_suffix; end + + # source://activerecord//lib/active_record/model_schema.rb#165 + 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#183 + def type_for_attribute(*_arg0, **_arg1, &_arg2); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _attr_readonly; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _attr_readonly=(new_value); end + + # source://activerecord//lib/active_record/readonly_attributes.rb#11 + def _attr_readonly?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _before_commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _before_commit_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _commit_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _counter_cache_columns; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _counter_cache_columns=(new_value); end + + # source://activerecord//lib/active_record/counter_cache.rb#9 + def _counter_cache_columns?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _create_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _create_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _destroy_association_async_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _destroy_association_async_job=(new_value); end + + # source://activerecord//lib/active_record/core.rb#24 + def _destroy_association_async_job?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _destroy_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _destroy_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _find_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _find_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _initialize_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _initialize_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activerecord//lib/active_record/reflection.rb#11 + def _reflections?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _rollback_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _rollback_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _save_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _save_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _touch_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _touch_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _update_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _update_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validate_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validation_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validation_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_find(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_initialize(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_touch(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_update(*args, **options, &block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def aggregate_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def aggregate_reflections=(new_value); end + + # source://activerecord//lib/active_record/reflection.rb#12 + def aggregate_reflections?; end + + # source://activerecord//lib/active_record/core.rb#109 + def application_record_class?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_storage/reflection.rb#53 + def attachment_reflections?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attribute_aliases; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attribute_aliases=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attribute_method_patterns; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attribute_method_patterns=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attributes_for_inspect; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attributes_for_inspect=(new_value); end + + # source://activerecord//lib/active_record/core.rb#107 + def attributes_for_inspect?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def automatic_scope_inversing; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def automatic_scope_inversing=(new_value); end + + # source://activerecord//lib/active_record/reflection.rb#13 + def automatic_scope_inversing?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def automatically_invert_plural_associations; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def automatically_invert_plural_associations=(new_value); end + + # source://activerecord//lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_update(*args, **options, &block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def belongs_to_required_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def belongs_to_required_by_default=(new_value); end + + # source://activerecord//lib/active_record/core.rb#89 + def belongs_to_required_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def cache_timestamp_format; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def cache_timestamp_format=(new_value); end + + # source://activerecord//lib/active_record/integration.rb#16 + def cache_timestamp_format?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def cache_versioning; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def cache_versioning=(new_value); end + + # source://activerecord//lib/active_record/integration.rb#24 + def cache_versioning?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def collection_cache_versioning; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def collection_cache_versioning=(new_value); end + + # source://activerecord//lib/active_record/integration.rb#32 + def collection_cache_versioning?; end + + # source://activerecord//lib/active_record/core.rb#77 + def configurations; end + + # source://activerecord//lib/active_record/core.rb#71 + def configurations=(config); end + + # source://activerecord//lib/active_record/core.rb#193 + def connected_to_stack; end + + # source://activerecord//lib/active_record/core.rb#207 + def connection_class; end + + # source://activerecord//lib/active_record/core.rb#203 + def connection_class=(b); end + + # source://activerecord//lib/active_record/core.rb#211 + def connection_class?; end + + # source://activerecord//lib/active_record/core.rb#215 + def connection_class_for_self; end + + # source://activerecord//lib/active_record/core.rb#121 + def connection_handler; end + + # source://activerecord//lib/active_record/core.rb#125 + def connection_handler=(handler); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def counter_cached_association_names; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def counter_cached_association_names=(new_value); end + + # source://activerecord//lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord//lib/active_record/core.rb#184 + def current_preventing_writes; end + + # source://activerecord//lib/active_record/core.rb#147 + def current_role; end + + # source://activerecord//lib/active_record/core.rb#165 + def current_shard; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_column_serializer; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_column_serializer=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_connection_handler; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_connection_handler=(new_value); end + + # source://activerecord//lib/active_record/core.rb#98 + def default_connection_handler?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_role; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_role=(new_value); end + + # source://activerecord//lib/active_record/core.rb#100 + def default_role?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_scope_override; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_scope_override=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_scopes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_scopes=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_shard; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_shard=(new_value); end + + # source://activerecord//lib/active_record/core.rb#102 + def default_shard?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord//lib/active_record/enum.rb#167 + def defined_enums?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def destroy_association_async_batch_size; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def destroy_association_async_batch_size=(new_value); end + + # source://activerecord//lib/active_record/core.rb#27 + def destroy_association_async_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def destroy_association_async_job=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def encrypted_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def encrypted_attributes=(new_value); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 + def encrypted_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def enumerate_columns_in_select_statements; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def enumerate_columns_in_select_statements=(new_value); end + + # source://activerecord//lib/active_record/core.rb#87 + def enumerate_columns_in_select_statements?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def generated_token_verifier; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def generated_token_verifier=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def has_many_inversing; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def has_many_inversing=(new_value); end + + # source://activerecord//lib/active_record/core.rb#94 + def has_many_inversing?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def immutable_strings_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def immutable_strings_by_default=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#170 + def immutable_strings_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def implicit_order_column; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def implicit_order_column=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#169 + def implicit_order_column?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def include_root_in_json; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def include_root_in_json=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/serializers/json.rb#15 + def include_root_in_json?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def inheritance_column; end + + # source://activerecord//lib/active_record/model_schema.rb#326 + def inheritance_column=(value); end + + # source://activerecord//lib/active_record/model_schema.rb#172 + def inheritance_column?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def internal_metadata_table_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def internal_metadata_table_name=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#167 + def internal_metadata_table_name?; end + + # source://activerecord//lib/active_record/store.rb#101 + def local_stored_attributes; end + + # source://activerecord//lib/active_record/store.rb#101 + def local_stored_attributes=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def lock_optimistically; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def lock_optimistically=(new_value); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#56 + def lock_optimistically?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def logger=(new_value); end + + # source://activerecord//lib/active_record/core.rb#22 + def logger?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def nested_attributes_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def nested_attributes_options=(new_value); end + + # source://activerecord//lib/active_record/nested_attributes.rb#15 + def nested_attributes_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def normalized_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def normalized_attributes=(new_value); end + + # source://activerecord//lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def param_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def partial_inserts; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def partial_inserts=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def partial_updates; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def partial_updates=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def pluralize_table_names; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def pluralize_table_names=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#168 + def pluralize_table_names?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def primary_key_prefix_type; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def primary_key_prefix_type=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#163 + def primary_key_prefix_type?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def record_timestamps; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def record_timestamps=(new_value); end + + # source://activerecord//lib/active_record/timestamp.rb#47 + def record_timestamps?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(new_value); end + + # source://activerecord//lib/active_record/core.rb#96 + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def schema_migrations_table_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def schema_migrations_table_name=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#166 + def schema_migrations_table_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def shard_selector; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def shard_selector=(new_value); end + + # source://activerecord//lib/active_record/core.rb#104 + def shard_selector?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def signed_id_verifier_secret; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def signed_id_verifier_secret=(new_value); end + + # source://activerecord//lib/active_record/signed_id.rb#13 + def signed_id_verifier_secret?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def skip_time_zone_conversion_for_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def skip_time_zone_conversion_for_attributes=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#71 + def skip_time_zone_conversion_for_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def store_full_class_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def store_full_class_name=(new_value); end + + # source://activerecord//lib/active_record/inheritance.rb#43 + def store_full_class_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def store_full_sti_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def store_full_sti_class=(new_value); end + + # source://activerecord//lib/active_record/inheritance.rb#47 + def store_full_sti_class?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def strict_loading_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def strict_loading_by_default=(new_value); end + + # source://activerecord//lib/active_record/core.rb#91 + def strict_loading_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def strict_loading_mode; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def strict_loading_mode=(new_value); end + + # source://activerecord//lib/active_record/core.rb#92 + def strict_loading_mode?; end + + # source://activerecord//lib/active_record/core.rb#230 + def strict_loading_violation!(owner:, reflection:); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def table_name_prefix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def table_name_prefix=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#164 + def table_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def table_name_suffix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def table_name_suffix=(new_value); end + + # source://activerecord//lib/active_record/model_schema.rb#165 + def table_name_suffix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def time_zone_aware_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def time_zone_aware_attributes=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#70 + def time_zone_aware_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def time_zone_aware_types; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def time_zone_aware_types=(new_value); end + + # source://activerecord//lib/active_record/attribute_methods/time_zone_conversion.rb#72 + def time_zone_aware_types?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def token_definitions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def token_definitions=(new_value); end + + private + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _inheritance_column=(new_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 + +# = Active Record \Batches +# +# source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#4 +module ActiveRecord::Batches + # Looping through a collection of records from the database + # (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 cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column 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. + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.find_each(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. + # + # Limits are honored, and if present there is no requirement for the batch + # size: it can be less than, equal to, or greater than the limit. + # + # 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 cursor column is + # orderable (e.g. an integer or string). + # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # + # 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#85 + def find_each(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), cursor: 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 cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column 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. + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.find_in_batches(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. + # + # Limits are honored, and if present there is no requirement for the batch + # size: it can be less than, equal to, or greater than the limit. + # + # 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 cursor column is + # orderable (e.g. an integer or string). + # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # + # 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#161 + def find_in_batches(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), cursor: 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 cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column 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. + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting + # of :asc or :desc). Defaults to +:asc+. + # + # class Order < ActiveRecord::Base + # self.primary_key = [:id_1, :id_2] + # end + # + # Order.in_batches(order: [:asc, :desc]) + # + # In the above code, +id_1+ is sorted in ascending order and +id_2+ in descending order. + # + # * :use_ranges - Specifies whether to use range iteration (id >= x AND id <= y). + # It can make iterating over the whole or almost whole tables several times faster. + # Only whole table iterations use this style of iteration by default. You can disable this behavior by passing +false+. + # If you iterate over the table and the only condition is, e.g., archived_at: nil (and only a tiny fraction + # of the records are archived), it makes sense to opt in to this approach. + # + # Limits are honored, and if present there is no requirement for the batch + # size, it can be less than, equal, or greater than the limit. + # + # 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 cursor column is + # orderable (e.g. an integer or string). + # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # + # 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#259 + 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), cursor: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil), &block); end + + private + + # source://activerecord//lib/active_record/relation/batches.rb#369 + def act_on_ignored_order(error_on_ignore); end + + # source://activerecord//lib/active_record/relation/batches.rb#341 + def apply_finish_limit(relation, cursor, finish, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#328 + def apply_limits(relation, cursor, start, finish, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#334 + def apply_start_limit(relation, cursor, start, batch_orders); end + + # source://activerecord//lib/active_record/relation/batches.rb#348 + def batch_condition(relation, cursor, values, operators); end + + # source://activerecord//lib/active_record/relation/batches.rb#379 + def batch_on_loaded_relation(relation:, start:, finish:, cursor:, order:, batch_limit:); end + + # source://activerecord//lib/active_record/relation/batches.rb#426 + def batch_on_unloaded_relation(relation:, start:, finish:, load:, cursor:, order:, use_ranges:, remaining:, batch_limit:); end + + # source://activerecord//lib/active_record/relation/batches.rb#363 + def build_batch_orders(cursor, order); end + + # This is a custom implementation of `<=>` operator, + # which also takes into account how the collection will be ordered. + # + # source://activerecord//lib/active_record/relation/batches.rb#414 + def compare_values_for_order(values1, values2, order); end + + # source://activerecord//lib/active_record/relation/batches.rb#305 + def ensure_valid_options_for_batching!(cursor, start, finish, order); end + + # source://activerecord//lib/active_record/relation/batches.rb#408 + def record_cursor_values(record, cursor); 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:, cursor:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil)); end + + # The size of the batches yielded by the BatchEnumerator. + # + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#28 + 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#66 + def delete_all; end + + # Destroys records in batches. Returns the total number of rows affected. + # + # 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#97 + 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#108 + 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#53 + 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#22 + def finish; end + + # The relation from which the BatchEnumerator yields batches. + # + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#25 + 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#19 + def start; end + + # Touches records in batches. Returns the total number of rows affected. + # + # Person.in_batches.touch_all + # + # See Relation#touch_all for details of how each batch is touched. + # + # source://activerecord//lib/active_record/relation/batches/batch_enumerator.rb#86 + def touch_all(*_arg0, **_arg1, &_arg2); 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#75 + def update_all(updates); end +end + +# source://activerecord//lib/active_record/relation/batches.rb#9 +ActiveRecord::Batches::DEFAULT_ORDER = T.let(T.unsafe(nil), Symbol) + +# source://activerecord//lib/active_record/relation/batches.rb#8 +ActiveRecord::Batches::ORDER_IGNORE_MESSAGE = T.let(T.unsafe(nil), String) + +# = Active Record \Calculations +# +# source://activerecord//lib/active_record/relation/calculations.rb#7 +module ActiveRecord::Calculations + # Same as #average, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#122 + def async_average(column_name); end + + # Same as #count, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#108 + def async_count(column_name = T.unsafe(nil)); end + + # Same as #ids, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#405 + def async_ids; end + + # Same as #maximum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#152 + def async_maximum(column_name); end + + # Same as #minimum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#137 + def async_minimum(column_name); end + + # Same as #pick, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#359 + def async_pick(*column_names); end + + # Same as #pluck, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#330 + def async_pluck(*column_names); end + + # Same as #sum, but performs the query asynchronously and returns an + # ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/relation/calculations.rb#182 + def async_sum(identity_or_column = T.unsafe(nil)); end + + # Calculates the average value on a given column. Returns +nil+ if there's + # no row. See #calculate for examples with options. + # + # Person.average(:age) # => 35.8 + # + # source://activerecord//lib/active_record/relation/calculations.rb#116 + 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#217 + 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", "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. + # + # When given a block, loads all records in the relation, if the relation + # hasn't been loaded yet. Calls the block with each record in the relation. + # Returns the number of records for which the block returns a truthy value. + # + # Person.count { |person| person.age > 21 } + # # => counts the number of people older that 21 + # + # Note: If there are a lot of records in the relation, loading all records + # could result in performance issues. + # + # source://activerecord//lib/active_record/relation/calculations.rb#94 + def count(column_name = T.unsafe(nil)); end + + # Returns the base model's ID's for the relation using the table's primary key + # + # Person.ids # SELECT people.id FROM people + # Person.joins(:company).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id + # + # source://activerecord//lib/active_record/relation/calculations.rb#367 + 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#146 + 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#131 + 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#348 + 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] + # + # Comment.joins(:person).pluck(:id, person: [:id]) + # # SELECT comments.id, people.id FROM comments INNER JOIN people on comments.person_id = people.id + # # => [[1, 2], [2, 2]] + # + # 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#287 + 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 + # + # When given a block, loads all records in the relation, if the relation + # hasn't been loaded yet. Calls the block with each record in the relation. + # Returns the sum of +initial_value_or_column+ and the block return + # values: + # + # Person.sum { |person| person.age } # => 4562 + # Person.sum(1000) { |person| person.age } # => 5562 + # + # Note: If there are a lot of records in the relation, loading all records + # could result in performance issues. + # + # source://activerecord//lib/active_record/relation/calculations.rb#172 + def sum(initial_value_or_column = T.unsafe(nil), &block); end + + private + + # source://activerecord//lib/active_record/relation/calculations.rb#449 + def aggregate_column(column_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/calculations.rb#410 + def all_attributes?(column_names); end + + # source://activerecord//lib/active_record/relation/calculations.rb#664 + def build_count_subquery(relation, column_name, distinct); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/calculations.rb#657 + def build_count_subquery?(operation, column_name, distinct); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/calculations.rb#445 + def distinct_select?(column_name); end + + # source://activerecord//lib/active_record/relation/calculations.rb#502 + def execute_grouped_calculation(operation, column_name, distinct); end + + # source://activerecord//lib/active_record/relation/calculations.rb#461 + def execute_simple_calculation(operation, column_name, distinct); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/calculations.rb#414 + def has_include?(column_name); end + + # source://activerecord//lib/active_record/relation/calculations.rb#589 + def lookup_cast_type_from_join_dependencies(name, join_dependencies = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/calculations.rb#457 + def operation_over_aggregate_column(column, operation, distinct); end + + # source://activerecord//lib/active_record/relation/calculations.rb#418 + def perform_calculation(operation, column_name); end + + # source://activerecord//lib/active_record/relation/calculations.rb#632 + def select_for_count; end + + # source://activerecord//lib/active_record/relation/calculations.rb#614 + def type_cast_calculated_value(value, operation, type); end + + # source://activerecord//lib/active_record/relation/calculations.rb#597 + def type_cast_pluck_values(result, columns); end + + # source://activerecord//lib/active_record/relation/calculations.rb#584 + def type_for(field, &block); end +end + +# source://activerecord//lib/active_record/relation/calculations.rb#8 +class ActiveRecord::Calculations::ColumnAliasTracker + # @return [ColumnAliasTracker] a new instance of ColumnAliasTracker + # + # source://activerecord//lib/active_record/relation/calculations.rb#9 + def initialize(connection); end + + # source://activerecord//lib/active_record/relation/calculations.rb#14 + def alias_for(field); end + + private + + # 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#35 + def column_alias_for(field); end + + # source://activerecord//lib/active_record/relation/calculations.rb#44 + def truncate(name); 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+. +# This applies to all non-transactional callbacks, and to +before_commit+. +# +# For transactional +after_+ callbacks (+after_commit+, +after_rollback+, etc), the order +# can be set via configuration. +# +# config.active_record.run_after_transaction_callbacks_in_order_defined = false +# +# When set to +true+ (the default from \Rails 7.1), callbacks are executed in the order they +# are defined, just like the example above. When set to +false+, the order is reversed, so +# +do_something_else+ is executed before +log_children+. +# +# == \Transactions +# +# 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#278 +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#419 + def destroy; end + + # source://activerecord//lib/active_record/callbacks.rb#435 + def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/callbacks.rb#431 + def touch(*_arg0, **_arg1); end + + private + + # source://activerecord//lib/active_record/callbacks.rb#444 + def _create_record; end + + # source://activerecord//lib/active_record/callbacks.rb#448 + def _update_record; end + + # source://activerecord//lib/active_record/callbacks.rb#440 + def create_or_update(**_arg0); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://activerecord//lib/active_record/callbacks.rb#281 +ActiveRecord::Callbacks::CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/callbacks.rb#288 +module ActiveRecord::Callbacks::ClassMethods + include ::ActiveModel::Callbacks +end + +# source://activerecord//lib/active_record.rb#125 +module ActiveRecord::Coders; end + +# source://activerecord//lib/active_record/coders/column_serializer.rb#5 +class ActiveRecord::Coders::ColumnSerializer + # @return [ColumnSerializer] a new instance of ColumnSerializer + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#9 + def initialize(attr_name, coder, object_class = T.unsafe(nil)); end + + # Public because it's called by Type::Serialized + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#46 + def assert_valid_value(object, action:); end + + # Returns the value of attribute coder. + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#7 + def coder; end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#22 + def dump(object); end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#16 + def init_with(coder); end + + # source://activerecord//lib/active_record/coders/column_serializer.rb#29 + def load(payload); end + + # Returns the value of attribute object_class. + # + # source://activerecord//lib/active_record/coders/column_serializer.rb#6 + def object_class; end + + private + + # source://activerecord//lib/active_record/coders/column_serializer.rb#54 + def check_arity_of_constructor; end +end + +# source://activerecord//lib/active_record/coders/json.rb#5 +module 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 < ::ActiveRecord::Coders::ColumnSerializer + # @return [YAMLColumn] a new instance of YAMLColumn + # + # source://activerecord//lib/active_record/coders/yaml_column.rb#59 + def initialize(attr_name, object_class = T.unsafe(nil), permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/coders/yaml_column.rb#77 + def coder; end + + # source://activerecord//lib/active_record/coders/yaml_column.rb#68 + def init_with(coder); end + + private + + # source://activerecord//lib/active_record/coders/yaml_column.rb#88 + def check_arity_of_constructor; end +end + +# source://activerecord//lib/active_record/coders/yaml_column.rb#8 +class ActiveRecord::Coders::YAMLColumn::SafeCoder + # @return [SafeCoder] a new instance of SafeCoder + # + # source://activerecord//lib/active_record/coders/yaml_column.rb#9 + def initialize(permitted_classes: T.unsafe(nil), unsafe_load: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/coders/yaml_column.rb#15 + def dump(object); end + + # source://activerecord//lib/active_record/coders/yaml_column.rb#33 + def load(payload); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#187 +class ActiveRecord::CompositePrimaryKeyMismatchError < ::ActiveRecord::ActiveRecordError + # @return [CompositePrimaryKeyMismatchError] a new instance of CompositePrimaryKeyMismatchError + # + # source://activerecord//lib/active_record/associations/errors.rb#190 + def initialize(reflection = T.unsafe(nil)); end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/errors.rb#188 + def reflection; end +end + +# source://activerecord//lib/active_record/migration.rb#188 +class ActiveRecord::ConcurrentMigrationError < ::ActiveRecord::MigrationError + # @return [ConcurrentMigrationError] a new instance of ConcurrentMigrationError + # + # source://activerecord//lib/active_record/migration.rb#192 + def initialize(message = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/migration.rb#189 +ActiveRecord::ConcurrentMigrationError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) + +# source://activerecord//lib/active_record/migration.rb#190 +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#390 +class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/connection_adapters.rb#6 +module ActiveRecord::ConnectionAdapters + extend ::ActiveSupport::Autoload + + class << self + # Registers a custom database adapter. + # + # Can also be used to define aliases. + # + # == Example + # + # ActiveRecord::ConnectionAdapters.register("megadb", "MegaDB::ActiveRecordAdapter", "mega_db/active_record_adapter") + # + # ActiveRecord::ConnectionAdapters.register("mysql", "ActiveRecord::ConnectionAdapters::TrilogyAdapter", "active_record/connection_adapters/trilogy_adapter") + # + # source://activerecord//lib/active_record/connection_adapters.rb#22 + def register(name, class_name, path = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters.rb#26 + def resolve(adapter_name); end + end +end + +# = Active Record Abstract Adapter +# +# Active Record supports multiple database systems. AbstractAdapter and +# related classes form the abstraction layer which makes this possible. +# An AbstractAdapter represents a connection to a database, and provides an +# 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.lease_connection}[rdoc-ref:ConnectionHandling#lease_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#31 +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 + extend ::ActiveRecord::ConnectionAdapters::Quoting::ClassMethods + + # @return [AbstractAdapter] a new instance of AbstractAdapter + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#126 + def initialize(config_or_deprecated_connection, deprecated_logger = T.unsafe(nil), deprecated_connection_options = T.unsafe(nil), deprecated_config = T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _checkin_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _checkout_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_checkin_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + 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#659 + 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#356 + def adapter_name; end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#591 + def add_enum_value(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#606 + def advisory_locks_enabled?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#565 + 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#843 + def build_insert_sql(insert); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#814 + def case_insensitive_comparison(attribute, value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#810 + def case_sensitive_comparison(attribute, value); end + + # Override to check all foreign key constraints in a database. + # The adapter should raise a +ActiveRecord::StatementInvalid+ if foreign key + # constraints are not met. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#644 + def check_all_foreign_keys_valid!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#207 + def check_if_write_query(sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#858 + def check_version; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#783 + def clean!; end + + # Clear any caching the database adapter may be doing. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#740 + def clear_cache!(new_connection: T.unsafe(nil)); end + + # Check the connection back in to the connection pool + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#830 + def close; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#778 + def connect!; end + + # Checks whether the connection to the database was established. This doesn't + # include checking whether the database is actually capable of responding, i.e. + # whether the connection is stale. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#652 + def connected?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#292 + def connection_class; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#217 + def connection_retries; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def create(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#579 + def create_enum(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support virtual tables + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#599 + def create_virtual_table(*_arg0); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#365 + def database_exists?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#854 + def database_version; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#834 + def default_index_type?(index); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#229 + def default_timezone; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#806 + def default_uniqueness_comparison(attribute, value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def delete(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support extensions + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#571 + def disable_extension(name, **_arg1); end + + # Override to turn off referential integrity while executing &block. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#637 + 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#715 + 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#701 + def disconnect!; end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#583 + def drop_enum(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support virtual tables + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#603 + def drop_virtual_table(*_arg0); end + + # This is meant to be implemented by the adapters that support extensions + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#575 + def enable_extension(name, **_arg1); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def exec_insert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def exec_query(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def execute(*_arg0, **_arg1, &_arg2); end + + # this method must only be called while holding connection pool's mutex + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#313 + 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#625 + def extensions; 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#614 + def get_advisory_lock(lock_id); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#851 + def get_database_version; end + + # Returns the value of attribute owner. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 + def in_use?; end + + # A list of index algorithms, to be filled by adapters that support them. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#630 + def index_algorithms; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#175 + def inspect; end + + # this method must only be called while holding connection pool's mutex + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#277 + def lease; end + + # Returns the value of attribute lock. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 + def lock; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#182 + def lock_thread=(lock_thread); end + + # Returns the value of attribute logger. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 + def logger; end + + # Returns the value of attribute owner. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 + def owner; end + + # Returns the value of attribute pool. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#44 + def pool; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#48 + def pool=(value); end + + # Should primary key values be selected from their corresponding + # sequence before the insert statement? If true, next_sequence_value + # is called before each insert to set the record's primary key. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#405 + def prefetch_primary_key?(table_name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#244 + def prepared_statements; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#244 + def prepared_statements?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#249 + def prepared_statements_disabled_cache; end + + # Determines whether writes are currently being prevented. + # + # Returns true if the connection is a replica or returns + # the value of +current_preventing_writes+. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#237 + 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. + # + # Active Record cannot track if the database is getting modified using + # this client. If that is the case, generally you'll want to invalidate + # the query cache using +ActiveRecord::Base.clear_query_cache+. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#798 + def raw_connection; end + + # Disconnects from the database if already connected, and establishes a new + # connection with the database. Implementors should define private #reconnect + # instead. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#665 + def reconnect!(restore_transactions: T.unsafe(nil)); end + + # This is meant to be implemented by the adapters that support advisory + # locks. + # + # Return true if we released the lock, otherwise false + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#621 + def release_advisory_lock(lock_id); end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#587 + def rename_enum(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support custom enum types + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#595 + def rename_enum_value(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#213 + 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#753 + 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. + # + # If a database driver or protocol does not support such a feature, + # implementors may alias this to #reconnect!. Otherwise, implementors + # should call super immediately after resetting the connection (and while + # still holding @lock). + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#727 + def reset!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def restart_db_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#221 + def retry_deadline; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#561 + def return_value_after_insert?(column); end + + # The role (e.g. +:writing+) for the current connection. In a + # non-multi role application, +:writing+ is returned. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#298 + def role; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def rollback_db_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def rollback_to_savepoint(*_arg0, **_arg1, &_arg2); end + + # Do TransactionRollbackErrors on savepoints affect the parent + # transaction? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#389 + def savepoint_errors_invalidate_transactions?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#308 + def schema_cache; 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#865 + def schema_version; end + + # Seconds since this connection was returned to the pool + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#342 + 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#304 + 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#329 + def steal!; end + + # Does this adapter support application-enforced advisory locking? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#398 + def supports_advisory_locks?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#378 + def supports_bulk_alter?; end + + # Does this adapter support creating check constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#470 + 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#505 + 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#510 + def supports_comments_in_create?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#529 + def supports_common_table_expressions?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#553 + def supports_concurrent_connections?; end + + # Does this adapter support datetime with precision? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#495 + 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#374 + def supports_ddl_transactions?; end + + # Does this adapter support creating deferrable constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#465 + def supports_deferrable_constraints?; end + + # Does this adapter support creating exclusion constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#475 + def supports_exclusion_constraints?; end + + # Does this adapter support explain? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#434 + def supports_explain?; end + + # Does this adapter support expression indices? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#429 + def supports_expression_index?; end + + # Does this adapter support database extensions? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#444 + def supports_extensions?; end + + # Does this adapter support creating foreign key constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#455 + def supports_foreign_keys?; end + + # Does this adapter support foreign/external tables? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#520 + def supports_foreign_tables?; end + + # Does this adapter support including non-key columns? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#424 + def supports_index_include?; end + + # Does this adapter support index sort order? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#414 + 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#450 + def supports_indexes_in_create?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#549 + def supports_insert_conflict_target?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#541 + def supports_insert_on_duplicate_skip?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#545 + def supports_insert_on_duplicate_update?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#537 + def supports_insert_returning?; end + + # Does this adapter support JSON data type? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#500 + def supports_json?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#533 + def supports_lazy_transactions?; end + + # Does this adapter support materialized views? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#490 + def supports_materialized_views?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#557 + def supports_nulls_not_distinct?; end + + # Does this adapter support optimizer hints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#525 + def supports_optimizer_hints?; end + + # Does this adapter support partial indices? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#419 + def supports_partial_index?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#409 + def supports_partitioned_indexes?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#393 + def supports_restart_db_transaction?; end + + # Does this adapter support savepoints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#383 + 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#439 + def supports_transaction_isolation?; end + + # Does this adapter support creating unique constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#480 + def supports_unique_constraints?; end + + # Does this adapter support creating invalid constraints? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#460 + def supports_validate_constraints?; end + + # Does this adapter support views? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#485 + def supports_views?; end + + # Does this adapter support virtual columns? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#515 + def supports_virtual_columns?; end + + # Removes the connection from the pool and disconnect it. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#734 + def throw_away!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def truncate(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def truncate_tables(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#347 + def unprepared_statement; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#23 + def update(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#272 + 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#760 + def verify!; end + + # Returns the value of attribute visitor. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#45 + def visitor; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#197 + def with_instrumenter(instrumenter, &block); end + + private + + # Returns a raw connection for internal use with methods that are known + # to both be thread-safe and not rely upon actual server communication. + # This is useful for e.g. string escaping methods. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1084 + def any_raw_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1181 + def arel_visitor; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1073 + def backoff(counter); end + + # Builds the result object. + # + # This is an internal hook to make possible connection adapters to build + # custom result objects with connection-specific data. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1192 + def build_result(columns:, rows:, column_types: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1185 + def build_statement_pool; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#824 + def can_perform_case_insensitive_comparison_for?(column); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1167 + def collector; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1156 + def column_for(table_name, column_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1162 + def column_for_attribute(attribute); end + + # Perform any necessary initialization upon the newly-established + # connection settings, run queries to configure any application-global + # "session" variables, etc. + # + # Implementations may assume this method will only be called while + # holding @lock (or from #initialize). + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1203 + def configure_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1207 + def default_prepared_statements; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1101 + def extended_type_map_key; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1059 + def invalidate_transaction(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1129 + def log(sql, name = T.unsafe(nil), binds = T.unsafe(nil), type_casted_binds = T.unsafe(nil), async: T.unsafe(nil), &block); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1077 + def reconnect; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#946 + def reconnect_can_restore_state?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1054 + def retryable_connection_error?(exception); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1066 + def retryable_query_error?(exception); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1146 + def translate_exception(exception, message:, sql:, binds:); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1117 + def translate_exception_class(native_error, sql, binds); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1107 + def type_map; end + + # Similar to any_raw_connection, but ensures it is validated and + # connected. Any method called on this result still needs to be + # independently thread-safe, so it probably shouldn't talk to the + # server... but some drivers fail if they know the connection has gone + # away. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1093 + def valid_raw_connection; end + + # Mark the connection as verified. Call this inside a + # `with_raw_connection` block only when the block is guaranteed to + # exercise the raw connection. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1050 + def verified!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#1211 + def warning_ignored?(warning); end + + # Lock the monitor, ensure we're properly connected and + # transactions are materialized, and then yield the underlying + # raw connection object. + # + # If +allow_retry+ is true, a connection-related exception will + # cause an automatic reconnect and re-run of the block, up to + # the connection's configured +connection_retries+ setting + # and the configured +retry_deadline+ limit. (Note that when + # +allow_retry+ is true, it's possible to return without having marked + # the connection as verified. If the block is guaranteed to exercise the + # connection, consider calling `verified!` to avoid needless + # verification queries in subsequent calls.) + # + # If +materialize_transactions+ is false, the block will be run without + # ensuring virtual transactions have been materialized in the DB + # server's state. The active transaction will also remain clean + # (if it is not already dirty), meaning it's able to be restored + # by reconnecting and opening an equivalent-depth set of new + # transactions. This should only be used by transaction control + # methods, and internal transaction-agnostic queries. + # + # + # + # It's not the primary use case, so not something to optimize + # for, but note that this method does need to be re-entrant: + # +materialize_transactions+ will re-enter if it has work to do, + # and the yield block can also do so under some circumstances. + # + # In the latter case, we really ought to guarantee the inner + # call will not reconnect (which would interfere with the + # still-yielded connection in the outer block), but we currently + # provide no special enforcement there. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#983 + def with_raw_connection(allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _checkin_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _checkin_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _checkout_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _checkout_callbacks=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#87 + def build_read_query_regexp(*parts); end + + # Does the database for this adapter exist? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#361 + def database_exists?(config); end + + # Opens a database console session. + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#122 + def dbconsole(config, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#877 + def extended_type_map(default_timezone:); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#93 + def find_cmd_and_exec(commands, *args); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#870 + def register_class_with_precision(mapping, key, klass, **kwargs); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#66 + def type_cast_config_to_boolean(config); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#56 + def type_cast_config_to_integer(config); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#74 + def validate_default_timezone(config); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#937 + def extract_limit(sql_type); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#933 + def extract_precision(sql_type); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#926 + def extract_scale(sql_type); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#886 + def initialize_type_map(m); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#919 + def register_class_with_limit(mapping, key, klass); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#32 +ActiveRecord::ConnectionAdapters::AbstractAdapter::ADAPTER_NAME = T.let(T.unsafe(nil), String) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#42 +ActiveRecord::ConnectionAdapters::AbstractAdapter::COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#84 +ActiveRecord::ConnectionAdapters::AbstractAdapter::DEFAULT_READ_QUERY = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#195 +ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#194 +ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#943 +ActiveRecord::ConnectionAdapters::AbstractAdapter::EXTENDED_TYPE_MAPS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#41 +ActiveRecord::ConnectionAdapters::AbstractAdapter::SIMPLE_INT = T.let(T.unsafe(nil), Regexp) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#942 +ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP = T.let(T.unsafe(nil), ActiveRecord::Type::TypeMap) + +# source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#253 +class ActiveRecord::ConnectionAdapters::AbstractAdapter::Version + include ::Comparable + + # @return [Version] a new instance of Version + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#258 + def initialize(version_string, full_version_string = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#263 + def <=>(version_string); end + + # Returns the value of attribute full_version_string. + # + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#256 + def full_version_string; end + + # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#267 + def to_s; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#11 +module ActiveRecord::ConnectionAdapters::AbstractPool; end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#114 +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#621 +class ActiveRecord::ConnectionAdapters::AlterTable + # @return [AlterTable] a new instance of AlterTable + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#626 + def initialize(td); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#645 + def add_check_constraint(expression, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#653 + def add_column(name, type, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#637 + def add_foreign_key(to_table, options); end + + # Returns the value of attribute adds. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#622 + def adds; end + + # Returns the value of attribute check_constraint_adds. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#624 + def check_constraint_adds; end + + # Returns the value of attribute check_constraint_drops. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#624 + def check_constraint_drops; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#649 + def drop_check_constraint(constraint_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#641 + def drop_foreign_key(name); end + + # Returns the value of attribute foreign_key_adds. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#623 + def foreign_key_adds; end + + # Returns the value of attribute foreign_key_drops. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#623 + def foreign_key_drops; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#635 + def name; end +end + +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#143 +class ActiveRecord::ConnectionAdapters::BoundSchemaReflection + # @return [BoundSchemaReflection] a new instance of BoundSchemaReflection + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#160 + def initialize(abstract_schema_reflection, pool); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#185 + def add(name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#173 + def cached?(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#165 + def clear!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#217 + def clear_data_source_cache!(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#193 + def columns(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#197 + def columns_hash(table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#201 + def columns_hash?(table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#181 + def data_source_exists?(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#189 + def data_sources(name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#221 + def dump_to(filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#205 + def indexes(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#169 + def load!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#177 + def primary_keys(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#213 + def size; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#209 + def version; end + + class << self + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#155 + def for_lone_connection(abstract_schema_reflection, connection); end + end +end + +# :nodoc +# +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#144 +class ActiveRecord::ConnectionAdapters::BoundSchemaReflection::FakePool + # @return [FakePool] a new instance of FakePool + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#145 + def initialize(connection); end + + # @yield [@connection] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#149 + def with_connection; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#118 +class ActiveRecord::ConnectionAdapters::ChangeColumnDefaultDefinition < ::Struct + # Returns the value of attribute column + # + # @return [Object] the current value of column + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + def column=(_); end + + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#116 +class ActiveRecord::ConnectionAdapters::ChangeColumnDefinition < ::Struct + # Returns the value of attribute column + # + # @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#174 +class ActiveRecord::ConnectionAdapters::CheckConstraintDefinition < ::Struct + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#188 + def defined_for?(name:, expression: T.unsafe(nil), validate: T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#184 + def export_name_on_schema_dump?; end + + # Returns the value of attribute expression + # + # @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#175 + 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#179 + def validate?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#179 + 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#75 + def ==(other); end + + # whether the column is auto-populated by the database using a sequence + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#67 + def auto_incremented_by_db?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#71 + def auto_populated?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#34 + 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#75 + 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#87 + 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#99 + def virtual?; end + + private + + # source://activerecord//lib/active_record/connection_adapters/column.rb#104 + 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#79 +class ActiveRecord::ConnectionAdapters::ColumnDefinition < ::Struct + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#109 + def aliased_types(name, fallback); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def collation; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def collation=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def comment; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def comment=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def default; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def default=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def if_exists; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def if_exists=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def if_not_exists; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def if_not_exists=(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def limit; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + 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#99 + def null; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + 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#99 + def precision; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + def precision=(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#93 + def primary_key?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#99 + def scale; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#103 + 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#80 +ActiveRecord::ConnectionAdapters::ColumnDefinition::OPTION_NAMES = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#300 +module ActiveRecord::ConnectionAdapters::ColumnMethods + extend ::ActiveSupport::Concern + + 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#305 + 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#329 + def define_column_methods(*column_types); end +end + +# = Active Record Connection Handler +# +# ConnectionHandler is a collection of ConnectionPool objects. It is used +# for keeping separate connection pools that connect to different databases. +# +# 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#56 +class ActiveRecord::ConnectionAdapters::ConnectionHandler + # @return [ConnectionHandler] a new instance of ConnectionHandler + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#73 + 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#154 + def active_connections?(role = T.unsafe(nil)); 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#161 + def clear_active_connections!(role = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#175 + 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#171 + 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#197 + def connected?(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + + # Returns the pools for a connection handler and given role. If +:all+ is passed, + # all pools belonging to the connection handler will be returned. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#92 + def connection_pool_list(role = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#86 + def connection_pool_names; end + + # Returns the pools for a connection handler and given role. If +:all+ is passed, + # all pools belonging to the connection handler will be returned. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#92 + def connection_pools(role = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#101 + def each_connection_pool(role = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#112 + def establish_connection(config, owner_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil), clobber: T.unsafe(nil)); end + + # Disconnects all currently idle connections. + # + # See ConnectionPool#flush! for details. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#182 + def flush_idle_connections!(role = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#78 + def prevent_writes; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#82 + def prevent_writes=(prevent_writes); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#202 + def remove_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + + # Locate the connection of the nearest super class. This can be an + # active or defined connection: if it is the latter, it will be + # opened and set as the active connection for the class it was defined + # for (not necessarily the current class). + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#190 + def retrieve_connection(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + + # Retrieving the connection pool happens a lot, so we cache it in @connection_name_to_pool_manager. + # This makes retrieving the connection pool O(1) once the process is warm. + # When a connection is established or removed, we invalidate the cache. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#211 + def retrieve_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil), strict: T.unsafe(nil)); end + + private + + # Returns the value of attribute connection_name_to_pool_manager. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#237 + def connection_name_to_pool_manager; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#279 + def determine_owner_name(owner_name, config); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#253 + def disconnect_pool_from_pool_manager(pool_manager, role, shard); end + + # Returns the pool manager for a connection name / identifier. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#240 + def get_pool_manager(connection_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#249 + def pool_managers; 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#272 + def resolve_pool_config(config, connection_name, role, shard); end + + # Get the existing pool manager or initialize and assign a new one. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#245 + def set_pool_manager(connection_name); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#57 +class ActiveRecord::ConnectionAdapters::ConnectionHandler::StringConnectionName + # @return [StringConnectionName] a new instance of StringConnectionName + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#60 + def initialize(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#68 + def current_preventing_writes; end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#58 + def name; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_handler.rb#64 + def primary_class?; end +end + +# = Active Record Connection Pool +# +# 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, or the +checkout_timeout+ has expired. +# +# == Obtaining (checking out) a connection +# +# Connections can be obtained and used from a connection pool in several +# ways: +# +# 1. Simply use {ActiveRecord::Base.lease_connection}[rdoc-ref:ConnectionHandling#lease_connection]. +# When you're done with the connection(s) and wish it to be returned to the pool, you call +# {ActiveRecord::Base.connection_handler.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. +# This is the default behavior for Active Record when used in conjunction with +# Action Pack's request handling cycle. +# 2. Manually check out a connection from the pool with +# {ActiveRecord::Base.connection_pool.checkout}[rdoc-ref:#checkout]. You are responsible for +# 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). +# +# While a thread has a connection checked out from the pool using one of the +# above three methods, that connection will automatically be the one used +# by ActiveRecord queries executing on that thread. It is not required to +# explicitly pass the checked out connection to \Rails models or queries, for +# example. +# +# == Options +# +# There are several connection-pooling-related options that you can add to +# 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#7 +class ActiveRecord::ConnectionAdapters::ConnectionPool + include ::ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration + include ::MonitorMixin + 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/query_cache.rb#117 + def initialize(*_arg0, **_arg1, &_arg2); 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 + # #lease_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#352 + def active_connection; 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 + # #lease_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#352 + def active_connection?; end + + # Returns the value of attribute async_executor. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + def async_executor; end + + # Returns the value of attribute automatic_reconnect. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#190 + 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#190 + 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#546 + 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#523 + def checkout(checkout_timeout = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#132 + def checkout_and_verify(connection); end + + # Returns the value of attribute checkout_timeout. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#190 + 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#190 + 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#481 + 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#505 + 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#403 + def connected?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#294 + def connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#343 + def connection_class; 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#418 + def connections; end + + # Returns the value of attribute db_config. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + 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#460 + def discard!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#470 + 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#428 + 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#451 + 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#619 + 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#641 + def flush!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#247 + def inspect; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#275 + def internal_metadata; end + + # Retrieve the connection associated with the current thread, or call + # #checkout to obtain one if necessary. + # + # #lease_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#284 + def lease_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#263 + def migration_context; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#267 + def migrations_paths; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#646 + def num_waiting_in_queue; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#290 + def permanent_lease?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#302 + def pin_connection!(lock_thread); end + + # Returns the value of attribute pool_config. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + 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#596 + def reap; end + + # Returns the value of attribute reaper. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + 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 + # #lease_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#364 + def release_connection(existing_lease = 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#564 + def remove(conn); end + + # Returns the value of attribute role. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + def role; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#667 + def schedule_query(future_result); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#254 + def schema_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#271 + def schema_migration; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#193 + def schema_reflection(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#258 + def schema_reflection=(schema_reflection); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#193 + def server_version(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute shard. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + def shard; end + + # Returns the value of attribute size. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#191 + def size; end + + # Returns the connection pool's usage statistic. + # + # ActiveRecord::Base.connection_pool.stat # => { size: 15, connections: 1, busy: 1, dead: 0, idle: 0, waiting: 0, checkout_timeout: 5 } + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#653 + def stat; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#317 + def unpin_connection!; end + + # Yields a connection from the connection pool to the block. If no connection + # is already checked out by the current thread, a connection will be checked + # out from the pool, yielded to the block, and then returned to the pool when + # the block is finished. If a connection has already been checked out on the + # current thread, such as via #lease_connection or #with_connection, that existing + # connection will be the one yielded and it will not be returned to the pool + # automatically at the end of the block; it is expected that such an existing + # connection will be properly returned to the pool by the code that checked + # it out. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#381 + def with_connection(prevent_permanent_checkout: T.unsafe(nil)); 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#825 + def acquire_connection(checkout_timeout); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#895 + def adopt_connection(conn); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#716 + 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#677 + def build_async_executor; end + + # -- + # this is unfortunately not concurrent + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#695 + def bulk_make_new_connections(num_new_conns_needed); end + + # -- + # Must be called in a synchronize block. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#765 + def checkout_for_exclusive_access(checkout_timeout); end + + # @raise [ConnectionNotEstablished] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#906 + def checkout_new_connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#673 + def connection_lease; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#855 + 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#850 + 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#850 + 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#868 + 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#709 + 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#785 + 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#137 +module ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#177 + def with_a_bias_for(thread); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#138 +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#141 + def initialize(lock, other_cond, preferred_thread); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#148 + def broadcast; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#153 + def broadcast_on_biased; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#158 + def signal; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#167 + 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#198 +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#202 + def internal_poll(timeout); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#141 +class ActiveRecord::ConnectionAdapters::ConnectionPool::Lease + # @return [Lease] a new instance of Lease + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#144 + def initialize; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#156 + def clear(connection); end + + # Returns the value of attribute connection. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def connection; end + + # Sets the attribute connection + # + # @param value the value to set the attribute connection to. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def connection=(_arg0); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#149 + def release; end + + # Returns the value of attribute sticky. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def sticky; end + + # Sets the attribute sticky + # + # @param value the value to set the attribute sticky to. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def sticky=(_arg0); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#167 +class ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry + # @return [LeaseRegistry] a new instance of LeaseRegistry + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#168 + def initialize; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#173 + def [](context); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#179 + def clear; end +end + +# = Active Record Connection Pool \Queue +# +# Threadsafe, fair, LIFO queue. Meant to be used by ConnectionPool +# with which it shares a Monitor. +# +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#12 +class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue + # @return [Queue] a new instance of Queue + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#13 + 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#36 + 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#21 + def any_waiting?; end + + # Remove all elements from the queue. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#51 + 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#44 + 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#29 + 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#71 + 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#85 + 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#93 + def can_remove_no_wait?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#76 + 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#105 + 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#98 + def remove; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#80 + 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#111 + def wait_poll(timeout); end +end + +# = Active Record Connection Pool \Reaper +# +# Every +frequency+ seconds, the reaper will call +reap+ and +flush+ on +# +pool+. A reaper instantiated with a zero frequency will never reap +# the connection pool. +# +# Configure the frequency by setting +reaping_frequency+ in your database +# YAML file (default 60 seconds). +# +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 +class ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper + # @return [Reaper] a new instance of Reaper + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#19 + def initialize(pool, frequency); end + + # Returns the value of attribute frequency. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 + def frequency; end + + # Returns the value of attribute pool. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 + def pool; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#71 + def run; end + + class << self + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#29 + def register_pool(pool, frequency); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#40 + def spawn_thread(frequency); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#120 +class ActiveRecord::ConnectionAdapters::ConnectionPool::WeakThreadKeyMap + # FIXME: On 3.3 we could use ObjectSpace::WeakKeyMap + # but it currently cause GC crashes: https://github.com/byroot/rails/pull/3 + # + # @return [WeakThreadKeyMap] a new instance of WeakThreadKeyMap + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#123 + def initialize; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#131 + def [](key); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#135 + def []=(key, value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#127 + def clear; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#120 +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#21 + 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#16 + def table_alias_length; end + + # Returns the maximum length of a table name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#11 + def table_name_length; end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_limits.rb#26 + 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#405 + 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#410 + def begin_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#412 + def begin_deferred_transaction(isolation_level = T.unsafe(nil)); 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#432 + def begin_isolated_db_transaction(isolation); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + 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#56 + 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#446 + def commit_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + 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+. + # Some adapters support the `returning` keyword argument which allows defining the return value of the method: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # an array of is returned from the method representing values of the specified columns from the inserted row. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#195 + def create(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + def current_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#468 + 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#212 + def delete(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + def dirty_current_transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + def disable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#498 + def empty_insert_statement_value(primary_key = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + 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#165 + def exec_delete(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end + + # Executes insert +sql+ statement in the context of this connection using + # +binds+ as the bind substitutes. +name+ is logged along with + # the executed +sql+ statement. + # Some adapters support the `returning` keyword argument which allows to control the result of the query: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # the result will contain values of the specified columns from the inserted row. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#157 + def exec_insert(sql, name = T.unsafe(nil), binds = T.unsafe(nil), pk = T.unsafe(nil), sequence_name = T.unsafe(nil), returning: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#176 + 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. + # + # Note: the query is assumed to have side effects and the query cache + # will be cleared. If the query is read-only, consider using #select_all + # instead. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#147 + 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#462 + def exec_restart_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#456 + 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#172 + def exec_update(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end + + # Executes the SQL statement in the context of this connection and returns + # the raw result from the connection adapter. + # + # Setting +allow_retry+ to true causes the db to reconnect and retry + # executing the SQL statement in case of a connection-related exception. + # This option should only be enabled for known idempotent queries. + # + # Note: the query is assumed to have side effects and the query cache + # will be cleared. If the query is read-only, consider using #select_all + # instead. + # + # Note: depending on your database connector, the result returned by this + # method may be manually memory managed. Consider using #exec_query + # wrapper instead. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#136 + def execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#180 + def explain(arel, binds = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with + # arbitrary precision date/time columns. + # + # 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#536 + 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+. + # Some adapters support the `returning` keyword argument which allows defining the return value of the method: + # `nil` is the default value and maintains default behavior. If an array of column names is passed - + # an array of is returned from the method representing values of the specified columns from the inserted row. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#195 + def insert(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end + + # Inserts the given fixture into the table. Overridden in adapters that require + # something beyond a simple insert (e.g. Oracle). + # Most of adapters should implement +insert_fixtures_set+ that leverages bulk SQL insert. + # We keep this method to provide fallback + # for databases like SQLite that do not support bulk inserts. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#482 + def insert_fixture(fixture, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#486 + def insert_fixtures_set(fixture_set, tables_to_delete = T.unsafe(nil)); end + + # Execute a query and returns an ActiveRecord::Result + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#546 + def internal_exec_query(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#372 + def mark_transaction_written_if_write(sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + def materialize_transactions(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + def open_transactions(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#113 + def query(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#105 + def query_value(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#109 + def query_values(*_arg0, **_arg1, &_arg2); end + + # Same as raw_execute but returns an ActiveRecord::Result object. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#541 + def raw_exec_query(*_arg0, **_arg1, &_arg2); end + + # Hook point called after an isolated DB transaction is committed + # or rolled back. + # Most adapters don't need to implement anything because the isolation + # level is set on a per transaction basis. + # But some databases like SQLite set it on a per connection level + # and need to explicitly reset it after commit or rollback. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#442 + def reset_isolation_level; end + + # Set the sequence to the max value of the table's column. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#473 + def reset_sequence!(table, column, sequence = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#383 + def reset_transaction(restore: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#458 + def restart_db_transaction; end + + # Rolls back the transaction (and turns on auto-committing). Must be + # done if the transaction block raises an exception or returns false. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#450 + def rollback_db_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#464 + def rollback_to_savepoint(name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + 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#508 + def sanitize_limit(limit); end + + # Returns an ActiveRecord::Result instance. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#69 + def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: 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#84 + def select_one(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end + + # Returns an array of arrays containing the field values. + # Order is the same as that returned by +columns+. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#101 + def select_rows(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end + + # Returns a single value from a record + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#89 + def select_value(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end + + # Returns an array of the values of the first column in a select: + # select_values("SELECT id FROM companies LIMIT 3") => [1,2,3] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#95 + 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. + # + # == Transaction callbacks + # + # #transaction yields an ActiveRecord::Transaction object on which it is + # possible to register callback: + # + # ActiveRecord::Base.transaction do |transaction| + # transaction.before_commit { puts "before commit!" } + # transaction.after_commit { puts "after commit!" } + # transaction.after_rollback { puts "after rollback!" } + # end + # + # == 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.lease_connection.transaction do # BEGIN + # Model.lease_connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 + # Model.lease_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, trilogy, and postgresql adapters support setting the transaction + # isolation level. + # :args: (requires_new: nil, isolation: nil, &block) + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#352 + 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#420 + def transaction_isolation_levels; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#365 + def transaction_manager; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#379 + def transaction_open?; end + + # Executes the truncate statement. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#218 + def truncate(table_name, name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#222 + 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#206 + 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#519 + def with_yaml_fallback(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#367 + 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#118 + def write_query?(sql); end + + private + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#570 + def affected_rows(raw_result); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#732 + def arel_from_relation(relation); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#607 + def build_fixture_sql(fixtures, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#649 + def build_fixture_statements(fixture_set); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#656 + def build_truncate_statement(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#660 + def build_truncate_statements(table_names); end + + # Receive a native adapter result object and returns an ActiveRecord::Result object. + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#566 + def cast_result(raw_result); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#666 + def combine_multi_statements(total_sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#603 + def default_insert_value(column); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#594 + def execute_batch(statements, name = T.unsafe(nil), **kwargs); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#740 + def extract_table_ref_from_insert_sql(sql); end + + # Same as #internal_exec_query, but yields a native adapter result + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#589 + def internal_execute(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#719 + def last_inserted_id(result); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#561 + def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notification_payload:, batch:); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#574 + def preprocess_query(sql); end + + # Lowest level way to execute a query. Doesn't check for illegal writes, doesn't annotate queries, yields a native result object. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#552 + def raw_execute(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil), batch: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#723 + def returning_column_values(result); end + + # Returns an ActiveRecord::Result instance. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#671 + def select(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#727 + def single_value_from_rows(rows); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#702 + def sql_for_insert(sql, pk, binds, returning); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#17 + def to_sql_and_binds(arel_or_sql_string, binds = T.unsafe(nil), preparable = T.unsafe(nil), allow_retry = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/database_statements.rb#600 +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#528 +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#124 +class ActiveRecord::ConnectionAdapters::ForeignKeyDefinition < ::Struct + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#129 + def column; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#149 + def custom_primary_key?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#145 + def deferrable; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#162 + def defined_for?(to_table: T.unsafe(nil), validate: T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#158 + 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#125 + def name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#137 + def on_delete; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#141 + 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#133 + 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#153 + def validate?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#153 + def validated?; end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#169 + 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#9 +class ActiveRecord::ConnectionAdapters::IndexDefinition + # @return [IndexDefinition] a new instance of IndexDefinition + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#12 + def initialize(table, name, unique = T.unsafe(nil), columns = T.unsafe(nil), lengths: T.unsafe(nil), orders: T.unsafe(nil), opclasses: T.unsafe(nil), where: T.unsafe(nil), type: T.unsafe(nil), using: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), comment: T.unsafe(nil), valid: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#47 + def column_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def columns; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def comment; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#55 + def defined_for?(columns = T.unsafe(nil), name: T.unsafe(nil), unique: T.unsafe(nil), valid: T.unsafe(nil), include: T.unsafe(nil), nulls_not_distinct: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def include; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def lengths; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def nulls_not_distinct; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def opclasses; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def orders; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def table; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def type; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def unique; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def using; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def valid; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#43 + def valid?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#10 + def where; end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#66 + def concise_options(options); end +end + +# source://activerecord//lib/active_record/connection_adapters/column.rb#115 +class ActiveRecord::ConnectionAdapters::NullColumn < ::ActiveRecord::ConnectionAdapters::Column + # @return [NullColumn] a new instance of NullColumn + # + # source://activerecord//lib/active_record/connection_adapters/column.rb#116 + def initialize(name, **_arg1); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#14 +class ActiveRecord::ConnectionAdapters::NullPool + include ::ActiveRecord::ConnectionAdapters::AbstractPool + + # @return [NullPool] a new instance of NullPool + # + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#24 + def initialize; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#42 + def async_executor; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#40 + def checkin(_); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#39 + def connection_class; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#44 + def db_config; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#48 + def dirties_query_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#41 + def remove(_); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#38 + def schema_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#34 + def schema_reflection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#30 + def server_version(connection); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#22 +ActiveRecord::ConnectionAdapters::NullPool::NULL_CONFIG = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullPool::NullConfig) + +# source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#17 +class ActiveRecord::ConnectionAdapters::NullPool::NullConfig + # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#18 + def method_missing(*_arg0, **_arg1, &_arg2); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#110 +class ActiveRecord::ConnectionAdapters::NullTransaction + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#115 + def add_record(record, _ = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#123 + def after_commit; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#124 + def after_rollback; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#122 + def before_commit; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#112 + def closed?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#118 + def dirty!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#117 + def dirty?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#120 + def invalidate!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#119 + def invalidated?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#114 + def joinable?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#121 + def materialized?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#113 + def open?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#116 + def restartable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#111 + def state; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#125 + def user_transaction; end +end + +# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#5 +class ActiveRecord::ConnectionAdapters::PoolConfig + include ::MonitorMixin + + # @return [PoolConfig] a new instance of PoolConfig + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#29 + def initialize(connection_class, db_config, role, shard); end + + # Returns the value of attribute connection_class. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#10 + def connection_class; end + + # Sets the attribute connection_class + # + # @param value the value to set the attribute connection_class to. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#10 + def connection_class=(_arg0); end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#44 + def connection_name; end + + # Returns the value of attribute db_config. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 + def db_config; end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#69 + def discard_pool!; end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#52 + def disconnect!(automatic_reconnect: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#65 + def pool; end + + # Returns the value of attribute role. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 + def role; end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#12 + def schema_reflection; end + + # Sets the attribute schema_reflection + # + # @param value the value to set the attribute schema_reflection to. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#9 + def schema_reflection=(_arg0); end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#40 + def server_version(connection); end + + # Sets the attribute server_version + # + # @param value the value to set the attribute server_version to. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#9 + def server_version=(_arg0); end + + # Returns the value of attribute shard. + # + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 + def shard; end + + class << self + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#20 + def discard_pools!; end + + # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#24 + def disconnect_all!; end + end +end + +# source://activerecord//lib/active_record/connection_adapters/pool_config.rb#16 +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#26 + def each_pool_config(role = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#44 + def get_pool_config(role, shard); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#18 + def pool_configs(role = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#40 + def remove_pool_config(role, shard); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#36 + def remove_role(role); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#14 + def role_names; end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#48 + def set_pool_config(role, shard, pool_config); end + + # source://activerecord//lib/active_record/connection_adapters/pool_manager.rb#10 + def shard_names; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#122 +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#8 +module ActiveRecord::ConnectionAdapters::QueryCache + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#196 + def initialize(*_arg0); end + + # Enable the query cache within the block. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#206 + def cache(&block); 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#232 + def clear_query_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#222 + def disable_query_cache!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#210 + def enable_query_cache!; end + + # Returns the value of attribute query_cache. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#194 + def query_cache; end + + # Sets the attribute query_cache + # + # @param value the value to set the attribute query_cache to. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#194 + def query_cache=(_arg0); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#201 + def query_cache_enabled; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#236 + def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end + + # Disable the query cache within the block. + # + # Set dirties: false to prevent query caches on all connections from being cleared by write operations. + # (By default, write operations dirty all connections' query caches in case they are replicas whose cache would now be outdated.) + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#218 + def uncached(dirties: T.unsafe(nil), &block); end + + private + + # Database adapters can override this method to + # provide custom cache information. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#308 + def cache_notification_info(sql, name, binds); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#300 + def cache_notification_info_result(sql, name, binds, result); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#278 + def cache_sql(sql, name, binds); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#260 + def lookup_sql_cache(sql, name, binds); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#256 + def unset_query_cache!; end + + class << self + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#20 + def dirties_query_cache(base, *method_names); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#12 + def included(base); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#116 +module ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#117 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#132 + def checkout_and_verify(connection); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#177 + def clear_query_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#173 + def dirties_query_cache; end + + # Disable the query cache within the block. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#139 + def disable_query_cache(dirties: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#164 + def disable_query_cache!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#149 + def enable_query_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#159 + def enable_query_cache!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#187 + def query_cache; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#169 + def query_cache_enabled; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#9 +ActiveRecord::ConnectionAdapters::QueryCache::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#97 +class ActiveRecord::ConnectionAdapters::QueryCache::QueryCacheRegistry + # @return [QueryCacheRegistry] a new instance of QueryCacheRegistry + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#98 + def initialize; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#109 + def clear; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#103 + def compute_if_absent(context); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#34 +class ActiveRecord::ConnectionAdapters::QueryCache::Store + # @return [Store] a new instance of Store + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#39 + def initialize(version, max_size); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#58 + def [](key); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#83 + def clear; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#67 + def compute_if_absent(key); end + + # Returns the value of attribute dirties. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties; end + + # Sets the attribute dirties + # + # @param value the value to set the attribute dirties to. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties=(_arg0); end + + # Returns the value of attribute dirties. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#53 + def empty?; end + + # Returns the value of attribute enabled. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled=(_arg0); end + + # Returns the value of attribute enabled. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#48 + def size; end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/query_cache.rb#89 + def check_version; end +end + +# = Active Record Connection Adapters \Quoting +# +# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#9 +module ActiveRecord::ConnectionAdapters::Quoting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::ConnectionAdapters::Quoting::ClassMethods + + # Cast a value to be used as a bound parameter of unknown type. For example, + # MySQL might perform dangerous castings when comparing a string to a number, + # so this method will cast numbers to string. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#112 + def cast_bound_value(value); 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#125 + 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#73 + def quote(value); end + + # Quotes the column name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#136 + def quote_column_name(column_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#157 + 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#131 + def quote_string(s); end + + # Quotes the table name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#141 + def quote_table_name(table_name); end + + # Override to return the quoted table name for assignment. Defaults to + # table quoting. + # + # This works for MySQL where table.column can be used to + # resolve ambiguity. + # + # We override this in the sqlite3 and postgresql adapters to use only + # the column name (as per syntax requirements). + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#153 + def quote_table_name_for_assignment(table, attr); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#206 + 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#184 + def quoted_date(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#174 + def quoted_false; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#201 + def quoted_time(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#166 + def quoted_true; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#210 + 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#94 + def type_cast(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#178 + def unquoted_false; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#170 + def unquoted_true; end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#234 + def lookup_cast_type(sql_type); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#224 + def type_casted_binds(binds); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#12 +module ActiveRecord::ConnectionAdapters::Quoting::ClassMethods + # 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#18 + def column_name_matcher; end + + # 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#44 + def column_name_with_order_matcher; end + + # Quotes the column name. Must be implemented by subclasses + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#61 + def quote_column_name(column_name); end + + # Quotes the table name. Defaults to column name quoting. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/quoting.rb#66 + def quote_table_name(table_name); end +end + +# = Active Record Real \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#449 +class ActiveRecord::ConnectionAdapters::RealTransaction < ::ActiveRecord::ConnectionAdapters::Transaction + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#487 + def commit; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#450 + def materialize!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#464 + def restart; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#478 + def rollback; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#195 +class ActiveRecord::ConnectionAdapters::ReferenceDefinition + # @return [ReferenceDefinition] a new instance of ReferenceDefinition + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#196 + def initialize(name, polymorphic: T.unsafe(nil), index: T.unsafe(nil), foreign_key: T.unsafe(nil), type: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#216 + def add(table_name, connection); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#230 + def add_to(table); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#247 + def as_options(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#285 + def column_name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#289 + def column_names; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#277 + def columns; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#251 + def conditional_options; end + + # Returns the value of attribute foreign_key. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def foreign_key; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#273 + def foreign_key_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#293 + def foreign_table_name; end + + # Returns the value of attribute index. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def index; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#263 + def index_options(table_name); end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def name; end + + # Returns the value of attribute options. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def options; end + + # Returns the value of attribute polymorphic. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def polymorphic; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#259 + def polymorphic_index_name(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#255 + def polymorphic_options; end + + # Returns the value of attribute type. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#245 + def type; end +end + +# = Active Record Restart Parent \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#376 +class ActiveRecord::ConnectionAdapters::RestartParentTransaction < ::ActiveRecord::ConnectionAdapters::Transaction + # @return [RestartParentTransaction] a new instance of RestartParentTransaction + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#377 + def initialize(connection, parent_transaction, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#396 + def commit; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#400 + def full_rollback?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#389 + def materialize!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#389 + def materialized?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#389 + def restart(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#391 + def rollback; end +end + +# = Active Record Savepoint \Transaction +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#404 +class ActiveRecord::ConnectionAdapters::SavepointTransaction < ::ActiveRecord::ConnectionAdapters::Transaction + # @return [SavepointTransaction] a new instance of SavepointTransaction + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#405 + def initialize(connection, savepoint_name, parent_transaction, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#439 + def commit; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#445 + def full_rollback?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#417 + def materialize!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#422 + def restart; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#431 + def rollback; end +end + +# = Active Record Connection Adapters \Savepoints +# +# source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#6 +module ActiveRecord::ConnectionAdapters::Savepoints + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#11 + def create_savepoint(name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#7 + def current_savepoint_name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#15 + def exec_rollback_to_savepoint(name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/savepoints.rb#19 + def release_savepoint(name = T.unsafe(nil)); end +end + +# = Active Record Connection Adapters Schema Cache +# +# source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#227 +class ActiveRecord::ConnectionAdapters::SchemaCache + # @return [SchemaCache] a new instance of SchemaCache + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#255 + def initialize; end + + # Add internal cache for table with +table_name+. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#326 + def add(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#396 + def add_all(pool); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#294 + def cached?(table_name); end + + # Clear out internal caches for the data source +name+. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#388 + def clear_data_source_cache!(_connection, name); end + + # Get the columns for a table + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#338 + def columns(pool, 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#352 + def columns_hash(pool, 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#359 + def columns_hash?(_pool, table_name); end + + # A cached lookup for table existence. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#309 + def data_source_exists?(pool, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#406 + def dump_to(filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#273 + def encode_with(coder); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#363 + def indexes(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#281 + def init_with(coder); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#416 + def marshal_dump; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#420 + def marshal_load(array); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#298 + def primary_keys(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#379 + def schema_version; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#383 + def size; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#375 + def version(pool); end + + private + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#448 + def deep_deduplicate(value); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#440 + def derive_columns_hash_and_deduplicate_values; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#436 + def ignored_table?(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#264 + def initialize_dup(other); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#461 + def open(filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#428 + def tables_to_cache(pool); end + + class << self + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#228 + def _load_from(filename); end + + private + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#244 + 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#176 + def action_sql(action, dependency); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#151 + def add_column_options!(sql, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#142 + def add_table_options!(create_sql, o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#147 + def column_options(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + 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#134 + 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_exclusion_constraints?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_index_include?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#138 + def supports_index_using?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_indexes_in_create?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_nulls_not_distinct?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_partial_index?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def supports_unique_constraints?(*_arg0, **_arg1, &_arg2); end + + # Returns any SQL string to go between CREATE and TABLE. May be nil. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#172 + def table_modifier_in_create(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#166 + def to_sql(sql); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def type_to_sql(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#16 + def use_foreign_keys?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#126 + def visit_AddCheckConstraint(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#40 + def visit_AddColumnDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#95 + def visit_AddForeignKey(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#24 + def visit_AlterTable(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#122 + def visit_CheckConstraintDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#33 + def visit_ColumnDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#103 + def visit_CreateIndexDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#130 + def visit_DropCheckConstraint(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#99 + def visit_DropForeignKey(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#82 + def visit_ForeignKeyDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#78 + def visit_PrimaryKeyDefinition(o); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_creation.rb#44 + 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/schema_cache.rb#7 +class ActiveRecord::ConnectionAdapters::SchemaReflection + # @return [SchemaReflection] a new instance of SchemaReflection + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#16 + def initialize(cache_path, cache = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#41 + def add(pool, name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#79 + def cached?(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#21 + def clear!; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#73 + def clear_data_source_cache!(pool, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#49 + def columns(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#53 + def columns_hash(pool, table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#57 + def columns_hash?(pool, table_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#37 + def data_source_exists?(pool, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#45 + def data_sources(pool, name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#91 + def dump_to(pool, filename); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#61 + def indexes(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#27 + def load!(pool); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#33 + def primary_keys(pool, table_name); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#69 + def size(pool); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#65 + def version(pool); end + + private + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#106 + def cache(pool); end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#100 + def empty_cache; end + + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#116 + def load_cache(pool); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#110 + def possible_cache_available?; end + + class << self + # Returns the value of attribute check_schema_cache_dump_version. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#10 + def check_schema_cache_dump_version; end + + # Sets the attribute check_schema_cache_dump_version + # + # @param value the value to set the attribute check_schema_cache_dump_version to. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#10 + def check_schema_cache_dump_version=(_arg0); end + + # Returns the value of attribute use_schema_cache_dump. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#9 + def use_schema_cache_dump; end + + # Sets the attribute use_schema_cache_dump + # + # @param value the value to set the attribute use_schema_cache_dump to. + # + # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#9 + def use_schema_cache_dump=(_arg0); end + end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#8 +module ActiveRecord::ConnectionAdapters::SchemaStatements + include ::ActiveRecord::Migration::JoinTable + + # 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. + # + # 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#1063 + 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_. + # [:if_not_exists] + # Silently ignore if the constraint already exists, rather than raise an error. + # [:validate] + # (PostgreSQL only) Specify whether or not the constraint should be validated. Defaults to +true+. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1293 + def add_check_constraint(table_name, expression, if_not_exists: T.unsafe(nil), **options); end + + # Add a new +type+ column named +column_name+ to +table_name+. + # + # 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. + # * :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..65], :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#636 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#643 + 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 composite foreign key + # + # Assuming "carts" table has "(shop_id, user_id)" as a primary key. + # + # add_foreign_key :orders, :carts, primary_key: [:shop_id, :user_id] + # + # generates: + # + # ALTER TABLE "orders" ADD CONSTRAINT fk_rails_6f5e4cb3a4 FOREIGN KEY ("cart_shop_id", "cart_user_id") REFERENCES "carts" ("shop_id", "user_id") + # + # ====== Creating a cascading foreign key + # + # add_foreign_key :articles, :authors, on_delete: :cascade + # + # 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". + # Pass an array to create a composite foreign key. + # [:primary_key] + # The primary key column name on +to_table+. Defaults to +id+. + # Pass an array to create a composite foreign key. + # [:name] + # The constraint name. Defaults to fk_rails_. + # [:on_delete] + # 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#1173 + 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 that includes additional columns + # + # add_index(:accounts, :branch_id, include: :party_id) + # + # generates: + # + # CREATE INDEX index_accounts_on_branch_id ON accounts USING btree(branch_id) INCLUDE (party_id) + # + # Note: only supported by PostgreSQL. + # + # ====== Creating an index where NULLs are treated equally + # + # add_index(:people, :last_name, nulls_not_distinct: true) + # + # generates: + # + # CREATE INDEX index_people_on_last_name ON people (last_name) NULLS NOT DISTINCT + # + # Note: only supported by PostgreSQL version 15.0.0 and greater. + # + # ====== 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) -- PostgreSQL + # + # add_index(:developers, :name, algorithm: :inplace) + # # CREATE INDEX `index_developers_on_name` ON `developers` (`name`) ALGORITHM = INPLACE -- MySQL + # + # Note: only supported by PostgreSQL and MySQL. + # + # 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#915 + def add_index(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1470 + 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. + # + # 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#1063 + 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#1453 + def add_timestamps(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1358 + def assume_migrated_upto_version(version); end + + # Builds an AlterTable object for adding a column to a table. + # + # This definition object contains information about the column that would be created + # if the same arguments were passed to #add_column. See #add_column for information about + # passing a +table_name+, +column_name+, +type+ and other options that can be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#654 + def build_add_column_definition(table_name, column_name, type, **options); end + + # Builds a ChangeColumnDefaultDefinition object. + # + # This definition object contains information about the column change that would occur + # if the same arguments were passed to #change_column_default. See #change_column_default for + # information about passing a +table_name+, +column_name+, +type+ and other options that can be passed. + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#738 + def build_change_column_default_definition(table_name, column_name, default_or_changes); end + + # Builds a CreateIndexDefinition object. + # + # This definition object contains information about the index that would be created + # if the same arguments were passed to #add_index. See #add_index for information about + # passing a +table_name+, +column_name+, and other additional options that can be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#925 + def build_create_index_definition(table_name, column_name, **options); end + + # Builds a TableDefinition object for a join table. + # + # This definition object contains information about the table that would be created + # if the same arguments were passed to #create_join_table. See #create_join_table for + # information about what arguments should be passed. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#408 + def build_create_join_table_definition(table_1, table_2, column_options: T.unsafe(nil), **options); end + + # Returns a TableDefinition object containing information about the table that would be created + # if the same arguments were passed to #create_table. See #create_table for information about + # passing a +table_name+, and other additional options that can be passed. + # + # @yield [table_definition] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#333 + def build_create_table_definition(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1549 + def bulk_change_table(table_name, operations); end + + # Changes the column's definition according to the new options. + # See TableDefinition#column for details of the options you can use. + # + # 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#711 + 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#1531 + 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#729 + 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#758 + 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#510 + def change_table(table_name, base = T.unsafe(nil), **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#1521 + def change_table_comment(table_name, comment_or_changes); end + + # Checks to see if a check constraint exists on a table for a given check constraint definition. + # + # check_constraint_exists?(:products, name: "price_check") + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1342 + def check_constraint_exists?(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1305 + 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#1273 + 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#132 + def column_exists?(table_name, column_name, type = T.unsafe(nil), **options); end + + # Returns an array of +Column+ objects for the table specified by +table_name+. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#107 + 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#1419 + 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) + # + # # Creates a table called 'paper_boxes_papers' with no id. + # create_join_table('papers', 'paper_boxes') + # + # A duplicate prefix is combined into a single prefix. This is useful for + # namespaced models like Music::Artist and Music::Record: + # + # # Creates a table called 'music_artists_records' with no id. + # create_join_table('music_artists', 'music_records') + # + # 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#389 + 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#1535 + 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 orders ( + # 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. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#293 + def create_table(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options, &block); end + + # Checks to see if the data source +name+ exists on the database. + # + # 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#1423 + def distinct_relation_for_primary_key(relation); end + + # Drops the join table specified by the given arguments. + # See #create_join_table and #drop_table for details. + # + # Although this command ignores the block if one is given, it can be helpful + # to provide one in a migration's +change+ method so it can be reverted. + # In that case, the block will be used by #create_join_table. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#427 + def drop_join_table(table_1, table_2, **options); end + + # Drops a table or tables 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 except if you provide more than one table which is not supported. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#540 + def drop_table(*table_names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1349 + def dump_schema_information; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1241 + def foreign_key_column_for(table_name, column_name); end + + # Checks to see if a foreign key exists on a table for a given foreign key definition. + # + # # 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#1237 + def foreign_key_exists?(from_table, to_table = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1246 + 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#1103 + def foreign_keys(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1498 + 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") + # + # # Check a valid index exists (PostgreSQL only) + # index_exists?(:suppliers, :company_id, valid: true) + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#102 + def index_exists?(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#992 + 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#1011 + 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#1354 + def internal_string_options_for_primary_key; end + + # Returns the maximum length of an index name in bytes. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1587 + def max_index_name_size; end + + # Returns a hash of mappings from the abstract data types to the native + # database types. See TableDefinition#column for details on the recognized + # abstract data types. + # + # 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#1511 + def options_include_default?(options); end + + # Returns just a table's primary key + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#145 + def primary_key(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1504 + def quoted_columns_for_index(column_names, options); end + + # Removes the reference(s). Also removes a +type+ column if one exists. + # + # ====== 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#1082 + 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. Removing a check constraint + # that does not exist will raise an error. + # + # remove_check_constraint :products, name: "price_check" + # + # To silently ignore a non-existent check constraint rather than raise an error, + # use the +if_exists+ option. + # + # remove_check_constraint :products, name: "price_check", if_exists: true + # + # The +expression+ parameter will be ignored if present. It can be helpful + # to provide this in a migration's +change+ method so it can be reverted. + # In that case, +expression+ will be used by #add_check_constraint. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1324 + def remove_check_constraint(table_name, expression = T.unsafe(nil), if_exists: 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#699 + 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#675 + 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#1214 + 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#966 + 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 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#1082 + 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#1462 + 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#766 + 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#980 + 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#524 + def rename_table(table_name, new_name, **_arg2); end + + # Returns an instance of SchemaCreation, which can be used to visit a schema definition + # object and return DDL. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1545 + def schema_creation; 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#1379 + 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#1466 + def update_table_definition(table_name, base); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1539 + def use_foreign_keys?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1578 + def valid_column_definition_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1582 + def valid_primary_key_options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1574 + def valid_table_definition_options; 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#1831 + def add_column_for_alter(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1616 + 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#1633 + def add_options_for_index_columns(quoted_columns, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1854 + def add_timestamps_for_alter(table_name, **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1823 + def can_remove_index_by_name?(column_name, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1837 + def change_column_default_for_alter(table_name, column_name, default_or_changes); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1791 + def check_constraint_for(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1797 + def check_constraint_for!(table_name, expression: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1781 + def check_constraint_name(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1612 + def column_options_keys; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1699 + def create_alter_table(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1695 + def create_table_definition(name, **options); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1884 + 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#1739 + def expression_column_name?(column_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1769 + def extract_foreign_key_action(specifier); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1814 + def extract_new_comment_value(default_or_changes); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1814 + def extract_new_default_value(default_or_changes); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1711 + def fetch_type_metadata(sql_type); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1759 + def foreign_key_for(from_table, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1764 + def foreign_key_for!(from_table, to_table: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1749 + def foreign_key_name(table_name, options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1777 + def foreign_keys_enabled?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1592 + def generate_index_name(table_name, column); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1722 + def index_column_names(column_names); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1641 + def index_name_for_remove(table_name, column_name, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1730 + def index_name_options(column_names); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1871 + def insert_versions_sql(versions); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1623 + def options_for_index_columns(options); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1888 + def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1827 + def reference_name_for_table(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1846 + 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#1850 + def remove_columns_for_alter(table_name, *column_names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1867 + def remove_timestamps_for_alter(table_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1682 + def rename_column_indexes(table_name, column_name, new_column_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1842 + def rename_column_sql(table_name, column_name, new_column_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1673 + def rename_table_indexes(table_name, new_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1743 + def strip_table_name_prefix_and_suffix(table_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1606 + def validate_change_column_null_argument!(value); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1703 + def validate_create_table_options!(options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1802 + def validate_index_length!(table_name, new_name, internal = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_statements.rb#1808 + def validate_table_length!(table_name); 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 + +# = Active Record Connection Adapters \Table +# +# Represents an SQL table in an abstract way for updating a table. +# Also see TableDefinition and {connection.create_table}[rdoc-ref:SchemaStatements#create_table] +# +# 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#706 +class ActiveRecord::ConnectionAdapters::Table + include ::ActiveRecord::ConnectionAdapters::ColumnMethods + extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods + + # @return [Table] a new instance of Table + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#711 + 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#862 + def belongs_to(*args, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def bigint(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def binary(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def blob(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + 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#788 + 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#800 + 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#810 + 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#920 + def check_constraint(*args, **options); end + + # Checks if a check_constraint exists on a table. + # + # unless t.check_constraint_exists?(name: "price_check") + # t.check_constraint("price > 0", name: "price_check") + # end + # + # See {connection.check_constraint_exists?}[rdoc-ref:SchemaStatements#check_constraint_exists?] + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#940 + def check_constraint_exists?(*args, **options); end + + # Adds a new column to the named table. + # + # t.column(:name, :string) + # + # See TableDefinition#column for details of the options you can use. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#721 + 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#735 + def column_exists?(column_name, type = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def date(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def datetime(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def decimal(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + 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#890 + 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#911 + 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#747 + 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#759 + def index_exists?(column_name, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def integer(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def json(*names, **options); end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#709 + def name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + 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#862 + 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#820 + 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#876 + 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#929 + 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#901 + 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#833 + 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#876 + 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#843 + 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#852 + 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#768 + def rename_index(index_name, new_index_name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def string(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def text(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def time(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + 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#777 + def timestamps(**options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def virtual(*names, **options); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#945 + def raise_on_if_exist_options(options); end +end + +# = Active Record Connection Adapters \Table \Definition +# +# Represents the schema of an SQL table in an abstract way. This class +# provides methods for manipulating the schema representation. +# +# Inside migration files, the +t+ object in {create_table}[rdoc-ref:SchemaStatements#create_table] +# is actually of this type: +# +# class SomeMigration < ActiveRecord::Migration[8.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#363 +class ActiveRecord::ConnectionAdapters::TableDefinition + include ::ActiveRecord::ConnectionAdapters::ColumnMethods + extend ::ActiveRecord::ConnectionAdapters::ColumnMethods::ClassMethods + + # @return [TableDefinition] a new instance of TableDefinition + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#368 + def initialize(conn, name, temporary: T.unsafe(nil), if_not_exists: T.unsafe(nil), options: T.unsafe(nil), as: T.unsafe(nil), comment: T.unsafe(nil), **_arg7); end + + # Returns a ColumnDefinition for the column with name +name+. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#418 + def [](name); end + + # Returns the value of attribute as. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + 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#548 + def belongs_to(*args, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def bigint(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def binary(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def blob(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def boolean(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#522 + def check_constraint(expression, **options); end + + # Returns the value of attribute check_constraints. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + 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#489 + def column(name, type, index: T.unsafe(nil), **options); end + + # Returns an array of ColumnDefinition objects for the columns of the table. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#415 + def columns; end + + # Returns the value of attribute comment. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def comment; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def date(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def datetime(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def decimal(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def float(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#518 + def foreign_key(to_table, **options); end + + # Returns the value of attribute foreign_keys. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def foreign_keys; end + + # Returns the value of attribute if_not_exists. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def if_not_exists; end + + # Adds index options to the indexes hash, keyed by column name + # 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#514 + def index(column_name, **options); end + + # Returns the value of attribute indexes. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def indexes; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def integer(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def json(*names, **options); end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def name; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#580 + def new_check_constraint_definition(expression, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#555 + def new_column_definition(name, type, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#572 + def new_foreign_key_definition(to_table, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def numeric(*names, **options); end + + # Returns the value of attribute options. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def options; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#409 + 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#548 + def references(*args, **options); end + + # remove the column +name+ from the table. + # remove_column(:account_id) + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#506 + def remove_column(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#392 + def set_primary_key(table_name, id, primary_key, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def string(*names, **options); end + + # Returns the value of attribute temporary. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#366 + def temporary; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def text(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def time(*names, **options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + 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#530 + def timestamps(**options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#332 + def virtual(*names, **options); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#598 + def aliased_types(name, fallback); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#590 + def create_column_definition(name, type, options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#602 + def integer_like_primary_key?(type, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#606 + def integer_like_primary_key_type(type, options); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#610 + def raise_on_duplicate_column(name); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/schema_definitions.rb#586 + def valid_column_definition_options; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#128 +class ActiveRecord::ConnectionAdapters::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#153 + 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#185 + def add_record(record, ensure_finalize = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#203 + def after_commit(&block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#211 + def after_rollback(&block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#195 + def before_commit(&block); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#274 + def before_commit_records; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#181 + def closed?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#298 + def commit_records; end + + # Returns the value of attribute connection. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#148 + def connection; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#169 + def dirty!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#173 + def dirty?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#327 + def full_rollback?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#233 + def incomplete!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#151 + def invalidate!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#151 + def invalidated?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute isolation_level. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#148 + def isolation_level; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#328 + def joinable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#237 + def materialize!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#242 + def materialized?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#177 + def open?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#219 + def records; end + + # Can this transaction's current state be recreated by + # rollback+begin ? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#229 + def restartable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#246 + def restore!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#254 + def rollback_records; end + + # Returns the value of attribute savepoint_name. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#148 + def savepoint_name; end + + # Returns the value of attribute state. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#148 + def state; end + + # Returns the value of attribute user_transaction. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#148 + def user_transaction; end + + # Returns the value of attribute written. + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#149 + 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#149 + def written=(_arg0); end + + protected + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#331 + def append_callbacks(callbacks); end + + private + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#348 + def prepare_instances_to_run_callbacks_on(records); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#340 + def run_action_on_records(records, instances_to_run_callbacks_on); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#336 + def unique_records; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#129 +class ActiveRecord::ConnectionAdapters::Transaction::Callback + # @return [Callback] a new instance of Callback + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#130 + def initialize(event, callback); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#139 + def after_commit; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#143 + def after_rollback; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#135 + def before_commit; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#79 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter + # @return [TransactionInstrumenter] a new instance of TransactionInstrumenter + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#80 + def initialize(payload = T.unsafe(nil)); end + + # @raise [InstrumentationNotStartedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#101 + def finish(outcome); end + + # @raise [InstrumentationAlreadyStartedError] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#90 + def start; end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#88 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationAlreadyStartedError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#87 +class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationNotStartedError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#497 +class ActiveRecord::ConnectionAdapters::TransactionManager + # @return [TransactionManager] a new instance of TransactionManager + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#498 + def initialize(connection); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#506 + 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#593 + def commit_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#661 + def current_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#561 + def dirty_current_transaction; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#548 + def disable_lazy_transactions!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#553 + def enable_lazy_transactions!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#557 + def lazy_transactions_enabled?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#577 + def materialize_transactions; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#657 + def open_transactions; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#573 + def restorable?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#565 + def restore_transactions; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#610 + def rollback_transaction(transaction = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#622 + 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#669 + def after_failure_actions(transaction, error); end +end + +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#666 +ActiveRecord::ConnectionAdapters::TransactionManager::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullTransaction) + +# = Active Record Connection Adapters Transaction State +# +# source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#8 +class ActiveRecord::ConnectionAdapters::TransactionState + # @return [TransactionState] a new instance of TransactionState + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#9 + def initialize(state = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#14 + def add_child(state); end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#66 + def commit!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#23 + def committed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#47 + def completed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#19 + def finalized?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#70 + def full_commit!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#56 + def full_rollback!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#27 + def fully_committed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#43 + def fully_completed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#35 + def fully_rolledback?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#61 + def invalidate!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#39 + def invalidated?; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#74 + def nullify!; end + + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#51 + def rollback!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_adapters/abstract/transaction.rb#31 + def rolledback?; end +end + +# ConnectionFailed will be raised when the network connection to the +# database fails while sending a query or waiting for its result. +# +# source://activerecord//lib/active_record/errors.rb#582 +class ActiveRecord::ConnectionFailed < ::ActiveRecord::QueryAborted; end + +# = Active Record Connection Handling +# +# source://activerecord//lib/active_record/connection_handling.rb#5 +module ActiveRecord::ConnectionHandling + # source://activerecord//lib/active_record/connection_handling.rb#338 + def adapter_class; end + + # source://activerecord//lib/active_record/connection_handling.rb#372 + def clear_cache!; end + + # Clears the query cache for all connections associated with the current thread. + # + # source://activerecord//lib/active_record/connection_handling.rb#258 + def clear_query_caches_for_current_thread; end + + # Returns +true+ if Active Record is connected. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_handling.rb#351 + 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#136 + 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 and/or + # current connected shard. If no shard is passed, the default will be + # used. + # + # ActiveRecord::Base.connected_to(role: :writing) do + # ActiveRecord::Base.connected_to?(role: :writing) #=> true + # ActiveRecord::Base.connected_to?(role: :reading) #=> false + # end + # + # ActiveRecord::Base.connected_to(role: :reading, shard: :shard_one) do + # ActiveRecord::Base.connected_to?(role: :reading, shard: :shard_one) #=> true + # ActiveRecord::Base.connected_to?(role: :reading, shard: :default) #=> false + # ActiveRecord::Base.connected_to?(role: :writing, shard: :shard_one) #=> true + # end + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_handling.rb#253 + def connected_to?(role:, shard: T.unsafe(nil)); end + + # Passes the block to +connected_to+ for every +shard+ the + # model is configured to connect to (if any), and returns the + # results in an array. + # + # Optionally, +role+ and/or +prevent_writes+ can be passed which + # will be forwarded to each +connected_to+ call. + # + # source://activerecord//lib/active_record/connection_handling.rb#186 + def connected_to_all_shards(role: T.unsafe(nil), prevent_writes: T.unsafe(nil), &blk); 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#165 + 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#199 + def connecting_to(role: T.unsafe(nil), shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end + + # Soft deprecated. Use +#with_connection+ or +#lease_connection+ instead. + # + # source://activerecord//lib/active_record/connection_handling.rb#274 + 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#334 + def connection_db_config; end + + # source://activerecord//lib/active_record/connection_handling.rb#342 + def connection_pool; end + + # Returns the connection specification name from the current class or its parent. + # + # source://activerecord//lib/active_record/connection_handling.rb#316 + 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#313 + 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 look up the database config using the +database_key+ and + # establish 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 + # supports read replicas as well. You can 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#50 + def establish_connection(config_or_env = 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. + # The connection will remain leased for the entire duration of the request + # or job, or until +#release_connection+ is called. + # + # source://activerecord//lib/active_record/connection_handling.rb#269 + def lease_connection; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_handling.rb#323 + 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#211 + def prohibit_shard_swapping(enabled = T.unsafe(nil)); end + + # Return the currently leased connection into the pool + # + # source://activerecord//lib/active_record/connection_handling.rb#298 + def release_connection; end + + # source://activerecord//lib/active_record/connection_handling.rb#355 + def remove_connection; end + + # source://activerecord//lib/active_record/connection_handling.rb#346 + def retrieve_connection; end + + # source://activerecord//lib/active_record/connection_handling.rb#368 + def schema_cache; end + + # source://activerecord//lib/active_record/connection_handling.rb#376 + def shard_keys; end + + # Determine whether or not shard swapping is currently prohibited + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_handling.rb#220 + def shard_swapping_prohibited?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/connection_handling.rb#380 + def sharded?; 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#235 + def while_preventing_writes(enabled = T.unsafe(nil), &block); end + + # Checkouts a connection from the pool, yield it and then check it back in. + # If a connection was already leased via #lease_connection or a parent call to + # #with_connection, that same connection is yieled. + # If #lease_connection is called inside the block, the connection won't be checked + # back in. + # If #connection is called inside the block, the connection won't be checked back in + # unless the +prevent_permanent_checkout+ argument is set to +true+. + # + # source://activerecord//lib/active_record/connection_handling.rb#309 + def with_connection(prevent_permanent_checkout: T.unsafe(nil), &block); end + + private + + # source://activerecord//lib/active_record/connection_handling.rb#405 + def append_to_connected_to_stack(entry); end + + # source://activerecord//lib/active_record/connection_handling.rb#385 + def resolve_config_for_connection(config_or_env); end + + # source://activerecord//lib/active_record/connection_handling.rb#394 + def with_role_and_shard(role, shard, prevent_writes); end +end + +# source://activerecord//lib/active_record/connection_handling.rb#7 +ActiveRecord::ConnectionHandling::DEFAULT_ENV = T.let(T.unsafe(nil), Proc) + +# source://activerecord//lib/active_record/connection_handling.rb#6 +ActiveRecord::ConnectionHandling::RAILS_ENV = T.let(T.unsafe(nil), Proc) + +# Raised when a database connection pool is requested but +# has not been defined. +# +# source://activerecord//lib/active_record/errors.rb#89 +class ActiveRecord::ConnectionNotDefined < ::ActiveRecord::ConnectionNotEstablished + # @return [ConnectionNotDefined] a new instance of ConnectionNotDefined + # + # source://activerecord//lib/active_record/errors.rb#90 + def initialize(message = T.unsafe(nil), connection_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil)); end + + # Returns the value of attribute connection_name. + # + # source://activerecord//lib/active_record/errors.rb#97 + def connection_name; end + + # Returns the value of attribute role. + # + # source://activerecord//lib/active_record/errors.rb#97 + def role; end + + # Returns the value of attribute shard. + # + # source://activerecord//lib/active_record/errors.rb#97 + def shard; end +end + +# Raised when connection to the database could not been established (for example when +# {ActiveRecord::Base.lease_connection=}[rdoc-ref:ConnectionHandling#lease_connection] +# is given a +nil+ object). +# +# source://activerecord//lib/active_record/errors.rb#67 +class ActiveRecord::ConnectionNotEstablished < ::ActiveRecord::AdapterError + # @return [ConnectionNotEstablished] a new instance of ConnectionNotEstablished + # + # source://activerecord//lib/active_record/errors.rb#68 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/errors.rb#72 + def set_pool(connection_pool); end +end + +# Raised when a connection could not be obtained within the connection +# acquisition timeout period: because max connections in pool +# are in use. +# +# source://activerecord//lib/active_record/errors.rb#84 +class ActiveRecord::ConnectionTimeoutError < ::ActiveRecord::ConnectionNotEstablished; end + +# = Active Record \Core +# +# source://activerecord//lib/active_record/core.rb#10 +module ActiveRecord::Core + include ::ActiveModel::Access + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + 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.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#452 + def initialize(attributes = T.unsafe(nil)); end + + # Allows sort on objects + # + # source://activerecord//lib/active_record/core.rb#639 + 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#605 + def ==(comparison_object); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#651 + def blank?; end + + # source://activerecord//lib/active_record/core.rb#724 + 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#561 + 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#605 + 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#628 + def freeze; end + + # Returns +true+ if the attributes hash has been frozen. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#634 + def frozen?; end + + # Returns the full contents of the record as a nicely formatted string. + # + # source://activerecord//lib/active_record/core.rb#734 + def full_inspect; 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#615 + 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#479 + 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#489 + def init_with_attributes(attributes, new_record = T.unsafe(nil)); end + + # Returns the attributes specified by .attributes_for_inspect as a nicely formatted string. + # + # source://activerecord//lib/active_record/core.rb#729 + def inspect; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#647 + 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#740 + def pretty_print(pp); end + + # Marks this record as read only. + # + # customer = Customer.first + # customer.readonly! + # customer.save # Raises an ActiveRecord::ReadOnlyRecord + # + # source://activerecord//lib/active_record/core.rb#720 + def readonly!; end + + # Returns +true+ if the record is read only. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#656 + def readonly?; end + + # Sets the record to strict_loading mode. This will raise an error + # if the record tries to lazily load an association. + # + # user = User.first + # user.strict_loading! # => true + # user.address.city + # => ActiveRecord::StrictLoadingViolationError + # user.comments.to_a + # => 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. + # + # ==== Examples + # + # user = User.first + # user.strict_loading!(false) # => false + # user.address.city # => "Tatooine" + # user.comments.to_a # => [# "Tatooine" + # user.comments.to_a # => [# ActiveRecord::StrictLoadingViolationError + # + # source://activerecord//lib/active_record/core.rb#694 + 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#661 + def strict_loading?; end + + # Returns +true+ if the record uses strict_loading with +:all+ mode enabled. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#711 + def strict_loading_all?; end + + # Returns the value of attribute strict_loading_mode. + # + # source://activerecord//lib/active_record/core.rb#703 + 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#706 + def strict_loading_n_plus_one_only?; end + + private + + # source://activerecord//lib/active_record/core.rb#830 + def all_attributes_for_inspect; end + + # source://activerecord//lib/active_record/core.rb#826 + def attributes_for_inspect; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/core.rb#796 + def custom_inspect_method_defined?; end + + # source://activerecord//lib/active_record/core.rb#776 + def init_internals; end + + # source://activerecord//lib/active_record/core.rb#531 + def initialize_dup(other); end + + # source://activerecord//lib/active_record/core.rb#793 + def initialize_internals_callback; end + + # source://activerecord//lib/active_record/core.rb#811 + def inspect_with_attributes(attributes_to_list); end + + # source://activerecord//lib/active_record/core.rb#807 + 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#772 + def to_ary; end + + module GeneratedClassMethods + def _destroy_association_async_job; end + def _destroy_association_async_job=(value); end + def _destroy_association_async_job?; end + def attributes_for_inspect; end + def attributes_for_inspect=(value); end + def attributes_for_inspect?; end + 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_batch_size; end + def destroy_association_async_batch_size=(value); end + def enumerate_columns_in_select_statements; end + def enumerate_columns_in_select_statements=(value); end + def enumerate_columns_in_select_statements?; end + 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 run_commit_callbacks_on_first_saved_instances_in_transaction; end + def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + def shard_selector; end + def shard_selector=(value); end + def shard_selector?; end + def strict_loading_by_default; end + def strict_loading_by_default=(value); end + def strict_loading_by_default?; end + def strict_loading_mode; end + def strict_loading_mode=(value); end + def strict_loading_mode?; 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_batch_size; end + def logger; end + def logger?; end + end +end + +# source://activerecord//lib/active_record/core.rb#242 +module ActiveRecord::Core::ClassMethods + # Returns an instance of +Arel::Table+ loaded with the current table name. + # + # source://activerecord//lib/active_record/core.rb#368 + def arel_table; end + + # source://activerecord//lib/active_record/core.rb#380 + def cached_find_by_statement(connection, key, &block); end + + # Returns columns which shouldn't be exposed while calling +#inspect+. + # + # source://activerecord//lib/active_record/core.rb#326 + def filter_attributes; end + + # Specifies columns which shouldn't be exposed while calling +#inspect+. + # + # source://activerecord//lib/active_record/core.rb#335 + def filter_attributes=(filter_attributes); end + + # source://activerecord//lib/active_record/core.rb#247 + def find(*ids); end + + # source://activerecord//lib/active_record/core.rb#260 + def find_by(*args); end + + # source://activerecord//lib/active_record/core.rb#307 + def find_by!(*args); end + + # source://activerecord//lib/active_record/core.rb#315 + def generated_association_methods; end + + # source://activerecord//lib/active_record/core.rb#243 + def initialize_find_by_cache; end + + # source://activerecord//lib/active_record/core.rb#311 + def initialize_generated_modules; end + + # Returns a string like 'Post(id:integer, title:string, body:text)' + # + # source://activerecord//lib/active_record/core.rb#352 + def inspect; end + + # source://activerecord//lib/active_record/core.rb#340 + def inspection_filter; end + + # source://activerecord//lib/active_record/core.rb#372 + def predicate_builder; end + + # source://activerecord//lib/active_record/core.rb#376 + def type_caster; end + + private + + # source://activerecord//lib/active_record/core.rb#422 + def cached_find_by(keys, values); end + + # source://activerecord//lib/active_record/core.rb#386 + def inherited(subclass); end + + # source://activerecord//lib/active_record/core.rb#408 + def relation; end + + # source://activerecord//lib/active_record/core.rb#418 + def table_metadata; end +end + +# source://activerecord//lib/active_record/core.rb#800 +class ActiveRecord::Core::InspectionMask + # source://activerecord//lib/active_record/core.rb#801 + 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 + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::CounterCache::ClassMethods + + private + + # source://activerecord//lib/active_record/counter_cache.rb#200 + def _create_record(attribute_names = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/counter_cache.rb#226 + def _foreign_keys_equal?(fkey1, fkey2); end + + # source://activerecord//lib/active_record/counter_cache.rb#210 + def destroy_row; end + + module GeneratedClassMethods + def _counter_cache_columns; end + def _counter_cache_columns=(value); end + def _counter_cache_columns?; end + def counter_cached_association_names; end + def counter_cached_association_names=(value); end + def counter_cached_association_names?; end + end + + module GeneratedInstanceMethods + def counter_cached_association_names; end + def counter_cached_association_names?; end + end +end + +# source://activerecord//lib/active_record/counter_cache.rb#13 +module ActiveRecord::CounterCache::ClassMethods + # @return [Boolean] + # + # source://activerecord//lib/active_record/counter_cache.rb#182 + def counter_cache_column?(name); end + + # Decrement a numeric field by one, via a direct SQL update. + # + # This works the same as #increment_counter but reduces the column value by + # 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. + # * :by - The amount by which to decrement the value. Defaults to +1+. + # * :touch - Touch timestamp columns when updating. + # Pass +true+ to touch +updated_at+ and/or +updated_on+. Pass a symbol to + # touch that column or an array of symbols to touch just those ones. + # + # ==== 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 + # by a specific amount. + # DiscussionBoard.decrement_counter(:posts_count, 5, by: 3) + # + # # Decrement the posts_count column for the record with an id of 5 + # # and update the updated_at value. + # DiscussionBoard.decrement_counter(:posts_count, 5, touch: true) + # + # source://activerecord//lib/active_record/counter_cache.rb#178 + def decrement_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end + + # Increment a numeric field by one, via a direct SQL update. + # + # 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. + # * :by - The amount by which to increment the value. Defaults to +1+. + # * :touch - Touch timestamp columns when updating. + # Pass +true+ to touch +updated_at+ and/or +updated_on+. Pass a symbol to + # touch that column or an array of symbols to touch just those ones. + # + # ==== 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 + # # by a specific amount. + # DiscussionBoard.increment_counter(:posts_count, 5, by: 3) + # + # # Increment the posts_count column for the record with an id of 5 + # # and update the updated_at value. + # DiscussionBoard.increment_counter(:posts_count, 5, touch: true) + # + # source://activerecord//lib/active_record/counter_cache.rb#148 + def increment_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/counter_cache.rb#186 + def load_schema!; 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#34 + 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 comments_count by 1, and + # # increment the actions_count by 1 + # Post.update_counters 5, comments_count: -1, actions_count: 1 + # # Executes the following SQL: + # # UPDATE posts + # # SET comments_count = COALESCE(comments_count, 0) - 1, + # # actions_count = COALESCE(actions_count, 0) + 1 + # # WHERE id = 5 + # + # # For the Posts with id of 10 and 15, increment the comments_count by 1 + # Post.update_counters [10, 15], comments_count: 1 + # # Executes the following SQL: + # # UPDATE posts + # # SET comments_count = COALESCE(comments_count, 0) + 1 + # # WHERE id IN (10, 15) + # + # # For the Posts with id of 10 and 15, increment the comments_count by 1 + # # and update the updated_at value for each counter. + # Post.update_counters [10, 15], comments_count: 1, touch: true + # # Executes the following SQL: + # # UPDATE posts + # # SET comments_count = COALESCE(comments_count, 0) + 1, + # # `updated_at` = '2016-10-13T09:59:23-05:00' + # # WHERE id IN (10, 15) + # + # source://activerecord//lib/active_record/counter_cache.rb#115 + 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#440 +class ActiveRecord::DangerousAttributeError < ::ActiveRecord::ActiveRecordError; end + +# Raised when creating a database if it exists. +# +# source://activerecord//lib/active_record/errors.rb#357 +class ActiveRecord::DatabaseAlreadyExists < ::ActiveRecord::StatementInvalid; end + +# = Active Record Database Configurations +# +# +ActiveRecord::DatabaseConfigurations+ returns an array of +DatabaseConfig+ +# objects that are constructed from the application's database +# configuration hash or URL string. +# +# The array of +DatabaseConfig+ objects in an application default to either a +# HashConfig or UrlConfig. You can retrieve your application's config by using +# ActiveRecord::Base.configurations. +# +# If you register a custom handler, objects will be created according to the +# conditions of the handler. See ::register_db_config_handler for more on +# registering custom handlers. +# +# source://activerecord//lib/active_record/database_configurations/database_config.rb#4 +class ActiveRecord::DatabaseConfigurations + # @return [DatabaseConfigurations] a new instance of DatabaseConfigurations + # + # source://activerecord//lib/active_record/database_configurations.rb#73 + def initialize(configurations = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/database_configurations.rb#27 + def any?(*_arg0, **_arg1, &_arg2); end + + # Checks if the application's configurations are empty. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations.rb#150 + def blank?; end + + # Collects the configs for the environment and optionally the specification + # name passed in. To include replica configurations pass include_hidden: true. + # + # If a name is provided a single +DatabaseConfig+ object will be + # returned, otherwise an array of +DatabaseConfig+ objects will be + # 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. + # * config_key: Selects configs that contain a particular key in the configuration + # hash. Useful for selecting configs that use a custom db config handler or finding + # configs with hashes that contain a particular key. + # * include_hidden: Determines whether to include replicas and configurations + # hidden by database_tasks: false in the returned list. Most of the time we're only + # 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#98 + def configs_for(env_name: T.unsafe(nil), name: T.unsafe(nil), config_key: T.unsafe(nil), include_hidden: T.unsafe(nil)); end + + # Returns the value of attribute configurations. + # + # source://activerecord//lib/active_record/database_configurations.rb#26 + def configurations; end + + # Checks if the application's configurations are empty. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations.rb#150 + 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#127 + 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#142 + 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#174 + def resolve(config); end + + private + + # source://activerecord//lib/active_record/database_configurations.rb#200 + def build_configs(configs); end + + # source://activerecord//lib/active_record/database_configurations.rb#239 + def build_configuration_sentence; end + + # source://activerecord//lib/active_record/database_configurations.rb#273 + def build_db_config_from_hash(env_name, name, config); end + + # source://activerecord//lib/active_record/database_configurations.rb#252 + def build_db_config_from_raw_config(env_name, name, config); end + + # source://activerecord//lib/active_record/database_configurations.rb#263 + def build_db_config_from_string(env_name, name, config); end + + # source://activerecord//lib/active_record/database_configurations.rb#188 + def default_env; end + + # source://activerecord//lib/active_record/database_configurations.rb#192 + def env_with_configs(env = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/database_configurations.rb#295 + def environment_url_config(env, name, config); end + + # source://activerecord//lib/active_record/database_configurations.rb#302 + def environment_value_for(name); end + + # source://activerecord//lib/active_record/database_configurations.rb#286 + def merge_db_environment_variables(current_env, configs); end + + # source://activerecord//lib/active_record/database_configurations.rb#225 + def resolve_symbol_connection(name); end + + # source://activerecord//lib/active_record/database_configurations.rb#219 + def walk_configs(env_name, config); end + + class << self + # source://activerecord//lib/active_record/database_configurations.rb#29 + def db_config_handlers; end + + # source://activerecord//lib/active_record/database_configurations.rb#29 + def db_config_handlers=(_arg0); end + + # Allows an application to register a custom handler for database configuration + # objects. This is useful for creating a custom handler that responds to + # methods your application needs but Active Record doesn't implement. For + # example if you are using Vitess, you may want your Vitess configurations + # to respond to `sharded?`. To implement this define the following in an + # initializer: + # + # ActiveRecord::DatabaseConfigurations.register_db_config_handler do |env_name, name, url, config| + # next unless config.key?(:vitess) + # VitessConfig.new(env_name, name, config) + # end + # + # Note: applications must handle the condition in which custom config should be + # created in your handler registration otherwise all objects will use the custom + # handler. + # + # Then define your +VitessConfig+ to respond to the methods your application + # needs. It is recommended that you inherit from one of the existing + # database config classes to avoid having to reimplement all methods. Custom + # config handlers should only implement methods Active Record does not. + # + # class VitessConfig < ActiveRecord::DatabaseConfigurations::UrlConfig + # def sharded? + # configuration_hash.fetch("sharded", false) + # end + # end + # + # For configs that have a +:vitess+ key, a +VitessConfig+ object will be + # created instead of a +UrlConfig+. + # + # source://activerecord//lib/active_record/database_configurations.rb#61 + def register_db_config_handler(&block); end + end +end + +# Expands a connection string into a hash. +# +# 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#38 + def to_hash; end + + private + + # Returns name of the database. + # + # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#89 + 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#60 + def query_hash; end + + # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#64 + def raw_config; end + + # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#82 + def resolved_adapter; end + + # Returns the value of attribute uri. + # + # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#45 + def uri; end + + # source://activerecord//lib/active_record/database_configurations/connection_url_resolver.rb#47 + 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#11 + def initialize(env_name, name); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#43 + def _database=(database); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#47 + def adapter; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#17 + def adapter_class; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#71 + def checkout_timeout; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#39 + 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#91 + def for_current_env?; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#35 + def host; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#79 + def idle_timeout; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#21 + def inspect; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#63 + def max_queue; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#59 + def max_threads; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#87 + def migrations_paths; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#55 + def min_threads; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#9 + def name; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#25 + def new_connection; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#51 + def pool; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#67 + def query_cache; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#75 + def reaping_frequency; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#83 + def replica?; end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#95 + def schema_cache_path; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations/database_config.rb#99 + def use_metadata_table?; end + + # source://activerecord//lib/active_record/database_configurations/database_config.rb#29 + def validate!; end +end + +# # Active Record Database Hash Config +# +# A `HashConfig` object is created for each database configuration entry that is +# created from a hash. +# +# A hash config: +# +# { "development" => { "database" => "db_name" } } +# +# Becomes: +# +# # +# +# See ActiveRecord::DatabaseConfigurations for more info. +# +# source://activerecord//lib/active_record/database_configurations/hash_config.rb#22 +class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::DatabaseConfigurations::DatabaseConfig + # Initialize a new `HashConfig` object + # + # #### Parameters + # + # * `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". + # * `configuration_hash` - The config hash. This is the hash that contains the + # database adapter, name, and other important information for database + # connections. + # + # @return [HashConfig] a new instance of HashConfig + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#38 + def initialize(env_name, name, configuration_hash); end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#68 + def _database=(database); end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#107 + def adapter; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#92 + def checkout_timeout; end + + # Returns the value of attribute configuration_hash. + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#23 + def configuration_hash; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#64 + def database; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#153 + def database_tasks?; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#117 + def default_schema_cache_path(db_dir = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#56 + def host; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#102 + def idle_timeout; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#125 + def lazy_schema_cache_path; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#88 + def max_queue; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#80 + 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#52 + def migrations_paths; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#76 + def min_threads; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#72 + def pool; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#129 + def primary?; end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#84 + def query_cache; end + + # `reaping_frequency` is configurable mostly for historical reasons, but it + # could also be useful if someone wants a very low `idle_timeout`. + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#98 + 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#46 + 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#113 + 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#141 + def schema_dump(format = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#60 + def socket; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#157 + def use_metadata_table?; end + + private + + # source://activerecord//lib/active_record/database_configurations/hash_config.rb#162 + def schema_file_type(format); end +end + +# source://activerecord//lib/active_record/database_configurations.rb#24 +class ActiveRecord::DatabaseConfigurations::InvalidConfigurationError < ::StandardError; end + +# = Active Record Database Url Config +# +# A +UrlConfig+ object is created for each database configuration +# entry that is created from a URL. This can either be a URL string +# or a hash with a URL in place of the config hash. +# +# A URL config: +# +# postgres://localhost/foo +# +# Becomes: +# +# # +# +# See ActiveRecord::DatabaseConfigurations for more info. +# +# source://activerecord//lib/active_record/database_configurations/url_config.rb#24 +class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::DatabaseConfigurations::HashConfig + # Initialize a new +UrlConfig+ object + # + # ==== Options + # + # * :env_name - The \Rails environment, i.e. "development". + # * :name - The db config name. In a standard two-tier + # database configuration this will default to "primary". In a multiple + # database three-tier database configuration this corresponds to the name + # used in the second tier, for example "primary_readonly". + # * :url - The database URL. + # * :config - The config hash. This is the hash that contains the + # database adapter, name, and other important information for database + # connections. + # + # @return [UrlConfig] a new instance of UrlConfig + # + # source://activerecord//lib/active_record/database_configurations/url_config.rb#40 + def initialize(env_name, name, url, configuration_hash = T.unsafe(nil)); end + + # Returns the value of attribute url. + # + # source://activerecord//lib/active_record/database_configurations/url_config.rb#25 + 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#69 + def build_url_hash; end + + # source://activerecord//lib/active_record/database_configurations/url_config.rb#61 + def to_boolean!(configuration_hash, key); 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#102 +class ActiveRecord::DatabaseConnectionError < ::ActiveRecord::ConnectionNotEstablished + # @return [DatabaseConnectionError] a new instance of DatabaseConnectionError + # + # source://activerecord//lib/active_record/errors.rb#103 + def initialize(message = T.unsafe(nil)); end + + class << self + # source://activerecord//lib/active_record/errors.rb#108 + def hostname_error(hostname); end + + # source://activerecord//lib/active_record/errors.rb#115 + def username_error(username); end + end +end + +# DatabaseVersionError will be raised when the database version is not supported, or when +# the database version cannot be determined. +# +# source://activerecord//lib/active_record/errors.rb#610 +class ActiveRecord::DatabaseVersionError < ::ActiveRecord::ActiveRecordError; end + +# Deadlocked will be raised when a transaction is rolled +# back by the database when a deadlock is encountered. +# +# This is a subclass of TransactionRollbackError, please make sure to check +# its documentation to be aware of its caveats. +# +# source://activerecord//lib/active_record/errors.rb#552 +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, entryable_type, entryable_id, created_at, updated_at ] +# 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, created_at, updated_at ] +# class Message < ApplicationRecord +# include Entryable +# end +# +# # Schema: comments[ id, content, created_at, updated_at ] +# 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, account: Current.account +# +# 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, account: Current.account) +# create! entryable: Comment.new(content: content), creator: creator, account: account +# end +# end +# +# == Querying across records +# +# A consequence of delegated types is that querying attributes spread across multiple classes becomes slightly more +# tricky, but not impossible. +# +# The simplest method is to join the "superclass" to the "subclass" and apply the query parameters (i.e. #where) +# in appropriate places: +# +# Comment.joins(:entry).where(comments: { content: 'Hello!' }, entry: { creator: Current.user } ) +# +# For convenience, add a scope on the concern. Now all classes that implement the concern will automatically include +# the method: +# +# # app/models/concerns/entryable.rb +# scope :with_entry, ->(attrs) { joins(:entry).where(entry: attrs) } +# +# Now the query can be shortened significantly: +# +# Comment.where(content: 'Hello!').with_entry(creator: Current.user) +# +# == 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#175 +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. + # [:foreign_type] + # Specify the column used to store the associated object's type. By default this is inferred to be the passed + # +role+ with a "_type" suffix. A class that defines a + # delegated_type :entryable, types: %w[ Message Comment ] association will use "entryable_type" as + # the default :foreign_type. + # [:primary_key] + # Specify the method that returns the primary key of associated object used for the convenience methods. + # By default this is +id+. + # + # 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#231 + def delegated_type(role, types:, **options); end + + private + + # source://activerecord//lib/active_record/delegated_type.rb#237 + def define_delegated_type_methods(role, types:, options:); end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#6 +module ActiveRecord::Delegation + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::Delegation::ClassMethods + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def &(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def +(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def -(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def [](*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def as_json(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def compact(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def connection(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def each(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def encode_with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def in_groups(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def in_groups_of(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def index(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def intersect?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def join(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def length(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def primary_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def reverse(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def rindex(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def rotate(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def sample(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def sanitize_sql_like(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def shuffle(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def slice(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def split(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def table_name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def to_formatted_s(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def to_fs(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def to_sentence(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def to_xml(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def transaction(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def unscoped(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#106 + def with_connection(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/delegation.rb#101 + def |(*_arg0, **_arg1, &_arg2); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/delegation.rb#150 + def respond_to_missing?(method, _); end + + class << self + # source://activerecord//lib/active_record/relation/delegation.rb#8 + def delegated_classes; end + + # source://activerecord//lib/active_record/relation/delegation.rb#17 + def uncacheable_methods; end + end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#138 +module ActiveRecord::Delegation::ClassMethods + # source://activerecord//lib/active_record/relation/delegation.rb#139 + def create(model, *_arg1, **_arg2, &_arg3); end + + private + + # source://activerecord//lib/active_record/relation/delegation.rb#144 + def relation_class_for(model); end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#108 +module ActiveRecord::Delegation::ClassSpecificRelation + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods + + private + + # source://activerecord//lib/active_record/relation/delegation.rb#118 + def method_missing(method, *_arg1, **_arg2, &_arg3); end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#111 +module ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods + # source://activerecord//lib/active_record/relation/delegation.rb#112 + def name; end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#24 +module ActiveRecord::Delegation::DelegateCache + # source://activerecord//lib/active_record/relation/delegation.rb#52 + def generate_relation_method(method); end + + # source://activerecord//lib/active_record/relation/delegation.rb#47 + def inherited(child_class); end + + # source://activerecord//lib/active_record/relation/delegation.rb#32 + def initialize_relation_delegate_cache; end + + # source://activerecord//lib/active_record/relation/delegation.rb#28 + def relation_delegate_class(klass); end + + protected + + # source://activerecord//lib/active_record/relation/delegation.rb#57 + def include_relation_methods(delegate); end + + private + + # source://activerecord//lib/active_record/relation/delegation.rb#63 + def generated_relation_methods; end + + class << self + # source://activerecord//lib/active_record/relation/delegation.rb#26 + def delegate_base_methods; end + + # source://activerecord//lib/active_record/relation/delegation.rb#26 + def delegate_base_methods=(_arg0); end + end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#71 +class ActiveRecord::Delegation::GeneratedRelationMethods < ::Module + # source://activerecord//lib/active_record/relation/delegation.rb#74 + def generate_method(method); end +end + +# source://activerecord//lib/active_record/relation/delegation.rb#72 +ActiveRecord::Delegation::GeneratedRelationMethods::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# 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/errors.rb#256 +class ActiveRecord::DeleteRestrictionError < ::ActiveRecord::ActiveRecordError + # @return [DeleteRestrictionError] a new instance of DeleteRestrictionError + # + # source://activerecord//lib/active_record/associations/errors.rb#257 + def initialize(name = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/destroy_association_async_job.rb#4 +class ActiveRecord::DestroyAssociationAsyncError < ::StandardError; end + +# = Active Record Destroy Association Async Job +# +# Job to destroy the records associated with a destroyed record in background. +# +# source://activerecord//lib/active_record/destroy_association_async_job.rb#10 +class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base + # source://activerecord//lib/active_record/destroy_association_async_job.rb#15 + def perform(owner_model_name: T.unsafe(nil), owner_id: T.unsafe(nil), association_class: T.unsafe(nil), association_ids: T.unsafe(nil), association_primary_key_column: T.unsafe(nil), ensuring_owner_was_method: T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/destroy_association_async_job.rb#34 + def owner_destroyed?(owner, ensuring_owner_was_method); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); 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#102 +class ActiveRecord::DuplicateMigrationNameError < ::ActiveRecord::MigrationError + # @return [DuplicateMigrationNameError] a new instance of DuplicateMigrationNameError + # + # source://activerecord//lib/active_record/migration.rb#103 + def initialize(name = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/migration.rb#92 +class ActiveRecord::DuplicateMigrationVersionError < ::ActiveRecord::MigrationError + # @return [DuplicateMigrationVersionError] a new instance of DuplicateMigrationVersionError + # + # source://activerecord//lib/active_record/migration.rb#93 + 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, *_arg1, **_arg2, &_arg3); 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/errors.rb#243 +class ActiveRecord::EagerLoadPolymorphicError < ::ActiveRecord::ActiveRecordError + # @return [EagerLoadPolymorphicError] a new instance of EagerLoadPolymorphicError + # + # source://activerecord//lib/active_record/associations/errors.rb#244 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + def custom_contexts; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + def custom_contexts=(obj); end + + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context; end + + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context=(val); end + + # source://activerecord//lib/active_record/encryption/configurable.rb#11 + def encrypted_attribute_declaration_listeners; end + + # 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + def custom_contexts; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + def custom_contexts=(obj); end + + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context; end + + # source://activerecord//lib/active_record/encryption/contexts.rb#17 + def default_context=(val); end + + # source://activerecord//lib/active_record/encryption.rb#50 + def eager_load!; end + + # source://activerecord//lib/active_record/encryption/configurable.rb#11 + def encrypted_attribute_declaration_listeners; end + + # source://activerecord//lib/active_record/encryption/configurable.rb#11 + def encrypted_attribute_declaration_listeners=(val); end + end +end + +# source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#5 +class ActiveRecord::Encryption::AutoFilteredParameters + # @return [AutoFilteredParameters] a new instance of AutoFilteredParameters + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#6 + def initialize(app); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#14 + def enable; end + + private + + # Returns the value of attribute app. + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#20 + def app; end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#36 + def apply_collected_attributes; end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#53 + def apply_filter(klass, attribute); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#28 + def attribute_was_declared(klass, attribute); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#48 + def collect_for_later(klass, attribute); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#44 + def collecting?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#61 + def excluded_from_filter_parameters?(filter_parameter); end + + # source://activerecord//lib/active_record/encryption/auto_filtered_parameters.rb#22 + def install_collecting_hook; end +end + +# The algorithm used for encrypting and decrypting +Message+ objects. +# +# It uses AES-256-GCM. It will generate a random IV for non deterministic encryption (default) +# 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#14 +class ActiveRecord::Encryption::Cipher::Aes256Gcm + # When iv not provided, it will generate a random iv on each encryption operation (default and + # recommended operation) + # + # @return [Aes256Gcm] a new instance of Aes256Gcm + # + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#29 + def initialize(secret, deterministic: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#55 + def decrypt(encrypted_message); end + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#34 + def encrypt(clear_text); end + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#82 + def inspect; end + + private + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#95 + def generate_deterministic_iv(clear_text); end + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#87 + def generate_iv(cipher, clear_text); end + + class << self + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#22 + def iv_length; end + + # source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#18 + def key_length; end + end +end + +# source://activerecord//lib/active_record/encryption/cipher/aes256_gcm.rb#15 +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#8 +class ActiveRecord::Encryption::Config + # @return [Config] a new instance of Config + # + # source://activerecord//lib/active_record/encryption/config.rb#14 + def initialize; end + + # Returns the value of attribute add_to_filter_parameters. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def add_to_filter_parameters; end + + # Sets the attribute add_to_filter_parameters + # + # @param value the value to set the attribute add_to_filter_parameters to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def add_to_filter_parameters=(_arg0); end + + # Returns the value of attribute compressor. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def compressor; end + + # Sets the attribute compressor + # + # @param value the value to set the attribute compressor to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def compressor=(_arg0); end + + # Returns the value of attribute deterministic_key. + # + # source://activerecord//lib/active_record/encryption/config.rb#42 + 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#9 + def deterministic_key=(_arg0); end + + # Returns the value of attribute encrypt_fixtures. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def encrypt_fixtures; end + + # Sets the attribute encrypt_fixtures + # + # @param value the value to set the attribute encrypt_fixtures to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def encrypt_fixtures=(_arg0); end + + # Returns the value of attribute excluded_from_filter_parameters. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def excluded_from_filter_parameters; end + + # Sets the attribute excluded_from_filter_parameters + # + # @param value the value to set the attribute excluded_from_filter_parameters to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def excluded_from_filter_parameters=(_arg0); end + + # Returns the value of attribute extend_queries. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def extend_queries; end + + # Sets the attribute extend_queries + # + # @param value the value to set the attribute extend_queries to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def extend_queries=(_arg0); end + + # Returns the value of attribute forced_encoding_for_deterministic_encryption. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def forced_encoding_for_deterministic_encryption; end + + # Sets the attribute forced_encoding_for_deterministic_encryption + # + # @param value the value to set the attribute forced_encoding_for_deterministic_encryption to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def forced_encoding_for_deterministic_encryption=(_arg0); end + + # source://activerecord//lib/active_record/encryption/config.rb#37 + def has_deterministic_key?; end + + # source://activerecord//lib/active_record/encryption/config.rb#37 + def has_key_derivation_salt?; end + + # source://activerecord//lib/active_record/encryption/config.rb#37 + def has_primary_key?; end + + # Returns the value of attribute hash_digest_class. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def hash_digest_class; end + + # Sets the attribute hash_digest_class + # + # @param value the value to set the attribute hash_digest_class to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def hash_digest_class=(_arg0); end + + # Returns the value of attribute key_derivation_salt. + # + # source://activerecord//lib/active_record/encryption/config.rb#42 + 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#9 + def key_derivation_salt=(_arg0); end + + # Configure previous encryption schemes. + # + # config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ] + # + # source://activerecord//lib/active_record/encryption/config.rb#21 + def previous=(previous_schemes_properties); end + + # Returns the value of attribute previous_schemes. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def previous_schemes; end + + # Sets the attribute previous_schemes + # + # @param value the value to set the attribute previous_schemes to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def previous_schemes=(_arg0); end + + # Returns the value of attribute primary_key. + # + # source://activerecord//lib/active_record/encryption/config.rb#42 + 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#9 + def primary_key=(_arg0); end + + # Returns the value of attribute store_key_references. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def store_key_references; end + + # Sets the attribute store_key_references + # + # @param value the value to set the attribute store_key_references to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def store_key_references=(_arg0); end + + # source://activerecord//lib/active_record/encryption/config.rb#27 + def support_sha1_for_non_deterministic_encryption=(value); end + + # Returns the value of attribute support_unencrypted_data. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def support_unencrypted_data; end + + # Sets the attribute support_unencrypted_data + # + # @param value the value to set the attribute support_unencrypted_data to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def support_unencrypted_data=(_arg0); end + + # Returns the value of attribute validate_column_size. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def validate_column_size; end + + # Sets the attribute validate_column_size + # + # @param value the value to set the attribute validate_column_size to. + # + # source://activerecord//lib/active_record/encryption/config.rb#9 + def validate_column_size=(_arg0); end + + private + + # source://activerecord//lib/active_record/encryption/config.rb#65 + def add_previous_scheme(**properties); end + + # source://activerecord//lib/active_record/encryption/config.rb#49 + 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: T.unsafe(nil), deterministic_key: T.unsafe(nil), key_derivation_salt: T.unsafe(nil), **properties); end + + # source://activerecord//lib/active_record/encryption/configurable.rb#52 + def encrypted_attribute_was_declared(klass, name); end + + # source://activerecord//lib/active_record/encryption/configurable.rb#17 + 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#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#47 + def on_encrypted_attribute_declared(&block); 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#17 + def initialize; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def cipher; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def cipher=(_arg0); end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def encryptor; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def encryptor=(_arg0); end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def frozen_encryption; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def frozen_encryption=(_arg0); end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def frozen_encryption?; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def key_generator; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def key_generator=(_arg0); end + + # source://activerecord//lib/active_record/encryption/context.rb#24 + def key_provider; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def key_provider=(_arg0); end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def message_serializer; end + + # source://activerecord//lib/active_record/encryption/context.rb#15 + def message_serializer=(_arg0); end + + private + + # source://activerecord//lib/active_record/encryption/context.rb#37 + def build_default_key_provider; end + + # source://activerecord//lib/active_record/encryption/context.rb#29 + def set_defaults; end +end + +# 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#70 + def reset_default_context; 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, key_generator: T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/encryption/derived_secret_key_provider.rb#12 + def derive_key_from(password, using: T.unsafe(nil)); end +end + +# A KeyProvider that derives keys from passwords. +# +# 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#157 + def ciphertext_for(attribute_name); end + + # Decrypts all the encryptable attributes and saves the changes. + # + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#171 + def decrypt; end + + # Encrypts all the encryptable attributes and saves the changes. + # + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#166 + def encrypt; end + + # Returns whether a given attribute is encrypted or not. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#146 + def encrypted_attribute?(attribute_name); end + + private + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#178 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#214 + def build_decrypt_attribute_assignments; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#208 + def build_encrypt_attribute_assignments; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#223 + def cant_modify_encrypted_attributes_when_frozen; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#193 + def decrypt_attributes; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#187 + def encrypt_attributes; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#204 + def has_encrypted_attributes?; end + + # @raise [ActiveRecord::Encryption::Errors::Configuration] + # + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#200 + 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#58 + def deterministic_encrypted_attributes; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#49 + def encrypts(*names, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#65 + def source_attribute_from_preserved_attribute(attribute_name); end + + private + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#132 + def add_length_validation_for_encrypted_columns; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#84 + def encrypt_attribute(name, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#78 + def global_previous_schemes_for(scheme); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#126 + def load_schema!; end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#109 + def override_accessors_to_preserve_original(name, original_attribute_name); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#98 + def preserve_original_encrypted(name); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#70 + def scheme_for(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end + + # source://activerecord//lib/active_record/encryption/encryptable_record.rb#138 + def validate_column_size(attribute_name); end +end + +# source://activerecord//lib/active_record/encryption/encryptable_record.rb#176 +ActiveRecord::Encryption::EncryptableRecord::ORIGINAL_ATTRIBUTE_PREFIX = T.let(T.unsafe(nil), String) + +# An ActiveModel::Type::Value that encrypts/decrypts strings of text. +# +# 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 < ::ActiveModel::Type::Value + 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), default: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#16 + def accessor(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#31 + def cast(value); end + + # Returns the value of attribute cast_type. + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#13 + def cast_type; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#51 + def changed_in_place?(raw_old_value, new_value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#35 + 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 + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#47 + def encrypted?(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#15 + def fixed?(*_arg0, **_arg1, &_arg2); end + + # 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#56 + 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#39 + def serialize(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#61 + def support_unencrypted_data?; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#16 + def type(*_arg0, **_arg1, &_arg2); 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#74 + def build_previous_types_for(schemes); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#162 + def clean_text_scheme; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#174 + def database_type_to_text(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#102 + def decrypt(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#84 + def decrypt_as_text(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#158 + def decryption_options; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#146 + def encrypt(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#136 + def encrypt_as_text(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#154 + def encryption_options; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#150 + def encryptor; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#114 + def handle_deserialize_error(error, value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#66 + def previous_schemes_including_clean_text; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#80 + def previous_type?; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#70 + def previous_types_without_clean_text; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#130 + def serialize_with_current(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#126 + def serialize_with_oldest(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#122 + def serialize_with_oldest?; end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#166 + def text_to_database_type(value); end + + # source://activerecord//lib/active_record/encryption/encrypted_attribute_type.rb#106 + 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#13 +class ActiveRecord::Encryption::Encryptor + # === Options + # + # * :compress - Boolean indicating whether records should be compressed before encryption. + # Defaults to +true+. + # * :compressor - The compressor to use. + # 1. If compressor is provided, it will be used. + # 2. If not, it will use ActiveRecord::Encryption.config.compressor which default value is +Zlib+. + # If you want to use a custom compressor, it must respond to +deflate+ and +inflate+. + # + # @return [Encryptor] a new instance of Encryptor + # + # source://activerecord//lib/active_record/encryption/encryptor.rb#25 + def initialize(compress: T.unsafe(nil), compressor: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encryptor.rb#84 + def binary?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/encryptor.rb#88 + def compress?; end + + # The compressor to use for compressing the payload + # + # source://activerecord//lib/active_record/encryption/encryptor.rb#15 + def compressor; end + + # Decrypts an +encrypted_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#67 + 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#49 + 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#77 + def encrypted?(text); end + + private + + # source://activerecord//lib/active_record/encryption/encryptor.rb#111 + def build_encrypted_message(clear_text, key_provider:, cipher_options:); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#107 + def cipher; end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#144 + def compress(data); end + + # Under certain threshold, ZIP compression is actually worse that not compressing + # + # source://activerecord//lib/active_record/encryption/encryptor.rb#136 + def compress_if_worth_it(string); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#97 + def default_key_provider; end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#125 + def deserialize_message(message); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#164 + def force_encoding_if_needed(value); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#172 + def forced_encoding_for_deterministic_encryption; end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#121 + def serialize_message(message); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#131 + def serializer; end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#158 + def uncompress(data); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#150 + def uncompress_if_needed(data, compressed); end + + # source://activerecord//lib/active_record/encryption/encryptor.rb#101 + def validate_payload_type(clear_text); end +end + +# source://activerecord//lib/active_record/encryption/encryptor.rb#93 +ActiveRecord::Encryption::Encryptor::DECRYPT_ERRORS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/encryption/encryptor.rb#94 +ActiveRecord::Encryption::Encryptor::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/encryption/encryptor.rb#95 +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(...) +# +# This module is included if `config.active_record.encryption.extend_queries` is `true`. +# +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#23 +module ActiveRecord::Encryption::ExtendedDeterministicQueries + class << self + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#24 + def install_support; end + end +end + +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#134 +class ActiveRecord::Encryption::ExtendedDeterministicQueries::AdditionalValue + # @return [AdditionalValue] a new instance of AdditionalValue + # + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#137 + def initialize(value, type); end + + # Returns the value of attribute type. + # + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#135 + def type; end + + # Returns the value of attribute value. + # + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#135 + def value; end + + private + + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#143 + def process(value); end +end + +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#124 +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 + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#128 + def find_by(*args); end +end + +# When modifying this file run performance tests in +# +activerecord/test/cases/encryption/performance/extended_deterministic_queries_performance_test.rb+ +# to make sure performance overhead is acceptable. +# +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#41 +module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQuery + class << self + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#43 + def process_arguments(owner, args, check_for_additional_values); end + + private + + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#89 + def additional_values_for(value, type); end + + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#71 + def process_encrypted_query_argument(value, check_for_additional_values, type); end + end +end + +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#148 +module ActiveRecord::Encryption::ExtendedDeterministicQueries::ExtendedEncryptableType + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#149 + def serialize(data); end +end + +# source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#97 +module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#102 + def exists?(*args); end + + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#106 + def scope_for_create; end + + # source://activerecord//lib/active_record/encryption/extended_deterministic_queries.rb#98 + def where(*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 + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#11 + def initialize(hash_digest_class: T.unsafe(nil)); end + + # Derives a key from the given password. The key will have a size in bytes of +:length+ (configured +Cipher+'s length + # by default) + # + # The generated key will be salted with the value of +ActiveRecord::Encryption.key_derivation_salt+ + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#38 + def derive_key_from(password, length: T.unsafe(nil)); end + + # Returns a random key in hexadecimal format. The key will have a size in bytes of +:length+ (configured +Cipher+'s + # 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#30 + def generate_random_hex_key(length: T.unsafe(nil)); end + + # Returns a random key. The key will have a size in bytes of +:length+ (configured +Cipher+'s length by default) + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#16 + def generate_random_key(length: T.unsafe(nil)); end + + # Returns the value of attribute hash_digest_class. + # + # source://activerecord//lib/active_record/encryption/key_generator.rb#9 + def hash_digest_class; end + + private + + # source://activerecord//lib/active_record/encryption/key_generator.rb#44 + def key_derivation_salt; end + + # source://activerecord//lib/active_record/encryption/key_generator.rb#48 + 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 last 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#23 +class ActiveRecord::Encryption::MessageSerializer + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/message_serializer.rb#36 + def binary?; end + + # @raise [ActiveRecord::Encryption::Errors::ForbiddenClass] + # + # source://activerecord//lib/active_record/encryption/message_serializer.rb#31 + def dump(message); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#24 + def load(serialized_content); end + + private + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#85 + def decode_if_needed(value); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#77 + def encode_if_needed(value); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#71 + def headers_to_json(headers); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#64 + def message_to_json(message); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#41 + def parse_message(data, level); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#56 + def parse_properties(headers, level); end + + # source://activerecord//lib/active_record/encryption/message_serializer.rb#46 + 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 + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/null_encryptor.rb#20 + def binary?; end + + # 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 + + # source://activerecord//lib/active_record/encryption/properties.rb#20 + def [](*_arg0, **_arg1, &_arg2); end + + # Set a value for a given key + # + # It will raise an +EncryptedContentIntegrity+ if the value exists + # + # @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#20 + def each(*_arg0, **_arg1, &_arg2); 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://activerecord//lib/active_record/encryption/properties.rb#20 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#179 + 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 + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/read_only_null_encryptor.rb#23 + def binary?; end + + # 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), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#78 + def compatible_with?(other_scheme); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#44 + def deterministic?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#40 + def downcase?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#52 + def fixed?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#36 + def ignore_case?; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#57 + def key_provider; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#61 + 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 + + # @return [Boolean] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#48 + def support_unencrypted_data?; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#65 + def to_h; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#70 + def with_context(&block); end + + private + + # source://activerecord//lib/active_record/encryption/scheme.rb#102 + def default_key_provider; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#96 + def deterministic_key_provider; end + + # source://activerecord//lib/active_record/encryption/scheme.rb#90 + def key_provider_from_key; end + + # @raise [Errors::Configuration] + # + # source://activerecord//lib/active_record/encryption/scheme.rb#83 + def validate_config!; 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 +# +# If you want to disable the auto-generated methods on the model, you can do +# so by setting the +:instance_methods+ option to false: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], instance_methods: false +# end +# +# If you want the enum value to be validated before saving, use the option +:validate+: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], validate: true +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown +# conversation.valid? # => false +# +# conversation.status = nil +# conversation.valid? # => false +# +# conversation.status = :active +# conversation.valid? # => true +# +# It is also possible to pass additional validation options: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ], validate: { allow_nil: true } +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown +# conversation.valid? # => false +# +# conversation.status = nil +# conversation.valid? # => true +# +# conversation.status = :active +# conversation.valid? # => true +# +# Otherwise +ArgumentError+ will raise: +# +# class Conversation < ActiveRecord::Base +# enum :status, [ :active, :archived ] +# end +# +# conversation = Conversation.new +# +# conversation.status = :unknown # 'unknown' is not a valid status (ArgumentError) +# +# source://activerecord//lib/active_record/enum.rb#165 +module ActiveRecord::Enum + # source://activerecord//lib/active_record/enum.rb#216 + def enum(name = T.unsafe(nil), values = T.unsafe(nil), **options); end + + private + + # source://activerecord//lib/active_record/enum.rb#241 + def _enum(name, values, prefix: T.unsafe(nil), suffix: T.unsafe(nil), scopes: T.unsafe(nil), instance_methods: T.unsafe(nil), validate: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/enum.rb#339 + def _enum_methods_module; end + + # source://activerecord//lib/active_record/enum.rb#347 + def assert_valid_enum_definition_values(values); end + + # source://activerecord//lib/active_record/enum.rb#374 + def assert_valid_enum_options(options); end + + # source://activerecord//lib/active_record/enum.rb#387 + def detect_enum_conflict!(enum_name, method_name, klass_method = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/enum.rb#411 + def detect_negative_enum_conditions!(method_names); end + + # source://activerecord//lib/active_record/enum.rb#236 + def inherited(base); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/enum.rb#401 + 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#166 + def extended(base); end + end +end + +# source://activerecord//lib/active_record/enum.rb#381 +ActiveRecord::Enum::ENUM_CONFLICT_MESSAGE = T.let(T.unsafe(nil), String) + +# source://activerecord//lib/active_record/enum.rb#307 +class ActiveRecord::Enum::EnumMethods < ::Module + # @return [EnumMethods] a new instance of EnumMethods + # + # source://activerecord//lib/active_record/enum.rb#308 + def initialize(klass); end + + private + + # source://activerecord//lib/active_record/enum.rb#315 + def define_enum_methods(name, value_method_name, value, scopes, instance_methods); end + + # Returns the value of attribute klass. + # + # source://activerecord//lib/active_record/enum.rb#313 + def klass; end +end + +# source://activerecord//lib/active_record/enum.rb#170 +class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value + # @return [EnumType] a new instance of EnumType + # + # source://activerecord//lib/active_record/enum.rb#173 + def initialize(name, mapping, subtype, raise_on_invalid_values: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/enum.rb#202 + def assert_valid_value(value); end + + # source://activerecord//lib/active_record/enum.rb#180 + def cast(value); end + + # source://activerecord//lib/active_record/enum.rb#190 + def deserialize(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/enum.rb#198 + def serializable?(value, &block); end + + # source://activerecord//lib/active_record/enum.rb#194 + def serialize(value); end + + # Returns the value of attribute subtype. + # + # source://activerecord//lib/active_record/enum.rb#210 + def subtype; end + + # source://activerecord//lib/active_record/enum.rb#171 + def type(*_arg0, **_arg1, &_arg2); end + + private + + # Returns the value of attribute mapping. + # + # source://activerecord//lib/active_record/enum.rb#213 + def mapping; end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/enum.rb#213 + def name; end +end + +# source://activerecord//lib/active_record/migration.rb#217 +class ActiveRecord::EnvironmentMismatchError < ::ActiveRecord::ActiveRecordError + # @return [EnvironmentMismatchError] a new instance of EnvironmentMismatchError + # + # source://activerecord//lib/active_record/migration.rb#218 + def initialize(current: T.unsafe(nil), stored: T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/migration.rb#231 +class ActiveRecord::EnvironmentStorageError < ::ActiveRecord::ActiveRecordError + # @return [EnvironmentStorageError] a new instance of EnvironmentStorageError + # + # source://activerecord//lib/active_record/migration.rb#232 + 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.connection_handler.clear_reloadable_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_reloadable_connections!]. +# +# source://activerecord//lib/active_record/errors.rb#128 +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, options = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/explain.rb#55 + def build_explain_clause(connection, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/explain.rb#40 + def render_bind(connection, 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#357 + 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#271 + def fifth; end + + # Same as #fifth but raises ActiveRecord::RecordNotFound if no record + # is found. + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#277 + def fifth!; end + + # Find by id - This can either be a specific id (ID), a list of ids (ID, ID, ID), or an array of ids ([ID, ID, ID]). + # `ID` refers to an "identifier". For models with a single-column primary key, `ID` will be a single value, + # and for models with a composite primary key, it will be an array of values. + # If one or more records cannot be found for the requested ids, then ActiveRecord::RecordNotFound will be raised. + # If the primary key is an integer, find by id coerces its arguments by using +to_i+. + # + # 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), or with composite primary key [7, 17] + # Person.find([1]) # returns an array for the object with ID = 1 + # Person.where("administrator = 1").order("created_on DESC").find(1) + # + # ==== Find a record for a composite primary key model + # TravelRoute.primary_key = [:origin, :destination] + # + # TravelRoute.find(["Ottawa", "London"]) + # => # + # + # TravelRoute.find([["Paris", "Montreal"]]) + # => [#] + # + # TravelRoute.find(["New York", "Las Vegas"], ["New York", "Portland"]) + # => [ + # #, + # # + # ] + # + # TravelRoute.find([["Berlin", "London"], ["Barcelona", "Lisbon"]]) + # => [ + # #, + # # + # ] + # + # NOTE: The returned records are in the same order as the ids you provide. + # If you want the results to be sorted by database, you can use ActiveRecord::QueryMethods#where + # method and provide an explicit ActiveRecord::QueryMethods#order option. + # 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. + # + # ==== Edge Cases + # + # Person.find(37) # raises ActiveRecord::RecordNotFound exception if the record with the given ID does not exist. + # Person.find([37]) # raises ActiveRecord::RecordNotFound exception if the record with the given ID in the input array does not exist. + # Person.find(nil) # raises ActiveRecord::RecordNotFound exception if the argument is nil. + # Person.find([]) # returns an empty array if the argument is an empty array. + # Person.find # raises ActiveRecord::RecordNotFound exception if the argument is not provided. + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#98 + 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#111 + 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#117 + 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#160 + 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#173 + 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#183 + 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#287 + 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#293 + 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#255 + def fourth; end + + # Same as #fourth but raises ActiveRecord::RecordNotFound if no record + # is found. + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#261 + 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#389 + 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#202 + 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#213 + 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#389 + 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#417 + 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#223 + def second; end + + # Same as #second but raises ActiveRecord::RecordNotFound if no record + # is found. + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#229 + 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#319 + 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#325 + 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#143 + 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#128 + 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#134 + 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#239 + def third; end + + # Same as #third but raises ActiveRecord::RecordNotFound if no record + # is found. + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#245 + 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#303 + 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#309 + def third_to_last!; end + + private + + # source://activerecord//lib/active_record/relation/finder_methods.rb#648 + def _order_columns; end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#457 + def apply_join_dependency(eager_loading: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#438 + def construct_relation_for_exists(conditions); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#636 + def find_last(limit); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#598 + def find_nth(index); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#622 + def find_nth_from_last(index); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#603 + def find_nth_with_limit(index, limit); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#520 + def find_one(id); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#541 + def find_some(ids); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#567 + def find_some_ordered(ids); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#582 + def find_take; end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#590 + def find_take_with_limit(limit); end + + # @raise [UnknownPrimaryKey] + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#491 + def find_with_ids(*ids); end + + # source://activerecord//lib/active_record/relation/finder_methods.rb#640 + def ordered_relation; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/finder_methods.rb#487 + 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#807 +class ActiveRecord::Fixture + include ::Enumerable + + # @return [Fixture] a new instance of Fixture + # + # source://activerecord//lib/active_record/fixtures.rb#818 + def initialize(fixture, model_class); end + + # source://activerecord//lib/active_record/fixtures.rb#831 + def [](key); end + + # source://activerecord//lib/active_record/fixtures.rb#823 + def class_name; end + + # source://activerecord//lib/active_record/fixtures.rb#827 + def each(&block); end + + # @raise [FixtureClassNotFound] + # + # source://activerecord//lib/active_record/fixtures.rb#837 + def find; end + + # Returns the value of attribute fixture. + # + # source://activerecord//lib/active_record/fixtures.rb#816 + def fixture; end + + # Returns the value of attribute model_class. + # + # source://activerecord//lib/active_record/fixtures.rb#816 + def model_class; end + + # Returns the value of attribute fixture. + # + # source://activerecord//lib/active_record/fixtures.rb#816 + def to_hash; end +end + +# source://activerecord//lib/active_record/fixtures.rb#810 +class ActiveRecord::Fixture::FixtureError < ::StandardError; end + +# source://activerecord//lib/active_record/fixtures.rb#813 +class ActiveRecord::Fixture::FormatError < ::ActiveRecord::Fixture::FixtureError; end + +# source://activerecord//lib/active_record/fixtures.rb#11 +class ActiveRecord::FixtureClassNotFound < ::ActiveRecord::ActiveRecordError; end + +# = Active Record \Fixtures +# +# \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 by default placed in either +# /test/fixtures/ or in the test/fixtures +# folder under any of your application's engines. +# +# The location can also be changed with ActiveSupport::TestCase.fixture_paths=, +# once you have require "rails/test_help" in your +test_helper.rb+. +# +# 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. +# +# == Ordering +# +# Fixtures by default are unordered. This is because the maps in YAML 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. +# +# For 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 +# +# If the model names conflicts with a +TestCase+ methods, you can use the generic +fixture+ accessor +# +# test "generic find" do +# assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name +# 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) %> +# +# If the model uses UUID values for identifiers, add the +:uuid+ argument: +# +# ActiveRecord::FixtureSet.identify(:boaty_mcboatface, :uuid) +# +# === 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. +# +# == Composite Primary Key Fixtures +# +# Fixtures for composite primary key tables are fairly similar to normal tables. +# When using an id column, the column may be omitted as usual: +# +# # app/models/book.rb +# class Book < ApplicationRecord +# self.primary_key = [:author_id, :id] +# belongs_to :author +# end +# +# +# +# # books.yml +# alices_adventure_in_wonderland: +# author_id: <%= ActiveRecord::FixtureSet.identify(:lewis_carroll) %> +# title: "Alice's Adventures in Wonderland" +# +# However, in order to support composite primary key relationships, +# you must use the `composite_identify` method: +# +# # app/models/book_orders.rb +# class BookOrder < ApplicationRecord +# self.primary_key = [:shop_id, :id] +# belongs_to :order, foreign_key: [:shop_id, :order_id] +# belongs_to :book, foreign_key: [:author_id, :book_id] +# end +# +# +# +# # book_orders.yml +# alices_adventure_in_wonderland_in_books: +# author: lewis_carroll +# book_id: <%= ActiveRecord::FixtureSet.composite_identify( +# :alices_adventure_in_wonderland, Book.primary_key)[:id] %> +# shop: book_store +# order_id: <%= ActiveRecord::FixtureSet.composite_identify( +# :books, Order.primary_key)[:id] %> +# +# == 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/fixtures.rb#528 +class ActiveRecord::FixtureSet + # @return [FixtureSet] a new instance of FixtureSet + # + # source://activerecord//lib/active_record/fixtures.rb#714 + def initialize(_, name, class_name, path, config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#725 + def [](x); end + + # source://activerecord//lib/active_record/fixtures.rb#729 + def []=(k, v); end + + # source://activerecord//lib/active_record/fixtures.rb#542 + def all_loaded_fixtures; end + + # source://activerecord//lib/active_record/fixtures.rb#542 + def all_loaded_fixtures=(val); end + + # Returns the value of attribute config. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + def config; end + + # source://activerecord//lib/active_record/fixtures.rb#733 + def each(&block); end + + # Returns the value of attribute fixtures. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + def fixtures; end + + # Returns the value of attribute ignored_fixtures. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + def ignored_fixtures; end + + # Returns the value of attribute model_class. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + def model_class; end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + def name; end + + # source://activerecord//lib/active_record/fixtures.rb#737 + def size; end + + # Returns the value of attribute table_name. + # + # source://activerecord//lib/active_record/fixtures.rb#712 + 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#743 + def table_rows; end + + private + + # source://activerecord//lib/active_record/fixtures.rb#801 + def default_fixture_model_class; end + + # source://activerecord//lib/active_record/fixtures.rb#763 + def ignored_fixtures=(base); end + + # source://activerecord//lib/active_record/fixtures.rb#755 + 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. + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/fixtures.rb#782 + def read_fixture_files(path); end + + class << self + # source://activerecord//lib/active_record/fixtures.rb#542 + def all_loaded_fixtures; end + + # source://activerecord//lib/active_record/fixtures.rb#542 + def all_loaded_fixtures=(val); end + + # source://activerecord//lib/active_record/fixtures.rb#577 + def cache_fixtures(connection_pool, fixtures_map); end + + # source://activerecord//lib/active_record/fixtures.rb#561 + def cache_for_connection_pool(connection_pool); end + + # source://activerecord//lib/active_record/fixtures.rb#569 + def cached_fixtures(connection_pool, keys_to_fetch = T.unsafe(nil)); end + + # Returns a consistent, platform-independent hash representing a mapping + # between the label and the subcomponents of the provided composite key. + # + # Example: + # + # composite_identify("label", [:a, :b, :c]) # => { a: hash_1, b: hash_2, c: hash_3 } + # + # source://activerecord//lib/active_record/fixtures.rb#634 + def composite_identify(label, key); end + + # Superclass for the evaluation contexts used by \ERB fixtures. + # + # source://activerecord//lib/active_record/fixtures.rb#642 + def context_class; end + + # source://activerecord//lib/active_record/fixtures.rb#596 + def create_fixtures(fixtures_directories, fixture_set_names, class_names = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#545 + def default_fixture_model_name(fixture_set_name, config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#551 + def default_fixture_table_name(fixture_set_name, config = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/fixtures.rb#565 + def fixture_is_cached?(connection_pool, 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#620 + def identify(label, column_type = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#590 + def instantiate_all_loaded_fixtures(object, load_instances = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#581 + def instantiate_fixtures(object, fixture_set, load_instances = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/fixtures.rb#557 + def reset_cache; end + + private + + # source://activerecord//lib/active_record/fixtures.rb#697 + def check_all_foreign_keys_valid!(conn); end + + # source://activerecord//lib/active_record/fixtures.rb#666 + def insert(fixture_sets, connection_pool); end + + # source://activerecord//lib/active_record/fixtures.rb#647 + def read_and_insert(fixtures_directories, fixture_files, class_names, connection_pool); end + + # source://activerecord//lib/active_record/fixtures.rb#707 + def update_all_loaded_fixtures(fixtures_map); end + 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#538 +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 + + # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#29 + def column_names; end + + # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#18 + def column_type(column_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#25 + def has_column?(column_name); end + + # source://activerecord//lib/active_record/fixture_set/model_metadata.rb#37 + 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#33 + 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#7 +class ActiveRecord::FixtureSet::RenderContext + class << self + # source://activerecord//lib/active_record/fixture_set/render_context.rb#8 + 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#186 + def add_join_records(association); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/fixture_set/table_row.rb#136 + def column_defined?(col); 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#127 + def generate_composite_primary_key; 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#140 + def resolve_enums; end + + # source://activerecord//lib/active_record/fixture_set/table_row.rb#148 + 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#66 + def initialize(pool, *args, **kwargs); end + + # source://activerecord//lib/active_record/future_result.rb#94 + def cancel; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#139 + def canceled?; end + + # source://activerecord//lib/active_record/future_result.rb#62 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/future_result.rb#90 + def execute!(connection); end + + # source://activerecord//lib/active_record/future_result.rb#100 + def execute_or_skip; end + + # Returns the value of attribute lock_wait. + # + # source://activerecord//lib/active_record/future_result.rb#64 + def lock_wait; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#135 + def pending?; end + + # source://activerecord//lib/active_record/future_result.rb#122 + def result; end + + # source://activerecord//lib/active_record/future_result.rb#85 + def schedule!(session); end + + # source://activerecord//lib/active_record/future_result.rb#81 + def then(&block); end + + # source://activerecord//lib/active_record/future_result.rb#62 + def to_a(*_arg0, **_arg1, &_arg2); end + + private + + # source://activerecord//lib/active_record/future_result.rb#169 + def exec_query(connection, *args, **kwargs); end + + # source://activerecord//lib/active_record/future_result.rb#144 + def execute_or_wait; end + + # source://activerecord//lib/active_record/future_result.rb#161 + def execute_query(connection, async: T.unsafe(nil)); end + + class << self + # source://activerecord//lib/active_record/future_result.rb#53 + def wrap(result); end + end +end + +# source://activerecord//lib/active_record/future_result.rb#51 +class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/future_result.rb#5 +class ActiveRecord::FutureResult::Complete + # @return [Complete] a new instance of Complete + # + # source://activerecord//lib/active_record/future_result.rb#9 + def initialize(result); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#17 + def canceled?; end + + # source://activerecord//lib/active_record/future_result.rb#7 + def empty?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/future_result.rb#13 + def pending?; end + + # Returns the value of attribute result. + # + # source://activerecord//lib/active_record/future_result.rb#6 + def result; end + + # source://activerecord//lib/active_record/future_result.rb#21 + def then(&block); end + + # source://activerecord//lib/active_record/future_result.rb#7 + def to_a(*_arg0, **_arg1, &_arg2); end +end + +# source://activerecord//lib/active_record/future_result.rb#26 +class ActiveRecord::FutureResult::EventBuffer + # @return [EventBuffer] a new instance of EventBuffer + # + # source://activerecord//lib/active_record/future_result.rb#27 + def initialize(future_result, instrumenter); end + + # source://activerecord//lib/active_record/future_result.rb#42 + def flush; end + + # source://activerecord//lib/active_record/future_result.rb#33 + def instrument(name, payload = T.unsafe(nil), &block); end +end + +# source://activerecord//lib/active_record/future_result.rb#173 +class ActiveRecord::FutureResult::SelectAll < ::ActiveRecord::FutureResult + private + + # source://activerecord//lib/active_record/future_result.rb#175 + def exec_query(*_arg0, **_arg1); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#74 +class ActiveRecord::HasManyThroughAssociationNotFoundError < ::ActiveRecord::ActiveRecordError + include ::DidYouMean::Correctable + + # @return [HasManyThroughAssociationNotFoundError] a new instance of HasManyThroughAssociationNotFoundError + # + # source://activerecord//lib/active_record/associations/errors.rb#77 + def initialize(owner_class = T.unsafe(nil), reflection = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/associations/errors.rb#90 + def corrections; end + + # Returns the value of attribute owner_class. + # + # source://activerecord//lib/active_record/associations/errors.rb#75 + def owner_class; end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/errors.rb#75 + def reflection; end +end + +# source://activerecord//lib/active_record/associations/errors.rb#124 +class ActiveRecord::HasManyThroughAssociationPointlessSourceTypeError < ::ActiveRecord::ActiveRecordError + # @return [HasManyThroughAssociationPointlessSourceTypeError] a new instance of HasManyThroughAssociationPointlessSourceTypeError + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#104 +class ActiveRecord::HasManyThroughAssociationPolymorphicSourceError < ::ActiveRecord::ActiveRecordError + # @return [HasManyThroughAssociationPolymorphicSourceError] a new instance of HasManyThroughAssociationPolymorphicSourceError + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#114 +class ActiveRecord::HasManyThroughAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError + # @return [HasManyThroughAssociationPolymorphicThroughError] a new instance of HasManyThroughAssociationPolymorphicThroughError + # + # source://activerecord//lib/active_record/associations/errors.rb#115 + def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#218 +class ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end + +# source://activerecord//lib/active_record/associations/errors.rb#234 +class ActiveRecord::HasManyThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end + +# source://activerecord//lib/active_record/associations/errors.rb#167 +class ActiveRecord::HasManyThroughOrderError < ::ActiveRecord::ActiveRecordError + # @return [HasManyThroughOrderError] a new instance of HasManyThroughOrderError + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#154 +class ActiveRecord::HasManyThroughSourceAssociationNotFoundError < ::ActiveRecord::ActiveRecordError + # @return [HasManyThroughSourceAssociationNotFoundError] a new instance of HasManyThroughSourceAssociationNotFoundError + # + # source://activerecord//lib/active_record/associations/errors.rb#155 + def initialize(reflection = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#144 +class ActiveRecord::HasOneAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError + # @return [HasOneAssociationPolymorphicThroughError] a new instance of HasOneAssociationPolymorphicThroughError + # + # source://activerecord//lib/active_record/associations/errors.rb#145 + def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#134 +class ActiveRecord::HasOneThroughCantAssociateThroughCollection < ::ActiveRecord::ActiveRecordError + # @return [HasOneThroughCantAssociateThroughCollection] a new instance of HasOneThroughCantAssociateThroughCollection + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#221 +class ActiveRecord::HasOneThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end + +# source://activerecord//lib/active_record/associations/errors.rb#237 +class ActiveRecord::HasOneThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end + +# source://activerecord//lib/active_record/migration.rb#122 +class ActiveRecord::IllegalMigrationNameError < ::ActiveRecord::MigrationError + # @return [IllegalMigrationNameError] a new instance of IllegalMigrationNameError + # + # source://activerecord//lib/active_record/migration.rb#123 + def initialize(name = T.unsafe(nil)); end +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#39 +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#359 + def ensure_proper_type; end + + # source://activerecord//lib/active_record/inheritance.rb#343 + def initialize_dup(other); end + + # source://activerecord//lib/active_record/inheritance.rb#349 + 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#52 +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 behavior: + # + # 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#164 + 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 behavior: + # + # 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#164 + def abstract_class=(_arg0); end + + # Returns whether this class is an abstract class or not. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/inheritance.rb#167 + def abstract_class?; end + + # Returns the first class in the inheritance hierarchy that descends from either an + # abstract class or from ActiveRecord::Base. + # + # Consider the following behaviour: + # + # class ApplicationRecord < ActiveRecord::Base + # self.abstract_class = true + # end + # class Shape < ApplicationRecord + # self.abstract_class = true + # end + # Polygon = Class.new(Shape) + # Square = Class.new(Polygon) + # + # ApplicationRecord.base_class # => ApplicationRecord + # Shape.base_class # => Shape + # Polygon.base_class # => Polygon + # Square.base_class # => Polygon + # + # source://activerecord//lib/active_record/inheritance.rb#115 + def base_class; end + + # Returns whether the class is a base class. + # See #base_class for more information. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/inheritance.rb#119 + 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#82 + def descends_from_active_record?; end + + # source://activerecord//lib/active_record/inheritance.rb#226 + def dup; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/inheritance.rb#92 + def finder_needs_type_condition?; 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#56 + def new(attributes = T.unsafe(nil), &block); end + + # Returns the class for the provided +name+. + # + # It is used to find the class correspondent to the value stored in the polymorphic type column. + # + # source://activerecord//lib/active_record/inheritance.rb#218 + 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#211 + 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#177 + def primary_abstract_class; end + + # Returns the class for the provided +type_name+. + # + # It is used to find the class correspondent to the value stored in the inheritance column. + # + # source://activerecord//lib/active_record/inheritance.rb#194 + def sti_class_for(type_name); end + + # Returns the value to be stored in the inheritance column for STI. + # + # source://activerecord//lib/active_record/inheritance.rb#187 + 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#242 + def compute_type(type_name); end + + # source://activerecord//lib/active_record/inheritance.rb#270 + 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#299 + def discriminate_class_for_record(record); end + + # source://activerecord//lib/active_record/inheritance.rb#311 + def find_sti_class(type_name); end + + # source://activerecord//lib/active_record/inheritance.rb#287 + def inherited(subclass); end + + # source://activerecord//lib/active_record/inheritance.rb#234 + 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#331 + def subclass_from_attributes(attrs); end + + # source://activerecord//lib/active_record/inheritance.rb#322 + def type_condition(table = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/inheritance.rb#307 + def using_single_table_inheritance?(record); end +end + +# source://activerecord//lib/active_record/insert_all.rb#6 +class ActiveRecord::InsertAll + # @return [InsertAll] a new instance of InsertAll + # + # source://activerecord//lib/active_record/insert_all.rb#18 + def initialize(relation, connection, 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#48 + 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 renaming this method, as it only conditionally extends keys, not always + # + # source://activerecord//lib/active_record/insert_all.rb#92 + def keys_including_timestamps; end + + # source://activerecord//lib/active_record/insert_all.rb#73 + 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#61 + def primary_keys; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#87 + 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#65 + 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#57 + def updatable_columns; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#69 + 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#129 + def configure_on_duplicate_update_logic; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#145 + def custom_update_sql_provided?; end + + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/insert_all.rb#212 + def disallow_raw_sql!(value); end + + # source://activerecord//lib/active_record/insert_all.rb#173 + def ensure_valid_options_for_connection!; end + + # source://activerecord//lib/active_record/insert_all.rb#149 + def find_unique_index_for(unique_by); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#101 + def has_attribute_aliases?(attributes); end + + # source://activerecord//lib/active_record/insert_all.rb#197 + def readonly_columns; end + + # source://activerecord//lib/active_record/insert_all.rb#125 + def resolve_attribute_alias(attribute); end + + # source://activerecord//lib/active_record/insert_all.rb#114 + def resolve_attribute_aliases; end + + # source://activerecord//lib/active_record/insert_all.rb#105 + def resolve_sti; end + + # source://activerecord//lib/active_record/insert_all.rb#221 + def timestamps_for_create; end + + # source://activerecord//lib/active_record/insert_all.rb#192 + def to_sql; end + + # source://activerecord//lib/active_record/insert_all.rb#201 + def unique_by_columns; end + + # source://activerecord//lib/active_record/insert_all.rb#169 + def unique_indexes; end + + # source://activerecord//lib/active_record/insert_all.rb#206 + def verify_attributes(attributes); end + + class << self + # source://activerecord//lib/active_record/insert_all.rb#11 + def execute(relation, *_arg1, **_arg2, &_arg3); end + end +end + +# source://activerecord//lib/active_record/insert_all.rb#225 +class ActiveRecord::InsertAll::Builder + # @return [Builder] a new instance of Builder + # + # source://activerecord//lib/active_record/insert_all.rb#230 + def initialize(insert_all); end + + # source://activerecord//lib/active_record/insert_all.rb#265 + def conflict_target; end + + # source://activerecord//lib/active_record/insert_all.rb#234 + def into; end + + # source://activerecord//lib/active_record/insert_all.rb#228 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/insert_all.rb#228 + def keys_including_timestamps(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/insert_all.rb#226 + def model; end + + # source://activerecord//lib/active_record/insert_all.rb#289 + def raw_update_sql; end + + # source://activerecord//lib/active_record/insert_all.rb#289 + def raw_update_sql?; end + + # source://activerecord//lib/active_record/insert_all.rb#228 + def record_timestamps?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/insert_all.rb#249 + def returning; end + + # source://activerecord//lib/active_record/insert_all.rb#228 + def skip_duplicates?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/insert_all.rb#279 + def touch_model_timestamps_unless(&block); end + + # source://activerecord//lib/active_record/insert_all.rb#275 + def updatable_columns; end + + # source://activerecord//lib/active_record/insert_all.rb#228 + def update_duplicates?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/insert_all.rb#238 + def values_list; end + + private + + # source://activerecord//lib/active_record/insert_all.rb#302 + def columns_list; end + + # Returns the value of attribute connection. + # + # source://activerecord//lib/active_record/insert_all.rb#296 + def connection; end + + # @raise [UnknownAttributeError] + # + # source://activerecord//lib/active_record/insert_all.rb#306 + def extract_types_from_columns_on(table_name, keys:); end + + # source://activerecord//lib/active_record/insert_all.rb#315 + def format_columns(columns); end + + # Returns the value of attribute insert_all. + # + # source://activerecord//lib/active_record/insert_all.rb#296 + def insert_all; end + + # source://activerecord//lib/active_record/insert_all.rb#323 + def quote_column(column); end + + # source://activerecord//lib/active_record/insert_all.rb#319 + def quote_columns(columns); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/insert_all.rb#298 + 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.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.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#200 + 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.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.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.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 + # @return [InternalMetadata] a new instance of InternalMetadata + # + # source://activerecord//lib/active_record/internal_metadata.rb#18 + def initialize(pool); end + + # source://activerecord//lib/active_record/internal_metadata.rb#47 + def [](key); end + + # source://activerecord//lib/active_record/internal_metadata.rb#39 + def []=(key, value); end + + # Returns the value of attribute arel_table. + # + # source://activerecord//lib/active_record/internal_metadata.rb#16 + def arel_table; end + + # source://activerecord//lib/active_record/internal_metadata.rb#65 + def count; end + + # Creates an internal metadata table with columns +key+ and +value+ + # + # source://activerecord//lib/active_record/internal_metadata.rb#85 + def create_table; end + + # source://activerecord//lib/active_record/internal_metadata.rb#74 + def create_table_and_set_flags(environment, schema_sha1 = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/internal_metadata.rb#57 + def delete_all_entries; end + + # source://activerecord//lib/active_record/internal_metadata.rb#99 + def drop_table; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/internal_metadata.rb#35 + def enabled?; end + + # source://activerecord//lib/active_record/internal_metadata.rb#23 + def primary_key; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/internal_metadata.rb#107 + def table_exists?; end + + # source://activerecord//lib/active_record/internal_metadata.rb#31 + def table_name; end + + # source://activerecord//lib/active_record/internal_metadata.rb#27 + def value_key; end + + private + + # source://activerecord//lib/active_record/internal_metadata.rb#130 + def create_entry(connection, key, value); end + + # source://activerecord//lib/active_record/internal_metadata.rb#126 + def current_time(connection); end + + # source://activerecord//lib/active_record/internal_metadata.rb#154 + def select_entry(connection, key); end + + # source://activerecord//lib/active_record/internal_metadata.rb#142 + def update_entry(connection, key, new_value); end + + # source://activerecord//lib/active_record/internal_metadata.rb#112 + def update_or_create_entry(connection, key, value); end +end + +# source://activerecord//lib/active_record/internal_metadata.rb#13 +class ActiveRecord::InternalMetadata::NullInternalMetadata; end + +# Raised when a record cannot be inserted or updated because it references a non-existent record, +# or when a record cannot be deleted because a parent record references it. +# +# source://activerecord//lib/active_record/errors.rb#234 +class ActiveRecord::InvalidForeignKey < ::ActiveRecord::WrappedDatabaseException; end + +# source://activerecord//lib/active_record/migration.rb#132 +class ActiveRecord::InvalidMigrationTimestampError < ::ActiveRecord::MigrationError + # @return [InvalidMigrationTimestampError] a new instance of InvalidMigrationTimestampError + # + # source://activerecord//lib/active_record/migration.rb#133 + def initialize(version = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#33 +class ActiveRecord::InverseOfAssociationNotFoundError < ::ActiveRecord::ActiveRecordError + include ::DidYouMean::Correctable + + # @return [InverseOfAssociationNotFoundError] a new instance of InverseOfAssociationNotFoundError + # + # source://activerecord//lib/active_record/associations/errors.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/errors.rb#34 + def associated_class; end + + # source://activerecord//lib/active_record/associations/errors.rb#49 + def corrections; end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/errors.rb#34 + def reflection; end +end + +# source://activerecord//lib/active_record/associations/errors.rb#62 +class ActiveRecord::InverseOfAssociationRecursiveError < ::ActiveRecord::ActiveRecordError + # @return [InverseOfAssociationRecursiveError] a new instance of InverseOfAssociationRecursiveError + # + # source://activerecord//lib/active_record/associations/errors.rb#64 + def initialize(reflection = T.unsafe(nil)); end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/associations/errors.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[8.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[8.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[8.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#89 +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#557 +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#565 +class ActiveRecord::LockWaitTimeout < ::ActiveRecord::StatementInvalid; end + +# source://activerecord//lib/active_record.rb#148 +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#206 +class ActiveRecord::Locking::LockingType + # source://activerecord//lib/active_record/locking/optimistic.rb#211 + def deserialize(value); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#223 + def encode_with(coder); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#219 + def init_with(coder); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#215 + def serialize(value); end + + class << self + # source://activerecord//lib/active_record/locking/optimistic.rb#207 + 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 integer column +lock_version+ 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#142 + def _clear_locking_column; end + + # source://activerecord//lib/active_record/locking/optimistic.rb#78 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#134 + def _lock_value_for_database(locking_column); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#147 + def _query_constraints_hash; end + + # source://activerecord//lib/active_record/locking/optimistic.rb#87 + def _touch_row(attribute_names, time); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#92 + def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#124 + def destroy_row; end + + # source://activerecord//lib/active_record/locking/optimistic.rb#72 + def initialize_dup(other); 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#154 +module ActiveRecord::Locking::Optimistic::ClassMethods + # The version column used for optimistic locking. Defaults to +lock_version+. + # + # source://activerecord//lib/active_record/locking/optimistic.rb#171 + def locking_column; end + + # Set the column to use for optimistic locking. Defaults to +lock_version+. + # + # source://activerecord//lib/active_record/locking/optimistic.rb#165 + 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#160 + 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#174 + 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#180 + def update_counters(id, counters); end + + private + + # source://activerecord//lib/active_record/locking/optimistic.rb#186 + def hook_attribute_type(name, cast_type); end + + # source://activerecord//lib/active_record/locking/optimistic.rb#194 + def inherited(base); end +end + +# source://activerecord//lib/active_record/locking/optimistic.rb#155 +ActiveRecord::Locking::Optimistic::ClassMethods::DEFAULT_LOCKING_COLUMN = T.let(T.unsafe(nil), String) + +# = \Pessimistic \Locking +# +# Locking::Pessimistic provides support for row-level locking using +# SELECT ... FOR UPDATE and other lock types. +# +# 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#64 +module ActiveRecord::Locking::Pessimistic + # Obtain a row lock on this record. Reloads the record to obtain the requested + # lock. Pass an SQL locking clause to append the end of the SELECT statement + # or pass true for "FOR UPDATE" (the default, an exclusive row lock). Returns + # the locked record. + # + # source://activerecord//lib/active_record/locking/pessimistic.rb#69 + def lock!(lock = T.unsafe(nil)); end + + # Wraps the passed block in a transaction, reloading the object with a + # lock before yielding. You can pass the SQL locking clause + # as an optional argument (see #lock!). + # + # You can also pass options like requires_new:, isolation:, + # and joinable: to the wrapping transaction (see + # ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction). + # + # source://activerecord//lib/active_record/locking/pessimistic.rb#92 + 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#18 + def sql(event); end + + # source://activerecord//lib/active_record/log_subscriber.rb#9 + def strict_loading_violation(event); end + + private + + # source://activerecord//lib/active_record/log_subscriber.rb#80 + def colorize_payload_name(name, payload_name); end + + # source://activerecord//lib/active_record/log_subscriber.rb#113 + def debug(progname = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/log_subscriber.rb#143 + def filter(name, value); end + + # source://activerecord//lib/active_record/log_subscriber.rb#121 + def log_query_source; end + + # source://activerecord//lib/active_record/log_subscriber.rb#109 + def logger; end + + # source://activerecord//lib/active_record/log_subscriber.rb#130 + def query_source_location; end + + # source://activerecord//lib/active_record/log_subscriber.rb#65 + def render_bind(attr, value); end + + # source://activerecord//lib/active_record/log_subscriber.rb#88 + def sql_color(sql); end + + # source://activerecord//lib/active_record/log_subscriber.rb#61 + def type_casted_binds(casted_binds); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def backtrace_cleaner; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def backtrace_cleaner=(new_value); end + + # source://activerecord//lib/active_record/log_subscriber.rb#7 + def backtrace_cleaner?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_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/marshalling.rb#4 +module ActiveRecord::Marshalling + class << self + # Returns the value of attribute format_version. + # + # source://activerecord//lib/active_record/marshalling.rb#8 + def format_version; end + + # source://activerecord//lib/active_record/marshalling.rb#10 + def format_version=(version); end + end +end + +# source://activerecord//lib/active_record/marshalling.rb#23 +module ActiveRecord::Marshalling::Methods + # source://activerecord//lib/active_record/marshalling.rb#24 + def _marshal_dump_7_1; end + + # source://activerecord//lib/active_record/marshalling.rb#40 + def marshal_load(state); end +end + +# source://activerecord//lib/active_record.rb#166 +module ActiveRecord::Middleware + extend ::ActiveSupport::Autoload +end + +# = Database Selector \Middleware +# +# The DatabaseSelector Middleware provides a framework for automatically +# swapping from the primary to the replica database connection. \Rails +# 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 core extension in order to use +2.seconds+ +# +# 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#52 + def initialize(app, resolver_klass = T.unsafe(nil), context_klass = T.unsafe(nil), options = T.unsafe(nil)); end + + # Middleware that determines which database connection to use in a multiple + # database application. + # + # source://activerecord//lib/active_record/middleware/database_selector.rb#63 + def call(env); end + + # Returns the value of attribute context_klass. + # + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 + def context_klass; end + + # Returns the value of attribute options. + # + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 + def options; end + + # Returns the value of attribute resolver_klass. + # + # source://activerecord//lib/active_record/middleware/database_selector.rb#59 + def resolver_klass; end + + private + + # source://activerecord//lib/active_record/middleware/database_selector.rb#72 + 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 + + # @return [Boolean] + # + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#51 + def reading_request?(request); end + + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#47 + def update_context(response); end + + # 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#56 + def read_from_primary(&blk); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#78 + def read_from_primary?; end + + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#62 + def read_from_replica(&blk); end + + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#82 + def send_to_replica_delay; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#86 + def time_since_last_write_ok?; end + + # source://activerecord//lib/active_record/middleware/database_selector/resolver.rb#68 + 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 + +# = Shard Selector \Middleware +# +# 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#31 +class ActiveRecord::Middleware::ShardSelector + # @return [ShardSelector] a new instance of ShardSelector + # + # source://activerecord//lib/active_record/middleware/shard_selector.rb#32 + def initialize(app, resolver, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/middleware/shard_selector.rb#40 + def call(env); end + + # Returns the value of attribute options. + # + # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 + def options; end + + # Returns the value of attribute resolver. + # + # source://activerecord//lib/active_record/middleware/shard_selector.rb#38 + def resolver; end + + private + + # source://activerecord//lib/active_record/middleware/shard_selector.rb#51 + def selected_shard(request); end + + # source://activerecord//lib/active_record/middleware/shard_selector.rb#55 + 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[8.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[8.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(*names): Drops the given tables. +# * 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[8.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[8.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[8.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[8.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[8.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). Timestamps should not be +# modified manually. To validate that migration timestamps adhere to the +# format Active Record expects, you can use the following configuration option: +# +# config.active_record.validate_migration_timestamps = true +# +# 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[8.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[8.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#572 +class ActiveRecord::Migration + # @return [Migration] a new instance of Migration + # + # source://activerecord//lib/active_record/migration.rb#805 + def initialize(name = T.unsafe(nil), version = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#1010 + def announce(message); end + + # source://activerecord//lib/active_record/migration.rb#1041 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#1045 + def connection_pool; end + + # source://activerecord//lib/active_record/migration.rb#1066 + def copy(destination, sources, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#792 + def disable_ddl_transaction; end + + # source://activerecord//lib/active_record/migration.rb#962 + def down; end + + # source://activerecord//lib/active_record/migration.rb#990 + def exec_migration(conn, direction); end + + # source://activerecord//lib/active_record/migration.rb#812 + def execution_strategy; end + + # source://activerecord//lib/active_record/migration.rb#1049 + def method_missing(method, *arguments, **_arg2, &block); end + + # Execute this migration in the named direction + # + # source://activerecord//lib/active_record/migration.rb#969 + def migrate(direction); end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/migration.rb#803 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activerecord//lib/active_record/migration.rb#803 + def name=(_arg0); end + + # Determines the version number of the next migration. + # + # source://activerecord//lib/active_record/migration.rb#1133 + 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#1124 + 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[8.0] + # def change + # add_column :users, :first_name, :string + # add_column :users, :last_name, :string + # + # reversible do |dir| + # User.reset_column_information + # 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#914 + 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[8.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[8.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#857 + def revert(*migration_classes, &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#874 + 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#942 + 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#1018 + 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#1024 + 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#1034 + 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#1143 + def table_name_options(config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#956 + 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[8.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#933 + def up_only(&block); end + + # :singleton-method: verbose + # + # Specifies if migrations will write the actions they are taking to the console as they + # happen, along with benchmarks describing how long each step took. Defaults to + # true. + # + # source://activerecord//lib/active_record/migration.rb#802 + def verbose; end + + # source://activerecord//lib/active_record/migration.rb#802 + def verbose=(val); end + + # Returns the value of attribute version. + # + # source://activerecord//lib/active_record/migration.rb#803 + def version; end + + # Sets the attribute version + # + # @param value the value to set the attribute version to. + # + # source://activerecord//lib/active_record/migration.rb#803 + def version=(_arg0); end + + # source://activerecord//lib/active_record/migration.rb#1006 + def write(text = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/migration.rb#1175 + def command_recorder; end + + # source://activerecord//lib/active_record/migration.rb#1151 + def execute_block; end + + # source://activerecord//lib/active_record/migration.rb#1159 + def format_arguments(arguments); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1171 + def internal_option?(option_name); end + + class << self + # source://activerecord//lib/active_record/migration.rb#630 + def [](version); end + + # Raises ActiveRecord::PendingMigrationError error if any migrations are pending + # for all database configurations in an environment. + # + # source://activerecord//lib/active_record/migration.rb#698 + def check_all_pending!; end + + # source://activerecord//lib/active_record/migration.rb#744 + def check_pending_migrations; end + + # source://activerecord//lib/active_record/migration.rb#634 + def current_version; end + + # source://activerecord//lib/active_record/migration.rb#689 + def delegate; end + + # source://activerecord//lib/active_record/migration.rb#689 + def delegate=(_arg0); end + + # source://activerecord//lib/active_record/migration.rb#690 + 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#740 + def disable_ddl_transaction!; end + + # source://activerecord//lib/active_record/migration.rb#690 + def disable_ddl_transaction=(_arg0); end + + # source://activerecord//lib/active_record/migration.rb#618 + def inherited(subclass); end + + # source://activerecord//lib/active_record/migration.rb#714 + def load_schema_if_pending!; end + + # source://activerecord//lib/active_record/migration.rb#722 + def maintain_test_schema!; end + + # source://activerecord//lib/active_record/migration.rb#728 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # source://activerecord//lib/active_record/migration.rb#732 + def migrate(direction); end + + # source://activerecord//lib/active_record/migration.rb#692 + def nearest_delegate; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#640 + def valid_version_format?(version_string); end + + # source://activerecord//lib/active_record/migration.rb#802 + def verbose; end + + # source://activerecord//lib/active_record/migration.rb#802 + def verbose=(val); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#753 + def any_schema_needs_update?; end + + # source://activerecord//lib/active_record/migration.rb#759 + def db_configs_in_current_env; end + + # source://activerecord//lib/active_record/migration.rb#777 + def env; end + + # source://activerecord//lib/active_record/migration.rb#781 + def load_schema!; end + + # source://activerecord//lib/active_record/migration.rb#763 + def pending_migrations; end + end +end + +# This class is used to verify that all migrations have been run before +# loading a web page if config.active_record.migration_error is set to +:page_load+. +# +# source://activerecord//lib/active_record/migration.rb#649 +class ActiveRecord::Migration::CheckPending + # @return [CheckPending] a new instance of CheckPending + # + # source://activerecord//lib/active_record/migration.rb#650 + def initialize(app, file_watcher: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#657 + def call(env); end + + private + + # source://activerecord//lib/active_record/migration.rb#676 + def build_watcher(&block); end + + # source://activerecord//lib/active_record/migration.rb#683 + def connection; end +end + +# = \Migration Command Recorder +# +# +ActiveRecord::Migration::CommandRecorder+ records commands done during +# a migration and knows how to reverse those commands. The CommandRecorder +# knows how to invert the following commands: +# +# * add_column +# * add_foreign_key +# * add_check_constraint +# * add_exclusion_constraint +# * add_unique_constraint +# * add_index +# * add_reference +# * add_timestamps +# * 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_enum +# * create_join_table +# * create_virtual_table +# * create_table +# * disable_extension +# * drop_enum (must supply a list of values) +# * drop_join_table +# * drop_virtual_table (must supply options) +# * drop_table (must supply a block) +# * enable_extension +# * remove_column (must supply a type) +# * remove_columns (must supply a +:type+ option) +# * remove_foreign_key (must supply a second table) +# * remove_check_constraint +# * remove_exclusion_constraint +# * remove_unique_constraint +# * remove_index +# * remove_reference +# * remove_timestamps +# * rename_column +# * rename_enum (must supply a +:to+ option) +# * rename_enum_value (must supply a +:from+ and +:to+ option) +# * rename_index +# * rename_table +# +# source://activerecord//lib/active_record/migration/command_recorder.rb#47 +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#67 + def initialize(delegate = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_belongs_to(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_check_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_column(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_enum_value(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_exclusion_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_foreign_key(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_index(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_reference(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_timestamps(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def add_unique_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def change_column(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def change_column_comment(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def change_column_default(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def change_column_null(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#136 + def change_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def change_table_comment(*args, **_arg1, &block); end + + # Returns the value of attribute commands. + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#65 + 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#65 + def commands=(_arg0); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def create_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def create_join_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def create_schema(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def create_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def create_virtual_table(*args, **_arg1, &block); end + + # Returns the value of attribute delegate. + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#65 + 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#65 + def delegate=(_arg0); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def disable_extension(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def drop_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def drop_join_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def drop_schema(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def drop_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def drop_virtual_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def enable_extension(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def execute(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + 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#114 + def inverse_of(command, args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_belongs_to(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + 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#94 + def record(*command, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_belongs_to(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_check_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_column(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_columns(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_exclusion_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_foreign_key(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_index(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_reference(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_timestamps(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def remove_unique_constraint(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def rename_column(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def rename_enum(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def rename_enum_value(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def rename_index(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def rename_table(*args, **_arg1, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#148 + 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#80 + def revert; end + + # Returns the value of attribute reverting. + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#65 + 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#65 + def reverting=(_arg0); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#127 + def transaction(*args, **_arg1, &block); end + + private + + # source://activerecord//lib/active_record/migration/command_recorder.rb#324 + def invert_add_check_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#285 + def invert_add_foreign_key(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#346 + def invert_add_unique_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#304 + def invert_change_column_comment(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#270 + def invert_change_column_default(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#280 + def invert_change_column_null(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#314 + def invert_change_table_comment(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#197 + def invert_create_table(args, &block); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#360 + def invert_drop_enum(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#204 + def invert_drop_table(args, &block); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#386 + def invert_drop_virtual_table(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#332 + def invert_remove_check_constraint(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#226 + def invert_remove_column(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#231 + def invert_remove_columns(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#341 + def invert_remove_exclusion_constraint(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#290 + def invert_remove_foreign_key(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#249 + def invert_remove_index(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#353 + def invert_remove_unique_constraint(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#244 + def invert_rename_column(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#366 + def invert_rename_enum(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#376 + def invert_rename_enum_value(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#239 + def invert_rename_index(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#219 + def invert_rename_table(args); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#186 + def invert_transaction(args, &block); end + + # Forwards any missing method call to the \target. + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#397 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/command_recorder.rb#392 + def respond_to_missing?(method, _); end +end + +# source://activerecord//lib/active_record/migration/command_recorder.rb#48 +ActiveRecord::Migration::CommandRecorder::ReversibleAndIrreversibleMethods = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/migration/command_recorder.rb#155 +module ActiveRecord::Migration::CommandRecorder::StraightReversions + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_check_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_column(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_exclusion_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_foreign_key(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_index(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_reference(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_timestamps(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_add_unique_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_create_enum(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_create_join_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_create_schema(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_create_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_create_virtual_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_disable_extension(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_drop_enum(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_drop_join_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_drop_schema(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_drop_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_drop_virtual_table(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_enable_extension(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_execute_block(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_check_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_column(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_exclusion_constraint(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_foreign_key(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_index(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_reference(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_timestamps(args, &block); end + + # source://activerecord//lib/active_record/migration/command_recorder.rb#176 + def invert_remove_unique_constraint(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#416 +class ActiveRecord::Migration::Compatibility::V4_2 < ::ActiveRecord::Migration::Compatibility::V5_0 + # source://activerecord//lib/active_record/migration/compatibility.rb#434 + def add_belongs_to(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#434 + def add_reference(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#440 + def add_timestamps(table_name, **options); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/compatibility.rb#445 + def index_exists?(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#456 + def remove_index(table_name, column_name = T.unsafe(nil), **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#462 + def compatible_table_definition(t); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#469 + def index_name_for_remove(table_name, column_name, options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#417 +module ActiveRecord::Migration::Compatibility::V4_2::TableDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#418 + def belongs_to(*_arg0, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#418 + def references(*_arg0, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#424 + def timestamps(**options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#430 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#347 +class ActiveRecord::Migration::Compatibility::V5_0 < ::ActiveRecord::Migration::Compatibility::V5_1 + # source://activerecord//lib/active_record/migration/compatibility.rb#402 + def add_belongs_to(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#392 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#402 + def add_reference(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#387 + def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#364 + def create_table(table_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#408 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#348 +module ActiveRecord::Migration::Compatibility::V5_0::TableDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#354 + def belongs_to(*args, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#349 + def primary_key(name, type = T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#354 + def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#360 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#326 +class ActiveRecord::Migration::Compatibility::V5_1 < ::ActiveRecord::Migration::Compatibility::V5_2 + # source://activerecord//lib/active_record/migration/compatibility.rb#327 + def change_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#338 + def create_table(table_name, **options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#270 +class ActiveRecord::Migration::Compatibility::V5_2 < ::ActiveRecord::Migration::Compatibility::V6_0 + # source://activerecord//lib/active_record/migration/compatibility.rb#304 + def add_timestamps(table_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#317 + def command_recorder; end + + # source://activerecord//lib/active_record/migration/compatibility.rb#310 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#290 +module ActiveRecord::Migration::Compatibility::V5_2::CommandRecorder + # source://activerecord//lib/active_record/migration/compatibility.rb#295 + def invert_change_column_comment(args); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#299 + def invert_change_table_comment(args); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#291 + def invert_transaction(args, &block); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#271 +module ActiveRecord::Migration::Compatibility::V5_2::TableDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#277 + def column(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#272 + def timestamps(**options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#286 + def raise_on_duplicate_column(name); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#283 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#227 +class ActiveRecord::Migration::Compatibility::V6_0 < ::ActiveRecord::Migration::Compatibility::V6_1 + # source://activerecord//lib/active_record/migration/compatibility.rb#251 + def add_belongs_to(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#251 + def add_reference(table_name, ref_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#262 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#228 +class ActiveRecord::Migration::Compatibility::V6_0::ReferenceDefinition < ::ActiveRecord::ConnectionAdapters::ReferenceDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#229 + def index_options(table_name); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#234 +module ActiveRecord::Migration::Compatibility::V6_0::TableDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#235 + def belongs_to(*args, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#241 + def column(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#235 + def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#247 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#164 +class ActiveRecord::Migration::Compatibility::V6_1 < ::ActiveRecord::Migration::Compatibility::V7_0 + # source://activerecord//lib/active_record/migration/compatibility.rb#179 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#188 + def change_column(table_name, column_name, type, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#219 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#165 +class ActiveRecord::Migration::Compatibility::V6_1::PostgreSQLCompat + class << self + # source://activerecord//lib/active_record/migration/compatibility.rb#166 + def compatible_timestamp_type(type, connection); end + end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#197 +module ActiveRecord::Migration::Compatibility::V6_1::TableDefinition + # source://activerecord//lib/active_record/migration/compatibility.rb#203 + def change(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#208 + def column(name, type, index: T.unsafe(nil), **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#198 + def new_column_definition(name, type, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#214 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#40 +class ActiveRecord::Migration::Compatibility::V7_0 < ::ActiveRecord::Migration::Compatibility::V7_1 + include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + + # source://activerecord//lib/active_record/migration/compatibility.rb#110 + def add_belongs_to(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#100 + def add_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#148 + def add_foreign_key(from_table, to_table, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#105 + def add_index(table_name, column_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#110 + def add_reference(table_name, ref_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#129 + def change_column(table_name, column_name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#137 + def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#116 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#141 + def disable_extension(name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#123 + def rename_table(table_name, new_name, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#156 + def compatible_table_definition(t); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#41 +module ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/compatibility.rb#65 + def expression_column_name?(column_name); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#57 + def index_name_options(column_names); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#43 + def legacy_index_name(table_name, options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#70 +module ActiveRecord::Migration::Compatibility::V7_0::TableDefinition + include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName + + # source://activerecord//lib/active_record/migration/compatibility.rb#78 + def change(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#73 + def column(name, type, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#83 + def index(column_name, **options); end + + # source://activerecord//lib/active_record/migration/compatibility.rb#88 + def references(*args, **options); end + + private + + # source://activerecord//lib/active_record/migration/compatibility.rb#94 + def raise_on_if_exist_options(options); end +end + +# source://activerecord//lib/active_record/migration/compatibility.rb#37 +class ActiveRecord::Migration::Compatibility::V7_1 < ::ActiveRecord::Migration::Compatibility::V7_2; end + +# source://activerecord//lib/active_record/migration/compatibility.rb#34 +class ActiveRecord::Migration::Compatibility::V7_2 < ::ActiveRecord::Migration::Current; 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: +# 5.2 < 6.0 < 6.1 < 7.0 < 7.1 < 7.2 < 8.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#32 +ActiveRecord::Migration::Compatibility::V8_0 = ActiveRecord::Migration::Current + +# This must be defined before the inherited hook, below +# +# source://activerecord//lib/active_record/migration.rb#580 +class ActiveRecord::Migration::Current < ::ActiveRecord::Migration + # source://activerecord//lib/active_record/migration.rb#589 + def change_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#613 + def compatible_table_definition(t); end + + # source://activerecord//lib/active_record/migration.rb#597 + def create_join_table(table_1, table_2, **options); end + + # source://activerecord//lib/active_record/migration.rb#581 + def create_table(table_name, **options); end + + # source://activerecord//lib/active_record/migration.rb#605 + def drop_table(*table_names, **options); end +end + +# The default strategy for executing migrations. Delegates method calls +# to the connection adapter. +# +# source://activerecord//lib/active_record/migration/default_strategy.rb#7 +class ActiveRecord::Migration::DefaultStrategy < ::ActiveRecord::Migration::ExecutionStrategy + private + + # source://activerecord//lib/active_record/migration/default_strategy.rb#17 + def connection; end + + # source://activerecord//lib/active_record/migration/default_strategy.rb#9 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/default_strategy.rb#13 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# ExecutionStrategy is used by the migration to respond to any method calls +# that the migration class does not implement directly. This is the base strategy. +# All strategies should inherit from this class. +# +# The ExecutionStrategy receives the current +migration+ when initialized. +# +# source://activerecord//lib/active_record/migration/execution_strategy.rb#10 +class ActiveRecord::Migration::ExecutionStrategy + # @return [ExecutionStrategy] a new instance of ExecutionStrategy + # + # source://activerecord//lib/active_record/migration/execution_strategy.rb#11 + def initialize(migration); end + + private + + # Returns the value of attribute migration. + # + # source://activerecord//lib/active_record/migration/execution_strategy.rb#16 + def migration; end +end + +# source://activerecord//lib/active_record/migration/join_table.rb#5 +module ActiveRecord::Migration::JoinTable + 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#638 +ActiveRecord::Migration::MigrationFilenameRegexp = T.let(T.unsafe(nil), Regexp) + +# source://activerecord//lib/active_record/migration.rb#878 +class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct + # source://activerecord//lib/active_record/migration.rb#883 + 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#879 + def up; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# = \Migration \Context +# +# MigrationContext sets the context in which a migration is run. +# +# A migration context requires the path to the migrations is set +# in the +migrations_paths+ parameter. Optionally a +schema_migration+ +# class can be provided. Multiple database applications will instantiate +# a +SchemaMigration+ object per database. From the Rake tasks, \Rails will +# handle this for you. +# +# source://activerecord//lib/active_record/migration.rb#1216 +class ActiveRecord::MigrationContext + # @return [MigrationContext] a new instance of MigrationContext + # + # source://activerecord//lib/active_record/migration.rb#1219 + def initialize(migrations_paths, schema_migration = T.unsafe(nil), internal_metadata = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#1345 + def current_environment; end + + # source://activerecord//lib/active_record/migration.rb#1295 + def current_version; end + + # source://activerecord//lib/active_record/migration.rb#1269 + def down(target_version = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/migration.rb#1255 + def forward(steps = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#1287 + def get_all_versions; end + + # Returns the value of attribute internal_metadata. + # + # source://activerecord//lib/active_record/migration.rb#1217 + def internal_metadata; end + + # @raise [NoEnvironmentInSchemaError] + # + # source://activerecord//lib/active_record/migration.rb#1353 + 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#1238 + def migrate(target_version = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/migration.rb#1308 + def migrations; end + + # Returns the value of attribute migrations_paths. + # + # source://activerecord//lib/active_record/migration.rb#1217 + def migrations_paths; end + + # source://activerecord//lib/active_record/migration.rb#1324 + def migrations_status; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1300 + def needs_migration?; end + + # source://activerecord//lib/active_record/migration.rb#1283 + def open; end + + # source://activerecord//lib/active_record/migration.rb#1304 + def pending_migration_versions; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1349 + def protected_environment?; end + + # source://activerecord//lib/active_record/migration.rb#1251 + def rollback(steps = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#1279 + def run(direction, target_version); end + + # Returns the value of attribute schema_migration. + # + # source://activerecord//lib/active_record/migration.rb#1217 + def schema_migration; end + + # source://activerecord//lib/active_record/migration.rb#1259 + def up(target_version = T.unsafe(nil), &block); end + + private + + # source://activerecord//lib/active_record/migration.rb#1365 + def connection; end + + # source://activerecord//lib/active_record/migration.rb#1369 + def connection_pool; end + + # source://activerecord//lib/active_record/migration.rb#1373 + def migration_files; end + + # source://activerecord//lib/active_record/migration.rb#1390 + def move(direction, steps); end + + # source://activerecord//lib/active_record/migration.rb#1378 + def parse_migration_filename(filename); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1386 + def valid_migration_timestamp?(version); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1382 + def validate_timestamp?; end +end + +# source://activerecord//lib/active_record/migration.rb#11 +class ActiveRecord::MigrationError < ::ActiveRecord::ActiveRecordError + # @return [MigrationError] a new instance of MigrationError + # + # source://activerecord//lib/active_record/migration.rb#12 + 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#1182 +class ActiveRecord::MigrationProxy < ::Struct + # @return [MigrationProxy] a new instance of MigrationProxy + # + # source://activerecord//lib/active_record/migration.rb#1183 + def initialize(name, version, filename, scope); end + + # source://activerecord//lib/active_record/migration.rb#1192 + def announce(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/migration.rb#1188 + def basename; end + + # source://activerecord//lib/active_record/migration.rb#1192 + 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#1192 + 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#1192 + def write(*_arg0, **_arg1, &_arg2); end + + private + + # source://activerecord//lib/active_record/migration.rb#1199 + def load_migration; end + + # source://activerecord//lib/active_record/migration.rb#1195 + 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#1410 +class ActiveRecord::Migrator + # @return [Migrator] a new instance of Migrator + # + # source://activerecord//lib/active_record/migration.rb#1426 + def initialize(direction, migrations, schema_migration, internal_metadata, target_version = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/migration.rb#1444 + def current; end + + # source://activerecord//lib/active_record/migration.rb#1444 + def current_migration; end + + # source://activerecord//lib/active_record/migration.rb#1440 + def current_version; end + + # source://activerecord//lib/active_record/migration.rb#1489 + def load_migrated; end + + # source://activerecord//lib/active_record/migration.rb#1457 + def migrate; end + + # source://activerecord//lib/active_record/migration.rb#1485 + def migrated; end + + # source://activerecord//lib/active_record/migration.rb#1476 + def migrations; end + + # source://activerecord//lib/active_record/migration.rb#1480 + def pending_migrations; end + + # source://activerecord//lib/active_record/migration.rb#1449 + def run; end + + # source://activerecord//lib/active_record/migration.rb#1465 + def runnable; end + + private + + # source://activerecord//lib/active_record/migration.rb#1494 + def connection; end + + # Wrap the migration in a transaction only if supported by the adapter. + # + # source://activerecord//lib/active_record/migration.rb#1589 + def ddl_transaction(migration, &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1584 + def down?; end + + # source://activerecord//lib/active_record/migration.rb#1533 + def execute_migration_in_transaction(migration); end + + # source://activerecord//lib/active_record/migration.rb#1554 + def finish; end + + # source://activerecord//lib/active_record/migration.rb#1621 + 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#1529 + def invalid_target?; end + + # Used for running multiple migrations up to or down to a certain value. + # + # source://activerecord//lib/active_record/migration.rb#1508 + def migrate_without_lock; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1524 + def ran?(migration); end + + # Stores the current environment in the database. + # + # source://activerecord//lib/active_record/migration.rb#1518 + def record_environment; end + + # source://activerecord//lib/active_record/migration.rb#1570 + def record_version_state_after_migrating(version); end + + # Used for running a specific migration. + # + # @raise [UnknownMigrationVersionError] + # + # source://activerecord//lib/active_record/migration.rb#1499 + def run_without_lock; end + + # source://activerecord//lib/active_record/migration.rb#1558 + def start; end + + # source://activerecord//lib/active_record/migration.rb#1550 + def target; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1580 + def up?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1601 + def use_advisory_lock?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration.rb#1597 + def use_transaction?(migration); end + + # @raise [DuplicateMigrationNameError] + # + # source://activerecord//lib/active_record/migration.rb#1562 + def validate(migrations); end + + # source://activerecord//lib/active_record/migration.rb#1605 + def with_advisory_lock; end + + class << self + # For cases where a table doesn't exist like loading from schema cache + # + # source://activerecord//lib/active_record/migration.rb#1415 + def current_version; end + + # Returns the value of attribute migrations_paths. + # + # source://activerecord//lib/active_record/migration.rb#1412 + 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#1412 + def migrations_paths=(_arg0); end + end +end + +# source://activerecord//lib/active_record/migration.rb#1620 +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#238 +class ActiveRecord::MismatchedForeignKey < ::ActiveRecord::StatementInvalid + # @return [MismatchedForeignKey] a new instance of MismatchedForeignKey + # + # source://activerecord//lib/active_record/errors.rb#239 + def initialize(message: T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), table: T.unsafe(nil), foreign_key: T.unsafe(nil), target_table: T.unsafe(nil), primary_key: T.unsafe(nil), primary_key_column: T.unsafe(nil), query_parser: T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/errors.rb#275 + def set_query(sql, binds); 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 + # music.artists, music.records => music.artists_records + # + # source://activerecord//lib/active_record/model_schema.rb#196 + 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#200 +module ActiveRecord::ModelSchema::ClassMethods + # source://activerecord//lib/active_record/model_schema.rb#437 + def _returning_columns_for_insert(connection); end + + # source://activerecord//lib/active_record/model_schema.rb#421 + 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#473 + 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#464 + def column_for_attribute(name); end + + # Returns an array of column names as strings. + # + # source://activerecord//lib/active_record/model_schema.rb#479 + def column_names; end + + # source://activerecord//lib/active_record/model_schema.rb#433 + def columns; end + + # source://activerecord//lib/active_record/model_schema.rb#428 + 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#490 + def content_columns; end + + # source://activerecord//lib/active_record/model_schema.rb#303 + def full_table_name_prefix; end + + # source://activerecord//lib/active_record/model_schema.rb#307 + 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#332 + 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#367 + def ignored_columns=(columns); end + + # Load the model's schema information either from the schema cache + # or directly from the database. + # + # source://activerecord//lib/active_record/model_schema.rb#535 + def load_schema; end + + # Returns the next value that will be used as the primary key on + # an insert statement. + # + # source://activerecord//lib/active_record/model_schema.rb#412 + 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#406 + 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#313 + 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#322 + 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#286 + def quoted_table_name; end + + # source://activerecord//lib/active_record/model_schema.rb#326 + 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[8.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#524 + def reset_column_information; end + + # source://activerecord//lib/active_record/model_schema.rb#380 + def reset_sequence_name; end + + # Computes the table name, (re)sets it internally, and returns it. + # + # source://activerecord//lib/active_record/model_schema.rb#291 + def reset_table_name; end + + # source://activerecord//lib/active_record/model_schema.rb#372 + 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#399 + def sequence_name=(value); end + + # source://activerecord//lib/active_record/model_schema.rb#483 + 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#417 + 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#260 + 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#270 + def table_name=(value); end + + # source://activerecord//lib/active_record/model_schema.rb#447 + def yaml_encoder; end + + protected + + # source://activerecord//lib/active_record/model_schema.rb#550 + def initialize_load_schema_monitor; end + + # source://activerecord//lib/active_record/model_schema.rb#554 + def reload_schema_from_cache(recursive = T.unsafe(nil)); end + + private + + # Computes and returns a table name according to default conventions. + # + # source://activerecord//lib/active_record/model_schema.rb#607 + def compute_table_name; end + + # source://activerecord//lib/active_record/model_schema.rb#575 + def inherited(child_class); end + + # source://activerecord//lib/active_record/model_schema.rb#588 + def load_schema!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/model_schema.rb#584 + def schema_loaded?; end + + # source://activerecord//lib/active_record/model_schema.rb#623 + def type_for_column(connection, column); end + + # Guesses the table name, but does not decorate it with prefix and suffix information. + # + # source://activerecord//lib/active_record/model_schema.rb#601 + 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#463 +class ActiveRecord::MultiparameterAssignmentErrors < ::ActiveRecord::ActiveRecordError + # @return [MultiparameterAssignmentErrors] a new instance of MultiparameterAssignmentErrors + # + # source://activerecord//lib/active_record/errors.rb#466 + def initialize(errors = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://activerecord//lib/active_record/errors.rb#464 + 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#401 + def _destroy; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/nested_attributes.rb#614 + 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#487 + 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#423 + def assign_nested_attributes_for_one_to_one_association(association_name, attributes); end + + # Updates a record with the +attributes+ or marks it for destruction if + # +allow_destroy+ is +true+ and has_destroy_flag? returns +true+. + # + # source://activerecord//lib/active_record/nested_attributes.rb#576 + 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#598 + 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#556 + def check_record_limit!(limit, attributes_collection); end + + # source://activerecord//lib/active_record/nested_attributes.rb#624 + def find_record_by_id(klass, records, id); end + + # Determines if a hash contains a truthy _destroy key. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/nested_attributes.rb#582 + def has_destroy_flag?(hash); end + + # @raise [RecordNotFound] + # + # source://activerecord//lib/active_record/nested_attributes.rb#618 + 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#589 + 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#610 + 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 +# +# === Creating forms with nested attributes +# +# Use ActionView::Helpers::FormHelper#fields_for to create form elements for +# nested attributes. +# +# Integration test params should reflect the structure of the form. For +# example: +# +# post members_path, params: { +# member: { +# name: 'joe', +# posts_attributes: { +# '0' => { title: 'Foo' }, +# '1' => { title: 'Bar' } +# } +# } +# } +# +# source://activerecord//lib/active_record/nested_attributes.rb#301 +module ActiveRecord::NestedAttributes::ClassMethods + # Defines an attributes writer for the specified association(s). + # + # 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 false by default. + # [:reject_if] + # Allows you to specify a Proc or a Symbol pointing to a method + # that checks whether a record should be built for a certain attribute + # 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#351 + 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#386 + def generate_association_writer(association_name, type); end +end + +# source://activerecord//lib/active_record/nested_attributes.rb#302 +ActiveRecord::NestedAttributes::ClassMethods::REJECT_ALL_BLANK_PROC = T.let(T.unsafe(nil), Proc) + +# source://activerecord//lib/active_record/nested_attributes.rb#9 +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#408 +ActiveRecord::NestedAttributes::UNASSIGNABLE_KEYS = T.let(T.unsafe(nil), Array) + +# Raised when a given database does not exist. +# +# source://activerecord//lib/active_record/errors.rb#328 +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#335 + def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _actions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _actions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions?; end + + # source://activerecord//lib/active_record/errors.rb#340 + def db_error(db_name); end + end +end + +# source://activerecord//lib/active_record/migration.rb#197 +class ActiveRecord::NoEnvironmentInSchemaError < ::ActiveRecord::MigrationError + # @return [NoEnvironmentInSchemaError] a new instance of NoEnvironmentInSchemaError + # + # source://activerecord//lib/active_record/migration.rb#198 + 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 + +# source://activerecord//lib/active_record/normalization.rb#4 +module ActiveRecord::Normalization + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::Normalization::ClassMethods + + # Normalizes a specified attribute using its declared normalizations. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # end + # + # legacy_user = User.find(1) + # legacy_user.email # => " CRUISE-CONTROL@EXAMPLE.COM\n" + # legacy_user.normalize_attribute(:email) + # legacy_user.email # => "cruise-control@example.com" + # legacy_user.save + # + # source://activerecord//lib/active_record/normalization.rb#26 + def normalize_attribute(name); end + + private + + # source://activerecord//lib/active_record/normalization.rb#112 + def normalize_changed_in_place_attributes; end + + module GeneratedClassMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end + + module GeneratedInstanceMethods + def normalized_attributes; end + def normalized_attributes=(value); end + def normalized_attributes?; end + end +end + +# source://activerecord//lib/active_record/normalization.rb#31 +module ActiveRecord::Normalization::ClassMethods + # Normalizes a given +value+ using normalizations declared for +name+. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # end + # + # User.normalize_value_for(:email, " CRUISE-CONTROL@EXAMPLE.COM\n") + # # => "cruise-control@example.com" + # + # source://activerecord//lib/active_record/normalization.rb#106 + def normalize_value_for(name, value); end + + # Declares a normalization for one or more attributes. The normalization + # is applied when the attribute is assigned or updated, and the normalized + # value will be persisted to the database. The normalization is also + # applied to the corresponding keyword argument of query methods. This + # allows a record to be created and later queried using unnormalized + # values. + # + # However, to prevent confusion, the normalization will not be applied + # when the attribute is fetched from the database. This means that if a + # record was persisted before the normalization was declared, the record's + # attribute will not be normalized until either it is assigned a new + # value, or it is explicitly migrated via Normalization#normalize_attribute. + # + # Because the normalization may be applied multiple times, it should be + # _idempotent_. In other words, applying the normalization more than once + # should have the same result as applying it only once. + # + # By default, the normalization will not be applied to +nil+ values. This + # behavior can be changed with the +:apply_to_nil+ option. + # + # Be aware that if your app was created before Rails 7.1, and your app + # marshals instances of the targeted model (for example, when caching), + # then you should set ActiveRecord.marshalling_format_version to +7.1+ or + # higher via either config.load_defaults 7.1 or + # config.active_record.marshalling_format_version = 7.1. + # Otherwise, +Marshal+ may attempt to serialize the normalization +Proc+ + # and raise +TypeError+. + # + # ==== Options + # + # * +:with+ - Any callable object that accepts the attribute's value as + # its sole argument, and returns it normalized. + # * +:apply_to_nil+ - Whether to apply the normalization to +nil+ values. + # Defaults to +false+. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # normalizes :email, with: -> email { email.strip.downcase } + # normalizes :phone, with: -> phone { phone.delete("^0-9").delete_prefix("1") } + # end + # + # user = User.create(email: " CRUISE-CONTROL@EXAMPLE.COM\n") + # user.email # => "cruise-control@example.com" + # + # user = User.find_by(email: "\tCRUISE-CONTROL@EXAMPLE.COM ") + # user.email # => "cruise-control@example.com" + # user.email_before_type_cast # => "cruise-control@example.com" + # + # User.where(email: "\tCRUISE-CONTROL@EXAMPLE.COM ").count # => 1 + # User.where(["email = ?", "\tCRUISE-CONTROL@EXAMPLE.COM "]).count # => 0 + # + # User.exists?(email: "\tCRUISE-CONTROL@EXAMPLE.COM ") # => true + # User.exists?(["email = ?", "\tCRUISE-CONTROL@EXAMPLE.COM "]) # => false + # + # User.normalize_value_for(:phone, "+1 (555) 867-5309") # => "5558675309" + # + # source://activerecord//lib/active_record/normalization.rb#88 + def normalizes(*names, with:, apply_to_nil: T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/normalization.rb#118 +class ActiveRecord::Normalization::NormalizedValueType + include ::ActiveModel::Type::SerializeCastValue + extend ::ActiveModel::Type::SerializeCastValue::ClassMethods + + # @return [NormalizedValueType] a new instance of NormalizedValueType + # + # source://activerecord//lib/active_record/normalization.rb#124 + def initialize(cast_type:, normalizer:, normalize_nil:); end + + # source://activerecord//lib/active_record/normalization.rb#143 + def ==(other); end + + # source://activerecord//lib/active_record/normalization.rb#131 + def cast(value); end + + # Returns the value of attribute cast_type. + # + # source://activerecord//lib/active_record/normalization.rb#121 + def cast_type; end + + # source://activerecord//lib/active_record/normalization.rb#143 + def eql?(other); end + + # source://activerecord//lib/active_record/normalization.rb#151 + def hash; end + + def inspect; end + + # Returns the value of attribute normalize_nil. + # + # source://activerecord//lib/active_record/normalization.rb#121 + def normalize_nil; end + + # Returns the value of attribute normalize_nil. + # + # source://activerecord//lib/active_record/normalization.rb#121 + def normalize_nil?; end + + # Returns the value of attribute normalizer. + # + # source://activerecord//lib/active_record/normalization.rb#121 + def normalizer; end + + # source://activerecord//lib/active_record/normalization.rb#135 + def serialize(value); end + + # source://activerecord//lib/active_record/normalization.rb#139 + def serialize_cast_value(value); end + + private + + # source://activerecord//lib/active_record/normalization.rb#158 + def normalize(value); end +end + +# Raised when a record cannot be inserted or updated because it would violate a not null constraint. +# +# source://activerecord//lib/active_record/errors.rb#293 +class ActiveRecord::NotNullViolation < ::ActiveRecord::StatementInvalid; end + +# source://activerecord//lib/active_record/migration/pending_migration_connection.rb#4 +class ActiveRecord::PendingMigrationConnection + class << self + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#17 + def current_preventing_writes; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#13 + def primary_class?; end + + # source://activerecord//lib/active_record/migration/pending_migration_connection.rb#5 + def with_temporary_pool(db_config, &block); end + end +end + +# source://activerecord//lib/active_record/migration.rb#148 +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#160 + def initialize(message = T.unsafe(nil), pending_migrations: T.unsafe(nil)); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + def _actions?; end + + private + + # source://activerecord//lib/active_record/migration.rb#183 + def connection_pool; end + + # source://activerecord//lib/active_record/migration.rb#169 + def detailed_migration_message(pending_migrations); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _actions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _actions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/actionable_error.rb#17 + 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. + # This includes any attribute initialization done by the new instance. + # + # If you want to change the STI column as well, use #becomes! instead. + # + # source://activerecord//lib/active_record/persistence.rb#487 + 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#508 + 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#655 + 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#665 + 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#439 + 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#453 + 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#469 + def destroy!; end + + # Returns true if this object has been destroyed, otherwise returns false. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/persistence.rb#355 + 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#632 + 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#644 + 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#338 + 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#361 + def persisted?; end + + # Returns true if this object was just created -- that is, prior to the last + # update or delete, the object didn't exist in the database and new_record? would have + # returned true. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/persistence.rb#345 + 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#350 + 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#742 + 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#390 + 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#423 + 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.first + # user.banned? # => false + # user.toggle(:banned) + # user.banned? # => true + # + # source://activerecord//lib/active_record/persistence.rb#681 + 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#690 + 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#793 + 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#563 + 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#574 + 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#530 + def update_attribute(name, value); end + + # Updates a single attribute and saves the record. + # This is especially useful for boolean flags on existing records. Also note that + # + # * Validation is skipped. + # * \Callbacks are invoked. + # * updated_at/updated_on column is updated if that column is available. + # * Updates all the attributes that are dirty in this object. + # + # This method raises an ActiveRecord::ActiveRecordError if the + # attribute is marked as readonly. + # + # If any of the before_* callbacks throws +:abort+ the action is cancelled + # and #update_attribute! raises ActiveRecord::RecordNotSaved. See + # ActiveRecord::Callbacks for further details. + # + # source://activerecord//lib/active_record/persistence.rb#552 + def update_attribute!(name, value); end + + # Equivalent to update_columns(name => value). + # + # source://activerecord//lib/active_record/persistence.rb#584 + 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#604 + 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#920 + def _create_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/persistence.rb#870 + def _delete_row; end + + # source://activerecord//lib/active_record/persistence.rb#826 + def _find_record(options); end + + # source://activerecord//lib/active_record/persistence.rb#837 + def _in_memory_query_constraints_hash; end + + # source://activerecord//lib/active_record/persistence.rb#852 + def _query_constraints_hash; end + + # @raise [ReadOnlyRecord] + # + # source://activerecord//lib/active_record/persistence.rb#957 + def _raise_readonly_record_error; end + + # source://activerecord//lib/active_record/persistence.rb#949 + def _raise_record_not_destroyed; end + + # @raise [ActiveRecordError] + # + # source://activerecord//lib/active_record/persistence.rb#961 + def _raise_record_not_touched_error; end + + # source://activerecord//lib/active_record/persistence.rb#874 + 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#900 + def _update_record(attribute_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/persistence.rb#884 + def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/persistence.rb#847 + def apply_scoping?(options); end + + # source://activerecord//lib/active_record/persistence.rb#891 + def create_or_update(**_arg0, &block); end + + # A hook to be overridden by association modules. + # + # source://activerecord//lib/active_record/persistence.rb#863 + def destroy_associations; end + + # source://activerecord//lib/active_record/persistence.rb#866 + def destroy_row; end + + # source://activerecord//lib/active_record/persistence.rb#814 + def init_internals; end + + # source://activerecord//lib/active_record/persistence.rb#820 + def strict_loaded_associations; end + + # @raise [ActiveRecordError] + # + # source://activerecord//lib/active_record/persistence.rb#945 + 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#282 + def _delete_record(constraints); end + + # source://activerecord//lib/active_record/persistence.rb#238 + def _insert_record(connection, values, returning); end + + # source://activerecord//lib/active_record/persistence.rb#263 + def _update_record(values, constraints); end + + # Builds an object (or multiple objects) and returns either the built object or a list of built + # objects. + # + # The +attributes+ parameter can be either a Hash or an Array of Hashes. These Hashes describe the + # attributes on the objects that are to be built. + # + # ==== Examples + # # Build a single new object + # User.build(first_name: 'Jamie') + # + # # Build an Array of new objects + # User.build([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) + # + # # Build a single object and pass it into a block to set other attributes. + # User.build(first_name: 'Jamie') do |u| + # u.is_admin = false + # end + # + # # Building an Array of new objects using a block, where the block is executed for each object: + # User.build([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) do |u| + # u.is_admin = false + # end + # + # source://activerecord//lib/active_record/persistence.rb#82 + def build(attributes = T.unsafe(nil), &block); end + + # Returns an array of column names to be used in queries. The source of column + # names is derived from +query_constraints_list+ or +primary_key+. This method + # is for internal use when the primary key is to be treated as an array. + # + # source://activerecord//lib/active_record/persistence.rb#234 + def composite_query_constraints_list; end + + # Creates an object (or multiple objects) and saves it to the database, if validations pass. + # The resulting object is returned whether the object was saved successfully to the database or not. + # + # 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.create(first_name: 'Jamie') + # + # # Create an Array of new objects + # User.create([{ first_name: 'Jamie' }, { first_name: 'Jeremy' }]) + # + # # Create a single object and pass it into a block to set other attributes. + # 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.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 + + # @return [Boolean] + # + # source://activerecord//lib/active_record/persistence.rb#219 + def has_query_constraints?; 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#100 + def instantiate(attributes, column_types = T.unsafe(nil), &block); end + + # Accepts a list of attribute names to be used in the WHERE clause + # of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for +#first+ and +#last+ finder methods. + # + # class Developer < ActiveRecord::Base + # query_constraints :company_id, :id + # end + # + # developer = Developer.first + # # SELECT "developers".* FROM "developers" ORDER BY "developers"."company_id" ASC, "developers"."id" ASC LIMIT 1 + # developer.inspect # => # + # + # developer.update!(name: "Nikita") + # # UPDATE "developers" SET "name" = 'Nikita' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # # It is possible to update an attribute used in the query_constraints clause: + # developer.update!(company_id: 2) + # # UPDATE "developers" SET "company_id" = 2 WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.name = "Bob" + # developer.save! + # # UPDATE "developers" SET "name" = 'Bob' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.destroy! + # # DELETE FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.delete + # # DELETE FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 + # + # developer.reload + # # SELECT "developers".* FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 LIMIT 1 + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/persistence.rb#212 + def query_constraints(*columns_list); end + + # source://activerecord//lib/active_record/persistence.rb#223 + def query_constraints_list; end + + # Updates an object (or multiple objects) and saves it to the database, if validations pass. + # The resulting object is returned whether the object was saved successfully to the database or not. + # + # ==== 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#132 + 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#158 + def update!(id = T.unsafe(nil), attributes); 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#328 + 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#321 + def discriminate_class_for_record(record); end + + # source://activerecord//lib/active_record/persistence.rb#301 + def inherited(subclass); end + + # Given a class, an attributes hash, +instantiate_instance_of+ returns a + # new instance of the class. Accepts only keys as strings. + # + # source://activerecord//lib/active_record/persistence.rb#311 + 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#155 + def convert_dot_notation_to_hash(attributes); end + + # source://activerecord//lib/active_record/relation/predicate_builder.rb#145 + def grouping_queries(queries); end + + # source://activerecord//lib/active_record/relation/predicate_builder.rb#177 + def handler_for(object); end + + # Returns the value of attribute table. + # + # source://activerecord//lib/active_record/relation/predicate_builder.rb#143 + 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#23 + def associated_table; end + + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#59 + def convert_to_id(value); end + + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#25 + def ids; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#55 + def polymorphic_clause?; end + + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#47 + def polymorphic_name; end + + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#39 + def primary_key; end + + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#43 + def primary_type; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#51 + def select_clause?; end + + # Returns the value of attribute value. + # + # source://activerecord//lib/active_record/relation/predicate_builder/association_query_value.rb#23 + 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#44 + 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#362 +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#324 +class ActiveRecord::PreparedStatementInvalid < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/promise.rb#4 +class ActiveRecord::Promise < ::BasicObject + # @return [Promise] a new instance of Promise + # + # source://activerecord//lib/active_record/promise.rb#7 + def initialize(future_result, block); end + + def class; end + + # source://activerecord//lib/active_record/promise.rb#44 + def inspect; end + + def is_a?(_arg0); end + + # Returns whether the associated query is still being executed or not. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/promise.rb#13 + def pending?; end + + # source://activerecord//lib/active_record/promise.rb#48 + def pretty_print(q); end + + def respond_to?(*_arg0); end + + # Returns a new +ActiveRecord::Promise+ that will apply the passed block + # when the value is accessed: + # + # Post.async_pick(:title).then { |title| title.upcase }.value + # # => "POST TITLE" + # + # source://activerecord//lib/active_record/promise.rb#36 + def then(&block); end + + # Returns the query result. + # If the query wasn't completed yet, accessing +#value+ will block until the query completes. + # If the query failed, +#value+ will raise the corresponding error. + # + # source://activerecord//lib/active_record/promise.rb#20 + def value; end + + private + + # source://activerecord//lib/active_record/promise.rb#53 + def status; end +end + +# source://activerecord//lib/active_record/promise.rb#63 +class ActiveRecord::Promise::Complete < ::ActiveRecord::Promise + # @return [Complete] a new instance of Complete + # + # source://activerecord//lib/active_record/promise.rb#66 + def initialize(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/promise.rb#74 + def pending?; end + + # source://activerecord//lib/active_record/promise.rb#70 + def then; end + + # Returns the value of attribute value. + # + # source://activerecord//lib/active_record/promise.rb#64 + def value; end + + private + + # source://activerecord//lib/active_record/promise.rb#79 + def status; end +end + +# source://activerecord//lib/active_record/migration.rb#208 +class ActiveRecord::ProtectedEnvironmentError < ::ActiveRecord::ActiveRecordError + # @return [ProtectedEnvironmentError] a new instance of ProtectedEnvironmentError + # + # source://activerecord//lib/active_record/migration.rb#209 + 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#561 +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#41 + def complete(pools); end + + # source://activerecord//lib/active_record/query_cache.rb#52 + def install_executor_hooks(executor = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/query_cache.rb#37 + 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. + # + # Set dirties: false to prevent query caches on all connections from being cleared by write operations. + # (By default, write operations dirty all connections' query caches in case they are replicas whose cache would now be outdated.) + # + # source://activerecord//lib/active_record/query_cache.rb#28 + def uncached(dirties: T.unsafe(nil), &block); end +end + +# QueryCanceled will be raised when canceling statement due to user request. +# +# source://activerecord//lib/active_record/errors.rb#573 +class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end + +# = Active Record Query Logs +# +# Automatically append comments to SQL queries with runtime information tags. This can be used to trace troublesome +# SQL statements back to the application code that generated these statements. +# +# Query logs can be enabled via \Rails configuration in config/application.rb or an initializer: +# +# config.active_record.query_log_tags_enabled = true +# +# By default the name of the application, the name and action of the controller, or the name of the job are logged. +# The default format is {SQLCommenter}[https://open-telemetry.github.io/opentelemetry-sqlcommenter/]. +# The tags shown in a query comment can be configured via \Rails configuration: +# +# config.active_record.query_log_tags = [ :application, :controller, :action, :job ] +# +# Active Record defines default tags available for use: +# +# * +application+ +# * +pid+ +# * +socket+ +# * +db_host+ +# * +database+ +# * +source_location+ +# +# Action Controller adds default tags when loaded: +# +# * +controller+ +# * +action+ +# * +namespaced_controller+ +# +# Active Job adds default tags when loaded: +# +# * +job+ +# +# New comment tags can be defined by adding them in a +Hash+ to the tags +Array+. Tags can have dynamic content by +# setting a +Proc+ or lambda value in the +Hash+, and can reference any value stored by \Rails in the +context+ object. +# ActiveSupport::CurrentAttributes can be used to store application values. Tags with +nil+ values are +# omitted from the query comment. +# +# Escaping is performed on the string returned, however untrusted user input should not be used. +# +# Example: +# +# config.active_record.query_log_tags = [ +# :namespaced_controller, +# :action, +# :job, +# { +# request_id: ->(context) { context[:controller]&.request&.request_id }, +# job_id: ->(context) { context[:job]&.job_id }, +# tenant_id: -> { Current.tenant&.id }, +# static: "value", +# }, +# ] +# +# By default the name of the application, the name and action of the controller, or the name of the job are logged +# using the {SQLCommenter}[https://open-telemetry.github.io/opentelemetry-sqlcommenter/] format. This can be changed +# via {config.active_record.query_log_tags_format}[https://guides.rubyonrails.org/configuring.html#config-active-record-query-log-tags-format] +# +# Tag comments can be prepended to the query: +# +# 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: +# +# config.active_record.cache_query_log_tags = true +# +# source://activerecord//lib/active_record/query_logs_formatter.rb#4 +module ActiveRecord::QueryLogs + class << self + # source://activerecord//lib/active_record/query_logs.rb#115 + def cache_query_log_tags; end + + # source://activerecord//lib/active_record/query_logs.rb#115 + def cache_query_log_tags=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + def cached_comment; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + def cached_comment=(obj); end + + # source://activerecord//lib/active_record/query_logs.rb#139 + def call(sql, connection); end + + # source://activerecord//lib/active_record/query_logs.rb#151 + def clear_cache; end + + # source://activerecord//lib/active_record/query_logs.rb#115 + def prepend_comment; end + + # source://activerecord//lib/active_record/query_logs.rb#115 + def prepend_comment=(_arg0); end + + # source://activerecord//lib/active_record/query_logs.rb#156 + def query_source_location; end + + # source://activerecord//lib/active_record/query_logs.rb#114 + def taggings; end + + # source://activerecord//lib/active_record/query_logs.rb#117 + def taggings=(taggings); end + + # source://activerecord//lib/active_record/query_logs.rb#114 + def tags; end + + # source://activerecord//lib/active_record/query_logs.rb#122 + def tags=(tags); end + + # source://activerecord//lib/active_record/query_logs.rb#114 + def tags_formatter; end + + # source://activerecord//lib/active_record/query_logs.rb#127 + def tags_formatter=(format); end + + private + + # source://activerecord//lib/active_record/query_logs.rb#186 + def build_handler(name, handler = T.unsafe(nil)); end + + # 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#203 + def comment(connection); end + + # source://activerecord//lib/active_record/query_logs.rb#219 + def escape_sql_comment(content); end + + # source://activerecord//lib/active_record/query_logs.rb#172 + def rebuild_handlers; end + + # source://activerecord//lib/active_record/query_logs.rb#232 + def tag_content(connection); end + + # source://activerecord//lib/active_record/query_logs.rb#211 + def uncached_comment(connection); end + end +end + +# source://activerecord//lib/active_record/query_logs.rb#75 +class ActiveRecord::QueryLogs::GetKeyHandler + # @return [GetKeyHandler] a new instance of GetKeyHandler + # + # source://activerecord//lib/active_record/query_logs.rb#76 + def initialize(name); end + + # source://activerecord//lib/active_record/query_logs.rb#80 + def call(context); end +end + +# source://activerecord//lib/active_record/query_logs.rb#85 +class ActiveRecord::QueryLogs::IdentityHandler + # @return [IdentityHandler] a new instance of IdentityHandler + # + # source://activerecord//lib/active_record/query_logs.rb#86 + def initialize(value); end + + # source://activerecord//lib/active_record/query_logs.rb#90 + def call(_context); end +end + +# source://activerecord//lib/active_record/query_logs_formatter.rb#5 +module ActiveRecord::QueryLogs::LegacyFormatter + class << self + # Formats the key value pairs into a string. + # + # source://activerecord//lib/active_record/query_logs_formatter.rb#8 + def format(key, value); end + + # source://activerecord//lib/active_record/query_logs_formatter.rb#12 + def join(pairs); end + end +end + +# source://activerecord//lib/active_record/query_logs_formatter.rb#18 +class ActiveRecord::QueryLogs::SQLCommenter + class << self + # source://activerecord//lib/active_record/query_logs_formatter.rb#20 + def format(key, value); end + + # source://activerecord//lib/active_record/query_logs_formatter.rb#24 + def join(pairs); end + end +end + +# source://activerecord//lib/active_record/query_logs.rb#95 +class ActiveRecord::QueryLogs::ZeroArityHandler + # @return [ZeroArityHandler] a new instance of ZeroArityHandler + # + # source://activerecord//lib/active_record/query_logs.rb#96 + def initialize(proc); end + + # source://activerecord//lib/active_record/query_logs.rb#100 + def call(_context); end +end + +# source://activerecord//lib/active_record/relation/query_methods.rb#9 +module ActiveRecord::QueryMethods + include ::ActiveModel::ForbiddenAttributesProtection + + # source://activerecord//lib/active_record/relation/query_methods.rb#428 + def _select!(*fields); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#260 + def all; 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#1133 + def and(other); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1141 + def and!(other); end + + # Adds an SQL comment to queries generated from this relation. For example: + # + # User.annotate("selecting user names").select(:name) + # # SELECT "users"."name" FROM "users" /* selecting user names */ + # + # 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#1527 + def annotate(*args); end + + # Like #annotate, but modifies relation in place. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1533 + def annotate!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def annotate_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def annotate_values=(value); end + + # Returns the Arel object associated with the relation. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1592 + def arel(aliases = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1596 + def construct_join_dependency(associations, join_type); end + + # Sets attributes to be used when creating new records from a + # relation object. + # + # users = 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#1344 + def create_with(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1348 + def create_with!(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def create_with_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def create_with_value=(value); end + + # Specifies whether the records should be unique or not. For example: + # + # User.select(:name) + # # Might return two records with the same name + # + # User.select(:name).distinct + # # Returns 1 record per distinct name + # + # User.select(:name).distinct.distinct(false) + # # You can also remove the uniqueness + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1408 + def distinct(value = T.unsafe(nil)); end + + # Like #distinct, but modifies relation in place. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1413 + def distinct!(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def distinct_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def distinct_value=(value); end + + # Specify associations +args+ to be eager loaded using a LEFT OUTER JOIN. + # Performs a single query joining all specified associations. For example: + # + # users = User.eager_load(:address).limit(5) + # users.each do |user| + # user.address.city + # end + # + # # SELECT "users"."id" AS t0_r0, "users"."name" AS t0_r1, ... FROM "users" + # # LEFT OUTER JOIN "addresses" ON "addresses"."id" = "users"."address_id" + # # LIMIT 5 + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a single joined query. + # + # Loading multiple and nested associations is possible using Hashes and Arrays, + # similar to #includes: + # + # User.eager_load(:address, friends: [:address, :followers]) + # # SELECT "users"."id" AS t0_r0, "users"."name" AS t0_r1, ... FROM "users" + # # LEFT OUTER JOIN "addresses" ON "addresses"."id" = "users"."address_id" + # # LEFT OUTER JOIN "friends" ON "friends"."user_id" = "users"."id" + # # ... + # + # NOTE: Loading the associations in a join can result in many rows that + # contain redundant data and it performs poorly at scale. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#290 + def eager_load(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#295 + def eager_load!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def eager_load_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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) + # + # Post.excluding(Post.drafts) + # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (3, 4, 5) + # + # 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#1572 + def excluding(*records); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1585 + 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#1454 + def extending(*modules, &block); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1462 + def extending!(*modules, &block); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def extending_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def extending_values=(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + 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#341 + 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#1389 + def from(value, subquery_name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1393 + def from!(value, subquery_name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def from_clause; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def from_clause=(value); end + + # Allows to specify a group attribute: + # + # User.group(:name) + # # SELECT "users".* FROM "users" GROUP BY name + # + # Returns an array with distinct records based on the +group+ attribute: + # + # User.select([:id, :name]) + # # => [#, #, #] + # + # User.group(:name) + # # => [#, #] + # + # User.group('name AS grouped_name, age') + # # => [#, #, #] + # + # Passing in an array of attributes to group by is also supported. + # + # User.select([:id, :first_name]).group(:id, :first_name).first(3) + # # => [#, #, #] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#571 + def group(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#576 + def group!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def group_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1195 + def having(opts, *rest); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1199 + def having!(opts, *rest); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def having_clause; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def having_clause=(value); end + + # Applies an ORDER BY clause based on a given +column+, + # ordered and filtered by a specific set of +values+. + # + # User.in_order_of(:id, [1, 5, 3]) + # # SELECT "users".* FROM "users" + # # WHERE "users"."id" IN (1, 5, 3) + # # ORDER BY CASE + # # WHEN "users"."id" = 1 THEN 1 + # # WHEN "users"."id" = 5 THEN 2 + # # WHEN "users"."id" = 3 THEN 3 + # # END ASC + # + # +column+ can point to an enum column; the actual query generated may be different depending + # on the database adapter and the column definition. + # + # class Conversation < ActiveRecord::Base + # enum :status, [ :active, :archived ] + # end + # + # Conversation.in_order_of(:status, [:archived, :active]) + # # SELECT "conversations".* FROM "conversations" + # # WHERE "conversations"."status" IN (1, 0) + # # ORDER BY CASE + # # WHEN "conversations"."status" = 1 THEN 1 + # # WHEN "conversations"."status" = 0 THEN 2 + # # END ASC + # + # +values+ can also include +nil+. + # + # Conversation.in_order_of(:status, [nil, :archived, :active]) + # # SELECT "conversations".* FROM "conversations" + # # WHERE ("conversations"."status" IN (1, 0) OR "conversations"."status" IS NULL) + # # ORDER BY CASE + # # WHEN "conversations"."status" IS NULL THEN 1 + # # WHEN "conversations"."status" = 1 THEN 2 + # # WHEN "conversations"."status" = 0 THEN 3 + # # END ASC + # + # +filter+ can be set to +false+ to include all results instead of only the ones specified in +values+. + # + # Conversation.in_order_of(:status, [:archived, :active], filter: false) + # # SELECT "conversations".* FROM "conversations" + # # ORDER BY CASE + # # WHEN "conversations"."status" = 1 THEN 1 + # # WHEN "conversations"."status" = 0 THEN 2 + # # ELSE 3 + # # END ASC + # + # source://activerecord//lib/active_record/relation/query_methods.rb#715 + def in_order_of(column, values, filter: T.unsafe(nil)); end + + # Specify associations +args+ to be eager loaded to prevent N + 1 queries. + # A separate query is performed for each association, unless a join is + # required by conditions. + # + # For example: + # + # users = User.includes(:address).limit(5) + # users.each do |user| + # user.address.city + # end + # + # # SELECT "users".* FROM "users" LIMIT 5 + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a single query. + # + # Loading the associations in a separate query will often result in a + # performance improvement over a simple join, as a join can result in many + # rows that contain redundant data and it performs poorly at scale. + # + # You can also specify multiple associations. Each association will result + # in an additional query: + # + # User.includes(:address, :friends).to_a + # # SELECT "users".* FROM "users" + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) + # + # Loading nested associations is possible using a Hash: + # + # User.includes(:address, friends: [:address, :followers]) + # + # === Conditions + # + # If you want to add string conditions to your included models, you'll have + # to explicitly reference them. For example: + # + # User.includes(:posts).where('posts.name = ?', 'example').to_a + # + # Will throw an error, but this will work: + # + # User.includes(:posts).where('posts.name = ?', 'example').references(:posts).to_a + # # SELECT "users"."id" AS t0_r0, ... FROM "users" + # # LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # # WHERE "posts"."name" = ? [["name", "example"]] + # + # As the LEFT OUTER JOIN already contains the posts, the second query for + # the posts is no longer performed. + # + # Note that #includes works with association names while #references needs + # the actual table name. + # + # If you pass the conditions via a Hash, you don't need to call #references + # explicitly, as #where references the tables for you. For example, this + # will work correctly: + # + # User.includes(:posts).where(posts: { name: 'example' }) + # + # NOTE: Conditions affect both sides of an association. For example, the + # above code will return only users that have a post named "example", + # and will only include posts named "example", even when a + # matching user has other additional posts. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#250 + def includes(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#255 + def includes!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def includes_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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.where(accepted: true) + # # WHERE `accepted` = 1 + # + # User.where(accepted: true).invert_where + # # WHERE `accepted` != 1 + # + # User.active + # # WHERE `accepted` = 1 AND `locked` = 0 + # + # 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.where(role: 'admin').inactive + # # WHERE NOT (`role` = 'admin' AND `accepted` = 1 AND `locked` = 0) + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1099 + def invert_where; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1103 + def invert_where!; end + + # Performs JOINs on +args+. The given symbol(s) should match the name of + # the association(s). + # + # User.joins(:posts) + # # SELECT "users".* + # # FROM "users" + # # INNER JOIN "posts" ON "posts"."user_id" = "users"."id" + # + # Multiple joins: + # + # 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.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.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#866 + def joins(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#871 + def joins!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def joins_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def joins_values=(value); end + + # Performs LEFT OUTER JOINs on +args+: + # + # User.left_outer_joins(:posts) + # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # + # source://activerecord//lib/active_record/relation/query_methods.rb#881 + def left_joins(*args); end + + # Performs LEFT OUTER JOINs on +args+: + # + # User.left_outer_joins(:posts) + # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" + # + # source://activerecord//lib/active_record/relation/query_methods.rb#881 + def left_outer_joins(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#887 + def left_outer_joins!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def left_outer_joins_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def left_outer_joins_values=(value); end + + # Specifies a limit for the number of records to retrieve. + # + # User.limit(10) # generated SQL has 'LIMIT 10' + # + # User.limit(10).limit(20) # generated SQL has 'LIMIT 20' + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1209 + def limit(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1213 + def limit!(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def limit_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1236 + def lock(locks = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1240 + def lock!(locks = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def lock_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1279 + def none; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1283 + def none!; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1291 + def null_relation?; end + + # Specifies the number of rows to skip before returning rows. + # + # User.offset(10) # generated SQL has "OFFSET 10" + # + # Should be used with order. + # + # User.offset(10).order("name ASC") + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1225 + def offset(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1229 + def offset!(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def offset_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1483 + def optimizer_hints(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1488 + def optimizer_hints!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def optimizer_hints_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1165 + def or(other); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1177 + 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.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.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.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.order('name') + # # SELECT "users".* FROM "users" ORDER BY name + # + # User.order('name DESC') + # # SELECT "users".* FROM "users" ORDER BY name DESC + # + # 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.order(Arel.sql('end_date - start_date')) + # # SELECT "users".* FROM "users" ORDER BY end_date - start_date + # + # Custom query syntax, like JSON columns for PostgreSQL, is supported in this way. + # + # User.order(Arel.sql("payload->>'kind'")) + # # SELECT "users".* FROM "users" ORDER BY payload->>'kind' + # + # source://activerecord//lib/active_record/relation/query_methods.rb#654 + 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#662 + def order!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def order_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def order_values=(value); end + + # Specify associations +args+ to be eager loaded using separate queries. + # A separate query is performed for each association. + # + # users = User.preload(:address).limit(5) + # users.each do |user| + # user.address.city + # end + # + # # SELECT "users".* FROM "users" LIMIT 5 + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # + # Instead of loading the 5 addresses with 5 separate queries, all addresses + # are loaded with a separate query. + # + # Loading multiple and nested associations is possible using Hashes and Arrays, + # similar to #includes: + # + # User.preload(:address, friends: [:address, :followers]) + # # SELECT "users".* FROM "users" + # # SELECT "addresses".* FROM "addresses" WHERE "addresses"."id" IN (1,2,3,4,5) + # # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) + # # SELECT ... + # + # source://activerecord//lib/active_record/relation/query_methods.rb#322 + def preload(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#327 + def preload!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def preload_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def preload_values=(value); end + + # Mark a relation as readonly. Attempting to update a record will result in + # an error. + # + # users = User.readonly + # users.first.save + # => ActiveRecord::ReadOnlyRecord: User is marked as readonly + # + # To make a readonly relation writable, pass +false+. + # + # users.readonly(false) + # users.first.save + # => true + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1307 + def readonly(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1311 + def readonly!(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def readonly_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def readonly_value=(value); end + + # Use to indicate that the given +table_names+ are referenced by an SQL string, + # and should therefore be +JOIN+ed in any query rather than loaded separately. + # This method only works in conjunction with #includes. + # See #includes for more details. + # + # User.includes(:posts).where("posts.name = 'foo'") + # # Doesn't JOIN the posts table, resulting in an error. + # + # 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#355 + def references(*table_names); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#360 + def references!(*table_names); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def references_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def references_values=(value); end + + # Allows you to change a previously set group statement. + # + # Post.group(:title, :body) + # # SELECT `posts`.`*` FROM `posts` GROUP BY `posts`.`title`, `posts`.`body` + # + # Post.group(:title, :body).regroup(:title) + # # SELECT `posts`.`*` FROM `posts` GROUP BY `posts`.`title` + # + # This is short-hand for unscope(:group).group(fields). + # Note that we're unscoping the entire group statement. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#591 + def regroup(*args); end + + # Same as #regroup but operates on relation in-place instead of copying. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#597 + def regroup!(*args); end + + # Replaces any existing order defined on the relation with the specified order. + # + # User.order('email DESC').reorder('id ASC') # generated SQL has 'ORDER BY id ASC' + # + # Subsequent calls to order on the same relation will be appended. For example: + # + # 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#750 + 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#758 + def reorder!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def reordering_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#539 + 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#546 + def reselect!(*args); end + + # Reverse the existing order clause on the relation. + # + # User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC' + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1496 + def reverse_order; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1500 + def reverse_order!; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def reverse_order_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1059 + 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) + # # => [#] + # + # The argument also can be a hash of fields and aliases. + # + # Model.select(models: { field: :alias, other_field: :other_alias }) + # # => [#] + # + # Model.select(models: [:field, :other_field]) + # # => [#] + # + # You can also use one or more strings, which will be used unchanged as SELECT fields. + # + # Model.select('field AS field_one', 'other_field AS field_two') + # # => [#] + # + # 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' for Model + # + # source://activerecord//lib/active_record/relation/query_methods.rb#413 + def select(*fields); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def select_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def select_values=(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1511 + def skip_preloading!; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1506 + def skip_query_cache!(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def skip_query_cache_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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.strict_loading.first + # user.comments.to_a + # => ActiveRecord::StrictLoadingViolationError + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1322 + def strict_loading(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1326 + def strict_loading!(value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def strict_loading_value; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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#1119 + def structurally_compatible?(other); end + + # Deduplicate multiple values. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1539 + 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.order('email DESC').unscope(:order) == 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.order('email DESC').select('id').where(name: "John") + # .unscope(:order, :select, :where) == 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.where(name: "John", active: true).unscope(where: :name) + # == User.where(active: true) + # + # This method is similar to #except, but unlike + # #except, it persists across merges: + # + # User.order('email').merge(User.except(:order)) + # == User.order('email') + # + # User.order('email').merge(User.unscope(:order)) + # == 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#804 + def unscope(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#809 + def unscope!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def unscope_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + 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.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.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.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.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.where(name: "Joe", email: "joe@example.com") + # # SELECT * FROM users WHERE name = 'Joe' AND email = 'joe@example.com' + # + # User.where(name: ["Alice", "Bob"]) + # # SELECT * FROM users WHERE name IN ('Alice', 'Bob') + # + # 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) + # + # Hash conditions may also be specified in a tuple-like syntax. Hash keys may be + # an array of columns with an array of tuples as values. + # + # Article.where([:author_id, :id] => [[15, 1], [15, 2]]) + # # SELECT * FROM articles WHERE author_id = 15 AND id = 1 OR author_id = 15 AND id = 2 + # + # === Joins + # + # If the relation is the result of a join, you may create a condition which uses any of the + # tables in the join. For string and array conditions, use the table name in the condition. + # + # 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.joins(:posts).where("posts.published" => true) + # 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.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#1031 + def where(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1041 + def where!(opts, *rest); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def where_clause; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def where_clause=(value); end + + # Add a Common Table Expression (CTE) that you can then reference within another SELECT statement. + # + # Note: CTE's are only supported in MySQL for versions 8.0 and above. You will not be able to + # use CTE's with MySQL 5.7. + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)) + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts + # + # You can also pass an array of sub-queries to be joined in a +UNION ALL+. + # + # Post.with(posts_with_tags_or_comments: [Post.where("tags_count > ?", 0), Post.where("comments_count > ?", 0)]) + # # => ActiveRecord::Relation + # # WITH posts_with_tags_or_comments AS ( + # # (SELECT * FROM posts WHERE (tags_count > 0)) + # # UNION ALL + # # (SELECT * FROM posts WHERE (comments_count > 0)) + # # ) + # # SELECT * FROM posts + # + # Once you define Common Table Expression you can use custom +FROM+ value or +JOIN+ to reference it. + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)).from("posts_with_tags AS posts") + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts_with_tags AS posts + # + # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)).joins("JOIN posts_with_tags ON posts_with_tags.id = posts.id") + # # => ActiveRecord::Relation + # # WITH posts_with_tags AS ( + # # SELECT * FROM posts WHERE (tags_count > 0) + # # ) + # # SELECT * FROM posts JOIN posts_with_tags ON posts_with_tags.id = posts.id + # + # It is recommended to pass a query as ActiveRecord::Relation. If that is not possible + # and you have verified it is safe for the database, you can pass it as SQL literal + # using +Arel+. + # + # Post.with(popular_posts: Arel.sql("... complex sql to calculate posts popularity ...")) + # + # Great caution should be taken to avoid SQL injection vulnerabilities. This method should not + # be used with unsafe values that include unsanitized input. + # + # To add multiple CTEs just pass multiple key-value pairs + # + # Post.with( + # posts_with_comments: Post.where("comments_count > ?", 0), + # posts_with_tags: Post.where("tags_count > ?", 0) + # ) + # + # or chain multiple +.with+ calls + # + # Post + # .with(posts_with_comments: Post.where("comments_count > ?", 0)) + # .with(posts_with_tags: Post.where("tags_count > ?", 0)) + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#493 + def with(*args); end + + # Like #with, but modifies relation in place. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#500 + def with!(*args); end + + # Add a recursive Common Table Expression (CTE) that you can then reference within another SELECT statement. + # + # Post.with_recursive(post_and_replies: [Post.where(id: 42), Post.joins('JOIN post_and_replies ON posts.in_reply_to_id = post_and_replies.id')]) + # # => ActiveRecord::Relation + # # WITH post_and_replies AS ( + # # (SELECT * FROM posts WHERE id = 42) + # # UNION ALL + # # (SELECT * FROM posts JOIN posts_and_replies ON posts.in_reply_to_id = posts_and_replies.id) + # # ) + # # SELECT * FROM posts + # + # See `#with` for more information. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#517 + def with_recursive(*args); end + + # Like #with_recursive but modifies the relation in place. + # + # source://activerecord//lib/active_record/relation/query_methods.rb#523 + def with_recursive!(*args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def with_values; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#178 + def with_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) + # + # Post.excluding(Post.drafts) + # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (3, 4, 5) + # + # 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#1572 + def without(*records); end + + protected + + # source://activerecord//lib/active_record/relation/query_methods.rb#1654 + def async!; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1611 + def build_having_clause(opts, rest = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1603 + def build_subquery(subquery_alias, select_value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1611 + def build_where_clause(opts, rest = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/relation/query_methods.rb#1951 + def arel_column(field); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1932 + def arel_columns(columns); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2192 + def arel_columns_from_hash(fields); end + + # @raise [UnmodifiableRelation] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1728 + def assert_modifiable!; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1660 + def async; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1732 + def build_arel(connection, aliases = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1684 + def build_bound_sql_literal(statement, values); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2121 + def build_case_for_value_position(column, values, filter: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1761 + def build_cast_value(name, value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1765 + def build_from; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1807 + def build_join_buckets; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1717 + def build_join_dependencies; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1863 + def build_joins(join_sources, aliases = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1664 + def build_named_bound_sql_literal(statement, values); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2013 + def build_order(arel); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1885 + def build_select(arel); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1895 + def build_with(arel); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1913 + def build_with_expression_from_value(value); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1924 + def build_with_join_node(name, kind = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1907 + def build_with_value_from_hash(hash); end + + # Checks to make sure that the arguments are not blank. Note that if some + # blank-like object were initially passed into the query method, then this + # method will not raise an error. + # + # 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#2171 + def check_if_method_has_arguments!(method_name, args, message = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2082 + def column_references(order_args); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#2002 + def does_not_support_reverse?(order); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1711 + def each_join_dependencies(join_dependencies = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2107 + def extract_table_name_from(string); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2035 + def flattened_args(args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1704 + def lookup_table_klass_from_join_dependencies(table_name); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2111 + def order_column(field); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2039 + def preprocess_order_args(order_args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2182 + def process_select_args(fields); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2131 + def resolve_arel_attributes(attrs); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1973 + def reverse_sql_order(order_query); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2076 + def sanitize_order_arguments(order_args); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1792 + def select_association_list(associations, stashed_joins = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#1780 + def select_named_joins(join_names, stashed_joins = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2222 + def structurally_incompatible_values_for(other); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#1967 + def table_name_matches?(from); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#2021 + def validate_order_args(args); end +end + +# A wrapper to distinguish CTE joins from other nodes. +# +# source://activerecord//lib/active_record/relation/query_methods.rb#151 +class ActiveRecord::QueryMethods::CTEJoin + # @return [CTEJoin] a new instance of CTEJoin + # + # source://activerecord//lib/active_record/relation/query_methods.rb#154 + def initialize(name); end + + # source://activerecord//lib/active_record/relation/query_methods.rb#152 + def name; end +end + +# source://activerecord//lib/active_record/relation/query_methods.rb#159 +ActiveRecord::QueryMethods::FROZEN_EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation/query_methods.rb#160 +ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://activerecord//lib/active_record/relation/query_methods.rb#2217 +ActiveRecord::QueryMethods::STRUCTURAL_VALUE_METHODS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation/query_methods.rb#2018 +ActiveRecord::QueryMethods::VALID_DIRECTIONS = T.let(T.unsafe(nil), Set) + +# source://activerecord//lib/active_record/relation/query_methods.rb#766 +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#14 +class ActiveRecord::QueryMethods::WhereChain + # @return [WhereChain] a new instance of WhereChain + # + # source://activerecord//lib/active_record/relation/query_methods.rb#15 + def initialize(scope); end + + # Returns a new relation with joins and where clause to identify + # 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 + # + # You can define join type in the scope and +associated+ will not use `JOIN` by default. + # + # Post.left_joins(:author).where.associated(:author) + # # SELECT "posts".* FROM "posts" + # # LEFT OUTER JOIN "authors" "authors"."id" = "posts"."author_id" + # # WHERE "authors"."id" IS NOT NULL + # + # Post.left_joins(:comments).where.associated(:author) + # # SELECT "posts".* FROM "posts" + # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" + # # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" + # # WHERE "author"."id" IS NOT NULL + # + # source://activerecord//lib/active_record/relation/query_methods.rb#88 + 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#124 + 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.where.not("name = 'Jon'") + # # SELECT * FROM users WHERE NOT (name = 'Jon') + # + # User.where.not(["name = ?", "Jon"]) + # # SELECT * FROM users WHERE NOT (name = 'Jon') + # + # User.where.not(name: "Jon") + # # SELECT * FROM users WHERE name != 'Jon' + # + # User.where.not(name: nil) + # # SELECT * FROM users WHERE name IS NOT NULL + # + # User.where.not(name: %w(Ko1 Nobu)) + # # SELECT * FROM users WHERE name NOT IN ('Ko1', 'Nobu') + # + # User.where.not(name: "Jon", role: "admin") + # # SELECT * FROM users WHERE NOT (name = 'Jon' AND role = 'admin') + # + # 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.create!(nullable_country: nil) + # User.where.not(nullable_country: "UK") + # # SELECT * FROM users WHERE NOT (nullable_country = 'UK') + # # => [] + # + # source://activerecord//lib/active_record/relation/query_methods.rb#49 + def not(opts, *rest); end + + private + + # source://activerecord//lib/active_record/relation/query_methods.rb#140 + 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#71 + def _load_from_sql(result_set, &block); end + + # source://activerecord//lib/active_record/querying.rb#67 + def _query_by_sql(connection, sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/querying.rb#24 + def and(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def annotate(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def any?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_average(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_count(*_arg0, **_arg1, &_arg2); end + + # Same as #count_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/querying.rb#116 + def async_count_by_sql(sql); end + + # Same as #find_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. + # + # source://activerecord//lib/active_record/querying.rb#59 + def async_find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), allow_retry: T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_ids(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_maximum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_minimum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_pick(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_pluck(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def async_sum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def average(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def calculate(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + 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#109 + def count_by_sql(sql); end + + # source://activerecord//lib/active_record/querying.rb#24 + def create_or_find_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def create_or_find_by!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def create_with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def delete_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def delete_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def destroy(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def destroy_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def destroy_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def distinct(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def eager_load(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def except(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def excluding(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def exists?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def extending(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def extract_associated(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def fifth(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def fifth!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + 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#51 + def find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), allow_retry: T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_each(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_in_batches(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_or_create_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_or_create_by!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_or_initialize_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def find_sole_by(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def first(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def first!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def first_or_create(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def first_or_create!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def first_or_initialize(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def forty_two(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def forty_two!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def fourth(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def fourth!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def from(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def group(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def having(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def ids(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def in_batches(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def in_order_of(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def includes(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def insert!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def insert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def insert_all!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def invert_where(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def last(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def last!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def left_joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def left_outer_joins(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def limit(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def lock(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def many?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def maximum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def minimum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def none(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def none?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def offset(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def one?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def only(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def optimizer_hints(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def or(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def order(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def pick(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def pluck(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def preload(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def readonly(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def references(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def regroup(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def reorder(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def reselect(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def rewhere(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def second(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def second!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def second_to_last(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def second_to_last!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def select(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def sole(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def strict_loading(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def sum(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def take(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def take!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def third(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def third!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def third_to_last(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def third_to_last!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def touch_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def unscope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def update_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def upsert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def upsert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def where(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def with(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + def with_recursive(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/querying.rb#24 + 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 + +# Raised when values that executed are out of range. +# +# source://activerecord//lib/active_record/errors.rb#301 +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#132 +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#394 +class ActiveRecord::ReadOnlyRecord < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/readonly_attributes.rb#4 +class ActiveRecord::ReadonlyAttributeError < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/readonly_attributes.rb#7 +module ActiveRecord::ReadonlyAttributes + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + 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#14 +module ActiveRecord::ReadonlyAttributes::ClassMethods + # Attributes listed as readonly will be used to create a new record. + # Assigning a new value to a readonly attribute on a persisted record raises an error. + # + # By setting +config.active_record.raise_on_assign_to_attr_readonly+ to +false+, it will + # not raise. The value will change in memory, but will not be persisted on +save+. + # + # ==== Examples + # + # class Post < ActiveRecord::Base + # attr_readonly :title + # end + # + # post = Post.create!(title: "Introducing Ruby on Rails!") + # post.title = "a different title" # raises ActiveRecord::ReadonlyAttributeError + # post.update(title: "a different title") # raises ActiveRecord::ReadonlyAttributeError + # + # source://activerecord//lib/active_record/readonly_attributes.rb#30 + def attr_readonly(*attributes); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/readonly_attributes.rb#43 + def readonly_attribute?(name); end + + # Returns an array of all the attributes that have been specified as readonly. + # + # source://activerecord//lib/active_record/readonly_attributes.rb#39 + def readonly_attributes; end +end + +# source://activerecord//lib/active_record/readonly_attributes.rb#48 +module ActiveRecord::ReadonlyAttributes::HasReadonlyAttributes + # source://activerecord//lib/active_record/readonly_attributes.rb#57 + def _write_attribute(attr_name, value); end + + # source://activerecord//lib/active_record/readonly_attributes.rb#49 + def write_attribute(attr_name, value); end +end + +# = Active Record \RecordInvalid +# +# Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and +# {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 record cannot be destroyed due to any of the +# before_destroy callbacks throwing +:abort+. See +# ActiveRecord::Callbacks for further details. +# +# class User < ActiveRecord::Base +# before_destroy do +# throw :abort if still_active? +# end +# end +# +# User.first.destroy! # => raises an ActiveRecord::RecordNotDestroyed +# +# source://activerecord//lib/active_record/errors.rb#182 +class ActiveRecord::RecordNotDestroyed < ::ActiveRecord::ActiveRecordError + # @return [RecordNotDestroyed] a new instance of RecordNotDestroyed + # + # source://activerecord//lib/active_record/errors.rb#185 + def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end + + # Returns the value of attribute record. + # + # source://activerecord//lib/active_record/errors.rb#183 + 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#136 +class ActiveRecord::RecordNotFound < ::ActiveRecord::ActiveRecordError + # @return [RecordNotFound] a new instance of RecordNotFound + # + # source://activerecord//lib/active_record/errors.rb#139 + 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#137 + def id; end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/errors.rb#137 + def model; end + + # Returns the value of attribute primary_key. + # + # source://activerecord//lib/active_record/errors.rb#137 + def primary_key; end +end + +# Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and +# {ActiveRecord::Base.update_attribute!}[rdoc-ref:Persistence#update_attribute!] +# methods when a record failed to validate or cannot be saved due to any of the +# before_* callbacks throwing +:abort+. See +# ActiveRecord::Callbacks for further details. +# +# class Product < ActiveRecord::Base +# before_save do +# throw :abort if price < 0 +# end +# end +# +# Product.create! # => raises an ActiveRecord::RecordNotSaved +# +# source://activerecord//lib/active_record/errors.rb#161 +class ActiveRecord::RecordNotSaved < ::ActiveRecord::ActiveRecordError + # @return [RecordNotSaved] a new instance of RecordNotSaved + # + # source://activerecord//lib/active_record/errors.rb#164 + def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end + + # Returns the value of attribute record. + # + # source://activerecord//lib/active_record/errors.rb#162 + 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#229 +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#29 + def add_aggregate_reflection(ar, name, reflection); end + + # source://activerecord//lib/active_record/reflection.rb#23 + def add_reflection(ar, name, reflection); end + + # source://activerecord//lib/active_record/reflection.rb#18 + def create(macro, name, scope, options, ar); end + + private + + # source://activestorage/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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 + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations=(value); end + def automatically_invert_plural_associations?; 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 + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations?; 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#163 +class ActiveRecord::Reflection::AbstractReflection + # @return [AbstractReflection] a new instance of AbstractReflection + # + # source://activerecord//lib/active_record/reflection.rb#164 + def initialize; end + + # source://activerecord//lib/active_record/reflection.rb#328 + 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#182 + def build_association(attributes, &block); end + + # source://activerecord//lib/active_record/reflection.rb#336 + def build_scope(table, predicate_builder = T.unsafe(nil), klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#332 + def chain; end + + # source://activerecord//lib/active_record/reflection.rb#264 + 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#190 + def class_name; end + + # source://activerecord//lib/active_record/reflection.rb#240 + def constraints; end + + # source://activerecord//lib/active_record/reflection.rb#244 + def counter_cache_column; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#324 + def counter_must_be_updated_by_has_many?; end + + # Returns whether this association has a counter cache and its column values were backfilled + # (and so it is used internally by methods like +size+/+any?+/etc). + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#315 + def has_active_cached_counter?; end + + # Returns whether this association has a counter cache. + # + # 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#307 + def has_cached_counter?; end + + # source://activerecord//lib/active_record/reflection.rb#258 + 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#285 + def inverse_updates_counter_cache?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#299 + 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#285 + def inverse_which_updates_counter_cache; end + + # source://activerecord//lib/active_record/reflection.rb#200 + def join_scope(table, foreign_table, foreign_klass); end + + # source://activerecord//lib/active_record/reflection.rb#227 + def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#235 + 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#196 + def scopes; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#344 + def strict_loading?; end + + # source://activerecord//lib/active_record/reflection.rb#348 + def strict_loading_violation_message(owner); end + + # source://activerecord//lib/active_record/reflection.rb#176 + def table_name; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#172 + def through_reflection?; end + + protected + + # FIXME: this is a horrible name + # + # source://activerecord//lib/active_record/reflection.rb#355 + def actual_source_reflection; end + + private + + # source://activerecord//lib/active_record/reflection.rb#368 + def ensure_option_not_given_as_class!(option_name); end + + # source://activerecord//lib/active_record/reflection.rb#360 + def predicate_builder(table); end + + # source://activerecord//lib/active_record/reflection.rb#364 + 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#488 +class ActiveRecord::Reflection::AggregateReflection < ::ActiveRecord::Reflection::MacroReflection + # source://activerecord//lib/active_record/reflection.rb#489 + 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#497 +class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflection::MacroReflection + # @return [AssociationReflection] a new instance of AssociationReflection + # + # source://activerecord//lib/active_record/reflection.rb#525 + def initialize(name, scope, options, active_record); end + + # source://activerecord//lib/active_record/reflection.rb#595 + def active_record_primary_key; end + + # source://activerecord//lib/active_record/reflection.rb#741 + def add_as_polymorphic_through(reflection, seed); end + + # source://activerecord//lib/active_record/reflection.rb#737 + def add_as_source(seed); end + + # source://activerecord//lib/active_record/reflection.rb#745 + def add_as_through(seed); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/reflection.rb#727 + def association_class; end + + # source://activerecord//lib/active_record/reflection.rb#587 + def association_foreign_key; end + + # source://activerecord//lib/active_record/reflection.rb#591 + def association_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#548 + 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#722 + def belongs_to?; end + + # source://activerecord//lib/active_record/reflection.rb#638 + def check_eager_loadable!; end + + # source://activerecord//lib/active_record/reflection.rb#626 + 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#670 + 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#664 + 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#704 + def collection?; end + + # source://activerecord//lib/active_record/reflection.rb#498 + def compute_class(name); end + + # source://activerecord//lib/active_record/reflection.rb#749 + def extensions; end + + # source://activerecord//lib/active_record/reflection.rb#562 + def foreign_key(infer_from_inverse_of: T.unsafe(nil)); end + + # Returns the value of attribute foreign_type. + # + # source://activerecord//lib/active_record/reflection.rb#522 + def foreign_type; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#682 + def has_inverse?; end + + # Returns +true+ if +self+ is a +has_one+ reflection. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#725 + def has_one?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#678 + def has_scope?; end + + # source://activerecord//lib/active_record/reflection.rb#622 + def join_foreign_key; end + + # source://activerecord//lib/active_record/reflection.rb#650 + def join_id_for(owner); end + + # source://activerecord//lib/active_record/reflection.rb#614 + def join_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#618 + def join_primary_type; end + + # source://activerecord//lib/active_record/reflection.rb#558 + def join_table; end + + # Returns the macro type. + # + # has_many :clients returns :has_many + # + # @raise [NotImplementedError] + # + # source://activerecord//lib/active_record/reflection.rb#699 + def macro; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#674 + def nested?; end + + # Reflection + # + # source://activerecord//lib/active_record/reflection.rb#523 + def parent_reflection; end + + # Reflection + # + # source://activerecord//lib/active_record/reflection.rb#523 + def parent_reflection=(_arg0); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#729 + def polymorphic?; end + + # source://activerecord//lib/active_record/reflection.rb#686 + def polymorphic_inverse_of(associated_class); end + + # source://activerecord//lib/active_record/reflection.rb#733 + def polymorphic_name; end + + # source://activerecord//lib/active_record/reflection.rb#658 + def source_reflection; end + + # source://activerecord//lib/active_record/reflection.rb#654 + def through_reflection; end + + # Returns the value of attribute type. + # + # source://activerecord//lib/active_record/reflection.rb#522 + 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#717 + def validate?; end + + private + + # returns either +nil+ or the inverse association name that it finds. + # + # source://activerecord//lib/active_record/reflection.rb#766 + 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#808 + def can_find_inverse_of_automatically?(reflection, inverse_reflection = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#829 + def derive_class_name; end + + # source://activerecord//lib/active_record/reflection.rb#847 + def derive_fk_query_constraints(foreign_key); end + + # source://activerecord//lib/active_record/reflection.rb#835 + def derive_foreign_key(infer_from_inverse_of: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#887 + 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#757 + 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#821 + 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#794 + def valid_inverse_reflection?(reflection); end +end + +# source://activerecord//lib/active_record/reflection.rb#920 +class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection::AssociationReflection + # source://activerecord//lib/active_record/reflection.rb#925 + def association_class; end + + # klass option is necessary to support loading polymorphic associations + # + # source://activerecord//lib/active_record/reflection.rb#934 + def association_primary_key(klass = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#923 + def belongs_to?; end + + # source://activerecord//lib/active_record/reflection.rb#956 + def join_foreign_key; end + + # source://activerecord//lib/active_record/reflection.rb#960 + def join_foreign_type; end + + # source://activerecord//lib/active_record/reflection.rb#952 + def join_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#921 + def macro; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#965 + def can_find_inverse_of_automatically?(*_arg0); end +end + +# = Active Record Reflection +# +# \Reflection enables the ability to examine the associations and aggregations of +# Active Record classes and objects. This information, for example, +# can be used in a form builder that takes an Active Record object +# 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#60 +module ActiveRecord::Reflection::ClassMethods + # source://activerecord//lib/active_record/reflection.rb#126 + def _reflect_on_association(association); end + + # source://activerecord//lib/active_record/reflection.rb#137 + def clear_reflections_cache; end + + # source://activerecord//lib/active_record/reflection.rb#82 + def normalized_reflections; 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#70 + 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#62 + 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#111 + 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#131 + 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#122 + 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#78 + def reflections; end + + private + + # source://activerecord//lib/active_record/reflection.rb#142 + def inherited(subclass); end +end + +# source://activerecord//lib/active_record/reflection.rb#970 +class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#973 + def collection?; end + + # source://activerecord//lib/active_record/reflection.rb#971 + def macro; end +end + +# source://activerecord//lib/active_record/reflection.rb#892 +class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection::AssociationReflection + # source://activerecord//lib/active_record/reflection.rb#897 + def association_class; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#895 + def collection?; end + + # source://activerecord//lib/active_record/reflection.rb#893 + def macro; end +end + +# source://activerecord//lib/active_record/reflection.rb#906 +class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::AssociationReflection + # source://activerecord//lib/active_record/reflection.rb#911 + def association_class; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#909 + def has_one?; end + + # source://activerecord//lib/active_record/reflection.rb#907 + 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#377 +class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::AbstractReflection + # @return [MacroReflection] a new instance of MacroReflection + # + # source://activerecord//lib/active_record/reflection.rb#396 + 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#448 + def ==(other_aggregation); end + + # source://activerecord//lib/active_record/reflection.rb#434 + def _klass(class_name); end + + # Returns the value of attribute active_record. + # + # source://activerecord//lib/active_record/reflection.rb#392 + def active_record; end + + # source://activerecord//lib/active_record/reflection.rb#407 + def autosave=(autosave); end + + # source://activerecord//lib/active_record/reflection.rb#442 + 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#430 + 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#382 + 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#390 + def options; end + + # source://activerecord//lib/active_record/reflection.rb#394 + def plural_name; end + + # Returns the value of attribute scope. + # + # source://activerecord//lib/active_record/reflection.rb#384 + def scope; end + + # source://activerecord//lib/active_record/reflection.rb#456 + def scope_for(relation, owner = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/reflection.rb#461 + def derive_class_name; end + + # source://activerecord//lib/active_record/reflection.rb#465 + def normalize_options(options); end +end + +# source://activerecord//lib/active_record/reflection.rb#1236 +class ActiveRecord::Reflection::PolymorphicReflection < ::ActiveRecord::Reflection::AbstractReflection + # @return [PolymorphicReflection] a new instance of PolymorphicReflection + # + # source://activerecord//lib/active_record/reflection.rb#1240 + def initialize(reflection, previous_reflection); end + + # source://activerecord//lib/active_record/reflection.rb#1251 + def constraints; end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def join_foreign_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def join_primary_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1246 + def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def klass(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def plural_name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def scope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def scope_for(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1237 + def type(*_arg0, **_arg1, &_arg2); end + + private + + # source://activerecord//lib/active_record/reflection.rb#1256 + def source_type_scope; end +end + +# source://activerecord//lib/active_record/reflection.rb#1263 +class ActiveRecord::Reflection::RuntimeReflection < ::ActiveRecord::Reflection::AbstractReflection + # @return [RuntimeReflection] a new instance of RuntimeReflection + # + # source://activerecord//lib/active_record/reflection.rb#1266 + def initialize(reflection, association); end + + # source://activerecord//lib/active_record/reflection.rb#1276 + def aliased_table; end + + # source://activerecord//lib/active_record/reflection.rb#1284 + def all_includes; end + + # source://activerecord//lib/active_record/reflection.rb#1264 + def constraints(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1264 + def join_foreign_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1280 + def join_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#1272 + def klass; end + + # source://activerecord//lib/active_record/reflection.rb#1264 + def scope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1264 + 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#980 +class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection::AbstractReflection + # @return [ThroughReflection] a new instance of ThroughReflection + # + # source://activerecord//lib/active_record/reflection.rb#984 + def initialize(delegate_reflection); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def _klass(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def active_record(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#981 + def active_record_primary_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1198 + def add_as_polymorphic_through(reflection, seed); end + + # source://activerecord//lib/active_record/reflection.rb#1194 + def add_as_source(seed); end + + # source://activerecord//lib/active_record/reflection.rb#1202 + def add_as_through(seed); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def association_class(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#981 + 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#1091 + def association_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def association_scope_cache(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def autosave=(arg); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def belongs_to?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def check_eager_loadable!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1148 + 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#1063 + 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#1057 + def collect_join_chain; end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def collection?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def compute_class(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1188 + def constraints; end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def extensions(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#981 + def foreign_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#981 + def foreign_type(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def has_inverse?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def has_one?(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#1077 + def has_scope?; end + + # source://activerecord//lib/active_record/reflection.rb#981 + def join_foreign_key(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#981 + def join_id_for(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1101 + def join_primary_key(klass = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def join_primary_type(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1073 + def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def join_table(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#997 + def klass; end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def macro(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + 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#1084 + def nested?; end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def options(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def parent_reflection(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def parent_reflection=(arg); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def plural_name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def polymorphic?(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def polymorphic_inverse_of(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def polymorphic_name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def scope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def scope_for(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1069 + def scopes; end + + # source://activerecord//lib/active_record/reflection.rb#1140 + 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#1018 + def source_reflection; end + + # source://activerecord//lib/active_record/reflection.rb#1120 + 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#1116 + def source_reflection_names; end + + # source://activerecord//lib/active_record/reflection.rb#1144 + 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#1036 + def through_reflection; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/reflection.rb#993 + def through_reflection?; end + + # source://activerecord//lib/active_record/reflection.rb#981 + def type(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/reflection.rb#1233 + def validate?(*_arg0, **_arg1, &_arg2); end + + protected + + # FIXME: this is a horrible name + # + # source://activerecord//lib/active_record/reflection.rb#1207 + def actual_source_reflection; end + + private + + # source://activerecord//lib/active_record/reflection.rb#1214 + def collect_join_reflections(seed); end + + # Returns the value of attribute delegate_reflection. + # + # source://activerecord//lib/active_record/reflection.rb#1212 + def delegate_reflection; end + + # source://activerecord//lib/active_record/reflection.rb#1225 + def derive_class_name; end + + # source://activerecord//lib/active_record/reflection.rb#1223 + 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 + include ::ActiveRecord::TokenFor::RelationMethods + include ::ActiveRecord::SignedId::RelationMethods + extend ::ActiveRecord::Delegation::ClassMethods + + # @return [Relation] a new instance of Relation + # + # source://activerecord//lib/active_record/relation.rb#77 + def initialize(model, 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#1246 + def ==(other); end + + # source://activerecord//lib/active_record/relation.rb#545 + def _exec_scope(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation.rb#1300 + def alias_tracker(joins = T.unsafe(nil), aliases = T.unsafe(nil)); end + + # Returns true if there are any records. + # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.any?(Post) # => true or false + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#384 + def any?(*args); end + + # @yield [attr, bind] + # + # source://activerecord//lib/active_record/relation.rb#95 + def bind_attribute(name, value); end + + # Returns true if relation is blank. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1267 + 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.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#118 + 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#431 + def cache_key(timestamp_column = T.unsafe(nil)); end + + # Returns a cache key along with the version. + # + # source://activerecord//lib/active_record/relation.rb#512 + 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#458 + 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.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#147 + 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#162 + 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 tries to create the record first. As such it is + # better suited for cases where the record is most likely not to exist yet. + # + # There are several drawbacks to #create_or_find_by, though: + # + # * The underlying table must have the relevant columns defined with unique database constraints. + # * A unique constraint violation may be triggered by only one, or at least less than all, + # of the given attributes. This means that the subsequent #find_by! may fail to find a + # matching record, which will then raise an ActiveRecord::RecordNotFound exception, + # 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). + # * Columns with unique database constraints should not have uniqueness validations defined, + # otherwise #create will fail due to validation errors and #find_by will never be called. + # + # 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#266 + 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#281 + def create_or_find_by!(attributes, &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/relation.rb#1050 + def delete(id_or_array); 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#1004 + 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#1112 + def delete_by(*args); 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/relation.rb#1076 + def destroy(id); 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#982 + 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#1099 + def destroy_by(*args); end + + # Returns true if relation needs eager loading. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1231 + def eager_loading?; end + + # Returns true if there are no records. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#355 + def empty?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1292 + def empty_scope?; end + + # Serializes the relation objects Array. + # + # source://activerecord//lib/active_record/relation.rb#341 + 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. + # + # User.all.explain + # # EXPLAIN SELECT `users`.* FROM `users` + # # ... + # + # 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. + # + # To run EXPLAIN on queries created by +first+, +pluck+ and +count+, call + # these methods on +explain+: + # + # User.all.explain.count + # # EXPLAIN SELECT COUNT(*) FROM `users` + # # ... + # + # The column name can be passed if required: + # + # User.all.explain.maximum(:id) + # # EXPLAIN SELECT MAX(`users`.`id`) FROM `users` + # # ... + # + # 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#325 + def explain(*options); 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.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.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.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.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. + # + # If creation failed because of a unique constraint, this method will + # assume it encountered a race condition and will try finding the record + # once more. If somehow the second find still does not find a record + # because a concurrent DELETE happened, it will then raise an + # ActiveRecord::RecordNotFound exception. + # + # Please note this method is not atomic, it runs first a SELECT, + # and if there are no results an INSERT is attempted. So if the table + # doesn't have a relevant unique constraint it could be the case that + # you end up with two or more similar records. + # + # source://activerecord//lib/active_record/relation.rb#224 + 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#231 + 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#295 + def find_or_initialize_by(attributes, &block); end + + # source://activerecord//lib/active_record/relation.rb#171 + def first_or_create(attributes = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/relation.rb#175 + def first_or_create!(attributes = T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/relation.rb#179 + def first_or_initialize(attributes = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1296 + def has_limit_or_offset?; 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/relation.rb#637 + 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/relation.rb#726 + 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, SQLite3, and MariaDB 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: Arel.sql("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/relation.rb#716 + 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, SQLite3, and MariaDB 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: Arel.sql("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/relation.rb#783 + def insert_all!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#1283 + 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#1241 + def joined_includes_values; end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/relation.rb#71 + 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#1172 + 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. + # + # 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#1131 + def load_async; end + + # Returns the value of attribute loaded. + # + # source://activerecord//lib/active_record/relation.rb#71 + def loaded; end + + # Returns the value of attribute loaded. + # + # source://activerecord//lib/active_record/relation.rb#71 + def loaded?; end + + # source://activerecord//lib/active_record/relation/query_methods.rb#174 + def locked?; end + + # Returns true if there is more than one record. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#406 + def many?; end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/relation.rb#71 + 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.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#118 + def new(attributes = T.unsafe(nil), &block); end + + # Returns true if there are no records. + # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.none?(Comment) # => true or false + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#371 + def none?(*args); end + + # Returns true if there is exactly one record. + # + # When a pattern argument is given, this method checks whether elements in + # the Enumerable match the pattern via the case-equality operator (===). + # + # posts.one?(Post) # => true or false + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#397 + def one?(*args); end + + # Returns the value of attribute predicate_builder. + # + # source://activerecord//lib/active_record/relation.rb#71 + def predicate_builder; end + + # source://activerecord//lib/active_record/relation.rb#1314 + def preload_associations(records); end + + # source://activerecord//lib/active_record/relation.rb#1257 + def pretty_print(pp); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1271 + def readonly?; end + + # source://activerecord//lib/active_record/relation.rb#335 + def records; end + + # Forces reloading of relation. + # + # source://activerecord//lib/active_record/relation.rb#1182 + def reload; end + + # source://activerecord//lib/active_record/relation.rb#1187 + def reset; end + + # Returns true if the relation was scheduled on the background + # thread pool. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1162 + def scheduled?; end + + # source://activerecord//lib/active_record/relation.rb#1224 + 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#534 + def scoping(all_queries: T.unsafe(nil), &block); end + + # Returns size of the records. + # + # source://activerecord//lib/active_record/relation.rb#346 + def size; end + + # Returns the value of attribute skip_preloading_value. + # + # source://activerecord//lib/active_record/relation.rb#72 + 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#72 + def skip_preloading_value=(_arg0); end + + # Returns the value of attribute table. + # + # source://activerecord//lib/active_record/relation.rb#71 + def table; end + + # source://activerecord//lib/active_record/relation.rb#1150 + def then(&block); end + + # Converts relation objects to Array. + # + # source://activerecord//lib/active_record/relation.rb#330 + def to_a; end + + # Converts relation objects to Array. + # + # source://activerecord//lib/active_record/relation.rb#330 + def to_ary; end + + # Returns sql statement for the relation. + # + # User.where(name: 'Oscar').to_sql + # # SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' + # + # source://activerecord//lib/active_record/relation.rb#1203 + 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#962 + def touch_all(*names, time: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#614 + def update(id = T.unsafe(nil), attributes); end + + # source://activerecord//lib/active_record/relation.rb#622 + 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. Any strings provided will + # be type cast, unless you use +Arel.sql+. (Don't pass user-provided values to +Arel.sql+.) + # + # ==== 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') + # + # # Update all books with 'Rails' in their title + # Book.where('title LIKE ?', '%Rails%').update_all(title: Arel.sql("title + ' - volume 1'")) + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/relation.rb#581 + 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#919 + def update_counters(counters); 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/relation.rb#793 + def upsert(attributes, **kwargs); end + + # Updates or inserts (upserts) multiple records into the database in a + # single SQL INSERT statement. It does not instantiate any models nor does + # 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, SQLite3, and MariaDB 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: Arel.sql("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/relation.rb#903 + 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 + + # source://activerecord//lib/active_record/relation.rb#1275 + def values; end + + # source://activerecord//lib/active_record/relation.rb#1279 + def values_for_queries; end + + # Returns a hash of where conditions. + # + # User.where(name: 'Oscar').where_values_hash + # # => {name: "Oscar"} + # + # source://activerecord//lib/active_record/relation.rb#1220 + def where_values_hash(relation_table_name = T.unsafe(nil)); end + + protected + + # source://activerecord//lib/active_record/relation.rb#1324 + def load_records(records); end + + private + + # source://activerecord//lib/active_record/relation.rb#1350 + def _create(attributes, &block); end + + # source://activerecord//lib/active_record/relation.rb#1354 + def _create!(attributes, &block); end + + # source://activerecord//lib/active_record/relation.rb#1389 + def _increment_attribute(attribute, value = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#1346 + def _new(attributes, &block); end + + # source://activerecord//lib/active_record/relation.rb#1358 + def _scoping(scope, registry, all_queries = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#1374 + def _substitute_values(values); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1330 + def already_in_scope?(registry); end + + # source://activerecord//lib/active_record/relation.rb#436 + def compute_cache_key(timestamp_column = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#465 + def compute_cache_version(timestamp_column); end + + # source://activerecord//lib/active_record/relation.rb#1338 + def current_scope_restoring_block(&block); end + + # source://activerecord//lib/active_record/relation.rb#1416 + def exec_main_query(async: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#1396 + def exec_queries(&block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1334 + def global_scope?(registry); end + + # source://activerecord//lib/active_record/relation.rb#90 + def initialize_copy(other); end + + # source://activerecord//lib/active_record/relation.rb#1448 + def instantiate_records(rows, &block); end + + # source://activerecord//lib/active_record/relation.rb#1491 + def limited_count; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1467 + def references_eager_loaded_tables?; end + + # source://activerecord//lib/active_record/relation.rb#1459 + def skip_query_cache_if_necessary(&block); end + + # source://activerecord//lib/active_record/relation.rb#1484 + def tables_in_string(string); end +end + +# source://activerecord//lib/active_record/relation.rb#62 +ActiveRecord::Relation::CLAUSE_METHODS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation.rb#6 +class ActiveRecord::Relation::ExplainProxy + # @return [ExplainProxy] a new instance of ExplainProxy + # + # source://activerecord//lib/active_record/relation.rb#7 + def initialize(relation, options); end + + # source://activerecord//lib/active_record/relation.rb#16 + def average(column_name); end + + # source://activerecord//lib/active_record/relation.rb#20 + def count(column_name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#24 + def first(limit = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#12 + def inspect; end + + # source://activerecord//lib/active_record/relation.rb#28 + def last(limit = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/relation.rb#32 + def maximum(column_name); end + + # source://activerecord//lib/active_record/relation.rb#36 + def minimum(column_name); end + + # source://activerecord//lib/active_record/relation.rb#40 + def pluck(*column_names); end + + # source://activerecord//lib/active_record/relation.rb#44 + def sum(identity_or_column = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/relation.rb#49 + def exec_explain(&block); end +end + +# 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); 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#17 + 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#25 + 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#63 +ActiveRecord::Relation::INVALID_METHODS_FOR_DELETE_ALL = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation.rb#54 +ActiveRecord::Relation::MULTI_VALUE_METHODS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation/merger.rb#43 +class ActiveRecord::Relation::Merger + # @return [Merger] a new instance of Merger + # + # source://activerecord//lib/active_record/relation/merger.rb#46 + def initialize(relation, other); end + + # source://activerecord//lib/active_record/relation/merger.rb#58 + def merge; end + + # Returns the value of attribute other. + # + # source://activerecord//lib/active_record/relation/merger.rb#44 + def other; end + + # Returns the value of attribute relation. + # + # source://activerecord//lib/active_record/relation/merger.rb#44 + def relation; end + + # Returns the value of attribute values. + # + # source://activerecord//lib/active_record/relation/merger.rb#44 + 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#52 +ActiveRecord::Relation::Merger::NORMAL_VALUES = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation/query_attribute.rb#7 +class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute + # @return [QueryAttribute] a new instance of QueryAttribute + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#8 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#53 + def ==(other); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#53 + def eql?(other); end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#58 + def hash; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#42 + def infinite?; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#35 + def nil?; end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#22 + def type_cast(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#46 + def unboundable?; end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#26 + def value_for_database; end + + # source://activerecord//lib/active_record/relation/query_attribute.rb#31 + def with_cast_value(value); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation/query_attribute.rb#63 + def infinity?(value); end +end + +# source://activerecord//lib/active_record/relation.rb#59 +ActiveRecord::Relation::SINGLE_VALUE_METHODS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/relation.rb#1304 +class ActiveRecord::Relation::StrictLoadingScope + class << self + # @return [Boolean] + # + # source://activerecord//lib/active_record/relation.rb#1305 + def empty_scope?; end + + # source://activerecord//lib/active_record/relation.rb#1309 + def strict_loading_value; end + end +end + +# source://activerecord//lib/active_record/relation.rb#65 +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#32 + 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); end + + # source://activerecord//lib/active_record/relation/where_clause.rb#36 + 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#159 + def equality_node?(node); end + + # source://activerecord//lib/active_record/relation/where_clause.rb#174 + 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#209 + def extract_node_value(node); end + + # source://activerecord//lib/active_record/relation/where_clause.rb#163 + def invert_predicate(node); end + + # source://activerecord//lib/active_record/relation/where_clause.rb#198 + def non_empty_predicates; end + + # source://activerecord//lib/active_record/relation/where_clause.rb#187 + def predicates_with_wrapped_sql_literals; end + + # source://activerecord//lib/active_record/relation/where_clause.rb#202 + 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#197 +ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(nil), Array) + +# = Active Record \Result +# +# This class encapsulates a result returned from calling +# {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query] +# on any database connection adapter. For example: +# +# result = ActiveRecord::Base.lease_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#36 +class ActiveRecord::Result + include ::Enumerable + + # @return [Result] a new instance of Result + # + # source://activerecord//lib/active_record/result.rb#102 + def initialize(columns, rows, column_types = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/result.rb#148 + def [](idx); end + + # source://activerecord//lib/active_record/result.rb#161 + def cancel; end + + # source://activerecord//lib/active_record/result.rb#165 + def cast_values(type_overrides = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/result.rb#202 + def column_indexes; end + + # Returns the value of attribute column_types. + # + # source://activerecord//lib/active_record/result.rb#92 + def column_types; end + + # Returns the value of attribute columns. + # + # source://activerecord//lib/active_record/result.rb#92 + def columns; end + + # Calls the given block once for each element in row collection, passing + # row as parameter. Each row is a Hash-like, read only object. + # + # To get real hashes, use +.to_a.each+. + # + # Returns an +Enumerator+ if no block is given. + # + # source://activerecord//lib/active_record/result.rb#128 + def each(&block); end + + # Returns true if there are no records, otherwise false. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/result.rb#137 + def empty?; end + + # source://activerecord//lib/active_record/result.rb#196 + def freeze; end + + # Returns true if this result set includes the column named +name+ + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/result.rb#113 + def includes_column?(name); end + + # Returns the last record from the rows collection. + # + # source://activerecord//lib/active_record/result.rb#153 + def last(n = T.unsafe(nil)); end + + # Returns the number of elements in the rows array. + # + # source://activerecord//lib/active_record/result.rb#118 + def length; end + + # source://activerecord//lib/active_record/result.rb#157 + def result; end + + # Returns the value of attribute rows. + # + # source://activerecord//lib/active_record/result.rb#92 + def rows; end + + # Returns an array of hashes representing each row record. + # + # source://activerecord//lib/active_record/result.rb#142 + def to_a; end + + # Returns an array of hashes representing each row record. + # + # source://activerecord//lib/active_record/result.rb#142 + def to_ary; end + + private + + # source://activerecord//lib/active_record/result.rb#216 + def column_type(name, index, type_overrides); end + + # source://activerecord//lib/active_record/result.rb#231 + def hash_rows; end + + # source://activerecord//lib/active_record/result.rb#224 + def indexed_rows; end + + # source://activerecord//lib/active_record/result.rb#191 + def initialize_copy(other); end + + class << self + # source://activerecord//lib/active_record/result.rb#94 + def empty(async: T.unsafe(nil)); end + end +end + +# source://activerecord//lib/active_record/result.rb#243 +ActiveRecord::Result::EMPTY = T.let(T.unsafe(nil), ActiveRecord::Result) + +# source://activerecord//lib/active_record/result.rb#246 +ActiveRecord::Result::EMPTY_ASYNC = T.let(T.unsafe(nil), ActiveRecord::FutureResult::Complete) + +# source://activerecord//lib/active_record/result.rb#240 +ActiveRecord::Result::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://activerecord//lib/active_record/result.rb#39 +class ActiveRecord::Result::IndexedRow + # @return [IndexedRow] a new instance of IndexedRow + # + # source://activerecord//lib/active_record/result.rb#40 + def initialize(column_indexes, row); end + + # source://activerecord//lib/active_record/result.rb#58 + def ==(other); end + + # source://activerecord//lib/active_record/result.rb#80 + def [](column); end + + # source://activerecord//lib/active_record/result.rb#50 + def each_key(&block); end + + # source://activerecord//lib/active_record/result.rb#70 + def fetch(column); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/result.rb#66 + def key?(column); end + + # source://activerecord//lib/active_record/result.rb#54 + def keys; end + + # source://activerecord//lib/active_record/result.rb#45 + def length; end + + # source://activerecord//lib/active_record/result.rb#45 + def size; end + + # source://activerecord//lib/active_record/result.rb#86 + def to_h; end + + # source://activerecord//lib/active_record/result.rb#86 + def to_hash; end +end + +# {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#435 +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#20 + def async_sql_runtime; end + + # source://activerecord//lib/active_record/runtime_registry.rb#24 + def async_sql_runtime=(runtime); end + + # source://activerecord//lib/active_record/runtime_registry.rb#36 + def cached_queries_count; end + + # source://activerecord//lib/active_record/runtime_registry.rb#40 + def cached_queries_count=(count); end + + # source://activerecord//lib/active_record/runtime_registry.rb#28 + def queries_count; end + + # source://activerecord//lib/active_record/runtime_registry.rb#32 + def queries_count=(count); end + + # source://activerecord//lib/active_record/runtime_registry.rb#44 + def reset; end + + # source://activerecord//lib/active_record/runtime_registry.rb#62 + def reset_cached_queries_count; end + + # source://activerecord//lib/active_record/runtime_registry.rb#56 + def reset_queries_count; end + + # source://activerecord//lib/active_record/runtime_registry.rb#50 + def reset_runtimes; end + + # 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 + +# Raised when a statement produces an SQL warning. +# +# source://activerecord//lib/active_record/errors.rb#305 +class ActiveRecord::SQLWarning < ::ActiveRecord::AdapterError + # @return [SQLWarning] a new instance of SQLWarning + # + # source://activerecord//lib/active_record/errors.rb#309 + def initialize(message = T.unsafe(nil), code = T.unsafe(nil), level = T.unsafe(nil), sql = T.unsafe(nil), connection_pool = T.unsafe(nil)); end + + # Returns the value of attribute code. + # + # source://activerecord//lib/active_record/errors.rb#306 + def code; end + + # Returns the value of attribute level. + # + # source://activerecord//lib/active_record/errors.rb#306 + def level; end + + # Returns the value of attribute sql. + # + # source://activerecord//lib/active_record/errors.rb#307 + def sql; end + + # Sets the attribute sql + # + # @param value the value to set the attribute sql to. + # + # source://activerecord//lib/active_record/errors.rb#307 + def sql=(_arg0); 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#183 + def disallow_raw_sql!(args, permit: T.unsafe(nil)); end + + # Accepts an array of SQL conditions and sanitizes them into a valid + # SQL fragment for a WHERE clause. + # + # sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4]) + # # => "name='foo''bar' and group_id=4" + # + # 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'" + # + # This method will NOT sanitize an SQL string since it won't contain + # any conditions in it and will return the string as is. + # + # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") + # # => "name='foo''bar' and group_id='4'" + # + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_conditions(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#33 + def sanitize_sql(condition); end + + # Accepts an array of conditions. The array has each value + # sanitized and interpolated into the SQL statement. If using named bind + # variables in SQL statements where a colon is required verbatim use a + # backslash to escape. + # + # sanitize_sql_array(["name=? and group_id=?", "foo'bar", 4]) + # # => "name='foo''bar' and group_id=4" + # + # sanitize_sql_array(["name=:name and group_id=:group_id", name: "foo'bar", group_id: 4]) + # # => "name='foo''bar' and group_id=4" + # + # sanitize_sql_array(["TO_TIMESTAMP(:date, 'YYYY/MM/DD HH12\\:MI\\:SS')", date: "foo"]) + # # => "TO_TIMESTAMP('foo', 'YYYY/MM/DD HH12:MI:SS')" + # + # sanitize_sql_array(["name='%s' and group_id='%s'", "foo'bar", 4]) + # # => "name='foo''bar' and group_id='4'" + # + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_array(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#164 + def sanitize_sql_array(ary); end + + # Accepts an array or hash of SQL conditions and sanitizes them into + # a valid SQL fragment for a SET clause. + # + # sanitize_sql_for_assignment(["name=? and group_id=?", nil, 4]) + # # => "name=NULL and group_id=4" + # + # 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" + # + # This method will NOT sanitize an SQL string since it won't contain + # any conditions in it and will return the string as is. + # + # sanitize_sql_for_assignment("name=NULL and group_id='4'") + # # => "name=NULL and group_id='4'" + # + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_assignment(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#68 + def sanitize_sql_for_assignment(assignments, default_table_name = T.unsafe(nil)); end + + # Accepts an array 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'" + # + # This method will NOT sanitize an SQL string since it won't contain + # any conditions in it and will return the string as is. + # + # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") + # # => "name='foo''bar' and group_id='4'" + # + # Note that this sanitization method is not schema-aware, hence won't do any type casting + # and will directly use the database adapter's +quote+ method. + # For MySQL specifically this means that numeric parameters will be quoted as strings + # to prevent query manipulation attacks. + # + # sanitize_sql_for_conditions(["role = ?", 0]) + # # => "role = '0'" + # + # source://activerecord//lib/active_record/sanitization.rb#33 + def sanitize_sql_for_conditions(condition); end + + # Accepts an array, or string of SQL conditions and sanitizes + # 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#84 + 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#107 + 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#132 + def sanitize_sql_like(string, escape_character = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/sanitization.rb#233 + def quote_bound_value(connection, value); end + + # source://activerecord//lib/active_record/sanitization.rb#247 + def raise_if_bind_arity_mismatch(statement, expected, provided); end + + # source://activerecord//lib/active_record/sanitization.rb#211 + def replace_bind_variable(connection, value); end + + # source://activerecord//lib/active_record/sanitization.rb#203 + def replace_bind_variables(connection, statement, values); end + + # source://activerecord//lib/active_record/sanitization.rb#219 + def replace_named_bind_variables(connection, 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#70 + 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#74 + 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#29 + def chk_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#29 + def chk_ignore_pattern=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#60 + def dump(stream); end + + # :singleton-method: + # Specify a custom regular expression matching exclusion constraints which name + # should not be dumped to db/schema.rb. + # + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern=(val); end + + # :singleton-method: + # Specify a custom regular expression matching foreign keys which name + # should not be dumped to db/schema.rb. + # + # source://activerecord//lib/active_record/schema_dumper.rb#23 + def fk_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#23 + def fk_ignore_pattern=(val); end + + # :singleton-method: + # A list of tables which should not be dumped to the schema. + # Acceptable values are strings and regexps. + # + # source://activerecord//lib/active_record/schema_dumper.rb#17 + def ignore_tables; end + + # source://activerecord//lib/active_record/schema_dumper.rb#17 + def ignore_tables=(val); end + + # :singleton-method: + # Specify a custom regular expression matching unique constraints which name + # should not be dumped to db/schema.rb. + # + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern=(val); end + + private + + # source://activerecord//lib/active_record/schema_dumper.rb#278 + def check_constraints_in_create(table, stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#92 + def define_params; end + + # extensions are only supported by PostgreSQL + # + # source://activerecord//lib/active_record/schema_dumper.rb#119 + def extensions(stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#298 + def foreign_keys(table, stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#330 + def format_colspec(colspec); end + + # source://activerecord//lib/active_record/schema_dumper.rb#340 + def format_index_parts(options); end + + # source://activerecord//lib/active_record/schema_dumper.rb#336 + def format_options(options); end + + # turns 20170404131909 into "2017_04_04_131909" + # + # source://activerecord//lib/active_record/schema_dumper.rb#86 + def formatted_version; end + + # source://activerecord//lib/active_record/schema_dumper.rb#96 + def header(stream); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/schema_dumper.rb#358 + def ignored?(table_name); end + + # source://activerecord//lib/active_record/schema_dumper.rb#260 + def index_parts(index); end + + # Keep it for indexing materialized views + # + # source://activerecord//lib/active_record/schema_dumper.rb#227 + def indexes(table, stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#239 + def indexes_in_create(table, stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#348 + def remove_prefix_and_suffix(table); end + + # schemas are only supported by PostgreSQL + # + # source://activerecord//lib/active_record/schema_dumper.rb#127 + def schemas(stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#158 + def table(table, stream); end + + # Returns the value of attribute table_name. + # + # source://activerecord//lib/active_record/schema_dumper.rb#72 + 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#72 + def table_name=(_arg0); end + + # source://activerecord//lib/active_record/schema_dumper.rb#134 + def tables(stream); end + + # source://activerecord//lib/active_record/schema_dumper.rb#114 + def trailer(stream); end + + # (enum) types are only supported by PostgreSQL + # + # source://activerecord//lib/active_record/schema_dumper.rb#123 + def types(stream); end + + # virtual tables are only supported by SQLite + # + # source://activerecord//lib/active_record/schema_dumper.rb#131 + def virtual_tables(stream); end + + class << self + # source://activerecord//lib/active_record/schema_dumper.rb#29 + def chk_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#29 + def chk_ignore_pattern=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#44 + def dump(pool = T.unsafe(nil), stream = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#35 + def excl_ignore_pattern=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#23 + def fk_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#23 + def fk_ignore_pattern=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#17 + def ignore_tables; end + + # source://activerecord//lib/active_record/schema_dumper.rb#17 + def ignore_tables=(val); end + + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern; end + + # source://activerecord//lib/active_record/schema_dumper.rb#41 + def unique_ignore_pattern=(val); end + + private + + # source://activerecord//lib/active_record/schema_dumper.rb#52 + def generate_options(config); end + + def new(*_arg0); 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 schema migrations table so it doesn't need +# to be executed the next time. +# +# source://activerecord//lib/active_record/schema_migration.rb#8 +class ActiveRecord::SchemaMigration + # @return [SchemaMigration] a new instance of SchemaMigration + # + # source://activerecord//lib/active_record/schema_migration.rb#14 + def initialize(pool); end + + # Returns the value of attribute arel_table. + # + # source://activerecord//lib/active_record/schema_migration.rb#12 + def arel_table; end + + # source://activerecord//lib/active_record/schema_migration.rb#91 + def count; end + + # source://activerecord//lib/active_record/schema_migration.rb#53 + def create_table; end + + # source://activerecord//lib/active_record/schema_migration.rb#19 + def create_version(version); end + + # source://activerecord//lib/active_record/schema_migration.rb#36 + def delete_all_versions; end + + # source://activerecord//lib/active_record/schema_migration.rb#27 + def delete_version(version); end + + # source://activerecord//lib/active_record/schema_migration.rb#63 + def drop_table; end + + # source://activerecord//lib/active_record/schema_migration.rb#87 + def integer_versions; end + + # source://activerecord//lib/active_record/schema_migration.rb#69 + def normalize_migration_number(number); end + + # source://activerecord//lib/active_record/schema_migration.rb#73 + def normalized_versions; end + + # source://activerecord//lib/active_record/schema_migration.rb#45 + def primary_key; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/schema_migration.rb#100 + def table_exists?; end + + # source://activerecord//lib/active_record/schema_migration.rb#49 + def table_name; end + + # source://activerecord//lib/active_record/schema_migration.rb#77 + def versions; end +end + +# source://activerecord//lib/active_record/schema_migration.rb#9 +class ActiveRecord::SchemaMigration::NullSchemaMigration; 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#62 + def default_scopes?(all_queries: T.unsafe(nil)); end + + # Are there attributes associated with this scope? + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/scoping/default.rb#55 + def scope_attributes?; end + + # Returns a scope for the model without the previously set scopes. + # + # class Post < ActiveRecord::Base + # belongs_to :user + # + # def self.default_scope + # where(published: true) + # end + # end + # + # class User < ActiveRecord::Base + # has_many :posts + # end + # + # Post.all # Fires "SELECT * FROM posts WHERE published = true" + # Post.unscoped.all # Fires "SELECT * FROM posts" + # Post.where(published: false).unscoped.all # Fires "SELECT * FROM posts" + # User.find(1).posts # Fires "SELECT * FROM posts WHERE published = true AND posts.user_id = 1" + # User.find(1).posts.unscoped # Fires "SELECT * FROM posts" + # + # This method also accepts a block. All queries inside the block will + # not use the previously set scopes. + # + # Post.unscoped { + # Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10" + # } + # + # source://activerecord//lib/active_record/scoping/default.rb#50 + def unscoped(&block); end + + private + + # source://activerecord//lib/active_record/scoping/default.rb#145 + def build_default_scope(relation = T.unsafe(nil), all_queries: T.unsafe(nil)); end + + # Use this macro in your model to set a default scope for all operations on + # 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#129 + def default_scope(scope = T.unsafe(nil), all_queries: T.unsafe(nil), &block); end + + # The ignore_default_scope flag is used to prevent an infinite recursion + # situation where a default scope references a scope which has a default + # scope which references a scope... + # + # source://activerecord//lib/active_record/scoping/default.rb#192 + def evaluate_default_scope; end + + # If all_queries is nil, only execute on select and insert queries. + # + # If all_queries is true, check if the default_scope object has + # all_queries set, then execute on all queries; select, insert, update, + # delete, and reload. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/scoping/default.rb#177 + def execute_scope?(all_queries, default_scope_obj); end + + # source://activerecord//lib/active_record/scoping/default.rb#185 + def ignore_default_scope=(ignore); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/scoping/default.rb#181 + 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(all_queries: T.unsafe(nil)); 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#131 + 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_password.rb#4 +module ActiveRecord::SecurePassword + extend ::ActiveSupport::Concern + include ::ActiveModel::SecurePassword + + mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods + mixes_in_class_methods ::ActiveRecord::SecurePassword::ClassMethods +end + +# source://activerecord//lib/active_record/secure_password.rb#9 +module ActiveRecord::SecurePassword::ClassMethods + # Given a set of attributes, finds a record using the non-password + # attributes, and then authenticates that record using the password + # attributes. Returns the record if authentication succeeds; otherwise, + # returns +nil+. + # + # Regardless of whether a record is found, +authenticate_by+ will + # cryptographically digest the given password attributes. This behavior + # helps mitigate timing-based enumeration attacks, wherein an attacker can + # determine if a passworded record exists even without knowing the + # password. + # + # Raises an ArgumentError if the set of attributes doesn't contain at + # least one password and one non-password attribute. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # has_secure_password + # end + # + # User.create(name: "John Doe", email: "jdoe@example.com", password: "abc123") + # + # User.authenticate_by(email: "jdoe@example.com", password: "abc123").name # => "John Doe" (in 373.4ms) + # User.authenticate_by(email: "jdoe@example.com", password: "wrong") # => nil (in 373.9ms) + # User.authenticate_by(email: "wrong@example.com", password: "abc123") # => nil (in 373.6ms) + # + # User.authenticate_by(email: "jdoe@example.com", password: nil) # => nil (no queries executed) + # User.authenticate_by(email: "jdoe@example.com", password: "") # => nil (no queries executed) + # + # User.authenticate_by(email: "jdoe@example.com") # => ArgumentError + # User.authenticate_by(password: "abc123") # => ArgumentError + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/secure_password.rb#41 + def authenticate_by(attributes); end +end + +# source://activerecord//lib/active_record/secure_token.rb#4 +module ActiveRecord::SecureToken + extend ::ActiveSupport::Concern + + 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#61 + 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.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. + # + # === Options + # + # [:length] + # Length of the Secure Random, with a minimum of 24 characters. It will + # default to 24. + # + # [:on] + # The callback when the value is generated. When called with on: + # :initialize, the value is generated in an + # after_initialize callback, otherwise the value will be used + # in a before_ callback. When not specified, +:on+ will use the value of + # config.active_record.generate_secure_token_on, which defaults to +:initialize+ + # starting in \Rails 7.1. + # + # source://activerecord//lib/active_record/secure_token.rb#46 + def has_secure_token(attribute = T.unsafe(nil), length: T.unsafe(nil), on: T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/secure_token.rb#7 +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. +# +# This is a subclass of TransactionRollbackError, please make sure to check +# its documentation to be aware of its caveats. +# +# source://activerecord//lib/active_record/errors.rb#544 +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. + # However, as with any message signed with a +ActiveSupport::MessageVerifier+, + # {the signed id is not encrypted}[link:classes/ActiveSupport/MessageVerifier.html#class-ActiveSupport::MessageVerifier-label-Signing+is+not+encryption]. + # It's just encoded and protected against tampering. + # + # This means that the ID can be decoded by anyone; however, if tampered with (so to point to a different ID), + # the cryptographic signature will no longer match, and the signed id will be considered invalid and return nil + # when passed to +find_signed+ (or raise with +find_signed!+). + # + # 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. + # + # @raise [ArgumentError] + # + # source://activerecord//lib/active_record/signed_id.rb#131 + def signed_id(expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), purpose: T.unsafe(nil)); end + + module GeneratedClassMethods + def signed_id_verifier_secret; end + 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#26 +module ActiveRecord::SignedId::ClassMethods + # source://activerecord//lib/active_record/signed_id.rb#102 + 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.first.signed_id expires_in: 15.minutes, purpose: :password_reset + # + # User.find_signed signed_id # => nil, since the purpose does not match + # + # travel 16.minutes + # User.find_signed signed_id, purpose: :password_reset # => nil, since the signed id has expired + # + # travel_back + # User.find_signed signed_id, purpose: :password_reset # => User.first + # + # @raise [UnknownPrimaryKey] + # + # source://activerecord//lib/active_record/signed_id.rb#52 + 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.find_signed! "bad data" # => ActiveSupport::MessageVerifier::InvalidSignature + # + # signed_id = User.first.signed_id + # User.first.destroy + # User.find_signed! signed_id # => ActiveRecord::RecordNotFound + # + # source://activerecord//lib/active_record/signed_id.rb#72 + 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#81 + 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#97 + def signed_id_verifier=(verifier); end +end + +# source://activerecord//lib/active_record/signed_id.rb#16 +module ActiveRecord::SignedId::RelationMethods + # source://activerecord//lib/active_record/signed_id.rb#17 + def find_signed(*_arg0, **_arg1, &_arg2); end + + # source://activerecord//lib/active_record/signed_id.rb#21 + def find_signed!(*_arg0, **_arg1, &_arg2); end +end + +# Raised when Active Record finds multiple records but only expected one. +# +# source://activerecord//lib/active_record/errors.rb#192 +class ActiveRecord::SoleRecordExceeded < ::ActiveRecord::ActiveRecordError + # @return [SoleRecordExceeded] a new instance of SoleRecordExceeded + # + # source://activerecord//lib/active_record/errors.rb#195 + def initialize(record = T.unsafe(nil)); end + + # Returns the value of attribute record. + # + # source://activerecord//lib/active_record/errors.rb#193 + 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#59 + 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. + # + # For conditions that exist in both relations, those from other will take precedence. + # To find the intersection of two relations, use QueryMethods#and. + # + # source://activerecord//lib/active_record/relation/spawn_methods.rb#33 + def merge(other, *rest); end + + # source://activerecord//lib/active_record/relation/spawn_methods.rb#43 + 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#67 + def only(*onlies); end + + # source://activerecord//lib/active_record/relation/spawn_methods.rb#9 + def spawn; end + + private + + # source://activerecord//lib/active_record/relation/spawn_methods.rb#72 + 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#371 +class ActiveRecord::StaleObjectError < ::ActiveRecord::ActiveRecordError + # @return [StaleObjectError] a new instance of StaleObjectError + # + # source://activerecord//lib/active_record/errors.rb#374 + 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#372 + def attempted_action; end + + # Returns the value of attribute record. + # + # source://activerecord//lib/active_record/errors.rb#372 + 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(ClothingItem.lease_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([], ClothingItem.lease_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(ClothingItem.lease_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"], ClothingItem.lease_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, model); end + + # source://activerecord//lib/active_record/statement_cache.rb#145 + def execute(params, connection, allow_retry: T.unsafe(nil), async: T.unsafe(nil), &block); 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#158 + 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 + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/active_record/statement_cache.rb#65 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord//lib/active_record/statement_cache.rb#65 + def retryable=(_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#204 +class ActiveRecord::StatementInvalid < ::ActiveRecord::AdapterError + # @return [StatementInvalid] a new instance of StatementInvalid + # + # source://activerecord//lib/active_record/errors.rb#205 + def initialize(message = T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), connection_pool: T.unsafe(nil)); end + + # Returns the value of attribute binds. + # + # source://activerecord//lib/active_record/errors.rb#211 + def binds; end + + # source://activerecord//lib/active_record/errors.rb#213 + def set_query(sql, binds); end + + # Returns the value of attribute sql. + # + # source://activerecord//lib/active_record/errors.rb#211 + def sql; end +end + +# StatementTimeout will be raised when statement timeout exceeded. +# +# source://activerecord//lib/active_record/errors.rb#569 +class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end + +# = Active Record \Store +# +# Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. +# It's like a simple key/value store baked into your record when you don't care about being able to +# query that store outside the context of a single record. +# +# 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+, MySQL 5.7+ +# +json+, or SQLite 3.38+ +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.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.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#96 +module ActiveRecord::Store + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::Store::ClassMethods + + private + + # source://activerecord//lib/active_record/store.rb#209 + def read_store_attribute(store_attribute, key); end + + # source://activerecord//lib/active_record/store.rb#219 + def store_accessor_for(store_attribute); end + + # source://activerecord//lib/active_record/store.rb#214 + def write_store_attribute(store_attribute, key, value); end +end + +# source://activerecord//lib/active_record/store.rb#105 +module ActiveRecord::Store::ClassMethods + # source://activerecord//lib/active_record/store.rb#191 + def _store_accessors_module; end + + # source://activerecord//lib/active_record/store.rb#106 + def store(store_attribute, options = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/store.rb#112 + def store_accessor(store_attribute, *keys, prefix: T.unsafe(nil), suffix: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/store.rb#199 + def stored_attributes; end +end + +# source://activerecord//lib/active_record/store.rb#227 +class ActiveRecord::Store::HashAccessor + class << self + # source://activerecord//lib/active_record/store.rb#238 + def prepare(object, attribute); end + + # source://activerecord//lib/active_record/store.rb#228 + def read(object, attribute, key); end + + # source://activerecord//lib/active_record/store.rb#233 + def write(object, attribute, key, value); end + end +end + +# source://activerecord//lib/active_record/store.rb#264 +class ActiveRecord::Store::IndifferentCoder + # @return [IndifferentCoder] a new instance of IndifferentCoder + # + # source://activerecord//lib/active_record/store.rb#265 + def initialize(attr_name, coder_or_class_name); end + + # source://activerecord//lib/active_record/store.rb#274 + def dump(obj); end + + # source://activerecord//lib/active_record/store.rb#278 + def load(yaml); end + + private + + # source://activerecord//lib/active_record/store.rb#294 + def as_regular_hash(obj); end + + class << self + # source://activerecord//lib/active_record/store.rb#282 + def as_indifferent_hash(obj); end + end +end + +# source://activerecord//lib/active_record/store.rb#253 +class ActiveRecord::Store::IndifferentHashAccessor < ::ActiveRecord::Store::HashAccessor + class << self + # source://activerecord//lib/active_record/store.rb#254 + def prepare(object, store_attribute); end + end +end + +# source://activerecord//lib/active_record/store.rb#243 +class ActiveRecord::Store::StringKeyedHashAccessor < ::ActiveRecord::Store::HashAccessor + class << self + # source://activerecord//lib/active_record/store.rb#244 + def read(object, attribute, key); end + + # source://activerecord//lib/active_record/store.rb#248 + def write(object, attribute, key, value); end + end +end + +# Raised on attempt to lazily load records that are marked as strict loading. +# +# You can resolve this error by eager loading marked records before accessing +# them. The +# {Eager Loading Associations}[https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations] +# guide covers solutions, such as using +# {ActiveRecord::Base.includes}[rdoc-ref:QueryMethods#includes]. +# +# source://activerecord//lib/active_record/errors.rb#404 +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 + +# = Active Record \Suppressor +# +# 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#32 +module ActiveRecord::Suppressor + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::Suppressor::ClassMethods + + # source://activerecord//lib/active_record/suppressor.rb#51 + def save(**_arg0); end + + # source://activerecord//lib/active_record/suppressor.rb#55 + def save!(**_arg0); end + + class << self + # source://activerecord//lib/active_record/suppressor.rb#36 + def registry; end + end +end + +# source://activerecord//lib/active_record/suppressor.rb#41 +module ActiveRecord::Suppressor::ClassMethods + # source://activerecord//lib/active_record/suppressor.rb#42 + 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#65 + def aggregated_with?(aggregation_name); end + + # Returns the value of attribute arel_table. + # + # source://activerecord//lib/active_record/table_metadata.rb#80 + 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 + + # source://activerecord//lib/active_record/table_metadata.rb#5 + def join_primary_type(*_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#57 + def polymorphic_name_association; end + + # source://activerecord//lib/active_record/table_metadata.rb#70 + def predicate_builder; end + + # source://activerecord//lib/active_record/table_metadata.rb#13 + def primary_key; end + + # source://activerecord//lib/active_record/table_metadata.rb#65 + def reflect_on_aggregation(aggregation_name); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/table_metadata.rb#61 + 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#83 + def klass; end + + # Returns the value of attribute reflection. + # + # source://activerecord//lib/active_record/table_metadata.rb#83 + 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#173 +module ActiveRecord::Tasks + extend ::ActiveSupport::Autoload +end + +# source://activerecord//lib/active_record/tasks/database_tasks.rb#7 +class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end + +# = Active Record \DatabaseTasks +# +# ActiveRecord::Tasks::DatabaseTasks is a utility class, which encapsulates +# logic behind common tasks used to manage database and migrations. +# +# The tasks defined here are used with \Rails commands provided by Active Record. +# +# 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#40 +module ActiveRecord::Tasks::DatabaseTasks + extend ::ActiveRecord::Tasks::DatabaseTasks + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#449 + def cache_dump_filename(db_config_or_name, schema_cache_path: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#313 + def charset(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#308 + def charset_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#65 + def check_protected_environments!(environment = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#479 + def check_schema_file(filename); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#298 + def check_target_version; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#505 + def clear_schema_cache(filename); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#323 + def collation(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#318 + def collation_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#115 + def create(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#127 + def create_all; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#170 + def create_current(environment = T.unsafe(nil), name = T.unsafe(nil)); end + + # Returns the value of attribute database_configuration. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#61 + def database_configuration; end + + # Sets the attribute database_configuration + # + # @param value the value to set the attribute database_configuration to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#61 + def database_configuration=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#266 + def db_configs_with_versions(environment = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#83 + def db_dir; end + + # Sets the attribute db_dir + # + # @param value the value to set the attribute db_dir to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def db_dir=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#210 + def drop(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#222 + def drop_all; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#226 + def drop_current(environment = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#412 + 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.lease_connection, "tmp/schema_dump.yaml") + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#501 + def dump_schema_cache(conn_or_pool, filename); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#103 + def env; end + + # Sets the attribute env + # + # @param value the value to set the attribute env to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def env=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#91 + def fixtures_path; end + + # Sets the attribute fixtures_path + # + # @param value the value to set the attribute fixtures_path to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def fixtures_path=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#141 + def for_each(databases); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#357 + def load_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#471 + 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#487 + def load_seed; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#243 + def migrate(version = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#283 + def migrate_status; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#526 + def migration_class; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#530 + def migration_connection; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#534 + def migration_connection_pool; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#87 + def migrations_paths; end + + # Sets the attribute migrations_paths + # + # @param value the value to set the attribute migrations_paths to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def migrations_paths=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#107 + def name; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#176 + def prepare_all; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#328 + def purge(configuration); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#333 + def purge_all; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#337 + def purge_current(environment = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#156 + def raise_for_multi_db(environment = T.unsafe(nil), command:); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#394 + def reconstruct_from_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#73 + def register_task(pattern, task); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#99 + def root; end + + # Sets the attribute root + # + # @param value the value to set the attribute root to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def root=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#436 + def schema_dump_path(db_config, format = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#378 + def schema_up_to_date?(configuration, format = T.unsafe(nil), file = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#111 + def seed_loader; end + + # Sets the attribute seed_loader + # + # @param value the value to set the attribute seed_loader to. + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#60 + def seed_loader=(_arg0); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#135 + def setup_initial_database_yaml; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#343 + def structure_dump(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#350 + def structure_load(configuration, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#304 + def target_version; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#237 + def truncate_all(environment = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#520 + def with_temporary_connection(db_config, clobber: T.unsafe(nil), &block); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#509 + def with_temporary_pool_for_each(env: T.unsafe(nil), name: T.unsafe(nil), clobber: T.unsafe(nil), &block); end + + private + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#643 + def check_current_protected_environment!(db_config); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#582 + def class_for_adapter(adapter); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#559 + 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#574 + def database_adapter_for(db_config, *arguments); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#590 + def each_current_configuration(environment, name = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#600 + def each_current_environment(environment, &block); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#606 + def each_local_configuration; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#660 + def initialize_database(db_config); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#618 + def local_database?(db_config); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#563 + def resolve_configuration(configuration); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#539 + def schema_cache_env; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#623 + def schema_sha1(file); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#627 + def structure_dump_flags_for(adapter); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#635 + def structure_load_flags_for(adapter); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#230 + def truncate_tables(db_config); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/database_tasks.rb#567 + def verbose?; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#550 + def with_temporary_pool(db_config, clobber: T.unsafe(nil)); end + + class << self + # source://activerecord//lib/active_record/tasks/database_tasks.rb#50 + def structure_dump_flags; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#50 + def structure_dump_flags=(val); end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#56 + def structure_load_flags; end + + # source://activerecord//lib/active_record/tasks/database_tasks.rb#56 + def structure_load_flags=(val); end + end +end + +# source://activerecord//lib/active_record/tasks/database_tasks.rb#63 +ActiveRecord::Tasks::DatabaseTasks::LOCAL_HOSTS = T.let(T.unsafe(nil), Array) + +# source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#5 +class ActiveRecord::Tasks::MySQLDatabaseTasks + # @return [MySQLDatabaseTasks] a new instance of MySQLDatabaseTasks + # + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#10 + def initialize(db_config); end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#32 + def charset; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#36 + def collation; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#15 + def create; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#21 + def drop; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#26 + def purge; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#40 + def structure_dump(filename, extra_flags); end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#59 + 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#69 + def configuration_hash; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#79 + def configuration_hash_without_database; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#71 + def connection; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#83 + def creation_options; end + + # Returns the value of attribute db_config. + # + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#69 + def db_config; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#75 + def establish_connection(config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#90 + def prepare_command_options; end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#109 + def run_cmd(cmd, args, action); end + + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#113 + def run_cmd_error(cmd, args, action); end + + class << self + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/mysql_database_tasks.rb#6 + def using_database_configurations?; end + end +end + +# 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#16 + def initialize(db_config); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#32 + def charset; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#36 + def collation; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#21 + def create(connection_already_established = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#27 + def drop; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#40 + def purge; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#46 + def structure_dump(filename, extra_flags); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#80 + def structure_load(filename, extra_flags); end + + private + + # Returns the value of attribute configuration_hash. + # + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#88 + def configuration_hash; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#90 + def connection; end + + # Returns the value of attribute db_config. + # + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#88 + def db_config; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#98 + def encoding; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#94 + def establish_connection(config = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#106 + def psql_env; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#102 + def public_schema_config; end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#130 + def remove_sql_header_comments(filename); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#119 + def run_cmd(cmd, args, action); end + + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#123 + def run_cmd_error(cmd, args, action); end + + class << self + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/postgresql_database_tasks.rb#12 + 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#10 + def initialize(db_config, root = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#40 + def charset; end + + # @raise [DatabaseAlreadyExists] + # + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#15 + def create; end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#22 + def drop; end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#31 + def purge; end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#44 + def structure_dump(filename, extra_flags); end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#60 + def structure_load(filename, extra_flags); end + + private + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#68 + def connection; end + + # Returns the value of attribute db_config. + # + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#66 + def db_config; end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#72 + def establish_connection(config = T.unsafe(nil)); end + + # Returns the value of attribute root. + # + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#66 + def root; end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#77 + def run_cmd(cmd, args, out); end + + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#81 + def run_cmd_error(cmd, args); end + + class << self + # @return [Boolean] + # + # source://activerecord//lib/active_record/tasks/sqlite_database_tasks.rb#6 + 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 + + # Generic fixture accessor for fixture names that may conflict with other methods. + # + # assert_equal "Ruby on Rails", web_sites(:rubyonrails).name + # assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name + # + # source://activerecord//lib/active_record/test_fixtures.rb#103 + def fixture(fixture_set_name, *fixture_names); end + + private + + # source://activerecord//lib/active_record/test_fixtures.rb#300 + def access_fixture(fs_name, *fixture_names); end + + # source://activerecord//lib/active_record/test_fixtures.rb#292 + def active_record_fixture(fixture_set_name, *fixture_names); end + + # source://activerecord//lib/active_record/test_fixtures.rb#260 + def instantiate_fixtures; end + + # source://activerecord//lib/active_record/test_fixtures.rb#168 + def invalidate_already_loaded_fixtures; end + + # source://activerecord//lib/active_record/test_fixtures.rb#256 + def load_fixtures(config); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/test_fixtures.rb#272 + def load_instances?; end + + # source://activerecord//lib/active_record/test_fixtures.rb#276 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/test_fixtures.rb#284 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/test_fixtures.rb#108 + def run_in_transaction?; end + + # source://activerecord//lib/active_record/test_fixtures.rb#160 + def setup_asynchronous_queries_session; end + + # source://activerecord//lib/active_record/test_fixtures.rb#113 + def setup_fixtures(config = T.unsafe(nil)); 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#220 + def setup_shared_connection_pool; end + + # source://activerecord//lib/active_record/test_fixtures.rb#172 + def setup_transactional_fixtures; end + + # source://activerecord//lib/active_record/test_fixtures.rb#164 + def teardown_asynchronous_queries_session; end + + # source://activerecord//lib/active_record/test_fixtures.rb#146 + def teardown_fixtures; end + + # source://activerecord//lib/active_record/test_fixtures.rb#239 + def teardown_shared_connection_pool; end + + # source://activerecord//lib/active_record/test_fixtures.rb#202 + def teardown_transactional_fixtures; end + + module GeneratedClassMethods + def fixture_class_names; end + def fixture_class_names=(value); end + def fixture_class_names?; end + def fixture_paths; end + def fixture_paths=(value); end + def fixture_paths?; end + def fixture_sets; end + def fixture_sets=(value); end + def fixture_sets?; end + def fixture_table_names; end + def fixture_table_names=(value); end + def fixture_table_names?; end + 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_paths; end + def fixture_paths?; end + def fixture_sets; end + def fixture_sets=(value); end + def fixture_sets?; end + def fixture_table_names; end + def fixture_table_names=(value); end + def fixture_table_names?; end + 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#43 +module ActiveRecord::TestFixtures::ClassMethods + # source://activerecord//lib/active_record/test_fixtures.rb#56 + 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#52 + def set_fixture_class(class_names = T.unsafe(nil)); end + + # source://activerecord//lib/active_record/test_fixtures.rb#72 + 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#88 + def uses_transaction(*methods); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/test_fixtures.rb#93 + def uses_transaction?(method); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#177 +class ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ActiveRecordError + # @return [ThroughCantAssociateThroughHasOneOrManyReflection] a new instance of ThroughCantAssociateThroughHasOneOrManyReflection + # + # source://activerecord//lib/active_record/associations/errors.rb#178 + def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/associations/errors.rb#224 +class ActiveRecord::ThroughNestedAssociationsAreReadonly < ::ActiveRecord::ActiveRecordError + # @return [ThroughNestedAssociationsAreReadonly] a new instance of ThroughNestedAssociationsAreReadonly + # + # source://activerecord//lib/active_record/associations/errors.rb#225 + 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#107 + def _create_record; end + + # source://activerecord//lib/active_record/timestamp.rb#119 + def _update_record; end + + # source://activerecord//lib/active_record/timestamp.rb#155 + def all_timestamp_attributes_in_model; end + + # Clear attributes and changed_attributes + # + # source://activerecord//lib/active_record/timestamp.rb#170 + def clear_timestamp_attributes; end + + # source://activerecord//lib/active_record/timestamp.rb#125 + def create_or_update(touch: T.unsafe(nil), **_arg1); end + + # source://activerecord//lib/active_record/timestamp.rb#159 + def current_time_from_proper_timezone; end + + # source://activerecord//lib/active_record/timestamp.rb#102 + def init_internals; end + + # source://activerecord//lib/active_record/timestamp.rb#50 + def initialize_dup(other); end + + # source://activerecord//lib/active_record/timestamp.rb#163 + def max_updated_column_timestamp; end + + # source://activerecord//lib/active_record/timestamp.rb#130 + def record_update_timestamps; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/timestamp.rb#143 + def should_record_timestamps?; end + + # source://activerecord//lib/active_record/timestamp.rb#147 + def timestamp_attributes_for_create_in_model; end + + # source://activerecord//lib/active_record/timestamp.rb#151 + 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#74 + def all_timestamp_attributes_in_model; end + + # source://activerecord//lib/active_record/timestamp.rb#79 + def current_time_from_proper_timezone; end + + # source://activerecord//lib/active_record/timestamp.rb#64 + def timestamp_attributes_for_create_in_model; end + + # source://activerecord//lib/active_record/timestamp.rb#69 + 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 + + protected + + # source://activerecord//lib/active_record/timestamp.rb#84 + def reload_schema_from_cache(recursive = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/timestamp.rb#92 + def timestamp_attributes_for_create; end + + # source://activerecord//lib/active_record/timestamp.rb#96 + def timestamp_attributes_for_update; end +end + +# source://activerecord//lib/active_record/token_for.rb#6 +module ActiveRecord::TokenFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveRecord::TokenFor::ClassMethods + + # Generates a token for a predefined +purpose+. + # + # Use ClassMethods#generates_token_for to define a token purpose and + # behavior. + # + # source://activerecord//lib/active_record/token_for.rb#119 + def generate_token_for(purpose); end + + module GeneratedClassMethods + def generated_token_verifier; end + def generated_token_verifier=(value); end + def token_definitions; end + def token_definitions=(value); end + end + + module GeneratedInstanceMethods; end +end + +# source://activerecord//lib/active_record/token_for.rb#56 +module ActiveRecord::TokenFor::ClassMethods + # source://activerecord//lib/active_record/token_for.rb#106 + def find_by_token_for(purpose, token); end + + # source://activerecord//lib/active_record/token_for.rb#110 + def find_by_token_for!(purpose, token); end + + # Defines the behavior of tokens generated for a specific +purpose+. + # A token can be generated by calling TokenFor#generate_token_for on a + # record. Later, that record can be fetched by calling #find_by_token_for + # (or #find_by_token_for!) with the same purpose and token. + # + # Tokens are signed so that they are tamper-proof. Thus they can be + # exposed to outside world as, for example, password reset tokens. + # + # By default, tokens do not expire. They can be configured to expire by + # specifying a duration via the +expires_in+ option. The duration becomes + # part of the token's signature, so changing the value of +expires_in+ + # will automatically invalidate previously generated tokens. + # + # A block may also be specified. When generating a token with + # TokenFor#generate_token_for, the block will be evaluated in the context + # of the record, and its return value will be embedded in the token as + # JSON. Later, when fetching the record with #find_by_token_for, the block + # will be evaluated again in the context of the fetched record. If the two + # JSON values do not match, the token will be treated as invalid. Note + # that the value returned by the block should not contain sensitive + # information because it will be embedded in the token as + # human-readable plaintext JSON. + # + # ==== Examples + # + # class User < ActiveRecord::Base + # has_secure_password + # + # generates_token_for :password_reset, expires_in: 15.minutes do + # # Last 10 characters of password salt, which changes when password is updated: + # password_salt&.last(10) + # end + # end + # + # user = User.first + # + # token = user.generate_token_for(:password_reset) + # User.find_by_token_for(:password_reset, token) # => user + # # 16 minutes later... + # User.find_by_token_for(:password_reset, token) # => nil + # + # token = user.generate_token_for(:password_reset) + # User.find_by_token_for(:password_reset, token) # => user + # user.update!(password: "new password") + # User.find_by_token_for(:password_reset, token) # => nil + # + # source://activerecord//lib/active_record/token_for.rb#102 + def generates_token_for(purpose, expires_in: T.unsafe(nil), &block); end +end + +# source://activerecord//lib/active_record/token_for.rb#38 +module ActiveRecord::TokenFor::RelationMethods + # Finds a record using a given +token+ for a predefined +purpose+. Returns + # +nil+ if the token is invalid or the record was not found. + # + # @raise [UnknownPrimaryKey] + # + # source://activerecord//lib/active_record/token_for.rb#41 + def find_by_token_for(purpose, token); end + + # Finds a record using a given +token+ for a predefined +purpose+. Raises + # ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid + # (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if + # the token is valid but the record was not found. + # + # source://activerecord//lib/active_record/token_for.rb#50 + def find_by_token_for!(purpose, token); end +end + +# source://activerecord//lib/active_record/token_for.rb#14 +class ActiveRecord::TokenFor::TokenDefinition < ::Struct + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute defining_class + # + # @return [Object] the current value of defining_class + def defining_class; end + + # Sets the attribute defining_class + # + # @param value [Object] the value to set the attribute defining_class to. + # @return [Object] the newly set value + def defining_class=(_); end + + # Returns the value of attribute expires_in + # + # @return [Object] the current value of expires_in + def expires_in; end + + # Sets the attribute expires_in + # + # @param value [Object] the value to set the attribute expires_in to. + # @return [Object] the newly set value + def expires_in=(_); end + + # source://activerecord//lib/active_record/token_for.rb#15 + def full_purpose; end + + # source://activerecord//lib/active_record/token_for.rb#27 + def generate_token(model); end + + # source://activerecord//lib/active_record/token_for.rb#19 + def message_verifier; end + + # source://activerecord//lib/active_record/token_for.rb#23 + def payload_for(model); end + + # Returns the value of attribute purpose + # + # @return [Object] the current value of purpose + def purpose; end + + # Sets the attribute purpose + # + # @param value [Object] the value to set the attribute purpose to. + # @return [Object] the newly set value + def purpose=(_); end + + # source://activerecord//lib/active_record/token_for.rb#31 + def resolve_token(token); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# = Active Record Touch Later +# +# source://activerecord//lib/active_record/touch_later.rb#5 +module ActiveRecord::TouchLater + # source://activerecord//lib/active_record/touch_later.rb#6 + def before_committed!; end + + # source://activerecord//lib/active_record/touch_later.rb#38 + def touch(*names, time: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/touch_later.rb#11 + def touch_later(*names); end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/touch_later.rb#66 + def has_defer_touch_attrs?; end + + # source://activerecord//lib/active_record/touch_later.rb#49 + def init_internals; end + + # source://activerecord//lib/active_record/touch_later.rb#54 + def surreptitiously_touch(attr_names); end + + # source://activerecord//lib/active_record/touch_later.rb#61 + def touch_deferred_attributes; end +end + +# Class specifies the interface to interact with the current transaction state. +# +# It can either map to an actual transaction/savepoint, or represent the +# absence of a transaction. +# +# == State +# +# We say that a transaction is _finalized_ when it wraps a real transaction +# that has been either committed or rolled back. +# +# A transaction is _open_ if it wraps a real transaction that is not finalized. +# +# On the other hand, a transaction is _closed_ when it is not open. That is, +# when it represents absence of transaction, or it wraps a real but finalized +# one. +# +# You can check whether a transaction is open or closed with the +open?+ and +# +closed?+ predicates: +# +# if Article.current_transaction.open? +# # We are inside a real and not finalized transaction. +# end +# +# Closed transactions are `blank?` too. +# +# == Callbacks +# +# After updating the database state, you may sometimes need to perform some extra work, or reflect these +# changes in a remote system like clearing or updating a cache: +# +# def publish_article(article) +# article.update!(published: true) +# NotificationService.article_published(article) +# end +# +# The above code works but has one important flaw, which is that it no longer works properly if called inside +# a transaction, as it will interact with the remote system before the changes are persisted: +# +# Article.transaction do +# article = create_article(article) +# publish_article(article) +# end +# +# The callbacks offered by ActiveRecord::Transaction allow to rewriting this method in a way that is compatible +# with transactions: +# +# def publish_article(article) +# article.update!(published: true) +# Article.current_transaction.after_commit do +# NotificationService.article_published(article) +# end +# end +# +# In the above example, if +publish_article+ is called inside a transaction, the callback will be invoked +# after the transaction is successfully committed, and if called outside a transaction, the callback will be invoked +# immediately. +# +# == Caveats +# +# When using after_commit callbacks, it is important to note that if the callback raises an error, the transaction +# won't be rolled back as it was already committed. Relying solely on these to synchronize state between multiple +# systems may lead to consistency issues. +# +# source://activerecord//lib/active_record/transaction.rb#68 +class ActiveRecord::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://activerecord//lib/active_record/transaction.rb#69 + def initialize(internal_transaction); end + + # Registers a block to be called after the transaction is fully committed. + # + # If there is no currently open transactions, the block is called + # immediately, unless the transaction is finalized, in which case attempting + # to register the callback raises ActiveRecord::ActiveRecordError. + # + # If the transaction has a parent transaction, the callback is transferred to + # the parent when the current transaction commits, or dropped when the current transaction + # is rolled back. This operation is repeated until the outermost transaction is reached. + # + # If the callback raises an error, the transaction remains committed. + # + # source://activerecord//lib/active_record/transaction.rb#85 + def after_commit(&block); end + + # Registers a block to be called after the transaction is rolled back. + # + # If there is no currently open transactions, the block is not called. But + # if the transaction is finalized, attempting to register the callback + # raises ActiveRecord::ActiveRecordError. + # + # If the transaction is successfully committed but has a parent + # transaction, the callback is automatically added to the parent transaction. + # + # If the entire chain of nested transactions are all successfully committed, + # the block is never called. + # + # If the transaction is already finalized, attempting to register a callback + # will raise ActiveRecord::ActiveRecordError. + # + # source://activerecord//lib/active_record/transaction.rb#107 + def after_rollback(&block); end + + # Returns true if the transaction doesn't exist or is finalized. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/transaction.rb#117 + def blank?; end + + # Returns true if the transaction doesn't exist or is finalized. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/transaction.rb#117 + def closed?; end + + # Returns true if the transaction exists and isn't finalized yet. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/transaction.rb#112 + def open?; end + + # Returns a UUID for this transaction or +nil+ if no transaction is open. + # + # source://activerecord//lib/active_record/transaction.rb#124 + def uuid; end +end + +# source://activerecord//lib/active_record/transaction.rb#130 +ActiveRecord::Transaction::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::Transaction) + +# 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, trilogy, and postgresql adapters support setting the transaction isolation level. +# +# source://activerecord//lib/active_record/errors.rb#508 +class ActiveRecord::TransactionIsolationError < ::ActiveRecord::ActiveRecordError; end + +# TransactionRollbackError will be raised when a transaction is rolled +# back by the database due to a serialization failure or a deadlock. +# +# These exceptions should not be generally rescued in nested transaction +# blocks, because they have side-effects in the actual enclosing transaction +# and internal Active Record state. They can be rescued if you are above the +# root transaction block, though. +# +# In that case, beware of transactional tests, however, because they run test +# cases in their own umbrella transaction. If you absolutely need to handle +# these exceptions in tests please consider disabling transactional tests in +# the affected test class (self.use_transactional_tests = false). +# +# Due to the aforementioned side-effects, this exception should not be raised +# manually by users. +# +# See the following: +# +# * https://www.postgresql.org/docs/current/static/transaction-iso.html +# * https://dev.mysql.com/doc/mysql-errors/en/server-error-reference.html#error_er_lock_deadlock +# +# source://activerecord//lib/active_record/errors.rb#531 +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#16 + def _new_record_before_last_commit; end + + # source://activerecord//lib/active_record/transactions.rb#16 + def _new_record_before_last_commit=(_arg0); end + + # source://activerecord//lib/active_record/transactions.rb#373 + 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#381 + def committed!(should_run_callbacks: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/transactions.rb#357 + 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#393 + def rolledback!(force_restore_state: T.unsafe(nil), should_run_callbacks: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/transactions.rb#361 + def save(**_arg0); end + + # source://activerecord//lib/active_record/transactions.rb#365 + def save!(**_arg0); end + + # source://activerecord//lib/active_record/transactions.rb#369 + def touch(*_arg0, **_arg1); end + + # See ActiveRecord::Transactions::ClassMethods for detailed documentation. + # + # source://activerecord//lib/active_record/transactions.rb#353 + def transaction(**options, &block); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/transactions.rb#425 + def trigger_transactional_callbacks?; end + + # Executes a block within a transaction and captures its return value as a + # status flag. If the status is true, the transaction is committed, + # otherwise a ROLLBACK is issued. In any case, the status flag is returned. + # + # This method is available within the context of an ActiveRecord::Base + # instance. + # + # source://activerecord//lib/active_record/transactions.rb#409 + def with_transaction_returning_status; end + + private + + # Returns the value of attribute _committed_already_called. + # + # source://activerecord//lib/active_record/transactions.rb#431 + def _committed_already_called; end + + # Returns the value of attribute _trigger_destroy_callback. + # + # source://activerecord//lib/active_record/transactions.rb#431 + def _trigger_destroy_callback; end + + # Returns the value of attribute _trigger_update_callback. + # + # source://activerecord//lib/active_record/transactions.rb#431 + 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#513 + 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#461 + def clear_transaction_record_state; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/transactions.rb#519 + def has_transactional_callbacks?; end + + # source://activerecord//lib/active_record/transactions.rb#433 + def init_internals; end + + # Save the new record state and id of a record so it can be restored later if a transaction fails. + # + # source://activerecord//lib/active_record/transactions.rb#441 + 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#468 + 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#498 + 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. Any +# other exception will be re-raised. +# +# *Warning*: one should not catch ActiveRecord::StatementInvalid exceptions +# inside a transaction block. ActiveRecord::StatementInvalid exceptions indicate that an +# 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.transaction do +# User.create(username: 'Kotori') +# User.transaction do +# 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.transaction do +# User.create(username: 'Kotori') +# User.transaction(requires_new: true) do +# 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. +# +# ==== NOTE: Callbacks are deduplicated per callback by filter. +# +# Trying to define multiple callbacks with the same filter will result in a single callback being run. +# +# For example: +# +# after_commit :do_something +# after_commit :do_something # only the last one will be called +# +# This applies to all variations of after_*_commit callbacks as well. +# +# after_commit :do_something +# after_create_commit :do_something +# after_save_commit :do_something +# +# It is recommended to use the +on:+ option to specify when the callback should be run. +# +# after_commit :do_something, on: [:create, :update] +# +# This is equivalent to using +after_create_commit+ and +after_update_commit+, but will not be deduplicated. +# +# === 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.lease_connection.transaction do # BEGIN +# Model.lease_connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 +# Model.lease_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#230 +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#266 + def after_commit(*args, &block); end + + # Shortcut for after_commit :hook, on: :create. + # + # source://activerecord//lib/active_record/transactions.rb#278 + def after_create_commit(*args, &block); end + + # Shortcut for after_commit :hook, on: :destroy. + # + # source://activerecord//lib/active_record/transactions.rb#290 + 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#298 + def after_rollback(*args, &block); end + + # Shortcut for after_commit :hook, on: [ :create, :update ]. + # + # source://activerecord//lib/active_record/transactions.rb#272 + def after_save_commit(*args, &block); end + + # Shortcut for after_commit :hook, on: :update. + # + # source://activerecord//lib/active_record/transactions.rb#284 + def after_update_commit(*args, &block); end + + # source://activerecord//lib/active_record/transactions.rb#249 + def before_commit(*args, &block); end + + # Returns a representation of the current transaction state, + # which can be a top level transaction, a savepoint, or the absence of a transaction. + # + # An object is always returned, whether or not a transaction is currently active. + # To check if a transaction was opened, use current_transaction.open?. + # + # See the ActiveRecord::Transaction documentation for detailed behavior. + # + # source://activerecord//lib/active_record/transactions.rb#245 + def current_transaction; end + + # Similar to ActiveSupport::Callbacks::ClassMethods#set_callback, but with + # support for options available on #after_commit and #after_rollback callbacks. + # + # source://activerecord//lib/active_record/transactions.rb#305 + def set_callback(name, *filter_list, &block); end + + # See the ConnectionAdapters::DatabaseStatements#transaction API docs. + # + # source://activerecord//lib/active_record/transactions.rb#232 + def transaction(**options, &block); end + + private + + # source://activerecord//lib/active_record/transactions.rb#345 + def assert_valid_transaction_action(actions); end + + # source://activerecord//lib/active_record/transactions.rb#323 + def prepend_option; end + + # source://activerecord//lib/active_record/transactions.rb#331 + def set_options_for_callbacks!(args, enforced_options = T.unsafe(nil)); end +end + +# source://activerecord//lib/active_record/translation.rb#4 +module ActiveRecord::Translation + # Set the i18n scope to override ActiveModel. + # + # source://activerecord//lib/active_record/translation.rb#18 + def i18n_scope; end + + # Set the lookup ancestors for ActiveModel. + # + # source://activerecord//lib/active_record/translation.rb#6 + 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#6 +class ActiveRecord::Type::AdapterSpecificRegistry + # @return [AdapterSpecificRegistry] a new instance of AdapterSpecificRegistry + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#7 + def initialize; end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#15 + def add_modifier(options, klass, **args); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#27 + def lookup(symbol, *args, **kwargs); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#19 + def register(type_name, klass = T.unsafe(nil), **options, &block); end + + private + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#40 + def find_registration(symbol, *args, **kwargs); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#11 + def initialize_copy(other); end + + # Returns the value of attribute registrations. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#38 + 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#110 +class ActiveRecord::Type::DecorationRegistration < ::ActiveRecord::Type::Registration + # @return [DecorationRegistration] a new instance of DecorationRegistration + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#111 + def initialize(options, klass, adapter: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#117 + def call(registry, *args, **kwargs); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#122 + def matches?(*args, **kwargs); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#126 + def priority; end + + private + + # Returns the value of attribute klass. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#131 + def klass; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#133 + def matches_options?(**kwargs); end + + # Returns the value of attribute options. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#131 + 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#7 + def initialize(timezone: T.unsafe(nil), **kwargs); end + + # source://activerecord//lib/active_record/type/internal/timezone.rb#16 + def default_timezone; end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/internal/timezone.rb#12 + 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#47 +class ActiveRecord::Type::Registration + # @return [Registration] a new instance of Registration + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#48 + def initialize(name, block, adapter: T.unsafe(nil), override: T.unsafe(nil)); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#63 + def <=>(other); end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#55 + def call(_registry, *args, adapter: T.unsafe(nil), **kwargs); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#59 + def matches?(type_name, *args, **kwargs); end + + protected + + # Returns the value of attribute adapter. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 + def adapter; end + + # Returns the value of attribute block. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 + def block; end + + # Returns the value of attribute name. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 + def name; end + + # Returns the value of attribute override. + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#73 + def override; end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#75 + def priority; end + + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#86 + def priority_except_adapter; end + + private + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#95 + def conflicts_with?(other); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#104 + def has_adapter_conflict?(other); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#91 + def matches_adapter?(adapter: T.unsafe(nil), **_arg1); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/adapter_specific_registry.rb#100 + 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#42 + def accessor; end + + # source://activerecord//lib/active_record/type/serialized.rb#46 + def assert_valid_value(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/serialized.rb#35 + 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#52 + def force_equality?(value); end + + def inspect; end + + # source://activerecord//lib/active_record/type/serialized.rb#26 + def serialize(value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/type/serialized.rb#56 + def serialized?; 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#61 + def default_value?(value); end + + # source://activerecord//lib/active_record/type/serialized.rb#65 + 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 + + # source://activerecord//lib/active_record/type/time.rb#20 + def serialize_cast_value(value); end + + private + + # source://activerecord//lib/active_record/type/time.rb#25 + 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 + + # 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#141 +class ActiveRecord::TypeConflictError < ::StandardError; end + +# Raised when unknown attributes are supplied via mass assignment. +# +# source://activerecord//lib/active_record/errors.rb#444 +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#605 +class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordError; end + +# source://activerecord//lib/active_record/migration.rb#112 +class ActiveRecord::UnknownMigrationVersionError < ::ActiveRecord::MigrationError + # @return [UnknownMigrationVersionError] a new instance of UnknownMigrationVersionError + # + # source://activerecord//lib/active_record/migration.rb#113 + 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#472 +class ActiveRecord::UnknownPrimaryKey < ::ActiveRecord::ActiveRecordError + # @return [UnknownPrimaryKey] a new instance of UnknownPrimaryKey + # + # source://activerecord//lib/active_record/errors.rb#475 + def initialize(model = T.unsafe(nil), description = T.unsafe(nil)); end + + # Returns the value of attribute model. + # + # source://activerecord//lib/active_record/errors.rb#473 + def model; 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::UnmodifiableRelation +# relation.limit!(5) # => ActiveRecord::UnmodifiableRelation +# +# source://activerecord//lib/active_record/errors.rb#498 +class ActiveRecord::UnmodifiableRelation < ::ActiveRecord::ActiveRecordError; 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. +# +# In Active Record, all validations are performed on save by default. +# Validations accept the :on argument to define the context where +# the validations are active. Active Record will pass either the context of +# :create or :update depending on whether the model is a +# {new_record?}[rdoc-ref:Persistence#new_record?]. +# +# source://activerecord//lib/active_record/validations.rb#40 +module ActiveRecord::Validations + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::Validations::ClassMethods + + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations.rb#77 + def custom_validation_context?; end + + # 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#47 + 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#53 + 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. + # If the argument is an array of contexts, post.valid?([:create, :update]), the validations are + # run within multiple contexts. + # + # \Validations with no :on option will run no matter the context. \Validations with + # some :on option will only run in the specified context. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations.rb#69 + 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. + # If the argument is an array of contexts, post.valid?([:create, :update]), the validations are + # run within multiple contexts. + # + # \Validations with no :on option will run no matter the context. \Validations with + # some :on option will only run in the specified context. + # + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations.rb#69 + def validate(context = T.unsafe(nil)); end + + private + + # source://activerecord//lib/active_record/validations.rb#82 + def default_validation_context; end + + # source://activerecord//lib/active_record/validations.rb#90 + def perform_validations(options = T.unsafe(nil)); end + + # @raise [RecordInvalid] + # + # source://activerecord//lib/active_record/validations.rb#86 + def raise_validation_error; 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 + + # source://activerecord//lib/active_record/validations/associated.rb#19 + def record_validation_context_for_association(record); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations/associated.rb#15 + def valid_object?(record, context); end +end + +# source://activerecord//lib/active_record/validations/associated.rb#24 +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 also considered not present if it is 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#60 + 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#31 + def validates_numericality_of(*attr_names); end + + # Validates that the specified attributes are not blank (as defined by + # Object#blank?). If the attribute is an association, the associated object + # is also considered blank if it is marked for destruction. + # + # class Person < ActiveRecord::Base + # has_one :face + # validates_presence_of :face + # end + # + # The face attribute must be in the object and it cannot be blank or marked + # for destruction. + # + # This validator defers to the Active Model validation for presence, adding the + # check to see that an associated object is not marked for destruction. This + # prevents the parent object from validating successfully and saving, which then + # deletes the associated object, thus putting the parent object into an invalid + # state. + # + # See ActiveModel::Validations::HelperMethods.validates_presence_of for + # more information. + # + # NOTE: This validation will not fail while using it with an association + # if the latter was assigned but not valid. If you want to ensure that + # it is both present and valid, you also need to use + # {validates_associated}[rdoc-ref:Validations::ClassMethods#validates_associated]. + # + # source://activerecord//lib/active_record/validations/presence.rb#40 + def validates_presence_of(*attr_names); end + + # Validates that the specified attributes match the length restrictions supplied. + # 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::TrilogyAdapter. + # * ActiveRecord::ConnectionAdapters::SQLite3Adapter. + # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter. + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#291 + 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#20 + def validate_each(record, attribute, value); end + + private + + # source://activerecord//lib/active_record/validations/uniqueness.rb#112 + def build_relation(klass, attribute, value); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#83 + def covered_by_unique_index?(klass, record, attribute, scope); end + + # The check for an existing value should be run from a class that + # isn't abstract. This means working down from the current class + # (self), to the first non-abstract class. + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#58 + def find_finder_class_for(record); end + + # source://activerecord//lib/active_record/validations/uniqueness.rb#147 + def map_enum_attribute(klass, attribute, value); end + + # source://activerecord//lib/active_record/validations/uniqueness.rb#98 + def resolve_attributes(record, attributes); end + + # source://activerecord//lib/active_record/validations/uniqueness.rb#134 + def scope_relation(record, relation); end + + # @return [Boolean] + # + # source://activerecord//lib/active_record/validations/uniqueness.rb#70 + def validation_needed?(klass, record, attribute); end +end + +# Raised when a record cannot be inserted or updated because a value too long for a column type. +# +# source://activerecord//lib/active_record/errors.rb#297 +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#225 +class ActiveRecord::WrappedDatabaseException < ::ActiveRecord::StatementInvalid; end + +# source://activerecord//lib/arel/errors.rb#3 +module Arel + class << self + # @return [Boolean] + # + # source://activerecord//lib/arel.rb#64 + def arel_node?(value); end + + # source://activerecord//lib/arel.rb#68 + 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. + # + # Take a look at the {security guide}[https://guides.rubyonrails.org/security.html#sql-injection] + # for more information. + # + # To construct a more complex query fragment, including the possible + # use of user-provided values, the +sql_string+ may contain ? and + # +:key+ placeholders, corresponding to the additional arguments. Note + # that this behavior only applies when bind value parameters are + # supplied in the call; without them, the placeholder tokens have no + # special meaning, and will be passed through to the query as-is. + # + # The +:retryable+ option can be used to mark the SQL as safe to retry. + # Use this option only if the SQL is idempotent, as it could be executed + # more than once. + # + # source://activerecord//lib/arel.rb#52 + def sql(sql_string, *positional_binds, retryable: T.unsafe(nil), **named_binds); end + + # source://activerecord//lib/arel.rb#60 + 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/errors.rb#10 +class Arel::BindError < ::Arel::ArelError + # @return [BindError] a new instance of BindError + # + # source://activerecord//lib/arel/errors.rb#11 + def initialize(message, sql = T.unsafe(nil)); end +end + +# source://activerecord//lib/arel/collectors/plain_string.rb#4 +module Arel::Collectors; end + +# 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#8 + def initialize; end + + # source://activerecord//lib/arel/collectors/bind.rb#12 + def <<(str); end + + # source://activerecord//lib/arel/collectors/bind.rb#16 + def add_bind(bind, &_arg1); end + + # source://activerecord//lib/arel/collectors/bind.rb#21 + def add_binds(binds, proc_for_binds = T.unsafe(nil)); end + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/arel/collectors/bind.rb#6 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord//lib/arel/collectors/bind.rb#6 + def retryable=(_arg0); end + + # source://activerecord//lib/arel/collectors/bind.rb#26 + 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#9 + def initialize(left, right); end + + # source://activerecord//lib/arel/collectors/composite.rb#20 + def <<(str); end + + # source://activerecord//lib/arel/collectors/composite.rb#26 + def add_bind(bind, &block); end + + # source://activerecord//lib/arel/collectors/composite.rb#32 + 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 + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/arel/collectors/composite.rb#7 + def retryable; end + + # source://activerecord//lib/arel/collectors/composite.rb#14 + def retryable=(retryable); end + + # source://activerecord//lib/arel/collectors/composite.rb#38 + def value; end + + private + + # Returns the value of attribute left. + # + # source://activerecord//lib/arel/collectors/composite.rb#43 + def left; end + + # Returns the value of attribute right. + # + # source://activerecord//lib/arel/collectors/composite.rb#43 + 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 + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/arel/collectors/sql_string.rb#8 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord//lib/arel/collectors/sql_string.rb#8 + def retryable=(_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 + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/arel/collectors/substitute_binds.rb#6 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord//lib/arel/collectors/substitute_binds.rb#6 + def retryable=(_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#49 + def cast(name, type); end + + # 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/nary.rb#36 +class Arel::Nodes::And < ::Arel::Nodes::Nary; end + +# source://activerecord//lib/arel/nodes/binary.rb#42 +class Arel::Nodes::As < ::Arel::Nodes::Binary + # source://activerecord//lib/arel/nodes/binary.rb#43 + def to_cte; end +end + +# source://activerecord//lib/arel/nodes/ascending.rb#5 +class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering + # @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#122 +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#48 +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/bound_sql_literal.rb#5 +class Arel::Nodes::BoundSqlLiteral < ::Arel::Nodes::NodeExpression + # @return [BoundSqlLiteral] a new instance of BoundSqlLiteral + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#8 + def initialize(sql_with_placeholders, positional_binds, named_binds); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#54 + def +(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#46 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#46 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#42 + def hash; end + + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#60 + def inspect; end + + # Returns the value of attribute named_binds. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def named_binds; end + + # Returns the value of attribute positional_binds. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def positional_binds; end + + # Returns the value of attribute sql_with_placeholders. + # + # source://activerecord//lib/arel/nodes/bound_sql_literal.rb#6 + def sql_with_placeholders; end +end + +# source://activerecord//lib/arel/nodes/case.rb#5 +class Arel::Nodes::Case < ::Arel::Nodes::NodeExpression + # @return [Case] a new instance of Case + # + # 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/cte.rb#5 +class Arel::Nodes::Cte < ::Arel::Nodes::Binary + # @return [Cte] a new instance of Cte + # + # source://activerecord//lib/arel/nodes/cte.rb#10 + def initialize(name, relation, materialized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/cte.rb#19 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/cte.rb#19 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/cte.rb#15 + def hash; end + + # Returns the value of attribute materialized. + # + # source://activerecord//lib/arel/nodes/cte.rb#8 + def materialized; end + + # source://activerecord//lib/arel/nodes/binary.rb#6 + def name; end + + # source://activerecord//lib/arel/nodes/binary.rb#6 + def relation; end + + # source://activerecord//lib/arel/nodes/cte.rb#27 + def to_cte; end + + # source://activerecord//lib/arel/nodes/cte.rb#31 + def to_table; end +end + +# source://activerecord//lib/arel/nodes/unary.rb#41 +class Arel::Nodes::Cube < ::Arel::Nodes::Unary; end + +# 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#122 +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/fragments.rb#5 +class Arel::Nodes::Fragments < ::Arel::Nodes::Node + # @return [Fragments] a new instance of Fragments + # + # source://activerecord//lib/arel/nodes/fragments.rb#8 + def initialize(values = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/fragments.rb#22 + def +(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/fragments.rb#28 + def ==(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/fragments.rb#28 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/fragments.rb#18 + def hash; end + + # Returns the value of attribute values. + # + # source://activerecord//lib/arel/nodes/fragments.rb#6 + def values; end + + private + + # source://activerecord//lib/arel/nodes/fragments.rb#13 + def initialize_copy(other); end +end + +# source://activerecord//lib/arel/nodes/full_outer_join.rb#5 +class Arel::Nodes::FullOuterJoin < ::Arel::Nodes::Join; end + +# 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#50 +class Arel::Nodes::GreaterThan < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#53 + def invert; end +end + +# source://activerecord//lib/arel/nodes/binary.rb#58 +class Arel::Nodes::GreaterThanOrEqual < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#61 + 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#39 + def casted_values; 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#54 + 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#50 + def proc_for_binds; end + + # source://activerecord//lib/arel/nodes/homogeneous_in.rb#35 + def right; 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#63 + 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#122 +class Arel::Nodes::Intersect < ::Arel::Nodes::Binary; end + +# source://activerecord//lib/arel/nodes/binary.rb#82 +class Arel::Nodes::IsDistinctFrom < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#85 + def invert; end +end + +# source://activerecord//lib/arel/nodes/binary.rb#90 +class Arel::Nodes::IsNotDistinctFrom < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#93 + def invert; end +end + +# source://activerecord//lib/arel/nodes/binary.rb#122 +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/arel/nodes/leading_join.rb#5 +class Arel::Nodes::LeadingJoin < ::Arel::Nodes::InnerJoin; end + +# source://activerecord//lib/arel/nodes/binary.rb#66 +class Arel::Nodes::LessThan < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#69 + def invert; end +end + +# source://activerecord//lib/arel/nodes/binary.rb#74 +class Arel::Nodes::LessThanOrEqual < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#77 + 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 + +# source://activerecord//lib/arel/nodes/nary.rb#5 +class Arel::Nodes::Nary < ::Arel::Nodes::NodeExpression + # @return [Nary] a new instance of Nary + # + # source://activerecord//lib/arel/nodes/nary.rb#8 + def initialize(children); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/nary.rb#29 + def ==(other); end + + # Returns the value of attribute children. + # + # source://activerecord//lib/arel/nodes/nary.rb#6 + def children; end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/nary.rb#29 + def eql?(other); end + + # source://activerecord//lib/arel/nodes/nary.rb#21 + def fetch_attribute(&block); end + + # source://activerecord//lib/arel/nodes/nary.rb#25 + def hash; end + + # source://activerecord//lib/arel/nodes/nary.rb#13 + def left; end + + # source://activerecord//lib/arel/nodes/nary.rb#17 + def right; end +end + +# = Using +Arel::Nodes::Node+ +# +# Active Record uses Arel to compose SQL statements. Instead of building SQL strings directly, it's building an +# abstract syntax tree (AST) of the statement using various types of Arel::Nodes::Node. Each node represents a +# fragment of a SQL statement. +# +# The intermediate representation allows Arel to compile the statement into the database's specific SQL dialect +# only before sending it without having to care about the nuances of each database when building the statement. +# It also allows easier composition of statements without having to resort to (brittle and unsafe) string manipulation. +# +# == Building constraints +# +# One of the most common use cases of Arel is generating constraints for +SELECT+ statements. To help with that, +# most nodes include a couple of useful factory methods to create subtree structures for common constraints. For +# a full list of those, please refer to Arel::Predications. +# +# The following example creates an equality constraint where the value of the name column on the users table +# matches the value DHH. +# +# users = Arel::Table.new(:users) +# constraint = users[:name].eq("DHH") +# +# # => Arel::Nodes::Equality.new( +# # Arel::Attributes::Attribute.new(users, "name"), +# # Arel::Nodes::Casted.new( +# # "DHH", +# # Arel::Attributes::Attribute.new(users, "name") +# # ) +# # ) +# +# The resulting SQL fragment will look like this: +# +# "users"."name" = 'DHH' +# +# The constraint fragments can be used with regular ActiveRecord::Relation objects instead of a Hash. The +# following two examples show two ways of creating the same query. +# +# User.where(name: 'DHH') +# +# # SELECT "users".* FROM "users" WHERE "users"."name" = 'DHH' +# +# users = User.arel_table +# +# User.where(users[:name].eq('DHH')) +# +# # SELECT "users".* FROM "users" WHERE "users"."name" = 'DHH' +# +# == Functions +# +# Arel comes with built-in support for SQL functions like +COUNT+, +SUM+, +MIN+, +MAX+, and +AVG+. The +# Arel::Expressions module includes factory methods for the default functions. +# +# employees = Employee.arel_table +# +# Employee.select(employees[:department_id], employees[:salary].average).group(employees[:department_id]) +# +# # SELECT "employees"."department_id", AVG("employees"."salary") +# # FROM "employees" GROUP BY "employees"."department_id" +# +# It’s also possible to use custom functions by using the Arel::Nodes::NamedFunction node type. It accepts a +# function name and an array of parameters. +# +# Arel::Nodes::NamedFunction.new('date_trunc', [Arel::Nodes.build_quoted('day'), User.arel_table[:created_at]]) +# +# # date_trunc('day', "users"."created_at") +# +# == Quoting & bind params +# +# Values that you pass to Arel nodes need to be quoted or wrapped in bind params. This ensures they are properly +# converted into the correct format without introducing a possible SQL injection vulnerability. Most factory +# methods (like +eq+, +gt+, +lteq+, …) quote passed values automatically. When not using a factory method, it’s +# possible to convert a value and wrap it in an Arel::Nodes::Quoted node (if necessary) by calling +Arel::Nodes. +# build_quoted+. +# +# Arel::Nodes.build_quoted("foo") # 'foo' +# Arel::Nodes.build_quoted(12.3) # 12.3 +# +# Instead of quoting values and embedding them directly in the SQL statement, it’s also possible to create bind +# params. This keeps the actual values outside of the statement and allows using the prepared statement feature +# of some databases. +# +# attribute = ActiveRecord::Relation::QueryAttribute.new(:name, "DHH", ActiveRecord::Type::String.new) +# Arel::Nodes::BindParam.new(attribute) +# +# When ActiveRecord runs the query, bind params are replaced by placeholders (like +$1+) and the values are passed +# separately. +# +# == SQL Literals +# +# For cases where there is no way to represent a particular SQL fragment using Arel nodes, you can use an SQL +# literal. SQL literals are strings that Arel will treat “as is”. +# +# Arel.sql('LOWER("users"."name")').eq('dhh') +# +# # LOWER("users"."name") = 'dhh' +# +# Please keep in mind that passing data as raw SQL literals might introduce a possible SQL injection. However, +# `Arel.sql` supports binding parameters which will ensure proper quoting. This can be useful when you need to +# control the exact SQL you run, but you still have potentially user-supplied values. +# +# Arel.sql('LOWER("users"."name") = ?', 'dhh') +# +# # LOWER("users"."name") = 'dhh' +# +# You can also combine SQL literals. +# +# sql = Arel.sql('SELECT * FROM "users" WHERE ') +# sql += Arel.sql('LOWER("users"."name") = :name', name: 'dhh') +# sql += Arel.sql('AND "users"."age" > :age', age: 35) +# +# # SELECT * FROM "users" WHERE LOWER("users"."name") = 'dhh' AND "users"."age" > '35' +# +# source://activerecord//lib/arel/nodes/node.rb#116 +class Arel::Nodes::Node + include ::Arel::FactoryMethods + + # Factory method to create an Nodes::And node. + # + # source://activerecord//lib/arel/nodes/node.rb#135 + def and(right); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/nodes/node.rb#158 + def equality?; end + + # source://activerecord//lib/arel/nodes/node.rb#155 + def fetch_attribute; end + + # source://activerecord//lib/arel/nodes/node.rb#139 + def invert; end + + # Factory method to create a Nodes::Not node that has the recipient of + # the caller as a child. + # + # source://activerecord//lib/arel/nodes/node.rb#122 + def not; end + + # Factory method to create a Nodes::Grouping node that has an Nodes::Or + # node as a child. + # + # source://activerecord//lib/arel/nodes/node.rb#129 + 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#148 + 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#98 +class Arel::Nodes::NotEqual < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#101 + def invert; end +end + +# source://activerecord//lib/arel/nodes/binary.rb#106 +class Arel::Nodes::NotIn < ::Arel::Nodes::Binary + include ::Arel::Nodes::FetchAttribute + + # source://activerecord//lib/arel/nodes/binary.rb#109 + 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/nary.rb#37 +class Arel::Nodes::Or < ::Arel::Nodes::Nary; 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 + + # @return [SqlLiteral] a new instance of SqlLiteral + # + # source://activerecord//lib/arel/nodes/sql_literal.rb#13 + def initialize(string, retryable: T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://activerecord//lib/arel/nodes/sql_literal.rb#25 + def +(other); end + + # source://activerecord//lib/arel/nodes/sql_literal.rb#18 + def encode_with(coder); end + + # source://activerecord//lib/arel/nodes/sql_literal.rb#22 + def fetch_attribute; end + + # Returns the value of attribute retryable. + # + # source://activerecord//lib/arel/nodes/sql_literal.rb#11 + def retryable; 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#30 + def to_cte; 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#122 +class Arel::Nodes::Union < ::Arel::Nodes::Binary; end + +# source://activerecord//lib/arel/nodes/binary.rb#122 +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#215 + def concat(other); end + + # source://activerecord//lib/arel/predications.rb#219 + def contains(other); end + + # source://activerecord//lib/arel/predications.rb#147 + def does_not_match(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#159 + def does_not_match_all(others, escape = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#155 + def does_not_match_any(others, escape = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#151 + def does_not_match_regexp(other, case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#17 + 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#175 + def gt(right); end + + # source://activerecord//lib/arel/predications.rb#183 + def gt_all(others); end + + # source://activerecord//lib/arel/predications.rb#179 + def gt_any(others); end + + # source://activerecord//lib/arel/predications.rb#163 + def gteq(right); end + + # source://activerecord//lib/arel/predications.rb#171 + def gteq_all(others); end + + # source://activerecord//lib/arel/predications.rb#167 + def gteq_any(others); end + + # source://activerecord//lib/arel/predications.rb#65 + def in(other); end + + # source://activerecord//lib/arel/predications.rb#80 + def in_all(others); end + + # source://activerecord//lib/arel/predications.rb#76 + 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#187 + def lt(right); end + + # source://activerecord//lib/arel/predications.rb#195 + def lt_all(others); end + + # source://activerecord//lib/arel/predications.rb#191 + def lt_any(others); end + + # source://activerecord//lib/arel/predications.rb#199 + def lteq(right); end + + # source://activerecord//lib/arel/predications.rb#207 + def lteq_all(others); end + + # source://activerecord//lib/arel/predications.rb#203 + def lteq_any(others); end + + # source://activerecord//lib/arel/predications.rb#131 + def matches(other, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#143 + def matches_all(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#139 + def matches_any(others, escape = T.unsafe(nil), case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#135 + def matches_regexp(other, case_sensitive = T.unsafe(nil)); end + + # source://activerecord//lib/arel/predications.rb#84 + 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#112 + def not_in(other); end + + # source://activerecord//lib/arel/predications.rb#127 + def not_in_all(others); end + + # source://activerecord//lib/arel/predications.rb#123 + def not_in_any(others); end + + # source://activerecord//lib/arel/predications.rb#223 + def overlaps(other); end + + # source://activerecord//lib/arel/predications.rb#227 + def quoted_array(others); end + + # source://activerecord//lib/arel/predications.rb#211 + def when(right); end + + private + + # source://activerecord//lib/arel/predications.rb#239 + def grouping_all(method_id, others, *extras); end + + # source://activerecord//lib/arel/predications.rb#232 + def grouping_any(method_id, others, *extras); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/predications.rb#248 + def infinity?(value); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/predications.rb#256 + def open_ended?(value); end + + # source://activerecord//lib/arel/predications.rb#244 + def quoted_node(other); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/predications.rb#252 + 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#14 + def initialize(name, as: T.unsafe(nil), klass: T.unsafe(nil), type_caster: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/table.rb#99 + def ==(other); end + + # source://activerecord//lib/arel/table.rb#86 + def [](name, table = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/table.rb#114 + def able_to_type_cast?; end + + # source://activerecord//lib/arel/table.rb#34 + def alias(name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/table.rb#99 + def eql?(other); end + + # source://activerecord//lib/arel/table.rb#38 + def from; end + + # source://activerecord//lib/arel/table.rb#58 + def group(*columns); end + + # source://activerecord//lib/arel/table.rb#92 + def hash; end + + # source://activerecord//lib/arel/table.rb#82 + def having(expr); end + + # source://activerecord//lib/arel/table.rb#42 + 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#62 + def order(*expr); end + + # source://activerecord//lib/arel/table.rb#54 + def outer_join(relation); end + + # source://activerecord//lib/arel/table.rb#70 + def project(*things); end + + # source://activerecord//lib/arel/table.rb#78 + def skip(amount); end + + # Returns the value of attribute table_alias. + # + # source://activerecord//lib/arel/table.rb#12 + def table_alias; end + + # source://activerecord//lib/arel/table.rb#74 + def take(amount); end + + # source://activerecord//lib/arel/table.rb#106 + def type_cast_for_database(attr_name, value); end + + # source://activerecord//lib/arel/table.rb#110 + def type_for_attribute(name); end + + # source://activerecord//lib/arel/table.rb#66 + def where(condition); end + + private + + # Returns the value of attribute type_caster. + # + # source://activerecord//lib/arel/table.rb#119 + 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#45 + def ast; end + + # source://activerecord//lib/arel/tree_manager.rb#47 + def to_dot; end + + # source://activerecord//lib/arel/tree_manager.rb#53 + def to_sql(engine = T.unsafe(nil)); end + + private + + # source://activerecord//lib/arel/tree_manager.rb#60 + 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#31 + 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#39 + def where(expr); end + + # source://activerecord//lib/arel/tree_manager.rb#35 + 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#33 + def group(columns); end + + # source://activerecord//lib/arel/update_manager.rb#44 + 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#261 + def edge(name); end + + # source://activerecord//lib/arel/visitors/dot.rb#279 + def quote(string); end + + # source://activerecord//lib/arel/visitors/dot.rb#283 + def to_dot; end + + # source://activerecord//lib/arel/visitors/dot.rb#247 + def visit(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#216 + 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#212 + def visit_Arel_Nodes_BindParam(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#237 + 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#233 + 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#188 + def visit_Arel_Nodes_Or(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#197 + 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#226 + def visit_Array(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_BigDecimal(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_Date(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_DateTime(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_FalseClass(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_Float(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#220 + def visit_Hash(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_Integer(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_NilClass(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#226 + def visit_Set(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_String(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_Symbol(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + def visit_Time(o); end + + # source://activerecord//lib/arel/visitors/dot.rb#197 + 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#243 + def visit_edge(o, method); end + + # source://activerecord//lib/arel/visitors/dot.rb#269 + 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#93 + 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#81 + 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#81 + 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#34 + def visit_Arel_Nodes_Concat(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#72 + def visit_Arel_Nodes_Cte(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#49 + def visit_Arel_Nodes_IsDistinctFrom(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#43 + def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#58 + def visit_Arel_Nodes_NotRegexp(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#62 + def visit_Arel_Nodes_NullsFirst(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#67 + def visit_Arel_Nodes_NullsLast(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#54 + def visit_Arel_Nodes_Regexp(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#29 + 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#22 + def visit_Arel_Nodes_SelectStatement(o, collector); end + + # source://activerecord//lib/arel/visitors/mysql.rb#13 + 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#88 + def grouping_array_or_grouping_element(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#996 + def aggregate(name, o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#754 + def bind_block; end + + # FIXME: we should probably have a 2-pass visitor for this + # + # source://activerecord//lib/arel/visitors/to_sql.rb#943 + def build_subselect(key, o); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#1023 + def collect_ctes(children, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#179 + def collect_nodes_for(nodes, collector, spacer, connector = T.unsafe(nil)); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#887 + def collect_optimizer_hints(o, collector); end + + # Used by some visitors to enclose select queries in parentheses + # + # source://activerecord//lib/arel/visitors/to_sql.rb#981 + def grouping_parentheses(o, collector, always_wrap_selects = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#917 + def has_group_by_and_having?(o); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#909 + def has_join_sources?(o); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#913 + def has_limit_or_offset_or_orders?(o); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#957 + def infix_value(o, collector, value); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#963 + def infix_value_with_paren(o, collector, value, suppress_parens = T.unsafe(nil)); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#897 + def inject_join(list, collector, join_str); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#1010 + def is_distinct_from(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#891 + 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#924 + 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#924 + def prepare_update_statement(o); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#867 + def quote(value); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#877 + def quote_column_name(name); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#872 + def quote_table_name(name); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#992 + def require_parentheses?(o); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#882 + def sanitize_as_sql_comment(value); end + + # @return [Boolean] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#905 + def unboundable?(value); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def unsupported(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#756 + def visit_ActiveModel_Attribute(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_ActiveSupport_Multibyte_Chars(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_ActiveSupport_StringInquirer(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#746 + def visit_Arel_Attributes_Attribute(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#622 + 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#363 + 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#421 + def visit_Arel_Nodes_Avg(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#431 + def visit_Arel_Nodes_Between(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#186 + def visit_Arel_Nodes_Bin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#760 + def visit_Arel_Nodes_BindParam(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#770 + def visit_Arel_Nodes_BoundSqlLiteral(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#87 + def visit_Arel_Nodes_Casted(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#175 + def visit_Arel_Nodes_Comment(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#405 + def visit_Arel_Nodes_Count(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#732 + def visit_Arel_Nodes_Cte(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#296 + 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#367 + def visit_Arel_Nodes_Descending(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#190 + def visit_Arel_Nodes_Distinct(o, collector); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#194 + def visit_Arel_Nodes_DistinctOn(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#497 + 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#221 + def visit_Arel_Nodes_Except(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#76 + def visit_Arel_Nodes_Exists(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#400 + def visit_Arel_Nodes_Extract(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#96 + def visit_Arel_Nodes_False(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#251 + def visit_Arel_Nodes_Filter(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#286 + def visit_Arel_Nodes_Following(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#863 + def visit_Arel_Nodes_Fragments(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#532 + def visit_Arel_Nodes_FullOuterJoin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#449 + def visit_Arel_Nodes_GreaterThan(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#437 + def visit_Arel_Nodes_GreaterThanOrEqual(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#382 + def visit_Arel_Nodes_Group(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#327 + def visit_Arel_Nodes_Grouping(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#336 + def visit_Arel_Nodes_HomogeneousIn(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#588 + def visit_Arel_Nodes_In(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#847 + def visit_Arel_Nodes_InfixOperation(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#553 + def visit_Arel_Nodes_InnerJoin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#53 + def visit_Arel_Nodes_InsertStatement(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#216 + 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#509 + def visit_Arel_Nodes_JoinSource(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#473 + def visit_Arel_Nodes_LessThan(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#461 + def visit_Arel_Nodes_LessThanOrEqual(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#318 + def visit_Arel_Nodes_Limit(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#323 + def visit_Arel_Nodes_Lock(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#485 + def visit_Arel_Nodes_Matches(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#413 + def visit_Arel_Nodes_Max(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#417 + def visit_Arel_Nodes_Min(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#386 + def visit_Arel_Nodes_NamedFunction(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#226 + def visit_Arel_Nodes_NamedWindow(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#569 + 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#605 + def visit_Arel_Nodes_NotIn(o, collector); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#524 + 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#372 + def visit_Arel_Nodes_NullsFirst(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#377 + def visit_Arel_Nodes_NullsLast(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#313 + def visit_Arel_Nodes_Offset(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#564 + def visit_Arel_Nodes_On(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#170 + def visit_Arel_Nodes_OptimizerHints(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#626 + def visit_Arel_Nodes_Or(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#539 + def visit_Arel_Nodes_OuterJoin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#300 + def visit_Arel_Nodes_Over(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#276 + def visit_Arel_Nodes_Preceding(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#87 + def visit_Arel_Nodes_Quoted(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#267 + def visit_Arel_Nodes_Range(o, collector); end + + # @raise [NotImplementedError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#520 + def visit_Arel_Nodes_Regexp(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#546 + def visit_Arel_Nodes_RightOuterJoin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#258 + def visit_Arel_Nodes_Rows(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#149 + 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#143 + def visit_Arel_Nodes_SelectOptions(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#120 + def visit_Arel_Nodes_SelectStatement(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#764 + def visit_Arel_Nodes_SqlLiteral(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#528 + def visit_Arel_Nodes_StringJoin(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#409 + def visit_Arel_Nodes_Sum(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#425 + def visit_Arel_Nodes_TableAlias(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#92 + def visit_Arel_Nodes_True(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#853 + def visit_Arel_Nodes_UnaryOperation(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#208 + def visit_Arel_Nodes_Union(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#212 + 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#40 + def visit_Arel_Nodes_UpdateStatement(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#100 + 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#232 + def visit_Arel_Nodes_Window(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#198 + def visit_Arel_Nodes_With(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#203 + def visit_Arel_Nodes_WithRecursive(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#358 + def visit_Arel_SelectManager(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#574 + def visit_Arel_Table(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#858 + def visit_Array(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_BigDecimal(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Class(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Date(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_DateTime(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_FalseClass(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Float(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Hash(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#824 + def visit_Integer(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_NilClass(o, collector); end + + # source://activerecord//lib/arel/visitors/to_sql.rb#858 + def visit_Set(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_String(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Symbol(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_Time(o, collector); end + + # @raise [UnsupportedVisitError] + # + # source://activerecord//lib/arel/visitors/to_sql.rb#828 + def visit_TrueClass(o, collector); end +end + +# source://activerecord//lib/arel/visitors/to_sql.rb#751 +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/apps/govquests-api/rails_app/sorbet/rbi/gems/activestorage@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/activestorage@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..188c9de --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/activestorage@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,3722 @@ +# 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::Access + include ::ActiveModel::Serialization + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _before_commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _create_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _destroy_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _find_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _initialize_callbacks; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#11 + def _reflections; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#11 + def _reflections?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _rollback_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_before_commit_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_commit_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_create_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_destroy_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_find_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_initialize_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_rollback_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_save_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_touch_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_update_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validate_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_validation_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _save_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _touch_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _update_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _validation_callbacks; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#12 + def aggregate_reflections; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#13 + def automatic_scope_inversing; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#13 + def automatic_scope_inversing?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#16 + def cache_timestamp_format; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#16 + def cache_timestamp_format?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#24 + def cache_versioning; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#24 + def cache_versioning?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#32 + def collection_cache_versioning; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#32 + def collection_cache_versioning?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#183 + def column_for_attribute(name, &_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#98 + def default_connection_handler; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#98 + def default_connection_handler?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#100 + def default_role; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#100 + def default_role?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/default.rb#20 + def default_scope_override; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/default.rb#19 + def default_scopes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#102 + def default_shard; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#102 + def default_shard?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/enum.rb#167 + def defined_enums; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/enum.rb#167 + def defined_enums?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#47 + def destroy_association_async_batch_size; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#37 + def destroy_association_async_job(&_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/encryption/encryptable_record.rb#11 + def encrypted_attributes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/encryption/encryptable_record.rb#11 + def encrypted_attributes=(_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/encryption/encryptable_record.rb#11 + def encrypted_attributes?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/serializers/json.rb#15 + def include_root_in_json; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/serializers/json.rb#15 + def include_root_in_json?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/locking/optimistic.rb#56 + def lock_optimistically; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/locking/optimistic.rb#56 + def lock_optimistically?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#22 + def logger; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#22 + def logger?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/naming.rb#255 + def model_name(&_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/nested_attributes.rb#15 + def nested_attributes_options; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/nested_attributes.rb#15 + def nested_attributes_options?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/normalization.rb#8 + def normalized_attributes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/normalization.rb#8 + def normalized_attributes=(_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter=(_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#168 + def pluralize_table_names; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#168 + def pluralize_table_names?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#163 + def primary_key_prefix_type; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#163 + def primary_key_prefix_type?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/timestamp.rb#47 + def record_timestamps; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/timestamp.rb#47 + def record_timestamps=(_arg0); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/timestamp.rb#47 + def record_timestamps?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/signed_id.rb#13 + def signed_id_verifier_secret; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/signed_id.rb#13 + def signed_id_verifier_secret?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#71 + def skip_time_zone_conversion_for_attributes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#71 + def skip_time_zone_conversion_for_attributes?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#43 + def store_full_class_name; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#43 + def store_full_class_name?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#47 + def store_full_sti_class; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#47 + def store_full_sti_class?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#164 + def table_name_prefix; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#164 + def table_name_prefix?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#165 + def table_name_suffix; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#165 + def table_name_suffix?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#70 + def time_zone_aware_attributes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#70 + def time_zone_aware_attributes?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#72 + def time_zone_aware_types; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#72 + def time_zone_aware_types?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#183 + def type_for_attribute(*_arg0, **_arg1, &_arg2); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _attr_readonly; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _attr_readonly=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/readonly_attributes.rb#11 + def _attr_readonly?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _before_commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _before_commit_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _commit_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _commit_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _counter_cache_columns; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _counter_cache_columns=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/counter_cache.rb#9 + def _counter_cache_columns?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _create_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _create_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _destroy_association_async_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _destroy_association_async_job=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#24 + def _destroy_association_async_job?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _destroy_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _destroy_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _find_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _find_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _initialize_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _initialize_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#11 + def _reflections?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _rollback_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _rollback_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _save_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _save_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _touch_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _touch_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _update_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _update_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validate_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validate_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _validation_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _validation_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/validations.rb#50 + def _validators?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_find(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_initialize(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_touch(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_update(*args, **options, &block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def aggregate_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def aggregate_reflections=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#12 + def aggregate_reflections?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#109 + def application_record_class?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_update(*args, **options, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#129 + def asynchronous_queries_session; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#133 + def asynchronous_queries_tracker; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activestorage//lib/active_storage/reflection.rb#53 + def attachment_reflections?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attribute_aliases; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attribute_aliases=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#71 + def attribute_aliases?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attribute_method_patterns; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attribute_method_patterns=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/attribute_methods.rb#72 + def attribute_method_patterns?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attributes_for_inspect; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attributes_for_inspect=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#107 + def attributes_for_inspect?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def automatic_scope_inversing; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def automatic_scope_inversing=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#13 + def automatic_scope_inversing?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def automatically_invert_plural_associations; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def automatically_invert_plural_associations=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_create(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_destroy(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_save(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_update(*args, **options, &block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def belongs_to_required_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def belongs_to_required_by_default=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#89 + def belongs_to_required_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def cache_timestamp_format; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def cache_timestamp_format=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#16 + def cache_timestamp_format?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def cache_versioning; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def cache_versioning=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#24 + def cache_versioning?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def collection_cache_versioning; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def collection_cache_versioning=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/integration.rb#32 + def collection_cache_versioning?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#77 + def configurations; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#71 + def configurations=(config); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#193 + def connected_to_stack; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#207 + def connection_class; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#203 + def connection_class=(b); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#211 + def connection_class?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#215 + def connection_class_for_self; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#121 + def connection_handler; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#125 + def connection_handler=(handler); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def counter_cached_association_names; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def counter_cached_association_names=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#184 + def current_preventing_writes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#147 + def current_role; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#165 + def current_shard; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_column_serializer; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_column_serializer=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/serialization.rb#20 + def default_column_serializer?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_connection_handler; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_connection_handler=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#98 + def default_connection_handler?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_role; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_role=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#100 + def default_role?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_scope_override; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_scope_override=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_scopes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_scopes=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_shard; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_shard=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#102 + def default_shard?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/enum.rb#167 + def defined_enums?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def destroy_association_async_batch_size; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def destroy_association_async_batch_size=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#27 + def destroy_association_async_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def destroy_association_async_job=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def encrypted_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def encrypted_attributes=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/encryption/encryptable_record.rb#11 + def encrypted_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def enumerate_columns_in_select_statements; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def enumerate_columns_in_select_statements=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#87 + def enumerate_columns_in_select_statements?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def generated_token_verifier; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def generated_token_verifier=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def has_many_inversing; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def has_many_inversing=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#94 + def has_many_inversing?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def immutable_strings_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def immutable_strings_by_default=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#170 + def immutable_strings_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def implicit_order_column; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def implicit_order_column=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#169 + def implicit_order_column?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def include_root_in_json; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def include_root_in_json=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/serializers/json.rb#15 + def include_root_in_json?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def inheritance_column; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#326 + def inheritance_column=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#172 + def inheritance_column?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def internal_metadata_table_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def internal_metadata_table_name=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#167 + def internal_metadata_table_name?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/store.rb#101 + def local_stored_attributes; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/store.rb#101 + def local_stored_attributes=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def lock_optimistically; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def lock_optimistically=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/locking/optimistic.rb#56 + def lock_optimistically?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def logger; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def logger=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#22 + def logger?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def nested_attributes_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def nested_attributes_options=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/nested_attributes.rb#15 + def nested_attributes_options?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def normalized_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def normalized_attributes=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/normalization.rb#8 + def normalized_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def param_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/conversion.rb#32 + def param_delimiter?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def partial_inserts; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def partial_inserts=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#50 + def partial_inserts?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def partial_updates; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def partial_updates=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/dirty.rb#49 + def partial_updates?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def pluralize_table_names; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def pluralize_table_names=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#168 + def pluralize_table_names?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def primary_key_prefix_type; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def primary_key_prefix_type=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#163 + def primary_key_prefix_type?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def record_timestamps; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def record_timestamps=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/timestamp.rb#47 + def record_timestamps?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def run_commit_callbacks_on_first_saved_instances_in_transaction; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#96 + def run_commit_callbacks_on_first_saved_instances_in_transaction?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def schema_migrations_table_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def schema_migrations_table_name=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#166 + def schema_migrations_table_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def shard_selector; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def shard_selector=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#104 + def shard_selector?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def signed_id_verifier_secret; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def signed_id_verifier_secret=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/signed_id.rb#13 + def signed_id_verifier_secret?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def skip_time_zone_conversion_for_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def skip_time_zone_conversion_for_attributes=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#71 + def skip_time_zone_conversion_for_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def store_full_class_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def store_full_class_name=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#43 + def store_full_class_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def store_full_sti_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def store_full_sti_class=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/inheritance.rb#47 + def store_full_sti_class?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def strict_loading_by_default; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def strict_loading_by_default=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#91 + def strict_loading_by_default?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def strict_loading_mode; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def strict_loading_mode=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#92 + def strict_loading_mode?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/core.rb#230 + def strict_loading_violation!(owner:, reflection:); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def table_name_prefix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def table_name_prefix=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#164 + def table_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def table_name_suffix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def table_name_suffix=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/model_schema.rb#165 + def table_name_suffix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def time_zone_aware_attributes; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def time_zone_aware_attributes=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#70 + def time_zone_aware_attributes?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def time_zone_aware_types; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def time_zone_aware_types=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/attribute_methods/time_zone_conversion.rb#72 + def time_zone_aware_types?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def token_definitions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def token_definitions=(new_value); end + + private + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _inheritance_column=(new_value); end + end +end + +# :markup: markdown +# :include: ../README.md +# +# source://activestorage//lib/active_storage/gem_version.rb#3 +module ActiveStorage + extend ::ActiveSupport::Autoload + + # source://activestorage//lib/active_storage.rb#55 + def analyzers; end + + # source://activestorage//lib/active_storage.rb#55 + def analyzers=(val); end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type; end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type=(val); end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline; end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline=(val); end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary; end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary=(val); end + + # source://activestorage//lib/active_storage.rb#361 + def draw_routes; end + + # source://activestorage//lib/active_storage.rb#361 + def draw_routes=(val); end + + # source://activestorage//lib/active_storage.rb#48 + def logger; end + + # source://activestorage//lib/active_storage.rb#48 + def logger=(val); end + + # source://activestorage//lib/active_storage.rb#57 + def paths; end + + # source://activestorage//lib/active_storage.rb#57 + def paths=(val); end + + # source://activestorage//lib/active_storage.rb#54 + def previewers; end + + # source://activestorage//lib/active_storage.rb#54 + def previewers=(val); end + + # source://activestorage//lib/active_storage.rb#52 + def queues; end + + # source://activestorage//lib/active_storage.rb#52 + def queues=(val); end + + # source://activestorage//lib/active_storage.rb#362 + def resolve_model_to_route; end + + # source://activestorage//lib/active_storage.rb#362 + def resolve_model_to_route=(val); end + + # source://activestorage//lib/active_storage.rb#360 + def routes_prefix; end + + # source://activestorage//lib/active_storage.rb#360 + def routes_prefix=(val); end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods; end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods=(val); end + + # source://activestorage//lib/active_storage.rb#357 + def touch_attachment_records; end + + # source://activestorage//lib/active_storage.rb#357 + def touch_attachment_records=(val); end + + # source://activestorage//lib/active_storage.rb#364 + def track_variants; end + + # source://activestorage//lib/active_storage.rb#364 + def track_variants=(val); end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments; end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#358 + def urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#358 + def urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types=(val); end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor; end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor=(val); end + + # source://activestorage//lib/active_storage.rb#49 + def verifier; end + + # source://activestorage//lib/active_storage.rb#49 + def verifier=(val); end + + # source://activestorage//lib/active_storage.rb#366 + def video_preview_arguments; end + + # source://activestorage//lib/active_storage.rb#366 + def video_preview_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types; end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types=(val); end + + class << self + # source://activestorage//lib/active_storage.rb#55 + def analyzers; end + + # source://activestorage//lib/active_storage.rb#55 + def analyzers=(val); end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type; end + + # source://activestorage//lib/active_storage.rb#61 + def binary_content_type=(val); end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline; end + + # source://activestorage//lib/active_storage.rb#63 + def content_types_allowed_inline=(val); end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary; end + + # source://activestorage//lib/active_storage.rb#62 + def content_types_to_serve_as_binary=(val); end + + # source://activestorage//lib/active_storage/deprecator.rb#4 + def deprecator; end + + # source://activestorage//lib/active_storage.rb#361 + def draw_routes; end + + # source://activestorage//lib/active_storage.rb#361 + def draw_routes=(val); end + + # Returns the currently loaded version of Active Storage as a +Gem::Version+. + # + # source://activestorage//lib/active_storage/gem_version.rb#5 + def gem_version; end + + # source://activestorage//lib/active_storage.rb#48 + def logger; end + + # source://activestorage//lib/active_storage.rb#48 + def logger=(val); end + + # source://activestorage//lib/active_storage.rb#57 + def paths; end + + # source://activestorage//lib/active_storage.rb#57 + def paths=(val); end + + # source://activestorage//lib/active_storage.rb#54 + def previewers; end + + # source://activestorage//lib/active_storage.rb#54 + def previewers=(val); end + + # source://activestorage//lib/active_storage.rb#52 + def queues; end + + # source://activestorage//lib/active_storage.rb#52 + def queues=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#413 + def railtie_helpers_paths; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#396 + def railtie_namespace; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#417 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://activestorage//lib/active_storage.rb#362 + def resolve_model_to_route; end + + # source://activestorage//lib/active_storage.rb#362 + def resolve_model_to_route=(val); end + + # source://activestorage//lib/active_storage.rb#360 + def routes_prefix; end + + # source://activestorage//lib/active_storage.rb#360 + def routes_prefix=(val); end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#356 + def service_urls_expire_in=(val); end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods; end + + # source://activestorage//lib/active_storage.rb#65 + def supported_image_processing_methods=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#402 + def table_name_prefix; end + + # source://activestorage//lib/active_storage.rb#357 + def touch_attachment_records; end + + # source://activestorage//lib/active_storage.rb#357 + def touch_attachment_records=(val); end + + # source://activestorage//lib/active_storage.rb#364 + def track_variants; end + + # source://activestorage//lib/active_storage.rb#364 + def track_variants=(val); end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments; end + + # source://activestorage//lib/active_storage.rb#354 + def unsupported_image_processing_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#358 + def urls_expire_in; end + + # source://activestorage//lib/active_storage.rb#358 + def urls_expire_in=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#409 + def use_relative_model_naming?; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types; end + + # source://activestorage//lib/active_storage.rb#59 + def variable_content_types=(val); end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor; end + + # source://activestorage//lib/active_storage.rb#50 + def variant_processor=(val); end + + # source://activestorage//lib/active_storage.rb#49 + def verifier; end + + # source://activestorage//lib/active_storage.rb#49 + def verifier=(val); end + + # Returns the currently loaded version of Active Storage as a +Gem::Version+. + # + # source://activestorage//lib/active_storage/version.rb#7 + def version; end + + # source://activestorage//lib/active_storage.rb#366 + def video_preview_arguments; end + + # source://activestorage//lib/active_storage.rb#366 + def video_preview_arguments=(val); end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types; end + + # source://activestorage//lib/active_storage.rb#60 + def web_image_content_types=(val); end + end +end + +class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob + def perform(blob); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +# = Active Storage \Analyzer +# +# This is an abstract base class for analyzers, which extract metadata from blobs. See +# ActiveStorage::Analyzer::VideoAnalyzer for an example of a concrete subclass. +# +# source://activestorage//lib/active_storage/analyzer.rb#8 +class ActiveStorage::Analyzer + # @return [Analyzer] a new instance of Analyzer + # + # source://activestorage//lib/active_storage/analyzer.rb#23 + def initialize(blob); end + + # Returns the value of attribute blob. + # + # source://activestorage//lib/active_storage/analyzer.rb#9 + def blob; end + + # Override this method in a concrete subclass. Have it return a Hash of metadata. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/analyzer.rb#28 + def metadata; end + + private + + # Downloads the blob to a tempfile on disk. Yields the tempfile. + # + # source://activestorage//lib/active_storage/analyzer.rb#34 + def download_blob_to_tempfile(&block); end + + # source://activestorage//lib/active_storage/analyzer.rb#46 + def instrument(analyzer, &block); end + + # source://activestorage//lib/active_storage/analyzer.rb#38 + def logger; end + + # source://activestorage//lib/active_storage/analyzer.rb#42 + def tmpdir; end + + class << self + # Implement this method in a concrete subclass. Have it return true when given a blob from which + # the analyzer can extract metadata. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/analyzer.rb#13 + def accept?(blob); end + + # Implement this method in concrete subclasses. It will determine if blob analysis + # should be done in a job or performed inline. By default, analysis is enqueued in a job. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/analyzer.rb#19 + def analyze_later?; end + end +end + +# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#14 +class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#19 + def metadata; end + + private + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44 + def audio_stream; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#29 + def bit_rate; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#24 + def duration; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#73 + def ffprobe_path; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#52 + def probe; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#56 + def probe_from(file); end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#34 + def sample_rate; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#48 + def streams; end + + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#39 + def tags; end + + class << self + # source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#15 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#14 +class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer + # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#19 + def metadata; end + + class << self + # source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#15 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#6 +class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer + private + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#12 + def read_image; end + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#37 + def rotated_image?(image); end + + class << self + # source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#7 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#6 +class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer + private + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#12 + def read_image; end + + # source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#41 + def rotated_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#40 +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#24 +class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#29 + def metadata; end + + private + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#55 + def angle; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#82 + def audio?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#120 + def audio_stream; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#90 + def computed_height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#128 + def container; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#67 + def display_aspect_ratio; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#104 + def display_height_scale; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#63 + def display_matrix; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#50 + def duration; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#100 + def encoded_height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#96 + def encoded_width; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#153 + def ffprobe_path; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#42 + def height; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#132 + def probe; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#136 + def probe_from(file); end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#78 + def rotated?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#112 + def side_data; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#124 + def streams; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#108 + def tags; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86 + def video?; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#116 + def video_stream; end + + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#34 + def width; end + + class << self + # source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#25 + def accept?(blob); end + end +end + +# = Active Storage \Attached +# +# Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many +# classes that both provide proxy access to the blob association for a record. +# +# source://activestorage//lib/active_storage/attached.rb#10 +class ActiveStorage::Attached + # @return [Attached] a new instance of Attached + # + # source://activestorage//lib/active_storage/attached.rb#13 + def initialize(name, record); end + + # Returns the value of attribute name. + # + # source://activestorage//lib/active_storage/attached.rb#11 + def name; end + + # Returns the value of attribute record. + # + # source://activestorage//lib/active_storage/attached.rb#11 + def record; end + + private + + # source://activestorage//lib/active_storage/attached.rb#18 + def change; end +end + +# source://activestorage//lib/active_storage/attached/changes.rb#4 +module ActiveStorage::Attached::Changes + extend ::ActiveSupport::Autoload +end + +# source://activestorage//lib/active_storage/attached/changes/create_many.rb#4 +class ActiveStorage::Attached::Changes::CreateMany + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#7 + def initialize(name, record, attachables, pending_uploads: T.unsafe(nil)); end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 + def attachables; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#14 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#18 + def blobs; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 + def pending_uploads; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#5 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#26 + def save; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#22 + def upload; end + + private + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#44 + def assign_associated_attachments; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#36 + def build_subchange_from(attachable); end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#52 + def persisted_or_new_attachments; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#48 + def reset_associated_blobs; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#32 + def subchanges; end + + # source://activestorage//lib/active_storage/attached/changes/create_many.rb#40 + def subchanges_without_blobs; end +end + +# source://activestorage//lib/active_storage/attached/changes/create_one.rb#7 +class ActiveStorage::Attached::Changes::CreateOne + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#10 + def initialize(name, record, attachable); end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def attachable; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#15 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#19 + def blob; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#8 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#48 + def save; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#23 + def upload; end + + private + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#120 + def attachment_service_name; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#64 + def build_attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#58 + def find_attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#54 + def find_or_build_attachment; end + + # source://activestorage//lib/active_storage/attached/changes/create_one.rb#68 + def find_or_build_blob; end +end + +# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#4 +class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne + private + + # source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#6 + def find_attachment; end +end + +# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#4 +class ActiveStorage::Attached::Changes::DeleteMany + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#7 + def initialize(name, record); end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#11 + def attachables; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#15 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#19 + def blobs; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/delete_many.rb#23 + def save; end +end + +# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#4 +class ActiveStorage::Attached::Changes::DeleteOne + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#7 + def initialize(name, record); end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#11 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5 + def record; end + + # source://activestorage//lib/active_storage/attached/changes/delete_one.rb#15 + def save; end +end + +# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#4 +class ActiveStorage::Attached::Changes::DetachMany + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#7 + def initialize(name, record, attachments); end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#11 + def detach; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5 + def record; end +end + +# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#4 +class ActiveStorage::Attached::Changes::DetachOne + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#7 + def initialize(name, record, attachment); end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#11 + def detach; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/detach_one.rb#19 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#4 +class ActiveStorage::Attached::Changes::PurgeMany + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#7 + def initialize(name, record, attachments); end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def attachments; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#11 + def purge; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#16 + def purge_later; end + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/purge_many.rb#22 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#4 +class ActiveStorage::Attached::Changes::PurgeOne + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#7 + def initialize(name, record, attachment); end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def attachment; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def name; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#11 + def purge; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#16 + def purge_later; end + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5 + def record; end + + private + + # source://activestorage//lib/active_storage/attached/changes/purge_one.rb#22 + def reset; end +end + +# source://activestorage//lib/active_storage/attached/many.rb#7 +class ActiveStorage::Attached::Many < ::ActiveStorage::Attached + # source://activestorage//lib/active_storage/attached/many.rb#51 + def attach(*attachables); end + + # source://activestorage//lib/active_storage/attached/many.rb#66 + def attached?; end + + # source://activestorage//lib/active_storage/attached/many.rb#32 + def attachments; end + + # source://activestorage//lib/active_storage/attached/many.rb#37 + def blobs; end + + # source://activestorage//lib/active_storage/attached/many.rb#25 + def detach(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # source://activestorage//lib/active_storage/attached/many.rb#13 + def purge(*_arg0, **_arg1, &_arg2); end + + # source://activestorage//lib/active_storage/attached/many.rb#19 + def purge_later(*_arg0, **_arg1, &_arg2); end + + private + + # source://activestorage//lib/active_storage/attached/many.rb#75 + def detach_many; end + + # source://activestorage//lib/active_storage/attached/many.rb#71 + def purge_many; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#179 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# source://activestorage//lib/active_storage/attached/model.rb#9 +module ActiveStorage::Attached::Model + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods + + # source://activestorage//lib/active_storage/attached/model.rb#262 + def attachment_changes; end + + # source://activestorage//lib/active_storage/attached/model.rb#266 + def changed_for_autosave?; end + + # source://activestorage//lib/active_storage/attached/model.rb#276 + def reload(*_arg0); end + + private + + # source://activestorage//lib/active_storage/attached/model.rb#270 + 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#210 + 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#108 + def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end +end + +# source://activestorage//lib/active_storage/attached/one.rb#7 +class ActiveStorage::Attached::One < ::ActiveStorage::Attached + # source://activestorage//lib/active_storage/attached/one.rb#58 + def attach(attachable); end + + # source://activestorage//lib/active_storage/attached/one.rb#73 + def attached?; end + + # source://activestorage//lib/active_storage/attached/one.rb#33 + def attachment; end + + # source://activestorage//lib/active_storage/attached/one.rb#44 + def blank?; end + + # source://activestorage//lib/active_storage/attached/one.rb#25 + def detach(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#166 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # source://activestorage//lib/active_storage/attached/one.rb#13 + def purge(*_arg0, **_arg1, &_arg2); end + + # source://activestorage//lib/active_storage/attached/one.rb#19 + def purge_later(*_arg0, **_arg1, &_arg2); end + + private + + # source://activestorage//lib/active_storage/attached/one.rb#82 + def detach_one; end + + # source://activestorage//lib/active_storage/attached/one.rb#78 + def purge_one; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#158 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_blob(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_record(*args); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + def preview(transformations); end + def purge; end + def purge_later; end + def representation(transformations); end + def signed_id(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + 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 named_variants; end + def purge_dependent_blob_later; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/delegation.rb#179 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + def transform_variants_later; end + def transformations_by_name(transformations); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def with_all_variant_records(*args, **_arg1); end + end +end + +module ActiveStorage::Attachment::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def blob=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def blob_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def blob_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_blob!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def record; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def record=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def record_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def record_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_record; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_record; end +end + +module ActiveStorage::Attachment::GeneratedAttributeMethods; end + +class ActiveStorage::BaseController < ::ActionController::Base + include ::ActiveStorage::SetCurrent + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def etag_with_template_digest; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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 ::ActiveStorage::Blob::Servable + include ::ActionText::Attachable + extend ::ActionText::Attachable::ClassMethods + + # source://actiontext/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_text/engine.rb#49 + def attachable_plain_text_representation(caption = T.unsafe(nil)); end + + def audio?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_attachments(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_preview_image_attachment(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_preview_image_blob(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_variant_records(*args); end + + def compose(keys); 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 image?; end + def key; end + def mirror_later; end + def open(tmpdir: T.unsafe(nil), &block); end + + # source://actiontext/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_text/engine.rb#45 + def previewable_attachable?; end + + def purge; end + def purge_later; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/secure_token.rb#53 + 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), expires_at: T.unsafe(nil)); end + def text?; end + + # source://actiontext/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_text/engine.rb#53 + 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_attachments(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_variant_records(*args); end + + def video?; end + + private + + def compute_checksum_in_chunks(io); end + def extract_content_type(io); end + def service_metadata; end + def touch_attachments; end + def update_service_metadata; end + def web_image?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); 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:, key: T.unsafe(nil), 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); 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 + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def service; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def service=(new_value); end + + def service?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def services; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def services=(new_value); end + + def services?; end + def signed_id_verifier; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def unattached(*args, **_arg1); end + + def validate_global_service_configuration; end + def validate_service_configuration(service_name, model_class, association_name); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def attachment_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def attachment_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def attachments; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def attachments=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_preview_image_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_preview_image_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_preview_image_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_preview_image_attachment!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_preview_image_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_preview_image_blob!(*args, &block); end + + # source://activestorage//lib/active_storage/attached/model.rb#113 + def preview_image; end + + # source://activestorage//lib/active_storage/attached/model.rb#118 + def preview_image=(attachable); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def preview_image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def preview_image_attachment=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def preview_image_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def preview_image_blob=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_preview_image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_preview_image_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_preview_image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_preview_image_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def variant_record_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def variant_record_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def variant_records; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def variant_records=(value); end +end + +module ActiveStorage::Blob::GeneratedAttributeMethods; end + +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 create_preview_image_later(variations); end + def preprocessed(transformations); end + def preview(transformations); end + def preview_image_needed_before_processing_variants?; 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::Blob::Servable + def content_type_for_serving; end + def forced_disposition_for_serving; end + + private + + def allowed_inline?; end + def forcibly_serve_as_binary?; end +end + +module ActiveStorage::Blobs; end + +class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController + include ::ActiveStorage::SetBlob + include ::ActionController::Live + include ::ActiveStorage::Streaming + include ::ActiveStorage::DisableSession + extend ::ActionController::Live::ClassMethods + + def show; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController + include ::ActiveStorage::SetBlob + + def show; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defaults; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defaults=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/current_attributes.rb#137 + def url_options; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/current_attributes.rb#138 + def url_options=(value); end + end +end + +class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController + def create; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def blob_args; end + def direct_upload_json(blob); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +module ActiveStorage::DisableSession + extend ::ActiveSupport::Concern +end + +class ActiveStorage::DiskController < ::ActiveStorage::BaseController + include ::ActiveStorage::FileServer + + def show; end + def update; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def acceptable_content?(token); end + def decode_verified_key; end + def decode_verified_token; end + def named_disk_service(name); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); 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_s; end + + class << self + def wrap(filename); end + end +end + +# = Active Storage \FixtureSet +# +# Fixtures are a way of organizing data that you want to test against; in +# short, sample data. +# +# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation. +# +# === YAML +# +# Like other Active Record-backed models, ActiveStorage::Attachment and +# ActiveStorage::Blob records inherit from ActiveRecord::Base instances and +# therefore can be populated by fixtures. +# +# Consider a hypothetical Article model class, its related +# fixture data, as well as fixture data for related ActiveStorage::Attachment +# and ActiveStorage::Blob records: +# +# # app/models/article.rb +# class Article < ApplicationRecord +# has_one_attached :thumbnail +# end +# +# +# +# # fixtures/active_storage/blobs.yml +# first_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob filename: "first.png" %> +# +# +# +# # fixtures/active_storage/attachments.yml +# first_thumbnail_attachment: +# name: thumbnail +# record: first (Article) +# blob: first_thumbnail_blob +# +# When processed, Active Record will insert database records for each fixture +# entry and will ensure the Active Storage relationship is intact. +# +# source://activestorage//lib/active_storage/fixture_set.rb#44 +class ActiveStorage::FixtureSet + include ::ActiveSupport::Testing::FileFixtures + include ::ActiveRecord::SecureToken + extend ::ActiveRecord::SecureToken::ClassMethods + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + + # source://activestorage//lib/active_storage/fixture_set.rb#70 + 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/active_storage/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#66 + def blob(filename:, **attributes); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def file_fixture_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def file_fixture_path=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + end +end + +# Raised when uploaded or downloaded data does not match a precomputed checksum. +# Indicates that a network error or a software bug caused data corruption. +# +# source://activestorage//lib/active_storage/errors.rb#21 +class ActiveStorage::IntegrityError < ::ActiveStorage::Error; end + +# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable. +# Use ActiveStorage::Blob#variable? to determine whether a blob is variable. +# +# source://activestorage//lib/active_storage/errors.rb#9 +class ActiveStorage::InvariableError < ::ActiveStorage::Error; end + +# source://activestorage//lib/active_storage/log_subscriber.rb#6 +class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://activestorage//lib/active_storage/log_subscriber.rb#53 + def logger; end + + # source://activestorage//lib/active_storage/log_subscriber.rb#21 + def preview(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#26 + def service_delete(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#31 + def service_delete_prefixed(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#14 + def service_download(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#36 + def service_exist(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#46 + def service_mirror(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#14 + def service_streaming_download(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#7 + def service_upload(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#41 + def service_url(event); end + + private + + # source://activestorage//lib/active_storage/log_subscriber.rb#62 + def debug(event, colored_message); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#58 + def info(event, colored_message); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#70 + def key_in(event); end + + # source://activestorage//lib/active_storage/log_subscriber.rb#66 + def log_prefix_for_service(event); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + end +end + +class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob + def perform(key, checksum:); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +class ActiveStorage::NamedVariant + def initialize(transformations); end + + def preprocessed; end + def preprocessed?(record); end + def transformations; end +end + +class ActiveStorage::Preview + include ::ActiveStorage::Blob::Servable + + def initialize(blob, variation_or_variation_key); end + + def blob; end + def content_type(*_arg0, **_arg1, &_arg2); end + def download(&block); end + def filename(*_arg0, **_arg1, &_arg2); end + def image; end + def key; end + def processed; end + def url(**options); end + def variation; end + + private + + def presentation; end + def previewer; end + def previewer_class; end + def process; end + def processed?; end + def variant; 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 + +class ActiveStorage::PreviewImageJob < ::ActiveStorage::BaseJob + def perform(blob, variations); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +# = Active Storage \Previewer +# +# This is an abstract base class for previewers, which generate images from blobs. See +# ActiveStorage::Previewer::MuPDFPreviewer and ActiveStorage::Previewer::VideoPreviewer for +# examples of concrete subclasses. +# +# source://activestorage//lib/active_storage/previewer.rb#9 +class ActiveStorage::Previewer + # @return [Previewer] a new instance of Previewer + # + # source://activestorage//lib/active_storage/previewer.rb#18 + def initialize(blob); end + + # Returns the value of attribute blob. + # + # source://activestorage//lib/active_storage/previewer.rb#10 + def blob; end + + # Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. + # anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to + # the underlying blob that is created. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/previewer.rb#25 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer.rb#78 + def capture(*argv, to:); end + + # Downloads the blob to a tempfile on disk. Yields the tempfile. + # + # source://activestorage//lib/active_storage/previewer.rb#31 + def download_blob_to_tempfile(&block); end + + # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. + # + # Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image + # generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash: + # + # def preview + # download_blob_to_tempfile do |input| + # draw "my-drawing-command", input.path, "--format", "png", "-" do |output| + # yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png" + # end + # end + # end + # + # The output tempfile is opened in the directory returned by #tmpdir. + # + # source://activestorage//lib/active_storage/previewer.rb#49 + def draw(*argv); end + + # source://activestorage//lib/active_storage/previewer.rb#69 + def instrument(operation, payload = T.unsafe(nil), &block); end + + # source://activestorage//lib/active_storage/previewer.rb#93 + def logger; end + + # source://activestorage//lib/active_storage/previewer.rb#59 + def open_tempfile; end + + # source://activestorage//lib/active_storage/previewer.rb#73 + def service_name; end + + # source://activestorage//lib/active_storage/previewer.rb#97 + def tmpdir; end + + class << self + # Implement this method in a concrete subclass. Have it return true when given a blob from which + # the previewer can generate an image. + # + # @return [Boolean] + # + # source://activestorage//lib/active_storage/previewer.rb#14 + def accept?(blob); end + end +end + +# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#4 +class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#27 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#36 + 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#18 + def mutool_exists?; end + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#14 + def mutool_path; end + + # source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#10 + def pdf?(content_type); 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#25 + def preview(**options); end + + private + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#34 + 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#10 + def pdf?(content_type); end + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#18 + def pdftoppm_exists?; end + + # source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#14 + 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://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +class ActiveStorage::Record < ::ActiveRecord::Base + include ::ActiveStorage::Record::GeneratedAttributeMethods + include ::ActiveStorage::Record::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +module ActiveStorage::Record::GeneratedAssociationMethods; end +module ActiveStorage::Record::GeneratedAttributeMethods; end + +# source://activestorage//lib/active_storage/reflection.rb#4 +module ActiveStorage::Reflection; end + +# source://activestorage//lib/active_storage/reflection.rb#49 +module ActiveStorage::Reflection::ActiveRecordExtensions + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods + + module GeneratedClassMethods + def attachment_reflections; end + def attachment_reflections=(value); end + def attachment_reflections?; end + end + + module GeneratedInstanceMethods + def attachment_reflections; end + def attachment_reflections?; end + end +end + +# source://activestorage//lib/active_storage/reflection.rb#56 +module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods + # Returns an array of reflection objects for all the attachments in the + # class. + # + # source://activestorage//lib/active_storage/reflection.rb#59 + def reflect_on_all_attachments; end + + # Returns the reflection object for the named +attachment+. + # + # User.reflect_on_attachment(:avatar) + # # => the avatar reflection + # + # source://activestorage//lib/active_storage/reflection.rb#68 + def reflect_on_attachment(attachment); end +end + +# source://activestorage//lib/active_storage/reflection.rb#5 +class ActiveStorage::Reflection::HasAttachedReflection < ::ActiveRecord::Reflection::MacroReflection + # source://activestorage//lib/active_storage/reflection.rb#10 + def named_variants; end + + # source://activestorage//lib/active_storage/reflection.rb#6 + def variant(name, transformations); end +end + +# Holds all the metadata about a has_many_attached attachment as it was +# specified in the Active Record class. +# +# source://activestorage//lib/active_storage/reflection.rb#25 +class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection + # source://activestorage//lib/active_storage/reflection.rb#26 + def macro; end +end + +# Holds all the metadata about a has_one_attached attachment as it was +# specified in the Active Record class. +# +# source://activestorage//lib/active_storage/reflection.rb#17 +class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection + # source://activestorage//lib/active_storage/reflection.rb#18 + def macro; end +end + +# source://activestorage//lib/active_storage/reflection.rb#31 +module ActiveStorage::Reflection::ReflectionExtension + # source://activestorage//lib/active_storage/reflection.rb#32 + def add_attachment_reflection(model, name, reflection); end + + private + + # source://activestorage//lib/active_storage/reflection.rb#37 + def reflection_class_for(macro); end +end + +module ActiveStorage::Representations; end + +class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseController + include ::ActiveStorage::SetBlob + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + def blob_scope; end + def set_representation; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Representations::BaseController + include ::ActionController::Live + include ::ActiveStorage::Streaming + include ::ActiveStorage::DisableSession + extend ::ActionController::Live::ClassMethods + + def show; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Representations::BaseController + def show; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# = Active Storage \Service +# +# Abstract class serving as an interface for concrete services. +# +# The available services are: +# +# * +Disk+, to manage attachments saved directly on the hard drive. +# * +GCS+, to manage attachments through Google Cloud Storage. +# * +S3+, to manage attachments through Amazon S3. +# * +AzureStorage+, to manage attachments through Microsoft Azure Storage. +# * +Mirror+, to be able to use several services to manage attachments. +# +# Inside a \Rails application, you can set-up your services through the +# generated config/storage.yml file and reference one +# of the aforementioned constant under the +service+ key. For example: +# +# local: +# service: Disk +# root: <%= Rails.root.join("storage") %> +# +# You can checkout the service's constructor to know which keys are required. +# +# Then, in your application's configuration, you can specify the service to +# use like this: +# +# config.active_storage.service = :local +# +# If you are using Active Storage outside of a Ruby on \Rails application, you +# can configure the service to use like this: +# +# ActiveStorage::Blob.service = ActiveStorage::Service.configure( +# :local, +# { local: {service: "Disk", root: Pathname("/tmp/foo/storage") } } +# ) +# +# source://activestorage//lib/active_storage/service.rb#43 +class ActiveStorage::Service + extend ::ActiveSupport::Autoload + + # Concatenate multiple files into a single "composed" file. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#96 + def compose(source_keys, destination_key, filename: T.unsafe(nil), content_type: T.unsafe(nil), disposition: T.unsafe(nil), custom_metadata: T.unsafe(nil)); end + + # Delete the file at the +key+. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#101 + def delete(key); end + + # Delete files at keys starting with the +prefix+. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#106 + def delete_prefixed(prefix); end + + # Return the content of the file at the +key+. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#82 + def download(key); end + + # Return the partial content in the byte +range+ of the file at the +key+. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#87 + def download_chunk(key, range); end + + # Return +true+ if a file exists at the +key+. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://activestorage//lib/active_storage/service.rb#111 + def exist?(key); end + + # Returns a Hash of headers for +url_for_direct_upload+ requests. + # + # source://activestorage//lib/active_storage/service.rb#143 + def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://activestorage//lib/active_storage/service.rb#46 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activestorage//lib/active_storage/service.rb#46 + def name=(_arg0); end + + # source://activestorage//lib/active_storage/service.rb#91 + def open(*args, **options, &block); end + + # @return [Boolean] + # + # source://activestorage//lib/active_storage/service.rb#147 + def public?; end + + # Update metadata for the file identified by +key+ in the service. + # Override in subclasses only if the service needs to store specific + # metadata that has to be updated upon identification. + # + # source://activestorage//lib/active_storage/service.rb#78 + def update_metadata(key, **metadata); end + + # Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will + # ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#71 + def upload(key, io, checksum: T.unsafe(nil), **options); end + + # Returns the URL for the file at the +key+. This returns a permanent URL for public files, and returns a + # short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+), + # +filename+, and +content_type+ that you wish the file to be served with on request. Additionally, you can also provide + # the amount of seconds the URL will be valid for, specified in +expires_in+. + # + # source://activestorage//lib/active_storage/service.rb#119 + def url(key, **options); end + + # Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+. + # The URL will be valid for the amount of seconds specified in +expires_in+. + # You must also provide the +content_type+, +content_length+, and +checksum+ of the file + # that will be uploaded. All these attributes will be validated by the service upon upload. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#138 + def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end + + private + + # source://activestorage//lib/active_storage/service.rb#175 + def content_disposition_with(filename:, type: T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#160 + def custom_metadata_headers(metadata); end + + # source://activestorage//lib/active_storage/service.rb#164 + def instrument(operation, payload = T.unsafe(nil), &block); end + + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#152 + def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end + + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/service.rb#156 + def public_url(key, **_arg1); end + + # source://activestorage//lib/active_storage/service.rb#170 + def service_name; end + + class << self + # Override in subclasses that stitch together multiple services and hence + # need to build additional services using the configurator. + # + # Passes the configurator and all of the service's config as keyword args. + # + # See MirrorService for an example. + # + # source://activestorage//lib/active_storage/service.rb#62 + def build(configurator:, name:, service: T.unsafe(nil), **service_config); end + + # Configure an Active Storage service by name from a set of configurations, + # typically loaded from a YAML file. The Active Storage engine uses this + # to set the global Active Storage service when the app boots. + # + # source://activestorage//lib/active_storage/service.rb#52 + def configure(service_name, configurations); end + end +end + +# source://activestorage//lib/active_storage/service/configurator.rb#4 +class ActiveStorage::Service::Configurator + # source://activestorage//lib/active_storage/service/configurator.rb#11 + def initialize(configurations); end + + # source://activestorage//lib/active_storage/service/configurator.rb#15 + def build(service_name); end + + # source://activestorage//lib/active_storage/service/configurator.rb#5 + def configurations; end + + private + + # source://activestorage//lib/active_storage/service/configurator.rb#23 + def config_for(name); end + + # source://activestorage//lib/active_storage/service/configurator.rb#29 + def resolve(class_name); end + + class << self + # source://activestorage//lib/active_storage/service/configurator.rb#7 + def build(service_name, configurations); end + end +end + +# source://activestorage//lib/active_storage/service/registry.rb#4 +class ActiveStorage::Service::Registry + # source://activestorage//lib/active_storage/service/registry.rb#5 + def initialize(configurations); end + + # source://activestorage//lib/active_storage/service/registry.rb#10 + def fetch(name); end + + private + + # source://activestorage//lib/active_storage/service/registry.rb#26 + def configurations; end + + # source://activestorage//lib/active_storage/service/registry.rb#28 + def configurator; end + + # source://activestorage//lib/active_storage/service/registry.rb#26 + def services; end +end + +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) + +class ActiveStorage::TransformJob < ::ActiveStorage::BaseJob + def perform(blob, transformations); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +# source://activestorage//lib/active_storage.rb#368 +module ActiveStorage::Transformers + extend ::ActiveSupport::Autoload +end + +# = Active Storage \Transformers \Transformer +# +# A Transformer applies a set of transformations to an image. +# +# The following concrete subclasses are included in Active Storage: +# +# * ActiveStorage::Transformers::ImageProcessingTransformer: +# backed by ImageProcessing, a common interface for MiniMagick and ruby-vips +# +# source://activestorage//lib/active_storage/transformers/transformer.rb#13 +class ActiveStorage::Transformers::Transformer + # @return [Transformer] a new instance of Transformer + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#16 + def initialize(transformations); end + + # Applies the transformations to the source image in +file+, producing a target image in the + # specified +format+. Yields an open Tempfile containing the target image. Closes and unlinks + # the output tempfile after yielding to the given block. Returns the result of the block. + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#23 + def transform(file, format:); end + + # Returns the value of attribute transformations. + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#14 + def transformations; end + + private + + # Returns an open Tempfile containing a transformed image in the given +format+. + # All subclasses implement this method. + # + # @raise [NotImplementedError] + # + # source://activestorage//lib/active_storage/transformers/transformer.rb#36 + def process(file, format:); end +end + +# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable. +# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable. +# +# source://activestorage//lib/active_storage/errors.rb#13 +class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error; end + +# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable. +# Use ActiveStorage::Blob#representable? to determine whether a blob is representable. +# +# source://activestorage//lib/active_storage/errors.rb#17 +class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error; end + +# source://activestorage//lib/active_storage/gem_version.rb#9 +module ActiveStorage::VERSION; end + +# source://activestorage//lib/active_storage/gem_version.rb#10 +ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://activestorage//lib/active_storage/gem_version.rb#11 +ActiveStorage::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://activestorage//lib/active_storage/gem_version.rb#13 +ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), 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 + include ::ActiveStorage::Blob::Servable + + def initialize(blob, variation_or_variation_key); end + + def blob; end + def content_type(*_arg0, **_arg1, &_arg2); end + def destroy; end + def download(&block); end + def filename; 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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_blob(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_image_attachment(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_image_blob(*args); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def attachment_reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def with_attached_image(*args, **_arg1); end + end +end + +module ActiveStorage::VariantRecord::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def blob=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def blob_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def blob_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_image_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_image_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_blob!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_image_attachment(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_image_attachment!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_image_blob(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_image_blob!(*args, &block); end + + # source://activestorage//lib/active_storage/attached/model.rb#113 + def image; end + + # source://activestorage//lib/active_storage/attached/model.rb#118 + def image=(attachable); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def image_attachment=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def image_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def image_blob=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_image_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_blob; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_image_attachment; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_image_blob; end +end + +module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end + +class ActiveStorage::VariantWithRecord + include ::ActiveStorage::Blob::Servable + + def initialize(blob, variation); end + + def blob; end + def content_type(*_arg0, **_arg1, &_arg2); end + def destroy; end + def download(*_arg0, **_arg1, &_arg2); end + def filename; end + def image; end + def key(*_arg0, **_arg1, &_arg2); 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 process; end + def processed?; 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/apps/govquests-api/rails_app/sorbet/rbi/gems/activesupport@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/activesupport@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..ede51da --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/activesupport@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,21115 @@ +# 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`. + + +# :include: ../README.rdoc +# +# source://activesupport//lib/active_support/deep_mergeable.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#101 + def test_order; end + + # source://activesupport//lib/active_support.rb#101 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#102 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#102 + def test_parallelization_threshold=(val); end + + class << self + # source://activesupport//lib/active_support.rb#107 + def cache_format_version; end + + # source://activesupport//lib/active_support.rb#111 + def cache_format_version=(value); end + + # source://activesupport//lib/active_support/deprecator.rb#4 + def deprecator; end + + # source://activesupport//lib/active_support.rb#95 + def eager_load!; end + + # source://activesupport//lib/active_support.rb#105 + def error_reporter; end + + # source://activesupport//lib/active_support.rb#105 + 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#101 + def test_order; end + + # source://activesupport//lib/active_support.rb#101 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#102 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#102 + 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#115 + def to_time_preserves_timezone; end + + # source://activesupport//lib/active_support.rb#119 + 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#135 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support.rb#139 + 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 +# +# 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#11 +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#20 + def actions(error); end + + # source://activesupport//lib/active_support/actionable_error.rb#29 + 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#35 +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#45 + def action(name, &block); end +end + +# source://activesupport//lib/active_support/actionable_error.rb#14 +class ActiveSupport::ActionableError::NonActionable < ::StandardError; end + +# = \Array Inquirer +# +# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check +# its string-like contents: +# +# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) +# +# variants.phone? # => true +# variants.tablet? # => true +# variants.desktop? # => false +# +# source://activesupport//lib/active_support/array_inquirer.rb#14 +class ActiveSupport::ArrayInquirer < ::Array + # Passes each element of +candidates+ collection to ArrayInquirer collection. + # The method returns true if any element from the ArrayInquirer collection + # 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#27 + def any?(*candidates); end + + private + + # source://activesupport//lib/active_support/array_inquirer.rb#42 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#38 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# = Active Support \Autoload +# +# Autoload and eager load conveniences for your library. +# +# This module allows you to define autoloads based on +# \Rails conventions (i.e. no need to define the path +# 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#29 +module ActiveSupport::Autoload + # source://activesupport//lib/active_support/dependencies/autoload.rb#30 + def autoload(const_name, path = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#51 + def autoload_at(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#44 + def autoload_under(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#58 + def eager_autoload; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#65 + def eager_load!; end +end + +# = Backtrace Cleaner +# +# Backtraces often include many lines that are not relevant for the context +# under review. This makes it hard to find the signal amongst the backtrace +# noise, and adds debugging time. With a BacktraceCleaner, filters and +# 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 +# root = "#{Rails.root}/" +# bc.add_filter { |line| line.delete_prefix(root) } # 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#34 +class ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#35 + 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" + # root = "#{Rails.root}/" + # backtrace_cleaner.add_filter { |line| line.start_with?(root) ? line.from(root.size) : line } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 + 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#92 + 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#45 + def clean(backtrace, kind = T.unsafe(nil)); end + + # Returns the frame with all filters applied. + # returns +nil+ if the frame was silenced. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#61 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#45 + 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#106 + 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#99 + def remove_silencers!; end + + private + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#127 + def add_core_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#118 + def add_gem_filter; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#131 + def add_gem_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#135 + def add_stdlib_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#139 + def filter_backtrace(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#113 + def initialize_copy(_other); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#155 + def noise(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#147 + def silence(backtrace); end +end + +# source://activesupport//lib/active_support/backtrace_cleaner.rb#111 +ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/benchmark.rb#4 +module ActiveSupport::Benchmark + class << self + # Benchmark realtime in the specified time unit. By default, + # the returned unit is in seconds. + # + # ActiveSupport::Benchmark.realtime { sleep 0.1 } + # # => 0.10007 + # + # ActiveSupport::Benchmark.realtime(:float_millisecond) { sleep 0.1 } + # # => 100.07 + # + # `unit` can be any of the values accepted by Ruby's `Process.clock_gettime`. + # + # source://activesupport//lib/active_support/benchmark.rb#15 + def realtime(unit = T.unsafe(nil), &block); end + end +end + +# = \Benchmarkable +# +# 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 + +# = Active Support Broadcast Logger +# +# The Broadcast logger is a logger used to write messages to multiple IO. It is commonly used +# in development to display messages on STDOUT and also write them to a file (development.log). +# With the Broadcast logger, you can broadcast your logs to a unlimited number of sinks. +# +# The BroadcastLogger acts as a standard logger and all methods you are used to are available. +# However, all the methods on this logger will propagate and be delegated to the other loggers +# that are part of the broadcast. +# +# Broadcasting your logs. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Add a logger to the broadcast. +# +# stdout_logger = Logger.new(STDOUT) +# broadcast = BroadcastLogger.new(stdout_logger) +# file_logger = Logger.new("development.log") +# broadcast.broadcast_to(file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Modifying the log level for all broadcasted loggers. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.level = Logger::FATAL # Modify the log level for the whole broadcast. +# +# Stop broadcasting log to a sink. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# broadcast.stop_broadcasting_to(file_logger) +# broadcast.info("Hello world!") # Writes the log *only* to STDOUT. +# +# At least one sink has to be part of the broadcast. Otherwise, your logs will not +# be written anywhere. For instance: +# +# broadcast = BroadcastLogger.new +# broadcast.info("Hello world") # The log message will appear nowhere. +# +# If you are adding a custom logger with custom methods to the broadcast, +# the `BroadcastLogger` will proxy them and return the raw value, or an array +# of raw values, depending on how many loggers in the broadcasts responded to +# the method: +# +# class MyLogger < ::Logger +# def loggable? +# true +# end +# end +# +# logger = BroadcastLogger.new +# logger.loggable? # => A NoMethodError exception is raised because no loggers in the broadcasts could respond. +# +# logger.broadcast_to(MyLogger.new(STDOUT)) +# logger.loggable? # => true +# logger.broadcast_to(MyLogger.new(STDOUT)) +# puts logger.broadcasts # => [MyLogger, MyLogger] +# logger.loggable? # [true, true] +# +# source://activesupport//lib/active_support/broadcast_logger.rb#74 +class ActiveSupport::BroadcastLogger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # @return [BroadcastLogger] a new instance of BroadcastLogger + # + # source://activesupport//lib/active_support/broadcast_logger.rb#82 + def initialize(*loggers); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#112 + def <<(message); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#116 + def add(*_arg0, **_arg1, &_arg2); end + + # Add logger(s) to the broadcast. + # + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR)) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#93 + def broadcast_to(*loggers); end + + # Returns all the logger that are part of this broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#78 + def broadcasts; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#162 + def close; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#121 + def debug(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to Logger::DEBUG for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#173 + def debug!; end + + # +True+ if the log level allows entries with severity Logger::DEBUG to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#168 + def debug?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#133 + def error(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to Logger::ERROR for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#206 + def error!; end + + # +True+ if the log level allows entries with severity Logger::ERROR to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#201 + def error?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#137 + def fatal(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to Logger::FATAL for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#217 + def fatal!; end + + # +True+ if the log level allows entries with severity Logger::FATAL to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#212 + def fatal?; end + + # Returns the value of attribute formatter. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#79 + def formatter; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#145 + def formatter=(formatter); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#125 + def info(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to Logger::INFO for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#184 + def info!; end + + # +True+ if the log level allows entries with severity Logger::INFO to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#179 + def info?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#108 + def level; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#151 + def level=(level); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#156 + def local_level=(level); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#116 + def log(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute progname. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#80 + def progname; end + + # Sets the attribute progname + # + # @param value the value to set the attribute progname to. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#80 + def progname=(_arg0); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#151 + def sev_threshold=(level); end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + + # Remove a logger from the broadcast. When a logger is removed, messages sent to + # the broadcast will no longer be written to its sink. + # + # sink = Logger.new(STDOUT) + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # + # broadcast_logger.stop_broadcasting_to(sink) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#104 + def stop_broadcasting_to(logger); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#141 + def unknown(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#129 + def warn(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to Logger::WARN for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#195 + def warn!; end + + # +True+ if the log level allows entries with severity Logger::WARN to be written + # to at least one broadcast. +False+ otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#190 + def warn?; end + + private + + # source://activesupport//lib/active_support/broadcast_logger.rb#230 + def dispatch(&block); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#221 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#235 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#247 + def respond_to_missing?(method, include_all); end + + class << self + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + end +end + +# See ActiveSupport::Cache::Store for documentation. +# +# source://activesupport//lib/active_support/cache/entry.rb#6 +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#111 + def expand_cache_key(key, namespace = T.unsafe(nil)); end + + # Returns the value of attribute format_version. + # + # source://activesupport//lib/active_support/cache.rb#58 + def format_version; end + + # Sets the attribute format_version + # + # @param value the value to set the attribute format_version to. + # + # source://activesupport//lib/active_support/cache.rb#58 + 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#85 + def lookup_store(store = T.unsafe(nil), *parameters); end + + private + + # source://activesupport//lib/active_support/cache.rb#123 + 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#135 + def retrieve_store_class(store); end + end +end + +# source://activesupport//lib/active_support/cache/coder.rb#7 +class ActiveSupport::Cache::Coder + # @return [Coder] a new instance of Coder + # + # source://activesupport//lib/active_support/cache/coder.rb#8 + def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/coder.rb#14 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/coder.rb#20 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#48 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/coder.rb#136 + def dump_version(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#144 + def load_version(dumped_version); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#121 + def signature?(dumped); end + + # source://activesupport//lib/active_support/cache/coder.rb#129 + def try_compress(string, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#125 + def type_for_string(value); end +end + +# source://activesupport//lib/active_support/cache/coder.rb#76 +ActiveSupport::Cache::Coder::COMPRESSED_FLAG = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#98 +class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry + # @return [LazyEntry] a new instance of LazyEntry + # + # source://activesupport//lib/active_support/cache/coder.rb#99 + def initialize(serializer, compressor, payload, **options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#114 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#106 + def value; end +end + +# source://activesupport//lib/active_support/cache/coder.rb#84 +ActiveSupport::Cache::Coder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#68 +ActiveSupport::Cache::Coder::OBJECT_DUMP_TYPE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#80 +ActiveSupport::Cache::Coder::PACKED_EXPIRES_AT_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#78 +ActiveSupport::Cache::Coder::PACKED_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#79 +ActiveSupport::Cache::Coder::PACKED_TYPE_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#82 +ActiveSupport::Cache::Coder::PACKED_VERSION_INDEX = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#81 +ActiveSupport::Cache::Coder::PACKED_VERSION_LENGTH_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#66 +ActiveSupport::Cache::Coder::SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#96 +ActiveSupport::Cache::Coder::STRING_DESERIALIZERS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#70 +ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#86 +class ActiveSupport::Cache::Coder::StringDeserializer + # @return [StringDeserializer] a new instance of StringDeserializer + # + # source://activesupport//lib/active_support/cache/coder.rb#87 + def initialize(encoding); end + + # source://activesupport//lib/active_support/cache/coder.rb#91 + def load(payload); end +end + +# source://activesupport//lib/active_support/cache.rb#45 +ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) + +# Raised by coders when the cache entry can't be deserialized. +# This error is treated as a cache miss. +# +# source://activesupport//lib/active_support/cache.rb#49 +class ActiveSupport::Cache::DeserializationError < ::StandardError; end + +# This class is used to represent cache entries. Cache entries have a value, an optional +# expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option +# on the cache. The version is used to support the :version option on the cache for rejecting +# 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/entry.rb#14 +class ActiveSupport::Cache::Entry + # Creates a new cache entry for the specified value. Options supported are + # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. + # + # @return [Entry] a new instance of Entry + # + # source://activesupport//lib/active_support/cache/entry.rb#25 + def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end + + # Returns the size of the cached value. This could be less than + # value.bytesize if the data is compressed. + # + # source://activesupport//lib/active_support/cache/entry.rb#61 + def bytesize; end + + # source://activesupport//lib/active_support/cache/entry.rb#76 + def compressed(compress_threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#72 + def compressed?; end + + # Duplicates the value in a class. This is used by cache implementations that don't natively + # serialize entries to protect against accidental cache modifications. + # + # source://activesupport//lib/active_support/cache/entry.rb#106 + 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/entry.rb#43 + def expired?; end + + # source://activesupport//lib/active_support/cache/entry.rb#47 + def expires_at; end + + # source://activesupport//lib/active_support/cache/entry.rb#51 + def expires_at=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#100 + def local?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#37 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache/entry.rb#116 + def pack; end + + # source://activesupport//lib/active_support/cache/entry.rb#33 + def value; end + + # Returns the value of attribute version. + # + # source://activesupport//lib/active_support/cache/entry.rb#21 + def version; end + + private + + # source://activesupport//lib/active_support/cache/entry.rb#127 + def marshal_load(payload); end + + # source://activesupport//lib/active_support/cache/entry.rb#123 + def uncompress(value); end + + class << self + # source://activesupport//lib/active_support/cache/entry.rb#16 + def unpack(members); end + end +end + +# = \File \Cache \Store +# +# A cache store implementation which stores everything on the filesystem. +# +# source://activesupport//lib/active_support/cache/file_store.rb#12 +class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store + # @return [FileStore] a new instance of FileStore + # + # source://activesupport//lib/active_support/cache/file_store.rb#20 + def initialize(cache_path, **options); end + + # Returns the value of attribute cache_path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#13 + def cache_path; end + + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/file_store.rb#40 + def cleanup(options = T.unsafe(nil)); end + + # Deletes all items from the cache. In this case it deletes all the entries in the specified + # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your + # config file when using +FileStore+ because everything in that directory will be deleted. + # + # source://activesupport//lib/active_support/cache/file_store.rb#33 + def clear(options = T.unsafe(nil)); end + + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/file_store.rb#80 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/file_store.rb#89 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it starts from +0+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/file_store.rb#60 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/file_store.rb#101 + def inspect; end + + private + + # Delete empty directories in the cache. + # + # source://activesupport//lib/active_support/cache/file_store.rb#195 + def delete_empty_directories(dir); end + + # source://activesupport//lib/active_support/cache/file_store.rb#131 + def delete_entry(key, **options); end + + # Make sure a file path's directories exist. + # + # source://activesupport//lib/active_support/cache/file_store.rb#204 + def ensure_cache_path(path); end + + # Translate a file path into a key. + # + # source://activesupport//lib/active_support/cache/file_store.rb#189 + 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#148 + def lock_file(file_name, &block); end + + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. + # + # source://activesupport//lib/active_support/cache/file_store.rb#222 + def modify_value(name, amount, options); end + + # Translate a key into a file path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#162 + def normalize_key(key, options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#106 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#113 + def read_serialized_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/file_store.rb#208 + def search_dir(dir, &callback); end + + # source://activesupport//lib/active_support/cache/file_store.rb#120 + def write_entry(key, entry, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#124 + 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#26 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/file_store.rb#15 +ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) + +# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) +# +# source://activesupport//lib/active_support/cache/file_store.rb#16 +ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# max is 1024, plus some room +# +# source://activesupport//lib/active_support/cache/file_store.rb#17 +ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/file_store.rb#18 +ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) + +# = Memory \Cache \Store +# +# A cache store implementation which stores everything into memory in the +# same process. If you're running multiple Ruby on \Rails server processes +# (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#28 +class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store + # @return [MemoryStore] a new instance of MemoryStore + # + # source://activesupport//lib/active_support/cache/memory_store.rb#73 + def initialize(options = T.unsafe(nil)); end + + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#101 + def cleanup(options = T.unsafe(nil)); end + + # Delete all data stored in a given cache store. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#93 + def clear(options = T.unsafe(nil)); end + + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset or has expired, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#166 + 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#173 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +amount+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#149 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#185 + 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#114 + def prune(target_size, max_time = T.unsafe(nil)); end + + # Returns true if the cache is currently being pruned. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#133 + def pruning?; end + + # Synchronize calls to the cache. This should be called wherever the underlying cache implementation + # is not thread safe. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#191 + def synchronize(&block); end + + private + + # source://activesupport//lib/active_support/cache/memory_store.rb#198 + def cached_size(key, payload); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#231 + def delete_entry(key, **options); end + + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#241 + def modify_value(name, amount, options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#202 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#214 + def write_entry(key, entry, **options); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#88 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#29 +module ActiveSupport::Cache::MemoryStore::DupCoder + extend ::ActiveSupport::Cache::MemoryStore::DupCoder + + # source://activesupport//lib/active_support/cache/memory_store.rb#32 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#40 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#45 + def load(entry); end + + private + + # source://activesupport//lib/active_support/cache/memory_store.rb#56 + def dump_value(value); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#64 + def load_value(string); end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#54 +ActiveSupport::Cache::MemoryStore::DupCoder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/memory_store.rb#196 +ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) + +# = Null \Cache \Store +# +# A cache store implementation which doesn't actually store anything. Useful in +# development and test environments where you don't want caching turned on but +# need to go through the caching interface. +# +# 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#14 +class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 + def cleanup(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/null_store.rb#37 + def inspect; end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/null_store.rb#42 + def read_entry(key, **s); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/null_store.rb#49 + def write_entry(key, entry, **_arg2); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 + 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#18 + def supports_cache_versioning?; end + end +end + +# Mapping of canonical option names to aliases that a store will recognize. +# +# source://activesupport//lib/active_support/cache.rb#41 +ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#8 +module ActiveSupport::Cache::SerializerWithFallback + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#39 + def marshal_load(payload); end + + class << self + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#9 + def [](format); end + end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#66 +module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#88 + def _load(marked); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#73 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#77 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#94 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#71 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#70 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#99 +module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#109 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#105 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#113 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#103 +ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#118 +module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#126 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#122 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#130 + def dumped?(dumped); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#135 + def available?; end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#45 +module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#57 + def _load(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#49 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#53 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#61 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#144 +ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# = Active Support \Cache \Store +# +# An abstract cache store class. There are multiple cache store +# implementations, each having its own additional features. See the classes +# under the ActiveSupport::Cache module, e.g. +# 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") # => true +# 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#188 +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. + # + # [+:serializer+] + # The serializer for cached values. Must respond to +dump+ and +load+. + # + # The default serializer depends on the cache format version (set via + # +config.active_support.cache_format_version+ when using Rails). The + # default serializer for each format version includes a fallback + # mechanism to deserialize values from any format version. This behavior + # makes it easy to migrate between format versions without invalidating + # the entire cache. + # + # You can also specify serializer: :message_pack to use a + # preconfigured serializer based on ActiveSupport::MessagePack. The + # +:message_pack+ serializer includes the same deserialization fallback + # mechanism, allowing easy migration from (or to) the default + # serializer. The +:message_pack+ serializer may improve performance, + # but it requires the +msgpack+ gem. + # + # [+:compressor+] + # The compressor for serialized cache values. Must respond to +deflate+ + # and +inflate+. + # + # The default compressor is +Zlib+. To define a new custom compressor + # that also decompresses old cache entries, you can check compressed + # values for Zlib's "\x78" signature: + # + # module MyCompressor + # def self.deflate(dumped) + # # compression logic... (make sure result does not start with "\x78"!) + # end + # + # def self.inflate(compressed) + # if compressed.start_with?("\x78") + # Zlib.inflate(compressed) + # else + # # decompression logic... + # end + # end + # end + # + # ActiveSupport::Cache.lookup_store(:redis_cache_store, compressor: MyCompressor) + # + # [+:coder+] + # The coder for serializing and (optionally) compressing cache entries. + # Must respond to +dump+ and +load+. + # + # The default coder composes the serializer and compressor, and includes + # some performance optimizations. If you only need to override the + # serializer or compressor, you should specify the +:serializer+ or + # +:compressor+ options instead. + # + # If the store can handle cache entries directly, you may also specify + # coder: nil to omit the serializer, compressor, and coder. For + # example, if you are using ActiveSupport::Cache::MemoryStore and can + # guarantee that cache values will not be mutated, you can specify + # coder: nil to avoid the overhead of safeguarding against + # mutation. + # + # The +:coder+ option is mutally exclusive with the +:serializer+ and + # +:compressor+ options. Specifying them together will raise an + # +ArgumentError+. + # + # Any other specified options are treated as default options for the + # relevant cache operations, such as #read, #write, and #fetch. + # + # @return [Store] a new instance of Store + # + # source://activesupport//lib/active_support/cache.rb#295 + 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#749 + 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#759 + 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#740 + 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 + # and +false+ otherwise. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#676 + 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#722 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Deletes multiple entries in the cache. Returns the number of deleted + # entries. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#689 + 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#703 + 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) + # + # cache.write("foo", "original value") + # val_1 = nil + # val_2 = nil + # p cache.read("foo") # => "original value" + # + # sleep 1 # wait until the cache expires + # + # t1 = Thread.new do + # # fetch does the following: + # # 1. gets an recent expired entry + # # 2. extends the expiry by 2 seconds (race_condition_ttl) + # # 3. regenerates the new value + # val_1 = cache.fetch("foo", race_condition_ttl: 2) do + # sleep 1 + # "new value 1" + # end + # end + # + # # Wait until t1 extends the expiry of the entry + # # but before generating the new value + # sleep 0.1 + # + # val_2 = cache.fetch("foo", race_condition_ttl: 2) do + # # This block won't be executed because t1 extended the expiry + # "new value 2" + # end + # + # t1.join + # + # p val_1 # => "new value 1" + # p val_2 # => "oritinal value" + # p cache.fetch("foo") # => "new value 1" + # + # # The entry requires 3 seconds to expire (expires_in + race_condition_ttl) + # # We have waited 2 seconds already (sleep(1) + t1.join) thus we need to wait 1 + # # more second to see the entry expire. + # sleep 1 + # + # p cache.fetch("foo") # => nil + # + # ==== Dynamic Options + # + # In some cases it may be necessary to dynamically compute options based + # on the cached value. To support this, an ActiveSupport::Cache::WriteOptions + # instance is passed as the second argument to the block. For example: + # + # cache.fetch("authentication-token:#{user.id}") do |key, options| + # token = authenticate_to_service + # options.expires_at = token.expires_at + # token + # end + # + # source://activesupport//lib/active_support/cache.rb#444 + 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" } + # + # You may also specify additional options via the +options+ argument. See #fetch for details. + # Other options are passed to the underlying cache implementation. For example: + # + # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| + # "buzz" + # end + # # => {"fizz"=>"buzz"} + # cache.read("fizz") + # # => "buzz" + # sleep(6) + # cache.read("fizz") + # # => nil + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#595 + 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#731 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache.rb#189 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#189 + def logger=(val); end + + # Silences the logger within a block. + # + # source://activesupport//lib/active_support/cache.rb#322 + def mute; end + + # source://activesupport//lib/active_support/cache.rb#713 + def new_entry(value, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/cache.rb#192 + def options; end + + # source://activesupport//lib/active_support/cache.rb#190 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#190 + def raise_on_invalid_cache_expiration_time=(val); end + + # Reads data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. Otherwise, + # +nil+ is returned. + # + # Note, if data was written with the :expires_in or + # :version options, both of these conditions are applied before + # the data is returned. + # + # ==== Options + # + # * +:namespace+ - Replace the store namespace for this call. + # * +:version+ - Specifies a version for the cache entry. If the cached + # version does not match the requested version, the read will be treated + # as a cache miss. This feature is used to support recyclable cache keys. + # + # Other options will be handled by the specific cache store implementation. + # + # source://activesupport//lib/active_support/cache.rb#498 + 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#536 + def read_multi(*names); end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#192 + def silence; end + + # Silences the logger. + # + # source://activesupport//lib/active_support/cache.rb#316 + def silence!; end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#192 + 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. + # + # Returns +true+ if the write succeeded, +nil+ if there was an error talking + # to the cache backend, or +false+ if the write failed for another reason. + # + # 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#662 + 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#551 + def write_multi(hash, options = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/cache.rb#1010 + def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end + + # source://activesupport//lib/active_support/cache.rb#764 + def default_serializer; end + + # Deletes an entry from the cache implementation. Subclasses must + # implement this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#850 + 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#856 + def delete_multi_entries(entries, **options); end + + # source://activesupport//lib/active_support/cache.rb#815 + def deserialize_entry(payload, **_arg1); end + + # Expands key to be a consistent string value. Invokes +cache_key+ if + # object responds to +cache_key+. Otherwise, +to_param+ method will be + # called. If the key is a Hash, then keys will be sorted alphabetically. + # + # source://activesupport//lib/active_support/cache.rb#973 + def expanded_key(key); end + + # source://activesupport//lib/active_support/cache.rb#994 + def expanded_version(key); end + + # source://activesupport//lib/active_support/cache.rb#1048 + def get_entry_value(entry, name, options); end + + # source://activesupport//lib/active_support/cache.rb#1031 + def handle_expired_entry(entry, key, options); end + + # source://activesupport//lib/active_support/cache.rb#890 + def handle_invalid_expires_in(message); end + + # source://activesupport//lib/active_support/cache.rb#1002 + def instrument(operation, key, options = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/cache.rb#1006 + def instrument_multi(operation, keys, options = T.unsafe(nil), &block); end + + # Adds the namespace defined in the options to a pattern designed to + # match keys. Implementations that support delete_matched should call + # this method to translate a pattern that matches names into one that + # matches namespaced keys. + # + # source://activesupport//lib/active_support/cache.rb#779 + def key_matcher(pattern, options); end + + # Merges the default options with ones specific to a method call. + # + # source://activesupport//lib/active_support/cache.rb#861 + 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#948 + def namespace_key(key, call_options = T.unsafe(nil)); end + + # Expands and namespaces the cache key. + # Raises an exception when the key is +nil+ or an empty string. + # May be overridden by cache stores to do additional normalization. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#932 + def normalize_key(key, options = T.unsafe(nil)); end + + # Normalize aliased options to their canonical form + # + # source://activesupport//lib/active_support/cache.rb#901 + def normalize_options(options); end + + # source://activesupport//lib/active_support/cache.rb#990 + 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#796 + 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#823 + def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache.rb#1053 + def save_block_result_to_cache(name, key, options); end + + # source://activesupport//lib/active_support/cache.rb#806 + def serialize_entry(entry, **options); end + + # source://activesupport//lib/active_support/cache.rb#912 + def validate_options(options); end + + # Writes an entry to the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#802 + 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#842 + def write_multi_entries(hash, **options); end + + class << self + # source://activesupport//lib/active_support/cache.rb#189 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#189 + def logger=(val); end + + # source://activesupport//lib/active_support/cache.rb#190 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#190 + def raise_on_invalid_cache_expiration_time=(val); end + + private + + # source://activesupport//lib/active_support/cache.rb#200 + def retrieve_pool_options(options); end + end +end + +# source://activesupport//lib/active_support/cache.rb#51 +module ActiveSupport::Cache::Strategy; end + +# = Local \Cache \Strategy +# +# Caches that implement LocalCache will be backed by an in-memory cache for the +# duration of a block. Repeated calls to the cache for the same key will hit the +# in-memory cache for faster access. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#13 +module ActiveSupport::Cache::Strategy::LocalCache + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 + def cleanup(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Middleware class can be inserted as a Rack handler to be local cache for the + # duration of request. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#73 + def middleware; end + + # Use a local cache for the duration of block. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#67 + def with_local_cache(&block); end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#185 + def bypass_local_cache(&block); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#181 + def local_cache; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#177 + def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#134 + def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#189 + def use_temporary_local_cache(temporary_cache); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#167 + def write_cache_value(name, value, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 + def write_serialized_entry(key, payload, **_arg2); end +end + +# Class for storing and registering the local caches. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#17 +module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#20 + def cache_for(local_cache_key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#25 + def set_cache_for(local_cache_key, value); end +end + +# = Local \Cache \Store +# +# Simple memory backed cache. This cache is not thread safe and is intended only +# for serving as a temporary memory cache for a single thread. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#35 +class ActiveSupport::Cache::Strategy::LocalCache::LocalStore + # @return [LocalStore] a new instance of LocalStore + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 + def initialize; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 + def delete_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#61 + def fetch_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 + def read_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 + def read_multi_entries(keys); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#52 + 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#26 +ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Enables the dynamic configuration of Cache entry options while ensuring +# that conflicting options are not both set. When a block is given to +# ActiveSupport::Cache::Store#fetch, the second argument will be an +# instance of +WriteOptions+. +# +# source://activesupport//lib/active_support/cache.rb#1069 +class ActiveSupport::Cache::WriteOptions + # @return [WriteOptions] a new instance of WriteOptions + # + # source://activesupport//lib/active_support/cache.rb#1070 + def initialize(options); end + + # source://activesupport//lib/active_support/cache.rb#1094 + def expires_at; end + + # Sets the Cache entry's +expires_at+ value. If an +expires_in+ option was + # previously set, this will unset it since +expires_at+ and +expires_in+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1101 + def expires_at=(expires_at); end + + # source://activesupport//lib/active_support/cache.rb#1082 + def expires_in; end + + # Sets the Cache entry's +expires_in+ value. If an +expires_at+ option was + # previously set, this will unset it since +expires_in+ and +expires_at+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1089 + def expires_in=(expires_in); end + + # source://activesupport//lib/active_support/cache.rb#1074 + def version; end + + # source://activesupport//lib/active_support/cache.rb#1078 + def version=(version); end +end + +# = Caching Key Generator +# +# CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid +# re-executing the key generation process when it's called using the same +salt+ and +# +key_size+. +# +# source://activesupport//lib/active_support/key_generator.rb#55 +class ActiveSupport::CachingKeyGenerator + # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#56 + def initialize(key_generator); end + + # Returns a derived key suitable for use. + # + # source://activesupport//lib/active_support/key_generator.rb#62 + def generate_key(*args); end +end + +# = Active Support \Callbacks +# +# \Callbacks are code hooks that are run at key points in an object's life cycle. +# The typical use case is to have a base class define a set of callbacks +# relevant to the other functionality it supplies, so that subclasses can +# install callbacks that enhance or modify the base functionality without +# 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#64 +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#96 + def run_callbacks(kind, type = T.unsafe(nil)); 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#149 + def halted_callback_hook(filter, name); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#72 +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#336 +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#494 + def build(filter, callback); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#395 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 + # @return [InstanceExec0] a new instance of InstanceExec0 + # + # source://activesupport//lib/active_support/callbacks.rb#396 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#400 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#410 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#404 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#417 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 + # @return [InstanceExec1] a new instance of InstanceExec1 + # + # source://activesupport//lib/active_support/callbacks.rb#418 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#422 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#432 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#426 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#439 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 + # @return [InstanceExec2] a new instance of InstanceExec2 + # + # source://activesupport//lib/active_support/callbacks.rb#440 + def initialize(block); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/callbacks.rb#444 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#456 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#449 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#337 +class ActiveSupport::Callbacks::CallTemplate::MethodCall + # @return [MethodCall] a new instance of MethodCall + # + # source://activesupport//lib/active_support/callbacks.rb#338 + 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#355 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#365 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#359 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#372 +class ActiveSupport::Callbacks::CallTemplate::ObjectCall + # @return [ObjectCall] a new instance of ObjectCall + # + # source://activesupport//lib/active_support/callbacks.rb#373 + def initialize(target, method); end + + # source://activesupport//lib/active_support/callbacks.rb#378 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#388 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#382 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#464 +class ActiveSupport::Callbacks::CallTemplate::ProcCall + # @return [ProcCall] a new instance of ProcCall + # + # source://activesupport//lib/active_support/callbacks.rb#465 + def initialize(target); end + + # source://activesupport//lib/active_support/callbacks.rb#469 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#479 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#473 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#230 +class ActiveSupport::Callbacks::Callback + # @return [Callback] a new instance of Callback + # + # source://activesupport//lib/active_support/callbacks.rb#245 + def initialize(name, filter, kind, options, chain_config); end + + # Wraps code with filter + # + # source://activesupport//lib/active_support/callbacks.rb#299 + def apply(callback_sequence); end + + # Returns the value of attribute chain_config. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def chain_config; end + + # source://activesupport//lib/active_support/callbacks.rb#281 + def compiled; end + + # source://activesupport//lib/active_support/callbacks.rb#303 + def current_scopes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#272 + def duplicates?(other); end + + # Returns the value of attribute filter. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def filter; end + + # Returns the value of attribute kind. + # + # source://activesupport//lib/active_support/callbacks.rb#242 + def kind; end + + # Sets the attribute kind + # + # @param value the value to set the attribute kind to. + # + # source://activesupport//lib/active_support/callbacks.rb#242 + def kind=(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#268 + def matches?(_kind, _filter); end + + # source://activesupport//lib/active_support/callbacks.rb#256 + def merge_conditional_options(chain, if_option:, unless_option:); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#242 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activesupport//lib/active_support/callbacks.rb#242 + def name=(_arg0); end + + private + + # source://activesupport//lib/active_support/callbacks.rb#311 + def check_conditionals(conditionals); end + + # source://activesupport//lib/active_support/callbacks.rb#326 + def conditions_lambdas; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#231 + def build(chain, filter, kind, options); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#308 +ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/callbacks.rb#566 +class ActiveSupport::Callbacks::CallbackChain + include ::Enumerable + + # @return [CallbackChain] a new instance of CallbackChain + # + # source://activesupport//lib/active_support/callbacks.rb#571 + def initialize(name, config); end + + # source://activesupport//lib/active_support/callbacks.rb#631 + def append(*callbacks); end + + # source://activesupport//lib/active_support/callbacks.rb#599 + def clear; end + + # source://activesupport//lib/active_support/callbacks.rb#613 + def compile(type); end + + # Returns the value of attribute config. + # + # source://activesupport//lib/active_support/callbacks.rb#569 + def config; end + + # source://activesupport//lib/active_support/callbacks.rb#593 + def delete(o); end + + # source://activesupport//lib/active_support/callbacks.rb#583 + def each(&block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#585 + def empty?; end + + # source://activesupport//lib/active_support/callbacks.rb#584 + def index(o); end + + # source://activesupport//lib/active_support/callbacks.rb#587 + def insert(index, o); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#569 + def name; end + + # source://activesupport//lib/active_support/callbacks.rb#635 + def prepend(*callbacks); end + + protected + + # Returns the value of attribute chain. + # + # source://activesupport//lib/active_support/callbacks.rb#640 + def chain; end + + private + + # source://activesupport//lib/active_support/callbacks.rb#643 + def append_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#663 + def default_terminator; end + + # source://activesupport//lib/active_support/callbacks.rb#606 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/callbacks.rb#650 + def prepend_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#657 + 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#517 +class ActiveSupport::Callbacks::CallbackSequence + # @return [CallbackSequence] a new instance of CallbackSequence + # + # source://activesupport//lib/active_support/callbacks.rb#518 + def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/callbacks.rb#533 + def after(after); end + + # source://activesupport//lib/active_support/callbacks.rb#539 + def around(call_template, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#527 + def before(before); end + + # source://activesupport//lib/active_support/callbacks.rb#553 + def expand_call_template(arg, block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#549 + def final?; end + + # source://activesupport//lib/active_support/callbacks.rb#561 + def invoke_after(arg); end + + # source://activesupport//lib/active_support/callbacks.rb#557 + def invoke_before(arg); end + + # Returns the value of attribute nested. + # + # source://activesupport//lib/active_support/callbacks.rb#547 + def nested; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#543 + def skip?(arg); end +end + +# source://activesupport//lib/active_support/callbacks.rb#675 +module ActiveSupport::Callbacks::ClassMethods + # This is used internally to append, prepend and skip callbacks to the + # CallbackChain. + # + # source://activesupport//lib/active_support/callbacks.rb#685 + 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#900 + def define_callbacks(*names); end + + # source://activesupport//lib/active_support/callbacks.rb#676 + def normalize_callback_params(filters, block); end + + # Remove all set callbacks for the given event. + # + # source://activesupport//lib/active_support/callbacks.rb#810 + 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#736 + 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. + # + # Note: this example uses +PersonRecord+ and +#saving_message+, which you + # can see defined here[rdoc-ref:ActiveSupport::Callbacks] + # + # class Writer < PersonRecord + # attr_accessor :age + # skip_callback :save, :before, :saving_message, if: -> { age > 18 } + # 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#785 + def skip_callback(name, *filter_list, &block); end + + protected + + # source://activesupport//lib/active_support/callbacks.rb#931 + def get_callbacks(name); end + + # source://activesupport//lib/active_support/callbacks.rb#935 + def set_callbacks(name, callbacks); end +end + +# source://activesupport//lib/active_support/callbacks.rb#152 +module ActiveSupport::Callbacks::Conditionals; end + +# source://activesupport//lib/active_support/callbacks.rb#153 +class ActiveSupport::Callbacks::Conditionals::Value + # @return [Value] a new instance of Value + # + # source://activesupport//lib/active_support/callbacks.rb#154 + def initialize(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#157 + def call(target, value); end +end + +# source://activesupport//lib/active_support/callbacks.rb#161 +module ActiveSupport::Callbacks::Filters; end + +# source://activesupport//lib/active_support/callbacks.rb#193 +class ActiveSupport::Callbacks::Filters::After + # @return [After] a new instance of After + # + # source://activesupport//lib/active_support/callbacks.rb#195 + def initialize(user_callback, user_conditions, chain_config); end + + # source://activesupport//lib/active_support/callbacks.rb#213 + def apply(callback_sequence); end + + # source://activesupport//lib/active_support/callbacks.rb#201 + def call(env); end + + # Returns the value of attribute halting. + # + # source://activesupport//lib/active_support/callbacks.rb#194 + def halting; end + + # Returns the value of attribute user_callback. + # + # source://activesupport//lib/active_support/callbacks.rb#194 + def user_callback; end + + # Returns the value of attribute user_conditions. + # + # source://activesupport//lib/active_support/callbacks.rb#194 + def user_conditions; end +end + +# source://activesupport//lib/active_support/callbacks.rb#218 +class ActiveSupport::Callbacks::Filters::Around + # @return [Around] a new instance of Around + # + # source://activesupport//lib/active_support/callbacks.rb#219 + def initialize(user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#224 + def apply(callback_sequence); end +end + +# source://activesupport//lib/active_support/callbacks.rb#164 +class ActiveSupport::Callbacks::Filters::Before + # @return [Before] a new instance of Before + # + # source://activesupport//lib/active_support/callbacks.rb#165 + def initialize(user_callback, user_conditions, chain_config, filter, name); end + + # source://activesupport//lib/active_support/callbacks.rb#188 + def apply(callback_sequence); end + + # source://activesupport//lib/active_support/callbacks.rb#172 + def call(env); end + + # Returns the value of attribute filter. + # + # source://activesupport//lib/active_support/callbacks.rb#170 + def filter; end + + # Returns the value of attribute halted_lambda. + # + # source://activesupport//lib/active_support/callbacks.rb#170 + def halted_lambda; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#170 + def name; end + + # Returns the value of attribute user_callback. + # + # source://activesupport//lib/active_support/callbacks.rb#170 + def user_callback; end + + # Returns the value of attribute user_conditions. + # + # source://activesupport//lib/active_support/callbacks.rb#170 + def user_conditions; end +end + +# source://activesupport//lib/active_support/callbacks.rb#162 +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/class_attribute.rb#4 +module ActiveSupport::ClassAttribute + class << self + # source://activesupport//lib/active_support/class_attribute.rb#6 + def redefine(owner, name, value); 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#53 + def initialize(owner, path, line); end + + # @yield [@sources] + # + # source://activesupport//lib/active_support/code_generator.rb#61 + def class_eval; end + + # source://activesupport//lib/active_support/code_generator.rb#65 + def define_cached_method(canonical_name, namespace:, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/code_generator.rb#69 + def execute; end + + class << self + # source://activesupport//lib/active_support/code_generator.rb#41 + 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#28 + def apply(owner, path, line); end + + # source://activesupport//lib/active_support/code_generator.rb#15 + def define_cached_method(canonical_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 + +# = Active Support \Concern +# +# 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#112 +module ActiveSupport::Concern + # source://activesupport//lib/active_support/concern.rb#129 + 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#209 + def class_methods(&class_methods_module_definition); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +included+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#158 + def included(base = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/concern.rb#142 + def prepend_features(base); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +prepended+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#175 + def prepended(base = T.unsafe(nil), &block); end + + class << self + # source://activesupport//lib/active_support/concern.rb#125 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/concern.rb#113 +class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError + # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks + # + # source://activesupport//lib/active_support/concern.rb#114 + def initialize; end +end + +# source://activesupport//lib/active_support/concern.rb#119 +class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError + # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks + # + # source://activesupport//lib/active_support/concern.rb#120 + def initialize; end +end + +# source://activesupport//lib/active_support/concurrency/share_lock.rb#6 +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#32 +class ActiveSupport::Concurrency::LoadInterlockAwareMonitor < ::Monitor + include ::ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin +end + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#7 +module ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin + # Enters an exclusive section, but allows dependency loading while blocked + # + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#13 + def mon_enter; end + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#18 + def synchronize(&block); end +end + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#9 +ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#8 +ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/concurrency/null_lock.rb#5 +module ActiveSupport::Concurrency::NullLock + extend ::ActiveSupport::Concurrency::NullLock + + # source://activesupport//lib/active_support/concurrency/null_lock.rb#8 + def synchronize; end +end + +# A share/exclusive lock, otherwise known as a read/write lock. +# +# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock +# +# source://activesupport//lib/active_support/concurrency/share_lock.rb#10 +class ActiveSupport::Concurrency::ShareLock + include ::MonitorMixin + + # @return [ShareLock] a new instance of ShareLock + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#49 + 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#147 + 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#17 + def raw_state; end + + # Execute the supplied block while holding the Share lock. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#158 + 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#75 + 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#113 + 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#95 + def stop_exclusive(compatible: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#130 + 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#170 + 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#203 + def busy_for_exclusive?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#208 + def busy_for_sharing?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#213 + def eligible_waiters?(compatible); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#217 + def wait_for(method, &block); end +end + +# source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#36 +class ActiveSupport::Concurrency::ThreadLoadInterlockAwareMonitor + include ::ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin + + # @return [ThreadLoadInterlockAwareMonitor] a new instance of ThreadLoadInterlockAwareMonitor + # + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#39 + def initialize; end + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#13 + def mon_enter; end + + private + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#60 + def mon_exit; end + + # source://activesupport//lib/active_support/concurrency/load_interlock_aware_monitor.rb#46 + def mon_try_enter; end +end + +# = Active Support \Configurable +# +# Configurable provides a config method to store and retrieve +# configuration options as an OrderedOptions. +# +# source://activesupport//lib/active_support/configurable.rb#11 +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.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#155 + def config; end +end + +# source://activesupport//lib/active_support/configurable.rb#29 +module ActiveSupport::Configurable::ClassMethods + # source://activesupport//lib/active_support/configurable.rb#30 + def config; end + + # @yield [config] + # + # source://activesupport//lib/active_support/configurable.rb#39 + 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.allowed_access # => nil + # User.allowed_access = false + # User.allowed_access # => false + # + # user = User.new + # user.allowed_access # => false + # user.allowed_access = true + # user.allowed_access # => true + # + # 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.allowed_access = false + # User.allowed_access # => false + # + # User.new.allowed_access = true # => NoMethodError + # 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.allowed_access = false + # User.allowed_access # => false + # + # User.new.allowed_access = true # => NoMethodError + # 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.allowed_access # => false + # User.hair_colors # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/configurable.rb#111 + def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/configurable.rb#132 + def inherited(subclass); end +end + +# source://activesupport//lib/active_support/configurable.rb#14 +class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions + # source://activesupport//lib/active_support/configurable.rb#15 + def compile_methods!; end + + class << self + # Compiles reader methods so we don't have to go through method_missing. + # + # source://activesupport//lib/active_support/configurable.rb#20 + 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#44 + def read(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#54 + 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 + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#6 +module ActiveSupport::CoreExt; end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#7 +module ActiveSupport::CoreExt::ERBUtil + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def html_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#31 +module ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::CoreExt::ERBUtil + + private + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def h(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def html_escape(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end +end + +# = Current Attributes +# +# Abstract super class that provides a thread-isolated attributes singleton, which resets automatically +# before and after each request. This allows you to keep all the per-request attributes easily +# available to the whole system. +# +# 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.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#92 +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#199 + def initialize; end + + # source://activesupport//lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_reset_callbacks(&block); end + + # Returns the value of attribute attributes. + # + # source://activesupport//lib/active_support/current_attributes.rb#197 + 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#197 + def attributes=(_arg0); end + + # source://activesupport//lib/active_support/current_attributes.rb#195 + def defaults; end + + # source://activesupport//lib/active_support/current_attributes.rb#195 + def defaults?; 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#218 + 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#213 + def set(attributes, &block); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#225 + def resolve_defaults; end + + class << self + # source://activesupport//lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _reset_callbacks=(value); end + + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#149 + def after_reset(*methods, &block); end + + # Declares one or more attributes that will be given both class and instance accessor methods. + # + # ==== Options + # + # * :default - The default value for the attributes. If the value + # is a proc or lambda, it will be called whenever an instance is + # constructed. Otherwise, the value will be duplicated with +#dup+. + # Default values are re-assigned when the attributes are reset. + # + # source://activesupport//lib/active_support/current_attributes.rb#114 + def attribute(*names, default: T.unsafe(nil)); end + + # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # + # source://activesupport//lib/active_support/current_attributes.rb#144 + def before_reset(*methods, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#160 + def clear_all; end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def defaults; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def defaults=(new_value); end + + # source://activesupport//lib/active_support/current_attributes.rb#195 + def defaults?; end + + # Returns singleton instance for this class in this thread. If none exists, one is created. + # + # source://activesupport//lib/active_support/current_attributes.rb#102 + def instance; end + + # source://activesupport//lib/active_support/current_attributes.rb#154 + def reset(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/current_attributes.rb#156 + def reset_all; end + + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#149 + def resets(*methods, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#154 + def set(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#170 + def current_instances; end + + # source://activesupport//lib/active_support/current_attributes.rb#174 + def current_instances_key; end + + # source://activesupport//lib/active_support/current_attributes.rb#166 + def generated_attribute_methods; end + + # @private + # + # source://activesupport//lib/active_support/current_attributes.rb#186 + def method_added(name); end + + # source://activesupport//lib/active_support/current_attributes.rb#178 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/current_attributes.rb#182 + def respond_to_missing?(name, _); end + end +end + +# source://activesupport//lib/active_support/current_attributes.rb#96 +ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/current_attributes.rb#98 +ActiveSupport::CurrentAttributes::NOT_SET = T.let(T.unsafe(nil), Object) + +# Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class +# to provide a merge!(other, &block) method. +# +# source://activesupport//lib/active_support/deep_mergeable.rb#6 +module ActiveSupport::DeepMergeable + # Returns a new instance with the values from +other+ merged recursively. + # + # class Hash + # include ActiveSupport::DeepMergeable + # end + # + # hash_1 = { a: true, b: { c: [1, 2, 3] } } + # hash_2 = { a: false, b: { x: [3, 4, 5] } } + # + # hash_1.deep_merge(hash_2) + # # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # A block can be provided to merge non-DeepMergeable values: + # + # hash_1 = { a: 100, b: 200, c: { c1: 100 } } + # hash_2 = { b: 250, c: { c1: 200 } } + # + # hash_1.deep_merge(hash_2) do |key, this_val, other_val| + # this_val + other_val + # end + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/deep_mergeable.rb#29 + def deep_merge(other, &block); end + + # Same as #deep_merge, but modifies +self+. + # + # source://activesupport//lib/active_support/deep_mergeable.rb#34 + def deep_merge!(other, &block); end + + # Returns true if +other+ can be deep merged into +self+. Classes may + # override this method to restrict or expand the domain of deep mergeable + # values. Defaults to checking that +other+ is of type +self.class+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/deep_mergeable.rb#49 + def deep_merge?(other); end +end + +# source://activesupport//lib/active_support/delegation.rb#16 +module ActiveSupport::Delegation + class << self + # source://activesupport//lib/active_support/delegation.rb#23 + def generate(owner, methods, location: T.unsafe(nil), to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), nilable: T.unsafe(nil), private: T.unsafe(nil), as: T.unsafe(nil), signature: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/delegation.rb#152 + def generate_method_missing(owner, target, allow_nil: T.unsafe(nil)); end + end +end + +# source://activesupport//lib/active_support/delegation.rb#20 +ActiveSupport::Delegation::RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://activesupport//lib/active_support/delegation.rb#17 +ActiveSupport::Delegation::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ +# option is not used. +# +# source://activesupport//lib/active_support/delegation.rb#8 +class ActiveSupport::DelegationError < ::NoMethodError + class << self + # source://activesupport//lib/active_support/delegation.rb#10 + def nil_target(method_name, target); 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 + +# = Active Support \Deprecation +# +# \Deprecation specifies the API used by \Rails to deprecate methods, instance variables, objects, and constants. It's +# also available for gems or applications. +# +# For a gem, use Deprecation.new to create a Deprecation object and store it in your module or class (in order for +# users to be able to configure it). +# +# module MyLibrary +# def self.deprecator +# @deprecator ||= ActiveSupport::Deprecation.new("2.0", "MyLibrary") +# end +# end +# +# For a Railtie or Engine, you may also want to add it to the application's deprecators, so that the application's +# configuration can be applied to it. +# +# module MyLibrary +# class Railtie < Rails::Railtie +# initializer "my_library.deprecator" do |app| +# app.deprecators[:my_library] = MyLibrary.deprecator +# end +# end +# end +# +# With the above initializer, configuration settings like the following will affect +MyLibrary.deprecator+: +# +# # in config/environments/test.rb +# config.active_support.deprecation = :raise +# +# source://activesupport//lib/active_support/deprecation.rb#33 +class ActiveSupport::Deprecation + include ::ActiveSupport::Deprecation::Behavior + include ::ActiveSupport::Deprecation::Reporting + include ::ActiveSupport::Deprecation::Disallowed + include ::ActiveSupport::Deprecation::MethodWrapper + + # 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#71 + 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#65 + def deprecation_horizon; end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#65 + def deprecation_horizon=(_arg0); end + + class << self + # source://activesupport//lib/active_support/deprecation.rb#60 + def _instance; 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+. +# [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. +# [+:silence+] Do nothing. On \Rails, set config.active_support.report_deprecations = false to disable all behaviors. +# +# Setting behaviors only affects deprecations that happen after boot time. +# For more information you can read the documentation of the #behavior= method. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#69 +module ActiveSupport::Deprecation::Behavior + # Returns the current behavior or if one isn't set, defaults to +:stderr+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#74 + 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+. + # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. + # [+:silence+] Do nothing. + # + # Setting behaviors only affects deprecations that happen after boot time. + # Deprecation warnings raised by gems are not affected by this setting + # because they happen before \Rails boots up. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.behavior = :stderr + # deprecator.behavior = [:stderr, :log] + # deprecator.behavior = MyCustomHandler + # deprecator.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # # custom stuff + # } + # + # If you are using \Rails, you can set + # config.active_support.report_deprecations = false to disable + # all deprecation behaviors. This is similar to the +:silence+ option but + # more performant. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#111 + def behavior=(behavior); end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + def debug; end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + def debug=(_arg0); end + + # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#79 + def disallowed_behavior; end + + # Sets the behavior for disallowed deprecations (those configured by + # ActiveSupport::Deprecation#disallowed_warnings=) to the specified + # value. As with #behavior=, this can be a single value, array, or an + # object that responds to +call+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#119 + def disallowed_behavior=(behavior); end + + private + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#124 + def arity_coerce(behavior); end + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#143 + def arity_of_callable(callable); end +end + +# Default warning behaviors per Rails.env. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 +ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#5 +module ActiveSupport::Deprecation::DeprecatedConstantAccessor + class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#6 + def included(base); end + end +end + +# DeprecatedConstantProxy transforms a constant into a deprecated one. It takes the full names of an old +# (deprecated) constant and of a new constant (both in string form) and a deprecator. The deprecated constant now +# returns the value of the new one. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("PLANETS", "PLANETS_POST_2006", ActiveSupport::Deprecation.new) +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#120 +class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module + # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#128 + def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#158 + def append_features(base); 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#154 + def class; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#168 + def extended(base); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + 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#141 + def inspect; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def instance_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#163 + def prepend_features(base); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def respond_to?(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#178 + def const_missing(name); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#183 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#174 + def target; end + + class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#121 + 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, an instance variable, and a deprecator as the last argument. +# +# Trying to use the deprecated instance variable will result in a deprecation warning, pointing to the method as a +# replacement. +# +# class Example +# def initialize +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) +# @_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#87 +class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 + def initialize(instance, method, var = T.unsafe(nil), deprecator:); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#96 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#100 + def warn(callstack, called, args); end +end + +# DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and +# a deprecator. +# +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) +# # => # +# +# deprecated_object.to_s +# DEPRECATION WARNING: This object is now deprecated. +# (Backtrace) +# # => "#" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#38 +class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 + def initialize(object, message, deprecator); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#46 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#50 + 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, **kwargs, &block); end + end +end + +# A managed collection of deprecators. Configuration methods, such as +# #behavior=, affect all deprecators in the collection. Additionally, the +# #silence method silences all deprecators in the collection for the +# duration of a given block. +# +# source://activesupport//lib/active_support/deprecation/deprecators.rb#9 +class ActiveSupport::Deprecation::Deprecators + # @return [Deprecators] a new instance of Deprecators + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#10 + def initialize; end + + # Returns a deprecator added to this collection via #[]=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#16 + def [](name); end + + # Adds a given +deprecator+ to this collection. The deprecator will be + # immediately configured with any options previously set on this + # collection. + # + # deprecators = ActiveSupport::Deprecation::Deprecators.new + # deprecators.debug = true + # + # foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") + # foo_deprecator.debug # => false + # + # deprecators[:foo] = foo_deprecator + # deprecators[:foo].debug # => true + # foo_deprecator.debug # => true + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#34 + def []=(name, deprecator); end + + # Sets the deprecation warning behavior for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#60 + def behavior=(behavior); end + + # Sets the debug flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#52 + def debug=(debug); end + + # Sets the disallowed deprecation warning behavior for all deprecators in + # this collection. + # + # See ActiveSupport::Deprecation#disallowed_behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#68 + def disallowed_behavior=(disallowed_behavior); end + + # Sets the disallowed deprecation warnings for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#disallowed_warnings=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#76 + def disallowed_warnings=(disallowed_warnings); end + + # Iterates over all deprecators in this collection. If no block is given, + # returns an +Enumerator+. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#41 + def each(&block); end + + # Silences all deprecators in this collection for the duration of the + # given block. + # + # See ActiveSupport::Deprecation#silence. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#84 + def silence(&block); end + + # Sets the silenced flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#47 + def silenced=(silenced); end + + private + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#97 + def apply_options(deprecator); end + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#92 + def set_option(name, value); end +end + +# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 +module ActiveSupport::Deprecation::Disallowed + # Returns the configured criteria used to identify deprecation messages + # 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 Behavior#disallowed_behavior rather than + # Behavior#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#39 + def explicitly_allowed?(message); end +end + +# source://activesupport//lib/active_support/deprecation.rb#57 +ActiveSupport::Deprecation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# 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 + # + # deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # + # deprecator.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # # => Fred + # + # Fred.new.aaa + # # DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):10) + # # => nil + # + # Fred.new.bbb + # # DEPRECATION WARNING: bbb is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):11) + # # => nil + # + # Fred.new.ccc + # # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) + # # => nil + # + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#35 + 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. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.disallowed_behavior = :raise + # deprecator.disallowed_warnings = [ + # "something broke" + # ] + # + # deprecator.warn('something broke!') + # # => ActiveSupport::DeprecationException + # + # deprecator.allow ['something broke'] do + # deprecator.warn('something broke!') + # end + # # => nil + # + # deprecator.allow ['something broke'], if: Rails.env.production? do + # deprecator.warn('something broke!') + # end + # # => ActiveSupport::DeprecationException for dev/test, nil for production + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#89 + def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#48 + def begin_silence; end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#99 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#52 + def end_silence; end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 + 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. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # deprecator.silence do + # deprecator.warn('something broke!') + # end + # # => nil + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#41 + def silence(&block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#56 + 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.new.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#153 + 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#115 + def deprecated_method_warning(method_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#129 + def deprecation_caller_message(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#124 + def deprecation_message(callstack, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#140 + def extract_callstack(callstack); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#174 + def ignored_callstack?(path); end +end + +# source://activesupport//lib/active_support/deprecation/reporting.rb#172 +ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/deprecation/reporting.rb#171 +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 + +# = Active Support Descendants Tracker +# +# This module provides an internal implementation to track descendants +# which is faster than iterating through +ObjectSpace+. +# +# However Ruby 3.1 provide a fast native +Class#subclasses+ method, +# so if you know your code won't be executed on older rubies, including +# +ActiveSupport::DescendantsTracker+ does not provide any benefit. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#14 +module ActiveSupport::DescendantsTracker + # source://activesupport//lib/active_support/descendants_tracker.rb#107 + def descendants; end + + class << self + # source://activesupport//lib/active_support/descendants_tracker.rb#78 + def clear(classes); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#102 + def descendants(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#69 + def disable_clear!; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#89 + def reject!(classes); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#98 + def subclasses(klass); end + end +end + +# source://activesupport//lib/active_support/descendants_tracker.rb#58 +module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + # source://activesupport//lib/active_support/descendants_tracker.rb#63 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#59 + def subclasses; end +end + +# On TruffleRuby `ObjectSpace::WeakMap` keys are strong references. +# So we use `object_id` as a key and the actual object as a value. +# +# JRuby for now doesn't have Class#descendant, but when it will, it will likely +# have the same WeakMap semantic than Truffle so we future proof this as much as possible. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#20 +class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap + # source://activesupport//lib/active_support/descendants_tracker.rb#23 + def <<(object); end + + def to_a; 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 + +# = Active Support \Duration +# +# Provides accurate date and time measurements using Date#advance and +# Time#advance, respectively. It mainly supports the methods on Numeric. +# +# 1.month.ago # equivalent to Time.now.advance(months: -1) +# +# source://activesupport//lib/active_support/duration.rb#14 +class ActiveSupport::Duration + # @return [Duration] a new instance of Duration + # + # source://activesupport//lib/active_support/duration.rb#226 + 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#312 + def %(other); end + + # Multiplies this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#287 + 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#268 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#326 + def +@; end + + # Subtracts another Duration or a Numeric from this Duration. Numeric + # values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#282 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#322 + def -@; end + + # Divides this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#298 + 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#258 + 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#341 + def ==(other); end + + # source://activesupport//lib/active_support/duration.rb#481 + def _parts; end + + # source://activesupport//lib/active_support/duration.rb#224 + def abs(&_arg0); 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#436 + 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#444 + def ago(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#459 + 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#444 + def before(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#245 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#467 + 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#426 + 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#436 + def from_now(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#430 + 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#399 + 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#392 + 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#385 + 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#413 + 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://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#377 + 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#406 + 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#420 + def in_years; end + + # source://activesupport//lib/active_support/duration.rb#463 + def init_with(coder); end + + # source://activesupport//lib/active_support/duration.rb#450 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#335 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#330 + 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#473 + def iso8601(precision: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#330 + def kind_of?(klass); end + + # source://activesupport//lib/active_support/duration.rb#224 + def negative?(&_arg0); end + + # Returns a copy of the parts hash that defines the duration. + # + # 5.minutes.parts # => {:minutes=>5} + # 3.years.parts # => {:years=>3} + # + # source://activesupport//lib/active_support/duration.rb#241 + def parts; end + + # source://activesupport//lib/active_support/duration.rb#224 + def positive?(&_arg0); 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#436 + def since(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#224 + def to_f(&_arg0); 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://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#377 + 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#353 + 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#444 + def until(time = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#133 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#477 + def variable?; end + + # source://activesupport//lib/active_support/duration.rb#224 + def zero?(&_arg0); end + + private + + # source://activesupport//lib/active_support/duration.rb#512 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#516 + def raise_type_error(other); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#508 + def respond_to_missing?(method, _); end + + # source://activesupport//lib/active_support/duration.rb#486 + def sum(sign, time = T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/duration.rb#149 + 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#189 + def build(value); end + + # source://activesupport//lib/active_support/duration.rb#167 + def days(value); end + + # source://activesupport//lib/active_support/duration.rb#163 + def hours(value); end + + # source://activesupport//lib/active_support/duration.rb#159 + def minutes(value); end + + # source://activesupport//lib/active_support/duration.rb#175 + 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#144 + def parse(iso8601duration); end + + # source://activesupport//lib/active_support/duration.rb#155 + def seconds(value); end + + # source://activesupport//lib/active_support/duration.rb#171 + def weeks(value); end + + # source://activesupport//lib/active_support/duration.rb#179 + def years(value); end + + private + + # source://activesupport//lib/active_support/duration.rb#217 + 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#6 +class ActiveSupport::Duration::ISO8601Serializer + # @return [ISO8601Serializer] a new instance of ISO8601Serializer + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 + def initialize(duration, precision: T.unsafe(nil)); end + + # Builds and returns output string. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#15 + def serialize; end + + private + + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#55 + 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. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#38 + def normalize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#51 + def week_mixed_with_date?(parts); end +end + +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#7 +ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#130 +ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#120 +ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration.rb#115 +ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#114 +ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#113 +ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) + +# 1/12 of a gregorian year +# +# source://activesupport//lib/active_support/duration.rb#117 +ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#116 +ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) + +# length of a gregorian year (365.2425 days) +# +# source://activesupport//lib/active_support/duration.rb#118 +ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#15 +class ActiveSupport::Duration::Scalar < ::Numeric + # @return [Scalar] a new instance of Scalar + # + # source://activesupport//lib/active_support/duration.rb#19 + def initialize(value); end + + # source://activesupport//lib/active_support/duration.rb#85 + def %(other); end + + # source://activesupport//lib/active_support/duration.rb#66 + def *(other); end + + # source://activesupport//lib/active_support/duration.rb#41 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#53 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#27 + def -@; end + + # source://activesupport//lib/active_support/duration.rb#77 + def /(other); end + + # source://activesupport//lib/active_support/duration.rb#31 + def <=>(other); end + + # source://activesupport//lib/active_support/duration.rb#23 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_f(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_i(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#16 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#93 + def variable?; end + + private + + # source://activesupport//lib/active_support/duration.rb#98 + def calculate(op, other); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#108 + def raise_type_error(other); end +end + +# source://activesupport//lib/active_support/duration.rb#131 +ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/range/each.rb#6 +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 + +# = Encrypted Configuration +# +# Provides convenience methods on top of EncryptedFile to access values stored +# as encrypted YAML. +# +# Values can be accessed via +Hash+ methods, such as +fetch+ and +dig+, or via +# dynamic accessor methods, similar to OrderedOptions. +# +# my_config = ActiveSupport::EncryptedConfiguration.new(...) +# my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" +# +# my_config[:some_secret] +# # => 123 +# my_config.some_secret +# # => 123 +# my_config.dig(:some_namespace, :another_secret) +# # => 456 +# my_config.some_namespace.another_secret +# # => 456 +# my_config.fetch(:foo) +# # => KeyError +# my_config.foo! +# # => KeyError +# +# source://activesupport//lib/active_support/encrypted_configuration.rb#35 +class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile + # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#54 + def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end + + # Returns the decrypted content as a Hash with symbolized keys. + # + # my_config = ActiveSupport::EncryptedConfiguration.new(...) + # my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" + # + # my_config.config + # # => { some_secret: 123, some_namespace: { another_secret: 789 } } + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#85 + def config; end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#89 + def inspect; end + + # source://activesupport//lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # Reads the file and returns the decrypted content. See EncryptedFile#read. + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#62 + def read; end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#69 + def validate!; end + + private + + # source://activesupport//lib/active_support/encrypted_configuration.rb#94 + def deep_symbolize_keys(hash); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#102 + def deep_transform(hash); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#116 + def deserialize(content); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#112 + def options; end + + # source://activesupport//lib/active_support/delegation.rb#179 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/encrypted_configuration.rb#36 +class ActiveSupport::EncryptedConfiguration::InvalidContentError < ::RuntimeError + # @return [InvalidContentError] a new instance of InvalidContentError + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#37 + def initialize(content_path); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#41 + def message; end +end + +# source://activesupport//lib/active_support/encrypted_configuration.rb#46 +class ActiveSupport::EncryptedConfiguration::InvalidKeyError < ::RuntimeError + # @return [InvalidKeyError] a new instance of InvalidKeyError + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#47 + def initialize(content_path, key); 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#83 + 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 truthy if #key is truthy. Returns falsy otherwise. Unlike #key, + # does not raise MissingKeyError when +raise_if_missing_key+ is true. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/encrypted_file.rb#58 + def key?; end + + # Returns the value of attribute key_path. + # + # source://activesupport//lib/active_support/encrypted_file.rb#40 + 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#70 + def read; end + + # source://activesupport//lib/active_support/encrypted_file.rb#78 + def write(contents); end + + private + + # @raise [InvalidKeyLengthError] + # + # source://activesupport//lib/active_support/encrypted_file.rb#129 + def check_key_length; end + + # source://activesupport//lib/active_support/encrypted_file.rb#108 + def decrypt(contents); end + + # source://activesupport//lib/active_support/encrypted_file.rb#103 + def encrypt(contents); end + + # source://activesupport//lib/active_support/encrypted_file.rb#112 + def encryptor; end + + # @raise [MissingKeyError] + # + # source://activesupport//lib/active_support/encrypted_file.rb#125 + def handle_missing_key; end + + # source://activesupport//lib/active_support/encrypted_file.rb#117 + def read_env_key; end + + # source://activesupport//lib/active_support/encrypted_file.rb#121 + def read_key_file; end + + # source://activesupport//lib/active_support/encrypted_file.rb#89 + 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#9 +class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer + # @raise [ArgumentError] + # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer + # + # source://activesupport//lib/active_support/environment_inquirer.rb#15 + def initialize(env); end + + # source://activesupport//lib/active_support/environment_inquirer.rb#29 + def development?; end + + # Returns true if we're in the development or test environment. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/environment_inquirer.rb#36 + def local?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#29 + def production?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#29 + def test?; end +end + +# Optimization for the three default environments, so this inquirer doesn't need to rely on +# the slower delegation through method_missing that StringInquirer would normally entail. +# +# source://activesupport//lib/active_support/environment_inquirer.rb#10 +ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# Environments that'll respond true for #local? +# +# source://activesupport//lib/active_support/environment_inquirer.rb#13 +ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# = Active Support \Error Reporter +# +# +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. +# +# To rescue and report any unhandled error, you can use the #handle method: +# +# 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 handle only a specific error class: +# +# maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } +# +# source://activesupport//lib/active_support/error_reporter.rb#26 +class ActiveSupport::ErrorReporter + # @return [ErrorReporter] a new instance of ErrorReporter + # + # source://activesupport//lib/active_support/error_reporter.rb#35 + def initialize(*subscribers, logger: T.unsafe(nil)); end + + # Returns the value of attribute debug_mode. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def debug_mode; end + + # Sets the attribute debug_mode + # + # @param value the value to set the attribute debug_mode to. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def debug_mode=(_arg0); end + + # Prevent a subscriber from being notified of errors for the + # duration of the block. You may pass in the subscriber itself, or its class. + # + # This can be helpful for error reporting service integrations, when they wish + # to handle any errors higher in the stack. + # + # source://activesupport//lib/active_support/error_reporter.rb#185 + def disable(subscriber); end + + # Evaluates the given block, reporting and swallowing any unhandled error. + # If no error is raised, returns the return value of the block. Otherwise, + # returns the result of +fallback.call+, or +nil+ if +fallback+ is not + # specified. + # + # # Will report a TypeError to all subscribers and return nil. + # Rails.error.handle do + # 1 + '1' + # end + # + # Can be restricted to handle only specific error classes: + # + # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:warning+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.handle(context: { section: "admin" }) do + # # ... + # end + # + # * +:fallback+ - A callable that provides +handle+'s return value when an + # unhandled error is raised. For example: + # + # user = Rails.error.handle(fallback: -> { User.anonymous }) do + # User.find_by(params) + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#78 + def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end + + # Returns the value of attribute logger. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + 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#31 + def logger=(_arg0); end + + # Evaluates the given block, reporting and re-raising any unhandled error. + # If no error is raised, returns the return value of the block. + # + # # Will report a TypeError to all subscribers and re-raise it. + # Rails.error.record do + # 1 + '1' + # end + # + # Can be restricted to handle only specific error classes: + # + # tags = Rails.error.record(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:error+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.record(context: { section: "admin" }) do + # # ... + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#114 + def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Report an error directly to subscribers. You can use this method when the + # block-based #handle and #record methods are not suitable. + # + # Rails.error.report(error) + # + # source://activesupport//lib/active_support/error_reporter.rb#210 + def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Update the execution context that is accessible to error subscribers. Any + # context passed to #handle, #record, or #report will be merged with the + # context set here. + # + # Rails.error.set_context(section: "checkout", user_id: @user.id) + # + # source://activesupport//lib/active_support/error_reporter.rb#201 + def set_context(*_arg0, **_arg1, &_arg2); end + + # Register a new error subscriber. The subscriber must respond to + # + # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) + # + # The +report+ method should never raise an error. + # + # source://activesupport//lib/active_support/error_reporter.rb#161 + def subscribe(subscriber); end + + # Either report the given error when in production, or raise it when in development or test. + # + # When called in production, after the error is reported, this method will return + # nil and execution will continue. + # + # When called in development, the original error is wrapped in a different error class to ensure + # it's not being rescued higher in the stack and will be surfaced to the developer. + # + # This method is intended for reporting violated assertions about preconditions, or similar + # cases that can and should be gracefully handled in production, but that aren't supposed to happen. + # + # The error can be either an exception instance or a String. + # + # example: + # + # def edit + # if published? + # Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible") + # return false + # end + # # ... + # end + # + # source://activesupport//lib/active_support/error_reporter.rb#145 + def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Unregister an error subscriber. Accepts either a subscriber or a class. + # + # subscriber = MyErrorSubscriber.new + # Rails.error.subscribe(subscriber) + # + # Rails.error.unsubscribe(subscriber) + # # or + # Rails.error.unsubscribe(MyErrorSubscriber) + # + # source://activesupport//lib/active_support/error_reporter.rb#176 + def unsubscribe(subscriber); end + + private + + # source://activesupport//lib/active_support/error_reporter.rb#243 + def ensure_backtrace(error); end +end + +# source://activesupport//lib/active_support/error_reporter.rb#29 +ActiveSupport::ErrorReporter::DEFAULT_RESCUE = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/error_reporter.rb#28 +ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/error_reporter.rb#27 +ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/error_reporter.rb#33 +class ActiveSupport::ErrorReporter::UnexpectedError < ::Exception; 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#7 +class ActiveSupport::ExecutionWrapper + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # source://activesupport//lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_complete_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_run_callbacks(&block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#141 + 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#135 + def complete!; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#127 + def run; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#122 + def run!; end + + private + + # source://activesupport//lib/active_support/execution_wrapper.rb#146 + def hook_state; end + + class << self + # source://activesupport//lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _complete_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _run_callbacks=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/execution_wrapper.rb#118 + def active?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#114 + def active_key; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#110 + def error_reporter; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#100 + 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#50 + 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#66 + def run!(reset: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#21 + def to_complete(*args, &block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#17 + def to_run(*args, &block); end + + # Perform the work in the supplied block as an execution. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#86 + def wrap(source: T.unsafe(nil)); end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#32 +class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#33 + def after(target); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#33 + 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#10 +ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) + +# source://activesupport//lib/active_support/execution_wrapper.rb#25 +class ActiveSupport::ExecutionWrapper::RunHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#26 + 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 + +# = \File Update Checker +# +# FileUpdateChecker specifies the API used by \Rails to watch files +# and control reloading. The API depends on four methods: +# +# * +initialize+ which expects two parameters and one block as +# 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#35 +class ActiveSupport::FileUpdateChecker + # It accepts two parameters on initialization. The first is an array + # of files and the second is an optional hash of directories. The hash must + # 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#44 + def initialize(files, dirs = T.unsafe(nil), &block); end + + # Executes the given block and updates the latest watched files and + # timestamp. + # + # source://activesupport//lib/active_support/file_update_checker.rb#82 + def execute; end + + # Execute the block given if updated. + # + # source://activesupport//lib/active_support/file_update_checker.rb#92 + def execute_if_updated; end + + # Check if any of the entries were updated. If so, the watched and/or + # 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#63 + def updated?; end + + private + + # source://activesupport//lib/active_support/file_update_checker.rb#158 + def compile_ext(array); end + + # source://activesupport//lib/active_support/file_update_checker.rb#144 + def compile_glob(hash); end + + # source://activesupport//lib/active_support/file_update_checker.rb#154 + def escape(key); end + + # This method returns the maximum mtime of the files in +paths+, or +nil+ + # 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#122 + def max_mtime(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#111 + def updated_at(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#103 + def watched; end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#4 +module ActiveSupport::ForkTracker + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#31 + def after_fork(&block); end + + # source://activesupport//lib/active_support/fork_tracker.rb#19 + def after_fork_callback; end + + # source://activesupport//lib/active_support/fork_tracker.rb#27 + def hook!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#36 + def unregister(callback); end + end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#5 +module ActiveSupport::ForkTracker::CoreExt + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def _fork; end +end + +# = Active Support \Gzip +# +# 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#17 +module ActiveSupport::Gzip + class << self + # Compresses a string using gzip. + # + # source://activesupport//lib/active_support/gzip.rb#32 + def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end + + # Decompresses a gzipped string. + # + # source://activesupport//lib/active_support/gzip.rb#27 + def decompress(source); end + end +end + +# source://activesupport//lib/active_support/gzip.rb#18 +class ActiveSupport::Gzip::Stream < ::StringIO + # @return [Stream] a new instance of Stream + # + # source://activesupport//lib/active_support/gzip.rb#19 + def initialize(*_arg0); end + + # source://activesupport//lib/active_support/gzip.rb#23 + def close; end +end + +# = \Hash With Indifferent Access +# +# Implements a hash where keys :foo and "foo" are considered +# to be the same. +# +# 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#70 + 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#168 + 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#98 + 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#181 + def assoc(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#375 + def compact; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 + def deep_stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 + def deep_stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 + def deep_symbolize_keys; end + + # Same as Hash#default where the key passed as argument can be + # 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#223 + def default(key = T.unsafe(nil)); end + + # Removes the specified key from the hash. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 + 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#208 + 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#264 + 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#311 + 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#58 + 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#195 + 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#251 + 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#151 + 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#151 + 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#151 + 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#151 + def member?(key); end + + # This method has the same semantics of +update+, except it does not + # modify the receiver but rather returns a new hash with indifferent + # access with the result of the merge. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#273 + 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#132 + def merge!(*other_hashes, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#66 + def nested_under_indifferent_access; end + + def regular_update(*_arg0); end + def regular_writer(_arg0, _arg1); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#332 + 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#298 + 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#283 + def reverse_merge(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 + def reverse_merge!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#327 + def select(*args, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#365 + def slice(*keys); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#370 + 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#98 + def store(key, value); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#318 + def stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 + def stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 + def symbolize_keys; end + + # Convert to a regular hash with string keys. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#380 + def to_hash; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 + def to_options; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#325 + def to_options!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#387 + def to_proc; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#344 + def transform_keys(hash = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#349 + def transform_keys!(hash = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#337 + def transform_values(&block); end + + # Updates the receiver in-place, merging in the hashes passed as arguments: + # + # 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#132 + 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#237 + 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#283 + def with_defaults(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 + def with_defaults!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#62 + def with_indifferent_access; end + + # Returns a hash with indifferent access that includes everything except given keys. + # 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#311 + def without(*keys); end + + private + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#392 + def convert_key(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#396 + def convert_value(value, conversion: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#409 + def convert_value_to_hash(value); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#420 + def set_defaults(target); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#428 + def update_with_single_argument(other_hash, block); end + + class << self + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#85 + def [](*args); end + end +end + +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#342 +ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Object) + +# source://activesupport//lib/active_support/html_safe_translation.rb#4 +module ActiveSupport::HtmlSafeTranslation + extend ::ActiveSupport::HtmlSafeTranslation + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#30 + def html_safe_translation_key?(key); end + + # 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#35 + def html_escape_translation_options(options); end + + # source://activesupport//lib/active_support/html_safe_translation.rb#48 + def html_safe_translation(translation); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#43 + def i18n_option?(name); end +end + +# = Active Support \Inflector +# +# The Inflector transforms words from singular to plural, class names to table +# names, modularized class names to ones without, and class names to foreign +# keys. The default inflections for pluralization, singularization, and +# uncountable words are kept in inflections.rb. +# +# The \Rails core team has stated patches for the inflections library will not +# 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#70 + def camelize(term, uppercase_first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like \Rails does for table + # 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#218 + 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#289 + def constantize(camel_cased_word); end + + # Replaces underscores with dashes in the string. + # + # dasherize('puni_puni') # => "puni-puni" + # + # source://activesupport//lib/active_support/inflector/methods.rb#226 + 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#256 + 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#238 + def demodulize(path); end + + # Converts the first character in the string to lowercase. + # + # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" + # downcase_first('I') # => "i" + # downcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#175 + def downcase_first(string); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # foreign_key('Message') # => "message_id" + # foreign_key('Message', false) # => "messageid" + # foreign_key('Admin::Post') # => "post_id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#267 + def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Tweaks an attribute name for display to end users. + # + # 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#135 + def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Yields a singleton instance of Inflector::Inflections so you can specify + # 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#265 + 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#334 + 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#347 + 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#123 + def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # 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#33 + 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#315 + 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#50 + 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#204 + def tableize(class_name); end + + # Capitalizes all the words and replaces some characters in the string to + # create a nicer looking title. +titleize+ is meant for creating pretty + # output. It is not used in the \Rails internals. + # + # 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('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#192 + 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#99 + def underscore(camel_cased_word); end + + # Converts the first character in the string to uppercase. + # + # upcase_first('what a Lovely Day') # => "What a Lovely Day" + # upcase_first('w') # => "W" + # upcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#166 + 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#376 + 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#357 + def const_regexp(camel_cased_word); end +end + +# source://activesupport//lib/active_support/inflector/transliterate.rb#8 +ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) + +# = Active Support \Inflections +# +# A singleton instance of this class is yielded by Inflector.inflections, +# which can then be used to specify additional inflection rules. If passed +# an optional locale, rules for other languages can be specified. The +# 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#30 +class ActiveSupport::Inflector::Inflections + # @return [Inflections] a new instance of Inflections + # + # source://activesupport//lib/active_support/inflector/inflections.rb#80 + def initialize; end + + # Specifies a new acronym. An acronym must be specified as it will appear + # 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#142 + def acronym(word); end + + # Returns the value of attribute acronyms. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def acronyms; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#78 + def acronyms_camelize_regex; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#78 + 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#231 + 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#220 + def human(rule, replacement); end + + # Returns the value of attribute humans. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + 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#174 + 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#151 + def plural(rule, replacement); end + + # Returns the value of attribute plurals. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + 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#161 + def singular(rule, replacement); end + + # Returns the value of attribute singulars. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + 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#208 + def uncountable(*words); end + + # Returns the value of attribute uncountables. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def uncountables; end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#250 + def define_acronym_regex_patterns; end + + # Private, for the test suite. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#86 + def initialize_dup(orig); end + + class << self + # source://activesupport//lib/active_support/inflector/inflections.rb#65 + def instance(locale = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#69 + def instance_or_fallback(locale); end + end +end + +# source://activesupport//lib/active_support/inflector/inflections.rb#33 +class ActiveSupport::Inflector::Inflections::Uncountables < ::Array + # @return [Uncountables] a new instance of Uncountables + # + # source://activesupport//lib/active_support/inflector/inflections.rb#34 + def initialize; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#44 + def <<(*word); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#48 + def add(words); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#39 + def delete(entry); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/inflector/inflections.rb#55 + def uncountable?(str); end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#60 + def to_regex(string); end +end + +# = Inheritable Options +# +# +InheritableOptions+ provides a constructor to build an OrderedOptions +# hash inherited from another hash. +# +# 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' +# +# If the existing hash has string keys, call Hash#symbolize_keys on it. +# +# h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# source://activesupport//lib/active_support/ordered_options.rb#89 +class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions + # @return [InheritableOptions] a new instance of InheritableOptions + # + # source://activesupport//lib/active_support/ordered_options.rb#90 + def initialize(parent = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/ordered_options.rb#107 + def ==(other); end + + # source://activesupport//lib/active_support/ordered_options.rb#142 + def each(&block); end + + # source://activesupport//lib/active_support/ordered_options.rb#134 + def inheritable_copy; end + + # source://activesupport//lib/active_support/ordered_options.rb#111 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#126 + def key?(key); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#130 + def overridden?(key); end + + # source://activesupport//lib/active_support/ordered_options.rb#119 + def pretty_print(pp); end + + # source://activesupport//lib/active_support/ordered_options.rb#138 + def to_a; end + + # source://activesupport//lib/active_support/ordered_options.rb#103 + def to_h; end + + # source://activesupport//lib/active_support/ordered_options.rb#115 + def to_s; end + + private + + def own_key?(_arg0); end +end + +# source://activesupport//lib/active_support/isolated_execution_state.rb#5 +module ActiveSupport::IsolatedExecutionState + class << self + # source://activesupport//lib/active_support/isolated_execution_state.rb#36 + def [](key); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#40 + def []=(key, value); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#52 + def clear; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#56 + def context; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#48 + def delete(key); end + + # Returns the value of attribute isolation_level. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#12 + def isolation_level; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#14 + def isolation_level=(level); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#44 + def key?(key); end + + # Returns the value of attribute scope. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#12 + def scope; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#60 + def share_with(other); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#32 + def unique_id; end + + private + + # source://activesupport//lib/active_support/isolated_execution_state.rb#68 + def state; 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 + + # source://activesupport//lib/active_support/json/encoding.rb#22 + def dump(value, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/json/encoding.rb#22 + def encode(value, options = T.unsafe(nil)); end + + # Parses a JSON string (JavaScript Object Notation) into a hash. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} + # + # source://activesupport//lib/active_support/json/decoding.rb#22 + def load(json); end + + # Returns the class of the error that will be raised when there is an + # error in decoding JSON. Using this method means you won't directly + # 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#43 + def parse_error; end + + private + + # source://activesupport//lib/active_support/json/decoding.rb#48 + 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#28 +module ActiveSupport::JSON::Encoding + class << self + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#103 + def escape_html_entities_in_json; end + + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#103 + 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#111 + 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#111 + def json_encoder=(_arg0); end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#107 + def time_precision; end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#107 + def time_precision=(_arg0); end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#99 + def use_standard_json_time_format; end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#99 + def use_standard_json_time_format=(_arg0); end + end +end + +# source://activesupport//lib/active_support/json/encoding.rb#29 +class ActiveSupport::JSON::Encoding::JSONGemEncoder + # @return [JSONGemEncoder] a new instance of JSONGemEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#32 + def initialize(options = T.unsafe(nil)); end + + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#37 + def encode(value); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/json/encoding.rb#30 + def options; end + + private + + # Convert an object into a "JSON-ready" representation composed of + # primitives like Hash, Array, String, Symbol, Numeric, + # and +true+/+false+/+nil+. + # Recursively calls #as_json to the object to recursively build a + # fully JSON-ready object. + # + # 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#70 + def jsonify(value); end + + # Encode a "jsonified" Ruby data structure using the JSON gem + # + # source://activesupport//lib/active_support/json/encoding.rb#91 + def stringify(jsonified); end +end + +# = Key Generator +# +# 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#13 +class ActiveSupport::KeyGenerator + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#28 + def initialize(secret, options = T.unsafe(nil)); end + + # Returns a derived key suitable for use. The default +key_size+ is chosen + # to be compatible with the default settings of ActiveSupport::MessageVerifier. + # i.e. OpenSSL::Digest::SHA1#block_length + # + # source://activesupport//lib/active_support/key_generator.rb#41 + def generate_key(salt, key_size = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/key_generator.rb#45 + def inspect; end + + class << self + # source://activesupport//lib/active_support/key_generator.rb#23 + def hash_digest_class; end + + # source://activesupport//lib/active_support/key_generator.rb#15 + def hash_digest_class=(klass); end + end +end + +# = Lazy Load Hooks +# +# LazyLoadHooks allows \Rails to lazily load a lot of components and thus +# making the app boot faster. Because of this feature now there is no need to +# require +ActiveRecord::Base+ at boot time purely to apply +# 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#43 +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#60 + 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#75 + def run_load_hooks(name, base = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#91 + def execute_hook(name, base, options, block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#83 + def with_execution_control(name, block, once); end + + class << self + # source://activesupport//lib/active_support/lazy_load_hooks.rb#44 + def extended(base); end + end +end + +# = Active Support Log \Subscriber +# +# +ActiveSupport::LogSubscriber+ is an object set to consume +# ActiveSupport::Notifications with the sole purpose of logging them. +# The log subscriber dispatches notifications to a registered object based +# on its given namespace. +# +# An example would be Active Record log subscriber responsible for logging +# queries: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# attach_to :active_record +# +# def sql(event) +# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" +# end +# end +# end +# +# ActiveRecord::LogSubscriber.logger must be set as well, but it 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 +# +# +ActiveSupport::LogSubscriber+ also has some helpers to deal with +# logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure +# that all logs are flushed, and it is called in Rails::Rack::Logger after a +# request finishes. +# +# source://activesupport//lib/active_support/log_subscriber.rb#64 +class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://activesupport//lib/active_support/log_subscriber.rb#133 + def initialize; end + + # source://activesupport//lib/active_support/log_subscriber.rb#146 + def call(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging=(val); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def debug(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def error(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#158 + def event_levels=(_arg0); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def fatal(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def info(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#138 + def logger; end + + # source://activesupport//lib/active_support/log_subscriber.rb#152 + def publish_event(event); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/log_subscriber.rb#142 + def silenced?(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def unknown(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#163 + def warn(progname = T.unsafe(nil), &block); end + + private + + # Set color by using a symbol or one of the defined constants. Set modes + # by specifying bold, italic, or underline options. Inspired by Highline, + # this method will automatically clear formatting at the end of the returned String. + # + # source://activesupport//lib/active_support/log_subscriber.rb#172 + def color(text, color, mode_options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/log_subscriber.rb#186 + def log_exception(name, e); end + + # source://activesupport//lib/active_support/log_subscriber.rb#180 + def mode_from(options); end + + class << self + # source://activesupport//lib/active_support/log_subscriber.rb#99 + def attach_to(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging=(val); end + + # Flush all log_subscribers' logger. + # + # source://activesupport//lib/active_support/log_subscriber.rb#112 + def flush_all!; end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def log_levels; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def log_levels?; end + + # source://activesupport//lib/active_support/log_subscriber.rb#107 + def log_subscribers; end + + # source://activesupport//lib/active_support/log_subscriber.rb#93 + 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#105 + def logger=(_arg0); end + + private + + # source://activesupport//lib/active_support/log_subscriber.rb#117 + def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/log_subscriber.rb#121 + def set_event_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#127 + def subscribe_log_level(method, level); end + end +end + +# ANSI sequence colors +# +# source://activesupport//lib/active_support/log_subscriber.rb#74 +ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#78 +ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#80 +ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#76 +ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#86 +ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/log_subscriber.rb#79 +ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) + +# ANSI sequence modes +# +# source://activesupport//lib/active_support/log_subscriber.rb#66 +ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/log_subscriber.rb#75 +ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#81 +ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#77 +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#33 + 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 + # Returns true if the logger destination matches one of the sources + # + # logger = Logger.new(STDOUT) + # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) + # # => true + # + # logger = Logger.new('/var/log/rails.log') + # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/logger.rb#20 + def logger_outputs_to?(logger, *sources); end + + # source://activesupport//lib/active_support/logger.rb#47 + def normalize_sources(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#39 +class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter + # This method is invoked when a log event occurs + # + # source://activesupport//lib/active_support/logger.rb#41 + 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#7 +module ActiveSupport::LoggerThreadSafeLevel + extend ::ActiveSupport::Concern + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#30 + def level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#10 + def local_level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + 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#35 + def log_at(level); end + + private + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#43 + def local_level_key; end +end + +# = Active Support Message Encryptor +# +# MessageEncryptor is a simple way to encrypt values which get stored +# somewhere you don't trust. +# +# 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#90 +class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Rotator + + # 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. + # + # The first additional parameter is used as the signature key for + # MessageVerifier. This allows you to specify keys to encrypt and sign + # data. Ignored when using an AEAD cipher like 'aes-256-gcm'. + # + # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') + # + # ==== Options + # + # [+:cipher+] + # Cipher to use. Can be any cipher returned by +OpenSSL::Cipher.ciphers+. + # Default is 'aes-256-gcm'. + # + # [+:digest+] + # Digest used for signing. Ignored when using an AEAD cipher like + # 'aes-256-gcm'. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageEncryptor generates RFC 4648 compliant strings + # which are not URL-safe. In other words, they can contain "+" and "/". + # If you want to generate URL-safe strings (in compliance with "Base 64 + # Encoding with URL and Filename Safe Alphabet" in RFC 4648), you can + # pass +true+. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. + # + # @return [MessageEncryptor] a new instance of MessageEncryptor + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_encryptor.rb#256 + def create_message(value, **options); end + + # Decrypt and verify a message. We need to verify the message in order to + # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +decrypt_and_verify+ will return +nil+. + # + # message = encryptor.encrypt_and_sign("hello", purpose: "greeting") + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => "hello" + # encryptor.decrypt_and_verify(message) # => nil + # + # message = encryptor.encrypt_and_sign("bye") + # encryptor.decrypt_and_verify(message) # => "bye" + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_encryptor.rb#241 + def decrypt_and_verify(message, **options); end + + # Encrypt and sign a message. We need to sign the message in order to avoid + # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # ==== Options + # + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_at: Time.now.tomorrow) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_in: 24.hours) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #decrypt_and_verify.) + # + # source://activesupport//lib/active_support/message_encryptor.rb#220 + def encrypt_and_sign(value, **options); end + + # source://activesupport//lib/active_support/message_encryptor.rb#264 + def inspect; end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + private + + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#371 + def aead_mode; end + + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#371 + def aead_mode?; end + + # source://activesupport//lib/active_support/message_encryptor.rb#295 + def decrypt(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#277 + def encrypt(data); end + + # source://activesupport//lib/active_support/message_encryptor.rb#340 + def extract_part(encrypted_message, rindex, length); end + + # source://activesupport//lib/active_support/message_encryptor.rb#350 + def extract_parts(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#336 + def join_parts(parts); end + + # source://activesupport//lib/active_support/message_encryptor.rb#320 + def length_after_encode(length_before_encode); end + + # source://activesupport//lib/active_support/message_encryptor.rb#332 + def length_of_encoded_auth_tag; end + + # source://activesupport//lib/active_support/message_encryptor.rb#328 + def length_of_encoded_iv; end + + # source://activesupport//lib/active_support/message_encryptor.rb#367 + def new_cipher; end + + # source://activesupport//lib/active_support/message_encryptor.rb#269 + def sign(data); end + + # source://activesupport//lib/active_support/message_encryptor.rb#273 + def verify(data); end + + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#96 + def default_cipher; end + + # Given a cipher, returns the key length of the cipher to help generate the key of desired size + # + # source://activesupport//lib/active_support/message_encryptor.rb#252 + def key_len(cipher = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/message_encryptor.rb#93 + def use_authenticated_message_encryption; end + + # source://activesupport//lib/active_support/message_encryptor.rb#93 + def use_authenticated_message_encryption=(val); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#118 +ActiveSupport::MessageEncryptor::AUTH_TAG_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/message_encryptor.rb#115 +class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end + +# source://activesupport//lib/active_support/message_encryptor.rb#105 +module ActiveSupport::MessageEncryptor::NullSerializer + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#110 + def dump(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#106 + def load(value); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#116 +ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError + +# source://activesupport//lib/active_support/message_encryptor.rb#119 +ActiveSupport::MessageEncryptor::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/message_encryptors.rb#6 +class ActiveSupport::MessageEncryptors < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_encryptors.rb#135 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end + +# = Active Support Message Verifier +# +# +MessageVerifier+ makes it easy to generate and verify messages which are +# signed to prevent tampering. +# +# In a \Rails application, you can use +Rails.application.message_verifier+ +# to manage unique instances of verifiers for each use case. +# {Learn more}[link:classes/Rails/Application.html#method-i-message_verifier]. +# +# This is useful for cases like remember-me tokens and auto-unsubscribe links +# where the session store isn't suitable or available. +# +# First, generate a signed message: +# cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) +# +# Later verify that message: +# +# id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) +# if time.future? +# self.current_user = User.find(id) +# end +# +# === Signing is not encryption +# +# The signed messages are not encrypted. The payload is merely encoded (Base64 by default) and can be decoded by +# anyone. The signature is just assuring that the message wasn't tampered with. For example: +# +# message = Rails.application.message_verifier('my_purpose').generate('never put secrets here') +# # => "BAhJIhtuZXZlciBwdXQgc2VjcmV0cyBoZXJlBjoGRVQ=--a0c1c0827919da5e949e989c971249355735e140" +# Base64.decode64(message.split("--").first) # no key needed +# # => 'never put secrets here' +# +# If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. +# +# === Confine messages to a specific purpose +# +# It's not recommended to use the same verifier for different purposes in your application. +# Doing so could allow a malicious actor to re-use a signed message to perform an unauthorized +# action. +# You can reduce this risk by confining signed messages to a specific +:purpose+. +# +# token = @verifier.generate("signed message", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# @verifier.verified(token, purpose: :login) # => "signed message" +# @verifier.verified(token, purpose: :shipping) # => nil +# @verifier.verified(token) # => nil +# +# @verifier.verify(token, purpose: :login) # => "signed message" +# @verifier.verify(token, purpose: :shipping) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = @verifier.generate("signed message") +# @verifier.verified(token, purpose: :redirect) # => nil +# @verifier.verified(token) # => "signed message" +# +# @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "signed message" +# +# === Expiring messages +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# @verifier.generate("signed message", expires_in: 1.month) +# @verifier.generate("signed message", expires_at: Time.now.end_of_year) +# +# Messages can then be verified and returned until expiry. +# 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#110 +class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Rotator + + # Initialize a new MessageVerifier with a secret for the signature. + # + # ==== Options + # + # [+:digest+] + # Digest used for signing. The default is "SHA1". See + # +OpenSSL::Digest+ for alternatives. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageVerifier generates RFC 4648 compliant strings which are + # not URL-safe. In other words, they can contain "+" and "/". If you want to + # generate URL-safe strings (in compliance with "Base 64 Encoding with URL + # and Filename Safe Alphabet" in RFC 4648), you can pass +true+. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. + # + # @raise [ArgumentError] + # @return [MessageVerifier] a new instance of MessageVerifier + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#308 + def create_message(value, **options); end + + # Generates a signed message for the provided value. + # + # The message is signed with the +MessageVerifier+'s secret. + # Returns Base64-encoded message joined with the generated signature. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # verifier.generate("signed message") # => "BAhJIhNzaWduZWQgbWVzc2FnZQY6BkVU--f67d5f27c3ee0b8483cebf2103757455e947493b" + # + # ==== Options + # + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = verifier.generate("hello", expires_at: Time.now.tomorrow) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = verifier.generate("hello", expires_in: 24.hours) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #verified and #verify.) + # + # source://activesupport//lib/active_support/message_verifier.rb#304 + def generate(value, **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#316 + def inspect; end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + # Checks if a signed message could have been generated by signing an object + # with the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed 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#181 + def valid_message?(message); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # + # signed_message = verifier.generate("signed message") + # verifier.verified(signed_message) # => "signed message" + # + # Returns +nil+ if the message was not signed with the same secret. + # + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") + # 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 + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verified+ will return +nil+. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verified(message, purpose: "greeting") # => "hello" + # verifier.verified(message, purpose: "chatting") # => nil + # verifier.verified(message) # => nil + # + # message = verifier.generate("bye") + # verifier.verified(message) # => "bye" + # verifier.verified(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_verifier.rb#222 + def verified(message, **options); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") + # + # verifier.verify(signed_message) # => "signed message" + # + # Raises +InvalidSignature+ if the message was not signed with the same + # secret or was not Base64-encoded. + # + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") + # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verify+ will raise ActiveSupport::MessageVerifier::InvalidSignature. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verify(message, purpose: "greeting") # => "hello" + # verifier.verify(message, purpose: "chatting") # => raises InvalidSignature + # verifier.verify(message) # => raises InvalidSignature + # + # message = verifier.generate("bye") + # verifier.verify(message) # => "bye" + # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature + # + # source://activesupport//lib/active_support/message_verifier.rb#260 + def verify(message, **options); end + + private + + # source://activesupport//lib/active_support/message_verifier.rb#347 + def digest_length_in_hex; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#364 + def digest_matches_data?(digest, data); end + + # source://activesupport//lib/active_support/message_verifier.rb#326 + def extract_encoded(signed); end + + # source://activesupport//lib/active_support/message_verifier.rb#343 + def generate_digest(data); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#355 + def separator_at?(signed_message, index); end + + # source://activesupport//lib/active_support/message_verifier.rb#359 + def separator_index_for(signed_message); end + + # source://activesupport//lib/active_support/message_verifier.rb#321 + def sign_encoded(encoded); end +end + +# source://activesupport//lib/active_support/message_verifier.rb#113 +class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end + +# source://activesupport//lib/active_support/message_verifier.rb#115 +ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/message_verifier.rb#116 +ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/message_verifiers.rb#6 +class ActiveSupport::MessageVerifiers < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_verifiers.rb#131 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end + +# source://activesupport//lib/active_support/messages/rotation_coordinator.rb#6 +module ActiveSupport::Messages; end + +# source://activesupport//lib/active_support/messages/codec.rb#9 +class ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Metadata + + # @return [Codec] a new instance of Codec + # + # source://activesupport//lib/active_support/messages/codec.rb#15 + def initialize(**options); end + + private + + # source://activesupport//lib/active_support/messages/codec.rb#45 + def catch_and_ignore(throwable, &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#52 + def catch_and_raise(throwable, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#29 + def decode(encoded, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/codec.rb#39 + def deserialize(serialized); end + + # source://activesupport//lib/active_support/messages/codec.rb#25 + def encode(data, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/codec.rb#35 + def serialize(data); end + + # Returns the value of attribute serializer. + # + # source://activesupport//lib/active_support/messages/codec.rb#23 + def serializer; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/codec.rb#60 + def use_message_serializer_for_metadata?; end + + class << self + # source://activesupport//lib/active_support/class_attribute.rb#12 + def default_serializer; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def default_serializer=(new_value); end + end +end + +# source://activesupport//lib/active_support/messages/metadata.rb#9 +module ActiveSupport::Messages::Metadata + private + + # source://activesupport//lib/active_support/messages/metadata.rb#128 + def deserialize_from_json(serialized); end + + # source://activesupport//lib/active_support/messages/metadata.rb#141 + def deserialize_from_json_safe_string(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#43 + def deserialize_with_metadata(message, **expected_metadata); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#96 + def dual_serialized_metadata_envelope_json?(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#78 + def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#92 + def metadata_envelope?(object); end + + # source://activesupport//lib/active_support/messages/metadata.rb#114 + def parse_expiry(expires_at); end + + # source://activesupport//lib/active_support/messages/metadata.rb#100 + def pick_expiry(expires_at, expires_in); end + + # source://activesupport//lib/active_support/messages/metadata.rb#124 + def serialize_to_json(data); end + + # source://activesupport//lib/active_support/messages/metadata.rb#137 + def serialize_to_json_safe_string(data); end + + # source://activesupport//lib/active_support/messages/metadata.rb#30 + def serialize_with_metadata(data, **metadata); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#60 + def use_message_serializer_for_metadata?; end + + # source://activesupport//lib/active_support/messages/metadata.rb#64 + def wrap_in_metadata_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/metadata.rb#71 + def wrap_in_metadata_legacy_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata; end + + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata=(_arg0); end + end +end + +# source://activesupport//lib/active_support/messages/metadata.rb#12 +ActiveSupport::Messages::Metadata::ENVELOPE_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/messages/metadata.rb#19 +ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/messages/rotation_configuration.rb#5 +class ActiveSupport::Messages::RotationConfiguration + # @return [RotationConfiguration] a new instance of RotationConfiguration + # + # 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/rotation_coordinator.rb#7 +class ActiveSupport::Messages::RotationCoordinator + # @raise [ArgumentError] + # @return [RotationCoordinator] a new instance of RotationCoordinator + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#10 + def initialize(&secret_generator); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#18 + def [](salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#22 + def []=(salt, codec); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#39 + def clear_rotations; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#45 + def on_rotation(&callback); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#26 + def rotate(**options, &block); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#35 + def rotate_defaults; end + + # Returns the value of attribute transitional. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional; end + + # Sets the attribute transitional + # + # @param value the value to set the attribute transitional to. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional=(_arg0); end + + private + + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#88 + def build(salt, secret_generator:, secret_generator_options:, **options); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#76 + def build_with_rotations(salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#51 + def changing_configuration!; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#62 + def normalize_options(options); end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#5 +module ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#18 + def fall_back_to(fallback); end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#14 + def rotate(*args, **options); end + + private + + # source://activesupport//lib/active_support/messages/rotator.rb#44 + def build_rotation(*args, **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#48 + def catch_rotation_error(&block); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#8 +module ActiveSupport::Messages::SerializerWithFallback + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#33 + def detect_format(dumped); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#44 + def fallback?(format); end + + class << self + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#9 + def [](format); end + end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#48 +module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#50 + def fallback?(format); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#78 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#90 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#86 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#96 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#82 + def format; end + + private + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#101 + def detect_format(dumped); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#94 +ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback::JSON_START_WITH = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#107 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#55 +module ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#67 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#63 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#73 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#59 + def format; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#71 +ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#113 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#125 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#121 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#129 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#117 + def format; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#134 + def available?; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#143 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#149 +ActiveSupport::Messages::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/multibyte.rb#4 +module ActiveSupport::Multibyte + class << self + # 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 + +# = Active Support \Multibyte \Chars +# +# Chars enables you to work transparently with UTF-8 encoding in the Ruby +# String class without having extensive knowledge about the encoding. A +# Chars object accepts a string upon initialization and proxies String +# 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#47 +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#56 + def initialize(string); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def <=>(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def =~(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def acts_like_string?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#161 + 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#140 + 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#132 + 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#148 + 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#115 + def limit(limit); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def match?(*_arg0, **_arg1, &_arg2); end + + # Forward all undefined methods to the wrapped string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#62 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # Reverses all characters in the string. + # + # 'Café'.mb_chars.reverse.to_s # => 'éfaC' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#106 + def reverse; end + + # source://activesupport//lib/active_support/multibyte/chars.rb#166 + 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#96 + 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#83 + 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#157 + def tidy_bytes(force = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#166 + 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#123 + 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#123 + def titleize; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#49 + def to_s; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#49 + def to_str; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#49 + def wrapped_string; end + + private + + # source://activesupport//lib/active_support/multibyte/chars.rb#173 + 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#74 + 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#30 + def tidy_bytes(string, force = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/multibyte/unicode.rb#37 + 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 |event| +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# event.allocations # => 1826 (objects) +# end +# +# +Event+ objects record CPU time and allocations. If you don't need this +# it's also possible to pass a block that accepts five arguments: +# +# 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 # => Float, monotonic time when the instrumented block started execution +# finish # => Float, monotonic time when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# For instance, let's store all "render" events in an array: +# +# events = [] +# +# ActiveSupport::Notifications.subscribe('render') do |event| +# events << event +# 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 } +# event.allocations # => 1826 (objects) +# +# 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 {|event| ... } +# 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 |event| +# ... +# 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#7 +module ActiveSupport::Notifications + class << self + # source://activesupport//lib/active_support/notifications.rb#208 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications.rb#269 + 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#254 + 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#198 + def notifier; end + + # Sets the attribute notifier + # + # @param value the value to set the attribute notifier to. + # + # source://activesupport//lib/active_support/notifications.rb#198 + def notifier=(_arg0); end + + # source://activesupport//lib/active_support/notifications.rb#200 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications.rb#204 + 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. + # + # If the block passed to the method only takes one argument, + # it will yield an +Event+ object to the block: + # + # ActiveSupport::Notifications.subscribe(/render/) do |event| + # @event = event + # end + # + # Otherwise the +block+ will receive five arguments 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 + # + # Raises an error if invalid event name type is passed: + # + # ActiveSupport::Notifications.subscribe(:render) {|event| ...} + # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) + # + # source://activesupport//lib/active_support/notifications.rb#244 + def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#258 + def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#265 + def unsubscribe(subscriber_or_name); end + + private + + # source://activesupport//lib/active_support/notifications.rb#274 + def registry; end + end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#106 +class ActiveSupport::Notifications::Event + # @return [Event] a new instance of Event + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 + def initialize(name, start, ending, transaction_id, payload); end + + # Returns the number of allocations made between the call to #start! and + # the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#176 + def allocations; end + + # Returns the CPU time (in milliseconds) passed between the call to + # #start! and the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#163 + 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 |event| + # @event = event + # end + # + # ActiveSupport::Notifications.instrument('wait') do + # sleep 1 + # end + # + # @event.duration # => 1000.138 + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#198 + def duration; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#128 + def end; end + + # Record information at the time this event finishes + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#154 + def finish!; end + + # Returns the time spent in GC (in milliseconds) between the call to #start! + # and the call to #finish! + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#182 + def gc_time; end + + # Returns the idle time time (in milliseconds) passed between the call to + # #start! and the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#169 + def idle_time; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 + def name; end + + # Returns the value of attribute payload. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 + def payload; end + + # Sets the attribute payload + # + # @param value the value to set the attribute payload to. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 + def payload=(_arg0); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 + def record; end + + # Record information at the time this event starts + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#146 + def start!; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#124 + def time; end + + # Returns the value of attribute transaction_id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 + def transaction_id; end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#203 + def now; end + + # Likely on JRuby, TruffleRuby + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#230 + def now_allocations; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#210 + def now_cpu; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#220 + def now_gc; 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#50 +class ActiveSupport::Notifications::Fanout + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [Fanout] a new instance of Fanout + # + # source://activesupport//lib/active_support/notifications/fanout.rb#51 + def initialize; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#298 + def all_listeners_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#273 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#102 + def clear_cache(key = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#284 + def finish(name, id, payload, listeners = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#188 + def groups_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#60 + def inspect; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#307 + def listeners_for(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#311 + def listening?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#290 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#294 + def publish_event(event); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#277 + def start(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#65 + def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#82 + def unsubscribe(subscriber_or_name); end + + # This is a sync queue, so there is no waiting. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#316 + def wait; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#114 +class ActiveSupport::Notifications::Fanout::BaseGroup + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [BaseGroup] a new instance of BaseGroup + # + # source://activesupport//lib/active_support/notifications/fanout.rb#117 + def initialize(listeners, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#121 + def each(&block); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#126 +class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#131 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#127 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#167 +class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#173 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#168 + def start(name, id, payload); end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#183 + def build_event(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#153 +class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#160 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#154 + def start(name, id, payload); end +end + +# A +Handle+ is used to record the start and finish time of event. +# +# Both #start and #finish must each be called exactly once. +# +# Where possible, it's best to use the block form: ActiveSupport::Notifications.instrument. +# +Handle+ is a low-level API intended for cases where the block form can't be used. +# +# handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) +# begin +# handle.start +# # work to be instrumented +# ensure +# handle.finish +# end +# +# source://activesupport//lib/active_support/notifications/fanout.rb#228 +class ActiveSupport::Notifications::Fanout::Handle + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [Handle] a new instance of Handle + # + # source://activesupport//lib/active_support/notifications/fanout.rb#231 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#250 + def finish; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#254 + def finish_with_values(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#241 + def start; end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#264 + def ensure_state!(expected); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#139 +class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#141 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#319 +module ActiveSupport::Notifications::Fanout::Subscribers + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#320 + def new(pattern, listener, monotonic); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#434 +class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#435 + def group_class; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#439 + def publish_event(event); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#376 +class ActiveSupport::Notifications::Fanout::Subscribers::Evented + # @return [Evented] a new instance of Evented + # + # source://activesupport//lib/active_support/notifications/fanout.rb#379 + def initialize(pattern, delegate); end + + # Returns the value of attribute delegate. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#377 + def delegate; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#387 + def group_class; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#377 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#391 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#397 + def publish_event(event); end + + # Returns the value of attribute silenceable. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#377 + def silenceable; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#405 + def silenced?(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#409 + def subscribed_to?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#413 + def unsubscribe!(name); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#339 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher + # @return [Matcher] a new instance of Matcher + # + # source://activesupport//lib/active_support/notifications/fanout.rb#352 + def initialize(pattern); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#361 + def ===(name); end + + # Returns the value of attribute exclusions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#340 + def exclusions; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#340 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#357 + def unsubscribe!(name); end + + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#342 + def wrap(pattern); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#365 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages + # source://activesupport//lib/active_support/notifications/fanout.rb#366 + def ===(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#370 + def unsubscribe!(*_arg0); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#428 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed + # source://activesupport//lib/active_support/notifications/fanout.rb#429 + def group_class; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#418 +class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#419 + def group_class; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#423 + def publish(name, *args); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#146 +class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#148 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#19 +module ActiveSupport::Notifications::FanoutIteration + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#21 + def iterate_guarding_exceptions(collection); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#9 +class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError + # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError + # + # source://activesupport//lib/active_support/notifications/fanout.rb#12 + def initialize(exceptions); end + + # Returns the value of attribute exceptions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#10 + def exceptions; end +end + +# Instrumenters are stored in a thread local. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#9 +class ActiveSupport::Notifications::Instrumenter + # @return [Instrumenter] a new instance of Instrumenter + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#12 + def initialize(notifier); end + + # Returns a "handle" for an event with the given +name+ and +payload+. + # + # #start and #finish must each be called exactly once on the returned object. + # + # Where possible, it's best to use #instrument, which will record the + # start and finish of the event and correctly handle any exceptions. + # +build_handle+ is a low-level API intended for cases where using + # +instrument+ isn't possible. + # + # See ActiveSupport::Notifications::Fanout::Handle. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#78 + def build_handle(name, payload); end + + # Send a finish notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#92 + def finish(name, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 + def finish_with_state(listeners_state, name, payload); end + + # Returns the value of attribute id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#10 + 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#54 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#82 + def new_event(name, payload = T.unsafe(nil)); end + + # Send a start notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#87 + def start(name, payload); end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#101 + def unique_id; end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#21 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle + # @return [LegacyHandle] a new instance of LegacyHandle + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#45 + def finish; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#41 + def start; end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#22 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#23 + def initialize(notifier); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#27 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def finish(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def start(*_arg0, **_arg1, &_arg2); end +end + +# = Number Helper +# +# Provides methods for formatting numbers into currencies, percentages, +# phone numbers, and more. +# +# Example usage in a class: +# class Topic +# include ActiveSupport::NumberHelper +# +# def price +# number_to_currency(@price) +# end +# end +# +# Example usage in a module: +# require "active_support/number_helper" +# +# module NumberFormatting +# def format_price(price) +# ActiveSupport::NumberHelper.number_to_currency(price) +# end +# end +# +# source://activesupport//lib/active_support/number_helper.rb#26 +module ActiveSupport::NumberHelper + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::NumberHelper + + # Formats a +number+ into a currency string. + # + # number_to_currency(1234567890.50) # => "$1,234,567,890.50" + # number_to_currency(1234567890.506) # => "$1,234,567,890.51" + # number_to_currency("12x34") # => "$12x34" + # + # number_to_currency(1234567890.50, unit: "£", separator: ",", delimiter: "") + # # => "£1234567890,50" + # + # The currency unit and number formatting of the current locale will be used + # unless otherwise specified via options. No currency conversion is + # performed. If the user is given a way to change their locale, they will + # also be able to change the relative value of the currency displayed with + # this helper. If your application will ever support multiple locales, you + # may want to specify a constant +:locale+ option or consider using a + # library capable of currency conversion. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_currency(1234567890.506, locale: :fr) + # # => "1 234 567 890,51 €" + # + # [+:precision+] + # The level of precision. Defaults to 2. + # + # number_to_currency(1234567890.123, precision: 3) # => "$1,234,567,890.123" + # number_to_currency(0.456789, precision: 0) # => "$0" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_currency(1234567890.01, precision: 0, round_mode: :up) + # # => "$1,234,567,891" + # + # [+:unit+] + # The denomination of the currency. Defaults to "$". + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:format+] + # The format for non-negative numbers. %u represents the currency, + # and %n represents the number. Defaults to "%u%n". + # + # number_to_currency(1234567890.50, format: "%n %u") + # # => "1,234,567,890.50 $" + # + # [+:negative_format+] + # The format for negative numbers. %u and %n behave the + # same as in +:format+, but %n represents the absolute value of + # the number. Defaults to the value of +:format+ prepended with -. + # + # number_to_currency(-1234567890.50, negative_format: "(%u%n)") + # # => "($1,234,567,890.50)" + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" + # + # source://activesupport//lib/active_support/number_helper.rb#161 + def number_to_currency(number, options = T.unsafe(nil)); end + + # Formats +number+ by grouping thousands with a delimiter. + # + # number_to_delimited(12345678) # => "12,345,678" + # number_to_delimited("123456") # => "123,456" + # number_to_delimited(12345678.9876) # => "12,345,678.9876" + # number_to_delimited("12x34") # => "12x34" + # + # number_to_delimited(12345678.9876, delimiter: ".", separator: ",") + # # => "12.345.678,9876" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_delimited(12345678.05, locale: :fr) + # # => "12 345 678,05" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # number_to_delimited(12345678, delimiter: ".") + # # => "12.345.678" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_delimited(12345678.05, separator: " ") + # # => "12,345,678 05" + # + # [+:delimiter_pattern+] + # A regexp to determine the placement of delimiters. Helpful when using + # currency formats like INR. + # + # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) + # # => "1,23,456.78" + # + # source://activesupport//lib/active_support/number_helper.rb#264 + def number_to_delimited(number, options = T.unsafe(nil)); end + + # Formats +number+ into a more human-friendly representation. Useful for + # numbers that can become very large and too hard to read. + # + # number_to_human(123) # => "123" + # number_to_human(1234) # => "1.23 Thousand" + # number_to_human(12345) # => "12.3 Thousand" + # number_to_human(1234567) # => "1.23 Million" + # number_to_human(1234567890) # => "1.23 Billion" + # number_to_human(1234567890123) # => "1.23 Trillion" + # number_to_human(1234567890123456) # => "1.23 Quadrillion" + # number_to_human(1234567890123456789) # => "1230 Quadrillion" + # + # See #number_to_human_size if you want to pretty-print a file size. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # [+:precision+] + # The level of precision. Defaults to 3. + # + # number_to_human(123456, precision: 2) # => "120 Thousand" + # number_to_human(123456, precision: 4) # => "123.5 Thousand" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_human(123456, precision: 2, round_mode: :up) + # # => "130 Thousand" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human(123456, precision: 4, separator: ",") + # # => "123,5 Thousand" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # number_to_human(1000000) # => "1 Million" + # number_to_human(1000000, strip_insignificant_zeros: false) # => "1.00 Million" + # number_to_human(10.01) # => "10" + # number_to_human(10.01, strip_insignificant_zeros: false) # => "10.0" + # + # [+:format+] + # The format of the output. %n represents the number, and + # %u represents the quantifier (e.g., "Thousand"). Defaults to + # "%n %u". + # + # [+:units+] + # A Hash of custom unit quantifier names. + # + # number_to_human(1, units: { unit: "m", thousand: "km" }) # => "1 m" + # number_to_human(100, units: { unit: "m", thousand: "km" }) # => "100 m" + # number_to_human(1000, units: { unit: "m", thousand: "km" }) # => "1 km" + # number_to_human(100000, units: { unit: "m", thousand: "km" }) # => "100 km" + # number_to_human(10000000, units: { unit: "m", thousand: "km" }) # => "10000 km" + # + # The following keys are supported for integer units: +:unit+, +:ten+, + # +:hundred+, +:thousand+, +:million+, +:billion+, +:trillion+, + # +:quadrillion+. Additionally, the following keys are supported for + # fractional units: +:deci+, +:centi+, +:mili+, +:micro+, +:nano+, + # +:pico+, +:femto+. + # + # The Hash can also be defined as a scope in an I18n locale. For example: + # + # en: + # distance: + # centi: + # one: "centimeter" + # other: "centimeters" + # unit: + # one: "meter" + # other: "meters" + # thousand: + # one: "kilometer" + # other: "kilometers" + # + # Then it can be specified by name: + # + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(100, units: :distance) # => "100 meters" + # number_to_human(1000, units: :distance) # => "1 kilometer" + # number_to_human(100000, units: :distance) # => "100 kilometers" + # number_to_human(10000000, units: :distance) # => "10000 kilometers" + # number_to_human(0.1, units: :distance) # => "10 centimeters" + # number_to_human(0.01, units: :distance) # => "1 centimeter" + # + # source://activesupport//lib/active_support/number_helper.rb#475 + def number_to_human(number, options = T.unsafe(nil)); end + + # Formats +number+ as bytes into a more human-friendly representation. + # Useful for reporting file sizes to users. + # + # number_to_human_size(123) # => "123 Bytes" + # number_to_human_size(1234) # => "1.21 KB" + # number_to_human_size(12345) # => "12.1 KB" + # number_to_human_size(1234567) # => "1.18 MB" + # number_to_human_size(1234567890) # => "1.15 GB" + # number_to_human_size(1234567890123) # => "1.12 TB" + # number_to_human_size(1234567890123456) # => "1.1 PB" + # number_to_human_size(1234567890123456789) # => "1.07 EB" + # + # See #number_to_human if you want to pretty-print a generic number. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # [+:precision+] + # The level of precision. Defaults to 3. + # + # number_to_human_size(123456, precision: 2) # => "120 KB" + # number_to_human_size(1234567, precision: 2) # => "1.2 MB" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_human_size(123456, precision: 2, round_mode: :up) + # # => "130 KB" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human_size(1234567, separator: ",") + # # => "1,18 MB" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # source://activesupport//lib/active_support/number_helper.rb#373 + def number_to_human_size(number, options = T.unsafe(nil)); end + + # Formats +number+ as a percentage string. + # + # number_to_percentage(100) # => "100.000%" + # number_to_percentage("99") # => "99.000%" + # number_to_percentage("99x") # => "99x%" + # + # number_to_percentage(12345.6789, delimiter: ".", separator: ",", precision: 2) + # # => "12.345,68%" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_percentage(1000, locale: :fr) + # # => "1000,000%" + # + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 2. + # + # number_to_percentage(12.3456789, precision: 4) # => "12.3457%" + # number_to_percentage(99.999, precision: 0) # => "100%" + # number_to_percentage(99.999, precision: nil) # => "99.999%" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_percentage(12.3456789, precision: 4, round_mode: :down) + # # => "12.3456%" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. + # + # number_to_percentage(12345.6789) # => "12345.679%" + # number_to_percentage(12345.6789, significant: true) # => "12300%" + # number_to_percentage(12345.6789, precision: 2) # => "12345.68%" + # number_to_percentage(12345.6789, precision: 2, significant: true) # => "12000%" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # [+:format+] + # The format of the output. %n represents the number. Defaults to + # "%n%". + # + # number_to_percentage(100, format: "%n %") + # # => "100.000 %" + # + # source://activesupport//lib/active_support/number_helper.rb#223 + def number_to_percentage(number, options = T.unsafe(nil)); end + + # Formats +number+ into a phone number. + # + # number_to_phone(5551234) # => "555-1234" + # number_to_phone("5551234") # => "555-1234" + # number_to_phone(1235551234) # => "123-555-1234" + # number_to_phone("12x34") # => "12x34" + # + # number_to_phone(1235551234, delimiter: ".", country_code: 1, extension: 1343) + # # => "+1.123.555.1234 x 1343" + # + # ==== Options + # + # [+:area_code+] + # Whether to use parentheses for the area code. Defaults to false. + # + # number_to_phone(1235551234, area_code: true) + # # => "(123) 555-1234" + # + # [+:delimiter+] + # The digit group delimiter to use. Defaults to "-". + # + # number_to_phone(1235551234, delimiter: " ") + # # => "123 555 1234" + # + # [+:country_code+] + # A country code to prepend. + # + # number_to_phone(1235551234, country_code: 1) + # # => "+1-123-555-1234" + # + # [+:extension+] + # An extension to append. + # + # number_to_phone(1235551234, extension: 555) + # # => "123-555-1234 x 555" + # + # [+:pattern+] + # A regexp that specifies how the digits should be grouped. The first + # three captures from the regexp are treated as digit groups. + # + # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) + # # => "133-1234-5678" + # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) + # # => "(755) 6123-4567" + # + # source://activesupport//lib/active_support/number_helper.rb#88 + def number_to_phone(number, options = T.unsafe(nil)); end + + # Formats +number+ to a specific level of precision. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 0) # => "12345" + # number_to_rounded(12345, precision: 5) # => "12345.00000" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_rounded(111.234, locale: :fr) + # # => "111,234" + # + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 3. + # + # number_to_rounded(12345.6789, precision: nil) + # # => "12345.6789" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_rounded(12.34, precision: 0, round_mode: :up) + # # => "13" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, significant: true) # => "12300" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 2, significant: true) # => "12000" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_rounded(12.34, strip_insignificant_zeros: false) # => "12.340" + # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" + # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" + # + # source://activesupport//lib/active_support/number_helper.rb#320 + def number_to_rounded(number, options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#12 +class ActiveSupport::NumberHelper::NumberConverter + # @return [NumberConverter] a new instance of NumberConverter + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#124 + def initialize(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#130 + def execute; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace?; end + + # Returns the value of attribute number. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 + def number; end + + # Returns the value of attribute opts. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 + def opts; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float?; end + + private + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#149 + def default_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#174 + def default_value(key); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#145 + def format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#155 + def i18n_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#141 + def options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#170 + def translate_in_locale(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#166 + def translate_number_value_with_default(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#178 + def valid_bigdecimal; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#120 + def convert(number, options); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace?; end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def validate_float; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float?; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#21 +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/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); 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/class_attribute.rb#12 + def validate_float; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); 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/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def validate_float; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); 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/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def validate_float; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); 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/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 +class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#9 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#16 + def convert_to_phone_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#24 + def convert_with_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#31 + def convert_without_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#47 + def country_code(code); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#43 + def delimiter; end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#51 + def phone_ext(ext); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#55 + def regexp_pattern(default_pattern); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#39 + 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/class_attribute.rb#12 + def namespace; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def validate_float; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); 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 + # \Numeric With Format + # + # Provides options for converting numbers into formatted strings. + # Options are provided for phone numbers, currency, percentage, + # precision, positional notation, file size, and pretty printing. + # + # 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#113 + def to_formatted_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + + # \Numeric With Format + # + # Provides options for converting numbers into formatted strings. + # Options are provided for phone numbers, currency, percentage, + # precision, positional notation, file size, and pretty printing. + # + # 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#113 + 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?(*_arg0, **_arg1, &_arg2); 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 + +# = Ordered Options +# +# +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#33 +class ActiveSupport::OrderedOptions < ::Hash + # source://activesupport//lib/active_support/ordered_options.rb#41 + def [](key); end + + # source://activesupport//lib/active_support/ordered_options.rb#37 + def []=(key, value); end + + # source://activesupport//lib/active_support/ordered_options.rb#45 + def dig(key, *identifiers); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#64 + def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_options.rb#68 + def inspect; end + + # source://activesupport//lib/active_support/ordered_options.rb#49 + def method_missing(method, *args); end + + protected + + # preserve the original #[] method + def _get(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#60 + def respond_to_missing?(name, include_private); end +end + +# = Active Support Parameter Filter +# +# +ParameterFilter+ replaces values in a Hash-like object if their +# keys match one of the specified filters. +# +# Matching based on nested keys is possible by using dot notation, e.g. +# "credit_card.number". +# +# If a proc is given as a filter, each key and value of the Hash-like +# and of any nested Hashes will be passed to it. The value or key can +# then be mutated as desired using methods such as String#replace. +# +# # Replaces values with "[FILTERED]" for keys that match /password/i. +# ActiveSupport::ParameterFilter.new([:password]) +# +# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. +# ActiveSupport::ParameterFilter.new([:foo, "bar"]) +# +# # Replaces values for the exact key "pin" and for keys that begin with +# # "pin_". Does not match keys that otherwise include "pin" as a +# # substring, such as "shipping_id". +# ActiveSupport::ParameterFilter.new([/\Apin\z/, /\Apin_/]) +# +# # Replaces the value for :code in `{ credit_card: { code: "xxxx" } }`. +# # Does not change `{ file: { code: "xxxx" } }`. +# ActiveSupport::ParameterFilter.new(["credit_card.code"]) +# +# # Reverses values for keys that match /secret/i. +# ActiveSupport::ParameterFilter.new([-> (k, v) do +# v.reverse! if /secret/i.match?(k) +# end]) +# +# source://activesupport//lib/active_support/parameter_filter.rb#39 +class ActiveSupport::ParameterFilter + # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. + # Other types of filters are treated as +String+ using +to_s+. + # 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#77 + def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end + + # Mask value of +params+ if key matches one of filters. + # + # source://activesupport//lib/active_support/parameter_filter.rb#83 + def filter(params); end + + # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. + # + # source://activesupport//lib/active_support/parameter_filter.rb#88 + def filter_param(key, value); end + + private + + # source://activesupport//lib/active_support/parameter_filter.rb#125 + def call(params, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/parameter_filter.rb#93 + def compile_filters!(filters); end + + # source://activesupport//lib/active_support/parameter_filter.rb#135 + def value_for_key(key, value, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end + + class << self + # Precompiles an array of filters that otherwise would be passed directly to + # #initialize. Depending on the quantity and types of filters, + # precompilation can improve filtering performance, especially in the case + # where the ParameterFilter instance itself cannot be retained (but the + # precompiled filters can be retained). + # + # filters = [/foo/, :bar, "nested.baz", /nested\.qux/] + # + # precompiled = ActiveSupport::ParameterFilter.precompile_filters(filters) + # # => [/(?-mix:foo)|(?i:bar)/, /(?i:nested\.baz)|(?-mix:nested\.qux)/] + # + # ActiveSupport::ParameterFilter.new(precompiled) + # + # source://activesupport//lib/active_support/parameter_filter.rb#55 + def precompile_filters(filters); end + end +end + +# source://activesupport//lib/active_support/parameter_filter.rb#40 +ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/proxy_object.rb#4 +class ActiveSupport::ProxyObject < ::BasicObject + # Let ActiveSupport::ProxyObject at least raise exceptions. + # + # source://activesupport//lib/active_support/proxy_object.rb#9 + def raise(*args); end + + class << self + # @private + # + # source://activesupport//lib/active_support/proxy_object.rb#13 + def inherited(_subclass); end + end +end + +# source://activesupport//lib/active_support/railtie.rb#7 +class ActiveSupport::Railtie < ::Rails::Railtie; end + +# = \Range With Format +# +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 +module ActiveSupport::RangeWithFormat + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # 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'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" + # + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs + # You can add your own formats to the Range::RANGE_FORMATS hash. + # Use the format name as the hash key and a Proc instance. + # + # # config/initializers/range_formats.rb + # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 + 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'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" + # + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs + # You can add your own formats to the Range::RANGE_FORMATS hash. + # Use the format name as the hash key and a Proc instance. + # + # # config/initializers/range_formats.rb + # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 + def to_fs(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#6 +ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) + +# = Active Support \Reloader +# +# This class defines several callbacks: +# +# to_prepare -- Run once at application startup, and also from +# +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#28 +class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper + # @return [Reloader] a new instance of Reloader + # + # source://activesupport//lib/active_support/reloader.rb#99 + def initialize; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_class_unload_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_prepare_callbacks(&block); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check?; end + + # source://activesupport//lib/active_support/reloader.rb#126 + def class_unload!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#131 + def complete!; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor?; end + + # Release the unload lock if it has been previously obtained + # + # source://activesupport//lib/active_support/reloader.rb#114 + def release_unload_lock!; end + + # Acquire the ActiveSupport::Dependencies::Interlock unload lock, + # ensuring it will be released automatically + # + # source://activesupport//lib/active_support/reloader.rb#106 + def require_unload_lock!; end + + # source://activesupport//lib/active_support/reloader.rb#121 + def run!; end + + class << self + # source://activesupport//lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _class_unload_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _prepare_callbacks=(value); end + + # Registers a callback that will run immediately after the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#44 + def after_class_unload(*args, &block); end + + # Registers a callback that will run immediately before the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#39 + def before_class_unload(*args, &block); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#87 + def check!; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def check=(new_value); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check?; end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def executor; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def executor=(new_value); end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor?; end + + # source://activesupport//lib/active_support/reloader.rb#95 + def prepare!; end + + # Initiate a manual reload + # + # source://activesupport//lib/active_support/reloader.rb#51 + def reload!; end + + # source://activesupport//lib/active_support/reloader.rb#91 + def reloaded!; end + + # source://activesupport//lib/active_support/reloader.rb#62 + def run!(reset: T.unsafe(nil)); end + + # Registers a callback that will run once at application startup and every time the code is reloaded. + # + # source://activesupport//lib/active_support/reloader.rb#34 + def to_prepare(*args, &block); end + + # Run the supplied block as a work unit, reloading code as needed + # + # source://activesupport//lib/active_support/reloader.rb#71 + def wrap(**kwargs); end + end +end + +# = Active Support \Rescuable +# +# Rescuable module adds support for easier exception handling. +# +# source://activesupport//lib/active_support/rescuable.rb#11 +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#172 + def handler_for_rescue(exception); end + + # Delegates to the class method, but uses the instance as the subject for + # rescue_from handlers (method calls, +instance_exec+ blocks). + # + # source://activesupport//lib/active_support/rescuable.rb#166 + 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#18 +module ActiveSupport::Rescuable::ClassMethods + # source://activesupport//lib/active_support/rescuable.rb#105 + def handler_for_rescue(exception, object: T.unsafe(nil)); end + + # Registers exception classes with a handler to be called by rescue_with_handler. + # + # 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#53 + 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#90 + def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/rescuable.rb#139 + def constantize_rescue_handler_class(class_or_name); end + + # source://activesupport//lib/active_support/rescuable.rb#124 + def find_rescue_handler(exception); end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 +class ActiveSupport::SafeBuffer < ::String + # @return [SafeBuffer] a new instance of SafeBuffer + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#70 + def initialize(str = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#123 + def %(args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#116 + def *(_); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#112 + def +(other); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#80 + def <<(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 + def [](*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#104 + def []=(arg1, arg2, arg3 = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#88 + def bytesplice(*args, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def capitalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def capitalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def chomp(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chomp!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def chop(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chop!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#59 + def chr; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#80 + def concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def delete(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def delete_prefix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_prefix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def delete_suffix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_suffix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def downcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def downcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#146 + def encode_with(coder); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#167 + def gsub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#178 + def gsub!(*args, &block); end + + # Returns the value of attribute html_safe. + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#134 + def html_safe?; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#92 + def insert(index, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def lstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def lstrip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def next(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def next!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#96 + def prepend(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#100 + def replace(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def reverse(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def reverse!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def rstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def rstrip!(*args); end + + # @raise [SafeConcatError] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#65 + def safe_concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def scrub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def scrub!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 + def slice(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#51 + def slice!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def squeeze(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def squeeze!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def strip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def strip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#167 + def sub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#178 + def sub!(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def succ(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def succ!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def swapcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def swapcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#142 + def to_param; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#138 + def to_s; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def tr(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def tr_s(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr_s!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def unicode_normalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def unicode_normalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 + def upcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def upcase!(*args); end + + private + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#193 + def explicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#197 + def implicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#75 + def initialize_copy(other); end + + def original_concat(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 + def set_block_back_references(block, match_data); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#211 + def string_into_safe_buffer(new_string, is_html_safe); end +end + +# Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#32 +class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError + # @return [SafeConcatError] a new instance of SafeConcatError + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#33 + def initialize; end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#26 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) + +# = Secure Compare Rotator +# +# The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare +# and allows you to rotate a previously defined value to a new one. +# +# 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#32 +class ActiveSupport::SecureCompareRotator + include ::ActiveSupport::SecurityUtils + + # @return [SecureCompareRotator] a new instance of SecureCompareRotator + # + # source://activesupport//lib/active_support/secure_compare_rotator.rb#37 + def initialize(value, on_rotation: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#43 + def rotate(previous_value); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 + def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/secure_compare_rotator.rb#35 +class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end + +# source://activesupport//lib/active_support/security_utils.rb#4 +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 + +# = \String Inquirer +# +# Wrapping a string in this class gives you a prettier way to test +# for equality. The value returned by Rails.env is wrapped +# in a StringInquirer object, so instead of calling this: +# +# 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#21 +class ActiveSupport::StringInquirer < ::String + private + + # source://activesupport//lib/active_support/string_inquirer.rb#27 + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/string_inquirer.rb#23 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# = Active Support \Subscriber +# +# +ActiveSupport::Subscriber+ is an object set to consume +# ActiveSupport::Notifications. The subscriber dispatches notifications to +# a registered object based on its given namespace. +# +# 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#32 +class ActiveSupport::Subscriber + # @return [Subscriber] a new instance of Subscriber + # + # source://activesupport//lib/active_support/subscriber.rb#131 + def initialize; end + + # source://activesupport//lib/active_support/subscriber.rb#136 + def call(event); end + + # source://activesupport//lib/active_support/subscriber.rb#129 + def patterns; end + + # source://activesupport//lib/active_support/subscriber.rb#141 + def publish_event(event); end + + class << self + # Attach the subscriber to a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#35 + def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end + + # Detach the subscriber from a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#50 + def detach_from(namespace, notifier = T.unsafe(nil)); end + + # Adds event subscribers for all new methods added to the class. + # + # source://activesupport//lib/active_support/subscriber.rb#69 + def method_added(event); end + + # source://activesupport//lib/active_support/subscriber.rb#79 + def subscribers; end + + private + + # source://activesupport//lib/active_support/subscriber.rb#86 + def add_event_subscriber(event); end + + # source://activesupport//lib/active_support/subscriber.rb#124 + def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/subscriber.rb#108 + def find_attached_subscriber; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#112 + def invalid_event?(event); end + + # Returns the value of attribute namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def namespace; end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def notifier; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#120 + def pattern_subscribed?(pattern); end + + # source://activesupport//lib/active_support/subscriber.rb#116 + def prepare_pattern(event); end + + # source://activesupport//lib/active_support/subscriber.rb#97 + def remove_event_subscriber(event); end + + # Returns the value of attribute subscriber. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def subscriber; end + end +end + +# This is a class for wrapping syntax errors. The purpose of this class +# is to enhance the backtraces on SyntaxError exceptions to include the +# source location of the syntax error. That way we can display the error +# source on error pages in development. +# +# source://activesupport//lib/active_support/syntax_error_proxy.rb#10 +class ActiveSupport::SyntaxErrorProxy + # source://activesupport//lib/active_support/syntax_error_proxy.rb#11 + def backtrace; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#34 + def backtrace_locations; end + + private + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#47 + def parse_message_for_trace; end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#15 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocation < ::Struct + # source://activesupport//lib/active_support/syntax_error_proxy.rb#19 + def label; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#16 + def spot(_); end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#23 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy + # @return [BacktraceLocationProxy] a new instance of BacktraceLocationProxy + # + # source://activesupport//lib/active_support/syntax_error_proxy.rb#24 + def initialize(loc, ex); end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#29 + def spot(_); end +end + +# = Active Support Tagged Logging +# +# Wraps any standard Logger object to provide tagging capabilities. +# +# May be called with a block: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" +# logger.tagged('BCX', "Jason") { |tagged_logger| tagged_logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# +# If called without a block, a new logger will be returned with applied tags: +# +# 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#29 +module ActiveSupport::TaggedLogging + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def clear_tags!(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#152 + def flush; end + + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def pop_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def push_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#141 + def tagged(*tags); end + + class << self + # Returns an `ActiveSupport::Logger` that has already been wrapped with tagged logging concern. + # + # source://activesupport//lib/active_support/tagged_logging.rb#117 + def logger(*args, **kwargs); end + + # source://activesupport//lib/active_support/tagged_logging.rb#121 + def new(logger); end + end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#30 +module ActiveSupport::TaggedLogging::Formatter + # This method is invoked when a log event occurs. + # + # source://activesupport//lib/active_support/tagged_logging.rb#32 + def call(severity, timestamp, progname, msg); end + + # source://activesupport//lib/active_support/tagged_logging.rb#51 + def clear_tags!; end + + # source://activesupport//lib/active_support/tagged_logging.rb#61 + def current_tags; end + + # source://activesupport//lib/active_support/tagged_logging.rb#47 + def pop_tags(count = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/tagged_logging.rb#43 + def push_tags(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#55 + def tag_stack; end + + # source://activesupport//lib/active_support/tagged_logging.rb#36 + def tagged(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#65 + def tags_text; end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#108 +module ActiveSupport::TaggedLogging::LocalTagStorage + # Returns the value of attribute tag_stack. + # + # source://activesupport//lib/active_support/tagged_logging.rb#109 + def tag_stack; end + + # Sets the attribute tag_stack + # + # @param value the value to set the attribute tag_stack to. + # + # source://activesupport//lib/active_support/tagged_logging.rb#109 + def tag_stack=(_arg0); end + + class << self + # @private + # + # source://activesupport//lib/active_support/tagged_logging.rb#111 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#70 +class ActiveSupport::TaggedLogging::TagStack + # @return [TagStack] a new instance of TagStack + # + # source://activesupport//lib/active_support/tagged_logging.rb#73 + def initialize; end + + # source://activesupport//lib/active_support/tagged_logging.rb#91 + def clear; end + + # source://activesupport//lib/active_support/tagged_logging.rb#96 + def format_message(message); end + + # source://activesupport//lib/active_support/tagged_logging.rb#86 + def pop_tags(count); end + + # source://activesupport//lib/active_support/tagged_logging.rb#78 + def push_tags(tags); end + + # Returns the value of attribute tags. + # + # source://activesupport//lib/active_support/tagged_logging.rb#71 + def tags; end +end + +# source://activesupport//lib/active_support/test_case.rb#21 +class ActiveSupport::TestCase < ::Minitest::Test + include ::ActiveSupport::Testing::SetupAndTeardown + include ::ActiveSupport::Testing::TestsWithoutAssertions + include ::ActiveSupport::Testing::TaggedLogging + include ::ActiveSupport::Callbacks + include ::ActiveSupport::Testing::Assertions + include ::ActiveSupport::Testing::ErrorReporterAssertions + include ::ActiveSupport::Testing::Deprecation + include ::ActiveSupport::Testing::ConstantStubbing + include ::ActiveSupport::Testing::TimeHelpers + include ::ActiveSupport::Testing::FileFixtures + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods + extend ::ActiveSupport::Testing::Declarative + + # source://activesupport//lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_setup_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#911 + def _run_teardown_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#923 + def _teardown_callbacks; end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#731 + def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#660 + def assert_not_empty(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#671 + def assert_not_equal(exp, act, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#683 + def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#695 + def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#702 + def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#713 + def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#723 + def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#741 + def assert_not_nil(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#776 + def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#799 + def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#808 + def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # source://minitest/5.25.0/lib/minitest/assertions.rb#817 + def assert_not_same(exp, act, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + 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#300 + def inspect; end + + # source://minitest/5.25.0/lib/minitest.rb#375 + def method_name; end + + class << self + # source://activesupport//lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _setup_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#915 + def _teardown_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#919 + def _teardown_callbacks=(value); end + + # source://activesupport//lib/active_support/class_attribute.rb#12 + def file_fixture_path; end + + # source://activesupport//lib/active_support/class_attribute.rb#15 + def file_fixture_path=(new_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 + # databases and will not work with system tests. + # + # 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#81 + 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#44 + 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#34 + def test_order=(new_order); end + end +end + +# source://activesupport//lib/active_support/test_case.rb#22 +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#195 + 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#101 + 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#252 + 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#157 + 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#48 + def assert_nothing_raised; end + + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#34 + def assert_raise(*exp, match: T.unsafe(nil), &block); end + + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#34 + def assert_raises(*exp, match: T.unsafe(nil), &block); end + + private + + # source://activesupport//lib/active_support/testing/assertions.rb#286 + def _assert_nothing_raised_or_warn(assertion, &block); end + + # source://activesupport//lib/active_support/testing/assertions.rb#301 + def _callable_to_source_string(callable); 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/constant_stubbing.rb#5 +module ActiveSupport::Testing::ConstantStubbing + # Changes the value of a constant for the duration of a block. Example: + # + # # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 + # stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do + # assert_equal 1, World::List::Import::LARGE_IMPORT_THRESHOLD + # end + # + # assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD + # + # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents + # warnings from being thrown, and ensures that the old value is returned after the test has completed. + # + # If the constant doesn't already exists, but you need it set for the duration of the block + # you can do so by passing `exists: false`. + # + # stub_const(object, :SOME_CONST, 1, exists: false) do + # assert_equal 1, SOME_CONST + # end + # + # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads + # (like separate test suites running in parallel) that all depend on the same constant, it's possible + # divergent stubbing will trample on each other. + # + # source://activesupport//lib/active_support/testing/constant_stubbing.rb#28 + def stub_const(mod, constant, new_value, exists: T.unsafe(nil)); 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 + # :call-seq: + # assert_deprecated(deprecator, &block) + # assert_deprecated(match, deprecator, &block) + # + # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. + # + # assert_deprecated(/foo/, CustomDeprecator) do + # 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(CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#30 + def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end + + # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. + # + # assert_not_deprecated(CustomDeprecator) do + # CustomDeprecator.warn "message" # fails assertion + # end + # + # assert_not_deprecated(ActiveSupport::Deprecation.new) do + # CustomDeprecator.warn "message" # passes assertion, different deprecator + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#55 + def assert_not_deprecated(deprecator, &block); end + + # Returns the return value of the block and an array of all the deprecation warnings emitted by the given + # +deprecator+ during the execution of the yielded block. + # + # collect_deprecations(CustomDeprecator) do + # CustomDeprecator.warn "message" + # ActiveSupport::Deprecation.new.warn "other message" + # :result + # end # => [:result, ["message"]] + # + # source://activesupport//lib/active_support/testing/deprecation.rb#69 + def collect_deprecations(deprecator); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#5 +module ActiveSupport::Testing::ErrorReporterAssertions + # Assertion that the block should cause at least one exception to be reported + # to +Rails.error+. + # + # Passes if the evaluated code in the yielded block reports a matching exception. + # + # assert_error_reported(IOError) do + # Rails.error.report(IOError.new("Oops")) + # end + # + # To test further details about the reported exception, you can use the return + # value. + # + # report = assert_error_reported(IOError) do + # # ... + # end + # assert_equal "Oops", report.error.message + # assert_equal "admin", report.context[:section] + # assert_equal :warning, report.severity + # assert_predicate report, :handled? + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#88 + def assert_error_reported(error_class = T.unsafe(nil), &block); end + + # Assertion that the block should not cause an exception to be reported + # to +Rails.error+. + # + # Passes if evaluated code in the yielded block reports no exception. + # + # assert_no_error_reported do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#62 + def assert_no_error_reported(&block); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#6 +module ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector + class << self + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#16 + def record; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#29 + def report(error, **kwargs); end + + private + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#38 + def subscribe; end + end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 +class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct + # Returns the value of attribute context + # + # @return [Object] the current value of context + def context; end + + # Sets the attribute context + # + # @param value [Object] the value to set the attribute context to. + # @return [Object] the newly set value + def context=(_); end + + # Returns the value of attribute error + # + # @return [Object] the current value of error + def error; end + + # Sets the attribute error + # + # @param value [Object] the value to set the attribute error to. + # @return [Object] the newly set value + def error=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + def handled; end + + # Sets the attribute handled + # + # @param value [Object] the value to set the attribute handled to. + # @return [Object] the newly set value + def handled=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + def handled?; end + + # Returns the value of attribute severity + # + # @return [Object] the current value of severity + def severity; end + + # Sets the attribute severity + # + # @param value [Object] the value to set the attribute severity to. + # @return [Object] the newly set value + def severity=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Adds simple access to sample files called file fixtures. +# 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#7 +module ActiveSupport::Testing::Isolation + include ::ActiveSupport::Testing::Isolation::Forking + + # source://activesupport//lib/active_support/testing/isolation.rb#20 + def run; end + + class << self + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/isolation.rb#16 + def forking_env?; end + + # source://activesupport//lib/active_support/testing/isolation.rb#10 + def included(klass); end + end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#35 +module ActiveSupport::Testing::Isolation::Forking + # source://activesupport//lib/active_support/testing/isolation.rb#36 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#73 +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#78 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#74 +ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/testing/isolation.rb#8 +class ActiveSupport::Testing::Isolation::SubprocessCrashed < ::StandardError; end + +# 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::PrerecordResultClass < ::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://activesupport//lib/active_support/testing/parallelization/server.rb#11 +class ActiveSupport::Testing::Parallelization::Server + include ::DRb::DRbUndumped + + # @return [Server] a new instance of Server + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#14 + def initialize; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#31 + def <<(o); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#51 + def active_workers?; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#55 + def interrupt; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#36 + def pop; end + + # @raise [DRb::DRbConnError] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#20 + def record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#59 + def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#43 + def start_worker(worker_id); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#47 + 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#22 + 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#26 + 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#15 + 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#35 + def build_parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#72 + def execution_info; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#60 + def many_workers?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#31 + def parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#47 + def parallelize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#52 + def parallelized?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#56 + def should_parallelize?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#68 + def show_execution_info; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#64 + 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#9 +class ActiveSupport::Testing::SimpleStubs + # @return [SimpleStubs] a new instance of SimpleStubs + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#12 + 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#23 + def stub_object(object, method_name, &block); end + + # Returns true if any stubs are set, false if there are none + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#53 + def stubbed?; end + + # Returns the Stub for object#method_name + # (nil if it is not stubbed) + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#48 + def stubbing(object, method_name); end + + # Remove all object-method stubs held by this instance + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#37 + def unstub_all!; end + + private + + # Restores the original object.method described by the Stub + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#59 + def unstub_object(stub); end +end + +# source://activesupport//lib/active_support/testing/time_helpers.rb#10 +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 + +# source://activesupport//lib/active_support/testing/stream.rb#5 +module ActiveSupport::Testing::Stream + private + + # source://activesupport//lib/active_support/testing/stream.rb#23 + def capture(stream); end + + # source://activesupport//lib/active_support/testing/stream.rb#17 + def quietly(&block); end + + # source://activesupport//lib/active_support/testing/stream.rb#7 + def silence_stream(stream); 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 + +# Warns when a test case does not perform any assertions. +# +# This is helpful in detecting broken tests that do not perform intended assertions. +# +# source://activesupport//lib/active_support/testing/tests_without_assertions.rb#8 +module ActiveSupport::Testing::TestsWithoutAssertions + # source://activesupport//lib/active_support/testing/tests_without_assertions.rb#9 + def after_teardown; end +end + +# Contains helpers that help you test passage of time. +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#68 +module ActiveSupport::Testing::TimeHelpers + # source://activesupport//lib/active_support/testing/time_helpers.rb#69 + def after_teardown; end + + # Calls +travel_to+ with +Time.now+. Forwards optional with_usec argument. + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time + # 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.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#257 + def freeze_time(with_usec: T.unsafe(nil), &block); end + + # Changes current time to the time in the future or in the past by a given time difference by + # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed + # at the end of the test. + # + # Note that the usec for the resulting time will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors), unless the with_usec argument + # is set to true. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day + # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # 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.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#97 + def travel(duration, with_usec: T.unsafe(nil), &block); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # 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#231 + def travel_back; end + + # Changes current time to the given time by stubbing +Time.now+, +Time.new+, + # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. + # The stubs are automatically removed at the end of the test. + # + # 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), unless the with_usec argument + # is set to true. + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # 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#133 + def travel_to(date_or_time, with_usec: T.unsafe(nil)); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # 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#231 + def unfreeze_time; end + + private + + # Returns the value of attribute in_block. + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#266 + 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#266 + def in_block=(_arg0); end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#262 + def simple_stubs; end +end + +# = Active Support \Time With Zone +# +# A Time-like class that can represent a time in any time zone. Necessary +# because standard Ruby Time instances are limited to UTC and the +# system's ENV['TZ'] zone. +# +# 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#44 +class ActiveSupport::TimeWithZone + include ::DateAndTime::Compatibility + include ::Comparable + + # @return [TimeWithZone] a new instance of TimeWithZone + # + # source://activesupport//lib/active_support/time_with_zone.rb#51 + def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end + + # Adds an interval of time to the current object's time and returns that + # 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#298 + 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#341 + def -(other); end + + # Use the time in UTC for comparisons. + # + # source://activesupport//lib/active_support/time_with_zone.rb#231 + def <=>(other); end + + # So that +self+ acts_like?(:time). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#504 + 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#430 + 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#369 + 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").as_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").as_json + # # => "2005/02/01 05:15:10 -1000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#166 + 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#239 + def between?(min, max); end + + # An instance of ActiveSupport::TimeWithZone is never blank + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#515 + 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.000000000 EST -05:00 + # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.000000000 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#390 + 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#63 + def comparable_time; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#94 + def dst?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#178 + def encode_with(coder); end + + # Returns +true+ if +other+ is equal to current object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#274 + 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#125 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#523 + 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#269 + def future?; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#63 + def getgm; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#83 + def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#63 + 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#105 + def gmt?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#111 + def gmt_offset; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#63 + def gmtime; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#111 + def gmtoff; end + + # source://activesupport//lib/active_support/time_with_zone.rb#278 + def hash; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#186 + 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#298 + def in(other); end + + # Returns the simultaneous time in Time.zone, or the specified zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#77 + def in_time_zone(new_zone = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#174 + def init_with(coder); end + + # Returns a string of the object's date, time, zone, and offset from UTC. + # + # Time.zone.now.inspect # => "Thu, 04 Dec 2014 11:00:25.624541392 EST -05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#140 + def inspect; end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#509 + 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#94 + 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#148 + def iso8601(fraction_digits = T.unsafe(nil)); end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#509 + 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#83 + def localtime(utc_offset = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#529 + def marshal_dump; end + + # source://activesupport//lib/active_support/time_with_zone.rb#533 + def marshal_load(variables); end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#553 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + def min; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + def mon; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#256 + def next_day?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#244 + def past?; end + + # Returns the underlying +TZInfo::TimezonePeriod+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#72 + def period; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#519 + def present?; 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#263 + 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#539 + 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#194 + 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#148 + 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#194 + def rfc822; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#298 + 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#225 + def strftime(format); end + + # Returns a Time instance that represents the time in +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#58 + def time; end + + # Returns the value of attribute time_zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#49 + 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#453 + def to_a; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#486 + 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#461 + 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#212 + 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#212 + 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#469 + 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#478 + def to_r; end + + # Returns a string of the object's date and time. + # + # source://activesupport//lib/active_support/time_with_zone.rb#200 + def to_s; end + + # Returns an instance of +Time+, either with the same timezone as +self+, + # 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#493 + 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#250 + 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#256 + 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#469 + def tv_sec; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#63 + 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#105 + def utc?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#111 + def utc_offset; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#148 + def xmlschema(fraction_digits = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + def yday; end + + # source://activesupport//lib/active_support/time_with_zone.rb#442 + 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#263 + 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#133 + def zone; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#589 + def duration_of_variable_length?(obj); end + + # source://activesupport//lib/active_support/time_with_zone.rb#570 + def get_period_and_ensure_valid_local_time(period); end + + # source://activesupport//lib/active_support/time_with_zone.rb#562 + 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#547 + def respond_to_missing?(sym, include_priv); end + + # source://activesupport//lib/active_support/time_with_zone.rb#583 + def transfer_time_values_to_utc_constructor(time); end + + # source://activesupport//lib/active_support/time_with_zone.rb#593 + def wrap_with_time_zone(time); end +end + +# source://activesupport//lib/active_support/time_with_zone.rb#45 +ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/time_with_zone.rb#560 +ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# = Active Support \Time Zone +# +# The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances. +# It allows us to do the following: +# +# * Limit the set of zones provided by TZInfo to a meaningful subset of 134 +# zones. +# * Retrieve and display zones with a friendlier name +# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). +# * Lazily load +TZInfo::Timezone+ instances only when they're needed. +# * 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#31 +class ActiveSupport::TimeZone + include ::Comparable + + # :stopdoc: + # + # @return [TimeZone] a new instance of TimeZone + # + # source://activesupport//lib/active_support/values/time_zone.rb#309 + 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#333 + 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#342 + def =~(re); end + + # source://activesupport//lib/active_support/values/time_zone.rb#567 + def abbr(time); 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#379 + def at(*args); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/values/time_zone.rb#571 + def dst?(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#579 + 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#327 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#575 + 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#396 + 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#363 + 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#551 + 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#348 + def match?(re); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#296 + 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#516 + 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#453 + def parse(str, now = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#559 + def period_for_local(time, dst = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#555 + def period_for_utc(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#563 + 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#469 + 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#507 + 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#354 + def to_s; end + + # Returns the current date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#521 + def today; end + + # Returns the next date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#526 + def tomorrow; end + + # Returns the value of attribute tzinfo. + # + # source://activesupport//lib/active_support/values/time_zone.rb#297 + def tzinfo; end + + # Returns the offset of this time zone from UTC in seconds. + # + # source://activesupport//lib/active_support/values/time_zone.rb#317 + 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#542 + def utc_to_local(time); end + + # Returns the previous date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#531 + def yesterday; end + + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#585 + def parts_to_time(parts, now); end + + # source://activesupport//lib/active_support/values/time_zone.rb#610 + 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#232 + def [](arg); end + + # Returns an array of all TimeZone objects. There are multiple + # TimeZone objects per time zone, in many cases, to make it easier + # for users to find their own time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#223 + def all; end + + # source://activesupport//lib/active_support/values/time_zone.rb#265 + def clear; end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the country specified by its ISO 3166-1 Alpha2 code. + # + # source://activesupport//lib/active_support/values/time_zone.rb#260 + def country_zones(country_code); end + + def create(*_arg0); end + + # source://activesupport//lib/active_support/values/time_zone.rb#207 + def find_tzinfo(name); end + + # Returns a TimeZone instance with the given name, or +nil+ if no + # such TimeZone instance exists. (This exists to support the use of + # this class with the +composed_of+ macro.) + # + # source://activesupport//lib/active_support/values/time_zone.rb#216 + 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#199 + def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the USA. + # + # source://activesupport//lib/active_support/values/time_zone.rb#254 + def us_zones; end + + private + + # source://activesupport//lib/active_support/values/time_zone.rb#273 + def load_country_zones(code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#287 + def zones_map; end + end +end + +# Keys are \Rails TimeZone names, values are TZInfo identifiers. +# +# source://activesupport//lib/active_support/values/time_zone.rb#33 +ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/values/time_zone.rb#188 +ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/values/time_zone.rb#187 +ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#35 +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" +# 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#101 + def backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#105 + def backend=(name); end + + # Returns the value of attribute depth. + # + # source://activesupport//lib/active_support/xml_mini.rb#96 + 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#96 + def depth=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#99 + def parse(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/xml_mini.rb#152 + def rename_key(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/xml_mini.rb#119 + def to_tag(key, value, options); end + + # source://activesupport//lib/active_support/xml_mini.rb#111 + def with_backend(name); end + + private + + # source://activesupport//lib/active_support/xml_mini.rb#163 + def _dasherize(key); end + + # source://activesupport//lib/active_support/xml_mini.rb#169 + def _parse_binary(bin, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#180 + def _parse_file(file, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#188 + def _parse_hex_binary(bin); end + + # source://activesupport//lib/active_support/xml_mini.rb#200 + def cast_backend_name_to_module(name); end + + # source://activesupport//lib/active_support/xml_mini.rb#192 + def current_thread_backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#196 + 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#56 +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#67 +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/array/extract_options.rb#14 +class Array + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#164 + 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#263 + 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 + + # 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#104 + def present?; 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 + + # 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 + + # 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#183 + 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/object/json.rb#124 +class BigDecimal < ::Numeric + include ::ActiveSupport::BigDecimalWithDefaultFormat + include ::ActiveSupport::NumericWithFormat + + # 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#134 + def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/class/attribute.rb#6 +class Class < ::Module + include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + + # Declare a class-level attribute whose value is inheritable by subclasses. + # Subclasses can change their own value and it will not impact parent class. + # + # ==== 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#86 + 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/descendants_tracker.rb#63 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#59 + def subclasses; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#68 +class Data + # 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/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#152 + 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. + # + # The increments are applied in order of time units from largest to smallest. + # In other words, the date is incremented first by +:years+, then by + # +:months+, then by +:weeks+, then by +:days+. This order can affect the + # result around the end of a month. For example, incrementing first by months + # then by days: + # + # Date.new(2004, 9, 30).advance(months: 1, days: 1) + # # => Sun, 31 Oct 2004 + # + # Whereas incrementing first by days then by months yields a different result: + # + # Date.new(2004, 9, 30).advance(days: 1).advance(months: 1) + # # => Mon, 01 Nov 2004 + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#127 + 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#211 + 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#143 + 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#152 + 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#63 + def inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date/blank.rb#15 + def present?; 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#63 + def readable_inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # 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(:rfc2822) # => "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#49 + 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(:rfc2822) # => "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#49 + def to_fs(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#83 + 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#95 + 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_and_time/compatibility.rb#6 +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#310 + def all_day; end + + # Returns a Range representing the whole month of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 + def all_month; end + + # Returns a Range representing the whole quarter of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#326 + def all_quarter; end + + # Returns a Range representing the whole week of the current date/time. + # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 + def all_week(start_day = T.unsafe(nil)); end + + # Returns a Range representing the whole year of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#331 + 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#267 + 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#179 + def at_beginning_of_year; end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 + 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#283 + def at_end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 + 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#267 + 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#179 + 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#258 + def days_to_week_start(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 + 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#283 + def end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 + 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#240 + def last_month; end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 + def last_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # 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#223 + def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + def last_weekday; end + + # Short-hand for years_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#251 + def last_year; end + + # Returns Monday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#275 + 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#340 + def next_occurring(day_of_week); end + + # Short-hand for months_since(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#215 + 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#200 + def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the next weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#206 + 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#351 + def prev_occurring(day_of_week); end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 + 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#223 + def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + def prev_weekday; end + + # Returns the quarter for a date/time. + # + # Date.new(2010, 1, 31).quarter # => 1 + # Date.new(2010, 4, 12).quarter # => 2 + # Date.new(2010, 9, 15).quarter # => 3 + # Date.new(2010, 12, 25).quarter # => 4 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#166 + def quarter; end + + # Returns Sunday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#290 + 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#370 + def copy_time_to(other); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#366 + def days_span(day); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#358 + def first_hour(date_or_time); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#362 + 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#7 +module DateAndTime::Compatibility + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#39 + def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 + def utc_to_local_returns_utc_offset_times; end + + class << self + # -- + # This re-implements the behaviour of the mattr_reader, instead + # of prepending on to it, to avoid overcomplicating a module that + # is in turn included in several places. This will all go away in + # Rails 8.0 anyway. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#24 + def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#15 + def preserve_timezone=(val); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 + 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#208 + 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. + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#82 + 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#109 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#221 + 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#122 + 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#146 + 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#158 + 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#140 + 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#152 + 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#164 + 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#130 + 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#130 + 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#122 + 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#130 + 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#122 + 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#146 + 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#158 + 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#140 + 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#152 + 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#164 + 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#184 + 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#170 + 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#184 + 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#184 + 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#116 + 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#170 + 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#130 + 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#130 + 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#122 + 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#130 + 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/blank.rb#15 + def present?; 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#116 + 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 + + # 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#184 + def utc; end + + # Returns +true+ if offset == 0. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#197 + def utc?; end + + # Returns the offset value in seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#202 + 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/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 + # Returns the nil UUID. This is a special form of UUID that is specified to + # have all 128 bits set to zero. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#58 + def nil_uuid; 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#19 + def uuid_from_hash(hash_class, namespace, name); end + + # Convenience method for uuid_from_hash using OpenSSL::Digest::MD5. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#42 + def uuid_v3(uuid_namespace, name); end + + # Convenience method for SecureRandom.uuid. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#52 + def uuid_v4; end + + # Convenience method for uuid_from_hash using OpenSSL::Digest::SHA1. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#47 + def uuid_v5(uuid_namespace, name); end + + private + + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#62 + 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/erb/util.rb#39 +module ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + extend ::ActiveSupport::CoreExt::ERBUtil + + private + + # 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/erb/util.rb#63 + 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/erb/util.rb#124 + def json_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/erb/util.rb#142 + def xml_name_escape(name); end + + class << self + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def h(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 + def html_escape(s); end + + # 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/erb/util.rb#63 + 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/erb/util.rb#124 + def json_escape(s); end + + # Tokenizes a line of ERB. This is really just for error reporting and + # nobody should use it. + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#161 + def tokenize(source); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # 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/erb/util.rb#142 + def xml_name_escape(name); end + end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#40 +ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#41 +ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#49 +ERB::Util::INVALID_TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#47 +ERB::Util::INVALID_TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#50 +ERB::Util::SAFE_XML_TAG_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#48 +ERB::Util::TAG_NAME_FOLLOWING_CODEPOINTS = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#51 +ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name +# +# source://activesupport//lib/active_support/core_ext/erb/util.rb#44 +ERB::Util::TAG_NAME_START_CODEPOINTS = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +module Enumerable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + extend ::ActiveSupport::EnumerableCoreExt::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#146 + 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, false]).compact_blank + # # => [1] + # + # 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#184 + 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#118 + 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#132 + def excluding(*elements); end + + # Returns a new +Array+ where the order has been set to that provided in the +series+, based on the +key+ of the + # 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, unless + # the +filter+ option is set to +false+. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#197 + def in_order_of(key, series, filter: T.unsafe(nil)); 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#112 + 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#52 + 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#75 + 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#93 + 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#40 + 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#32 + 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#161 + 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#145 + 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#211 + def sole; 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#132 + 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#254 +class Exception + # source://activesupport//lib/active_support/core_ext/object/json.rb#255 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#65 +class FalseClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + 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#71 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#75 + def present?; 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#116 +class Float < ::Numeric + include ::ActiveSupport::NumericWithFormat + + # 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#119 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#5 +class Hash + include ::Enumerable + include ::ActiveSupport::DeepMergeable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#175 + 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#222 + 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#232 + 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 + + # :method: deep_merge! + # :call-seq: deep_merge!(other_hash, &block) + # + # Same as #deep_merge, but modifies +self+. + # + # -- + # Implemented by ActiveSupport::DeepMergeable#deep_merge!. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#39 + def deep_merge?(other); end + + # Returns a new hash with all keys converted to strings. + # This includes the keys from the root hash and from all + # 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#8 + 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#118 + def present?; 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 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. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#75 + 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. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#75 + 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#445 +HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess + +# :enddoc: +# +# source://activesupport//lib/active_support/i18n_railtie.rb#8 +module I18n + class << self + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#64 + def cache_key_digest; end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#68 + def cache_key_digest=(key_digest); end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#56 + def cache_namespace; end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#60 + def cache_namespace=(namespace); end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#48 + def cache_store; end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#52 + def cache_store=(store); end + + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#17 + def fallbacks; end + + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#23 + def fallbacks=(fallbacks); end + + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#23 + def interpolate(string, values); end + + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#29 + def interpolate_hash(string, values); end + + # source://i18n/1.14.6/lib/i18n.rb#38 + def new_double_nested_cache; end + + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#72 + def perform_caching?; end + + # source://i18n/1.14.6/lib/i18n.rb#46 + def reserve_key(key); end + + # source://i18n/1.14.6/lib/i18n.rb#51 + 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#104 + def include_fallbacks_module; end + + # source://activesupport//lib/active_support/i18n_railtie.rb#108 + def init_fallbacks(fallbacks); end + + # Setup i18n configuration. + # + # source://activesupport//lib/active_support/i18n_railtie.rb#35 + def initialize_i18n(app); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#85 + def setup_raise_on_missing_translations_config(app, strict); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#124 + def validate_fallbacks(fallbacks); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#135 + def watched_dirs_with_extensions(paths); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#151 +class IO + include ::Enumerable + include ::File::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + def as_json(options = T.unsafe(nil)); end +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def &(_arg0); end + def <=>(_arg0); end + def ^(_arg0); end + def and!(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def each(*_arg0); end + def each_byte(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def get_values(_arg0, _arg1); end + def hexdump(*_arg0); end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def not!; end + def null?; end + def or!(_arg0); end + def pread(*_arg0); end + def private?; end + def pwrite(*_arg0); end + def read(*_arg0); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def set_values(_arg0, _arg1, _arg2); end + def shared?; end + def size; end + def slice(*_arg0); end + def to_s; end + def transfer; end + def valid?; end + def values(*_arg0); end + def write(*_arg0); end + def xor!(_arg0); end + def |(_arg0); end + def ~; end + + private + + def initialize_copy(_arg0); end + + class << self + def for(_arg0); end + def map(*_arg0); end + def size_of(_arg0); end + def string(_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::MaskError < ::ArgumentError; end +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) +IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +class IO::TimeoutError < ::IOError; end +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#242 +class IPAddr + # source://activesupport//lib/active_support/core_ext/object/json.rb#243 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/integer/time.rb#6 +class Integer < ::Numeric + include ::ActiveSupport::NumericWithFormat + + # 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 + + # 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 + +# 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/object/duplicable.rb#39 +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#44 + 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] + # mattr_accessor(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 + def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # 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] + # mattr_reader(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 + def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # 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] + # mattr_writer(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 + def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Returns a copy of module or class if it's anonymous. If it's + # named, returns +self+. + # + # Object.deep_dup == Object # => true + # klass = Class.new + # klass.deep_dup == klass # => false + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#64 + def deep_dup; end + + # Provides a +delegate+ class method to easily expose contained objects' + # public methods as your own. + # + # ==== 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 +ActiveSupport::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.new.first_name # => "Tomas" + # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # + # User.new.age # => 2 + # + # If the target is +nil+ and does not respond to the delegated method a + # +ActiveSupport::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.new.age + # # => ActiveSupport::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.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#160 + 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 +ActiveSupport::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#218 + def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end + + # deprecate :foo, deprecator: MyLib.deprecator + # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator + # + # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds + # to deprecation_warning(deprecated_method_name, message, caller_backtrace) where you can implement your + # custom warning behavior. + # + # class MyLib::Deprecator + # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) + # 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#17 + def deprecate(*method_names, deprecator:, **options); 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] + # mattr_accessor(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 + def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # 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] + # mattr_reader(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 + def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # 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] + # mattr_writer(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 + def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 + 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#34 + def module_parent; end + + # Returns the name of the module containing this one. + # + # M::N.module_parent_name # => "M" + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#9 + 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#50 + 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 + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 + def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # 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#101 + def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + # Defines both class and instance accessors for class attributes. + # + # 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 + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 + def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # 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#101 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#41 + def attr_internal_define(attr_name, type); end + + class << self + # Returns the value of attribute attr_internal_naming_format. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#23 + def attr_internal_naming_format; end + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#25 + def attr_internal_naming_format=(format); 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#5 +Module::DelegationError = ActiveSupport::DelegationError + +# 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#93 + 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#60 + def present?; 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#170 +class Numeric + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#111 + 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#177 + 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#15 + def byte; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 + 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#63 + def exabyte; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 + 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#39 + def gigabyte; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 + 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#13 + 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#23 + def kilobyte; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 + def kilobytes; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 + def megabyte; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 + 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#55 + def petabyte; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 + def petabytes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#181 + def present?; 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#47 + def terabyte; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 + 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 + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 + def zettabyte; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 + def zettabytes; end +end + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 +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) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#10 +Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) + +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# 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::Dependencies::RequireDependency + include ::Kernel + include ::PP::ObjectMixin + include ::ActiveSupport::Tryable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + + # 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#7 + def html_safe?; end + + # Returns true if this object is included in the argument. + # + # When argument is a +Range+, +#cover?+ is used to properly handle inclusion + # check within open ranges. Otherwise, argument must be any object which responds + # to +#include?+. Usage: + # + # characters = ["Konata", "Kagami", "Tsukasa"] + # "Konata".in?(characters) # => true + # + # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument + # doesn't respond to +#include?+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#15 + 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#29 + 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#34 + 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 + + # Set and restore public attributes around a block. + # + # client.timeout # => 5 + # client.with(timeout: 1) do |c| + # c.timeout # => 1 + # end + # client.timeout # => 5 + # + # The receiver is yielded to the provided block. + # + # This method is a shorthand for the common begin/ensure pattern: + # + # old_value = object.attribute + # begin + # object.attribute = new_value + # # do things + # ensure + # object.attribute = old_value + # end + # + # It can be used on any object as long as both the reader and writer methods + # are public. + # + # source://activesupport//lib/active_support/core_ext/object/with.rb#26 + def with(**attributes); end + + # An elegant way to factor duplication out of options passed to a series of + # method calls. Each method called in the block, with the block variable as + # the receiver, will have its options merged with the default +options+ + # Hash or Hash-like object provided. Each method called on + # the block variable must take an options hash as its final argument. + # + # Without with_options, this code contains duplication: + # + # 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#236 +class Pathname + # source://activesupport//lib/active_support/core_ext/object/json.rb#237 + def as_json(options = T.unsafe(nil)); end +end + +module Process + extend ::SQLite3::ForkSafety::CoreExt + extend ::ActiveSupport::ForkTracker::CoreExt + + 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#248 +class Process::Status + # source://activesupport//lib/active_support/core_ext/object/json.rb#249 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#157 +class Range + include ::ActiveSupport::RangeWithFormat + 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#158 + 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 + + # 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#241 + def sum(initial_value = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#139 +class Regexp + # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + 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#34 + 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#62 +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#66 + 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#135 +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#99 + 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#153 + 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" + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 + 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" + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 + def camelize(first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like \Rails does for table names to models. + # 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#239 + 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#148 + 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#177 + 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#162 + def demodulize; end + + # Converts the first character to lowercase. + # + # 'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix" + # 'I'.downcase_first # => "i" + # ''.downcase_first # => "" + # + # See ActiveSupport::Inflector.downcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#284 + def downcase_first; end + + # Returns the first character. If a limit is supplied, returns a substring + # from the beginning of the string until it reaches the limit value. If the + # given limit is greater than or equal to the string length, returns a copy of self. + # + # 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#297 + def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Returns a substring from the given position to the end of the string. + # 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#225 + 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#262 + 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 + + # Indents the lines in the receiver: + # + # < + # def some_method + # some_code + # end + # + # The second argument, +indent_string+, specifies which indent string to + # use. The default is +nil+, which tells the method to make a guess by + # peeking at the first indented line, and fall back to a space if there is + # none. + # + # " foo".indent(2) # => " foo" + # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" + # "foo".indent(2, "\t") # => "\t\tfoo" + # + # While +indent_string+ is typically one space or tab, it may be any string. + # + # The third argument, +indent_empty_lines+, is a flag that says whether + # empty lines should be indented. Default is false. + # + # "foo\n\nbar".indent(2) # => " foo\n\n bar" + # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#42 + def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Same as +indent+, except it indents the receiver in-place. + # + # Returns the indented string, or +nil+ if there was nothing to indent. + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#7 + def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = 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#215 + 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#165 + def present?; 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#227 + 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" + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 + 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" + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 + 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+ to length truncate_to if +text+ is longer than truncate_to: + # + # 'Once upon a time in a world far far away'.truncate(27) + # # => "Once upon a time in a wo..." + # + # 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 "..."). + # The total length will not exceed truncate_to unless both +text+ and :omission + # are longer than truncate_to: + # + # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') + # # => "And they f... (continued)" + # + # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') + # # => "... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#70 + def truncate(truncate_to, options = T.unsafe(nil)); end + + # Truncates +text+ to at most truncate_to 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 truncate_to. + # + # Raises +ArgumentError+ when the bytesize of :omission exceeds truncate_to. + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#101 + def truncate_bytes(truncate_to, omission: T.unsafe(nil)); end + + # Truncates a given +text+ after a given number of words (words_count): + # + # '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#142 + def truncate_words(words_count, options = T.unsafe(nil)); end + + # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. + # + # +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#139 + def underscore; end + + # Converts 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#273 + def upcase_first; end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#136 +String::BLANK_RE = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#137 +String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#74 +class Struct + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#123 +class Symbol + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + def as_json(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#130 + def present?; end +end + +class Thread + # source://activesupport//lib/active_support/isolated_execution_state.rb#8 + def active_support_execution_state; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#8 + def active_support_execution_state=(_arg0); end +end + +# source://activesupport//lib/active_support/core_ext/thread/backtrace/location.rb#3 +class Thread::Backtrace::Location + # source://activesupport//lib/active_support/core_ext/thread/backtrace/location.rb#5 + def spot(ex); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#186 +class Time + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + include ::DateAndTime::Compatibility + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#297 + 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#320 + 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#329 + 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 + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#194 + 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#220 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#201 + 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#238 + 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#267 + 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#283 + 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#256 + 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#273 + 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#289 + 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#246 + 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#246 + 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#238 + 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#246 + 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#238 + 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#267 + 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#283 + 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#192 + 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#123 + 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#329 + 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#256 + 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#273 + 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#289 + 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#349 + 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#349 + 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#225 + 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#246 + 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#246 + 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#238 + 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#320 + def minus_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#307 + def minus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#307 + 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#363 + 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#373 + 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#383 + 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#246 + def noon; end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#297 + def plus_with_duration(other); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#196 + def present?; end + + # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#17 + def preserve_timezone; end + + # Returns a new time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#358 + 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#368 + 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#378 + 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#225 + 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(:rfc2822) # => "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#55 + 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(:rfc2822) # => "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#55 + def to_fs(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 + + private + + # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#24 + def active_support_local_zone; 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(time_or_number, *args, **_arg2); 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(time_or_number, *args, **_arg2); 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#93 + 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#81 + 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#61 + 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/object/blank.rb#80 +class TrueClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + 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#86 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#90 + def present?; 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#230 +class URI::Generic + include ::URI::RFC2396_REGEXP + + # source://activesupport//lib/active_support/core_ext/object/json.rb#231 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#49 +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#54 + def duplicable?; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/aggregate_root@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/aggregate_root@2.15.0.rbi new file mode 100644 index 0000000..b5f64aa --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/aggregate_root@2.15.0.rbi @@ -0,0 +1,319 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aggregate_root` gem. +# Please instead update this file by running `bin/tapioca gem aggregate_root`. + + +# source://aggregate_root//lib/aggregate_root/version.rb#3 +module AggregateRoot + include ::AggregateRoot::AggregateMethods + + mixes_in_class_methods ::AggregateRoot::OnDSL + mixes_in_class_methods ::AggregateRoot::Constructor + + class << self + # Returns the value of attribute configuration. + # + # source://aggregate_root//lib/aggregate_root/configuration.rb#5 + def configuration; end + + # Sets the attribute configuration + # + # @param value the value to set the attribute configuration to. + # + # source://aggregate_root//lib/aggregate_root/configuration.rb#5 + def configuration=(_arg0); end + + # @yield [configuration] + # + # source://aggregate_root//lib/aggregate_root/configuration.rb#8 + def configure; end + + # @private + # + # source://aggregate_root//lib/aggregate_root.rb#103 + def included(host_class); end + + # source://aggregate_root//lib/aggregate_root.rb#81 + def with_default_apply_strategy; end + + # source://aggregate_root//lib/aggregate_root.rb#90 + def with_strategy(strategy); end + end +end + +# source://aggregate_root//lib/aggregate_root.rb#44 +module AggregateRoot::AggregateMethods + # source://aggregate_root//lib/aggregate_root.rb#45 + def apply(*events); end + + # source://aggregate_root//lib/aggregate_root.rb#67 + def marshal_dump; end + + # source://aggregate_root//lib/aggregate_root.rb#74 + def marshal_load(vars); end + + # source://aggregate_root//lib/aggregate_root.rb#61 + def unpublished_events; end + + # source://aggregate_root//lib/aggregate_root.rb#52 + def version; end + + # source://aggregate_root//lib/aggregate_root.rb#56 + def version=(value); end +end + +# source://aggregate_root//lib/aggregate_root.rb#65 +AggregateRoot::AggregateMethods::UNMARSHALED_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://aggregate_root//lib/aggregate_root/configuration.rb#13 +class AggregateRoot::Configuration + # Returns the value of attribute default_event_store. + # + # source://aggregate_root//lib/aggregate_root/configuration.rb#14 + def default_event_store; end + + # Sets the attribute default_event_store + # + # @param value the value to set the attribute default_event_store to. + # + # source://aggregate_root//lib/aggregate_root/configuration.rb#14 + def default_event_store=(_arg0); end +end + +# source://aggregate_root//lib/aggregate_root.rb#35 +module AggregateRoot::Constructor + # source://aggregate_root//lib/aggregate_root.rb#36 + def new(*_arg0, **_arg1); end +end + +# source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#6 +class AggregateRoot::DefaultApplyStrategy + # @return [DefaultApplyStrategy] a new instance of DefaultApplyStrategy + # + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#7 + def initialize(strict: T.unsafe(nil)); end + + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#11 + def call(aggregate, event); end + + private + + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#30 + def apply_handler_name(event_type); end + + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#34 + def event_type(event_type); end + + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#22 + def handler_name(aggregate, event); end + + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#26 + def on_dsl_handler_name(aggregate, event_type); end + + # Returns the value of attribute on_methods. + # + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#38 + def on_methods; end + + # Returns the value of attribute strict. + # + # source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#38 + def strict; end +end + +# source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#4 +class AggregateRoot::InstrumentedApplyStrategy + # @return [InstrumentedApplyStrategy] a new instance of InstrumentedApplyStrategy + # + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#5 + def initialize(strategy, instrumentation); end + + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#10 + def call(aggregate, event); end + + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#18 + def method_missing(method_name, *arguments, &block); end + + private + + # Returns the value of attribute instrumentation. + # + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#32 + def instrumentation; end + + # @return [Boolean] + # + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#26 + def respond_to_missing?(method_name, _include_private); end + + # Returns the value of attribute strategy. + # + # source://aggregate_root//lib/aggregate_root/instrumented_apply_strategy.rb#32 + def strategy; end +end + +# source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#5 +class AggregateRoot::InstrumentedRepository + # @return [InstrumentedRepository] a new instance of InstrumentedRepository + # + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#6 + def initialize(repository, instrumentation); end + + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#12 + def load(aggregate, stream_name); end + + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#33 + def method_missing(method_name, *arguments, **keyword_arguments, &block); end + + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#18 + def store(aggregate, stream_name); end + + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#28 + def with_aggregate(aggregate, stream_name, &block); end + + private + + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#47 + def handle_error(error); end + + # Returns the value of attribute instrumentation. + # + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#55 + def instrumentation; end + + # Returns the value of attribute repository. + # + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#55 + def repository; end + + # @return [Boolean] + # + # source://aggregate_root//lib/aggregate_root/instrumented_repository.rb#41 + def respond_to_missing?(method_name, _include_private); end +end + +# source://aggregate_root//lib/aggregate_root/default_apply_strategy.rb#4 +class AggregateRoot::MissingHandler < ::StandardError; end + +# source://aggregate_root//lib/aggregate_root.rb#13 +module AggregateRoot::OnDSL + # source://aggregate_root//lib/aggregate_root.rb#16 + def on(*event_klasses, &block); end + + # source://aggregate_root//lib/aggregate_root.rb#29 + def on_methods; end +end + +# source://aggregate_root//lib/aggregate_root.rb#14 +AggregateRoot::OnDSL::ANONYMOUS_CLASS = T.let(T.unsafe(nil), String) + +# source://aggregate_root//lib/aggregate_root/repository.rb#4 +class AggregateRoot::Repository + # @return [Repository] a new instance of Repository + # + # source://aggregate_root//lib/aggregate_root/repository.rb#5 + def initialize(event_store = T.unsafe(nil)); end + + # source://aggregate_root//lib/aggregate_root/repository.rb#9 + def load(aggregate, stream_name); end + + # source://aggregate_root//lib/aggregate_root/repository.rb#15 + def store(aggregate, stream_name); end + + # source://aggregate_root//lib/aggregate_root/repository.rb#24 + def with_aggregate(aggregate, stream_name, &block); end + + private + + # source://aggregate_root//lib/aggregate_root/repository.rb#33 + def default_event_store; end + + # Returns the value of attribute event_store. + # + # source://aggregate_root//lib/aggregate_root/repository.rb#31 + def event_store; end +end + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#6 +class AggregateRoot::SnapshotRepository + # @raise [ArgumentError] + # @return [SnapshotRepository] a new instance of SnapshotRepository + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#12 + def initialize(event_store, interval = T.unsafe(nil)); end + + # Sets the attribute error_handler + # + # @param value the value to set the attribute error_handler to. + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#20 + def error_handler=(_arg0); end + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#24 + def load(aggregate, stream_name); end + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#42 + def store(aggregate, stream_name); end + + private + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#72 + def build_marshal(aggregate); end + + # Returns the value of attribute error_handler. + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#61 + def error_handler; end + + # Returns the value of attribute event_store. + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#61 + def event_store; end + + # Returns the value of attribute interval. + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#61 + def interval; end + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#84 + def load_marshal(snpashot_event); end + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#80 + def load_snapshot_event(stream_name); end + + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#63 + def publish_snapshot_event(aggregate, stream_name, last_event_id); end + + # @return [Boolean] + # + # source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#92 + def time_for_snapshot?(aggregate_version, just_published_events); end +end + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#7 +AggregateRoot::SnapshotRepository::DEFAULT_SNAPSHOT_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#10 +class AggregateRoot::SnapshotRepository::NotDumpableAggregateRoot < ::StandardError; end + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#9 +class AggregateRoot::SnapshotRepository::NotRestorableSnapshot < ::StandardError; end + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#8 +AggregateRoot::SnapshotRepository::SNAPSHOT_STREAM_PATTERN = T.let(T.unsafe(nil), Proc) + +# source://aggregate_root//lib/aggregate_root/snapshot_repository.rb#22 +class AggregateRoot::SnapshotRepository::Snapshot < ::RubyEventStore::Event; end + +# source://aggregate_root//lib/aggregate_root/transform.rb#4 +class AggregateRoot::Transform + class << self + # source://aggregate_root//lib/aggregate_root/transform.rb#5 + def to_snake_case(name); end + end +end + +# source://aggregate_root//lib/aggregate_root/version.rb#4 +AggregateRoot::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/arkency-command_bus@0.4.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/arkency-command_bus@0.4.1.rbi new file mode 100644 index 0000000..4d70d53 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/arkency-command_bus@0.4.1.rbi @@ -0,0 +1,41 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `arkency-command_bus` gem. +# Please instead update this file by running `bin/tapioca gem arkency-command_bus`. + + +# source://arkency-command_bus//lib/arkency/command_bus/version.rb#1 +module Arkency; end + +# source://arkency-command_bus//lib/arkency/command_bus/version.rb#2 +class Arkency::CommandBus + # @return [CommandBus] a new instance of CommandBus + # + # source://arkency-command_bus//lib/arkency/command_bus.rb#9 + def initialize; end + + # source://arkency-command_bus//lib/arkency/command_bus.rb#19 + def call(command); end + + # @raise [MultipleHandlers] + # + # source://arkency-command_bus//lib/arkency/command_bus.rb#14 + def register(klass, handler); end + + private + + # Returns the value of attribute handlers. + # + # source://arkency-command_bus//lib/arkency/command_bus.rb#26 + def handlers; end +end + +# source://arkency-command_bus//lib/arkency/command_bus.rb#7 +class Arkency::CommandBus::MultipleHandlers < ::StandardError; end + +# source://arkency-command_bus//lib/arkency/command_bus.rb#6 +class Arkency::CommandBus::UnregisteredHandler < ::StandardError; end + +# source://arkency-command_bus//lib/arkency/command_bus/version.rb#3 +Arkency::CommandBus::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ast@2.4.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ast@2.4.2.rbi new file mode 100644 index 0000000..e0ae88e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,585 @@ +# 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/apps/govquests-api/rails_app/sorbet/rbi/gems/awesome_print@1.9.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/awesome_print@1.9.2.rbi new file mode 100644 index 0000000..4816516 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/awesome_print@1.9.2.rbi @@ -0,0 +1,1012 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `awesome_print` gem. +# Please instead update this file by running `bin/tapioca gem awesome_print`. + + +class ActionView::Base + include ::ERB::Escape + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::Benchmarkable + include ::ActionView::Helpers::ActiveModelHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + include ::ActionView::Helpers::DateHelper + include ::ActionView::Helpers::DebugHelper + include ::ActionView::ModelNaming + include ::ActionView::RecordIdentifier + include ::ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::JavaScriptHelper + include ::ActionView::Helpers::NumberHelper + include ::ActionView::Helpers::RenderingHelper + include ::AwesomePrint::ActionView +end + +# source://awesome_print//lib/awesome_print/core_ext/awesome_method_array.rb#15 +module AwesomeMethodArray + # source://awesome_print//lib/awesome_print/core_ext/awesome_method_array.rb#23 + def &(_other_ary); end + + # source://awesome_print//lib/awesome_print/core_ext/awesome_method_array.rb#17 + def -(_other_ary); end + + # Intercepting Array#grep needs a special treatment since grep accepts + # an optional block. + # + # source://awesome_print//lib/awesome_print/core_ext/awesome_method_array.rb#33 + def grep(pattern, &blk); end +end + +# source://awesome_print//lib/awesome_print/custom_defaults.rb#1 +module AwesomePrint + class << self + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#12 + def console?; end + + # Returns the value of attribute defaults. + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#3 + def defaults; end + + # Sets the attribute defaults + # + # @param value the value to set the attribute defaults to. + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#3 + def defaults=(_arg0); end + + # source://awesome_print//lib/awesome_print/custom_defaults.rb#20 + def diet_rb; end + + # Returns the value of attribute force_colors. + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#3 + def force_colors; end + + # Class accessor to force colorized output (ex. forked subprocess where TERM + # might be dumb). + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#8 + def force_colors!(value = T.unsafe(nil)); end + + # Sets the attribute force_colors + # + # @param value the value to set the attribute force_colors to. + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#3 + def force_colors=(_arg0); end + + # source://awesome_print//lib/awesome_print/custom_defaults.rb#38 + def irb!; end + + # source://awesome_print//lib/awesome_print/custom_defaults.rb#44 + def pry!; end + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#16 + def rails_console?; end + + # source://awesome_print//lib/awesome_print/custom_defaults.rb#28 + def usual_rb; end + + # source://awesome_print//lib/awesome_print/version.rb#7 + def version; end + + private + + # Takes a value and returns true unless it is false or nil + # This is an alternative to the less readable !!(value) + # https://github.com/bbatsov/ruby-style-guide#no-bang-bang + # + # source://awesome_print//lib/awesome_print/custom_defaults.rb#53 + def boolean(value); end + end +end + +# source://awesome_print//lib/awesome_print/ext/action_view.rb#7 +module AwesomePrint::ActionView + # Use HTML colors and add default "debug_dump" class to the resulting HTML. + # + # source://awesome_print//lib/awesome_print/ext/action_view.rb#9 + def ap(object, options = T.unsafe(nil)); end + + # Use HTML colors and add default "debug_dump" class to the resulting HTML. + # + # source://awesome_print//lib/awesome_print/ext/action_view.rb#9 + def ap_debug(object, options = T.unsafe(nil)); end +end + +# source://awesome_print//lib/awesome_print/ext/active_record.rb#7 +module AwesomePrint::ActiveRecord + # Add ActiveRecord class names to the dispatcher pipeline. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_record.rb#16 + def cast_with_active_record(object, type); end + + private + + # Format ActiveModel error object. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_record.rb#80 + def awesome_active_model_error(object); end + + # Format ActiveRecord class object. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_record.rb#63 + def awesome_active_record_class(object); end + + # Format ActiveRecord instance object. + # + # NOTE: by default only instance attributes (i.e. columns) are shown. To format + # ActiveRecord instance as regular object showing its instance variables and + # accessors use :raw => true option: + # + # ap record, :raw => true + # + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_record.rb#43 + def awesome_active_record_instance(object); end + + class << self + # @private + # + # source://awesome_print//lib/awesome_print/ext/active_record.rb#9 + def included(base); end + end +end + +# source://awesome_print//lib/awesome_print/ext/active_support.rb#7 +module AwesomePrint::ActiveSupport + # Format ActiveSupport::TimeWithZone as standard Time. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_support.rb#28 + def awesome_active_support_time(object); end + + # Format HashWithIndifferentAccess as standard Hash. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/active_support.rb#34 + def awesome_hash_with_indifferent_access(object); end + + # source://awesome_print//lib/awesome_print/ext/active_support.rb#14 + def cast_with_active_support(object, type); end + + class << self + # @private + # + # source://awesome_print//lib/awesome_print/ext/active_support.rb#9 + def included(base); end + end +end + +# source://awesome_print//lib/awesome_print/colorize.rb#4 +module AwesomePrint::Colorize + # Pick the color and apply it to the given string as necessary. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/colorize.rb#8 + def colorize(str, type); end +end + +# source://awesome_print//lib/awesome_print/formatter.rb#9 +class AwesomePrint::Formatter + include ::AwesomePrint::Colorize + include ::AwesomePrint::ActiveRecord + include ::AwesomePrint::ActiveSupport + include ::AwesomePrint::Nokogiri + include ::AwesomePrint::OpenStruct + + # @return [Formatter] a new instance of Formatter + # + # source://awesome_print//lib/awesome_print/formatter.rb#16 + def initialize(inspector); end + + # Hook this when adding custom formatters. Check out lib/awesome_print/ext + # directory for custom formatters that ship with awesome_print. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/ostruct.rb#13 + def cast(object, type); end + + # source://awesome_print//lib/awesome_print/formatter.rb#36 + def cast_without_active_record(object, type); end + + # source://awesome_print//lib/awesome_print/ext/active_record.rb#16 + def cast_without_active_support(object, type); end + + # source://awesome_print//lib/awesome_print/ext/active_support.rb#14 + def cast_without_nokogiri(object, type); end + + # source://awesome_print//lib/awesome_print/ext/nokogiri.rb#16 + def cast_without_ostruct(object, type); end + + # Main entry point to format an object. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/formatter.rb#23 + def format(object, type = T.unsafe(nil)); end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatter.rb#12 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatter.rb#12 + def options; end + + private + + # source://awesome_print//lib/awesome_print/formatter.rb#70 + def awesome_array(a); end + + # source://awesome_print//lib/awesome_print/formatter.rb#54 + def awesome_bigdecimal(n); end + + # source://awesome_print//lib/awesome_print/formatter.rb#95 + def awesome_class(c); end + + # source://awesome_print//lib/awesome_print/formatter.rb#103 + def awesome_dir(d); end + + # source://awesome_print//lib/awesome_print/formatter.rb#99 + def awesome_file(f); end + + # source://awesome_print//lib/awesome_print/formatter.rb#78 + def awesome_hash(h); end + + # source://awesome_print//lib/awesome_print/formatter.rb#90 + def awesome_method(m); end + + # source://awesome_print//lib/awesome_print/formatter.rb#82 + def awesome_object(o); end + + # source://awesome_print//lib/awesome_print/formatter.rb#60 + def awesome_rational(n); end + + # Catch all method to format an arbitrary object. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/formatter.rb#44 + def awesome_self(object, type); end + + # source://awesome_print//lib/awesome_print/formatter.rb#74 + def awesome_set(s); end + + # source://awesome_print//lib/awesome_print/formatter.rb#66 + def awesome_simple(o, type, inspector = T.unsafe(nil)); end + + # source://awesome_print//lib/awesome_print/formatter.rb#86 + def awesome_struct(s); end + + # source://awesome_print//lib/awesome_print/formatter.rb#90 + def awesome_unboundmethod(m); end + + # source://awesome_print//lib/awesome_print/formatter.rb#119 + def convert_to_hash(object); end + + # A class (ex. `Net::HTTP.Get`) might have `attr_reader :method` accessor + # which causes `object.method(:to_hash)` throw `ArgumentError (wrong number + # of arguments (given 1, expected 0))`. The following tries to avoid that. + # + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatter.rb#113 + def has_method_accessor?(object); end +end + +# source://awesome_print//lib/awesome_print/formatter.rb#14 +AwesomePrint::Formatter::CORE_FORMATTERS = T.let(T.unsafe(nil), Array) + +# source://awesome_print//lib/awesome_print/formatters.rb#2 +module AwesomePrint::Formatters; end + +# source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#5 +class AwesomePrint::Formatters::ArrayFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [ArrayFormatter] a new instance of ArrayFormatter + # + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#8 + def initialize(array, inspector); end + + # Returns the value of attribute array. + # + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#6 + def array; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#14 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#6 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#6 + def options; end + + private + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#56 + def array_prefix(iteration, width); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#110 + def find_method(name); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#48 + def generate_printable_array; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#68 + def generate_printable_tuples; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#101 + def generate_tuple(name); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#126 + def generic_prefix(iteration, width, padding = T.unsafe(nil)); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#60 + def methods_array; end + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#26 + def methods_array?; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#38 + def multiline_array; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#91 + def name_and_args_width; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#30 + def simple_array; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#97 + def tuple_prefix(iteration, width); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#76 + def tuple_template(item); end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#87 + def tuples; end + + # source://awesome_print//lib/awesome_print/formatters/array_formatter.rb#134 + def width(items); end +end + +# source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#5 +class AwesomePrint::Formatters::BaseFormatter + include ::AwesomePrint::Colorize + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#124 + def align(value, width); end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#34 + def get_limit_size; end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#116 + def indent; end + + # Indentation related methods + # ----------------------------------------- + # + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#108 + def indentation; end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#112 + def indented(&block); end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#43 + def limited(data, width, is_hash = T.unsafe(nil)); end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#66 + def method_tuple(method); end + + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#120 + def outdent; end + + # To support limited output, for example: + # + # ap ('a'..'z').to_a, :limit => 3 + # [ + # [ 0] "a", + # [ 1] .. [24], + # [25] "z" + # ] + # + # ap (1..100).to_a, :limit => true # Default limit is 7. + # [ + # [ 0] 1, + # [ 1] 2, + # [ 2] 3, + # [ 3] .. [96], + # [97] 98, + # [98] 99, + # [99] 100 + # ] + # ------------------------------------------------------------------------------ + # + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#30 + def should_be_limited?; end +end + +# source://awesome_print//lib/awesome_print/formatters/base_formatter.rb#8 +AwesomePrint::Formatters::BaseFormatter::DEFAULT_LIMIT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#5 +class AwesomePrint::Formatters::ClassFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [ClassFormatter] a new instance of ClassFormatter + # + # source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#9 + def initialize(klass, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#15 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#7 + def inspector; end + + # Returns the value of attribute klass. + # + # source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#7 + def klass; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/class_formatter.rb#7 + def options; end +end + +# source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#6 +class AwesomePrint::Formatters::DirFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [DirFormatter] a new instance of DirFormatter + # + # source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#10 + def initialize(dir, inspector); end + + # Returns the value of attribute dir. + # + # source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#8 + def dir; end + + # source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#16 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#8 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/dir_formatter.rb#8 + def options; end +end + +# source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#6 +class AwesomePrint::Formatters::FileFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [FileFormatter] a new instance of FileFormatter + # + # source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#10 + def initialize(file, inspector); end + + # Returns the value of attribute file. + # + # source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#8 + def file; end + + # source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#16 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#8 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/file_formatter.rb#8 + def options; end +end + +# source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#5 +class AwesomePrint::Formatters::HashFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [HashFormatter] a new instance of HashFormatter + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#8 + def initialize(hash, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#14 + def format; end + + # Returns the value of attribute hash. + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#6 + def hash; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#6 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#6 + def options; end + + private + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#26 + def empty_hash; end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#59 + def left_width(keys); end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#65 + def max_key_width(keys); end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#34 + def multiline_hash; end + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#30 + def multiline_hash?; end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#94 + def plain_single_line; end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#90 + def pre_ruby19_syntax(key, value, width); end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#42 + def printable_hash; end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#69 + def printable_keys; end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#85 + def ruby19_syntax(key, value, width); end + + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#38 + def simple_hash; end + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatters/hash_formatter.rb#81 + def symbol?(key); end +end + +# source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#5 +class AwesomePrint::Formatters::MethodFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [MethodFormatter] a new instance of MethodFormatter + # + # source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#9 + def initialize(method, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#15 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#7 + def inspector; end + + # Returns the value of attribute method. + # + # source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#7 + def method; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/method_formatter.rb#7 + def options; end +end + +# source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#5 +class AwesomePrint::Formatters::ObjectFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [ObjectFormatter] a new instance of ObjectFormatter + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#9 + def initialize(object, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#16 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#7 + def inspector; end + + # Returns the value of attribute object. + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#7 + def object; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#7 + def options; end + + # Returns the value of attribute variables. + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#7 + def variables; end + + private + + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#62 + def awesome_instance; end + + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#69 + def left_aligned; end + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/formatters/object_formatter.rb#58 + def valid_instance_var?(variable_name); end +end + +# source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#5 +class AwesomePrint::Formatters::SimpleFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [SimpleFormatter] a new instance of SimpleFormatter + # + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#9 + def initialize(string, type, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#16 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#7 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#7 + def options; end + + # Returns the value of attribute string. + # + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#7 + def string; end + + # Returns the value of attribute type. + # + # source://awesome_print//lib/awesome_print/formatters/simple_formatter.rb#7 + def type; end +end + +# source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#5 +class AwesomePrint::Formatters::StructFormatter < ::AwesomePrint::Formatters::BaseFormatter + # @return [StructFormatter] a new instance of StructFormatter + # + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#9 + def initialize(struct, inspector); end + + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#16 + def format; end + + # Returns the value of attribute inspector. + # + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#7 + def inspector; end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#7 + def options; end + + # Returns the value of attribute struct. + # + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#7 + def struct; end + + # Returns the value of attribute variables. + # + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#7 + def variables; end + + private + + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#58 + def awesome_instance; end + + # source://awesome_print//lib/awesome_print/formatters/struct_formatter.rb#62 + def left_aligned; end +end + +# source://awesome_print//lib/awesome_print/indentator.rb#2 +class AwesomePrint::Indentator + # @return [Indentator] a new instance of Indentator + # + # source://awesome_print//lib/awesome_print/indentator.rb#6 + def initialize(indentation); end + + # source://awesome_print//lib/awesome_print/indentator.rb#11 + def indent; end + + # Returns the value of attribute indentation. + # + # source://awesome_print//lib/awesome_print/indentator.rb#4 + def indentation; end + + # Returns the value of attribute shift_width. + # + # source://awesome_print//lib/awesome_print/indentator.rb#4 + def shift_width; end +end + +# source://awesome_print//lib/awesome_print/inspector.rb#9 +class AwesomePrint::Inspector + # @return [Inspector] a new instance of Inspector + # + # source://awesome_print//lib/awesome_print/inspector.rb#14 + def initialize(options = T.unsafe(nil)); end + + # Dispatcher that detects data nesting and invokes object-aware formatter. + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#71 + def awesome(object); end + + # Return true if we are to colorize the output. + # --------------------------------------------------------------------------- + # + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/inspector.rb#86 + def colorize?; end + + # source://awesome_print//lib/awesome_print/inspector.rb#61 + def current_indentation; end + + # source://awesome_print//lib/awesome_print/inspector.rb#65 + def increase_indentation(&block); end + + # Returns the value of attribute indentator. + # + # source://awesome_print//lib/awesome_print/inspector.rb#10 + def indentator; end + + # Sets the attribute indentator + # + # @param value the value to set the attribute indentator to. + # + # source://awesome_print//lib/awesome_print/inspector.rb#10 + def indentator=(_arg0); end + + # Returns the value of attribute options. + # + # source://awesome_print//lib/awesome_print/inspector.rb#10 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://awesome_print//lib/awesome_print/inspector.rb#10 + def options=(_arg0); end + + private + + # @return [Boolean] + # + # source://awesome_print//lib/awesome_print/inspector.rb#152 + def dotfile_readable?(dotfile); end + + # This method needs to be mocked during testing so that it always loads + # predictable values + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#147 + def load_dotfile; end + + # Load ~/.aprc file with custom defaults that override default options. + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#162 + def merge_custom_defaults!; end + + # Update @options by first merging the :color hash and then the remaining + # keys. + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#139 + def merge_options!(options = T.unsafe(nil)); end + + # Format nested data, for example: + # arr = [1, 2]; arr << arr + # => [1,2, [...]] + # hash = { :a => 1 }; hash[:b] = hash + # => { :a => 1, :b => {...} } + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#107 + def nested(object); end + + # Turn class name into symbol, ex: Hello::World => :hello_world. Classes + # that inherit from Array, Hash, File, Dir, and Struct are treated as the + # base class. + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#125 + def printable(object); end + + # --------------------------------------------------------------------------- + # + # source://awesome_print//lib/awesome_print/inspector.rb#117 + def unnested(object); end +end + +# source://awesome_print//lib/awesome_print/inspector.rb#12 +AwesomePrint::Inspector::AP = T.let(T.unsafe(nil), Symbol) + +# source://awesome_print//lib/awesome_print/core_ext/logger.rb#7 +module AwesomePrint::Logger + # Add ap method to logger + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/core_ext/logger.rb#11 + def ap(object, level = T.unsafe(nil)); end +end + +# source://awesome_print//lib/awesome_print/ext/nokogiri.rb#7 +module AwesomePrint::Nokogiri + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/nokogiri.rb#26 + def awesome_nokogiri_xml_node(object); end + + # Add Nokogiri XML Node and NodeSet names to the dispatcher pipeline. + # ------------------------------------------------------------------------------ + # + # source://awesome_print//lib/awesome_print/ext/nokogiri.rb#16 + def cast_with_nokogiri(object, type); end + + class << self + # @private + # + # source://awesome_print//lib/awesome_print/ext/nokogiri.rb#9 + def included(base); end + end +end + +# source://awesome_print//lib/awesome_print/ext/ostruct.rb#7 +module AwesomePrint::OpenStruct + # source://awesome_print//lib/awesome_print/ext/ostruct.rb#21 + def awesome_open_struct_instance(object); end + + # source://awesome_print//lib/awesome_print/ext/ostruct.rb#13 + def cast_with_ostruct(object, type); end + + class << self + # @private + # + # source://awesome_print//lib/awesome_print/ext/ostruct.rb#8 + def included(base); end + end +end + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + +# source://awesome_print//lib/awesome_print/core_ext/kernel.rb#6 +module Kernel + # source://awesome_print//lib/awesome_print/core_ext/kernel.rb#8 + def ai(options = T.unsafe(nil)); end + + # source://awesome_print//lib/awesome_print/core_ext/kernel.rb#8 + def awesome_inspect(options = T.unsafe(nil)); end + + # source://awesome_print//lib/awesome_print/core_ext/kernel.rb#19 + def awesome_print(object, options = T.unsafe(nil)); end + + private + + # source://awesome_print//lib/awesome_print/core_ext/kernel.rb#19 + def ap(object, options = T.unsafe(nil)); end + + class << self + # source://awesome_print//lib/awesome_print/core_ext/kernel.rb#19 + def ap(object, options = T.unsafe(nil)); end + end +end + +class Logger + include ::AwesomePrint::Logger +end + +# source://awesome_print//lib/awesome_print/core_ext/string.rb#6 +class String + include ::Comparable + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def black(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def blue(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def blueish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def cyan(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def cyanish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def gray(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def grayish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def green(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def greenish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def pale(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def purple(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def purpleish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def red(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def redish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def white(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def whiteish(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#19 + def yellow(*html); end + + # source://awesome_print//lib/awesome_print/core_ext/string.rb#23 + def yellowish(*html); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/base64@0.2.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/base64@0.2.0.rbi new file mode 100644 index 0000000..c33e78e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/base64@0.2.0.rbi @@ -0,0 +1,509 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `base64` gem. +# Please instead update this file by running `bin/tapioca gem base64`. + + +# \Module \Base64 provides methods for: +# +# - Encoding a binary string (containing non-ASCII characters) +# as a string of printable ASCII characters. +# - Decoding such an encoded string. +# +# \Base64 is commonly used in contexts where binary data +# is not allowed or supported: +# +# - Images in HTML or CSS files, or in URLs. +# - Email attachments. +# +# A \Base64-encoded string is about one-third larger that its source. +# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64] +# for more information. +# +# This module provides three pairs of encode/decode methods. +# Your choices among these methods should depend on: +# +# - Which character set is to be used for encoding and decoding. +# - Whether "padding" is to be used. +# - Whether encoded strings are to contain newlines. +# +# Note: Examples on this page assume that the including program has executed: +# +# require 'base64' +# +# == Encoding Character Sets +# +# A \Base64-encoded string consists only of characters from a 64-character set: +# +# - ('A'..'Z'). +# - ('a'..'z'). +# - ('0'..'9'). +# - =, the 'padding' character. +# - Either: +# - %w[+ /]: +# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045]; +# _not_ safe for URLs. +# - %w[- _]: +# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648]; +# safe for URLs. +# +# If you are working with \Base64-encoded strings that will come from +# or be put into URLs, you should choose this encoder-decoder pair +# of RFC-4648-compliant methods: +# +# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64. +# +# Otherwise, you may choose any of the pairs in this module, +# including the pair above, or the RFC-2045-compliant pairs: +# +# - Base64.encode64 and Base64.decode64. +# - Base64.strict_encode64 and Base64.strict_decode64. +# +# == Padding +# +# \Base64-encoding changes a triplet of input bytes +# into a quartet of output characters. +# +# Padding in Encode Methods +# +# Padding -- extending an encoded string with zero, one, or two trailing +# = characters -- is performed by methods Base64.encode64, +# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64: +# +# Base64.encode64('s') # => "cw==\n" +# Base64.strict_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s') # => "cw==" +# Base64.urlsafe_encode64('s', padding: false) # => "cw" +# +# When padding is performed, the encoded string is always of length 4n, +# where +n+ is a non-negative integer: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.strict_encode64('123') # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.strict_encode64('123456') # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate padded output characters +# of length 4(n+1), with two padding characters at the end: +# +# # n = 1: 4 bytes => 8 characters. +# Base64.strict_encode64('1234') # => "MDEyMw==" +# # n = 2: 7 bytes => 12 characters. +# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" +# +# - Input bytes of length 3n+2 generate padded output characters +# of length 4(n+1), with one padding character at the end: +# +# # n = 1: 5 bytes => 8 characters. +# Base64.strict_encode64('12345') # => "MDEyMzQ=" +# # n = 2: 8 bytes => 12 characters. +# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" +# +# When padding is suppressed, for a positive integer n: +# +# - Input bytes of length 3n generate unpadded output characters +# of length 4n: +# +# # n = 1: 3 bytes => 4 characters. +# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" +# # n = 2: 6 bytes => 8 characters. +# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" +# +# - Input bytes of length 3n+1 generate unpadded output characters +# of length 4n+2, with two padding characters at the end: +# +# # n = 1: 4 bytes => 6 characters. +# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" +# # n = 2: 7 bytes => 10 characters. +# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" +# +# - Input bytes of length 3n+2 generate unpadded output characters +# of length 4n+3, with one padding character at the end: +# +# # n = 1: 5 bytes => 7 characters. +# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" +# # m = 2: 8 bytes => 11 characters. +# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" +# +# Padding in Decode Methods +# +# All of the \Base64 decode methods support (but do not require) padding. +# +# \Method Base64.decode64 does not check the size of the padding: +# +# Base64.decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" +# +# \Method Base64.strict_decode64 strictly enforces padding size: +# +# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError +# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError +# +# \Method Base64.urlsafe_decode64 allows padding in +str+, +# which if present, must be correct: +# see {Padding}[Base64.html#module-Base64-label-Padding], above: +# +# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" +# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. +# +# == Newlines +# +# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 +# has an embedded newline character +# after each 60-character sequence, and, if non-empty, at the end: +# +# # No newline if empty. +# encoded = Base64.encode64("\x00" * 0) +# encoded.index("\n") # => nil +# +# # Newline at end of short output. +# encoded = Base64.encode64("\x00" * 1) +# encoded.size # => 4 +# encoded.index("\n") # => 4 +# +# # Newline at end of longer output. +# encoded = Base64.encode64("\x00" * 45) +# encoded.size # => 60 +# encoded.index("\n") # => 60 +# +# # Newlines embedded and at end of still longer output. +# encoded = Base64.encode64("\x00" * 46) +# encoded.size # => 65 +# encoded.rindex("\n") # => 65 +# encoded.split("\n").map {|s| s.size } # => [60, 4] +# +# The string to be encoded may itself contain newlines, +# which are encoded as \Base64: +# +# # Base64.encode64("\n\n\n") # => "CgoK\n" +# s = "This is line 1\nThis is line 2\n" +# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" +# +# source://base64//lib/base64.rb#184 +module Base64 + private + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +str+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # source://base64//lib/base64.rb#241 + def decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # source://base64//lib/base64.rb#219 + def encode64(bin); end + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +str+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # source://base64//lib/base64.rb#297 + def strict_decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # source://base64//lib/base64.rb#273 + def strict_encode64(bin); end + + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: + # + # +str+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +str+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # source://base64//lib/base64.rb#351 + def urlsafe_decode64(str); end + + # Returns the RFC-4648-compliant \Base64-encoding of +bin+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # source://base64//lib/base64.rb#328 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + + class << self + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ are ignored; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.decode64("\x00\n-_") # => "" + # + # Padding in +str+ (even if incorrect) is ignored: + # + # Base64.decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" + # + # source://base64//lib/base64.rb#241 + def decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.encode64('*') # => "Kg==\n" + # + # The returned string ends with a newline character, and if sufficiently long + # will have one or more embedded newline characters; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.encode64('*') # => "Kg==\n" + # Base64.encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.encode64("\n\n\n") # => "CgoK\n" + # s = "This is line 1\nThis is line 2\n" + # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" + # + # source://base64//lib/base64.rb#219 + def encode64(bin); end + + # Returns a string containing the decoding of an RFC-2045-compliant + # \Base64-encoded string +str+: + # + # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" + # + # Non-\Base64 characters in +str+ not allowed; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # these include newline characters and characters - and /: + # + # Base64.strict_decode64("\n") # Raises ArgumentError + # Base64.strict_decode64('-') # Raises ArgumentError + # Base64.strict_decode64('_') # Raises ArgumentError + # + # Padding in +str+, if present, must be correct: + # + # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError + # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError + # + # source://base64//lib/base64.rb#297 + def strict_decode64(str); end + + # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+. + # + # Per RFC 2045, the returned string may contain the URL-unsafe characters + # + or /; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" + # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" + # + # The returned string may include padding; + # see {Padding}[Base64.html#module-Base64-label-Padding] above. + # + # Base64.strict_encode64('*') # => "Kg==\n" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.strict_encode64('*') # => "Kg==" + # Base64.strict_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # The string to be encoded may itself contain newlines, + # which will be encoded as ordinary \Base64: + # + # Base64.strict_encode64("\n\n\n") # => "CgoK" + # s = "This is line 1\nThis is line 2\n" + # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" + # + # source://base64//lib/base64.rb#273 + def strict_encode64(bin); end + + # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+: + # + # +str+ may not contain non-Base64 characters; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_decode64('+') # Raises ArgumentError. + # Base64.urlsafe_decode64('/') # Raises ArgumentError. + # Base64.urlsafe_decode64("\n") # Raises ArgumentError. + # + # Padding in +str+, if present, must be correct: + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" + # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. + # + # source://base64//lib/base64.rb#351 + def urlsafe_decode64(str); end + + # Returns the RFC-4648-compliant \Base64-encoding of +bin+. + # + # Per RFC 4648, the returned string will not contain the URL-unsafe characters + # + or /, + # but instead may contain the URL-safe characters + # - and _; + # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: + # + # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" + # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" + # + # By default, the returned string may have padding; + # see {Padding}[Base64.html#module-Base64-label-Padding], above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # + # Optionally, you can suppress padding: + # + # Base64.urlsafe_encode64('*', padding: false) # => "Kg" + # + # The returned string will have no newline characters, regardless of its length; + # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: + # + # Base64.urlsafe_encode64('*') # => "Kg==" + # Base64.urlsafe_encode64('*' * 46) + # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" + # + # source://base64//lib/base64.rb#328 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + end +end + +# source://base64//lib/base64.rb#186 +Base64::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/bcrypt_pbkdf@1.1.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/bcrypt_pbkdf@1.1.1.rbi new file mode 100644 index 0000000..d036136 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/bcrypt_pbkdf@1.1.1.rbi @@ -0,0 +1,33 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `bcrypt_pbkdf` gem. +# Please instead update this file by running `bin/tapioca gem bcrypt_pbkdf`. + + +# source://bcrypt_pbkdf//lib/bcrypt_pbkdf.rb#8 +module BCryptPbkdf + class << self + # generates a key from a password + salt returning a string with keylen bytes + # that can be used as cryptographic key. + # + # Remember to get a good random salt of at least 16 bytes. Using a higher + # rounds count will increase the cost of an exhaustive search but will also + # make derivation proportionally slower. + # + # Example: + # rounds = 10 + # keylen = 64 + # @key = BCryptPbkdf.key("my secret", "my salt", keylen, rounds) + # + # source://bcrypt_pbkdf//lib/bcrypt_pbkdf.rb#20 + def key(pass, salt, keylen, rounds); end + end +end + +class BCryptPbkdf::Engine + class << self + def __bc_crypt_hash(_arg0, _arg1); end + def __bc_crypt_pbkdf(_arg0, _arg1, _arg2, _arg3); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/benchmark@0.3.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/benchmark@0.3.0.rbi new file mode 100644 index 0000000..c5d84c8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/benchmark@0.3.0.rbi @@ -0,0 +1,592 @@ +# 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) +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//benchmark.rb#170 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//benchmark.rb#209 + 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//benchmark.rb#251 + 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//benchmark.rb#296 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//benchmark.rb#311 + 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//benchmark.rb#170 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//benchmark.rb#209 + 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//benchmark.rb#251 + 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//benchmark.rb#296 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//benchmark.rb#311 + 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. +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//benchmark.rb#331 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//benchmark.rb#339 + def item(label = T.unsafe(nil), &blk); end + + # An array of 2-element arrays, consisting of label and block pairs. + # + # source://benchmark//benchmark.rb#351 + def list; end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//benchmark.rb#339 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # source://benchmark//benchmark.rb#354 + 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. +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//benchmark.rb#369 + 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//benchmark.rb#378 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # source://benchmark//benchmark.rb#388 + def list; end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # source://benchmark//benchmark.rb#378 + def report(label = T.unsafe(nil), *format, &blk); end +end + +# A data object, representing the times associated with a benchmark +# measurement. +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//benchmark.rb#432 + 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//benchmark.rb#480 + 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//benchmark.rb#467 + 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//benchmark.rb#474 + 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//benchmark.rb#487 + 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//benchmark.rb#441 + 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//benchmark.rb#451 + def add!(&blk); end + + # System CPU time of children + # + # source://benchmark//benchmark.rb#415 + def cstime; end + + # User CPU time of children + # + # source://benchmark//benchmark.rb#412 + 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//benchmark.rb#506 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # source://benchmark//benchmark.rb#424 + def label; end + + # Elapsed real time + # + # source://benchmark//benchmark.rb#418 + def real; end + + # System CPU time + # + # source://benchmark//benchmark.rb#409 + 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//benchmark.rb#531 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # source://benchmark//benchmark.rb#538 + def to_h; end + + # Same as #format. + # + # source://benchmark//benchmark.rb#521 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # source://benchmark//benchmark.rb#421 + def total; end + + # User CPU time + # + # source://benchmark//benchmark.rb#406 + 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//benchmark.rb#559 + def memberwise(op, x); end +end + +# source://benchmark//benchmark.rb#124 +Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/bigdecimal@3.1.8.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/bigdecimal@3.1.8.rbi new file mode 100644 index 0000000..c275b2f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/bigdecimal@3.1.8.rbi @@ -0,0 +1,78 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `bigdecimal` gem. +# Please instead update this file by running `bin/tapioca gem bigdecimal`. + + +# source://bigdecimal//lib/bigdecimal/util.rb#78 +class BigDecimal < ::Numeric + # call-seq: + # a.to_d -> bigdecimal + # + # Returns self. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_d # => 0.314e1 + # + # source://bigdecimal//lib/bigdecimal/util.rb#110 + def to_d; end + + # call-seq: + # a.to_digits -> string + # + # Converts a BigDecimal to a String of the form "nnnnnn.mmm". + # This method is deprecated; use BigDecimal#to_s("F") instead. + # + # require 'bigdecimal/util' + # + # d = BigDecimal("3.14") + # d.to_digits # => "3.14" + # + # source://bigdecimal//lib/bigdecimal/util.rb#90 + def to_digits; end +end + +BigDecimal::VERSION = T.let(T.unsafe(nil), String) + +# source://bigdecimal//lib/bigdecimal/util.rb#138 +class Complex < ::Numeric + # call-seq: + # cmp.to_d -> bigdecimal + # cmp.to_d(precision) -> bigdecimal + # + # Returns the value as a BigDecimal. + # + # The +precision+ parameter is required for a rational complex number. + # This parameter is used to determine the number of significant digits + # for the result. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 + # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 + # + # See also Kernel.BigDecimal. + # + # source://bigdecimal//lib/bigdecimal/util.rb#157 + def to_d(*args); end +end + +# source://bigdecimal//lib/bigdecimal/util.rb#171 +class NilClass + # call-seq: + # nil.to_d -> bigdecimal + # + # Returns nil represented as a BigDecimal. + # + # require 'bigdecimal' + # require 'bigdecimal/util' + # + # nil.to_d # => 0.0 + # + # source://bigdecimal//lib/bigdecimal/util.rb#182 + def to_d; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/bootsnap@1.18.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/bootsnap@1.18.4.rbi new file mode 100644 index 0000000..238fcba --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/bootsnap@1.18.4.rbi @@ -0,0 +1,970 @@ +# 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#44 + def _instrument(event, path); end + + # source://bootsnap//lib/bootsnap.rb#137 + def absolute_path?(path); end + + # source://bootsnap//lib/bootsnap.rb#82 + def default_setup; end + + # source://bootsnap//lib/bootsnap.rb#37 + def instrumentation=(callback); end + + def instrumentation_enabled=(_arg0); end + + # source://bootsnap//lib/bootsnap.rb#24 + def log!; end + + # source://bootsnap//lib/bootsnap.rb#14 + def log_stats!; end + + # Returns the value of attribute logger. + # + # source://bootsnap//lib/bootsnap.rb#12 + def logger; end + + # source://bootsnap//lib/bootsnap.rb#28 + 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#48 + def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), revalidation: 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#78 + def unload_cache!; end + + private + + # source://bootsnap//lib/bootsnap.rb#159 + def bool_env(key, default: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap.rb#155 + def enabled?(key); end + end +end + +# source://bootsnap//lib/bootsnap/compile_cache.rb#4 +module Bootsnap::CompileCache + class << self + # source://bootsnap//lib/bootsnap/compile_cache.rb#12 + def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil), revalidation: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/compile_cache.rb#46 + 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#103 + def compile_option_updated; end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#63 + def fetch(path, cache_dir: T.unsafe(nil)); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#80 + def input_to_output(_data, _kwargs); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#45 + def input_to_storage(_, path); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#110 + def install!(cache_dir); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#72 + def precompile(path); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#52 + def storage_to_output(binary, _args); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#16 + def supported?; end + end +end + +# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#84 +module Bootsnap::CompileCache::ISeq::InstructionSequenceMixin + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#97 + def compile_option=(hash); end + + # source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#85 + 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 fetch(_arg0, _arg1, _arg2, _arg3); end + def precompile(_arg0, _arg1, _arg2); end + def readonly=(_arg0); end + def revalidation=(_arg0); end + + class << self + def compile_option_crc32=(_arg0); end + def fetch(_arg0, _arg1, _arg2, _arg3); end + def precompile(_arg0, _arg1, _arg2); end + def readonly=(_arg0); end + def revalidation=(_arg0); end + end +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#264 +module Bootsnap::CompileCache::YAML::Psych3 + extend ::Bootsnap::CompileCache::YAML::Psych3 + + # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#289 + def input_to_output(data, kwargs); end + + # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#267 + def input_to_storage(contents, _); end + + # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#279 + def storage_to_output(data, kwargs); end +end + +# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#293 +module Bootsnap::CompileCache::YAML::Psych3::Patch + # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#294 + def load_file(path, *args, **_arg2); end + + # source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#314 + 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#242 + 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#56 + 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#116 + def push_paths(sender, *paths); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#122 + def reinitialize(path_obj = T.unsafe(nil)); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#110 + def unshift_paths(sender, *paths); end + + private + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#135 + def dir_changed?; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#180 + def expand_path(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#211 + def maybe_append_extension(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#188 + def now; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#145 + def push_paths_locked(*paths); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#207 + def search_index(feature); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#184 + def stale?; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#239 + def try_ext(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#219 + def try_index(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#163 + 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#32 +Bootsnap::LoadPathCache::Cache::BUILTIN_FEATURES = T.let(T.unsafe(nil), Hash) + +# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#27 +Bootsnap::LoadPathCache::Cache::TRUFFLERUBY_LIB_DIR_PREFIX = T.let(T.unsafe(nil), T.untyped) + +# 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#65 + def register(arr, observer); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#74 + 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#58 + def clone; 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#58 + def dup; 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), TrueClass) + +# 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 +end + +module Psych + extend ::Bootsnap::CompileCache::YAML::Psych4::Patch +end + +class RubyVM::InstructionSequence + extend ::Bootsnap::CompileCache::ISeq::InstructionSequenceMixin +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/brakeman@6.2.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/brakeman@6.2.1.rbi new file mode 100644 index 0000000..d748828 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/brakeman@6.2.1.rbi @@ -0,0 +1,222 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `brakeman` gem. +# Please instead update this file by running `bin/tapioca gem brakeman`. + + +# source://brakeman//lib/brakeman/version.rb#1 +module Brakeman + class << self + # source://brakeman//lib/brakeman.rb#573 + def add_external_checks(options); end + + # source://brakeman//lib/brakeman.rb#579 + def check_for_missing_checks(included_checks, excluded_checks, enabled_checks); end + + # Compare JSON output from a previous scan and return the diff of the two scans + # + # @raise [ArgumentError] + # + # source://brakeman//lib/brakeman.rb#484 + def compare(options); end + + # source://brakeman//lib/brakeman.rb#173 + def config_file(custom_location, app_path); end + + # source://brakeman//lib/brakeman.rb#479 + def debug(message); end + + # source://brakeman//lib/brakeman.rb#589 + def debug=(val); end + + # Default set of options + # + # source://brakeman//lib/brakeman.rb#180 + def default_options; end + + # Output configuration to YAML + # + # source://brakeman//lib/brakeman.rb#339 + def dump_config(options); end + + # source://brakeman//lib/brakeman.rb#365 + def ensure_latest; end + + # source://brakeman//lib/brakeman.rb#545 + def filter_warnings(tracker, options); end + + # Determine output formats based on options[:output_formats] + # or options[:output_files] + # + # source://brakeman//lib/brakeman.rb#211 + def get_output_formats(options); end + + # Returns an array of alert fingerprints for any ignored warnings without + # notes found in the specified ignore file (if it exists). + # + # source://brakeman//lib/brakeman.rb#535 + def ignore_file_entries_with_empty_notes(file); end + + # Output list of checks (for `-k` option) + # + # source://brakeman//lib/brakeman.rb#317 + def list_checks(options); end + + # source://brakeman//lib/brakeman.rb#507 + def load_brakeman_dependency(name, allow_fail = T.unsafe(nil)); end + + # Load options from YAML file + # + # source://brakeman//lib/brakeman.rb#125 + def load_options(line_options); end + + # source://brakeman//lib/brakeman.rb#475 + def notify(message); end + + # source://brakeman//lib/brakeman.rb#593 + def quiet=(val); end + + # Rescan a subset of files in a Rails application. + # + # A full scan must have been run already to use this method. + # The returned Tracker object from Brakeman.run is used as a starting point + # for the rescan. + # + # Options may be given as a hash with the same values as Brakeman.run. + # Note that these options will be merged into the Tracker. + # + # This method returns a RescanReport object with information about the scan. + # However, the Tracker object will also be modified as the scan is run. + # + # source://brakeman//lib/brakeman.rb#464 + def rescan(tracker, files, options = T.unsafe(nil)); end + + # Run Brakeman scan. Returns Tracker object. + # + # Options: + # + # * :app_path - path to root of Rails app (required) + # * :additional_checks_path - array of additional directories containing additional out-of-tree checks to run + # * :additional_libs_path - array of additional application relative lib directories (ex. app/mailers) to process + # * :assume_all_routes - assume all methods are routes (default: true) + # * :check_arguments - check arguments of methods (default: true) + # * :collapse_mass_assignment - report unprotected models in single warning (default: false) + # * :combine_locations - combine warning locations (default: true) + # * :config_file - configuration file + # * :escape_html - escape HTML by default (automatic) + # * :exit_on_error - only affects Commandline module (default: true) + # * :exit_on_warn - only affects Commandline module (default: true) + # * :github_repo - github repo to use for file links (user/repo[/path][@ref]) + # * :highlight_user_input - highlight user input in reported warnings (default: true) + # * :html_style - path to CSS file + # * :ignore_model_output - consider models safe (default: false) + # * :index_libs - add libraries to call index (default: true) + # * :interprocedural - limited interprocedural processing of method calls (default: false) + # * :message_limit - limit length of messages + # * :min_confidence - minimum confidence (0-2, 0 is highest) + # * :output_files - files for output + # * :output_formats - formats for output (:to_s, :to_tabs, :to_csv, :to_html) + # * :parallel_checks - run checks in parallel (default: true) + # * :parser_timeout - set timeout for parsing an individual file (default: 10 seconds) + # * :print_report - if no output file specified, print to stdout (default: false) + # * :quiet - suppress most messages (default: true) + # * :rails3 - force Rails 3 mode (automatic) + # * :rails4 - force Rails 4 mode (automatic) + # * :rails5 - force Rails 5 mode (automatic) + # * :rails6 - force Rails 6 mode (automatic) + # * :report_routes - show found routes on controllers (default: false) + # * :run_checks - array of checks to run (run all if not specified) + # * :safe_methods - array of methods to consider safe + # * :show_ignored - Display warnings that are usually ignored + # * :sql_safe_methods - array of sql sanitization methods to consider safe + # * :skip_libs - do not process lib/ directory (default: false) + # * :skip_vendor - do not process vendor/ directory (default: true) + # * :skip_checks - checks not to run (run all if not specified) + # * :absolute_paths - show absolute path of each file (default: false) + # * :summary_only - only output summary section of report for plain/table (:summary_only, :no_summary, true) + # + # Alternatively, just supply a path as a string. + # + # source://brakeman//lib/brakeman.rb#77 + def run(options); end + + # Run a scan. Generally called from Brakeman.run instead of directly. + # + # source://brakeman//lib/brakeman.rb#374 + def scan(options); end + + # Sets up options for run, checks given application path + # + # source://brakeman//lib/brakeman.rb#91 + def set_options(options); end + + private + + # source://brakeman//lib/brakeman.rb#264 + def get_formats_from_output_files(output_files); end + + # source://brakeman//lib/brakeman.rb#230 + def get_formats_from_output_format(output_format); end + + # source://brakeman//lib/brakeman.rb#300 + def get_github_url(options); end + + # source://brakeman//lib/brakeman.rb#418 + def write_report_to_files(tracker, output_files); end + + # source://brakeman//lib/brakeman.rb#436 + def write_report_to_formats(tracker, output_formats); end + end +end + +# source://brakeman//lib/brakeman.rb#161 +Brakeman::CONFIG_FILES = T.let(T.unsafe(nil), Array) + +# source://brakeman//lib/brakeman.rb#597 +class Brakeman::DependencyError < ::RuntimeError; end + +# Exit code returned when an ignored warning has no note and +# --ensure-ignore-notes is set +# +# source://brakeman//lib/brakeman.rb#25 +Brakeman::Empty_Ignore_Note_Exit_Code = T.let(T.unsafe(nil), Integer) + +# Exit code returned when errors were found and the --exit-on-error +# option is set +# +# source://brakeman//lib/brakeman.rb#21 +Brakeman::Errors_Found_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman.rb#600 +class Brakeman::MissingChecksError < ::RuntimeError; end + +# Exit code returned when user requests non-existent checks +# +# source://brakeman//lib/brakeman.rb#17 +Brakeman::Missing_Checks_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman.rb#599 +class Brakeman::NoApplication < ::RuntimeError; end + +# source://brakeman//lib/brakeman.rb#598 +class Brakeman::NoBrakemanError < ::RuntimeError; end + +# Exit code returned when no Rails application is detected +# +# source://brakeman//lib/brakeman.rb#11 +Brakeman::No_App_Found_Exit_Code = T.let(T.unsafe(nil), Integer) + +# Exit code returned when brakeman was outdated +# +# source://brakeman//lib/brakeman.rb#14 +Brakeman::Not_Latest_Version_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman/version.rb#2 +Brakeman::Version = T.let(T.unsafe(nil), String) + +# This exit code is used when warnings are found and the --exit-on-warn +# option is set +# +# source://brakeman//lib/brakeman.rb#8 +Brakeman::Warnings_Found_Exit_Code = T.let(T.unsafe(nil), Integer) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/builder@3.3.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/builder@3.3.0.rbi new file mode 100644 index 0000000..177ba9a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/builder@3.3.0.rbi @@ -0,0 +1,9 @@ +# 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/apps/govquests-api/rails_app/sorbet/rbi/gems/byebug@11.1.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/byebug@11.1.3.rbi new file mode 100644 index 0000000..0e1a7eb --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/byebug@11.1.3.rbi @@ -0,0 +1,3607 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `byebug` gem. +# Please instead update this file by running `bin/tapioca gem byebug`. + + +# Reopen main module to define the library version +# +# source://byebug//lib/byebug/helpers/reflection.rb#3 +module Byebug + include ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug + + # Debugger's display expressions + # + # source://byebug//lib/byebug/core.rb#31 + def displays; end + + # Debugger's display expressions + # + # source://byebug//lib/byebug/core.rb#31 + def displays=(_arg0); end + + # Configuration file used for startup commands. Default value is .byebugrc + # + # source://byebug//lib/byebug/core.rb#25 + def init_file; end + + # Configuration file used for startup commands. Default value is .byebugrc + # + # source://byebug//lib/byebug/core.rb#25 + def init_file=(_arg0); end + + # Running mode of the debugger. Can be either: + # + # * :attached => Attached to a running program through the `byebug` method. + # * :standalone => Started through `byebug` script. + # * :off => Ignoring any `byebug` method calls. + # + # source://byebug//lib/byebug/core.rb#41 + def mode; end + + # Running mode of the debugger. Can be either: + # + # * :attached => Attached to a running program through the `byebug` method. + # * :standalone => Started through `byebug` script. + # * :off => Ignoring any `byebug` method calls. + # + # source://byebug//lib/byebug/core.rb#41 + def mode=(_arg0); end + + # Runs normal byebug initialization scripts. + # + # Reads and executes the commands from init file (if any) in the current + # working directory. This is only done if the current directory is different + # from your home directory. Thus, you can have more than one init file, one + # generic in your home directory, and another, specific to the program you + # are debugging, in the directory where you invoke byebug. + # + # source://byebug//lib/byebug/core.rb#52 + def run_init_script; end + + private + + def add_catchpoint(_arg0); end + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + def lock; end + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # List of folders to load rc files from + # + # @note Files will be loaded in the order specified here. + # + # source://byebug//lib/byebug/core.rb#102 + def rc_dirs; end + + # Runs a initialization script file + # + # source://byebug//lib/byebug/core.rb#91 + def run_rc_file(rc_file); end + + def start; end + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + class << self + # The actual port that the control server is started at + # + # source://byebug//lib/byebug/remote.rb#25 + def actual_control_port; end + + # The actual port that the server is started at + # + # source://byebug//lib/byebug/remote.rb#20 + def actual_port; end + + def add_catchpoint(_arg0); end + + # Starts byebug, and stops at the first line of user's code. + # + # source://byebug//lib/byebug/attacher.rb#10 + def attach; end + + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + + # Saves information about the unhandled exception and gives a byebug + # prompt back to the user before program termination. + # + # source://byebug//lib/byebug/core.rb#76 + def handle_post_mortem; end + + # Interrupts the current thread + # + # source://byebug//lib/byebug/remote.rb#32 + def interrupt; end + + # source://byebug//lib/byebug/core.rb#61 + def load_settings; end + + def lock; end + + # source://byebug//lib/byebug/remote.rb#59 + def parse_host_and_port(host_port_spec); end + + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # source://byebug//lib/byebug/attacher.rb#21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def start; end + + # Connects to the remote byebug + # + # source://byebug//lib/byebug/remote.rb#55 + def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # Starts the remote server control thread + # + # source://byebug//lib/byebug/remote.rb#48 + def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # Starts the remote server main thread + # + # source://byebug//lib/byebug/remote.rb#39 + def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + # If in remote mode, wait for the remote connection + # + # source://byebug//lib/byebug/remote.rb#17 + def wait_connection; end + + # If in remote mode, wait for the remote connection + # + # source://byebug//lib/byebug/remote.rb#17 + def wait_connection=(_arg0); end + + private + + # source://byebug//lib/byebug/remote.rb#66 + def client; end + + # source://byebug//lib/byebug/remote.rb#76 + def control; end + + # source://byebug//lib/byebug/remote.rb#70 + def server; end + end +end + +# Setting for automatically invoking IRB on every stop. +# +# source://byebug//lib/byebug/settings/autoirb.rb#10 +class Byebug::AutoirbSetting < ::Byebug::Setting + # @return [AutoirbSetting] a new instance of AutoirbSetting + # + # source://byebug//lib/byebug/settings/autoirb.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autoirb.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autoirb.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autoirb.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autoirb.rb#11 +Byebug::AutoirbSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically listing source code on every stop. +# +# source://byebug//lib/byebug/settings/autolist.rb#10 +class Byebug::AutolistSetting < ::Byebug::Setting + # @return [AutolistSetting] a new instance of AutolistSetting + # + # source://byebug//lib/byebug/settings/autolist.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autolist.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autolist.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autolist.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autolist.rb#11 +Byebug::AutolistSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically invoking Pry on every stop. +# +# source://byebug//lib/byebug/settings/autopry.rb#10 +class Byebug::AutoprySetting < ::Byebug::Setting + # @return [AutoprySetting] a new instance of AutoprySetting + # + # source://byebug//lib/byebug/settings/autopry.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autopry.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autopry.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autopry.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autopry.rb#11 +Byebug::AutoprySetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically saving previously entered commands to history +# when exiting the debugger. +# +# source://byebug//lib/byebug/settings/autosave.rb#10 +class Byebug::AutosaveSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/autosave.rb#13 + def banner; end +end + +# source://byebug//lib/byebug/settings/autosave.rb#11 +Byebug::AutosaveSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) + +# Command to display short paths in file names. +# +# For example, when displaying source code information. +# +# source://byebug//lib/byebug/settings/basename.rb#11 +class Byebug::BasenameSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/basename.rb#12 + def banner; end +end + +# Implements breakpoint functionality +# +# source://byebug//lib/byebug/commands/break.rb#13 +class Byebug::BreakCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/break.rb#40 + def execute; end + + private + + # source://byebug//lib/byebug/commands/break.rb#83 + def add_line_breakpoint(file, line); end + + # source://byebug//lib/byebug/commands/break.rb#54 + def line_breakpoint(location); end + + # source://byebug//lib/byebug/commands/break.rb#65 + def method_breakpoint(location); end + + # source://byebug//lib/byebug/commands/break.rb#74 + def target_object(str); end + + # source://byebug//lib/byebug/commands/break.rb#104 + def valid_breakpoints_for(path, line); end + + class << self + # source://byebug//lib/byebug/commands/break.rb#24 + def description; end + + # source://byebug//lib/byebug/commands/break.rb#20 + def regexp; end + + # source://byebug//lib/byebug/commands/break.rb#36 + def short_description; end + end +end + +# Implements breakpoints +# +# source://byebug//lib/byebug/breakpoint.rb#7 +class Byebug::Breakpoint + def initialize(_arg0, _arg1, _arg2); end + + def enabled=(_arg0); end + def enabled?; end + def expr; end + def expr=(_arg0); end + def hit_condition; end + def hit_condition=(_arg0); end + def hit_count; end + def hit_value; end + def hit_value=(_arg0); end + def id; end + + # Prints all information associated to the breakpoint + # + # source://byebug//lib/byebug/breakpoint.rb#105 + def inspect; end + + def pos; end + def source; end + + class << self + # Adds a new breakpoint + # + # @param file [String] + # @param line [Fixnum] + # @param expr [String] + # + # source://byebug//lib/byebug/breakpoint.rb#29 + def add(file, line, expr = T.unsafe(nil)); end + + # First breakpoint, in order of creation + # + # source://byebug//lib/byebug/breakpoint.rb#11 + def first; end + + # Last breakpoint, in order of creation + # + # source://byebug//lib/byebug/breakpoint.rb#18 + def last; end + + # True if there's no breakpoints + # + # @return [Boolean] + # + # source://byebug//lib/byebug/breakpoint.rb#98 + def none?; end + + # Returns true if a breakpoint could be set in line number +lineno+ in file + # name +filename. + # + # @return [Boolean] + # + # source://byebug//lib/byebug/breakpoint.rb#91 + def potential_line?(filename, lineno); end + + # Returns an array of line numbers in file named +filename+ where + # breakpoints could be set. The list will contain an entry for each + # distinct line event call so it is possible (and possibly useful) for a + # line number appear more than once. + # + # @param filename [String] File name to inspect for possible breakpoints + # + # source://byebug//lib/byebug/breakpoint.rb#52 + def potential_lines(filename); end + + # Removes a breakpoint + # + # @param id [integer] breakpoint number + # + # source://byebug//lib/byebug/breakpoint.rb#40 + def remove(id); end + + private + + # source://byebug//lib/byebug/breakpoint.rb#63 + def potential_lines_with_trace_points(iseq, lines); end + + # source://byebug//lib/byebug/breakpoint.rb#74 + def potential_lines_without_trace_points(iseq, lines); end + end +end + +# Setting to customize the verbosity level for stack frames. +# +# source://byebug//lib/byebug/settings/callstyle.rb#9 +class Byebug::CallstyleSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/callstyle.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/callstyle.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/callstyle.rb#10 +Byebug::CallstyleSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Implements exception catching. +# +# Enables the user to catch unhandled assertion when they happen. +# +# source://byebug//lib/byebug/commands/catch.rb#12 +class Byebug::CatchCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/catch.rb#38 + def execute; end + + private + + # source://byebug//lib/byebug/commands/catch.rb#57 + def add(exception); end + + # source://byebug//lib/byebug/commands/catch.rb#64 + def clear; end + + # source://byebug//lib/byebug/commands/catch.rb#68 + def info; end + + # source://byebug//lib/byebug/commands/catch.rb#50 + def remove(exception); end + + class << self + # source://byebug//lib/byebug/commands/catch.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/catch.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/catch.rb#34 + def short_description; end + end +end + +# Parent class of all byebug commands. +# +# Subclass it and name the subclass ending with the word Command to implement +# your own custom command. +# +# class MyCustomCommand < Command +# def self.regexp +# /custom_regexp/ +# end +# +# def self.description +# "Custom long desc" +# end +# +# def.short_description +# "Custom short desc" +# end +# +# def execute +# # My command's implementation +# end +# end +# +# @example Define a custom command +# +# source://byebug//lib/byebug/command.rb#33 +class Byebug::Command + extend ::Forwardable + extend ::Byebug::Helpers::StringHelper + + # @return [Command] a new instance of Command + # + # source://byebug//lib/byebug/command.rb#38 + def initialize(processor, input = T.unsafe(nil)); end + + # source://byebug//lib/byebug/command.rb#51 + def arguments; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def confirm(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#43 + def context; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def errmsg(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#47 + def frame; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def help(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def match(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pr(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prc(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print(*args, **_arg1, &block); end + + # Returns the value of attribute processor. + # + # source://byebug//lib/byebug/command.rb#36 + def processor; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prv(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def puts(*args, **_arg1, &block); end + + class << self + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_control; end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_control=(_arg0); end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_post_mortem; end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_post_mortem=(_arg0); end + + # source://byebug//lib/byebug/command.rb#73 + def always_run; end + + # Sets the attribute always_run + # + # @param value the value to set the attribute always_run to. + # + # source://byebug//lib/byebug/command.rb#71 + def always_run=(_arg0); end + + # source://byebug//lib/byebug/command.rb#88 + def columnize(width); end + + # Default help text for a command. + # + # source://byebug//lib/byebug/command.rb#99 + def help; end + + # Command's regexp match against an input + # + # source://byebug//lib/byebug/command.rb#106 + def match(input); end + + # Name of the command, as executed by the user. + # + # source://byebug//lib/byebug/command.rb#80 + def to_s; end + end +end + +# Holds an array of subcommands for a command +# +# source://byebug//lib/byebug/command_list.rb#9 +class Byebug::CommandList + include ::Enumerable + + # @return [CommandList] a new instance of CommandList + # + # source://byebug//lib/byebug/command_list.rb#12 + def initialize(commands); end + + # source://byebug//lib/byebug/command_list.rb#20 + def each; end + + # source://byebug//lib/byebug/command_list.rb#16 + def match(input); end + + # source://byebug//lib/byebug/command_list.rb#24 + def to_s; end + + private + + # source://byebug//lib/byebug/command_list.rb#30 + def width; end +end + +# Custom exception exception to signal "command not found" errors +# +# source://byebug//lib/byebug/errors.rb#7 +class Byebug::CommandNotFound < ::NoMethodError + # @return [CommandNotFound] a new instance of CommandNotFound + # + # source://byebug//lib/byebug/errors.rb#8 + def initialize(input, parent = T.unsafe(nil)); end + + private + + # source://byebug//lib/byebug/errors.rb#25 + def build_cmd(*args); end + + # source://byebug//lib/byebug/errors.rb#21 + def help; end + + # source://byebug//lib/byebug/errors.rb#17 + def name; end +end + +# Processes commands in regular mode. +# +# You can override this class to create your own command processor that, for +# example, whitelists only certain commands to be executed. +# +# @see PostMortemProcessor for a example +# +# source://byebug//lib/byebug/processors/command_processor.rb#17 +class Byebug::CommandProcessor + include ::Byebug::Helpers::EvalHelper + extend ::Forwardable + + # @return [CommandProcessor] a new instance of CommandProcessor + # + # source://byebug//lib/byebug/processors/command_processor.rb#23 + def initialize(context, interface = T.unsafe(nil)); end + + # source://byebug//lib/byebug/processors/command_processor.rb#64 + def at_breakpoint(brkpt); end + + # source://byebug//lib/byebug/processors/command_processor.rb#70 + def at_catchpoint(exception); end + + # source://byebug//lib/byebug/processors/command_processor.rb#80 + def at_end; end + + # source://byebug//lib/byebug/processors/command_processor.rb#54 + def at_line; end + + # source://byebug//lib/byebug/processors/command_processor.rb#74 + def at_return(return_value); end + + # source://byebug//lib/byebug/processors/command_processor.rb#58 + def at_tracing; end + + # Available commands + # + # source://byebug//lib/byebug/processors/command_processor.rb#50 + def command_list; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def confirm(*args, **_arg1, &block); end + + # Returns the value of attribute context. + # + # source://byebug//lib/byebug/processors/command_processor.rb#21 + def context; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def errmsg(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def frame(*args, **_arg1, &block); end + + # Returns the value of attribute interface. + # + # source://byebug//lib/byebug/processors/command_processor.rb#21 + def interface; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pr(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prc(*args, **_arg1, &block); end + + # Returns the value of attribute prev_line. + # + # source://byebug//lib/byebug/processors/command_processor.rb#20 + def prev_line; end + + # Sets the attribute prev_line + # + # @param value the value to set the attribute prev_line to. + # + # source://byebug//lib/byebug/processors/command_processor.rb#20 + def prev_line=(_arg0); end + + # source://byebug//lib/byebug/processors/command_processor.rb#31 + def printer; end + + # Let the execution continue + # + # source://byebug//lib/byebug/processors/command_processor.rb#87 + def proceed!; end + + # Handle byebug commands. + # + # source://byebug//lib/byebug/processors/command_processor.rb#94 + def process_commands; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prv(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def puts(*args, **_arg1, &block); end + + protected + + # source://byebug//lib/byebug/processors/command_processor.rb#119 + def after_repl; end + + # source://byebug//lib/byebug/processors/command_processor.rb#111 + def before_repl; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/command_processor.rb#107 + def prompt; end + + # Main byebug's REPL + # + # source://byebug//lib/byebug/processors/command_processor.rb#126 + def repl; end + + private + + # source://byebug//lib/byebug/processors/command_processor.rb#139 + def auto_cmds_for(run_level); end + + # Run permanent commands. + # + # source://byebug//lib/byebug/processors/command_processor.rb#146 + def run_auto_cmds(run_level); end + + # Executes the received input + # + # Instantiates a command matching the input and runs it. If a matching + # command is not found, it evaluates the unknown input. + # + # source://byebug//lib/byebug/processors/command_processor.rb#158 + def run_cmd(input); end + + # source://byebug//lib/byebug/processors/command_processor.rb#167 + def safely; end +end + +# Implements conditions on breakpoints. +# +# Adds the ability to stop on breakpoints only under certain conditions. +# +# source://byebug//lib/byebug/commands/condition.rb#12 +class Byebug::ConditionCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/condition.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/condition.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/condition.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/condition.rb#34 + def short_description; end + end +end + +# Mantains context information for the debugger and it's the main +# communication point between the library and the C-extension through the +# at_breakpoint, at_catchpoint, at_tracing, at_line and at_return callbacks +# +# source://byebug//lib/byebug/context.rb#14 +class Byebug::Context + include ::Byebug::Helpers::FileHelper + extend ::Byebug::Helpers::PathHelper + extend ::Forwardable + + # Breakpoint handler + # + # source://byebug//lib/byebug/context.rb#113 + def at_breakpoint(breakpoint); end + + # Catchpoint handler + # + # source://byebug//lib/byebug/context.rb#120 + def at_catchpoint(exception); end + + # End of class definition handler + # + # source://byebug//lib/byebug/context.rb#136 + def at_end; end + + # Line handler + # + # source://byebug//lib/byebug/context.rb#94 + def at_line; end + + # Return handler + # + # source://byebug//lib/byebug/context.rb#127 + def at_return(return_value); end + + # Tracing handler + # + # source://byebug//lib/byebug/context.rb#104 + def at_tracing; end + + def backtrace; end + def dead?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def file(*args, **_arg1, &block); end + + # Reader for the current frame + # + # source://byebug//lib/byebug/context.rb#46 + def frame; end + + # Writer for the current frame + # + # source://byebug//lib/byebug/context.rb#53 + def frame=(pos); end + + def frame_binding(*_arg0); end + def frame_class(*_arg0); end + def frame_file(*_arg0); end + def frame_line(*_arg0); end + def frame_method(*_arg0); end + def frame_self(*_arg0); end + + # Current file, line and source code information + # + # source://byebug//lib/byebug/context.rb#70 + def full_location; end + + def ignored?; end + + # source://byebug//lib/byebug/context.rb#87 + def interrupt; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def line(*args, **_arg1, &block); end + + # Current file & line information + # + # source://byebug//lib/byebug/context.rb#63 + def location; end + + def resume; end + + # Context's stack size + # + # source://byebug//lib/byebug/context.rb#79 + def stack_size; end + + def step_into(*_arg0); end + def step_out(*_arg0); end + def step_over(*_arg0); end + def stop_reason; end + def suspend; end + def suspended?; end + def switch; end + def thnum; end + def thread; end + def tracing; end + def tracing=(_arg0); end + + private + + # Tells whether a file is ignored by the debugger. + # + # @param path [String] filename to be checked. + # @return [Boolean] + # + # source://byebug//lib/byebug/context.rb#153 + def ignored_file?(path); end + + # source://byebug//lib/byebug/context.rb#144 + def processor; end + + class << self + # List of files byebug will ignore while debugging + # + # source://byebug//lib/byebug/context.rb#25 + def ignored_files; end + + # Sets the attribute ignored_files + # + # @param value the value to set the attribute ignored_files to. + # + # source://byebug//lib/byebug/context.rb#20 + def ignored_files=(_arg0); end + + # source://byebug//lib/byebug/context.rb#32 + def interface; end + + # Sets the attribute interface + # + # @param value the value to set the attribute interface to. + # + # source://byebug//lib/byebug/context.rb#30 + def interface=(_arg0); end + + # source://byebug//lib/byebug/context.rb#38 + def processor; end + + # Sets the attribute processor + # + # @param value the value to set the attribute processor to. + # + # source://byebug//lib/byebug/context.rb#36 + def processor=(_arg0); end + end +end + +# Implements the continue command. +# +# Allows the user to continue execution until the next stopping point, a +# specific line number or until program termination. +# +# source://byebug//lib/byebug/commands/continue.rb#13 +class Byebug::ContinueCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/continue.rb#37 + def execute; end + + private + + # source://byebug//lib/byebug/commands/continue.rb#64 + def modifier; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/continue.rb#60 + def unconditionally?; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/continue.rb#56 + def until_line?; end + + class << self + # source://byebug//lib/byebug/commands/continue.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/continue.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/continue.rb#33 + def short_description; end + end +end + +# Processes commands when there's not program running +# +# source://byebug//lib/byebug/processors/control_processor.rb#9 +class Byebug::ControlProcessor < ::Byebug::CommandProcessor + # Available commands + # + # source://byebug//lib/byebug/processors/control_processor.rb#13 + def commands; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/control_processor.rb#20 + def prompt; end +end + +# Spawns a subdebugger and evaluates the given expression +# +# source://byebug//lib/byebug/commands/debug.rb#10 +class Byebug::DebugCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/debug.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/debug.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/debug.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/debug.rb#28 + def short_description; end + end +end + +class Byebug::DebugThread < ::Thread + class << self + def inherited; end + end +end + +# Implements breakpoint deletion. +# +# source://byebug//lib/byebug/commands/delete.rb#10 +class Byebug::DeleteCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/delete.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/delete.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/delete.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/delete.rb#31 + def short_description; end + end +end + +# Disabling custom display expressions or breakpoints. +# +# source://byebug//lib/byebug/commands/disable/breakpoints.rb#9 +class Byebug::DisableCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/disable.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/disable.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/disable.rb#29 + def short_description; end + end +end + +# Disables all or specific breakpoints +# +# source://byebug//lib/byebug/commands/disable/breakpoints.rb#13 +class Byebug::DisableCommand::BreakpointsCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#33 + def short_description; end + end +end + +# Enables all or specific displays +# +# source://byebug//lib/byebug/commands/disable/display.rb#13 +class Byebug::DisableCommand::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/disable/display.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/disable/display.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/disable/display.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/disable/display.rb#34 + def short_description; end + end +end + +# Custom expressions to be displayed every time the debugger stops. +# +# source://byebug//lib/byebug/commands/display.rb#10 +class Byebug::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/display.rb#35 + def execute; end + + private + + # source://byebug//lib/byebug/commands/display.rb#44 + def display_expression(exp); end + + # source://byebug//lib/byebug/commands/display.rb#60 + def eval_expr(expression); end + + # source://byebug//lib/byebug/commands/display.rb#50 + def print_display_expressions; end + + class << self + # source://byebug//lib/byebug/commands/display.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/display.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/display.rb#31 + def short_description; end + end +end + +# Move the current frame down in the backtrace. +# +# source://byebug//lib/byebug/commands/down.rb#12 +class Byebug::DownCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/down.rb#36 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/down.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/down.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/down.rb#32 + def short_description; end + end +end + +# Edit a file from byebug's prompt. +# +# source://byebug//lib/byebug/commands/edit.rb#9 +class Byebug::EditCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/edit.rb#33 + def execute; end + + private + + # source://byebug//lib/byebug/commands/edit.rb#65 + def edit_error(type, file); end + + # source://byebug//lib/byebug/commands/edit.rb#61 + def editor; end + + # source://byebug//lib/byebug/commands/edit.rb#45 + def location(matched); end + + class << self + # source://byebug//lib/byebug/commands/edit.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/edit.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/edit.rb#29 + def short_description; end + end +end + +# Enabling custom display expressions or breakpoints. +# +# source://byebug//lib/byebug/commands/enable/breakpoints.rb#9 +class Byebug::EnableCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/enable.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/enable.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/enable.rb#29 + def short_description; end + end +end + +# Enables all or specific breakpoints +# +# source://byebug//lib/byebug/commands/enable/breakpoints.rb#13 +class Byebug::EnableCommand::BreakpointsCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#33 + def short_description; end + end +end + +# Enables all or specific displays +# +# source://byebug//lib/byebug/commands/enable/display.rb#13 +class Byebug::EnableCommand::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/enable/display.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/enable/display.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/enable/display.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/enable/display.rb#34 + def short_description; end + end +end + +# Implements the finish functionality. +# +# Allows the user to continue execution until certain frames are finished. +# +# source://byebug//lib/byebug/commands/finish.rb#12 +class Byebug::FinishCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/finish.rb#37 + def execute; end + + private + + # source://byebug//lib/byebug/commands/finish.rb#53 + def max_frames; end + + class << self + # source://byebug//lib/byebug/commands/finish.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/finish.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/finish.rb#33 + def short_description; end + end +end + +# Represents a frame in the stack trace +# +# source://byebug//lib/byebug/frame.rb#9 +class Byebug::Frame + include ::Byebug::Helpers::FileHelper + + # @return [Frame] a new instance of Frame + # + # source://byebug//lib/byebug/frame.rb#14 + def initialize(context, pos); end + + # source://byebug//lib/byebug/frame.rb#31 + def _binding; end + + # source://byebug//lib/byebug/frame.rb#35 + def _class; end + + # source://byebug//lib/byebug/frame.rb#39 + def _method; end + + # source://byebug//lib/byebug/frame.rb#27 + def _self; end + + # Gets current method arguments for the frame. + # + # source://byebug//lib/byebug/frame.rb#62 + def args; end + + # Checks whether the frame is a c-frame + # + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#141 + def c_frame?; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#43 + def current?; end + + # Builds a string containing all available args in the frame number, in a + # verbose or non verbose way according to the value of the +callstyle+ + # setting + # + # source://byebug//lib/byebug/frame.rb#89 + def deco_args; end + + # source://byebug//lib/byebug/frame.rb#76 + def deco_block; end + + # Builds a formatted string containing information about current method call + # + # source://byebug//lib/byebug/frame.rb#106 + def deco_call; end + + # Returns the current class in the frame or an empty string if the current + # +callstyle+ setting is 'short' + # + # source://byebug//lib/byebug/frame.rb#72 + def deco_class; end + + # Formatted filename in frame + # + # source://byebug//lib/byebug/frame.rb#113 + def deco_file; end + + # source://byebug//lib/byebug/frame.rb#80 + def deco_method; end + + # Properly formatted frame number of frame + # + # source://byebug//lib/byebug/frame.rb#120 + def deco_pos; end + + # source://byebug//lib/byebug/frame.rb#19 + def file; end + + # source://byebug//lib/byebug/frame.rb#23 + def line; end + + # Gets local variables for the frame. + # + # source://byebug//lib/byebug/frame.rb#50 + def locals; end + + # Formatted mark for the frame. + # + # --> marks the current frame + # ͱ-- marks c-frames + # marks regular frames + # + # source://byebug//lib/byebug/frame.rb#131 + def mark; end + + # Returns the value of attribute pos. + # + # source://byebug//lib/byebug/frame.rb#12 + def pos; end + + # source://byebug//lib/byebug/frame.rb#145 + def to_hash; end + + private + + # source://byebug//lib/byebug/frame.rb#158 + def c_args; end + + # source://byebug//lib/byebug/frame.rb#178 + def prefix_and_default(arg_type); end + + # source://byebug//lib/byebug/frame.rb#164 + def ruby_args; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#174 + def use_short_style?(arg); end +end + +# Move to specific frames in the backtrace. +# +# source://byebug//lib/byebug/commands/frame.rb#12 +class Byebug::FrameCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/frame.rb#46 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/frame.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/frame.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/frame.rb#42 + def short_description; end + end +end + +# Setting to display full paths in backtraces. +# +# source://byebug//lib/byebug/settings/fullpath.rb#9 +class Byebug::FullpathSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/fullpath.rb#12 + def banner; end +end + +# source://byebug//lib/byebug/settings/fullpath.rb#10 +Byebug::FullpathSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) + +# Ask for help from byebug's prompt. +# +# source://byebug//lib/byebug/commands/help.rb#10 +class Byebug::HelpCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/help.rb#34 + def execute; end + + private + + # source://byebug//lib/byebug/commands/help.rb#54 + def command; end + + # @raise [CommandNotFound] + # + # source://byebug//lib/byebug/commands/help.rb#48 + def help_for(input, cmd); end + + # source://byebug//lib/byebug/commands/help.rb#44 + def help_for_all; end + + # source://byebug//lib/byebug/commands/help.rb#58 + def subcommand; end + + class << self + # source://byebug//lib/byebug/commands/help.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/help.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/help.rb#30 + def short_description; end + end +end + +# source://byebug//lib/byebug/helpers/reflection.rb#4 +module Byebug::Helpers; end + +# Utilities for interaction with executables +# +# source://byebug//lib/byebug/helpers/bin.rb#8 +module Byebug::Helpers::BinHelper + # source://byebug//lib/byebug/helpers/bin.rb#38 + def executable_file_extensions; end + + # source://byebug//lib/byebug/helpers/bin.rb#24 + def find_executable(path, cmd); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/bin.rb#42 + def real_executable?(file); end + + # source://byebug//lib/byebug/helpers/bin.rb#34 + def search_paths; end + + # Cross-platform way of finding an executable in the $PATH. + # Adapted from: https://gist.github.com/steakknife/88b6c3837a5e90a08296 + # + # source://byebug//lib/byebug/helpers/bin.rb#13 + def which(cmd); end +end + +# Utilities to assist evaluation of code strings +# +# source://byebug//lib/byebug/helpers/eval.rb#8 +module Byebug::Helpers::EvalHelper + # Evaluates a string containing Ruby code in a specific binding, + # handling the errors at an error level. + # + # source://byebug//lib/byebug/helpers/eval.rb#46 + def error_eval(str, binding = T.unsafe(nil)); end + + # Evaluates an +expression+ that might use or defer execution to threads + # other than the current one. + # + # "frozen" so that nothing gets run. So we need to unlock threads prior + # to evaluation or we will run into a deadlock. + # + # @note This is necessary because when in byebug's prompt, every thread is + # @param expression [String] Expression to evaluate + # + # source://byebug//lib/byebug/helpers/eval.rb#30 + def multiple_thread_eval(expression); end + + # Evaluates an +expression+ in a separate thread. + # + # @param expression [String] Expression to evaluate + # + # source://byebug//lib/byebug/helpers/eval.rb#14 + def separate_thread_eval(expression); end + + # Evaluates a string containing Ruby code in a specific binding, + # returning nil in an error happens. + # + # source://byebug//lib/byebug/helpers/eval.rb#38 + def silent_eval(str, binding = T.unsafe(nil)); end + + # Evaluates a string containing Ruby code in a specific binding, + # handling the errors at a warning level. + # + # source://byebug//lib/byebug/helpers/eval.rb#54 + def warning_eval(str, binding = T.unsafe(nil)); end + + private + + # Run block temporarily ignoring all TracePoint events. + # + # Used to evaluate stuff within Byebug's prompt. Otherwise, any code + # creating new threads won't be properly evaluated because new threads + # will get blocked by byebug's main thread. + # + # source://byebug//lib/byebug/helpers/eval.rb#91 + def allowing_other_threads; end + + # source://byebug//lib/byebug/helpers/eval.rb#72 + def error_msg(exception); end + + # Runs the given block in a new thread, waits for it to finish and + # returns the new thread's result. + # + # source://byebug//lib/byebug/helpers/eval.rb#105 + def in_new_thread; end + + # source://byebug//lib/byebug/helpers/eval.rb#66 + def msg(exception); end + + # source://byebug//lib/byebug/helpers/eval.rb#60 + def safe_eval(str, binding); end + + # source://byebug//lib/byebug/helpers/eval.rb#113 + def safe_inspect(var); end + + # source://byebug//lib/byebug/helpers/eval.rb#119 + def safe_to_s(var); end + + # source://byebug//lib/byebug/helpers/eval.rb#80 + def warning_msg(exception); end +end + +# Utilities for interaction with files +# +# source://byebug//lib/byebug/helpers/file.rb#8 +module Byebug::Helpers::FileHelper + # Reads line number +lineno+ from file named +filename+ + # + # source://byebug//lib/byebug/helpers/file.rb#19 + def get_line(filename, lineno); end + + # Reads lines of source file +filename+ into an array + # + # source://byebug//lib/byebug/helpers/file.rb#12 + def get_lines(filename); end + + # Returns the number of lines in file +filename+ in a portable, + # one-line-at-a-time way. + # + # source://byebug//lib/byebug/helpers/file.rb#30 + def n_lines(filename); end + + # Regularize file name. + # + # source://byebug//lib/byebug/helpers/file.rb#37 + def normalize(filename); end + + # A short version of a long path + # + # source://byebug//lib/byebug/helpers/file.rb#48 + def shortpath(fullpath); end + + # True for special files like -e, false otherwise + # + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/file.rb#58 + def virtual_file?(name); end +end + +# Utilities to assist frame navigation +# +# source://byebug//lib/byebug/helpers/frame.rb#8 +module Byebug::Helpers::FrameHelper + # source://byebug//lib/byebug/helpers/frame.rb#16 + def jump_frames(steps); end + + # source://byebug//lib/byebug/helpers/frame.rb#9 + def switch_to_frame(frame); end + + private + + # source://byebug//lib/byebug/helpers/frame.rb#22 + def adjust_frame(new_frame); end + + # @param step [Integer] A positive or negative integer + # @return [Integer] +1 if step is positive / -1 if negative + # + # source://byebug//lib/byebug/helpers/frame.rb#60 + def direction(step); end + + # source://byebug//lib/byebug/helpers/frame.rb#51 + def frame_err(msg); end + + # Convert a possibly negative index to a positive index from the start + # of the callstack. -1 is the last position in the stack and so on. + # + # @param i [Integer] Integer to be converted in a proper positive index. + # + # source://byebug//lib/byebug/helpers/frame.rb#70 + def index_from_start(index); end + + # source://byebug//lib/byebug/helpers/frame.rb#30 + def navigate_to_frame(jump_no); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/frame.rb#47 + def out_of_bounds?(pos); end +end + +# Utilities to assist command parsing +# +# source://byebug//lib/byebug/helpers/parse.rb#8 +module Byebug::Helpers::ParseHelper + # Parses +str+ of command +cmd+ as an integer between +min+ and +max+. + # + # If either +min+ or +max+ is nil, that value has no bound. + # + # purpose. + # + # @todo Remove the `cmd` parameter. It has nothing to do with the method's + # + # source://byebug//lib/byebug/helpers/parse.rb#17 + def get_int(str, cmd, min = T.unsafe(nil), max = T.unsafe(nil)); end + + # @return +str+ as an integer or 1 if +str+ is empty. + # + # source://byebug//lib/byebug/helpers/parse.rb#51 + def parse_steps(str, cmd); end + + # @return [Boolean] true if code is syntactically correct for Ruby, false otherwise + # + # source://byebug//lib/byebug/helpers/parse.rb#35 + def syntax_valid?(code); end + + private + + # Temporarily disable output to $stderr + # + # source://byebug//lib/byebug/helpers/parse.rb#65 + def without_stderr; end +end + +# Utilities for managing gem paths +# +# source://byebug//lib/byebug/helpers/path.rb#8 +module Byebug::Helpers::PathHelper + # source://byebug//lib/byebug/helpers/path.rb#29 + def all_files; end + + # source://byebug//lib/byebug/helpers/path.rb#9 + def bin_file; end + + # source://byebug//lib/byebug/helpers/path.rb#25 + def gem_files; end + + # source://byebug//lib/byebug/helpers/path.rb#17 + def lib_files; end + + # source://byebug//lib/byebug/helpers/path.rb#13 + def root_path; end + + # source://byebug//lib/byebug/helpers/path.rb#21 + def test_files; end + + private + + # source://byebug//lib/byebug/helpers/path.rb#35 + def glob_for(dir); end +end + +# Reflection utilitie +# +# source://byebug//lib/byebug/helpers/reflection.rb#8 +module Byebug::Helpers::ReflectionHelper + # List of "command" classes in the including module + # + # source://byebug//lib/byebug/helpers/reflection.rb#12 + def commands; end +end + +# Utilities for interaction with strings +# +# source://byebug//lib/byebug/helpers/string.rb#8 +module Byebug::Helpers::StringHelper + # Converts +str+ from an_underscored-or-dasherized_string to + # ACamelizedString. + # + # source://byebug//lib/byebug/helpers/string.rb#13 + def camelize(str); end + + # Removes a number of leading whitespace for each input line. + # + # source://byebug//lib/byebug/helpers/string.rb#28 + def deindent(str, leading_spaces: T.unsafe(nil)); end + + # Improves indentation and spacing in +str+ for readability in Byebug's + # command prompt. + # + # source://byebug//lib/byebug/helpers/string.rb#21 + def prettify(str); end +end + +# Utilities for thread subcommands +# +# source://byebug//lib/byebug/helpers/thread.rb#8 +module Byebug::Helpers::ThreadHelper + # source://byebug//lib/byebug/helpers/thread.rb#30 + def context_from_thread(thnum); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/thread.rb#26 + def current_thread?(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#9 + def display_context(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#13 + def thread_arguments(ctx); end + + private + + # source://byebug//lib/byebug/helpers/thread.rb#62 + def debug_flag(ctx); end + + # @todo Check whether it is Byebug.current_context or context + # + # source://byebug//lib/byebug/helpers/thread.rb#47 + def location(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#56 + def status_flag(ctx); end +end + +# Utilities to assist breakpoint/display enabling/disabling. +# +# source://byebug//lib/byebug/helpers/toggle.rb#10 +module Byebug::Helpers::ToggleHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/helpers/toggle.rb#13 + def enable_disable_breakpoints(is_enable, args); end + + # source://byebug//lib/byebug/helpers/toggle.rb#26 + def enable_disable_display(is_enable, args); end + + private + + # source://byebug//lib/byebug/helpers/toggle.rb#57 + def n_displays; end + + # source://byebug//lib/byebug/helpers/toggle.rb#41 + def select_breakpoints(is_enable, args); end +end + +# Utilities for variable subcommands +# +# source://byebug//lib/byebug/helpers/var.rb#10 +module Byebug::Helpers::VarHelper + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/helpers/var.rb#42 + def var_args; end + + # source://byebug//lib/byebug/helpers/var.rb#21 + def var_global; end + + # source://byebug//lib/byebug/helpers/var.rb#29 + def var_instance(str); end + + # source://byebug//lib/byebug/helpers/var.rb#13 + def var_list(ary, binding = T.unsafe(nil)); end + + # source://byebug//lib/byebug/helpers/var.rb#35 + def var_local; end +end + +# Setting to customize the file where byebug's history is saved. +# +# source://byebug//lib/byebug/settings/histfile.rb#9 +class Byebug::HistfileSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/histfile.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/histfile.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/histfile.rb#10 +Byebug::HistfileSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Handles byebug's history of commands. +# +# source://byebug//lib/byebug/history.rb#19 +class Byebug::History + # @return [History] a new instance of History + # + # source://byebug//lib/byebug/history.rb#22 + def initialize; end + + # Array holding the list of commands in history + # + # source://byebug//lib/byebug/history.rb#29 + def buffer; end + + # Discards history. + # + # source://byebug//lib/byebug/history.rb#58 + def clear; end + + # Max number of commands to be displayed when no size has been specified. + # + # Never more than Setting[:histsize]. + # + # source://byebug//lib/byebug/history.rb#105 + def default_max_size; end + + # Whether a specific command should not be stored in history. + # + # For now, empty lines and consecutive duplicates. + # + # @return [Boolean] + # + # source://byebug//lib/byebug/history.rb#123 + def ignore?(buf); end + + # Array of ids of the last +number+ commands. + # + # source://byebug//lib/byebug/history.rb#96 + def last_ids(number); end + + # Removes a command from Readline's history. + # + # source://byebug//lib/byebug/history.rb#75 + def pop; end + + # Adds a new command to Readline's history. + # + # source://byebug//lib/byebug/history.rb#65 + def push(cmd); end + + # Restores history from disk. + # + # source://byebug//lib/byebug/history.rb#36 + def restore; end + + # Saves history to disk. + # + # source://byebug//lib/byebug/history.rb#45 + def save; end + + # Returns the value of attribute size. + # + # source://byebug//lib/byebug/history.rb#20 + def size; end + + # Sets the attribute size + # + # @param value the value to set the attribute size to. + # + # source://byebug//lib/byebug/history.rb#20 + def size=(_arg0); end + + # Max number of commands to be displayed when a size has been specified. + # + # The only bound here is not showing more items than available. + # + # source://byebug//lib/byebug/history.rb#114 + def specific_max_size(number); end + + # Prints the requested numbers of history entries. + # + # source://byebug//lib/byebug/history.rb#83 + def to_s(n_cmds); end +end + +# Show history of byebug commands. +# +# source://byebug//lib/byebug/commands/history.rb#10 +class Byebug::HistoryCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/history.rb#31 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/history.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/history.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/history.rb#27 + def short_description; end + end +end + +# Setting to customize the number of byebug commands to be saved in history. +# +# source://byebug//lib/byebug/settings/histsize.rb#9 +class Byebug::HistsizeSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/histsize.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/histsize.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/histsize.rb#10 +Byebug::HistsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Shows info about different aspects of the debugger. +# +# source://byebug//lib/byebug/commands/info/breakpoints.rb#7 +class Byebug::InfoCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/info.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/info.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/info.rb#33 + def short_description; end + end +end + +# Information about current breakpoints +# +# source://byebug//lib/byebug/commands/info/breakpoints.rb#11 +class Byebug::InfoCommand::BreakpointsCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/breakpoints.rb#30 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#47 + def info_breakpoint(brkpt); end + + class << self + # source://byebug//lib/byebug/commands/info/breakpoints.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#26 + def short_description; end + end +end + +# Information about display expressions +# +# source://byebug//lib/byebug/commands/info/display.rb#11 +class Byebug::InfoCommand::DisplayCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/display.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/info/display.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/display.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/display.rb#26 + def short_description; end + end +end + +# Information about a particular source file +# +# source://byebug//lib/byebug/commands/info/file.rb#13 +class Byebug::InfoCommand::FileCommand < ::Byebug::Command + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::StringHelper + + # source://byebug//lib/byebug/commands/info/file.rb#38 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/file.rb#55 + def info_file_basic(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#63 + def info_file_breakpoints(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#70 + def info_file_mtime(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#74 + def info_file_sha1(file); end + + class << self + # source://byebug//lib/byebug/commands/info/file.rb#23 + def description; end + + # source://byebug//lib/byebug/commands/info/file.rb#19 + def regexp; end + + # source://byebug//lib/byebug/commands/info/file.rb#34 + def short_description; end + end +end + +# Information about current location +# +# source://byebug//lib/byebug/commands/info/line.rb#11 +class Byebug::InfoCommand::LineCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/line.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/info/line.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/line.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/line.rb#26 + def short_description; end + end +end + +# Information about arguments of the current method/block +# +# source://byebug//lib/byebug/commands/info/program.rb#11 +class Byebug::InfoCommand::ProgramCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/program.rb#30 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/program.rb#37 + def format_stop_reason(stop_reason); end + + class << self + # source://byebug//lib/byebug/commands/info/program.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/program.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/program.rb#26 + def short_description; end + end +end + +# Main Interface class +# +# Contains common functionality to all implemented interfaces. +# +# source://byebug//lib/byebug/interface.rb#16 +class Byebug::Interface + include ::Byebug::Helpers::FileHelper + + # @return [Interface] a new instance of Interface + # + # source://byebug//lib/byebug/interface.rb#22 + def initialize; end + + # Restores history according to +autosave+ setting. + # + # source://byebug//lib/byebug/interface.rb#118 + def autorestore; end + + # Saves or clears history according to +autosave+ setting. + # + # source://byebug//lib/byebug/interface.rb#111 + def autosave; end + + # source://byebug//lib/byebug/interface.rb#105 + def close; end + + # Returns the value of attribute command_queue. + # + # source://byebug//lib/byebug/interface.rb#19 + def command_queue; end + + # Sets the attribute command_queue + # + # @param value the value to set the attribute command_queue to. + # + # source://byebug//lib/byebug/interface.rb#19 + def command_queue=(_arg0); end + + # Confirms user introduced an affirmative response to the input stream. + # + # source://byebug//lib/byebug/interface.rb#101 + def confirm(prompt); end + + # Prints an error message to the error stream. + # + # source://byebug//lib/byebug/interface.rb#80 + def errmsg(message); end + + # Returns the value of attribute error. + # + # source://byebug//lib/byebug/interface.rb#20 + def error; end + + # Returns the value of attribute history. + # + # source://byebug//lib/byebug/interface.rb#19 + def history; end + + # Sets the attribute history + # + # @param value the value to set the attribute history to. + # + # source://byebug//lib/byebug/interface.rb#19 + def history=(_arg0); end + + # Returns the value of attribute input. + # + # source://byebug//lib/byebug/interface.rb#20 + def input; end + + # source://byebug//lib/byebug/interface.rb#28 + def last_if_empty(input); end + + # Returns the value of attribute output. + # + # source://byebug//lib/byebug/interface.rb#20 + def output; end + + # Reads a new line from the interface's input stream. + # + # read now was empty. + # + # @return [String] New string read or the previous string if the string + # + # source://byebug//lib/byebug/interface.rb#70 + def prepare_input(prompt); end + + # Prints an output message to the output stream without a final "\n". + # + # source://byebug//lib/byebug/interface.rb#94 + def print(message); end + + # Prints an output message to the output stream. + # + # source://byebug//lib/byebug/interface.rb#87 + def puts(message); end + + # Pops a command from the input stream. + # + # source://byebug//lib/byebug/interface.rb#35 + def read_command(prompt); end + + # Pushes lines in +filename+ to the command queue. + # + # source://byebug//lib/byebug/interface.rb#44 + def read_file(filename); end + + # Reads a new line from the interface's input stream, parses it into + # commands and saves it to history. + # + # @return [String] Representing something to be run by the debugger. + # + # source://byebug//lib/byebug/interface.rb#54 + def read_input(prompt, save_hist = T.unsafe(nil)); end + + private + + # Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an + # array of commands: [cmd1, cmd2, ..., cmdN] + # + # source://byebug//lib/byebug/interface.rb#128 + def split_commands(cmd_line); end +end + +# Interrupting execution of current thread. +# +# source://byebug//lib/byebug/commands/interrupt.rb#9 +class Byebug::InterruptCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/interrupt.rb#28 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/interrupt.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/interrupt.rb#12 + def regexp; end + + # source://byebug//lib/byebug/commands/interrupt.rb#24 + def short_description; end + end +end + +# Enter IRB from byebug's prompt +# +# source://byebug//lib/byebug/commands/irb.rb#11 +class Byebug::IrbCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/irb.rb#30 + def execute; end + + private + + # source://byebug//lib/byebug/commands/irb.rb#40 + def with_clean_argv; end + + class << self + # source://byebug//lib/byebug/commands/irb.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/irb.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/irb.rb#26 + def short_description; end + end +end + +# Send custom signals to the debugged program. +# +# source://byebug//lib/byebug/commands/kill.rb#9 +class Byebug::KillCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/kill.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/kill.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/kill.rb#12 + def regexp; end + + # source://byebug//lib/byebug/commands/kill.rb#26 + def short_description; end + end +end + +# Setting to enable/disable linetracing. +# +# source://byebug//lib/byebug/settings/linetrace.rb#9 +class Byebug::LinetraceSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/linetrace.rb#10 + def banner; end + + # source://byebug//lib/byebug/settings/linetrace.rb#18 + def value; end + + # source://byebug//lib/byebug/settings/linetrace.rb#14 + def value=(val); end +end + +# List parts of the source code. +# +# source://byebug//lib/byebug/commands/list.rb#12 +class Byebug::ListCommand < ::Byebug::Command + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::ParseHelper + + # source://forwardable/1.3.3/forwardable.rb#231 + def amend_final(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/commands/list.rb#40 + def execute; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def max_line(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def size(*args, **_arg1, &block); end + + private + + # Set line range to be printed by list + # + # @return first line number to list + # @return last line number to list + # + # source://byebug//lib/byebug/commands/list.rb#79 + def auto_range(direction); end + + # Show a range of lines in the current file. + # + # @param min [Integer] Lower bound + # @param max [Integer] Upper bound + # + # source://byebug//lib/byebug/commands/list.rb#115 + def display_lines(min, max); end + + # @param range [String] A string with an integer range format + # @return [String] The lower bound of the given range + # + # source://byebug//lib/byebug/commands/list.rb#126 + def lower_bound(range); end + + # source://byebug//lib/byebug/commands/list.rb#105 + def move(line, size, direction = T.unsafe(nil)); end + + # source://byebug//lib/byebug/commands/list.rb#89 + def parse_range(input); end + + # Line range to be printed by `list`. + # + # If is set, range is parsed from it. + # + # Otherwise it's automatically chosen. + # + # source://byebug//lib/byebug/commands/list.rb#60 + def range(input); end + + # source://byebug//lib/byebug/commands/list.rb#152 + def source_file_formatter; end + + # @param str [String] A string with an integer range format + # @return [Array] The upper & lower bounds of the given range + # + # source://byebug//lib/byebug/commands/list.rb#144 + def split_range(str); end + + # @param range [String] A string with an integer range format + # @return [String] The upper bound of the given range + # + # source://byebug//lib/byebug/commands/list.rb#135 + def upper_bound(range); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/list.rb#69 + def valid_range?(first, last); end + + class << self + # source://byebug//lib/byebug/commands/list.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/list.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/list.rb#36 + def short_description; end + end +end + +# Setting to customize the number of source code lines to be displayed every +# time the "list" command is invoked. +# +# source://byebug//lib/byebug/settings/listsize.rb#10 +class Byebug::ListsizeSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/listsize.rb#13 + def banner; end + + # source://byebug//lib/byebug/settings/listsize.rb#17 + def to_s; end +end + +# source://byebug//lib/byebug/settings/listsize.rb#11 +Byebug::ListsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Interface class for standard byebug use. +# +# source://byebug//lib/byebug/interfaces/local_interface.rb#7 +class Byebug::LocalInterface < ::Byebug::Interface + # @return [LocalInterface] a new instance of LocalInterface + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#10 + def initialize; end + + # Reads a single line of input using Readline. If Ctrl-D is pressed, it + # returns "continue", meaning that program's execution will go on. + # + # @param prompt Prompt to be displayed. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#23 + def readline(prompt); end + + # Yields the block handling Ctrl-C the following way: if pressed while + # waiting for input, the line is reset to only the prompt and we ask for + # input again. + # + # @note Any external 'INT' traps are overriden during this method. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#34 + def with_repl_like_sigint; end + + # Disable any Readline completion procs. + # + # Other gems, for example, IRB could've installed completion procs that are + # dependent on them being loaded. Disable those while byebug is the REPL + # making use of Readline. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#51 + def without_readline_completion; end +end + +# source://byebug//lib/byebug/interfaces/local_interface.rb#8 +Byebug::LocalInterface::EOF_ALIAS = T.let(T.unsafe(nil), String) + +# Show methods of specific classes/modules/objects. +# +# source://byebug//lib/byebug/commands/method.rb#10 +class Byebug::MethodCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/method.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/method.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/method.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/method.rb#33 + def short_description; end + end +end + +# Implements the next functionality. +# +# Allows the user the continue execution until the next instruction in the +# current frame. +# +# source://byebug//lib/byebug/commands/next.rb#13 +class Byebug::NextCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/next.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/next.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/next.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/next.rb#28 + def short_description; end + end +end + +# Port number used for remote debugging +# +# source://byebug//lib/byebug/remote.rb#13 +Byebug::PORT = T.let(T.unsafe(nil), Integer) + +# Processes commands in post_mortem mode +# +# source://byebug//lib/byebug/processors/post_mortem_processor.rb#9 +class Byebug::PostMortemProcessor < ::Byebug::CommandProcessor + # source://byebug//lib/byebug/processors/post_mortem_processor.rb#10 + def commands; end + + # source://byebug//lib/byebug/processors/post_mortem_processor.rb#14 + def prompt; end +end + +# Setting to enable/disable post_mortem mode, i.e., a debugger prompt after +# program termination by unhandled exception. +# +# source://byebug//lib/byebug/settings/post_mortem.rb#10 +class Byebug::PostMortemSetting < ::Byebug::Setting + # @return [PostMortemSetting] a new instance of PostMortemSetting + # + # source://byebug//lib/byebug/settings/post_mortem.rb#11 + def initialize; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#15 + def banner; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#23 + def value; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#19 + def value=(val); end +end + +# source://byebug//lib/byebug/printers/base.rb#6 +module Byebug::Printers; end + +# Base printer +# +# source://byebug//lib/byebug/printers/base.rb#10 +class Byebug::Printers::Base + # source://byebug//lib/byebug/printers/base.rb#16 + def type; end + + private + + # source://byebug//lib/byebug/printers/base.rb#55 + def array_of_args(collection, &_block); end + + # source://byebug//lib/byebug/printers/base.rb#49 + def contents; end + + # source://byebug//lib/byebug/printers/base.rb#63 + def contents_files; end + + # @raise [MissedPath] + # + # source://byebug//lib/byebug/printers/base.rb#22 + def locate(path); end + + # source://byebug//lib/byebug/printers/base.rb#45 + def parts(path); end + + # source://byebug//lib/byebug/printers/base.rb#35 + def translate(string, args = T.unsafe(nil)); end +end + +# source://byebug//lib/byebug/printers/base.rb#12 +class Byebug::Printers::Base::MissedArgument < ::StandardError; end + +# source://byebug//lib/byebug/printers/base.rb#11 +class Byebug::Printers::Base::MissedPath < ::StandardError; end + +# source://byebug//lib/byebug/printers/base.rb#14 +Byebug::Printers::Base::SEPARATOR = T.let(T.unsafe(nil), String) + +# Plain text printer +# +# source://byebug//lib/byebug/printers/plain.rb#10 +class Byebug::Printers::Plain < ::Byebug::Printers::Base + # source://byebug//lib/byebug/printers/plain.rb#11 + def print(path, args = T.unsafe(nil)); end + + # source://byebug//lib/byebug/printers/plain.rb#17 + def print_collection(path, collection, &block); end + + # source://byebug//lib/byebug/printers/plain.rb#25 + def print_variables(variables, *_unused); end + + private + + # source://byebug//lib/byebug/printers/plain.rb#39 + def contents_files; end +end + +# Enter Pry from byebug's prompt +# +# source://byebug//lib/byebug/commands/pry.rb#10 +class Byebug::PryCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/pry.rb#29 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/pry.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/pry.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/pry.rb#25 + def short_description; end + end +end + +# Exit from byebug. +# +# source://byebug//lib/byebug/commands/quit.rb#9 +class Byebug::QuitCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/quit.rb#33 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/quit.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/quit.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/quit.rb#29 + def short_description; end + end +end + +# source://byebug//lib/byebug/remote/server.rb#6 +module Byebug::Remote; end + +# Client for remote debugging +# +# source://byebug//lib/byebug/remote/client.rb#10 +class Byebug::Remote::Client + # @return [Client] a new instance of Client + # + # source://byebug//lib/byebug/remote/client.rb#13 + def initialize(interface); end + + # Returns the value of attribute interface. + # + # source://byebug//lib/byebug/remote/client.rb#11 + def interface; end + + # Returns the value of attribute socket. + # + # source://byebug//lib/byebug/remote/client.rb#11 + def socket; end + + # Connects to the remote byebug + # + # source://byebug//lib/byebug/remote/client.rb#21 + def start(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/remote/client.rb#44 + def started?; end + + private + + # source://byebug//lib/byebug/remote/client.rb#50 + def connect_at(host, port); end +end + +# Server for remote debugging +# +# source://byebug//lib/byebug/remote/server.rb#10 +class Byebug::Remote::Server + # @return [Server] a new instance of Server + # + # source://byebug//lib/byebug/remote/server.rb#13 + def initialize(wait_connection:, &block); end + + # Returns the value of attribute actual_port. + # + # source://byebug//lib/byebug/remote/server.rb#11 + def actual_port; end + + # Start the remote debugging server + # + # source://byebug//lib/byebug/remote/server.rb#22 + def start(host, port); end + + # Returns the value of attribute wait_connection. + # + # source://byebug//lib/byebug/remote/server.rb#11 + def wait_connection; end +end + +# Interface class for remote use of byebug. +# +# source://byebug//lib/byebug/interfaces/remote_interface.rb#9 +class Byebug::RemoteInterface < ::Byebug::Interface + # @return [RemoteInterface] a new instance of RemoteInterface + # + # source://byebug//lib/byebug/interfaces/remote_interface.rb#10 + def initialize(socket); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#41 + def close; end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#23 + def confirm(prompt); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#29 + def print(message); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#35 + def puts(message); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#17 + def read_command(prompt); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#45 + def readline(prompt); end +end + +# Restart debugged program from within byebug. +# +# source://byebug//lib/byebug/commands/restart.rb#14 +class Byebug::RestartCommand < ::Byebug::Command + include ::Byebug::Helpers::BinHelper + include ::Byebug::Helpers::PathHelper + + # source://byebug//lib/byebug/commands/restart.rb#40 + def execute; end + + private + + # source://byebug//lib/byebug/commands/restart.rb#54 + def prepend_byebug_bin(cmd); end + + # source://byebug//lib/byebug/commands/restart.rb#59 + def prepend_ruby_bin(cmd); end + + class << self + # source://byebug//lib/byebug/commands/restart.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/restart.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/restart.rb#36 + def short_description; end + end +end + +# Save current settings to use them in another debug session. +# +# source://byebug//lib/byebug/commands/save.rb#9 +class Byebug::SaveCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/save.rb#36 + def execute; end + + private + + # source://byebug//lib/byebug/commands/save.rb#50 + def save_breakpoints(file); end + + # source://byebug//lib/byebug/commands/save.rb#56 + def save_catchpoints(file); end + + # source://byebug//lib/byebug/commands/save.rb#62 + def save_displays(file); end + + # source://byebug//lib/byebug/commands/save.rb#66 + def save_settings(file); end + + class << self + # source://byebug//lib/byebug/commands/save.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/save.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/save.rb#32 + def short_description; end + end +end + +# Setting to customize the file where byebug's history is saved. +# +# source://byebug//lib/byebug/settings/savefile.rb#9 +class Byebug::SavefileSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/savefile.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/savefile.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/savefile.rb#10 +Byebug::SavefileSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Interface class for command execution from script files. +# +# source://byebug//lib/byebug/interfaces/script_interface.rb#7 +class Byebug::ScriptInterface < ::Byebug::Interface + # @return [ScriptInterface] a new instance of ScriptInterface + # + # source://byebug//lib/byebug/interfaces/script_interface.rb#8 + def initialize(file, verbose = T.unsafe(nil)); end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#20 + def close; end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#16 + def read_command(prompt); end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#24 + def readline(*_arg0); end +end + +# Processes commands from a file +# +# source://byebug//lib/byebug/processors/script_processor.rb#9 +class Byebug::ScriptProcessor < ::Byebug::CommandProcessor + # source://byebug//lib/byebug/processors/script_processor.rb#28 + def after_repl; end + + # Available commands + # + # source://byebug//lib/byebug/processors/script_processor.rb#13 + def commands; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/script_processor.rb#37 + def prompt; end + + # source://byebug//lib/byebug/processors/script_processor.rb#17 + def repl; end + + private + + # source://byebug//lib/byebug/processors/script_processor.rb#43 + def without_exceptions; end +end + +# Change byebug settings. +# +# source://byebug//lib/byebug/commands/set.rb#10 +class Byebug::SetCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/set.rb#42 + def execute; end + + private + + # source://byebug//lib/byebug/commands/set.rb#66 + def get_onoff(arg, default); end + + class << self + # source://byebug//lib/byebug/commands/set.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/set.rb#38 + def help; end + + # source://byebug//lib/byebug/commands/set.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/set.rb#34 + def short_description; end + end +end + +# Parent class for all byebug settings. +# +# source://byebug//lib/byebug/setting.rb#9 +class Byebug::Setting + # @return [Setting] a new instance of Setting + # + # source://byebug//lib/byebug/setting.rb#14 + def initialize; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/setting.rb#18 + def boolean?; end + + # source://byebug//lib/byebug/setting.rb#28 + def help; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/setting.rb#22 + def integer?; end + + # source://byebug//lib/byebug/setting.rb#37 + def to_s; end + + # source://byebug//lib/byebug/setting.rb#32 + def to_sym; end + + # Returns the value of attribute value. + # + # source://byebug//lib/byebug/setting.rb#10 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://byebug//lib/byebug/setting.rb#10 + def value=(_arg0); end + + class << self + # source://byebug//lib/byebug/setting.rb#46 + def [](name); end + + # source://byebug//lib/byebug/setting.rb#50 + def []=(name, value); end + + # source://byebug//lib/byebug/setting.rb#54 + def find(shortcut); end + + # @todo DRY this up. Very similar code exists in the CommandList class + # + # source://byebug//lib/byebug/setting.rb#65 + def help_all; end + + # source://byebug//lib/byebug/setting.rb#42 + def settings; end + end +end + +# source://byebug//lib/byebug/setting.rb#12 +Byebug::Setting::DEFAULT = T.let(T.unsafe(nil), FalseClass) + +# Show byebug settings. +# +# source://byebug//lib/byebug/commands/show.rb#9 +class Byebug::ShowCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/show.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/show.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/show.rb#31 + def help; end + + # source://byebug//lib/byebug/commands/show.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/show.rb#27 + def short_description; end + end +end + +# Allows the user to continue execution until the next breakpoint, as +# long as it is different from the current one +# +# source://byebug//lib/byebug/commands/skip.rb#11 +class Byebug::SkipCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/skip.rb#70 + def auto_run; end + + # source://byebug//lib/byebug/commands/skip.rb#77 + def execute; end + + # source://byebug//lib/byebug/commands/skip.rb#53 + def initialize_attributes; end + + # source://byebug//lib/byebug/commands/skip.rb#60 + def keep_execution; end + + # source://byebug//lib/byebug/commands/skip.rb#64 + def reset_attributes; end + + class << self + # source://byebug//lib/byebug/commands/skip.rb#41 + def description; end + + # source://byebug//lib/byebug/commands/skip.rb#18 + def file_line; end + + # Sets the attribute file_line + # + # @param value the value to set the attribute file_line to. + # + # source://byebug//lib/byebug/commands/skip.rb#15 + def file_line=(_arg0); end + + # source://byebug//lib/byebug/commands/skip.rb#22 + def file_path; end + + # Sets the attribute file_path + # + # @param value the value to set the attribute file_path to. + # + # source://byebug//lib/byebug/commands/skip.rb#15 + def file_path=(_arg0); end + + # Returns the value of attribute previous_autolist. + # + # source://byebug//lib/byebug/commands/skip.rb#16 + def previous_autolist; end + + # source://byebug//lib/byebug/commands/skip.rb#37 + def regexp; end + + # source://byebug//lib/byebug/commands/skip.rb#31 + def restore_autolist; end + + # source://byebug//lib/byebug/commands/skip.rb#26 + def setup_autolist(value); end + + # source://byebug//lib/byebug/commands/skip.rb#49 + def short_description; end + end +end + +# Execute a file containing byebug commands. +# +# It can be used to restore a previously saved debugging session. +# +# source://byebug//lib/byebug/commands/source.rb#11 +class Byebug::SourceCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/source.rb#31 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/source.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/source.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/source.rb#27 + def short_description; end + end +end + +# Formats specific line ranges in a source file +# +# source://byebug//lib/byebug/source_file_formatter.rb#10 +class Byebug::SourceFileFormatter + include ::Byebug::Helpers::FileHelper + + # @return [SourceFileFormatter] a new instance of SourceFileFormatter + # + # source://byebug//lib/byebug/source_file_formatter.rb#15 + def initialize(file, annotator); end + + # source://byebug//lib/byebug/source_file_formatter.rb#67 + def amend(line, ceiling); end + + # source://byebug//lib/byebug/source_file_formatter.rb#51 + def amend_final(line); end + + # source://byebug//lib/byebug/source_file_formatter.rb#47 + def amend_initial(line); end + + # Returns the value of attribute annotator. + # + # source://byebug//lib/byebug/source_file_formatter.rb#13 + def annotator; end + + # Returns the value of attribute file. + # + # source://byebug//lib/byebug/source_file_formatter.rb#13 + def file; end + + # source://byebug//lib/byebug/source_file_formatter.rb#20 + def lines(min, max); end + + # source://byebug//lib/byebug/source_file_formatter.rb#33 + def lines_around(center); end + + # source://byebug//lib/byebug/source_file_formatter.rb#55 + def max_initial_line; end + + # source://byebug//lib/byebug/source_file_formatter.rb#59 + def max_line; end + + # source://byebug//lib/byebug/source_file_formatter.rb#37 + def range_around(center); end + + # source://byebug//lib/byebug/source_file_formatter.rb#41 + def range_from(min); end + + # source://byebug//lib/byebug/source_file_formatter.rb#63 + def size; end +end + +# Setting to enable/disable the display of backtraces when evaluations raise +# errors. +# +# source://byebug//lib/byebug/settings/stack_on_error.rb#10 +class Byebug::StackOnErrorSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/stack_on_error.rb#11 + def banner; end +end + +# Implements the step functionality. +# +# Allows the user the continue execution until the next instruction, possibily +# in a different frame. Use step to step into method calls or blocks. +# +# source://byebug//lib/byebug/commands/step.rb#13 +class Byebug::StepCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/step.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/step.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/step.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/step.rb#28 + def short_description; end + end +end + +# Subcommand additions. +# +# source://byebug//lib/byebug/subcommands.rb#12 +module Byebug::Subcommands + extend ::Forwardable + + mixes_in_class_methods ::Byebug::Subcommands::ClassMethods + + # Delegates to subcommands or prints help if no subcommand specified. + # + # @raise [CommandNotFound] + # + # source://byebug//lib/byebug/subcommands.rb#23 + def execute; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def subcommand_list(*args, **_arg1, &block); end + + class << self + # @private + # + # source://byebug//lib/byebug/subcommands.rb#13 + def included(command); end + end +end + +# Class methods added to subcommands +# +# source://byebug//lib/byebug/subcommands.rb#36 +module Byebug::Subcommands::ClassMethods + include ::Byebug::Helpers::ReflectionHelper + + # Default help text for a command with subcommands + # + # source://byebug//lib/byebug/subcommands.rb#42 + def help; end + + # Command's subcommands. + # + # source://byebug//lib/byebug/subcommands.rb#49 + def subcommand_list; end +end + +# Manipulation of Ruby threads +# +# source://byebug//lib/byebug/commands/thread/current.rb#9 +class Byebug::ThreadCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/thread.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/thread.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/thread.rb#30 + def short_description; end + end +end + +# Information about the current thread +# +# source://byebug//lib/byebug/commands/thread/current.rb#13 +class Byebug::ThreadCommand::CurrentCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/current.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/current.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/current.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/current.rb#28 + def short_description; end + end +end + +# Information about threads +# +# source://byebug//lib/byebug/commands/thread/list.rb#13 +class Byebug::ThreadCommand::ListCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/list.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/list.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/list.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/list.rb#28 + def short_description; end + end +end + +# Resumes the specified thread +# +# source://byebug//lib/byebug/commands/thread/resume.rb#13 +class Byebug::ThreadCommand::ResumeCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/resume.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/resume.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/resume.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/resume.rb#28 + def short_description; end + end +end + +# Stops the specified thread +# +# source://byebug//lib/byebug/commands/thread/stop.rb#13 +class Byebug::ThreadCommand::StopCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/stop.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/stop.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/stop.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/stop.rb#28 + def short_description; end + end +end + +# Switches to the specified thread +# +# source://byebug//lib/byebug/commands/thread/switch.rb#13 +class Byebug::ThreadCommand::SwitchCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/switch.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/switch.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/switch.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/switch.rb#28 + def short_description; end + end +end + +class Byebug::ThreadsTable; end + +# Show (and possibily stop) at every line that changes a global variable. +# +# source://byebug//lib/byebug/commands/tracevar.rb#9 +class Byebug::TracevarCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/tracevar.rb#32 + def execute; end + + private + + # source://byebug//lib/byebug/commands/tracevar.rb#48 + def on_change(name, value, stop); end + + class << self + # source://byebug//lib/byebug/commands/tracevar.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/tracevar.rb#10 + def regexp; end + + # source://byebug//lib/byebug/commands/tracevar.rb#28 + def short_description; end + end +end + +# Remove expressions from display list. +# +# source://byebug//lib/byebug/commands/undisplay.rb#10 +class Byebug::UndisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/undisplay.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/undisplay.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/undisplay.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/undisplay.rb#31 + def short_description; end + end +end + +# Stop tracing a global variable. +# +# source://byebug//lib/byebug/commands/untracevar.rb#9 +class Byebug::UntracevarCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/untracevar.rb#26 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/untracevar.rb#14 + def description; end + + # source://byebug//lib/byebug/commands/untracevar.rb#10 + def regexp; end + + # source://byebug//lib/byebug/commands/untracevar.rb#22 + def short_description; end + end +end + +# Move the current frame up in the backtrace. +# +# source://byebug//lib/byebug/commands/up.rb#12 +class Byebug::UpCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/up.rb#36 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/up.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/up.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/up.rb#32 + def short_description; end + end +end + +# Shows variables and its values +# +# source://byebug//lib/byebug/commands/var/all.rb#9 +class Byebug::VarCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/var.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/var.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/var.rb#33 + def short_description; end + end +end + +# Shows global, instance and local variables +# +# source://byebug//lib/byebug/commands/var/all.rb#13 +class Byebug::VarCommand::AllCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/all.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/all.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/all.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/all.rb#30 + def short_description; end + end +end + +# Information about arguments of the current method/block +# +# source://byebug//lib/byebug/commands/var/args.rb#13 +class Byebug::VarCommand::ArgsCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/args.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/args.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/args.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/args.rb#30 + def short_description; end + end +end + +# Shows constants +# +# source://byebug//lib/byebug/commands/var/const.rb#13 +class Byebug::VarCommand::ConstCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/var/const.rb#34 + def execute; end + + private + + # source://byebug//lib/byebug/commands/var/const.rb#44 + def str_obj; end + + class << self + # source://byebug//lib/byebug/commands/var/const.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/const.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/const.rb#30 + def short_description; end + end +end + +# Shows global variables +# +# source://byebug//lib/byebug/commands/var/global.rb#11 +class Byebug::VarCommand::GlobalCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/global.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/global.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/var/global.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/var/global.rb#28 + def short_description; end + end +end + +# Shows instance variables +# +# source://byebug//lib/byebug/commands/var/instance.rb#13 +class Byebug::VarCommand::InstanceCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/instance.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/instance.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/instance.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/instance.rb#30 + def short_description; end + end +end + +# Shows local variables in current scope +# +# source://byebug//lib/byebug/commands/var/local.rb#13 +class Byebug::VarCommand::LocalCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/local.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/local.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/local.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/local.rb#30 + def short_description; end + end +end + +# Show current backtrace. +# +# source://byebug//lib/byebug/commands/where.rb#11 +class Byebug::WhereCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + + # source://byebug//lib/byebug/commands/where.rb#39 + def execute; end + + private + + # source://byebug//lib/byebug/commands/where.rb#45 + def print_backtrace; end + + class << self + # source://byebug//lib/byebug/commands/where.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/where.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/where.rb#35 + def short_description; end + end +end + +# Setting to customize the maximum width of byebug's output. +# +# source://byebug//lib/byebug/settings/width.rb#9 +class Byebug::WidthSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/width.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/width.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/width.rb#10 +Byebug::WidthSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Extends the extension class to be able to pass information about the +# debugging environment from the c-extension to the user. +# +# source://byebug//lib/byebug/core.rb#113 +class Exception + # Returns the value of attribute __bb_context. + # + # source://byebug//lib/byebug/core.rb#114 + def __bb_context; end +end + +# Adds a `byebug` method to the Kernel module. +# +# Dropping a `byebug` call anywhere in your code, you get a debug prompt. +# +# source://byebug//lib/byebug/attacher.rb#34 +module Kernel + # source://byebug//lib/byebug/attacher.rb#35 + def byebug; end + + # source://byebug//lib/byebug/attacher.rb#35 + def debugger; end + + # source://byebug//lib/byebug/attacher.rb#41 + def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/coderay@1.1.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/coderay@1.1.3.rbi new file mode 100644 index 0000000..f095724 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/coderay@1.1.3.rbi @@ -0,0 +1,3427 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `coderay` gem. +# Please instead update this file by running `bin/tapioca gem coderay`. + + +# = CodeRay Library +# +# CodeRay is a Ruby library for syntax highlighting. +# +# I try to make CodeRay easy to use and intuitive, but at the same time fully +# featured, complete, fast and efficient. +# +# See README. +# +# It consists mainly of +# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder) +# * the plugin system: PluginHost, Plugin +# * the scanners in CodeRay::Scanners +# * the encoders in CodeRay::Encoders +# * the styles in CodeRay::Styles +# +# Here's a fancy graphic to light up this gray docu: +# +# http://cycnus.de/raindark/coderay/scheme.png +# +# == Documentation +# +# See CodeRay, Encoders, Scanners, Tokens. +# +# == Usage +# +# Remember you need RubyGems to use CodeRay, unless you have it in your load +# path. Run Ruby with -rubygems option if required. +# +# === Highlight Ruby code in a string as html +# +# require 'coderay' +# print CodeRay.scan('puts "Hello, world!"', :ruby).html +# +# # prints something like this: +# puts "Hello, world!" +# +# +# === Highlight C code from a file in a html div +# +# require 'coderay' +# print CodeRay.scan(File.read('ruby.h'), :c).div +# print CodeRay.scan_file('ruby.h').html.div +# +# You can include this div in your page. The used CSS styles can be printed with +# +# % coderay_stylesheet +# +# === Highlight without typing too much +# +# If you are one of the hasty (or lazy, or extremely curious) people, just run this file: +# +# % ruby -rubygems /path/to/coderay/coderay.rb > example.html +# +# and look at the file it created in your browser. +# +# = CodeRay Module +# +# The CodeRay module provides convenience methods for the engine. +# +# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are +# simply lower-case symbols, like :python or :html. +# * All methods take an optional hash as last parameter, +options+, that is send to +# the Encoder / Scanner. +# * Input and language are always sorted in this order: +code+, +lang+. +# (This is in alphabetical order, if you need a mnemonic ;) +# +# You should be able to highlight everything you want just using these methods; +# so there is no need to dive into CodeRay's deep class hierarchy. +# +# The examples in the demo directory demonstrate common cases using this interface. +# +# = Basic Access Ways +# +# Read this to get a general view what CodeRay provides. +# +# == Scanning +# +# Scanning means analysing an input string, splitting it up into Tokens. +# Each Token knows about what type it is: string, comment, class name, etc. +# +# Each +lang+ (language) has its own Scanner; for example, :ruby code is +# handled by CodeRay::Scanners::Ruby. +# +# CodeRay.scan:: Scan a string in a given language into Tokens. +# This is the most common method to use. +# CodeRay.scan_file:: Scan a file and guess the language using FileType. +# +# The Tokens object you get from these methods can encode itself; see Tokens. +# +# == Encoding +# +# Encoding means compiling Tokens into an output. This can be colored HTML or +# LaTeX, a textual statistic or just the number of non-whitespace tokens. +# +# Each Encoder provides output in a specific +format+, so you select Encoders via +# formats like :html or :statistic. +# +# CodeRay.encode:: Scan and encode a string in a given language. +# CodeRay.encode_tokens:: Encode the given tokens. +# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. +# +# == All-in-One Encoding +# +# CodeRay.encode:: Highlight a string with a given input and output format. +# +# == Instanciating +# +# You can use an Encoder instance to highlight multiple inputs. This way, the setup +# for this Encoder must only be done once. +# +# CodeRay.encoder:: Create an Encoder instance with format and options. +# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code. +# +# To make use of CodeRay.scanner, use CodeRay::Scanner::code=. +# +# The scanning methods provide more flexibility; we recommend to use these. +# +# == Reusing Scanners and Encoders +# +# If you want to re-use scanners and encoders (because that is faster), see +# CodeRay::Duo for the most convenient (and recommended) interface. +# +# source://coderay//lib/coderay.rb#126 +module CodeRay + class << self + # Assuming the path is a subpath of lib/coderay/ + # + # source://coderay//lib/coderay.rb#133 + def coderay_path(*path); end + + # Encode a string. + # + # This scans +code+ with the the Scanner for +lang+ and then + # encodes it with the Encoder for +format+. + # +options+ will be passed to the Encoder. + # + # See CodeRay::Encoder.encode. + # + # source://coderay//lib/coderay.rb#196 + def encode(code, lang, format, options = T.unsafe(nil)); end + + # Encodes +filename+ (a path to a code file) with the Scanner for +lang+. + # + # See CodeRay.scan_file. + # Notice that the second argument is the output +format+, not the input language. + # + # Example: + # require 'coderay' + # page = CodeRay.encode_file 'some_c_code.c', :html + # + # source://coderay//lib/coderay.rb#221 + def encode_file(filename, format, options = T.unsafe(nil)); end + + # Encode pre-scanned Tokens. + # Use this together with CodeRay.scan: + # + # require 'coderay' + # + # # Highlight a short Ruby code example in a HTML span + # tokens = CodeRay.scan '1 + 2', :ruby + # puts CodeRay.encode_tokens(tokens, :span) + # + # source://coderay//lib/coderay.rb#209 + def encode_tokens(tokens, format, options = T.unsafe(nil)); end + + # Finds the Encoder class for +format+ and creates an instance, passing + # +options+ to it. + # + # Example: + # require 'coderay' + # + # stats = CodeRay.encoder(:statistic) + # stats.encode("puts 17 + 4\n", :ruby) + # + # puts '%d out of %d tokens have the kind :integer.' % [ + # stats.type_stats[:integer].count, + # stats.real_token_count + # ] + # #-> 2 out of 4 tokens have the kind :integer. + # + # source://coderay//lib/coderay.rb#260 + def encoder(format, options = T.unsafe(nil)); end + + # Extract the options for the scanner from the +options+ hash. + # + # Returns an empty Hash if :scanner_options is not set. + # + # This is used if a method like CodeRay.encode has to provide options + # for Encoder _and_ scanner. + # + # source://coderay//lib/coderay.rb#278 + def get_scanner_options(options); end + + # Highlight a string into a HTML
    . + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#232 + def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Highlight a file into a HTML
    . + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#242 + def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Scans the given +code+ (a String) with the Scanner for +lang+. + # + # This is a simple way to use CodeRay. Example: + # require 'coderay' + # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html + # + # See also demo/demo_simple. + # + # source://coderay//lib/coderay.rb#168 + def scan(code, lang, options = T.unsafe(nil), &block); end + + # Scans +filename+ (a path to a code file) with the Scanner for +lang+. + # + # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to + # determine it. If it cannot find out what type it is, it uses + # CodeRay::Scanners::Text. + # + # Calls CodeRay.scan. + # + # Example: + # require 'coderay' + # page = CodeRay.scan_file('some_c_code.c').html + # + # source://coderay//lib/coderay.rb#183 + def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds the Scanner class for +lang+ and creates an instance, passing + # +options+ to it. + # + # See Scanner.new. + # + # source://coderay//lib/coderay.rb#268 + def scanner(lang, options = T.unsafe(nil), &block); end + end +end + +# source://coderay//lib/coderay.rb#130 +CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) + +# = Duo +# +# A Duo is a convenient way to use CodeRay. You just create a Duo, +# giving it a lang (language of the input code) and a format (desired +# output format), and call Duo#highlight with the code. +# +# Duo makes it easy to re-use both scanner and encoder for a repetitive +# task. It also provides a very easy interface syntax: +# +# require 'coderay' +# CodeRay::Duo[:python, :div].highlight 'import this' +# +# Until you want to do uncommon things with CodeRay, I recommend to use +# this method, since it takes care of everything. +# +# source://coderay//lib/coderay/duo.rb#17 +class CodeRay::Duo + # Create a new Duo, holding a lang and a format to highlight code. + # + # simple: + # CodeRay::Duo[:ruby, :html].highlight 'bla 42' + # + # with options: + # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' + # + # alternative syntax without options: + # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' + # + # alternative syntax with options: + # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' + # + # The options are forwarded to scanner and encoder + # (see CodeRay.get_scanner_options). + # + # @return [Duo] a new instance of Duo + # + # source://coderay//lib/coderay/duo.rb#37 + def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # Allows to use Duo like a proc object: + # + # CodeRay::Duo[:python => :yaml].call(code) + # + # or, in Ruby 1.9 and later: + # + # CodeRay::Duo[:python => :yaml].(code) + # + # source://coderay//lib/coderay/duo.rb#64 + def call(code, options = T.unsafe(nil)); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#64 + def encode(code, options = T.unsafe(nil)); end + + # The encoder of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#59 + def encoder; end + + # Returns the value of attribute format. + # + # source://coderay//lib/coderay/duo.rb#19 + def format; end + + # Sets the attribute format + # + # @param value the value to set the attribute format to. + # + # source://coderay//lib/coderay/duo.rb#19 + def format=(_arg0); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#64 + def highlight(code, options = T.unsafe(nil)); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/duo.rb#19 + def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/duo.rb#19 + def lang=(_arg0); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/duo.rb#19 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/duo.rb#19 + def options=(_arg0); end + + # The scanner of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#54 + def scanner; end + + class << self + # To allow calls like Duo[:ruby, :html].highlight. + def [](*_arg0); end + end +end + +# This module holds the Encoder class and its subclasses. +# For example, the HTML encoder is named CodeRay::Encoders::HTML +# can be found in coderay/encoders/html. +# +# Encoders also provides methods and constants for the register +# mechanism and the [] method that returns the Encoder class +# belonging to the given format. +# +# source://coderay//lib/coderay/encoders.rb#10 +module CodeRay::Encoders + extend ::CodeRay::PluginHost +end + +# A simple Filter that removes all tokens of the :comment kind. +# +# Alias: +remove_comments+ +# +# Usage: +# CodeRay.scan('print # foo', :ruby).comment_filter.text +# #-> "print " +# +# See also: TokenKindFilter, LinesOfCode +# +# source://coderay//lib/coderay/encoders/comment_filter.rb#15 +class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end + +# source://coderay//lib/coderay/encoders/comment_filter.rb#19 +CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Returns the number of tokens. +# +# Text and block tokens are counted. +# +# source://coderay//lib/coderay/encoders/count.rb#7 +class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/count.rb#29 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#25 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/count.rb#19 + def finish(options); end + + # source://coderay//lib/coderay/encoders/count.rb#13 + def setup(options); end +end + +# = Debug Encoder +# +# Fast encoder producing simple debug output. +# +# It is readable and diff-able and is used for testing. +# +# You cannot fully restore the tokens information from the +# output, because consecutive :space tokens are merged. +# +# See also: Scanners::Debug +# +# source://coderay//lib/coderay/encoders/debug.rb#14 +class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/debug.rb#30 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#38 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#34 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#42 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#20 + def text_token(text, kind); end +end + +# source://coderay//lib/coderay/encoders/debug.rb#18 +CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = Debug Lint Encoder +# +# Debug encoder with additional checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::Debug +# +# source://coderay//lib/coderay/encoders/debug_lint.rb#16 +class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/debug_lint.rb#26 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#37 + def begin_line(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#31 + def end_group(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#42 + def end_line(kind); end + + # @raise [Lint::EmptyToken] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#20 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/debug_lint.rb#55 + def finish(options); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#50 + def setup(options); end +end + +# Wraps HTML output into a DIV element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/div.rb#9 +class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/div.rb#15 +CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/div.rb#11 +CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = Encoder +# +# The Encoder base class. Together with Scanner and +# Tokens, it forms the highlighting triad. +# +# Encoder instances take a Tokens object and do something with it. +# +# The most common Encoder is surely the HTML encoder +# (CodeRay::Encoders::HTML). It highlights the code in a colorful +# html page. +# If you want the highlighted code in a div or a span instead, +# use its subclasses Div and Span. +# +# source://coderay//lib/coderay/encoders/encoder.rb#16 +class CodeRay::Encoders::Encoder + extend ::CodeRay::Plugin + + # Creates a new Encoder. + # +options+ is saved and used for all encode operations, as long + # as you don't overwrite it there by passing additional options. + # + # Encoder objects provide three encode methods: + # - encode simply takes a +code+ string and a +lang+ + # - encode_tokens expects a +tokens+ object instead + # + # Each method has an optional +options+ parameter. These are + # added to the options you passed at creation. + # + # @return [Encoder] a new instance of Encoder + # + # source://coderay//lib/coderay/encoders/encoder.rb#55 + def initialize(options = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/encoder.rb#87 + def <<(token); end + + # Starts a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#123 + def begin_group(kind); end + + # Starts a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#131 + def begin_line(kind); end + + # Encode the given +code+ using the Scanner for +lang+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#70 + def encode(code, lang, options = T.unsafe(nil)); end + + # Encode a Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#61 + def encode_tokens(tokens, options = T.unsafe(nil)); end + + # Ends a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#127 + def end_group(kind); end + + # Ends a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#135 + def end_line(kind); end + + # The default file extension for this encoder. + # + # source://coderay//lib/coderay/encoders/encoder.rb#83 + def file_extension; end + + # Encode the given +code+ using the Scanner for +lang+. + # You can use highlight instead of encode, if that seems + # more clear to you. + # + # source://coderay//lib/coderay/encoders/encoder.rb#70 + def highlight(code, lang, options = T.unsafe(nil)); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def options; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def options=(_arg0); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def scanner; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def scanner=(_arg0); end + + # Called for each text token ([text, kind]), where text is a String. + # + # source://coderay//lib/coderay/encoders/encoder.rb#118 + def text_token(text, kind); end + + # Called with +content+ and +kind+ of the currently scanned token. + # For simple scanners, it's enougth to implement this method. + # + # By default, it calls text_token, begin_group, end_group, begin_line, + # or end_line, depending on the +content+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#100 + def token(content, kind); end + + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#168 + def tokens(tokens, options = T.unsafe(nil)); end + + protected + + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#168 + def compile(tokens, options = T.unsafe(nil)); end + + # Called with merged options after encoding starts. + # The return value is the result of encoding, typically @out. + # + # source://coderay//lib/coderay/encoders/encoder.rb#160 + def finish(options); end + + # source://coderay//lib/coderay/encoders/encoder.rb#148 + def get_output(options); end + + # Append data.to_s to the output. Returns the argument. + # + # source://coderay//lib/coderay/encoders/encoder.rb#153 + def output(data); end + + # Called with merged options before encoding starts. + # Sets @out to an empty string. + # + # See the HTML Encoder for an example of option caching. + # + # source://coderay//lib/coderay/encoders/encoder.rb#144 + def setup(options); end + + class << self + # If FILE_EXTENSION isn't defined, this method returns the + # downcase class name instead. + # + # source://coderay//lib/coderay/encoders/encoder.rb#24 + def const_missing(sym); end + + # The default file extension for output file of this encoder class. + # + # source://coderay//lib/coderay/encoders/encoder.rb#33 + def file_extension; end + end +end + +# Subclasses are to store their default options in this constant. +# +# source://coderay//lib/coderay/encoders/encoder.rb#40 +CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders + +# A Filter encoder has another Tokens instance as output. +# It can be subclass to select, remove, or modify tokens in the stream. +# +# Subclasses of Filter are called "Filters" and can be chained. +# +# == Options +# +# === :tokens +# +# The Tokens object which will receive the output. +# +# Default: Tokens.new +# +# See also: TokenKindFilter +# +# source://coderay//lib/coderay/encoders/filter.rb#18 +class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/filter.rb#39 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#43 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#47 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#51 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#35 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/filter.rb#29 + def finish(options); end + + # source://coderay//lib/coderay/encoders/filter.rb#23 + def setup(options); end +end + +# = HTML Encoder +# +# This is CodeRay's most important highlighter: +# It provides save, fast XHTML generation and CSS support. +# +# == Usage +# +# require 'coderay' +# puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page +# puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) +# #-> Some /code/ +# puts CodeRay.scan('Some /code/', :ruby).span #-> the same +# +# puts CodeRay.scan('Some code', :ruby).html( +# :wrap => nil, +# :line_numbers => :inline, +# :css => :style +# ) +# +# == Options +# +# === :tab_width +# Convert \t characters to +n+ spaces (a number or false.) +# false will keep tab characters untouched. +# +# Default: 8 +# +# === :css +# How to include the styles; can be :class or :style. +# +# Default: :class +# +# === :wrap +# Wrap in :page, :div, :span or nil. +# +# You can also use Encoders::Div and Encoders::Span. +# +# Default: nil +# +# === :title +# +# The title of the HTML page (works only when :wrap is set to :page.) +# +# Default: 'CodeRay output' +# +# === :break_lines +# +# Split multiline blocks at line breaks. +# Forced to true if :line_numbers option is set to :inline. +# +# Default: false +# +# === :line_numbers +# Include line numbers in :table, :inline, or nil (no line numbers) +# +# Default: nil +# +# === :line_number_anchors +# Adds anchors and links to the line numbers. Can be false (off), true (on), +# or a prefix string that will be prepended to the anchor name. +# +# The prefix must consist only of letters, digits, and underscores. +# +# Default: true, default prefix name: "line" +# +# === :line_number_start +# Where to start with line number counting. +# +# Default: 1 +# +# === :bold_every +# Make every +n+-th number appear bold. +# +# Default: 10 +# +# === :highlight_lines +# +# Highlights certain line numbers. +# Can be any Enumerable, typically just an Array or Range, of numbers. +# +# Bolding is deactivated when :highlight_lines is set. It only makes sense +# in combination with :line_numbers. +# +# Default: nil +# +# === :hint +# Include some information into the output using the title attribute. +# Can be :info (show token kind on mouse-over), :info_long (with full path) +# or :debug (via inspect). +# +# Default: false +# +# source://coderay//lib/coderay/encoders/html.rb#97 +class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder + # token groups, eg. strings + # + # source://coderay//lib/coderay/encoders/html.rb#235 + def begin_group(kind); end + + # whole lines to be highlighted, eg. a deleted line in a diff + # + # source://coderay//lib/coderay/encoders/html.rb#247 + def begin_line(kind); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html.rb#126 + def css; end + + # source://coderay//lib/coderay/encoders/html.rb#241 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#261 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#221 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/html.rb#316 + def break_lines(text, style); end + + # source://coderay//lib/coderay/encoders/html.rb#310 + def check_group_nesting(name, kind); end + + # source://coderay//lib/coderay/encoders/html.rb#268 + def check_options!(options); end + + # source://coderay//lib/coderay/encoders/html.rb#324 + def close_span; end + + # source://coderay//lib/coderay/encoders/html.rb#280 + def css_class_for_kinds(kinds); end + + # source://coderay//lib/coderay/encoders/html.rb#195 + def finish(options); end + + # source://coderay//lib/coderay/encoders/html.rb#289 + def make_span_for_kinds(method, hint); end + + # source://coderay//lib/coderay/encoders/html.rb#172 + def setup(options); end + + # source://coderay//lib/coderay/encoders/html.rb#284 + def style_for_kinds(kinds); end + + class << self + # source://coderay//lib/coderay/encoders/html.rb#130 + def make_html_escape_hash; end + + # Generate a hint about the given +kinds+ in a +hint+ style. + # + # +hint+ may be :info, :info_long or :debug. + # + # source://coderay//lib/coderay/encoders/html.rb#157 + def token_path_to_hint(hint, kinds); end + end +end + +# source://coderay//lib/coderay/encoders/html/css.rb#5 +class CodeRay::Encoders::HTML::CSS + # @return [CSS] a new instance of CSS + # + # source://coderay//lib/coderay/encoders/html/css.rb#13 + def initialize(style = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/css.rb#23 + def get_style_for_css_classes(css_classes); end + + # Returns the value of attribute stylesheet. + # + # source://coderay//lib/coderay/encoders/html/css.rb#7 + def stylesheet; end + + private + + # source://coderay//lib/coderay/encoders/html/css.rb#49 + def parse(stylesheet); end + + class << self + # source://coderay//lib/coderay/encoders/html/css.rb#9 + def load_stylesheet(style = T.unsafe(nil)); end + end +end + +# source://coderay//lib/coderay/encoders/html/css.rb#36 +CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/encoders/html.rb#103 +CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#101 +CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/html.rb#143 +CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#144 +CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/encoders/html/numbering.rb#6 +module CodeRay::Encoders::HTML::Numbering + class << self + # source://coderay//lib/coderay/encoders/html/numbering.rb#8 + def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# This module is included in the output String of the HTML Encoder. +# +# It provides methods like wrap, div, page etc. +# +# Remember to use #clone instead of #dup to keep the modules the object was +# extended with. +# +# TODO: Rewrite this without monkey patching. +# +# source://coderay//lib/coderay/encoders/html/output.rb#14 +module CodeRay::Encoders::HTML::Output + # source://coderay//lib/coderay/encoders/html/output.rb#57 + def apply_title!(title); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 + def css; end + + # Sets the attribute css + # + # @param value the value to set the attribute css to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 + def css=(_arg0); end + + # source://coderay//lib/coderay/encoders/html/output.rb#86 + def stylesheet(in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#62 + def wrap!(element, *args); end + + # source://coderay//lib/coderay/encoders/html/output.rb#52 + def wrap_in!(template); end + + # source://coderay//lib/coderay/encoders/html/output.rb#47 + def wrapped_in; end + + # Sets the attribute wrapped_in + # + # @param value the value to set the attribute wrapped_in to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#50 + def wrapped_in=(_arg0); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/html/output.rb#43 + def wrapped_in?(element); end + + class << self + # Raises an exception if an object that doesn't respond to to_str is extended by Output, + # to prevent users from misuse. Use Module#remove_method to disable. + # + # source://coderay//lib/coderay/encoders/html/output.rb#22 + def extended(o); end + + # source://coderay//lib/coderay/encoders/html/output.rb#26 + def make_stylesheet(css, in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#36 + def page_template_for_css(css); end + end +end + +# source://coderay//lib/coderay/encoders/html/output.rb#117 +CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#130 +CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#115 +CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#123 +CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# -- don't include the templates in docu +# +# source://coderay//lib/coderay/encoders/html/output.rb#92 +class CodeRay::Encoders::HTML::Output::Template < ::String + # source://coderay//lib/coderay/encoders/html/output.rb#104 + def apply(target, replacement); end + + class << self + # source://coderay//lib/coderay/encoders/html/output.rb#94 + def wrap!(str, template, target); end + end +end + +# source://coderay//lib/coderay/encoders/html.rb#146 +CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#150 +CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) + +# A simple JSON Encoder. +# +# Example: +# CodeRay.scan('puts "Hello world!"', :ruby).json +# yields +# [ +# {"type"=>"text", "text"=>"puts", "kind"=>"ident"}, +# {"type"=>"text", "text"=>" ", "kind"=>"space"}, +# {"type"=>"block", "action"=>"open", "kind"=>"string"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"block", "action"=>"close", "kind"=>"string"}, +# ] +# +# source://coderay//lib/coderay/encoders/json.rb#18 +class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/json.rb#64 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#72 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#68 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#76 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#60 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/json.rb#49 + def append(data); end + + # source://coderay//lib/coderay/encoders/json.rb#45 + def finish(options); end + + # source://coderay//lib/coderay/encoders/json.rb#38 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/json.rb#35 +CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Counts the LoC (Lines of Code). Returns an Integer >= 0. +# +# Alias: +loc+ +# +# Everything that is not comment, markup, doctype/shebang, or an empty line, +# is considered to be code. +# +# For example, +# * HTML files not containing JavaScript have 0 LoC +# * in a Java class without comments, LoC is the number of non-empty lines +# +# A Scanner class should define the token kinds that are not code in the +# KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. +# +# source://coderay//lib/coderay/encoders/lines_of_code.rb#17 +class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter + protected + + # source://coderay//lib/coderay/encoders/lines_of_code.rb#38 + def finish(options); end + + # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 +CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) + +# = Lint Encoder +# +# Checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::DebugLint +# +# source://coderay//lib/coderay/encoders/lint.rb#14 +class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/lint.rb#28 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/lint.rb#37 + def begin_line(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#32 + def end_group(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#41 + def end_line(kind); end + + # @raise [EmptyToken] + # + # source://coderay//lib/coderay/encoders/lint.rb#23 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/lint.rb#52 + def finish(options); end + + # source://coderay//lib/coderay/encoders/lint.rb#48 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/lint.rb#19 +class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#21 +class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#18 +class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end + +# source://coderay//lib/coderay/encoders/lint.rb#20 +class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# = Null Encoder +# +# Does nothing and returns an empty string. +# +# source://coderay//lib/coderay/encoders/null.rb#7 +class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/null.rb#11 + def text_token(text, kind); end +end + +# Wraps the output into a HTML page, using CSS classes and +# line numbers in the table format by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/page.rb#10 +class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/page.rb#16 +CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/page.rb#12 +CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Wraps HTML output into a SPAN element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/span.rb#9 +class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/span.rb#15 +CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/span.rb#11 +CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Makes a statistic for the given tokens. +# +# Alias: +stats+ +# +# source://coderay//lib/coderay/encoders/statistic.rb#7 +class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/statistic.rb#70 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#78 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#86 + def block_token(action, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#74 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#82 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 + def real_token_count; end + + # source://coderay//lib/coderay/encoders/statistic.rb#62 + def text_token(text, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 + def type_stats; end + + protected + + # source://coderay//lib/coderay/encoders/statistic.rb#42 + def finish(options); end + + # source://coderay//lib/coderay/encoders/statistic.rb#17 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/statistic.rb#24 +CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/statistic.rb#38 +CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/statistic.rb#13 +class CodeRay::Encoders::Statistic::TypeStats < ::Struct + # Returns the value of attribute count + # + # @return [Object] the current value of count + def count; end + + # Sets the attribute count + # + # @param value [Object] the value to set the attribute count to. + # @return [Object] the newly set value + def count=(_); end + + # Returns the value of attribute size + # + # @return [Object] the current value of size + def size; end + + # Sets the attribute size + # + # @param value [Object] the value to set the attribute size to. + # @return [Object] the newly set value + def size=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://coderay//lib/coderay/encoders/terminal.rb#17 +class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/terminal.rb#156 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#156 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#162 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#172 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#141 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/terminal.rb#133 + def setup(options); end + + private + + # source://coderay//lib/coderay/encoders/terminal.rb#179 + def open_token(kind); end +end + +# source://coderay//lib/coderay/encoders/terminal.rb#21 +CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) + +# Concats the tokens into a single string, resulting in the original +# code string if no tokens were removed. +# +# Alias: +plain+, +plaintext+ +# +# == Options +# +# === :separator +# A separator string to join the tokens. +# +# Default: empty String +# +# source://coderay//lib/coderay/encoders/text.rb#15 +class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/text.rb#25 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/text.rb#36 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/text.rb#21 +CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/text.rb#19 +CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# A Filter that selects tokens based on their token kind. +# +# == Options +# +# === :exclude +# +# One or many symbols (in an Array) which shall be excluded. +# +# Default: [] +# +# === :include +# +# One or many symbols (in an array) which shall be included. +# +# Default: :all, which means all tokens are included. +# +# Exclusion wins over inclusion. +# +# See also: CommentFilter +# +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 +class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter + # Add the token group to the output stream if +kind+ matches the + # conditions. + # + # If it does not, all tokens inside the group are excluded from the + # stream, even if their kinds match. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66 + def begin_group(kind); end + + # See +begin_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77 + def begin_line(kind); end + + # Take care of re-enabling the delegation of tokens to the output stream + # if an exluded group has ended. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89 + def end_group(kind); end + + # See +end_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99 + def end_line(kind); end + + # Add the token to the output stream if +kind+ matches the conditions. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57 + def text_token(text, kind); end + + protected + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49 + def include_group?(kind); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45 + def include_text_token?(text, kind); end + + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 +CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# = XML Encoder +# +# Uses REXML. Very slow. +# +# source://coderay//lib/coderay/encoders/xml.rb#7 +class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/xml.rb#58 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#62 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#38 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/xml.rb#31 + def finish(options); end + + # source://coderay//lib/coderay/encoders/xml.rb#22 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/xml.rb#15 +CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/xml.rb#11 +CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = YAML Encoder +# +# Slow. +# +# source://coderay//lib/coderay/encoders/yaml.rb#9 +class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/yaml.rb#31 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#39 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#35 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#43 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#27 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/yaml.rb#22 + def finish(options); end + + # source://coderay//lib/coderay/encoders/yaml.rb#16 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/yaml.rb#13 +CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = FileType +# +# A simple filetype recognizer. +# +# == Usage +# +# # determine the type of the given +# lang = FileType[file_name] +# +# # return :text if the file type is unknown +# lang = FileType.fetch file_name, :text +# +# # try the shebang line, too +# lang = FileType.fetch file_name, :text, true +# +# source://coderay//lib/coderay/helpers/file_type.rb#17 +module CodeRay::FileType + class << self + # Try to determine the file type of the file. + # + # +filename+ is a relative or absolute path to a file. + # + # The file itself is only accessed when +read_shebang+ is set to true. + # That means you can get filetypes from files that don't exist. + # + # source://coderay//lib/coderay/helpers/file_type.rb#29 + def [](filename, read_shebang = T.unsafe(nil)); end + + # This works like Hash#fetch. + # + # If the filetype cannot be found, the +default+ value + # is returned. + # + # source://coderay//lib/coderay/helpers/file_type.rb#50 + def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end + + protected + + # source://coderay//lib/coderay/helpers/file_type.rb#66 + def type_from_shebang(filename); end + end +end + +# source://coderay//lib/coderay/helpers/file_type.rb#79 +CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#139 +CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#137 +CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/helpers/file_type.rb#19 +class CodeRay::FileType::UnknownFileType < ::Exception; end + +# = Plugin +# +# Plugins have to include this module. +# +# IMPORTANT: Use extend for this module. +# +# See CodeRay::PluginHost for examples. +# +# source://coderay//lib/coderay/helpers/plugin.rb#10 +module CodeRay::Plugin + # source://coderay//lib/coderay/helpers/plugin.rb#46 + def aliases; end + + # The PluginHost for this Plugin class. + # + # source://coderay//lib/coderay/helpers/plugin.rb#39 + def plugin_host(host = T.unsafe(nil)); end + + # Returns the value of attribute plugin_id. + # + # source://coderay//lib/coderay/helpers/plugin.rb#12 + def plugin_id; end + + # Register this class for the given +id+. + # + # Example: + # class MyPlugin < PluginHost::BaseClass + # register_for :my_id + # ... + # end + # + # See PluginHost.register. + # + # source://coderay//lib/coderay/helpers/plugin.rb#23 + def register_for(id); end + + # Returns the title of the plugin, or sets it to the + # optional argument +title+. + # + # source://coderay//lib/coderay/helpers/plugin.rb#30 + def title(title = T.unsafe(nil)); end +end + +# = PluginHost +# +# A simple subclass/subfolder plugin system. +# +# Example: +# class Generators +# extend PluginHost +# plugin_path 'app/generators' +# end +# +# class Generator +# extend Plugin +# PLUGIN_HOST = Generators +# end +# +# class FancyGenerator < Generator +# register_for :fancy +# end +# +# Generators[:fancy] #-> FancyGenerator +# # or +# CodeRay.require_plugin 'Generators/fancy' +# # or +# Generators::Fancy +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#27 +module CodeRay::PluginHost + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#49 + def [](id, *args, &blk); end + + # Returns an array of all Plugins. + # + # Note: This loads all plugins using load_all. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#151 + def all_plugins; end + + # Tries to +load+ the missing plugin by translating +const+ to the + # underscore form (eg. LinesOfCode becomes lines_of_code). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#61 + def const_missing(const); end + + # Define the default plugin to use when no plugin is found + # for a given id, or return the default plugin. + # + # See also map. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue + # default :gray + # end + # + # MyColorHost.default # loads and returns the Gray plugin + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#114 + def default(id = T.unsafe(nil)); end + + # Returns an array of all .rb files in the plugin path. + # + # The extension .rb is not included. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#140 + def list; end + + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#49 + def load(id, *args, &blk); end + + # Loads all plugins using list and load. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#39 + def load_all; end + + # Loads the map file (see map). + # + # This is done automatically when plugin_path is called. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#159 + def load_plugin_map; end + + # Map a plugin_id to another. + # + # Usage: Put this in a file plugin_path/_map.rb. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue, + # :maroon => :brown, + # :luna => :moon + # end + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#95 + def map(hash); end + + # A Hash of plugion_id => Plugin pairs. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#133 + def plugin_hash; end + + # The path where the plugins can be found. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#79 + def plugin_path(*args); end + + # Every plugin must register itself for +id+ by calling register_for, + # which calls this method. + # + # See Plugin#register_for. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#128 + def register(plugin, id); end + + protected + + # Return a plugin hash that automatically loads plugins. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#172 + def make_plugin_hash; end + + # Returns the expected path to the plugin file for the given id. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#196 + def path_to(plugin_id); end + + # Converts +id+ to a valid plugin ID String, or returns +nil+. + # + # Raises +ArgumentError+ for all other objects, or if the + # given String includes non-alphanumeric characters (\W). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#204 + def validate_id(id); end + + class << self + # Adds the module/class to the PLUGIN_HOSTS list. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#72 + def extended(mod); end + end +end + +# source://coderay//lib/coderay/helpers/plugin_host.rb#33 +class CodeRay::PluginHost::HostNotFound < ::LoadError; end + +# source://coderay//lib/coderay/helpers/plugin_host.rb#35 +CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array) + +# dummy hash +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#36 +CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash) + +# Raised if Encoders::[] fails because: +# * a file could not be found +# * the requested Plugin is not registered +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#32 +class CodeRay::PluginHost::PluginNotFound < ::LoadError; end + +# = Scanners +# +# This module holds the Scanner class and its subclasses. +# For example, the Ruby scanner is named CodeRay::Scanners::Ruby +# can be found in coderay/scanners/ruby. +# +# Scanner also provides methods and constants for the register +# mechanism and the [] method that returns the Scanner class +# belonging to the given lang. +# +# See PluginHost. +# +# source://coderay//lib/coderay/scanners.rb#18 +module CodeRay::Scanners + extend ::CodeRay::PluginHost +end + +# Scanner for C. +# +# source://coderay//lib/coderay/scanners/c.rb#5 +class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/c.rb#44 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/c.rb#27 +CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#39 +CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/c.rb#33 +CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/c.rb#10 +CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#23 +CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#17 +CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#40 +CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for C++. +# +# Aliases: +cplusplus+, c++ +CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text + +# source://coderay//lib/coderay/scanners/css.rb#4 +class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/css.rb#55 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/css.rb#50 + def setup; end +end + +# source://coderay//lib/coderay/scanners/css.rb#8 +CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/css.rb#16 +module CodeRay::Scanners::CSS::RE; end + +# source://coderay//lib/coderay/scanners/css.rb#31 +CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#45 +CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#43 +CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#38 +CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#19 +CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#40 +CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#17 +CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#26 +CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#42 +CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#30 +CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#20 +CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#21 +CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#29 +CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#28 +CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#32 +CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#44 +CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#24 +CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#22 +CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#23 +CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp) + +# differs from standard because it allows uppercase hex too +# +# source://coderay//lib/coderay/scanners/css.rb#18 +CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#36 +CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#6 +class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/clojure.rb#145 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/clojure.rb#95 +CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#133 +CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#134 +CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#136 +CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#135 +CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#16 +CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#120 +CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#98 +CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#99 +CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#100 +CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#102 +CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#101 +CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#107 +CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#110 +CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#109 +CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#96 +CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#85 +CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#129 +CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#130 +CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#132 +CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#131 +CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#90 +CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#141 +CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#137 +CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#138 +CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#140 +CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#139 +CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#78 +CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#112 +CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#113 +CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#115 +CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#114 +CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#106 +CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#103 +CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#105 +CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#104 +CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#125 +CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#126 +CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#128 +CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#127 +CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#108 +CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#11 +CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#111 +CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#97 +CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#116 +CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#117 +CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#119 +CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#118 +CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#121 +CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#122 +CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#124 +CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#123 +CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp) + +# = Debug Scanner +# +# Interprets the output of the Encoders::Debug encoder (basically the inverse function). +# +# source://coderay//lib/coderay/scanners/debug.rb#9 +class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/debug.rb#21 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/debug.rb#16 + def setup; end +end + +# Scanner for the Delphi language (Object Pascal). +# +# Alias: +pascal+ +# +# source://coderay//lib/coderay/scanners/delphi.rb#7 +class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/delphi.rb#45 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/delphi.rb#25 +CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#36 +CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/delphi.rb#12 +CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#40 +CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# Scanner for output of the diff command. +# +# Alias: +patch+ +# +# source://coderay//lib/coderay/scanners/diff.rb#7 +class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/diff.rb#19 + def scan_tokens(encoder, options); end + + private + + # source://coderay//lib/coderay/scanners/diff.rb#204 + def diff(a, b); end +end + +# source://coderay//lib/coderay/scanners/diff.rb#12 +CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Scanner for HTML ERB templates. +# +# source://coderay//lib/coderay/scanners/erb.rb#8 +class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/erb.rb#38 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/erb.rb#43 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/erb.rb#33 + def setup; end +end + +# source://coderay//lib/coderay/scanners/erb.rb#15 +CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/erb.rb#13 +CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/erb.rb#27 +CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/go.rb#4 +class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/go.rb#50 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/go.rb#45 +CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/go.rb#39 +CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://golang.org/ref/spec#Keywords +# +# source://coderay//lib/coderay/scanners/go.rb#10 +CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#29 +CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#34 +CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# http://golang.org/ref/spec#Types +# +# source://coderay//lib/coderay/scanners/go.rb#19 +CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#46 +CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for Groovy. +# +# source://coderay//lib/coderay/scanners/groovy.rb#7 +class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java + protected + + # source://coderay//lib/coderay/scanners/groovy.rb#43 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/groovy.rb#39 + def setup; end +end + +# source://coderay//lib/coderay/scanners/groovy.rb#24 +CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: check list of keywords +# +# source://coderay//lib/coderay/scanners/groovy.rb#12 +CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#18 +CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#20 +CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#15 +CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#26 +CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: interpretation inside ', ", / +# +# source://coderay//lib/coderay/scanners/groovy.rb#29 +CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/groovy.rb#25 +CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/haml.rb#8 +class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/haml.rb#24 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/haml.rb#17 + def setup; end +end + +# source://coderay//lib/coderay/scanners/haml.rb#13 +CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# HTML Scanner +# +# Alias: +xhtml+ +# +# See also: Scanners::XML +# +# source://coderay//lib/coderay/scanners/html.rb#9 +class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/html.rb#62 + def reset; end + + protected + + # source://coderay//lib/coderay/scanners/html.rb#83 + def scan_css(encoder, code, state = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/html.rb#76 + def scan_java_script(encoder, code); end + + # source://coderay//lib/coderay/scanners/html.rb#90 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/html.rb#70 + def setup; end +end + +# source://coderay//lib/coderay/scanners/html.rb#39 +CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#42 +CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#20 +CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#41 +CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#35 +CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/html.rb#13 +CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#57 +CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/html.rb#40 +CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp) + +# Scanner for JSON (JavaScript Object Notation). +# +# source://coderay//lib/coderay/scanners/json.rb#5 +class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner + protected + + # See http://json.org/ for a definition of the JSON lexic/grammar. + # + # source://coderay//lib/coderay/scanners/json.rb#26 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/json.rb#21 + def setup; end +end + +# source://coderay//lib/coderay/scanners/json.rb#15 +CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#17 +CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#10 +CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/json.rb#16 +CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for Java. +# +# source://coderay//lib/coderay/scanners/java.rb#5 +class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/java.rb#51 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 +module CodeRay::Scanners::Java::BuiltinTypes; end + +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7 +CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#19 +CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#25 +CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#40 +CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#47 +CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#30 +CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html +# +# source://coderay//lib/coderay/scanners/java.rb#12 +CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#20 +CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#18 +CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#42 +CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java.rb#21 +CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#41 +CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for JavaScript. +# +# Aliases: +ecmascript+, +ecma_script+, +javascript+ +# +# source://coderay//lib/coderay/scanners/java_script.rb#7 +class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/java_script.rb#224 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/java_script.rb#61 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/java_script.rb#57 + def setup; end + + # source://coderay//lib/coderay/scanners/java_script.rb#229 + def xml_scanner; end +end + +# source://coderay//lib/coderay/scanners/java_script.rb#42 +CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java_script.rb#36 +CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# The actual JavaScript keywords. +# +# source://coderay//lib/coderay/scanners/java_script.rb#13 +CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#24 +CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/java_script.rb#50 +CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#22 +CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#18 +CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#44 +CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Reserved for future use. +# +# source://coderay//lib/coderay/scanners/java_script.rb#29 +CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#45 +CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#43 +CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for the Lua[http://lua.org] programming lanuage. +# +# The language’s complete syntax is defined in +# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html], +# which is what this scanner tries to conform to. +# +# source://coderay//lib/coderay/scanners/lua.rb#11 +class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner + protected + + # CodeRay entry hook. Starts parsing. + # + # source://coderay//lib/coderay/scanners/lua.rb#60 + def scan_tokens(encoder, options); end + + # Scanner initialization. + # + # source://coderay//lib/coderay/scanners/lua.rb#54 + def setup; end +end + +# Automatic token kind selection for normal words. +# +# source://coderay//lib/coderay/scanners/lua.rb#46 +CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# Keywords used in Lua. +# +# source://coderay//lib/coderay/scanners/lua.rb#18 +CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array) + +# Constants set by the Lua core. +# +# source://coderay//lib/coderay/scanners/lua.rb#25 +CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# The expressions contained in this array are parts of Lua’s `basic' +# library. Although it’s not entirely necessary to load that library, +# it is highly recommended and one would have to provide own implementations +# of some of these expressions if one does not do so. They however aren’t +# keywords, neither are they constants, but nearly predefined, so they +# get tagged as `predefined' rather than anything else. +# +# This list excludes values of form `_UPPERCASE' because the Lua manual +# requires such identifiers to be reserved by Lua anyway and they are +# highlighted directly accordingly, without the need for specific +# identifiers to be listed here. +# +# source://coderay//lib/coderay/scanners/lua.rb#38 +CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array) + +# Scanner for PHP. +# +# Original by Stefan Walk. +# +# source://coderay//lib/coderay/scanners/php.rb#10 +class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/php.rb#23 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/php.rb#234 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/php.rb#19 + def setup; end +end + +# source://coderay//lib/coderay/scanners/php.rb#15 +CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#197 +module CodeRay::Scanners::PHP::RE; end + +# source://coderay//lib/coderay/scanners/php.rb#211 +CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#213 +CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#216 +CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#206 +CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#199 +CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#214 +CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#28 +module CodeRay::Scanners::PHP::Words; end + +# according to http://php.net/quickref.php on 2009-04-21; +# all functions with _ excluded (module functions) and selected additional functions +# +# source://coderay//lib/coderay/scanners/php.rb#50 +CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#46 +CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#145 +CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array) + +# TODO: more built-in PHP functions? +# +# source://coderay//lib/coderay/scanners/php.rb#140 +CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#184 +CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# according to http://www.php.net/manual/en/reserved.keywords.php +# +# source://coderay//lib/coderay/scanners/php.rb#31 +CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#41 +CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#178 +CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#39 +CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#193 +CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# Scanner for Python. Supports Python 3. +# +# Based on pygments' PythonLexer, see +# http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. +# +# source://coderay//lib/coderay/scanners/python.rb#8 +class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/python.rb#103 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/python.rb#86 +CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#91 +CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#97 +CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#65 +CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#57 +CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#13 +CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#64 +CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#21 +CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#68 +CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#37 +CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#25 +CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#52 +CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#82 +CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#78 +CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#66 +CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# = Raydebug Scanner +# +# Highlights the output of the Encoders::Debug encoder. +# +# source://coderay//lib/coderay/scanners/raydebug.rb#9 +class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/raydebug.rb#22 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/raydebug.rb#17 + def setup; end +end + +# This scanner is really complex, since Ruby _is_ a complex language! +# +# It tries to highlight 100% of all common code, +# and 90% of strange codes. +# +# It is optimized for HTML highlighting, and is not very useful for +# parsing or pretty printing. +# +# source://coderay//lib/coderay/scanners/ruby.rb#11 +class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/ruby.rb#19 + def interpreted_string_state; end + + protected + + # source://coderay//lib/coderay/scanners/ruby.rb#29 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/ruby.rb#25 + def setup; end +end + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 +module CodeRay::Scanners::Ruby::Patterns; end + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 +CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106 +CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55 +CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96 +CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#132 +CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69 +CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102 +CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74 +CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#161 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#160 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#76 +CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#75 +CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57 +CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116 +CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71 +CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38 +CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28 +CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#54 +CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7 +CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151 +CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#32 +CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#53 +CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#40 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#41 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#87 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#51 +CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77 +CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56 +CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70 +CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17 +CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58 +CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61 +CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#67 +CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126 +CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138 +CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#89 +CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79 +CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142 +CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59 +CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8 +class CodeRay::Scanners::Ruby::StringState < ::Struct + # @return [StringState] a new instance of StringState + # + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 + def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63 + def heredoc_pattern(delim, interpreted, indented); end + + class << self + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40 + def simple_key_pattern(delim); end + end +end + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10 +CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#17 +CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash) + +# by Josh Goebel +# +# source://coderay//lib/coderay/scanners/sql.rb#5 +class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/sql.rb#66 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/sql.rb#23 +CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#38 +CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#55 +CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#46 +CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/sql.rb#9 +CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#18 +CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#44 +CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#36 +CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#28 +CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#60 +CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/sql.rb#58 +CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#56 +CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# A scanner for Sass. +# +# source://coderay//lib/coderay/scanners/sass.rb#5 +class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS + protected + + # source://coderay//lib/coderay/scanners/sass.rb#16 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/sass.rb#12 + def setup; end +end + +# = Scanner +# +# The base class for all Scanners. +# +# It is a subclass of Ruby's great +StringScanner+, which +# makes it easy to access the scanning methods inside. +# +# It is also +Enumerable+, so you can use it like an Array of +# Tokens: +# +# require 'coderay' +# +# c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" +# +# for text, kind in c_scanner +# puts text if kind == :operator +# end +# +# # prints: (*==)++; +# +# OK, this is a very simple example :) +# You can also use +map+, +any?+, +find+ and even +sort_by+, +# if you want. +# +# source://coderay//lib/coderay/scanners/scanner.rb#29 +class CodeRay::Scanners::Scanner < ::StringScanner + include ::Enumerable + extend ::CodeRay::Plugin + + # Create a new Scanner. + # + # * +code+ is the input String and is handled by the superclass + # StringScanner. + # * +options+ is a Hash with Symbols as keys. + # It is merged with the default options of the class (you can + # overwrite default options here.) + # + # Else, a Tokens object is used. + # + # @return [Scanner] a new instance of Scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#125 + def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end + + # The string in binary encoding. + # + # To be used with #pos, which is the index of the byte the scanner + # will scan next. + # + # source://coderay//lib/coderay/scanners/scanner.rb#218 + def binary_string; end + + # The current column position of the scanner, starting with 1. + # See also: #line. + # + # source://coderay//lib/coderay/scanners/scanner.rb#209 + def column(pos = T.unsafe(nil)); end + + # Traverse the tokens. + # + # source://coderay//lib/coderay/scanners/scanner.rb#192 + def each(&block); end + + # the default file extension for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#160 + def file_extension; end + + # the Plugin ID for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#155 + def lang; end + + # The current line position of the scanner, starting with 1. + # See also: #column. + # + # Beware, this is implemented inefficiently. It should be used + # for debugging only. + # + # source://coderay//lib/coderay/scanners/scanner.rb#202 + def line(pos = T.unsafe(nil)); end + + # Sets back the scanner. Subclasses should redefine the reset_instance + # method instead of this one. + # + # source://coderay//lib/coderay/scanners/scanner.rb#142 + def reset; end + + # Returns the value of attribute state. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 + def state=(_arg0); end + + # Set a new string to be scanned. + # + # source://coderay//lib/coderay/scanners/scanner.rb#148 + def string=(code); end + + # Scan the code and returns all tokens in a Tokens object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#165 + def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # Cache the result of tokenize. + # + # source://coderay//lib/coderay/scanners/scanner.rb#187 + def tokens; end + + protected + + # Scanner error with additional status information + # + # @raise [ScanError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#314 + def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/scanner.rb#289 + def raise_inspect_arguments(message, tokens, state, ambit); end + + # Resets the scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#265 + def reset_instance; end + + # Shorthand for scan_until(/\z/). + # This method also avoids a JRuby 1.9 mode bug. + # + # source://coderay//lib/coderay/scanners/scanner.rb#328 + def scan_rest; end + + # This is the central method, and commonly the only one a + # subclass implements. + # + # Subclasses must implement this method; it must return +tokens+ + # and must only use Tokens#<< for storing scanned tokens! + # + # @raise [NotImplementedError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#260 + def scan_tokens(tokens, options); end + + # source://coderay//lib/coderay/scanners/scanner.rb#305 + def scanner_state_info(state); end + + # source://coderay//lib/coderay/scanners/scanner.rb#239 + def set_string_from_source(source); end + + # source://coderay//lib/coderay/scanners/scanner.rb#250 + def set_tokens_from_options(options); end + + # Can be implemented by subclasses to do some initialization + # that has to be done once per instance. + # + # Use reset for initialization that has to be done once per + # scan. + # + # source://coderay//lib/coderay/scanners/scanner.rb#236 + def setup; end + + # source://coderay//lib/coderay/scanners/scanner.rb#322 + def tokens_last(tokens, n); end + + # source://coderay//lib/coderay/scanners/scanner.rb#318 + def tokens_size(tokens); end + + class << self + # The encoding used internally by this scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#71 + def encoding(name = T.unsafe(nil)); end + + # The typical filename suffix for this scanner's language. + # + # source://coderay//lib/coderay/scanners/scanner.rb#66 + def file_extension(extension = T.unsafe(nil)); end + + # The lang of this Scanner class, which is equal to its Plugin ID. + # + # source://coderay//lib/coderay/scanners/scanner.rb#76 + def lang; end + + # Normalizes the given code into a string with UNIX newlines, in the + # scanner's internal encoding, with invalid and undefined charachters + # replaced by placeholders. Always returns a new object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#51 + def normalize(code); end + + protected + + # source://coderay//lib/coderay/scanners/scanner.rb#82 + def encode_with_encoding(code, target_encoding); end + + # source://coderay//lib/coderay/scanners/scanner.rb#100 + def guess_encoding(s); end + + # source://coderay//lib/coderay/scanners/scanner.rb#96 + def to_unix(code); end + end +end + +# The default options for all scanner classes. +# +# Define @default_options for subclasses. +# +# source://coderay//lib/coderay/scanners/scanner.rb#40 +CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/scanner.rb#42 +CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners + +# source://coderay//lib/coderay/scanners/scanner.rb#299 +CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/scanners/scanner.rb#271 +CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# Raised if a Scanner fails while scanning +# +# source://coderay//lib/coderay/scanners/scanner.rb#35 +class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end + +# source://coderay//lib/coderay/scanners/taskpaper.rb#4 +class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/taskpaper.rb#11 + def scan_tokens(encoder, options); end +end + +# Scanner for plain text. +# +# Yields just one token of the kind :plain. +# +# Alias: +plaintext+, +plain+ +# +# source://coderay//lib/coderay/scanners/text.rb#9 +class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/text.rb#18 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/text.rb#14 +CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# Scanner for XML. +# +# Currently this is the same scanner as Scanners::HTML. +# +# source://coderay//lib/coderay/scanners/xml.rb#9 +class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end + +# Scanner for YAML. +# +# Based on the YAML scanner from Syntax by Jamis Buck. +# +# source://coderay//lib/coderay/scanners/yaml.rb#7 +class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/yaml.rb#16 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/yaml.rb#12 +CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol) + +# This module holds the Style class and its subclasses. +# +# See Plugin. +# +# source://coderay//lib/coderay/styles.rb#6 +module CodeRay::Styles + extend ::CodeRay::PluginHost +end + +# A colorful theme using CSS 3 colors (with alpha channel). +# +# source://coderay//lib/coderay/styles/alpha.rb#5 +class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end + +# source://coderay//lib/coderay/styles/alpha.rb#14 +CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/styles/alpha.rb#53 +CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String) + +# Base class for styles. +# +# Styles are used by Encoders::HTML to colorize tokens. +# +# source://coderay//lib/coderay/styles/style.rb#8 +class CodeRay::Styles::Style + extend ::CodeRay::Plugin +end + +# source://coderay//lib/coderay/styles/style.rb#12 +CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles + +# A Hash of all known token kinds and their associated CSS classes. +# +# source://coderay//lib/coderay/token_kinds.rb#4 +CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) + +# The Tokens class represents a list of tokens returned from +# a Scanner. It's actually just an Array with a few helper methods. +# +# A token itself is not a special object, just two elements in an Array: +# * the _token_ _text_ (the original source of the token in a String) or +# a _token_ _action_ (begin_group, end_group, begin_line, end_line) +# * the _token_ _kind_ (a Symbol representing the type of the token) +# +# It looks like this: +# +# ..., '# It looks like this', :comment, ... +# ..., '3.1415926', :float, ... +# ..., '$^', :error, ... +# +# Some scanners also yield sub-tokens, represented by special +# token actions, for example :begin_group and :end_group. +# +# The Ruby scanner, for example, splits "a string" into: +# +# [ +# :begin_group, :string, +# '"', :delimiter, +# 'a string', :content, +# '"', :delimiter, +# :end_group, :string +# ] +# +# Tokens can be used to save the output of a Scanners in a simple +# Ruby object that can be send to an Encoder later: +# +# tokens = CodeRay.scan('price = 2.59', :ruby).tokens +# tokens.encode(:html) +# tokens.html +# CodeRay.encoder(:html).encode_tokens(tokens) +# +# Tokens gives you the power to handle pre-scanned code very easily: +# You can serialize it to a JSON string and store it in a database, pass it +# around to encode it more than once, send it to other algorithms... +# +# source://coderay//lib/coderay/tokens.rb#41 +class CodeRay::Tokens < ::Array + # source://coderay//lib/coderay/tokens.rb#156 + def begin_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#158 + def begin_line(kind); end + + # Return the actual number of tokens. + # + # source://coderay//lib/coderay/tokens.rb#151 + def count; end + + # Encode the tokens using encoder. + # + # encoder can be + # * a plugin name like :html oder 'statistic' + # * an Encoder object + # + # options are passed to the encoder. + # + # source://coderay//lib/coderay/tokens.rb#56 + def encode(encoder, options = T.unsafe(nil)); end + + # source://coderay//lib/coderay/tokens.rb#157 + def end_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#159 + def end_line(kind); end + + # Redirects unknown methods to encoder calls. + # + # For example, if you call +tokens.html+, the HTML encoder + # is used to highlight the tokens. + # + # source://coderay//lib/coderay/tokens.rb#70 + def method_missing(meth, options = T.unsafe(nil)); end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 + def scanner; end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 + def scanner=(_arg0); end + + # Split the tokens into parts of the given +sizes+. + # + # The result will be an Array of Tokens objects. The parts have + # the text size specified by the parameter. In addition, each + # part closes all opened tokens. This is useful to insert tokens + # betweem them. + # + # This method is used by @Scanner#tokenize@ when called with an Array + # of source strings. The Diff encoder uses it for inline highlighting. + # + # source://coderay//lib/coderay/tokens.rb#85 + def split_into_parts(*sizes); end + + def text_token(*_arg0); end + + # Turn tokens into a string by concatenating them. + # + # source://coderay//lib/coderay/tokens.rb#62 + def to_s; end + + def tokens(*_arg0); end +end + +# The result of a scan operation is a TokensProxy, but should act like Tokens. +# +# This proxy makes it possible to use the classic CodeRay.scan.encode API +# while still providing the benefits of direct streaming. +# +# source://coderay//lib/coderay/tokens_proxy.rb#7 +class CodeRay::TokensProxy + # Create a new TokensProxy with the arguments of CodeRay.scan. + # + # @return [TokensProxy] a new instance of TokensProxy + # + # source://coderay//lib/coderay/tokens_proxy.rb#12 + def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def block=(_arg0); end + + # Overwrite Struct#each. + # + # source://coderay//lib/coderay/tokens_proxy.rb#48 + def each(*args, &blk); end + + # Call CodeRay.encode if +encoder+ is a Symbol; + # otherwise, convert the receiver to tokens and call encoder.encode_tokens. + # + # source://coderay//lib/coderay/tokens_proxy.rb#21 + def encode(encoder, options = T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def input; end + + # Sets the attribute input + # + # @param value the value to set the attribute input to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def input=(_arg0); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def lang=(_arg0); end + + # Tries to call encode; + # delegates to tokens otherwise. + # + # source://coderay//lib/coderay/tokens_proxy.rb#31 + def method_missing(method, *args, &blk); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def options=(_arg0); end + + # A (cached) scanner instance to use for the scan task. + # + # source://coderay//lib/coderay/tokens_proxy.rb#43 + def scanner; end + + # The (cached) result of the tokenized input; a Tokens instance. + # + # source://coderay//lib/coderay/tokens_proxy.rb#38 + def tokens; end +end + +# source://coderay//lib/coderay/version.rb#2 +CodeRay::VERSION = T.let(T.unsafe(nil), String) + +# = WordList +# +# A Hash subclass designed for mapping word lists to token types. +# +# A WordList is a Hash with some additional features. +# It is intended to be used for keyword recognition. +# +# WordList is optimized to be used in Scanners, +# typically to decide whether a given ident is a special token. +# +# For case insensitive words use WordList::CaseIgnoring. +# +# Example: +# +# # define word arrays +# RESERVED_WORDS = %w[ +# asm break case continue default do else +# ] +# +# PREDEFINED_TYPES = %w[ +# int long short char void +# ] +# +# # make a WordList +# IDENT_KIND = WordList.new(:ident). +# add(RESERVED_WORDS, :reserved). +# add(PREDEFINED_TYPES, :predefined_type) +# +# ... +# +# def scan_tokens tokens, options +# ... +# +# elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) +# # use it +# kind = IDENT_KIND[match] +# ... +# +# source://coderay//lib/coderay/helpers/word_list.rb#40 +class CodeRay::WordList < ::Hash + # Create a new WordList with +default+ as default value. + # + # @return [WordList] a new instance of WordList + # + # source://coderay//lib/coderay/helpers/word_list.rb#43 + def initialize(default = T.unsafe(nil)); end + + # Add words to the list and associate them with +value+. + # + # Returns +self+, so you can concat add calls. + # + # source://coderay//lib/coderay/helpers/word_list.rb#50 + def add(words, value = T.unsafe(nil)); end +end + +# A CaseIgnoring WordList is like a WordList, only that +# keys are compared case-insensitively (normalizing keys using +downcase+). +# +# source://coderay//lib/coderay/helpers/word_list.rb#60 +class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList + # source://coderay//lib/coderay/helpers/word_list.rb#62 + def [](key); end + + # source://coderay//lib/coderay/helpers/word_list.rb#66 + def []=(key, value); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi new file mode 100644 index 0000000..e6a82d0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi @@ -0,0 +1,11645 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `concurrent-ruby` gem. +# Please instead update this file by running `bin/tapioca gem concurrent-ruby`. + + +# {include:file:README.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 +module Concurrent + extend ::Concurrent::Utility::EngineDetector + extend ::Concurrent::Utility::NativeExtensionLoader + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + private + + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 + def atomically; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 + def call_dataflow(method, executor, *inputs, &block); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 + def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 + def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 + def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 + def dataflow_with!(executor, *inputs, &block); end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 + def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 + def monotonic_time(unit = T.unsafe(nil)); end + + class << self + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 + def atomically; end + + # Number of processors cores available for process scheduling. + # This method takes in account the CPU quota if the process is inside a cgroup with a + # dedicated CPU quota (typically Docker). + # Otherwise it returns the same value as #processor_count but as a Float. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [Float] number of available processors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#194 + def available_processor_count; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 + def call_dataflow(method, executor, *inputs, &block); end + + # The maximum number of processors cores available for process scheduling. + # Returns `nil` if there is no enforced limit, or a `Float` if the + # process is inside a cgroup with a dedicated CPU quota (typically Docker). + # + # Note that nothing prevents setting a CPU quota higher than the actual number of + # cores on the system. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#209 + def cpu_quota; end + + # The CPU shares requested by the process. For performance reasons the calculated + # value will be memoized on the first call. + # + # @return [Float, nil] CPU shares requested by the process, or nil if not set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#217 + def cpu_shares; end + + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#37 + def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # @deprecated + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#69 + def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 + def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 + def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 + def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 + def dataflow_with!(executor, *inputs, &block); end + + # Disables AtExit handlers including pool auto-termination handlers. + # When disabled it will be the application programmer's responsibility + # to ensure that the handlers are shutdown properly prior to application + # exit by calling `AtExit.run` method. + # + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # @note this option should be needed only because of `at_exit` ordering + # issues which may arise when running some of the testing frameworks. + # E.g. Minitest's test-suite runs itself in `at_exit` callback which + # executes after the pools are already terminated. Then auto termination + # needs to be disabled and called manually after test-suite ends. + # @note This method should *never* be called + # from within a gem. It should *only* be used from within the main + # application and even then it should be used only when necessary. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#48 + def disable_at_exit_handlers!; end + + # General access point to global executors. + # + # @param executor_identifier [Symbol, Executor] symbols: + # - :fast - {Concurrent.global_fast_executor} + # - :io - {Concurrent.global_io_executor} + # - :immediate - {Concurrent.global_immediate_executor} + # @return [Executor] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#83 + def executor(executor_identifier); end + + # Global thread pool optimized for short, fast *operations*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#55 + def global_fast_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#66 + def global_immediate_executor; end + + # Global thread pool optimized for long, blocking (IO) *tasks*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#62 + def global_io_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#109 + def global_logger; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#113 + def global_logger=(value); end + + # Global thread pool user for global *timers*. + # + # @return [Concurrent::TimerSet] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#73 + def global_timer_set; end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 + def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 + def monotonic_time(unit = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#7 + def mutex_owned_per_thread?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#87 + def new_fast_executor(opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#98 + def new_io_executor(opts = T.unsafe(nil)); end + + # Number of physical processor cores on the current system. For performance + # reasons the calculated value will be memoized on the first call. + # + # On Windows the Win32 API will be queried for the `NumberOfCores from + # Win32_Processor`. This will return the total number "of cores for the + # current instance of the processor." On Unix-like operating systems either + # the `hwprefs` or `sysctl` utility will be called in a subshell and the + # returned value will be used. In the rare case where none of these methods + # work or an exception is raised the function will simply return 1. + # + # @return [Integer] number physical processor cores on the current system + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx + # @see http://www.unix.com/man-page/osx/1/HWPREFS/ + # @see http://linux.die.net/man/8/sysctl + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#181 + def physical_processor_count; end + + # Number of processors seen by the OS and used for process scheduling. For + # performance reasons the calculated value will be memoized on the first + # call. + # + # When running under JRuby the Java runtime call + # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According + # to the Java documentation this "value may change during a particular + # invocation of the virtual machine... [applications] should therefore + # occasionally poll this property." We still memoize this value once under + # JRuby. + # + # Otherwise Ruby's Etc.nprocessors will be used. + # + # @return [Integer] number of processors seen by the OS or Java runtime + # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#160 + def processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#142 + def processor_counter; end + + # Use logger created by #create_simple_logger to log concurrent-ruby messages. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#63 + def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. + # + # @deprecated + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#96 + def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#38 +class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object + # @return [AbstractExchanger] a new instance of AbstractExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#44 + def initialize; end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object] the value exchanged by the other thread or `nil` on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#69 + def exchange(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # On timeout a {Concurrent::TimeoutError} exception will be raised. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [Concurrent::TimeoutError] on timeout + # @return [Object] the value exchanged by the other thread + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#80 + def exchange!(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. + # + # @example + # + # exchanger = Concurrent::Exchanger.new + # + # result = exchanger.exchange(:foo, 0.5) + # + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#109 + def try_exchange(value, timeout = T.unsafe(nil)); end + + private + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [NotImplementedError] + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#122 + def do_exchange(value, timeout); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#41 +Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#10 +class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::Concern::Deprecation + + # Create a new thread pool. + # + # @return [AbstractExecutorService] a new instance of AbstractExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#23 + def initialize(opts = T.unsafe(nil), &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#72 + def auto_terminate=(value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#67 + def auto_terminate?; end + + # Returns the value of attribute fallback_policy. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#18 + def fallback_policy; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#42 + def kill; end + + # Returns the value of attribute name. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#20 + def name; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#52 + def running?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#37 + def shutdown; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#62 + def shutdown?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#57 + def shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#32 + def to_s; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#47 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # Returns an action which executes the `fallback_policy` once the queue + # size reaches `max_queue`. The reason for the indirection of an action + # is so that the work can be deferred outside of synchronization. + # + # @param args [Array] the arguments to the task which is being handled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#85 + def fallback_action(*args); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#126 + def ns_auto_terminate?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#106 + def ns_execute(*args, &task); end + + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#122 + def ns_kill_execution; end + + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#114 + def ns_shutdown_execution; end +end + +# The set of possible fallback policies that may be set at thread pool creation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#15 +Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) + +# An abstract implementation of local storage, with sub-classes for +# per-thread and per-fiber locals. +# +# Each execution context (EC, thread or fiber) has a lazily initialized array +# of local variable values. Each time a new local variable is created, we +# allocate an "index" for it. +# +# For example, if the allocated index is 1, that means slot #1 in EVERY EC's +# locals array will be used for the value of that variable. +# +# The good thing about using a per-EC structure to hold values, rather than +# a global, is that no synchronization is needed when reading and writing +# those values (since the structure is only ever accessed by a single +# thread). +# +# Of course, when a local variable is GC'd, 1) we need to recover its index +# for use by other new local variables (otherwise the locals arrays could +# get bigger and bigger with time), and 2) we need to null out all the +# references held in the now-unused slots (both to avoid blocking GC of those +# objects, and also to prevent "stale" values from being passed on to a new +# local when the index is reused). +# +# Because we need to null out freed slots, we need to keep references to +# ALL the locals arrays, so we can null out the appropriate slots in all of +# them. This is why we need to use a finalizer to clean up the locals array +# when the EC goes out of scope. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#35 +class Concurrent::AbstractLocals + # @return [AbstractLocals] a new instance of AbstractLocals + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#36 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#89 + def fetch(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#71 + def free_index(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#55 + def next_index(local); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#102 + def set(index, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#43 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#48 + def weak_synchronize; end + + private + + # When the local goes out of scope, clean up that slot across all locals currently assigned. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#112 + def local_finalizer(index); end + + # Returns the locals for the current scope, or nil if none exist. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#128 + def locals; end + + # Returns the locals for the current scope, creating them if necessary. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#133 + def locals!; end + + # When a thread/fiber goes out of scope, remove the array from @all_arrays. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#119 + def thread_fiber_finalizer(array_object_id); end +end + +# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) +# function. An agent is a shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. `Agent` is (mostly) +# functionally equivalent to Clojure's agent, except where the runtime +# prevents parity. +# +# Agents are reactive, not autonomous - there is no imperative message loop +# and no blocking receive. The state of an Agent should be itself immutable +# and the `#value` of an Agent is always immediately available for reading by +# any thread without any messages, i.e. observation does not require +# cooperation or coordination. +# +# Agent action dispatches are made using the various `#send` methods. These +# methods always return immediately. At some point later, in another thread, +# the following will happen: +# +# 1. The given `action` will be applied to the state of the Agent and the +# `args`, if any were supplied. +# 2. The return value of `action` will be passed to the validator lambda, +# if one has been set on the Agent. +# 3. If the validator succeeds or if no validator was given, the return value +# of the given `action` will become the new `#value` of the Agent. See +# `#initialize` for details. +# 4. If any observers were added to the Agent, they will be notified. See +# `#add_observer` for details. +# 5. If during the `action` execution any other dispatches are made (directly +# or indirectly), they will be held until after the `#value` of the Agent +# has been changed. +# +# If any exceptions are thrown by an action function, no nested dispatches +# will occur, and the exception will be cached in the Agent itself. When an +# Agent has errors cached, any subsequent interactions will immediately throw +# an exception, until the agent's errors are cleared. Agent errors can be +# examined with `#error` and the agent restarted with `#restart`. +# +# The actions of all Agents get interleaved amongst threads in a thread pool. +# At any point in time, at most one action for each Agent is being executed. +# Actions dispatched to an agent from another single agent or thread will +# occur in the order they were sent, potentially interleaved with actions +# dispatched to the same agent from other sources. The `#send` method should +# be used for actions that are CPU limited, while the `#send_off` method is +# appropriate for actions that may block on IO. +# +# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an agent with an initial value +# agent = Concurrent::Agent.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# agent.send{|set| next_fibonacci(set) } +# end +# +# # wait for them to complete +# agent.await +# +# # get the current value +# agent.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Agents support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time an action dispatch returns and +# the new value is successfully validated. Observation will *not* occur if the +# action raises an exception, if validation fails, or when a {#restart} occurs. +# +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Agent when the action began +# processing. The `new_value` is the value to which the Agent was set when the +# action completed. Note that `old_value` and `new_value` may be the same. +# This is not an error. It simply means that the action returned the same +# value. +# +# ## Nested Actions +# +# It is possible for an Agent action to post further actions back to itself. +# The nested actions will be enqueued normally then processed *after* the +# outer action completes, in the order they were sent, possibly interleaved +# with action dispatches from other threads. Nested actions never deadlock +# with one another and a failure in a nested action will never affect the +# outer action. +# +# Nested actions can be called using the Agent reference from the enclosing +# scope or by passing the reference in as a "send" argument. Nested actions +# cannot be post using `self` from within the action block/proc/lambda; `self` +# in this context will not reference the Agent. The preferred method for +# dispatching nested actions is to pass the Agent as an argument. This allows +# Ruby to more effectively manage the closing scope. +# +# Prefer this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send(agent) do |value, this| +# this.send {|v| v + 42 } +# 3.14 +# end +# agent.value #=> 45.14 +# ``` +# +# Over this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send do |value| +# agent.send {|v| v + 42 } +# 3.14 +# end +# ``` +# +# +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @see http://clojure.org/Agents Clojure Agents +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#145 +class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Observable + + # Create a new `Agent` with the given initial value and options. + # + # The `:validator` option must be `nil` or a side-effect free proc/lambda + # which takes one argument. On any intended value change the validator, if + # provided, will be called. If the new value is invalid the validator should + # return `false` or raise an error. + # + # The `:error_handler` option must be `nil` or a proc/lambda which takes two + # arguments. When an action raises an error or validation fails, either by + # returning false or raising an error, the error handler will be called. The + # arguments to the error handler will be a reference to the agent itself and + # the error object which was raised. + # + # The `:error_mode` may be either `:continue` (the default if an error + # handler is given) or `:fail` (the default if error handler nil or not + # given). + # + # If an action being run by the agent throws an error or doesn't pass + # validation the error handler, if present, will be called. After the + # handler executes if the error mode is `:continue` the Agent will continue + # as if neither the action that caused the error nor the error itself ever + # happened. + # + # If the mode is `:fail` the Agent will become {#failed?} and will stop + # accepting new action dispatches. Any previously queued actions will be + # held until {#restart} is called. The {#value} method will still work, + # returning the value of the Agent before the error. + # + # @option opts + # @option opts + # @option opts + # @param initial [Object] the initial value + # @param opts [Hash] the configuration options + # @return [Agent] a new instance of Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#220 + def initialize(initial, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Appropriate for actions that may block on IO. + # + # @param action [Proc] the action dispatch to be enqueued + # @return [Concurrent::Agent] self + # @see #send_off + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#331 + def <<(action); end + + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far, from this thread or nested by the Agent, have occurred. Will + # block when {#failed?}. Will never return if a failed Agent is {#restart} + # with `:clear_actions` true. + # + # Returns a reference to `self` to support method chaining: + # + # ``` + # current_value = agent.await.value + # ``` + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @return [Boolean] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#350 + def await; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#363 + def await_for(timeout); end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#377 + def await_for!(timeout); end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 + def deref; end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 + def error; end + + # The error mode this Agent is operating in. See {#initialize} for details. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#184 + def error_mode; end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 + def failed?; end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 + def post(*args, &action); end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 + def reason; end + + # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` + # then un-fails the Agent so that action dispatches are allowed again. If + # the `:clear_actions` option is give and true, any actions queued on the + # Agent that were being held while it was failed will be discarded, + # otherwise those held actions will proceed. The `new_value` must pass the + # validator if any, or `restart` will raise an exception and the Agent will + # remain failed with its old {#value} and {#error}. Observers, if any, will + # not be notified of the new state. + # + # @option opts + # @param new_value [Object] the new value for the Agent once restarted + # @param opts [Hash] the configuration options + # @raise [Concurrent:AgentError] when not failed + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#424 + def restart(new_value, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#278 + def send(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#287 + def send!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 + def send_off(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#302 + def send_off!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#311 + def send_via(executor, *args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#319 + def send_via!(executor, *args, &action); end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 + def stopped?; end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 + def value; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. Will block indefinitely when timeout is nil or not given. + # + # Provided mainly for consistency with other classes in this library. Prefer + # the various `await` methods instead. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#393 + def wait(timeout = T.unsafe(nil)); end + + private + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#510 + def enqueue_action_job(action, args, executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#516 + def enqueue_await_job(latch); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#543 + def execute_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#576 + def handle_error(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#529 + def ns_enqueue_job(job, index = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#584 + def ns_find_last_job_for_thread; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#490 + def ns_initialize(initial, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#539 + def ns_post_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#570 + def ns_validate(value); end + + class << self + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far to all the given Agents, from this thread or nested by the + # given Agents, have occurred. Will block when any of the agents are + # failed. Will never return if a failed Agent is restart with + # `:clear_actions` true. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#449 + def await(*agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#463 + def await_for(timeout, *agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#482 + def await_for!(timeout, *agents); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#154 +Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#151 +Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#157 +Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#160 +Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#148 +Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) + +# Raised during action processing or any other time in an Agent's lifecycle. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#167 +class Concurrent::Agent::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#168 + def initialize(message = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 +class Concurrent::Agent::Job < ::Struct + # Returns the value of attribute action + # + # @return [Object] the current value of action + def action; end + + # Sets the attribute action + # + # @param value [Object] the value to set the attribute action to. + # @return [Object] the newly set value + def action=(_); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute caller + # + # @return [Object] the current value of caller + def caller; end + + # Sets the attribute caller + # + # @param value [Object] the value to set the attribute caller to. + # @return [Object] the newly set value + def caller=(_); end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + def executor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Raised when a new value obtained during action processing or at `#restart` +# fails validation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#176 +class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error + # @return [ValidationError] a new instance of ValidationError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#177 + def initialize(message = T.unsafe(nil)); end +end + +# A thread-safe subclass of Array. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` +# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#concat` instead. +# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#53 +class Concurrent::Array < ::Array; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#22 +Concurrent::ArrayImplementation = Array + +# A mixin module that provides simple asynchronous behavior to a class, +# turning it into a simple actor. Loosely based on Erlang's +# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without +# supervision or linking. +# +# A more feature-rich {Concurrent::Actor} is also available when the +# capabilities of `Async` are too limited. +# +# ```cucumber +# Feature: +# As a stateful, plain old Ruby class +# I want safe, asynchronous behavior +# So my long-running methods don't block the main thread +# ``` +# +# The `Async` module is a way to mix simple yet powerful asynchronous +# capabilities into any plain old Ruby object or class, turning each object +# into a simple Actor. Method calls are processed on a background thread. The +# caller is free to perform other actions while processing occurs in the +# background. +# +# Method calls to the asynchronous object are made via two proxy methods: +# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post +# the method call to the object's background thread and return a "future" +# which will eventually contain the result of the method call. +# +# This behavior is loosely patterned after Erlang's `gen_server` behavior. +# When an Erlang module implements the `gen_server` behavior it becomes +# inherently asynchronous. The `start` or `start_link` function spawns a +# process (similar to a thread but much more lightweight and efficient) and +# returns the ID of the process. Using the process ID, other processes can +# send messages to the `gen_server` via the `cast` and `call` methods. Unlike +# Erlang's `gen_server`, however, `Async` classes do not support linking or +# supervision trees. +# +# ## Basic Usage +# +# When this module is mixed into a class, objects of the class become inherently +# asynchronous. Each object gets its own background thread on which to post +# asynchronous method calls. Asynchronous method calls are executed in the +# background one at a time in the order they are received. +# +# To create an asynchronous class, simply mix in the `Concurrent::Async` module: +# +# ``` +# class Hello +# include Concurrent::Async +# +# def hello(name) +# "Hello, #{name}!" +# end +# end +# ``` +# +# Mixing this module into a class provides each object two proxy methods: +# `async` and `await`. These methods are thread safe with respect to the +# enclosing object. The former proxy allows methods to be called +# asynchronously by posting to the object's internal thread. The latter proxy +# allows a method to be called synchronously but does so safely with respect +# to any pending asynchronous method calls and ensures proper ordering. Both +# methods return a {Concurrent::IVar} which can be inspected for the result +# of the proxied method call. Calling a method with `async` will return a +# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. +# +# ``` +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# ``` +# +# ## Let It Fail +# +# The `async` and `await` proxy methods have built-in error protection based +# on Erlang's famous "let it fail" philosophy. Instance methods should not be +# programmed defensively. When an exception is raised by a delegated method +# the proxy will rescue the exception, expose it to the caller as the `reason` +# attribute of the returned future, then process the next method call. +# +# ## Calling Methods Internally +# +# External method calls should *always* use the `async` and `await` proxy +# methods. When one method calls another method, the `async` proxy should +# rarely be used and the `await` proxy should *never* be used. +# +# When an object calls one of its own methods using the `await` proxy the +# second call will be enqueued *behind* the currently running method call. +# Any attempt to wait on the result will fail as the second call will never +# run until after the current call completes. +# +# Calling a method using the `await` proxy from within a method that was +# itself called using `async` or `await` will irreversibly deadlock the +# object. Do *not* do this, ever. +# +# ## Instance Variables and Attribute Accessors +# +# Instance variables do not need to be thread-safe so long as they are private. +# Asynchronous method calls are processed in the order they are received and +# are processed one at a time. Therefore private instance variables can only +# be accessed by one thread at a time. This is inherently thread-safe. +# +# When using private instance variables within asynchronous methods, the best +# practice is to read the instance variable into a local variable at the start +# of the method then update the instance variable at the *end* of the method. +# This way, should an exception be raised during method execution the internal +# state of the object will not have been changed. +# +# ### Reader Attributes +# +# The use of `attr_reader` is discouraged. Internal state exposed externally, +# when necessary, should be done through accessor methods. The instance +# variables exposed by these methods *must* be thread-safe, or they must be +# called using the `async` and `await` proxy methods. These two approaches are +# subtly different. +# +# When internal state is accessed via the `async` and `await` proxy methods, +# the returned value represents the object's state *at the time the call is +# processed*, which may *not* be the state of the object at the time the call +# is made. +# +# To get the state *at the current* time, irrespective of an enqueued method +# calls, a reader method must be called directly. This is inherently unsafe +# unless the instance variable is itself thread-safe, preferably using one +# of the thread-safe classes within this library. Because the thread-safe +# classes within this library are internally-locking or non-locking, they can +# be safely used from within asynchronous methods without causing deadlocks. +# +# Generally speaking, the best practice is to *not* expose internal state via +# reader methods. The best practice is to simply use the method's return value. +# +# ### Writer Attributes +# +# Writer attributes should never be used with asynchronous classes. Changing +# the state externally, even when done in the thread-safe way, is not logically +# consistent. Changes to state need to be timed with respect to all asynchronous +# method calls which my be in-process or enqueued. The only safe practice is to +# pass all necessary data to each method as arguments and let the method update +# the internal state as necessary. +# +# ## Class Constants, Variables, and Methods +# +# ### Class Constants +# +# Class constants do not need to be thread-safe. Since they are read-only and +# immutable they may be safely read both externally and from within +# asynchronous methods. +# +# ### Class Variables +# +# Class variables should be avoided. Class variables represent shared state. +# Shared state is anathema to concurrency. Should there be a need to share +# state using class variables they *must* be thread-safe, preferably +# using the thread-safe classes within this library. When updating class +# variables, never assign a new value/object to the variable itself. Assignment +# is not thread-safe in Ruby. Instead, use the thread-safe update functions +# of the variable itself to change the value. +# +# The best practice is to *never* use class variables with `Async` classes. +# +# ### Class Methods +# +# Class methods which are pure functions are safe. Class methods which modify +# class variables should be avoided, for all the reasons listed above. +# +# ## An Important Note About Thread Safe Guarantees +# +# > Thread safe guarantees can only be made when asynchronous method calls +# > are not mixed with direct method calls. Use only direct method calls +# > when the object is used exclusively on a single thread. Use only +# > `async` and `await` when the object is shared between threads. Once you +# > call a method using `async` or `await`, you should no longer call methods +# > directly on the object. Use `async` and `await` exclusively from then on. +# +# @example +# +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# @see Concurrent::Actor +# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#217 +module Concurrent::Async + mixes_in_class_methods ::Concurrent::Async::ClassMethods + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 + def async; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 + def await; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 + def call; end + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 + def cast; end + + # Initialize the internal serializer and other stnchronization mechanisms. + # + # @note This method *must* be called immediately upon object construction. + # This is the only way thread-safe initialization can be guaranteed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#441 + def init_synchronization; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#262 + def included(base); end + + # Check for the presence of a method on an object and determine if a given + # set of arguments matches the required arity. + # + # @note This check is imperfect because of the way Ruby reports the arity of + # methods with a variable number of arguments. It is possible to determine + # if too few arguments are given but impossible to determine if too many + # arguments are given. This check may also fail to recognize dynamic behavior + # of the object, such as methods simulated with `method_missing`. + # @param obj [Object] the object to check against + # @param method [Symbol] the method to check the object for + # @param args [Array] zero or more arguments for the arity check + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? + # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#250 + def validate_argc(obj, method, *args); end + end +end + +# Delegates asynchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#282 +class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [Object] the object to wrap and delegate method calls to + # @return [AsyncDelegator] a new instance of AsyncDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#288 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#305 + def method_missing(method, *args, &block); end + + # Perform all enqueued tasks. + # + # This method must be called from within the executor. It must not be + # called while already running. It will loop until the queue is empty. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#330 + def perform; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#348 + def reset_if_forked; end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#322 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# Delegates synchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#360 +class Concurrent::Async::AwaitDelegator + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to + # @return [AwaitDelegator] a new instance of AwaitDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#365 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#378 + def method_missing(method, *args, &block); end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#387 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#269 +module Concurrent::Async::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#270 + def new(*args, **_arg1, &block); end +end + +# Atoms provide a way to manage shared, synchronous, independent state. +# +# An atom is initialized with an initial value and an optional validation +# proc. At any time the value of the atom can be synchronously and safely +# changed. If a validator is given at construction then any new value +# will be checked against the validator and will be rejected if the +# validator returns false or raises an exception. +# +# There are two ways to change the value of an atom: {#compare_and_set} and +# {#swap}. The former will set the new value if and only if it validates and +# the current value matches the new value. The latter will atomically set the +# new value to the result of running the given block if and only if that +# value validates. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an atom with an initial value +# atom = Concurrent::Atom.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# atom.swap{|set| next_fibonacci(set) } +# end +# +# # get the current value +# atom.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Atoms support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time the value of the Atom changes. +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Atom when the change began +# The `new_value` is the value to which the Atom was set when the change +# completed. Note that `old_value` and `new_value` may be the same. This is +# not an error. It simply means that the change operation returned the same +# value. +# +# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://clojure.org/atoms Clojure Atoms +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#95 +class Concurrent::Atom < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Observable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new atom with the given initial value. + # + # @option opts + # @param value [Object] The initial value + # @param opts [Hash] The options used to configure the atom + # @raise [ArgumentError] if the validator is not a `Proc` (when given) + # @return [Atom] a new instance of Atom + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#121 + def initialize(value, opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # Atomically sets the value of atom to the new value if and only if the + # current value of the atom is identical to the old value and the new + # value successfully validates against the (optional) validator given + # at construction. + # + # @param old_value [Object] The expected current value. + # @param new_value [Object] The intended new value. + # @return [Boolean] True if the value is changed else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#181 + def compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def deref; end + + # Atomically sets the value of atom to the new value without regard for the + # current value so long as the new value successfully validates against the + # (optional) validator given at construction. + # + # @param new_value [Object] The intended new value. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#198 + def reset(new_value); end + + # Atomically swaps the value of atom using the given block. The current + # value will be passed to the block, as will any arguments passed as + # arguments to the function. The new value will be validated against the + # (optional) validator proc given at construction. If validation fails the + # value will not be changed. + # + # Internally, {#swap} reads the current value, applies the block to it, and + # attempts to compare-and-set it in. Since another thread may have changed + # the value in the intervening time, it may have to retry, and does so in a + # spin loop. The net effect is that the value will always be the result of + # the application of the supplied block to a current value, atomically. + # However, because the block might be called multiple times, it must be free + # of side effects. + # + # @note The given block may be called multiple times, and thus should be free + # of side effects. + # @param args [Object] Zero or more arguments passed to the block. + # @raise [ArgumentError] When no block is given. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # @yield [value, args] Calculates a new value for the atom based on the + # current value and any supplied arguments. + # @yieldparam value [Object] The current value of the atom. + # @yieldparam args [Object] All arguments passed to the function, in order. + # @yieldreturn [Object] The intended new value of the atom. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#157 + def swap(*args); end + + # The current value of the atom. + # + # @return [Object] The current value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_value(&block); end + + # Is the new value valid? + # + # @param new_value [Object] The intended new value. + # @return [Boolean] false if the validator function returns false or raises + # an exception else true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#216 + def valid?(new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def value=(value); end +end + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#119 +class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#82 +Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean + +# Define update methods that use direct paths +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#9 +module Concurrent::AtomicDirectUpdate + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#15 + def try_update; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#24 + def try_update!; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#10 + def update; end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#136 +class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#99 +Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum + +# An atomic reference which maintains an object reference along with a mark bit +# that can be updated atomically. +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#10 +class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#15 + def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 + def compare_and_set(expected_val, new_val, expected_mark, new_mark); end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 + def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end + + # Gets the current reference and marked values. + # + # @return [Array] the current reference and marked values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#64 + def get; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 + def mark; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 + def marked?; end + + # _Unconditionally_ sets to the given value of both the reference and + # the mark. + # + # @param new_val [Object] the new value + # @param new_mark [Boolean] the new mark + # @return [Array] both the new value and the new mark + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#91 + def set(new_val, new_mark); end + + # Pass the current value to the given block, replacing it with the + # block's result. Simply return nil if update fails. + # + # the update failed + # + # @return [Array] the new value and marked state, or nil if + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#152 + def try_update; end + + # Pass the current value to the given block, replacing it + # with the block's result. Raise an exception if the update + # fails. + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails + # @return [Array] the new value and marked state + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#128 + def try_update!; end + + # Pass the current value and marked state to the given block, replacing it + # with the block's results. May retry if the value changes during the + # block's execution. + # + # @return [Array] the new value and new mark + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#105 + def update; end + + # Gets the current value of the reference + # + # @return [Object] the current value of the reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#71 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_reference(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#163 + def immutable_array(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def reference; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def reference=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_reference(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_reference(&block); end +end + +# Special "compare and set" handling of numeric values. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#7 +module Concurrent::AtomicNumericCompareAndSetWrapper + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 + def compare_and_set(old_value, new_value); end +end + +# An object reference that may be updated atomically. All read and write +# operations have java volatile semantic. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#126 +class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#18 +Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#30 +class Concurrent::CRubySet < ::Set + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#18 + def initialize(*args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def &(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def +(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def -(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <<(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <=>(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ==(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ===(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def >(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def >=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ^(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def add(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def add?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def classify(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def clear(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def collect!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def compare_by_identity(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def compare_by_identity?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def difference(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def disjoint?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def divide(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def each(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def empty?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def eql?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def filter!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten_merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def freeze(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def hash(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def include?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def inspect(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def intersect?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def intersection(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def join(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def keep_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def length(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def map!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def member?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def pretty_print(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def pretty_print_cycle(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def proper_subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def proper_superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def reject!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def replace(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def reset(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def select!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def size(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def subtract(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_a(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_s(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_set(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def union(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def |(*args); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#23 + def initialize_copy(other); end +end + +# A thread pool that dynamically grows and shrinks to fit the current workload. +# New threads are created as needed, existing threads are reused, and threads +# that remain idle for too long are killed and removed from the pool. These +# pools are particularly suited to applications that perform a high volume of +# short-lived tasks. +# +# On creation a `CachedThreadPool` has zero running threads. New threads are +# created on the pool as new operations are `#post`. The size of the pool +# will grow until `#max_length` threads are in the pool or until the number +# of threads exceeds the number of running and pending operations. When a new +# operation is post to the pool the first available idle thread will be tasked +# with the new operation. +# +# Should a thread crash for any reason the thread will immediately be removed +# from the pool. Similarly, threads which remain idle for an extended period +# of time will be killed and reclaimed. Thus these thread pools are very +# efficient at reclaiming unused resources. +# +# The API and behavior of this class are based on Java's `CachedThreadPool` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#27 +class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [CachedThreadPool] a new instance of CachedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#39 + def initialize(opts = T.unsafe(nil)); end + + private + + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#51 + def ns_initialize(opts); end +end + +# Raised when an asynchronous operation is cancelled before execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#9 +class Concurrent::CancelledOperationError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 +module Concurrent::Collection; end + +# A thread safe observer set implemented using copy-on-read approach: +# observers are added and removed from a thread safe collection; every time +# a notification is required the internal data structure is copied to +# prevent concurrency issues +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#12 +class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#14 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#20 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#55 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#39 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#47 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#62 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#86 + def duplicate_and_clear_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#94 + def duplicate_observers; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#98 + def notify_to(observers, *args); end +end + +# A thread safe observer set implemented using copy-on-write approach: +# every time an observer is added or removed the whole internal data structure is +# duplicated and replaced with a new one. +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#11 +class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#13 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#19 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#56 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#40 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#50 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#63 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#102 + def clear_observers_and_return_old; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#86 + def notify_to(observers, *args); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#94 + def observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#98 + def observers=(new_set); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 +Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 +class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend + # @return [MriMapBackend] a new instance of MriMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 + def replace_pair(key, old_value, new_value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 +class Concurrent::Collection::NonConcurrentMapBackend + # WARNING: all public methods of the class must operate on the @backend + # directly without calling each other. This is important because of the + # SynchronizedMapBackend which uses a non-reentrant mutex for performance + # reasons. + # + # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 + def [](key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 + def each_pair; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 + def get_or_default(key, default_value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 + def key?(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 + def replace_pair(key, old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 + def size; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 + def dupped_backend; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 + def pair?(key, expected_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 + def set_backend(default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 + def store_computed_value(key, new_value); end +end + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#50 +class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def <<(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def deq; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def enq(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def has_priority?(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def shift; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def size; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#10 +Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#8 +class Concurrent::Collection::RubyNonConcurrentPriorityQueue + # Create a new priority queue with no items. + # + # @option opts + # @param opts [Hash] the options for creating the queue + # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#11 + def initialize(opts = T.unsafe(nil)); end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def <<(item); end + + # Removes all of the elements from this priority queue. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#18 + def clear; end + + # Deletes all items from `self` that are equal to `item`. + # + # @param item [Object] the item to be removed from the queue + # @return [Object] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#25 + def delete(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def deq; end + + # Returns `true` if `self` contains no elements. + # + # @return [Boolean] true if there are no items in the queue else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#43 + def empty?; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def enq(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def has_priority?(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def include?(item); end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def length; end + + # Retrieves, but does not remove, the head of this queue, or returns `nil` + # if this queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#60 + def peek; end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def pop; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def push(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def shift; end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def size; end + + private + + # Are the items at the given indexes ordered based on the priority + # order specified at construction? + # + # @param x [Integer] the first index from which to retrieve a comparable value + # @param y [Integer] the second index from which to retrieve a comparable value + # @return [Boolean] true if the two elements are in the correct priority order + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#119 + def ordered?(x, y); end + + # Percolate down to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#128 + def sink(k); end + + # Exchange the values at the given indexes within the internal array. + # + # @param x [Integer] the first index to swap + # @param y [Integer] the second index to swap + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#103 + def swap(x, y); end + + # Percolate up to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#147 + def swim(k); end + + class << self + # @!macro priority_queue_method_from_list + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#89 + def from_list(list, opts = T.unsafe(nil)); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#2 +module Concurrent::Concern; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#8 +module Concurrent::Concern::Deprecation + include ::Logger::Severity + include ::Concurrent::Concern::Logging + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#12 + def deprecated(message, strip = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#27 + def deprecated_method(old_name, new_name); end +end + +# Object references in Ruby are mutable. This can lead to serious problems when +# the `#value` of a concurrent object is a mutable reference. Which is always the +# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. +# Most classes in this library that expose a `#value` getter method do so using the +# `Dereferenceable` mixin module. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#11 +module Concurrent::Concern::Dereferenceable + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 + def deref; end + + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 + def value; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#63 + def apply_deref_options(value); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#54 + def ns_set_deref_options(opts); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#48 + def set_deref_options(opts = T.unsafe(nil)); end + + # Set the internal value of this object + # + # @param value [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#31 + def value=(value); end +end + +# Include where logging is needed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#10 +module Concurrent::Concern::Logging + include ::Logger::Severity + + # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger + # + # @param level [Integer] one of Logger::Severity constants + # @param progname [String] e.g. a path of an Actor + # @param message [String, nil] when nil block is used to generate the message + # @yieldreturn [String] a message + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#18 + def log(level, progname, message = T.unsafe(nil), &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#10 +module Concurrent::Concern::Obligation + include ::Concurrent::Concern::Dereferenceable + + # Has the obligation completed processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#49 + def complete?; end + + # @example allows Obligation to be risen + # rejected_ivar = Ivar.new.fail + # raise rejected_ivar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#126 + def exception(*args); end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 + def fulfilled?; end + + # Is the obligation still awaiting completion of processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#56 + def incomplete?; end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 + def no_error!(timeout = T.unsafe(nil)); end + + # Is obligation completion still pending? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#35 + def pending?; end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 + def realized?; end + + # If an exception was raised during processing this will return the + # exception object. Will return `nil` when the state is pending or if + # the obligation has been successfully fulfilled. + # + # @return [Exception] the exception raised during processing or `nil` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#119 + def reason; end + + # Has the obligation been rejected? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#28 + def rejected?; end + + # The current state of the obligation. + # + # @return [Symbol] the current state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#110 + def state; end + + # Is the obligation still unscheduled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#42 + def unscheduled?; end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#65 + def value(timeout = T.unsafe(nil)); end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. Will re-raise any exceptions + # raised during processing (but will not raise an exception on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#98 + def value!(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout has been reached. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#74 + def wait(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 + def wait!(timeout = T.unsafe(nil)); end + + protected + + # Atomic compare and set operation + # State is set to `next_state` only if `current state == expected_current`. + # + # @param next_state [Symbol] + # @param expected_current [Symbol] + # @return [Boolean] true is state is changed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#174 + def compare_and_set_state(next_state, *expected_current); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#145 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#134 + def get_arguments_from(opts = T.unsafe(nil)); end + + # Executes the block within mutex if current state is included in expected_states + # + # @return block value if executed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#190 + def if_state(*expected_states); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#139 + def init_obligation; end + + # Am I in the current state? + # + # @param expected [Symbol] The state to check against + # @return [Boolean] true if in the expected state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#210 + def ns_check_state?(expected); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#215 + def ns_set_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#150 + def set_state(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#161 + def state=(value); end +end + +# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one +# of the most useful design patterns. +# +# The workflow is very simple: +# - an `observer` can register itself to a `subject` via a callback +# - many `observers` can be registered to the same `subject` +# - the `subject` notifies all registered observers when its status changes +# - an `observer` can deregister itself when is no more interested to receive +# event notifications +# +# In a single threaded environment the whole pattern is very easy: the +# `subject` can use a simple data structure to manage all its subscribed +# `observer`s and every `observer` can react directly to every event without +# caring about synchronization. +# +# In a multi threaded environment things are more complex. The `subject` must +# synchronize the access to its data structure and to do so currently we're +# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} +# and {Concurrent::Concern::CopyOnNotifyObserverSet}. +# +# When implementing and `observer` there's a very important rule to remember: +# **there are no guarantees about the thread that will execute the callback** +# +# Let's take this example +# ``` +# class Observer +# def initialize +# @count = 0 +# end +# +# def update +# @count += 1 +# end +# end +# +# obs = Observer.new +# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } +# # execute [obj1, obj2, obj3, obj4] +# ``` +# +# `obs` is wrong because the variable `@count` can be accessed by different +# threads at the same time, so it should be synchronized (using either a Mutex +# or an AtomicFixum) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#50 +module Concurrent::Concern::Observable + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # Default is :update + # @return [Object] the added observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#61 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Return the number of observers associated with this object. + # + # @return [Integer] the observers count + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#101 + def count_observers; end + + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param observer [Object] the observer to remove + # @return [Object] the deleted observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#82 + def delete_observer(observer); end + + # Remove all observers associated with this object. + # + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#91 + def delete_observers; end + + # As `#add_observer` but can be used for chaining. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#70 + def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + protected + + # Returns the value of attribute observers. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers; end + + # Sets the attribute observers + # + # @param value the value to set the attribute observers to. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers=(_arg0); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#70 +class Concurrent::ConcurrentUpdateError < ::ThreadError; end + +# frozen pre-allocated backtrace to speed ConcurrentUpdateError +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#72 +Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) + +# Raised when errors occur during configuration. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#6 +class Concurrent::ConfigurationError < ::Concurrent::Error; end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# @example Waiter and Decrementer +# latch = Concurrent::CountDownLatch.new(3) +# +# waiter = Thread.new do +# latch.wait() +# puts ("Waiter released") +# end +# +# decrementer = Thread.new do +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# end +# +# [waiter, decrementer].each(&:join) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#98 +class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#56 +Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch + +# A synchronization aid that allows a set of threads to all wait for each +# other to reach a common barrier point. +# +# @example +# barrier = Concurrent::CyclicBarrier.new(3) +# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } +# process = -> (i) do +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait +# end +# threads = 2.times.map do |i| +# Thread.new(i, &process) +# end +# +# # use main as well +# process.call 2 +# +# # here we can be sure that all jobs are processed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#27 +class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject + # Create a new `CyclicBarrier` that waits for `parties` threads + # + # @param parties [Fixnum] the number of parties + # @raise [ArgumentError] if `parties` is not an integer or is less than zero + # @return [CyclicBarrier] a new instance of CyclicBarrier + # @yield an optional block that will be executed that will be executed after + # the last thread arrives and before the others are released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#40 + def initialize(parties, &block); end + + # A barrier can be broken when: + # - a thread called the `reset` method while at least one other thread was waiting + # - at least one thread timed out on `wait` method + # + # A broken barrier can be restored using `reset` it's safer to create a new one + # + # @return [Boolean] true if the barrier is broken otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#105 + def broken?; end + + # @return [Fixnum] the number of threads currently waiting on the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#54 + def number_waiting; end + + # @return [Fixnum] the number of threads needed to pass the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#49 + def parties; end + + # resets the barrier to its initial state + # If there is at least one waiting thread, it will be woken up, the `wait` + # method will return false and the barrier will be broken + # If the barrier is broken, this method restores it to the original state + # + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#95 + def reset; end + + # Blocks on the barrier until the number of waiting threads is equal to + # `parties` or until `timeout` is reached or `reset` is called + # If a block has been passed to the constructor, it will be executed once by + # the last arrived thread before releasing the others + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or + # `nil` to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on + # `timeout` or on `reset` or if the barrier is broken + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#66 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#111 + def ns_generation_done(generation, status, continue = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#122 + def ns_initialize(parties, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#117 + def ns_next_generation; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 +class Concurrent::CyclicBarrier::Generation < ::Struct + # Returns the value of attribute status + # + # @return [Object] the current value of status + def status; end + + # Sets the attribute status + # + # @param value [Object] the value to set the attribute status to. + # @return [Object] the newly set value + def status=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Lazy evaluation of a block yielding an immutable result. Useful for +# expensive operations that may never be needed. It may be non-blocking, +# supports the `Concern::Obligation` interface, and accepts the injection of +# custom executor upon which to execute the block. Processing of +# block will be deferred until the first time `#value` is called. +# At that time the caller can choose to return immediately and let +# the block execute asynchronously, block indefinitely, or block +# with a timeout. +# +# When a `Delay` is created its state is set to `pending`. The value and +# reason are both `nil`. The first time the `#value` method is called the +# enclosed opration will be run and the calling thread will block. Other +# threads attempting to call `#value` will block as well. Once the operation +# is complete the *value* will be set to the result of the operation or the +# *reason* will be set to the raised exception, as appropriate. All threads +# blocked on `#value` will return. Subsequent calls to `#value` will immediately +# return the cached value. The operation will only be run once. This means that +# any side effects created by the operation will only happen once as well. +# +# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread +# safety of the reference returned by `#value`. +# +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# @see Concurrent::Concern::Dereferenceable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#44 +class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + + # Create a new `Delay` in the `:pending` state. + # + # @raise [ArgumentError] if no block is given + # @return [Delay] a new instance of Delay + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#62 + def initialize(opts = T.unsafe(nil), &block); end + + # Reconfigures the block returning the value if still `#incomplete?` + # + # @return [true, false] if success + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#146 + def reconfigure(&block); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception this method will return nil. The exception object + # can be accessed via the `#reason` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#77 + def value(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception, this method will raise that exception (even when) + # the operation has already been executed). + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @raise [Exception] when `#rejected?` raises `#reason` + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#113 + def value!(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Integer] (nil) the maximum number of seconds to wait for + # the value to be computed. When `nil` the caller will block indefinitely. + # @return [Object] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#132 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#160 + def ns_initialize(opts, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#173 + def execute_task_once; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#7 +class Concurrent::DependencyCounter + # @return [DependencyCounter] a new instance of DependencyCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#9 + def initialize(count, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#14 + def update(time, value, reason); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#3 +class Concurrent::Error < ::StandardError; end + +# Old school kernel-style event reminiscent of Win32 programming in C++. +# +# When an `Event` is created it is in the `unset` state. Threads can choose to +# `#wait` on the event, blocking until released by another thread. When one +# thread wants to alert all blocking threads it calls the `#set` method which +# will then wake up all listeners. Once an `Event` has been set it remains set. +# New threads calling `#wait` will return immediately. An `Event` may be +# `#reset` at any time once it has been set. +# +# @example +# event = Concurrent::Event.new +# +# t1 = Thread.new do +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" +# end +# +# t2 = Thread.new do +# puts "t2 calling set" +# event.set +# end +# +# [t1, t2].each(&:join) +# +# # prints: +# # t1 is waiting +# # t2 calling set +# # event occurred +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#36 +class Concurrent::Event < ::Concurrent::Synchronization::LockableObject + # Creates a new `Event` in the unset state. Threads calling `#wait` on the + # `Event` will block. + # + # @return [Event] a new instance of Event + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#40 + def initialize; end + + # Reset a previously set event back to the `unset` state. + # Has no effect if the `Event` has not yet been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#68 + def reset; end + + # Trigger the event, setting the state to `set` and releasing all threads + # waiting on the event. Has no effect if the `Event` has already been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#56 + def set; end + + # Is the object in the set state? + # + # @return [Boolean] indicating whether or not the `Event` has been set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#48 + def set?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#60 + def try?; end + + # Wait a given number of seconds for the `Event` to be set by another + # thread. Will wait forever when no `timeout` value is given. Returns + # immediately if the `Event` has already been set. + # + # @return [Boolean] true if the `Event` was set before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#83 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#104 + def ns_initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#96 + def ns_set; end +end + +# A synchronization point at which threads can pair and swap elements within +# pairs. Each thread presents some object on entry to the exchange method, +# matches with a partner thread, and receives its partner's object on return. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# This implementation is very simple, using only a single slot for each +# exchanger (unlike more advanced implementations which use an "arena"). +# This approach will work perfectly fine when there are only a few threads +# accessing a single `Exchanger`. Beyond a handful of threads the performance +# will degrade rapidly due to contention on the single slot, but the algorithm +# will remain correct. +# +# @example +# +# exchanger = Concurrent::Exchanger.new +# +# threads = [ +# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" +# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" +# ] +# threads.each {|t| t.join(2) } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#336 +class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#327 +Concurrent::ExchangerImplementation = Concurrent::RubyExchanger + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#157 +module Concurrent::ExecutorService + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Does the task queue have a maximum size? + # + # @note Always returns `false` + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#174 + def can_overflow?; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#161 + def post(*args, &task); end + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `false` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#181 + def serialized?; end +end + +# A `FiberLocalVar` is a variable where the value is different for each fiber. +# Each variable may have a default value, but when you modify the variable only +# the current fiber will ever see that change. +# +# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), +# but with these major advantages: +# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), +# so it's only OK to create a small amount of them. +# `FiberLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). +# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. +# +# @example +# v = FiberLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = FiberLocalVar.new(14) +# +# Fiber.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end.resume +# +# Fiber.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end.resume +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#41 +class Concurrent::FiberLocalVar + # Creates a fiber local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each fiber + # @return [FiberLocalVar] a new instance of FiberLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#49 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to fiber local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#86 + def bind(value); end + + # Returns the value in the current fiber's copy of this fiber-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#68 + def value; end + + # Sets the current fiber's copy of this fiber-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#76 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#101 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#42 +Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) + +# An array-backed storage of indexed variables per fiber. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#166 +class Concurrent::FiberLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#167 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#171 + def locals!; end +end + +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. +# +# The API and behavior of this class are based on Java's `FixedThreadPool` +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#201 +class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param num_threads [Integer] the number of threads to allocate + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [FixedThreadPool] a new instance of FixedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#215 + def initialize(num_threads, opts = T.unsafe(nil)); end +end + +# {include:file:docs-source/future.md} +# +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module +# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#21 +class Concurrent::Future < ::Concurrent::IVar + # Create a new `Future` in the `:unscheduled` state. + # + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] a new instance of Future + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#33 + def initialize(opts = T.unsafe(nil), &block); end + + # Attempt to cancel the operation if it has not already processed. + # The operation can only be cancelled while still `pending`. It cannot + # be cancelled once it has begun processing or has completed. + # + # @return [Boolean] was the operation successfully cancelled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#99 + def cancel; end + + # Has the operation been successfully cancelled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#111 + def cancelled?; end + + # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Future` is in any state other than `:unscheduled`. + # + # @example Instance and execute in separate steps + # future = Concurrent::Future.new{ sleep(1); 42 } + # future.state #=> :unscheduled + # future.execute + # future.state #=> :pending + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending + # @return [Future] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#53 + def execute; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#82 + def set(value = T.unsafe(nil), &block); end + + # Wait the given number of seconds for the operation to complete. + # On timeout attempt to cancel the operation. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Boolean] true if the operation completed before the timeout + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#121 + def wait_or_cancel(timeout); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#133 + def ns_initialize(value, opts); end + + class << self + # Create a new `Future` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # future = Concurrent::Future.execute{ sleep(1); 42 } + # future.state #=> :pending + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] the newly created `Future` in the `:pending` state + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#77 + def execute(opts = T.unsafe(nil), &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#18 +Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#30 +Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#22 +Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#106 +Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#26 +Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) + +# A thread-safe subclass of Hash. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`, +# which takes the lock repeatedly when reading an item. +# +# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#49 +class Concurrent::Hash < ::Hash; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 +Concurrent::HashImplementation = Hash + +# An `IVar` is like a future that you can assign. As a future is a value that +# is being computed that you can wait on, an `IVar` is a value that is waiting +# to be assigned, that you can wait on. `IVars` are single assignment and +# deterministic. +# +# Then, express futures as an asynchronous computation that assigns an `IVar`. +# The `IVar` becomes the primitive on which [futures](Future) and +# [dataflow](Dataflow) are built. +# +# An `IVar` is a single-element container that is normally created empty, and +# can only be set once. The I in `IVar` stands for immutable. Reading an +# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` +# from different threads. +# +# If you want to have some parallel task set the value in an `IVar`, you want +# a `Future`. If you want to create a graph of parallel tasks all executed +# when the values they depend on are ready you want `dataflow`. `IVar` is +# generally a low-level primitive. +# +# ## Examples +# +# Create, set and get an `IVar` +# +# ```ruby +# ivar = Concurrent::IVar.new +# ivar.set 14 +# ivar.value #=> 14 +# ivar.set 2 # would now be an error +# ``` +# +# ## See Also +# +# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. +# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). +# In Proceedings of Workshop on Graph Reduction, 1986. +# 2. For recent application: +# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#48 +class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + include ::Concurrent::Concern::Observable + + # Create a new `IVar` in the `:pending` state with the (optional) initial value. + # + # @option opts + # @option opts + # @option opts + # @param value [Object] the initial value + # @param opts [Hash] the options to create a message with + # @return [IVar] a new instance of IVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#62 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # Add an observer on this object that will receive notification on update. + # + # Upon completion the `IVar` will notify all observers in a thread-safe way. + # The `func` method of the observer will be called with three arguments: the + # `Time` at which the `Future` completed the asynchronous operation, the + # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on + # fulfillment). + # + # @param observer [Object] the object that will be notified of changes + # @param func [Symbol] symbol naming the method to call when this + # `Observable` has changes` + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#81 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # Attempt to set the `IVar` with the given value or block. Return a + # boolean indicating the success or failure of the set operation. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [Boolean] true if the value was set else false + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#202 + def check_for_block_or_value!(block_given, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#177 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#184 + def complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#190 + def notify_observers(value, reason); end + + # @raise [MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#195 + def ns_complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#155 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#168 + def safe_execute(task, args = T.unsafe(nil)); end +end + +# Raised when an operation is attempted which is not legal given the +# receiver's current state +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#20 +class Concurrent::IllegalOperationError < ::Concurrent::Error; end + +# An executor service which runs all operations on the current thread, +# blocking as necessary. Operations are performed in the order they are +# received and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used +# it immediately runs every `#post` operation on the current thread, blocking +# that thread until the operation is complete. This can be very beneficial +# during testing because it makes all operations deterministic. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#17 +class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService + include ::Concurrent::SerialExecutorService + + # Creates a new executor + # + # @return [ImmediateExecutor] a new instance of ImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#34 + def <<(task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#26 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#40 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#50 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#45 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#62 + def wait_for_termination(timeout = T.unsafe(nil)); end +end + +# Raised when an attempt is made to violate an immutability guarantee. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#16 +class Concurrent::ImmutabilityError < ::Concurrent::Error; end + +# A thread-safe, immutable variation of Ruby's standard `Struct`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#9 +module Concurrent::ImmutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#51 + def ==(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#46 + def [](member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#56 + def each(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#62 + def each_pair(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#36 + def merge(other, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#68 + def select(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 + def to_a; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#41 + def to_h; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 + def values; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#76 + def initialize_copy(original); end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#12 + def included(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#82 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#92 +Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service which runs all operations on a new thread, blocking +# until it completes. Operations are performed in the order they are received +# and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used it +# immediately runs every `#post` operation on a new thread, blocking the +# current thread until the operation is complete. This is similar to how the +# ImmediateExecutor works, but the operation has the full stack of the new +# thread at its disposal. This can be helpful when the operations will spawn +# more operations on the same executor and so on - such a situation might +# overflow the single stack in case of an ImmediateExecutor, which is +# inconsistent with how it would behave for a threaded executor. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#19 +class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor + # Creates a new executor + # + # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#27 + def post(*args, &task); end +end + +# Raised when an object's methods are called when it has not been +# properly initialized. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#24 +class Concurrent::InitializationError < ::Concurrent::Error; end + +# Raised when a lifecycle method (such as `stop`) is called in an improper +# sequence or when the object is in an inappropriate state. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#13 +class Concurrent::LifecycleError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#6 +class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object + include ::Enumerable + extend ::Concurrent::Synchronization::SafeInitialization + + # @param head [Node] + # @return [LockFreeStack] a new instance of LockFreeStack + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#51 + def initialize(head = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#118 + def clear; end + + # @return [self] + # @yield over the cleared stack + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#142 + def clear_each(&block); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#128 + def clear_if(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#99 + def compare_and_clear(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#85 + def compare_and_pop(head); end + + # @param head [Node] + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#65 + def compare_and_push(head, value); end + + # @param head [Node] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#107 + def each(head = T.unsafe(nil)); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#58 + def empty?(head = T.unsafe(nil)); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 + def inspect; end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#79 + def peek; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#90 + def pop; end + + # @param value [Object] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#71 + def push(value); end + + # @param head [Node] + # @param new_head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#135 + def replace_if(head, new_head); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 + def to_s; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_head(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def head; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def head=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_head(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_head(&block); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#41 + def of1(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#46 + def of2(value1, value2); end + end +end + +# The singleton for empty node +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#32 +Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#10 +class Concurrent::LockFreeStack::Node + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#23 + def initialize(value, next_node); end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#14 + def next_node; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#17 + def value; end + + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#21 + def value=(_arg0); end + + class << self + def [](*_arg0); end + end +end + +# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) +# are held, respectively, per Fiber or per Thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#21 +Concurrent::LockLocalVar = Concurrent::FiberLocalVar + +# An `MVar` is a synchronized single element container. They are empty or +# contain one item. Taking a value from an empty `MVar` blocks, as does +# putting a value into a full one. You can either think of them as blocking +# queue of length one, or a special kind of mutable variable. +# +# On top of the fundamental `#put` and `#take` operations, we also provide a +# `#mutate` that is atomic with respect to operations on the same instance. +# These operations all support timeouts. +# +# We also support non-blocking operations `#try_put!` and `#try_take!`, a +# `#set!` that ignores existing values, a `#value` that returns the value +# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields +# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. +# You shouldn't use these operations in the first instance. +# +# `MVar` is a [Dereferenceable](Dereferenceable). +# +# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. +# +# Note that unlike the original Haskell paper, our `#take` is blocking. This is how +# Haskell and Scala do it today. +# +# ## See Also +# +# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th +# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. +# +# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). +# In Proceedings of the 23rd Symposium on Principles of Programming Languages +# (PoPL), 1996. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#38 +class Concurrent::MVar < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Dereferenceable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `MVar`, either empty or with an initial value. + # + # @param opts [Hash] the options controlling how the future will be processed + # @return [MVar] a new instance of MVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#54 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end + + # acquires lock on the from an `MVAR`, yields the value to provided block, + # and release lock. A timeout can be set to limit the time spent blocked, + # in which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value returned by the block, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#86 + def borrow(timeout = T.unsafe(nil)); end + + # Returns if the `MVar` is currently empty. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#195 + def empty?; end + + # Returns if the `MVar` currently contains a value. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#200 + def full?; end + + # Atomically `take`, yield the value to a block for transformation, and then + # `put` the transformed value. Returns the transformed value. A timeout can + # be set to limit the time spent blocked, in which case it returns `TIMEOUT` + # if the time is exceeded. + # + # @raise [ArgumentError] + # @return [Object] the transformed value, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#123 + def modify(timeout = T.unsafe(nil)); end + + # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. + # + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#179 + def modify!; end + + # Put a value into an `MVar`, blocking if there is already a value until + # it is empty. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was put, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#103 + def put(value, timeout = T.unsafe(nil)); end + + # Non-blocking version of `put` that will overwrite an existing value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#169 + def set!(value); end + + # Remove the value from an `MVar`, leaving it empty, and blocking if there + # isn't a value. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was taken, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#66 + def take(timeout = T.unsafe(nil)); end + + # Non-blocking version of `put`, that returns whether or not it was successful. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#156 + def try_put!(value); end + + # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#142 + def try_take!; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#206 + def synchronize(&block); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#212 + def unlocked_empty?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#216 + def unlocked_full?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#224 + def wait_for_empty(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#220 + def wait_for_full(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#228 + def wait_while(condition, timeout); end +end + +# Unique value that represents that an `MVar` was empty +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#43 +Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) + +# Unique value that represents that an `MVar` timed out before it was able +# to produce a value. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#47 +Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) + +# `Concurrent::Map` is a hash-like object and should have much better performance +# characteristics, especially under high concurrency, than `Concurrent::Hash`. +# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` +# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` +# does. For most uses it should do fine though, and we recommend you consider +# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 +class Concurrent::Map < ::Concurrent::Collection::MriMapBackend + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 + def each; end + + # Iterates over each key. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key in the map + # @yieldparam key [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 + def each_key; end + + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 + def each_pair; end + + # Iterates over each value. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each value in the map + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 + def each_value; end + + # Is map empty? + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 + def empty?; end + + # Get a value with key, or default_value when key is absent, + # or fail when no default_value is given. + # + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. + # @param key [Object] + # @param default_value [Object] + # @raise [KeyError] when key is missing and no default_value is provided + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 + def fetch(key, default_value = T.unsafe(nil)); end + + # Fetch value with key, or store default value when key is absent, + # or fail when no default_value is given. This is a two step operation, + # therefore not atomic. The store can overwrite other concurrently + # stored value. + # + # @param key [Object] + # @param default_value [Object] + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 + def fetch_or_store(key, default_value = T.unsafe(nil)); end + + # Get a value with key + # + # @param key [Object] + # @return [Object] the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 + def get(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 + def inspect; end + + # Find key of a value. + # + # @param value [Object] + # @return [Object, nil] key or nil when not found + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 + def key(value); end + + # All keys + # + # @return [::Array] keys + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 + def keys; end + + # @raise [TypeError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 + def marshal_dump; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 + def marshal_load(hash); end + + # Set a value with key + # + # @param key [Object] + # @param value [Object] + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 + def put(key, value); end + + # Insert value into map with key if key is absent in one atomic step. + # + # @param key [Object] + # @param value [Object] + # @return [Object, nil] the previous value when key was present or nil when there was no key + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 + def put_if_absent(key, value); end + + # Is the value stored in the map. Iterates over all values. + # + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 + def value?(value); end + + # All values + # + # @return [::Array] values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 + def values; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 + def initialize_copy(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 + def populate_from(hash); end + + # @raise [KeyError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 + def raise_fetch_no_key; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 + def validate_options_hash!(options); end +end + +# Raised when an object with a start/stop lifecycle has been started an +# excessive number of times. Often used in conjunction with a restart +# policy or strategy. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#29 +class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end + +# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value +# of (represented as `Just`), or it is empty (represented as `Nothing`). Using +# `Maybe` is a good way to deal with errors or exceptional cases without +# resorting to drastic measures such as exceptions. +# +# `Maybe` is a replacement for the use of `nil` with better type checking. +# +# For compatibility with {Concurrent::Concern::Obligation} the predicate and +# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and +# `reason`. +# +# ## Motivation +# +# A common pattern in languages with pattern matching, such as Erlang and +# Haskell, is to return *either* a value *or* an error from a function +# Consider this Erlang code: +# +# ```erlang +# case file:consult("data.dat") of +# {ok, Terms} -> do_something_useful(Terms); +# {error, Reason} -> lager:error(Reason) +# end. +# ``` +# +# In this example the standard library function `file:consult` returns a +# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) +# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) +# (similar to a ruby symbol) and a variable containing ancillary data. On +# success it returns the atom `ok` and the data from the file. On failure it +# returns `error` and a string with an explanation of the problem. With this +# pattern there is no ambiguity regarding success or failure. If the file is +# empty the return value cannot be misinterpreted as an error. And when an +# error occurs the return value provides useful information. +# +# In Ruby we tend to return `nil` when an error occurs or else we raise an +# exception. Both of these idioms are problematic. Returning `nil` is +# ambiguous because `nil` may also be a valid value. It also lacks +# information pertaining to the nature of the error. Raising an exception +# is both expensive and usurps the normal flow of control. All of these +# problems can be solved with the use of a `Maybe`. +# +# A `Maybe` is unambiguous with regard to whether or not it contains a value. +# When `Just` it contains a value, when `Nothing` it does not. When `Just` +# the value it contains may be `nil`, which is perfectly valid. When +# `Nothing` the reason for the lack of a value is contained as well. The +# previous Erlang example can be duplicated in Ruby in a principled way by +# having functions return `Maybe` objects: +# +# ```ruby +# result = MyFileUtils.consult("data.dat") # returns a Maybe +# if result.just? +# do_something_useful(result.value) # or result.just +# else +# logger.error(result.reason) # or result.nothing +# end +# ``` +# +# @example Returning a Maybe from a Function +# module MyFileUtils +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end +# end +# +# maybe = MyFileUtils.consult('bogus.file') +# maybe.just? #=> false +# maybe.nothing? #=> true +# maybe.reason #=> # +# +# maybe = MyFileUtils.consult('README.md') +# maybe.just? #=> true +# maybe.nothing? #=> false +# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# @example Using Maybe with a Block +# result = Concurrent::Maybe.from do +# Client.find(10) # Client is an ActiveRecord model +# end +# +# # -- if the record was found +# result.just? #=> true +# result.value #=> # +# +# # -- if the record was not found +# result.just? #=> false +# result.reason #=> ActiveRecord::RecordNotFound +# @example Using Maybe with the Null Object Pattern +# # In a Rails controller... +# result = ClientService.new(10).find # returns a Maybe +# render json: result.or(NullClient.new) +# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#104 +class Concurrent::Maybe < ::Concurrent::Synchronization::Object + include ::Comparable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `Maybe` with the given attributes. + # + # @param just [Object] The value when `Just` else `NONE`. + # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. + # @return [Maybe] The new `Maybe`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#224 + def initialize(just, nothing); end + + # Comparison operator. + # + # @return [Integer] 0 if self and other are both `Nothing`; + # -1 if self is `Nothing` and other is `Just`; + # 1 if self is `Just` and other is nothing; + # `self.just <=> other.just` if both self and other are `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#199 + def <=>(other); end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 + def fulfilled?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 + def just; end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 + def just?; end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 + def nothing; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 + def nothing?; end + + # Return either the value of self or the given default value. + # + # @return [Object] The value of self when `Just`; else the given default. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#210 + def or(other); end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 + def reason; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 + def rejected?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 + def value; end + + class << self + # Create a new `Maybe` using the given block. + # + # Runs the given block passing all function arguments to the block as block + # arguments. If the block runs to completion without raising an exception + # a new `Just` is created with the value set to the return value of the + # block. If the block raises an exception a new `Nothing` is created with + # the reason being set to the raised exception. + # + # @param args [Array] Zero or more arguments to pass to the block. + # @raise [ArgumentError] when no block given. + # @return [Maybe] The newly created object. + # @yield The block from which to create a new `Maybe`. + # @yieldparam args [Array] Zero or more block arguments passed as + # arguments to the function. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#137 + def from(*args); end + + # Create a new `Just` with the given value. + # + # @param value [Object] The value to set for the new `Maybe` object. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#152 + def just(value); end + + # Create a new `Nothing` with the given (optional) reason. + # + # @param error [Exception] The reason to set for the new `Maybe` object. + # When given a string a new `StandardError` will be created with the + # argument as the message. When no argument is given a new + # `StandardError` with an empty message will be created. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#164 + def nothing(error = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# Indicates that the given attribute has not been set. +# When `Just` the {#nothing} getter will return `NONE`. +# When `Nothing` the {#just} getter will return `NONE`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#111 +Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) + +# Raised when an attempt is made to modify an immutable object +# (such as an `IVar`) after its final state has been set. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#33 +class Concurrent::MultipleAssignmentError < ::Concurrent::Error + # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#36 + def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#41 + def inspect; end + + # Returns the value of attribute inspection_data. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#34 + def inspection_data; end +end + +# Aggregates multiple exceptions. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#58 +class Concurrent::MultipleErrors < ::Concurrent::Error + # @return [MultipleErrors] a new instance of MultipleErrors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#61 + def initialize(errors, message = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#59 + def errors; end +end + +# An thread-safe variation of Ruby's standard `Struct`. Values can be set at +# construction or safely changed at any time during the object's lifecycle. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#10 +module Concurrent::MutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#128 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#118 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#185 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#139 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#152 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#94 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#167 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#103 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#63 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#202 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#210 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#220 +Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#8 +class Concurrent::MutexAtomicBoolean + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicBoolean` with the given initial value. + # + # @param initial [Boolean] the initial value + # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#12 + def initialize(initial = T.unsafe(nil)); end + + # Is the current value `false` + # + # @return [Boolean] true if the current value is `false`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#34 + def false?; end + + # Explicitly sets the value to false. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#44 + def make_false; end + + # Explicitly sets the value to true. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#39 + def make_true; end + + # Is the current value `true` + # + # @return [Boolean] true if the current value is `true`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#29 + def true?; end + + # Retrieves the current `Boolean` value. + # + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#19 + def value; end + + # Explicitly sets the value. + # + # @param value [Boolean] the new value to be set + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#24 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#51 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#62 + def ns_make_value(value); end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#9 +class Concurrent::MutexAtomicFixnum + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicFixnum` with the given initial value. + # + # @param initial [Fixnum] the initial value + # @raise [ArgumentError] if the initial value is not a `Fixnum` + # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#13 + def initialize(initial = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if the current + # value == the expected value. + # + # @param expect [Fixnum] the expected value + # @param update [Fixnum] the new value + # @return [Boolean] true if the value was updated else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#44 + def compare_and_set(expect, update); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 + def decrement(delta = T.unsafe(nil)); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 + def down(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 + def increment(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 + def up(delta = T.unsafe(nil)); end + + # Pass the current value to the given block, replacing it + # with the block's result. May retry if the value changes + # during the block's execution. + # + # @return [Object] the new value + # @yield [Object] Calculate a new value for the atomic reference using + # given (old) value + # @yieldparam old_value [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#56 + def update; end + + # Retrieves the current `Fixnum` value. + # + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#20 + def value; end + + # Explicitly sets the value. + # + # @param value [Fixnum] the new value to be set + # @raise [ArgumentError] if the new value is not a `Fixnum` + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#25 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#65 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#76 + def ns_set(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#9 +class Concurrent::MutexAtomicReference + include ::Concurrent::AtomicDirectUpdate + include ::Concurrent::AtomicNumericCompareAndSetWrapper + extend ::Concurrent::Synchronization::SafeInitialization + + # @param value [Object] The initial value. + # @return [MutexAtomicReference] a new instance of MutexAtomicReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#16 + def initialize(value = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#45 + def _compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 + def compare_and_swap(old_value, new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 + def get; end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 + def get_and_set(new_value); end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 + def set(new_value); end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 + def swap(new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 + def value; end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 + def value=(new_value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#59 + def synchronize; end +end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#9 +class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject + # Create a new `CountDownLatch` with the initial `count`. + # + # @param count [new] the initial count + # @raise [ArgumentError] if `count` is not an integer or is less than zero + # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#12 + def initialize(count = T.unsafe(nil)); end + + # The current value of the counter. + # + # @return [Fixnum] the current value of the counter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#34 + def count; end + + # Signal the latch to decrement the counter. Will signal all blocked threads when + # the `count` reaches zero. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#26 + def count_down; end + + # Block on the latch until the counter reaches zero or until `timeout` is reached. + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` + # to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#21 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#40 + def ns_initialize(count); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#9 +class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject + # @return [MutexSemaphore] a new instance of MutexSemaphore + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#12 + def initialize(count); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#20 + def acquire(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#38 + def available_permits; end + + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#47 + def drain_permits; end + + # Shrinks the number of available permits by the indicated reduction. + # + # @param reduction [Fixnum] Number of permits to remove. + # @raise [ArgumentError] if `reduction` is not an integer or is negative + # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#99 + def reduce_permits(reduction); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#77 + def release(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#54 + def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#110 + def ns_initialize(count); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#117 + def try_acquire_now(permits); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#127 + def try_acquire_timed(permits, timeout); end +end + +# Various classes within allows for +nil+ values to be stored, +# so a special +NULL+ token is required to indicate the "nil-ness". +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 +Concurrent::NULL = T.let(T.unsafe(nil), Object) + +# Suppresses all output when used for logging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#103 +Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#6 +module Concurrent::Options + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#27 + def executor(executor_identifier); end + + # Get the requested `Executor` based on the values set in the options hash. + # + # @option opts + # @param opts [Hash] the options defining the requested executor + # @return [Executor, nil] the requested thread pool, or nil when no option specified + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#19 + def executor_from_options(opts = T.unsafe(nil)); end + end +end + +# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) +# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. +# +# > A promise represents the eventual value returned from the single +# > completion of an operation. +# +# Promises are similar to futures and share many of the same behaviours. +# Promises are far more robust, however. Promises can be chained in a tree +# structure where each promise may have zero or more children. Promises are +# chained using the `then` method. The result of a call to `then` is always +# another promise. Promises are resolved asynchronously (with respect to the +# main thread) but in a strict order: parents are guaranteed to be resolved +# before their children, children before their younger siblings. The `then` +# method takes two parameters: an optional block to be executed upon parent +# resolution and an optional callable to be executed upon parent failure. The +# result of each promise is passed to each of its children upon resolution. +# When a promise is rejected all its children will be summarily rejected and +# will receive the reason. +# +# Promises have several possible states: *:unscheduled*, *:pending*, +# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as +# `#incomplete?` and `#complete?`. When a Promise is created it is set to +# *:unscheduled*. Once the `#execute` method is called the state becomes +# *:pending*. Once a job is pulled from the thread pool's queue and is given +# to a thread for processing (often immediately upon `#post`) the state +# becomes *:processing*. The future will remain in this state until processing +# is complete. A future that is in the *:unscheduled*, *:pending*, or +# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either +# *:rejected*, indicating that an exception was thrown during processing, or +# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` +# will be updated to reflect the result of the operation. If *:rejected* the +# `reason` will be updated with a reference to the thrown exception. The +# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and +# `#fulfilled?` can be called at any time to obtain the state of the Promise, +# as can the `#state` method, which returns a symbol. +# +# Retrieving the value of a promise is done through the `value` (alias: +# `deref`) method. Obtaining the value of a promise is a potentially blocking +# operation. When a promise is *rejected* a call to `value` will return `nil` +# immediately. When a promise is *fulfilled* a call to `value` will +# immediately return the current value. When a promise is *pending* a call to +# `value` will block until the promise is either *rejected* or *fulfilled*. A +# *timeout* value can be passed to `value` to limit how long the call will +# block. If `nil` the call will block indefinitely. If `0` the call will not +# block. Any other integer or float value will indicate the maximum number of +# seconds to block. +# +# Promises run on the global thread pool. +# +# ### Examples +# +# Start by requiring promises +# +# ```ruby +# require 'concurrent/promise' +# ``` +# +# Then create one +# +# ```ruby +# p = Concurrent::Promise.execute do +# # do something +# 42 +# end +# ``` +# +# Promises can be chained using the `then` method. The `then` method accepts a +# block and an executor, to be executed on fulfillment, and a callable argument to be executed +# on rejection. The result of the each promise is passed as the block argument +# to chained promises. +# +# ```ruby +# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute +# ``` +# +# And so on, and so on, and so on... +# +# ```ruby +# p = Concurrent::Promise.fulfill(20). +# then{|result| result - 10 }. +# then{|result| result * 3 }. +# then(executor: different_executor){|result| result % 5 }.execute +# ``` +# +# The initial state of a newly created Promise depends on the state of its parent: +# - if parent is *unscheduled* the child will be *unscheduled* +# - if parent is *pending* the child will be *pending* +# - if parent is *fulfilled* the child will be *pending* +# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) +# +# Promises are executed asynchronously from the main thread. By the time a +# child Promise finishes intialization it may be in a different state than its +# parent (by the time a child is created its parent may have completed +# execution and changed state). Despite being asynchronous, however, the order +# of execution of Promise objects in a chain (or tree) is strictly defined. +# +# There are multiple ways to create and execute a new `Promise`. Both ways +# provide identical behavior: +# +# ```ruby +# # create, operate, then execute +# p1 = Concurrent::Promise.new{ "Hello World!" } +# p1.state #=> :unscheduled +# p1.execute +# +# # create and immediately execute +# p2 = Concurrent::Promise.new{ "Hello World!" }.execute +# +# # execute during creation +# p3 = Concurrent::Promise.execute{ "Hello World!" } +# ``` +# +# Once the `execute` method is called a `Promise` becomes `pending`: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# p.state #=> :pending +# p.pending? #=> true +# ``` +# +# Wait a little bit, and the promise will resolve and provide a value: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# sleep(0.1) +# +# p.state #=> :fulfilled +# p.fulfilled? #=> true +# p.value #=> "Hello, world!" +# ``` +# +# If an exception occurs, the promise will be rejected and will provide +# a reason for the rejection: +# +# ```ruby +# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } +# sleep(0.1) +# +# p.state #=> :rejected +# p.rejected? #=> true +# p.reason #=> "#" +# ``` +# +# #### Rejection +# +# When a promise is rejected all its children will be rejected and will +# receive the rejection `reason` as the rejection callable parameter: +# +# ```ruby +# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } +# +# c1 = p.then(-> reason { 42 }) +# c2 = p.then(-> reason { raise 'Boom!' }) +# +# c1.wait.state #=> :fulfilled +# c1.value #=> 45 +# c2.wait.state #=> :rejected +# c2.reason #=> # +# ``` +# +# Once a promise is rejected it will continue to accept children that will +# receive immediately rejection (they will be executed asynchronously). +# +# #### Aliases +# +# The `then` method is the most generic alias: it accepts a block to be +# executed upon parent fulfillment and a callable to be executed upon parent +# rejection. At least one of them should be passed. The default block is `{ +# |result| result }` that fulfills the child with the parent value. The +# default callable is `{ |reason| raise reason }` that rejects the child with +# the parent reason. +# +# - `on_success { |result| ... }` is the same as `then {|result| ... }` +# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` +# - `rescue` is aliased by `catch` and `on_error` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#190 +class Concurrent::Promise < ::Concurrent::IVar + # Initialize a new Promise with the provided options. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] a new instance of Promise + # @see http://wiki.commonjs.org/wiki/Promises/A + # @see http://promises-aplus.github.io/promises-spec/ + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#210 + def initialize(opts = T.unsafe(nil), &block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def catch(&block); end + + # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Promise` is in any state other than `:unscheduled`. + # + # @return [Promise] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#246 + def execute; end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#278 + def fail(reason = T.unsafe(nil)); end + + # Yield the successful result to the block that returns a promise. If that + # promise is also successful the result is the result of the yielded promise. + # If either part fails the whole also fails. + # + # @example + # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#375 + def flat_map(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def on_error(&block); end + + # Chain onto this promise an action to be undertaken on success + # (fulfillment). + # + # @raise [ArgumentError] + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#349 + def on_success(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def rescue(&block); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#262 + def set(value = T.unsafe(nil), &block); end + + # Chain a new promise off the current promise. + # + # @overload then + # @overload then + # @raise [ArgumentError] + # @return [Promise] the new promise + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#314 + def then(*args, &block); end + + # Builds a promise that produces the result of self and others in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#440 + def zip(*others); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#551 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#545 + def notify_child(child); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#481 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#533 + def on_fulfill(result); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#539 + def on_reject(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#562 + def realize(task); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#528 + def root?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#520 + def set_pending; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#570 + def set_state!(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#576 + def synchronized_set_state!(success, value, reason); end + + class << self + # Aggregate a collection of zero or more promises under a composite promise, + # execute the aggregated promises and collect them into a standard Ruby array, + # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, + # or `one?`) on the collection checking for the success or failure of each, + # then executing the composite's `#then` handlers if the predicate returns + # `true` or executing the composite's `#rescue` handlers if the predicate + # returns false. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#505 + def aggregate(method, *promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if all aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#464 + def all?(*promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if any aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#475 + def any?(*promises); end + + # Create a new `Promise` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # promise = Concurrent::Promise.execute{ sleep(1); 42 } + # promise.state #=> :pending + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#296 + def execute(opts = T.unsafe(nil), &block); end + + # Create a new `Promise` and fulfill it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#224 + def fulfill(value, opts = T.unsafe(nil)); end + + # Create a new `Promise` and reject it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#237 + def reject(reason, opts = T.unsafe(nil)); end + + # Builds a promise that produces the result of promises in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#409 + def zip(*promises); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#11 +class Concurrent::PromiseExecutionError < ::StandardError; end + +# {include:file:docs-source/promises-main.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#13 +module Concurrent::Promises + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2047 +class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end + +# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#513 +class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractEventFuture] a new instance of AbstractEventFuture + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#522 + def initialize(promise, default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#738 + def add_callback_clear_delayed_node(node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#733 + def add_callback_notify_blocked(promise, index); end + + # For inspection. + # + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#702 + def blocks; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#710 + def callbacks; end + + # Shortcut of {#chain_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #chain_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 + def chain(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.chain_on + # @overload a_future.chain_on + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [Future] + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#614 + def chain_on(executor, *args, &task); end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 + def chain_resolvable(resolvable); end + + # Returns default executor. + # + # @return [Executor] default executor + # @see #with_default_executor + # @see FactoryMethods#future_on + # @see FactoryMethods#resolvable_future + # @see FactoryMethods#any_fulfilled_future_on + # @see similar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#590 + def default_executor; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def internal_state; end + + # Shortcut of {#on_resolution_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_resolution_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#637 + def on_resolution(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # resolved. + # + # @overload an_event.on_resolution! + # @overload a_future.on_resolution! + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#655 + def on_resolution!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.on_resolution_using + # @overload a_future.on_resolution_using + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#673 + def on_resolution_using(executor, *args, &callback); end + + # Is it in pending state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#549 + def pending?; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#716 + def promise; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#688 + def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Is it in resolved state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#555 + def resolved?; end + + # Returns its state. + # + # @overload an_event.state + # @overload a_future.state + # @return [Symbol] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#543 + def state; end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 + def tangle(resolvable); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 + def to_s; end + + # Propagates touch. Requests all the delayed futures, which it depends on, to be + # executed. This method is called by any other method requiring resolved state, like {#wait}. + # + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#562 + def touch; end + + # For inspection. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#722 + def touched?; end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#578 + def wait(timeout = T.unsafe(nil)); end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#728 + def waiting_threads; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @abstract + # @raise [NotImplementedError] + # @return [AbstractEventFuture] + # @see Event#with_default_executor + # @see Future#with_default_executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#683 + def with_default_executor(executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#743 + def with_hidden_resolvable; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#750 + def add_callback(method, *args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#812 + def async_callback_on_resolution(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#796 + def call_callback(method, state, args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#800 + def call_callbacks(state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#763 + def callback_clear_delayed_node(state, node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#818 + def callback_notify_blocked(state, promise, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_internal_state(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def internal_state=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_internal_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_internal_state(&block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#768 + def wait_until_resolved(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 + def with_async(executor, *args, &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1796 +class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 + def initialize(delayed_because, blockers_count, event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1808 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1828 + def add_delayed_of(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1820 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1824 + def resolvable?(countdown, future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1816 + def touched?; end +end + +# @abstract +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1549 +class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractPromise] a new instance of AbstractPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1553 + def initialize(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1564 + def default_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1581 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 + def future; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1568 + def state; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1572 + def touch; end + + private + + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 + def evaluate_to(*args, block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1587 + def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2084 +class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2088 + def resolvable?(countdown, event_or_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2050 +class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2054 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2062 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2058 + def resolvable?(countdown, future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2067 +class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2071 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2079 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2075 + def resolvable?(countdown, future, index); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1619 +class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + # @return [BlockedPromise] a new instance of BlockedPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1661 + def initialize(delayed, blockers_count, future); end + + # for inspection only + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1683 + def blocked_by; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1674 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1667 + def on_blocker_resolution(future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1678 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1691 + def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1710 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 + def process_on_blocker_resolution(future, index); end + + # @return [true, false] if resolvable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1702 + def resolvable?(countdown, future, index); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1652 + def add_delayed(delayed1, delayed2); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1645 + def new_blocked_by(blockers, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1623 + def new_blocked_by1(blocker, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1630 + def new_blocked_by2(blocker1, blocker2, *args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1716 +class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + # @raise [ArgumentError] + # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1717 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1725 + def executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1766 +class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1769 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2095 +class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + # @return [DelayPromise] a new instance of DelayPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2097 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2108 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 + def touch; end +end + +# Represents an event which will happen in future (will be resolved). The event is either +# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and +# cancellation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#826 +class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 + def any(event_or_future); end + + # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#863 + def delay; end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 + def schedule(intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 + def then(*args, &task); end + + # Returns self, since this is event + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#893 + def to_event; end + + # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#885 + def to_future; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#899 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#910 + def callback_on_resolution(state, args, callback); end + + # @raise [Concurrent::MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#905 + def rejected_resolution(raise_on_reassign, state); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1972 +class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [EventWrapperPromise] a new instance of EventWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1973 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1979 + def on_resolvable(resolved_future, index); end +end + +# Container of all {Future}, {Event} factory methods. They are never constructed directly with +# new. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#46 +module Concurrent::Promises::FactoryMethods + include ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::ReInclude + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 + def any(*futures_and_or_events); end + + # Shortcut of {#any_event_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #any_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#319 + def any_event(*futures_and_or_events); end + + # Creates a new event which becomes resolved after the first futures_and_or_events resolves. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#329 + def any_event_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_fulfilled_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#300 + def any_fulfilled_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. + # Its result equals the result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last rejected future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#313 + def any_fulfilled_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 + def any_resolved_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is resolved. + # Its result equals the result of the first resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#294 + def any_resolved_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#delay_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #delay_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#190 + def delay(*args, &task); end + + # Creates a new event or future which is resolved only after it is touched, + # see {Concurrent::AbstractEventFuture#touch}. + # + # @overload delay_on + # @overload delay_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#207 + def delay_on(default_executor, *args, &task); end + + # Creates a resolved future which will be fulfilled with the given value. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param value [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#127 + def fulfilled_future(value, default_executor = T.unsafe(nil)); end + + # Shortcut of {#future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#94 + def future(*args, &task); end + + # Constructs a new Future which will be resolved after block is evaluated on default executor. + # Evaluation begins immediately. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [Future] + # @yield [*args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#106 + def future_on(default_executor, *args, &task); end + + # General constructor. Behaves differently based on the argument's type. It's provided for convenience + # but it's better to be explicit. + # + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event, Future] + # @see rejected_future, resolved_event, fulfilled_future + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#174 + def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end + + # Creates a resolved future which will be rejected with the given reason. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param reason [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#136 + def rejected_future(reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. + # + # @return [ResolvableEvent] + # @see #resolvable_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#63 + def resolvable_event; end + + # Creates a resolvable event, user is responsible for resolving the event once + # by calling {Promises::ResolvableEvent#resolve}. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableEvent] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#72 + def resolvable_event_on(default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. + # + # @return [ResolvableFuture] + # @see #resolvable_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#78 + def resolvable_future; end + + # Creates resolvable future, user is responsible for resolving the future once by + # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, + # or {Promises::ResolvableFuture#reject} + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableFuture] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#88 + def resolvable_future_on(default_executor = T.unsafe(nil)); end + + # Creates resolved event. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#144 + def resolved_event(default_executor = T.unsafe(nil)); end + + # Creates a resolved future with will be either fulfilled with the given value or rejected with + # the given reason. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#118 + def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#schedule_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #schedule_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#214 + def schedule(intended_time, *args, &task); end + + # Creates a new event or future which is resolved in intended_time. + # + # @overload schedule_on + # @overload schedule_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#233 + def schedule_on(default_executor, intended_time, *args, &task); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 + def zip(*futures_and_or_events); end + + # Shortcut of {#zip_events_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #zip_events_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#262 + def zip_events(*futures_and_or_events); end + + # Creates a new event which is resolved after all futures_and_or_events are resolved. + # (Future is resolved when fulfilled or rejected.) + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#272 + def zip_events_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 + def zip_futures(*futures_and_or_events); end + + # Creates a new future which is resolved after all futures_and_or_events are resolved. + # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. + # If there is an error it rejects. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#254 + def zip_futures_on(default_executor, *futures_and_or_events); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#50 +module Concurrent::Promises::FactoryMethods::Configuration + # @return [Executor, :io, :fast] the executor which is used when none is supplied + # to a factory method. The method can be overridden in the receivers of + # `include FactoryMethod` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#54 + def default_executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1840 +class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [FlatEventPromise] a new instance of FlatEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1844 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1848 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1873 +class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @raise [ArgumentError] + # @return [FlatFuturePromise] a new instance of FlatFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1877 + def initialize(delayed, blockers_count, levels, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1884 + def process_on_blocker_resolution(future, index); end +end + +# Represents a value which will become available in future. May reject with a reason instead, +# e.g. when the tasks raises an exception. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#917 +class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 + def any(event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1215 + def apply(args, block); end + + # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1095 + def delay; end + + # Allows rejected Future to be risen with `raise` method. + # If the reason is not an exception `Runtime.new(reason)` is returned. + # + # @example + # raise Promises.rejected_future(StandardError.new("boom")) + # raise Promises.rejected_future("or just boom") + # @raise [Concurrent::Error] when raising not rejected future + # @return [Exception] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1013 + def exception(*args); end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 + def flat(level = T.unsafe(nil)); end + + # Creates new event which will be resolved when the returned event by receiver is. + # Be careful if the receiver rejects it will just resolve since Event does not hold reason. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1130 + def flat_event; end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 + def flat_future(level = T.unsafe(nil)); end + + # Is it in fulfilled state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#921 + def fulfilled?; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 + def inspect; end + + # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_fulfillment_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1136 + def on_fulfillment(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # fulfilled. Does nothing on rejection. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1147 + def on_fulfillment!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # fulfilled. Does nothing on rejection. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1159 + def on_fulfillment_using(executor, *args, &callback); end + + # Shortcut of {#on_rejection_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_rejection_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1165 + def on_rejection(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # rejected. Does nothing on fulfillment. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1176 + def on_rejection!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # rejected. Does nothing on fulfillment. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1188 + def on_rejection_using(executor, *args, &callback); end + + # Returns reason of future's rejection. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#966 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Is it in rejected state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#928 + def rejected?; end + + # Shortcut of {#rescue_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #rescue_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1052 + def rescue(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it rejects. Does not run + # the task if it fulfills. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [Future] + # @yield [reason, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1064 + def rescue_on(executor, *args, &task); end + + # Returns triplet fulfilled?, value, reason. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil + # on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#981 + def result(timeout = T.unsafe(nil)); end + + # Allows to use futures as green threads. The receiver has to evaluate to a future which + # represents what should be done next. It basically flattens indefinitely until non Future + # values is returned which becomes result of the returned future. Any encountered exception + # will become reason of the returned future. + # + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 + # @param run_test [#call(value)] an object which when called returns either Future to keep running with + # or nil, then the run completes with the value. + # The run_test can be used to extract the Future from deeper structure, + # or to distinguish Future which is a resulting value from a future + # which is suppose to continue running. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1210 + def run(run_test = T.unsafe(nil)); end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1102 + def schedule(intended_time); end + + # Shortcut of {#then_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #then_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1034 + def then(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it fulfills. Does not run + # the task if it rejects. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [Future] + # @yield [value, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1046 + def then_on(executor, *args, &task); end + + # Converts future to event which is resolved when future is resolved by fulfillment or rejection. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1222 + def to_event; end + + # Returns self, since this is a future + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1230 + def to_future; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 + def to_s; end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # timeout_value on timeout, + # nil on rejection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#950 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @raise [Exception] {#reason} on rejection + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # or nil on rejection, + # or timeout_value on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#997 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 + def wait!(timeout = T.unsafe(nil)); end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1111 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1272 + def async_callback_on_fulfillment(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 + def async_callback_on_rejection(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1284 + def callback_on_fulfillment(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1288 + def callback_on_rejection(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1292 + def callback_on_resolution(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1251 + def rejected_resolution(raise_on_reassign, state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1247 + def run_test(v); end + + # @raise [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1266 + def wait_until_resolved!(timeout = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1984 +class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1985 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1991 + def on_resolvable(resolved_future, index); end +end + +# will be immediately resolved +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1783 +class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1784 + def initialize(default_executor); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1789 +class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1790 + def initialize(default_executor, fulfilled, value, reason); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1615 +class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#338 +module Concurrent::Promises::InternalStates; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#397 +class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Fulfilled] a new instance of Fulfilled + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#399 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#407 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#403 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#415 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#419 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#411 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 +class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#426 + def apply(args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#488 +Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 +class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [PartiallyRejected] a new instance of PartiallyRejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#460 + def initialize(value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#482 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#466 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#478 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#470 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#474 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 +class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#352 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#356 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#490 +Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#492 +Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 +class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Rejected] a new instance of Rejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#433 + def initialize(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#453 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#437 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#445 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#449 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#441 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#362 +class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 +class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#391 + def apply; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#379 + def fulfilled?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#387 + def reason; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#367 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#375 + def result; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#371 + def to_sym; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#383 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 +class Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#341 + def resolved?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#345 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1748 +class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [RescuePromise] a new instance of RescuePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1751 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1755 + def on_resolvable(resolved_future, index); end +end + +# Marker module of Future, Event resolved manually. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1299 +module Concurrent::Promises::Resolvable + include ::Concurrent::Promises::InternalStates +end + +# A Event which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1304 +class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event + include ::Concurrent::Promises::Resolvable + + # Makes the event resolved, which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1324 + def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1342 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new event wrapping receiver, effectively hiding the resolve method. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1331 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1600 +class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1601 + def initialize(default_executor); end +end + +# A Future which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1354 +class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future + include ::Concurrent::Promises::Resolvable + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1395 + def evaluate_to(*args, &block); end + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @raise [Exception] also raise reason on rejection. + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1406 + def evaluate_to!(*args, &block); end + + # Makes the future fulfilled with `value`, + # which triggers all dependent futures. + # + # @param value [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 + def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#reason} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Exception, timeout_value, nil] + # @see Future#reason + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1503 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Makes the future rejected with `reason`, + # which triggers all dependent futures. + # + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 + def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, + # which triggers all dependent futures. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 + def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#result} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [::Array(Boolean, Object, Exception), nil] + # @see Future#result + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1524 + def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Object, timeout_value, nil] + # @see Future#value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1459 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [Object, timeout_value, nil] + # @see Future#value! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1481 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1421 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#wait!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] + # @see Future#wait! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1438 + def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new future wrapping receiver, effectively hiding the resolve method and similar. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1542 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1606 +class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1607 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 + def evaluate_to(*args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1909 +class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [RunFuturePromise] a new instance of RunFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1913 + def initialize(delayed, blockers_count, default_executor, run_test); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1918 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2114 +class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + # @return [ScheduledPromise] a new instance of ScheduledPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2125 + def initialize(default_executor, intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2119 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 + def intended_time; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1730 +class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [ThenPromise] a new instance of ThenPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1733 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1737 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1940 +class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1941 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1947 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 +class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventsPromise] a new instance of ZipEventsPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2035 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2041 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1952 +class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1953 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1967 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1960 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1996 +class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2000 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2013 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2007 + def process_on_blocker_resolution(future, index); end +end + +# Methods form module A included to a module B, which is already included into class C, +# will not be visible in the C class. If this module is extended to B then A's methods +# are correctly made visible to C. +# +# @example +# module A +# def a +# :a +# end +# end +# +# module B1 +# end +# +# class C1 +# include B1 +# end +# +# module B2 +# extend Concurrent::ReInclude +# end +# +# class C2 +# include B2 +# end +# +# B1.send :include, A +# B2.send :include, A +# +# C1.new.respond_to? :a # => false +# C2.new.respond_to? :a # => true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#36 +module Concurrent::ReInclude + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#44 + def extended(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#50 + def include(*modules); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#38 + def included(base); end +end + +# Ruby read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And if the "write" lock is taken, any readers who come along will have to wait) +# +# If readers are already active when a writer comes along, the writer will wait for +# all the readers to finish before going ahead. +# Any additional readers that come when the writer is already waiting, will also +# wait (so writers are not starved). +# +# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @note Do **not** try to acquire the write lock while already holding a read lock +# **or** try to acquire the write lock while you already have it. +# This will lead to deadlock +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#31 +class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReadWriteLock` in the unlocked state. + # + # @return [ReadWriteLock] a new instance of ReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#59 + def initialize; end + + # Acquire a read lock. If a write lock has been acquired will block until + # it is released. Will not block if other read locks have been acquired. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#111 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#160 + def acquire_write_lock; end + + # Queries whether any threads are waiting to acquire the read or write lock. + # + # @return [Boolean] true if any threads are waiting for a lock else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#214 + def has_waiters?; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#140 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#196 + def release_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#75 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#94 + def with_write_lock; end + + # Queries if the write lock is held by any thread. + # + # @return [Boolean] true if the write lock is held else false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#207 + def write_locked?; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#246 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#251 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#221 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#226 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#231 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#241 + def waiting_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#236 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#40 +Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#43 +Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#37 +Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#34 +Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# Re-entrant read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And while the "write" lock is taken, no read locks can be obtained either. +# Hence, the write lock can also be called an "exclusive" lock.) +# +# If another thread has taken a read lock, any thread which wants a write lock +# will block until all the readers release their locks. However, once a thread +# starts waiting to obtain a write lock, any additional readers that come along +# will also wait (so writers are not starved). +# +# A thread can acquire both a read and write lock at the same time. A thread can +# also acquire a read lock OR a write lock more than once. Only when the read (or +# write) lock is released as many times as it was acquired, will the thread +# actually let it go, allowing other threads which might have been waiting +# to proceed. Therefore the lock can be upgraded by first acquiring +# read lock and then write lock and that the lock can be downgraded by first +# having both read and write lock a releasing just the write lock. +# +# If both read and write locks are acquired by the same thread, it is not strictly +# necessary to release them in the same order they were acquired. In other words, +# the following code is legal: +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.acquire_write_lock +# lock.acquire_read_lock +# lock.release_write_lock +# # At this point, the current thread is holding only a read lock, not a write +# # lock. So other threads can take read locks, but not a write lock. +# lock.release_read_lock +# # Now the current thread is not holding either a read or write lock, so +# # another thread could potentially acquire a write lock. +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#53 +class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReentrantReadWriteLock` in the unlocked state. + # + # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#109 + def initialize; end + + # Acquire a read lock. If a write lock is held by another thread, will block + # until it is released. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#162 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#257 + def acquire_write_lock; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#236 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#329 + def release_write_lock; end + + # Try to acquire a read lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#215 + def try_read_lock; end + + # Try to acquire a write lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#310 + def try_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#126 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#145 + def with_write_lock; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#370 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#375 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#345 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#350 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#355 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#365 + def waiting_or_running_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#360 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#94 +Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#96 +Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#84 +Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#102 +Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#92 +Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# Used with @Counter: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#90 +Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#86 +Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) + +# Used with @HeldCount: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#100 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#104 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# Raised by an `Executor` when it is unable to process a given task, +# possibly because of a reject policy or other internal error. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#48 +class Concurrent::RejectedExecutionError < ::Concurrent::Error; end + +# Raised when any finite resource, such as a lock counter, exceeds its +# maximum limit/threshold. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#52 +class Concurrent::ResourceLimitError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#129 +class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [RubyExchanger] a new instance of RubyExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#159 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_slot(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def slot; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def slot=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_slot(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_slot(&block); end + + private + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#170 + def do_exchange(value, timeout); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#138 +class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#142 + def initialize(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#153 + def item; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#149 + def latch; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_value(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def value=(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#8 +class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService + # @return [RubyExecutorService] a new instance of RubyExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#11 + def initialize(*args, &block); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#42 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#33 + def shutdown; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#52 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#70 + def ns_running?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#78 + def ns_shutdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#66 + def ns_shutdown_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#74 + def ns_shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#58 + def stop_event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#62 + def stopped_event; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#8 +class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor + # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#11 + def initialize(opts = T.unsafe(nil)); end +end + +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#12 +class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService + # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#45 + def initialize(opts = T.unsafe(nil)); end + + # The number of threads that are actively executing tasks. + # + # @return [Integer] The number of threads that are actively executing tasks. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 + def active_count; end + + # Does the task queue have a maximum size? + # + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#72 + def can_overflow?; end + + # The number of tasks that have been completed by the pool since construction. + # + # @return [Integer] The number of tasks that have been completed by the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#60 + def completed_task_count; end + + # The number of seconds that a thread may be idle before being reclaimed. + # + # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#36 + def idletime; end + + # The largest number of threads that have been created in the pool since construction. + # + # @return [Integer] The largest number of threads that have been created in the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#50 + def largest_length; end + + # The number of threads currently in the pool. + # + # @return [Integer] The number of threads currently in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#77 + def length; end + + # The maximum number of threads that may be created in the pool. + # + # @return [Integer] The maximum number of threads that may be created in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#30 + def max_length; end + + # The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#39 + def max_queue; end + + # The minimum number of threads that may be retained in the pool. + # + # @return [Integer] The minimum number of threads that may be retained in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#33 + def min_length; end + + # Prune the thread pool of unneeded threads + # + # What is being pruned is controlled by the min_threads and idletime + # parameters passed at pool creation time + # + # This is a no-op on some pool implementation (e.g. the Java one). The Ruby + # pool will auto-prune each time a new job is posted. You will need to call + # this method explicitely in case your application post jobs in bursts (a + # lot of jobs and then nothing for long periods) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 + def prune_pool; end + + # The number of tasks in the queue awaiting execution. + # + # @return [Integer] The number of tasks in the queue awaiting execution. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#82 + def queue_length; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#103 + def ready_worker(worker, last_message); end + + # Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#87 + def remaining_capacity; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#98 + def remove_busy_worker(worker); end + + # The number of tasks that have been scheduled for execution on the pool since construction. + # + # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#55 + def scheduled_task_count; end + + # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#42 + def synchronous; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#108 + def worker_died(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#113 + def worker_task_completed; end + + private + + # creates new worker which has to receive work to do after it's added + # + # @return [nil, Worker] nil of max capacity is reached + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#241 + def ns_add_busy_worker; end + + # tries to assign task to a worker, tries to get one from @ready or to create new one + # + # @return [true, false] if task is assigned to a worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#201 + def ns_assign_worker(*args, &task); end + + # tries to enqueue task + # + # @return [true, false] if enqueued + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#219 + def ns_enqueue(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#160 + def ns_execute(*args, &task); end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#125 + def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#189 + def ns_kill_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#155 + def ns_limited_queue?; end + + # try oldest worker if it is idle for enough time, it's returned back at the start + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#280 + def ns_prune_pool; end + + # handle ready worker, giving it new job or assigning back to @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#253 + def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end + + # removes a worker which is not in not tracked in @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#271 + def ns_remove_busy_worker(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#296 + def ns_reset_if_forked; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#174 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#231 + def ns_worker_died(worker); end +end + +# Default maximum number of threads that will be created in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#15 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default maximum number of tasks that may be added to the task queue. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#21 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) + +# Default minimum number of threads that will be retained in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#18 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default value of the :synchronous option. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#27 +Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) + +# Default maximum number of seconds a thread in the pool may remain idle +# before being reclaimed. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#24 +Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#310 +class Concurrent::RubyThreadPoolExecutor::Worker + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # @return [Worker] a new instance of Worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#313 + def initialize(pool, id); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#324 + def <<(message); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#332 + def kill; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#328 + def stop; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#338 + def create_worker(queue, pool, idletime); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#358 + def run_task(pool, task, args); end +end + +# A simple utility class that executes a callable and returns and array of three elements: +# success - indicating if the callable has been executed without errors +# value - filled by the callable result if it has been executed without errors, nil otherwise +# reason - the error risen by the callable if it has been executed with errors, nil otherwise +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#9 +class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject + # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#11 + def initialize(task, opts = T.unsafe(nil)); end + + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#18 + def execute(*args); end +end + +# `ScheduledTask` is a close relative of `Concurrent::Future` but with one +# important difference: A `Future` is set to execute as soon as possible +# whereas a `ScheduledTask` is set to execute after a specified delay. This +# implementation is loosely based on Java's +# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). +# It is a more feature-rich variant of {Concurrent.timer}. +# +# The *intended* schedule time of task execution is set on object construction +# with the `delay` argument. The delay is a numeric (floating point or integer) +# representing a number of seconds in the future. Any other value or a numeric +# equal to or less than zero will result in an exception. The *actual* schedule +# time of task execution is set when the `execute` method is called. +# +# The constructor can also be given zero or more processing options. Currently +# the only supported options are those recognized by the +# [Dereferenceable](Dereferenceable) module. +# +# The final constructor argument is a block representing the task to be performed. +# If no block is given an `ArgumentError` will be raised. +# +# **States** +# +# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it +# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` +# has one additional state, however. While the task (block) is being executed the +# state of the object will be `:processing`. This additional state is necessary +# because it has implications for task cancellation. +# +# **Cancellation** +# +# A `:pending` task can be cancelled using the `#cancel` method. A task in any +# other state, including `:processing`, cannot be cancelled. The `#cancel` +# method returns a boolean indicating the success of the cancellation attempt. +# A cancelled `ScheduledTask` cannot be restarted. It is immutable. +# +# **Obligation and Observation** +# +# The result of a `ScheduledTask` can be obtained either synchronously or +# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) +# module and the +# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) +# module from the Ruby standard library. With one exception `ScheduledTask` +# behaves identically to [Future](Observable) with regard to these modules. +# +# @example Basic usage +# +# require 'concurrent/scheduled_task' +# require 'csv' +# require 'open-uri' +# +# class Ticker +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end +# end +# +# api_key = ENV['ALPHAVANTAGE_KEY'] +# abort(error_message) unless api_key +# +# # Future +# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } +# price.state #=> :pending +# price.pending? #=> true +# price.value(0) #=> nil (does not block) +# +# sleep(1) # do other stuff +# +# price.value #=> 63.65 (after blocking if necessary) +# price.state #=> :fulfilled +# price.fulfilled? #=> true +# price.value #=> 63.65 +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# @example One line creation and execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute +# task.state #=> pending +# +# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } +# task.state #=> pending +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# @example Task execution with observation +# +# observer = Class.new{ +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end +# }.new +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.add_observer(observer) +# task.execute +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# @see Concurrent.timer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#158 +class Concurrent::ScheduledTask < ::Concurrent::IVar + include ::Comparable + + # Schedule a task for execution at a specified future time. + # + # @option opts + # @param delay [Float] the number of seconds to wait for before executing the task + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] When no block is given + # @raise [ArgumentError] When given a time that is in the past + # @return [ScheduledTask] a new instance of ScheduledTask + # @yield the task to be performed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#178 + def initialize(delay, opts = T.unsafe(nil), &task); end + + # Comparator which orders by schedule time. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#213 + def <=>(other); end + + # Cancel this task and prevent it from executing. A task can only be + # cancelled if it is pending or unscheduled. + # + # @return [Boolean] true if successfully cancelled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#235 + def cancel; end + + # Has the task been cancelled? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#220 + def cancelled?; end + + # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` + # and starts counting down toward execution. Does nothing if the `ScheduledTask` is + # in any state other than `:unscheduled`. + # + # @return [ScheduledTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#273 + def execute; end + + # The executor on which to execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#163 + def executor; end + + # The `delay` value given at instanciation. + # + # @return [Float] the initial delay. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#199 + def initial_delay; end + + # Execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#297 + def process_task; end + + # In the task execution in progress? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#227 + def processing?; end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] When given a time that is in the past + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#262 + def reschedule(delay); end + + # Reschedule the task using the original delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#250 + def reset; end + + # The monotonic time at which the the task is scheduled to be executed. + # + # @return [Float] the schedule time or nil if `unscheduled` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#206 + def schedule_time; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#326 + def ns_reschedule(delay); end + + # Schedule the task using the given delay and the current time. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#312 + def ns_schedule(delay); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + + class << self + # Create a new `ScheduledTask` object with the given block, execute it, and return the + # `:pending` object. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] if no block is given + # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#290 + def execute(delay, opts = T.unsafe(nil), &task); end + end +end + +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. +# +# @example +# semaphore = Concurrent::Semaphore.new(2) +# +# t1 = Thread.new do +# semaphore.acquire +# puts "Thread 1 acquired semaphore" +# end +# +# t2 = Thread.new do +# semaphore.acquire +# puts "Thread 2 acquired semaphore" +# end +# +# t3 = Thread.new do +# semaphore.acquire +# puts "Thread 3 acquired semaphore" +# end +# +# t4 = Thread.new do +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release +# end +# +# [t1, t2, t3, t4].each(&:join) +# +# # prints: +# # Thread 3 acquired semaphore +# # Thread 2 acquired semaphore +# # Thread 4 releasing semaphore +# # Thread 1 acquired semaphore +# @example +# semaphore = Concurrent::Semaphore.new(1) +# +# puts semaphore.available_permits +# semaphore.acquire do +# puts semaphore.available_permits +# end +# puts semaphore.available_permits +# +# # prints: +# # 1 +# # 0 +# # 1 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#161 +class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#96 +Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore + +# Indicates that the including `ExecutorService` guarantees +# that all operations will occur in the order they are post and that no +# two operations may occur simultaneously. This module provides no +# functionality and provides no guarantees. That is the responsibility +# of the including class. This module exists solely to allow the including +# object to be interrogated for its serialization status. +# +# @example +# class Foo +# include Concurrent::SerialExecutor +# end +# +# foo = Foo.new +# +# foo.is_a? Concurrent::ExecutorService #=> true +# foo.is_a? Concurrent::SerialExecutor #=> true +# foo.serialized? #=> true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#24 +module Concurrent::SerialExecutorService + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `true` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#30 + def serialized?; end +end + +# Ensures passed jobs in a serialized order never running at the same time. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#8 +class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # @return [SerializedExecution] a new instance of SerializedExecution + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#11 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param executor [Executor] to be used for this job + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#34 + def post(executor, *args, &task); end + + # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not + # be interleaved by other tasks. + # + # @param posts [Array, Proc)>] array of triplets where + # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#44 + def posts(posts); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#75 + def call_job(job); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#70 + def ns_initialize; end + + # ensures next job is executed if any is stashed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#95 + def work(job); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 +class Concurrent::SerializedExecution::Job < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#17 + def call; end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + def executor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A wrapper/delegator for any `ExecutorService` that +# guarantees serialized execution of tasks. +# +# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# @see Concurrent::SerializedExecution +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#12 +class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::SerialExecutorService + + # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#15 + def initialize(executor); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#22 + def post(*args, &task); end +end + +# A thread-safe subclass of Set. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` +# which is union of `a` and `b`, then it writes the union to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#merge` instead. +# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#61 +class Concurrent::Set < ::Concurrent::CRubySet; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#23 +Concurrent::SetImplementation = Concurrent::CRubySet + +# An thread-safe, write-once variation of Ruby's standard `Struct`. +# Each member can have its value set at most once, either at construction +# or any time thereafter. Attempting to assign a value to a member +# that has already been set will result in a `Concurrent::ImmutabilityError`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#14 +module Concurrent::SettableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#50 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#45 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @raise [Concurrent::ImmutabilityError] if the given member has already been set + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#75 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#55 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#61 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#35 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#67 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#40 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#97 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#105 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#115 +Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service in which every operation spawns a new, +# independently operating thread. +# +# This is perhaps the most inefficient executor service in this +# library. It exists mainly for testing an debugging. Thread creation +# and management is expensive in Ruby and this executor performs no +# resource pooling. This can be very beneficial during testing and +# debugging because it decouples the using code from the underlying +# executor implementation. In production this executor will likely +# lead to suboptimal performance. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#21 +class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#56 + def <<(task); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#84 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#40 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#62 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#77 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#72 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#67 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#91 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#97 + def ns_initialize(*args); end + + class << self + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#34 + def <<(task); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#24 + def post(*args); end + end +end + +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. +# +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these bahaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. +# +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#37 +class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#10 +Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#2 +module Concurrent::Synchronization + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb#7 + def full_memory_barrier; end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#9 +class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object + protected + + # Broadcast to all waiting threads. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#96 + def ns_broadcast; end + + # Signal one waiting thread. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#81 + def ns_signal; end + + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#66 + def ns_wait(timeout = T.unsafe(nil)); end + + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @return [true, false] if condition met + # @yield condition to be met + # @yieldreturn [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # @note can by made public in descendants if required by `public :synchronize` + # @raise [NotImplementedError] + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#18 + def synchronize; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#6 +class Concurrent::Synchronization::AbstractObject + # @return [AbstractObject] a new instance of AbstractObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#7 + def initialize; end + + # @abstract + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#13 + def full_memory_barrier; end + + class << self + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#17 + def attr_volatile(*names); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#6 +module Concurrent::Synchronization::AbstractStruct + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#9 + def initialize(*values); end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 + def length; end + + # Returns the struct members as an array of symbols. + # + # @return [Array] the struct members as an array of symbols + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#29 + def members; end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 + def size; end + + protected + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#82 + def ns_each; end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#89 + def ns_each_pair; end + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#75 + def ns_equality(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#59 + def ns_get(member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#119 + def ns_initialize_copy; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#105 + def ns_inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#114 + def ns_merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#98 + def ns_select; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#52 + def ns_to_h; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#38 + def ns_values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#45 + def ns_values_at(indexes); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#130 + def pr_underscore(clazz); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#141 + def define_struct_class(parent, base, name, members, &block); end + end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#8 +class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject + # @return [Condition] a new instance of Condition + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#18 + def initialize(lock); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#47 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#51 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#43 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#27 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#35 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#39 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#23 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#31 + def wait_until(timeout = T.unsafe(nil), &condition); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def private_new(*args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#8 +module Concurrent::Synchronization::ConditionSignalling + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#8 +class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#31 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#25 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#13 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#19 + def wait_until(timeout = T.unsafe(nil), &condition); end +end + +# Safe synchronization under any Ruby implementation. +# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. +# Provides a single layer which can improve its implementation over time without changes needed to +# the classes using it. Use {Synchronization::Object} not this abstract class. +# +# @note this object does not support usage together with +# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) +# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). +# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and +# `Thread#wakeup` will not work on all platforms. +# +# @see Event implementation as an example of this class use +# +# @example simple +# class AnClass < Synchronization::Object +# def initialize +# super +# synchronize { @value = 'asd' } +# end +# +# def value +# synchronize { @value } +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#50 +class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#57 + def new_condition; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#11 +Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#60 +class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MonitorLockableObject] a new instance of MonitorLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#65 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#83 + def ns_wait(timeout = T.unsafe(nil)); end + + # TODO may be a problem with lock.synchronize { lock.wait } + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#79 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#71 + def initialize_copy(other); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#25 +class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MutexLockableObject] a new instance of MutexLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#30 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#36 + def initialize_copy(other); end +end + +# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. +# - final instance variables see {Object.safe_initialization!} +# - volatile instance variables see {Object.attr_volatile} +# - volatile instance variables see {Object.attr_atomic} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#15 +class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject + include ::Concurrent::Synchronization::Volatile + extend ::Concurrent::Synchronization::Volatile::ClassMethods + + # Has to be called by children. + # + # @return [Object] a new instance of Object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#28 + def initialize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#146 + def __initialize_atomic_fields__; end + + class << self + # @return [true, false] is the attribute with name atomic? + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#125 + def atomic_attribute?(name); end + + # @param inherited [true, false] should inherited volatile with CAS fields be returned? + # @return [::Array] Returns defined volatile with CAS fields on this class. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#119 + def atomic_attributes(inherited = T.unsafe(nil)); end + + # Creates methods for reading and writing to a instance variable with + # volatile (Java) semantic as {.attr_volatile} does. + # The instance variable should be accessed oly through generated methods. + # This method generates following methods: `value`, `value=(new_value) #=> new_value`, + # `swap_value(new_value) #=> old_value`, + # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. + # + # @param names [::Array] of the instance variables to be volatile with CAS. + # @return [::Array] names of defined method names. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#84 + def attr_atomic(*names); end + + # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains + # any instance variables with CamelCase names and isn't {.safe_initialization?}. + # + # @raise when offend found + # @return [true] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#45 + def ensure_safe_initialization_when_final_fields_are_present; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#33 + def safe_initialization!; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#37 + def safe_initialization?; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#131 + def define_initialize_atomic_fields; end + end +end + +# By extending this module, a class and all its children are marked to be constructed safely. Meaning that +# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures +# same behaviour as Java's final fields. +# +# Due to using Kernel#extend, the module is not included again if already present in the ancestors, +# which avoids extra overhead. +# +# @example +# class AClass < Concurrent::Synchronization::Object +# extend Concurrent::Synchronization::SafeInitialization +# +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end +# +# def foo +# @AFinalValue +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#28 +module Concurrent::Synchronization::SafeInitialization + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end +end + +# Volatile adds the attr_volatile class method when included. +# +# foo = Foo.new +# foo.bar +# => 1 +# foo.bar = 2 +# => 2 +# +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#28 +module Concurrent::Synchronization::Volatile + mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#33 + def full_memory_barrier; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#29 + def included(base); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#37 +module Concurrent::Synchronization::Volatile::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#39 + def attr_volatile(*names); end +end + +# This class provides a trivial way to synchronize all calls to a given object +# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls +# around the delegated `#send`. Example: +# +# array = [] # not thread-safe on many impls +# array = SynchronizedDelegator.new([]) # thread-safe +# +# A simple `Monitor` provides a very coarse-grained way to synchronize a given +# object, in that it will cause synchronization for methods that have no need +# for it, but this is a trivial way to get thread-safety where none may exist +# currently on some implementations. +# +# This class is currently being considered for inclusion into stdlib, via +# https://bugs.ruby-lang.org/issues/8556 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#21 +class Concurrent::SynchronizedDelegator < ::SimpleDelegator + # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#31 + def initialize(obj); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#36 + def method_missing(method, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#22 + def setup; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#27 + def teardown; end +end + +# A `TVar` is a transactional variable - a single-element container that +# is used as part of a transaction - see `Concurrent::atomically`. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# {include:file:docs-source/tvar.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#12 +class Concurrent::TVar < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `TVar` with an initial value. + # + # @return [TVar] a new instance of TVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#16 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#46 + def unsafe_lock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#36 + def unsafe_value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#41 + def unsafe_value=(value); end + + # Get the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#22 + def value; end + + # Set the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#29 + def value=(value); end +end + +# A `ThreadLocalVar` is a variable where the value is different for each thread. +# Each variable may have a default value, but when you modify the variable only +# the current thread will ever see that change. +# +# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), +# but with these major advantages: +# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), +# so it's only OK to create a small amount of them. +# `ThreadLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). +# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @example +# v = ThreadLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = ThreadLocalVar.new(14) +# +# t1 = Thread.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end +# +# t2 = Thread.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#43 +class Concurrent::ThreadLocalVar + # Creates a thread local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each thread + # @return [ThreadLocalVar] a new instance of ThreadLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#51 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to thread local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#88 + def bind(value); end + + # Returns the value in the current thread's copy of this thread-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#70 + def value; end + + # Sets the current thread's copy of this thread-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#78 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#103 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#44 +Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) + +# An array-backed storage of indexed variables per thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#141 +class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#142 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#146 + def locals!; end +end + +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; +# +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#56 +class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#10 +Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 +module Concurrent::ThreadSafe; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 +module Concurrent::ThreadSafe::Util + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#16 + def make_synchronized_on_cruby(klass); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#41 + def make_synchronized_on_truffleruby(klass); end + end +end + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 +Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 +Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 +Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + +# Raised when an operation times out. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#55 +class Concurrent::TimeoutError < ::Concurrent::Error; end + +# Executes a collection of tasks, each after a given delay. A master task +# monitors the set and schedules each task for execution at the appropriate +# time. Tasks are run on the global thread pool or on the supplied executor. +# Each task is represented as a `ScheduledTask`. +# +# @see Concurrent::ScheduledTask +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#19 +class Concurrent::TimerSet < ::Concurrent::RubyExecutorService + # Create a new set of timed tasks. + # + # @option opts + # @param opts [Hash] the options used to specify the executor on which to perform actions + # @return [TimerSet] a new instance of TimerSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#30 + def initialize(opts = T.unsafe(nil)); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#62 + def kill; end + + # Post a task to be execute run after a given delay (in seconds). If the + # delay is less than 1/100th of a second the task will be immediately post + # to the executor. + # + # @param delay [Float] the number of seconds to wait for before executing the task. + # @param args [Array] the arguments passed to the task on execution. + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. + # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post + # is successful; false after shutdown. + # @yield the task to be performed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#48 + def post(delay, *args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Initialize the object. + # + # @param opts [Hash] the options to create the object with. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#74 + def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#94 + def ns_post_task(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#129 + def ns_reset_if_forked; end + + # `ExecutorService` callback called during shutdown. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#122 + def ns_shutdown_execution; end + + # Post the task to the internal queue. + # + # @note This is intended as a callback method from ScheduledTask + # only. It is not intended to be used directly. Post a task + # by using the `SchedulesTask#execute` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#89 + def post_task(task); end + + # Run a loop and execute tasks in the scheduled order and at the approximate + # scheduled time. If no tasks remain the thread will exit gracefully so that + # garbage collection can occur. If there are no ready tasks it will sleep + # for up to 60 seconds waiting for the next scheduled task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#143 + def process_tasks; end + + # Remove the given task from the queue. + # + # @note This is intended as a callback method from `ScheduledTask` + # only. It is not intended to be used directly. Cancel a task + # by using the `ScheduledTask#cancel` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#115 + def remove_task(task); end +end + +# A very common concurrency pattern is to run a thread that performs a task at +# regular intervals. The thread that performs the task sleeps for the given +# interval then wakes up and performs the task. Lather, rinse, repeat... This +# pattern causes two problems. First, it is difficult to test the business +# logic of the task because the task itself is tightly coupled with the +# concurrency logic. Second, an exception raised while performing the task can +# cause the entire thread to abend. In a long-running application where the +# task thread is intended to run for days/weeks/years a crashed task thread +# can pose a significant problem. `TimerTask` alleviates both problems. +# +# When a `TimerTask` is launched it starts a thread for monitoring the +# execution interval. The `TimerTask` thread does not perform the task, +# however. Instead, the TimerTask launches the task on a separate thread. +# Should the task experience an unrecoverable crash only the task thread will +# crash. This makes the `TimerTask` very fault tolerant. Additionally, the +# `TimerTask` thread can respond to the success or failure of the task, +# performing logging or ancillary operations. +# +# One other advantage of `TimerTask` is that it forces the business logic to +# be completely decoupled from the concurrency logic. The business logic can +# be tested separately then passed to the `TimerTask` for scheduling and +# running. +# +# A `TimerTask` supports two different types of interval calculations. +# A fixed delay will always wait the same amount of time between the +# completion of one task and the start of the next. A fixed rate will +# attempt to maintain a constant rate of execution regardless of the +# duration of the task. For example, if a fixed rate task is scheduled +# to run every 60 seconds but the task itself takes 10 seconds to +# complete, the next task will be scheduled to run 50 seconds after +# the start of the previous task. If the task takes 70 seconds to +# complete, the next task will be start immediately after the previous +# task completes. Tasks will not be executed concurrently. +# +# In some cases it may be necessary for a `TimerTask` to affect its own +# execution cycle. To facilitate this, a reference to the TimerTask instance +# is passed as an argument to the provided block every time the task is +# executed. +# +# The `TimerTask` class includes the `Dereferenceable` mixin module so the +# result of the last execution is always available via the `#value` method. +# Dereferencing options can be passed to the `TimerTask` during construction or +# at any later time using the `#set_deref_options` method. +# +# `TimerTask` supports notification through the Ruby standard library +# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# Observable} module. On execution the `TimerTask` will notify the observers +# with three arguments: time of execution, the result of the block (or nil on +# failure), and any raised exceptions (or nil on success). +# +# @example Basic usage +# task = Concurrent::TimerTask.new{ puts 'Boom!' } +# task.execute +# +# task.execution_interval #=> 60 (default) +# +# # wait 60 seconds... +# #=> 'Boom!' +# +# task.shutdown #=> true +# @example Configuring `:execution_interval` +# task = Concurrent::TimerTask.new(execution_interval: 5) do +# puts 'Boom!' +# end +# +# task.execution_interval #=> 5 +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay +# task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do +# puts 'Boom!' +# end +# task.interval_type #=> :fixed_rate +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# @example Controlling execution from within the block +# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| +# task.execution_interval.to_i.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end +# end +# +# timer_task.execute +# #=> Boom! +# #=> Boom! Boom! +# #=> Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! Boom! +# #=> Stopping... +# @example Observation +# class TaskObserver +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end +# end +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } +# task.add_observer(TaskObserver.new) +# task.execute +# sleep 4 +# +# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:07:25 -0400) Execution timed out +# #=> (2013-10-13 19:07:27 -0400) Execution timed out +# #=> (2013-10-13 19:07:29 -0400) Execution timed out +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError +# task.shutdown +# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#165 +class Concurrent::TimerTask < ::Concurrent::RubyExecutorService + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Observable + + # Create a new TimerTask with the given task and configuration. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#209 + def initialize(opts = T.unsafe(nil), &task); end + + # Execute a previously created `TimerTask`. + # + # @example Instance and execute in separate steps + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> false + # task.execute + # task.running? #=> true + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true + # @return [TimerTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#235 + def execute; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#259 + def execution_interval; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#266 + def execution_interval=(value); end + + # @return [Symbol] method to calculate the interval between executions + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#276 + def interval_type; end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#218 + def running?; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#281 + def timeout_interval; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#288 + def timeout_interval=(value); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#352 + def calculate_next_interval(start_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#336 + def execute_task(completion); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#296 + def ns_initialize(opts, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#324 + def ns_kill_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#318 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#330 + def schedule_next_task(interval = T.unsafe(nil)); end + + class << self + # Create and execute a new `TimerTask`. + # + # @example + # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> true + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#252 + def execute(opts = T.unsafe(nil), &task); end + end +end + +# Default `:interval_type` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#181 +Concurrent::TimerTask::DEFAULT_INTERVAL_TYPE = T.let(T.unsafe(nil), Symbol) + +# Default `:execution_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#170 +Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) + +# Maintain the interval between the end of one execution and the start of the next execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#173 +Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) + +# Maintain the interval between the start of one execution and the start of the next. +# If execution time exceeds the interval, the next execution will start immediately +# after the previous execution finishes. Executions will not run concurrently. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#178 +Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 +class Concurrent::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#162 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#192 + def abort; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#196 + def commit; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#177 + def open(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#166 + def read(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#206 + def unlock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#171 + def write(tvar, value); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#212 + def current; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#216 + def current=(transaction); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#155 +Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#159 +class Concurrent::Transaction::AbortError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#160 +class Concurrent::Transaction::LeaveError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 +class Concurrent::Transaction::OpenEntry < ::Struct + # Returns the value of attribute modified + # + # @return [Object] the current value of modified + def modified; end + + # Sets the attribute modified + # + # @param value [Object] the value to set the attribute modified to. + # @return [Object] the newly set value + def modified=(_); 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 + +# A fixed size array with volatile (synchronized, thread safe) getters/setters. +# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. +# +# @example +# tuple = Concurrent::Tuple.new(16) +# +# tuple.set(0, :foo) #=> :foo | volatile write +# tuple.get(0) #=> :foo | volatile read +# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS +# tuple.cas(0, :foo, :baz) #=> false | strong CAS +# tuple.get(0) #=> :bar | volatile read +# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#20 +class Concurrent::Tuple + include ::Enumerable + + # Create a new tuple of the given size. + # + # @param size [Integer] the number of elements in the tuple + # @return [Tuple] a new instance of Tuple + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#29 + def initialize(size); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 + def cas(i, old_value, new_value); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 + def compare_and_set(i, old_value, new_value); end + + # Calls the given block once for each element in self, passing that element as a parameter. + # + # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#78 + def each; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 + def get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 + def set(i, value); end + + # The (fixed) size of the tuple. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#24 + def size; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 + def volatile_get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 + def volatile_set(i, value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#3 +module Concurrent::Utility; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#6 +module Concurrent::Utility::EngineDetector + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#7 + def on_cruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#11 + def on_jruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#27 + def on_linux?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#23 + def on_osx?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#15 + def on_truffleruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#19 + def on_windows?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#31 + def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#9 +module Concurrent::Utility::NativeExtensionLoader + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#11 + def allow_c_extensions?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#15 + def c_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#19 + def load_native_extensions; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#50 + def java_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#38 + def load_error_path(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#46 + def set_c_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#54 + def set_java_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#58 + def try_load_c_extension(path); end +end + +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#5 +module Concurrent::Utility::NativeInteger + extend ::Concurrent::Utility::NativeInteger + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#24 + def ensure_integer(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#31 + def ensure_integer_and_bounds(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#17 + def ensure_lower_bound(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#37 + def ensure_positive(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#44 + def ensure_positive_and_no_zero(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#10 + def ensure_upper_bound(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#8 +Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# http://stackoverflow.com/questions/535721/ruby-max-integer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#7 +Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#10 +class Concurrent::Utility::ProcessorCounter + # @return [ProcessorCounter] a new instance of ProcessorCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + def available_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#41 + def cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#45 + def cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#22 + def physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#18 + def processor_count; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#104 + def compute_cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#124 + def compute_cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#59 + def compute_physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#51 + def compute_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#99 + def run(command); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 +Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/connection_pool@2.4.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/connection_pool@2.4.1.rbi new file mode 100644 index 0000000..3d9f595 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/connection_pool@2.4.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `connection_pool` gem. +# Please instead update this file by running `bin/tapioca gem connection_pool`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/crass@1.0.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/crass@1.0.6.rbi new file mode 100644 index 0000000..0979e2f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/crass@1.0.6.rbi @@ -0,0 +1,623 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `crass` gem. +# Please instead update this file by running `bin/tapioca gem crass`. + + +# A CSS parser based on the CSS Syntax Module Level 3 spec. +# +# source://crass//lib/crass/token-scanner.rb#3 +module Crass + class << self + # Parses _input_ as a CSS stylesheet and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # source://crass//lib/crass.rb#10 + def parse(input, options = T.unsafe(nil)); end + + # Parses _input_ as a string of CSS properties (such as the contents of an + # HTML element's `style` attribute) and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # source://crass//lib/crass.rb#18 + def parse_properties(input, options = T.unsafe(nil)); end + end +end + +# Parses a CSS string or list of tokens. +# +# 5. http://dev.w3.org/csswg/css-syntax/#parsing +# +# source://crass//lib/crass/parser.rb#10 +class Crass::Parser + # Initializes a parser based on the given _input_, which may be a CSS string + # or an array of tokens. + # + # See {Tokenizer#initialize} for _options_. + # + # @return [Parser] a new instance of Parser + # + # source://crass//lib/crass/parser.rb#126 + def initialize(input, options = T.unsafe(nil)); end + + # Consumes an at-rule and returns it. + # + # 5.4.2. http://dev.w3.org/csswg/css-syntax-3/#consume-at-rule + # + # source://crass//lib/crass/parser.rb#137 + def consume_at_rule(input = T.unsafe(nil)); end + + # Consumes a component value and returns it, or `nil` if there are no more + # tokens. + # + # 5.4.6. http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value + # + # source://crass//lib/crass/parser.rb#184 + def consume_component_value(input = T.unsafe(nil)); end + + # Consumes a declaration and returns it, or `nil` on parse error. + # + # 5.4.5. http://dev.w3.org/csswg/css-syntax-3/#consume-a-declaration + # + # source://crass//lib/crass/parser.rb#209 + def consume_declaration(input = T.unsafe(nil)); end + + # Consumes a list of declarations and returns them. + # + # By default, the returned list may include `:comment`, `:semicolon`, and + # `:whitespace` nodes, which is non-standard. + # + # Options: + # + # * **:strict** - Set to `true` to exclude non-standard `:comment`, + # `:semicolon`, and `:whitespace` nodes. + # + # 5.4.4. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#276 + def consume_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end + + # Consumes a function and returns it. + # + # 5.4.8. http://dev.w3.org/csswg/css-syntax-3/#consume-a-function + # + # source://crass//lib/crass/parser.rb#326 + def consume_function(input = T.unsafe(nil)); end + + # Consumes a qualified rule and returns it, or `nil` if a parse error + # occurs. + # + # 5.4.3. http://dev.w3.org/csswg/css-syntax-3/#consume-a-qualified-rule + # + # source://crass//lib/crass/parser.rb#357 + def consume_qualified_rule(input = T.unsafe(nil)); end + + # Consumes a list of rules and returns them. + # + # 5.4.1. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-rules + # + # source://crass//lib/crass/parser.rb#398 + def consume_rules(flags = T.unsafe(nil)); end + + # Consumes and returns a simple block associated with the current input + # token. + # + # 5.4.7. http://dev.w3.org/csswg/css-syntax/#consume-a-simple-block + # + # source://crass//lib/crass/parser.rb#434 + def consume_simple_block(input = T.unsafe(nil)); end + + # Creates and returns a new parse node with the given _properties_. + # + # source://crass//lib/crass/parser.rb#458 + def create_node(type, properties = T.unsafe(nil)); end + + # Parses the given _input_ tokens into a selector node and returns it. + # + # Doesn't bother splitting the selector list into individual selectors or + # validating them. Feel free to do that yourself! It'll be fun! + # + # source://crass//lib/crass/parser.rb#466 + def create_selector(input); end + + # Creates a `:style_rule` node from the given qualified _rule_, and returns + # it. + # + # source://crass//lib/crass/parser.rb#474 + def create_style_rule(rule); end + + # Parses a single component value and returns it. + # + # 5.3.7. http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value + # + # source://crass//lib/crass/parser.rb#483 + def parse_component_value(input = T.unsafe(nil)); end + + # Parses a list of component values and returns an array of parsed tokens. + # + # 5.3.8. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-component-values + # + # source://crass//lib/crass/parser.rb#510 + def parse_component_values(input = T.unsafe(nil)); end + + # Parses a single declaration and returns it. + # + # 5.3.5. http://dev.w3.org/csswg/css-syntax/#parse-a-declaration + # + # source://crass//lib/crass/parser.rb#524 + def parse_declaration(input = T.unsafe(nil)); end + + # Parses a list of declarations and returns them. + # + # See {#consume_declarations} for _options_. + # + # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#552 + def parse_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end + + # Parses a list of declarations and returns an array of `:property` nodes + # (and any non-declaration nodes that were in the input). This is useful for + # parsing the contents of an HTML element's `style` attribute. + # + # source://crass//lib/crass/parser.rb#560 + def parse_properties(input = T.unsafe(nil)); end + + # Parses a single rule and returns it. + # + # 5.3.4. http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule + # + # source://crass//lib/crass/parser.rb#586 + def parse_rule(input = T.unsafe(nil)); end + + # Returns the unescaped value of a selector name or property declaration. + # + # source://crass//lib/crass/parser.rb#615 + def parse_value(nodes); end + + # {TokenScanner} wrapping the tokens generated from this parser's input. + # + # source://crass//lib/crass/parser.rb#120 + def tokens; end + + class << self + # Parses CSS properties (such as the contents of an HTML element's `style` + # attribute) and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#25 + def parse_properties(input, options = T.unsafe(nil)); end + + # Parses CSS rules (such as the content of a `@media` block) and returns a + # parse tree. The only difference from {parse_stylesheet} is that CDO/CDC + # nodes (``) aren't ignored. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.3. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-rules + # + # source://crass//lib/crass/parser.rb#36 + def parse_rules(input, options = T.unsafe(nil)); end + + # Parses a CSS stylesheet and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.2. http://dev.w3.org/csswg/css-syntax/#parse-a-stylesheet + # + # source://crass//lib/crass/parser.rb#54 + def parse_stylesheet(input, options = T.unsafe(nil)); end + + # Converts a node or array of nodes into a CSS string based on their + # original tokenized input. + # + # Options: + # + # * **:exclude_comments** - When `true`, comments will be excluded. + # + # source://crass//lib/crass/parser.rb#74 + def stringify(nodes, options = T.unsafe(nil)); end + end +end + +# source://crass//lib/crass/parser.rb#11 +Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash) + +# Similar to a StringScanner, but with extra functionality needed to tokenize +# CSS while preserving the original text. +# +# source://crass//lib/crass/scanner.rb#8 +class Crass::Scanner + # Creates a Scanner instance for the given _input_ string or IO instance. + # + # @return [Scanner] a new instance of Scanner + # + # source://crass//lib/crass/scanner.rb#25 + def initialize(input); end + + # Consumes the next character and returns it, advancing the pointer, or + # an empty string if the end of the string has been reached. + # + # source://crass//lib/crass/scanner.rb#34 + def consume; end + + # Consumes the rest of the string and returns it, advancing the pointer to + # the end of the string. Returns an empty string is the end of the string + # has already been reached. + # + # source://crass//lib/crass/scanner.rb#46 + def consume_rest; end + + # Current character, or `nil` if the scanner hasn't yet consumed a + # character, or is at the end of the string. + # + # source://crass//lib/crass/scanner.rb#11 + def current; end + + # Returns `true` if the end of the string has been reached, `false` + # otherwise. + # + # @return [Boolean] + # + # source://crass//lib/crass/scanner.rb#57 + def eos?; end + + # Sets the marker to the position of the next character that will be + # consumed. + # + # source://crass//lib/crass/scanner.rb#63 + def mark; end + + # Returns the substring between {#marker} and {#pos}, without altering the + # pointer. + # + # source://crass//lib/crass/scanner.rb#69 + def marked; end + + # Current marker position. Use {#marked} to get the substring between + # {#marker} and {#pos}. + # + # source://crass//lib/crass/scanner.rb#15 + def marker; end + + # Current marker position. Use {#marked} to get the substring between + # {#marker} and {#pos}. + # + # source://crass//lib/crass/scanner.rb#15 + def marker=(_arg0); end + + # Returns up to _length_ characters starting at the current position, but + # doesn't consume them. The number of characters returned may be less than + # _length_ if the end of the string is reached. + # + # source://crass//lib/crass/scanner.rb#80 + def peek(length = T.unsafe(nil)); end + + # Position of the next character that will be consumed. This is a character + # position, not a byte position, so it accounts for multi-byte characters. + # + # source://crass//lib/crass/scanner.rb#19 + def pos; end + + # Position of the next character that will be consumed. This is a character + # position, not a byte position, so it accounts for multi-byte characters. + # + # source://crass//lib/crass/scanner.rb#19 + def pos=(_arg0); end + + # Moves the pointer back one character without changing the value of + # {#current}. The next call to {#consume} will re-consume the current + # character. + # + # source://crass//lib/crass/scanner.rb#87 + def reconsume; end + + # Resets the pointer to the beginning of the string. + # + # source://crass//lib/crass/scanner.rb#93 + def reset; end + + # Tries to match _pattern_ at the current position. If it matches, the + # matched substring will be returned and the pointer will be advanced. + # Otherwise, `nil` will be returned. + # + # source://crass//lib/crass/scanner.rb#103 + def scan(pattern); end + + # Scans the string until the _pattern_ is matched. Returns the substring up + # to and including the end of the match, and advances the pointer. If there + # is no match, `nil` is returned and the pointer is not advanced. + # + # source://crass//lib/crass/scanner.rb#115 + def scan_until(pattern); end + + # String being scanned. + # + # source://crass//lib/crass/scanner.rb#22 + def string; end +end + +# Like {Scanner}, but for tokens! +# +# source://crass//lib/crass/token-scanner.rb#6 +class Crass::TokenScanner + # @return [TokenScanner] a new instance of TokenScanner + # + # source://crass//lib/crass/token-scanner.rb#9 + def initialize(tokens); end + + # Executes the given block, collects all tokens that are consumed during its + # execution, and returns them. + # + # source://crass//lib/crass/token-scanner.rb#16 + def collect; end + + # Consumes the next token and returns it, advancing the pointer. Returns + # `nil` if there is no next token. + # + # source://crass//lib/crass/token-scanner.rb#24 + def consume; end + + # Returns the value of attribute current. + # + # source://crass//lib/crass/token-scanner.rb#7 + def current; end + + # Returns the next token without consuming it, or `nil` if there is no next + # token. + # + # source://crass//lib/crass/token-scanner.rb#32 + def peek; end + + # Returns the value of attribute pos. + # + # source://crass//lib/crass/token-scanner.rb#7 + def pos; end + + # Reconsumes the current token, moving the pointer back one position. + # + # http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#reconsume-the-current-input-token + # + # source://crass//lib/crass/token-scanner.rb#39 + def reconsume; end + + # Resets the pointer to the first token in the list. + # + # source://crass//lib/crass/token-scanner.rb#44 + def reset; end + + # Returns the value of attribute tokens. + # + # source://crass//lib/crass/token-scanner.rb#7 + def tokens; end +end + +# Tokenizes a CSS string. +# +# 4. http://dev.w3.org/csswg/css-syntax/#tokenization +# +# source://crass//lib/crass/tokenizer.rb#9 +class Crass::Tokenizer + # Initializes a new Tokenizer. + # + # Options: + # + # * **:preserve_comments** - If `true`, comments will be preserved as + # `:comment` tokens. + # + # * **:preserve_hacks** - If `true`, certain non-standard browser hacks + # such as the IE "*" hack will be preserved even though they violate + # CSS 3 syntax rules. + # + # @return [Tokenizer] a new instance of Tokenizer + # + # source://crass//lib/crass/tokenizer.rb#62 + def initialize(input, options = T.unsafe(nil)); end + + # Consumes a token and returns the token that was consumed. + # + # 4.3.1. http://dev.w3.org/csswg/css-syntax/#consume-a-token + # + # source://crass//lib/crass/tokenizer.rb#70 + def consume; end + + # Consumes the remnants of a bad URL and returns the consumed text. + # + # 4.3.15. http://dev.w3.org/csswg/css-syntax/#consume-the-remnants-of-a-bad-url + # + # source://crass//lib/crass/tokenizer.rb#275 + def consume_bad_url; end + + # Consumes comments and returns them, or `nil` if no comments were consumed. + # + # 4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments + # + # source://crass//lib/crass/tokenizer.rb#301 + def consume_comments; end + + # Consumes an escaped code point and returns its unescaped value. + # + # This method assumes that the `\` has already been consumed, and that the + # next character in the input has already been verified not to be a newline + # or EOF. + # + # 4.3.8. http://dev.w3.org/csswg/css-syntax/#consume-an-escaped-code-point + # + # source://crass//lib/crass/tokenizer.rb#326 + def consume_escaped; end + + # Consumes an ident-like token and returns it. + # + # 4.3.4. http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token + # + # source://crass//lib/crass/tokenizer.rb#350 + def consume_ident; end + + # Consumes a name and returns it. + # + # 4.3.12. http://dev.w3.org/csswg/css-syntax/#consume-a-name + # + # source://crass//lib/crass/tokenizer.rb#375 + def consume_name; end + + # Consumes a number and returns a 3-element array containing the number's + # original representation, its numeric value, and its type (either + # `:integer` or `:number`). + # + # 4.3.13. http://dev.w3.org/csswg/css-syntax/#consume-a-number + # + # source://crass//lib/crass/tokenizer.rb#407 + def consume_number; end + + # Consumes a numeric token and returns it. + # + # 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token + # + # source://crass//lib/crass/tokenizer.rb#430 + def consume_numeric; end + + # Consumes a string token that ends at the given character, and returns the + # token. + # + # 4.3.5. http://dev.w3.org/csswg/css-syntax/#consume-a-string-token + # + # source://crass//lib/crass/tokenizer.rb#469 + def consume_string(ending = T.unsafe(nil)); end + + # Consumes a Unicode range token and returns it. Assumes the initial "u+" or + # "U+" has already been consumed. + # + # 4.3.7. http://dev.w3.org/csswg/css-syntax/#consume-a-unicode-range-token + # + # source://crass//lib/crass/tokenizer.rb#510 + def consume_unicode_range; end + + # Consumes a URL token and returns it. Assumes the original "url(" has + # already been consumed. + # + # 4.3.6. http://dev.w3.org/csswg/css-syntax/#consume-a-url-token + # + # source://crass//lib/crass/tokenizer.rb#542 + def consume_url; end + + # Converts a valid CSS number string into a number and returns the number. + # + # 4.3.14. http://dev.w3.org/csswg/css-syntax/#convert-a-string-to-a-number + # + # source://crass//lib/crass/tokenizer.rb#590 + def convert_string_to_number(str); end + + # Creates and returns a new token with the given _properties_. + # + # source://crass//lib/crass/tokenizer.rb#616 + def create_token(type, properties = T.unsafe(nil)); end + + # Preprocesses _input_ to prepare it for the tokenizer. + # + # 3.3. http://dev.w3.org/csswg/css-syntax/#input-preprocessing + # + # source://crass//lib/crass/tokenizer.rb#627 + def preprocess(input); end + + # Returns `true` if the given three-character _text_ would start an + # identifier. If _text_ is `nil`, the current and next two characters in the + # input stream will be checked, but will not be consumed. + # + # 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#642 + def start_identifier?(text = T.unsafe(nil)); end + + # Returns `true` if the given three-character _text_ would start a number. + # If _text_ is `nil`, the current and next two characters in the input + # stream will be checked, but will not be consumed. + # + # 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#666 + def start_number?(text = T.unsafe(nil)); end + + # Tokenizes the input stream and returns an array of tokens. + # + # source://crass//lib/crass/tokenizer.rb#685 + def tokenize; end + + # Returns `true` if the given two-character _text_ is the beginning of a + # valid escape sequence. If _text_ is `nil`, the current and next character + # in the input stream will be checked, but will not be consumed. + # + # 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#702 + def valid_escape?(text = T.unsafe(nil)); end + + class << self + # Tokenizes the given _input_ as a CSS string and returns an array of + # tokens. + # + # See {#initialize} for _options_. + # + # source://crass//lib/crass/tokenizer.rb#45 + def tokenize(input, options = T.unsafe(nil)); end + end +end + +# source://crass//lib/crass/tokenizer.rb#10 +Crass::Tokenizer::RE_COMMENT_CLOSE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#11 +Crass::Tokenizer::RE_DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#12 +Crass::Tokenizer::RE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#13 +Crass::Tokenizer::RE_HEX = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#14 +Crass::Tokenizer::RE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#15 +Crass::Tokenizer::RE_NAME_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#16 +Crass::Tokenizer::RE_NON_PRINTABLE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#17 +Crass::Tokenizer::RE_NUMBER_DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#18 +Crass::Tokenizer::RE_NUMBER_EXPONENT = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#19 +Crass::Tokenizer::RE_NUMBER_SIGN = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#21 +Crass::Tokenizer::RE_NUMBER_STR = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#33 +Crass::Tokenizer::RE_QUOTED_URL_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#35 +Crass::Tokenizer::RE_UNICODE_RANGE_END = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#34 +Crass::Tokenizer::RE_UNICODE_RANGE_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#36 +Crass::Tokenizer::RE_WHITESPACE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#37 +Crass::Tokenizer::RE_WHITESPACE_ANCHORED = T.let(T.unsafe(nil), Regexp) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/date@3.3.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/date@3.3.4.rbi new file mode 100644 index 0000000..1dcd7c8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/date@3.3.4.rbi @@ -0,0 +1,75 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `date` gem. +# Please instead update this file by running `bin/tapioca gem date`. + + +# source://date//lib/date.rb#6 +class Date + include ::Comparable + + # call-seq: + # infinite? -> false + # + # Returns +false+ + # + # @return [Boolean] + # + # source://date//lib/date.rb#13 + def infinite?; end +end + +# source://date//lib/date.rb#17 +class Date::Infinity < ::Numeric + # @return [Infinity] a new instance of Infinity + # + # source://date//lib/date.rb#19 + def initialize(d = T.unsafe(nil)); end + + # source://date//lib/date.rb#33 + def +@; end + + # source://date//lib/date.rb#32 + def -@; end + + # source://date//lib/date.rb#35 + def <=>(other); end + + # source://date//lib/date.rb#30 + def abs; end + + # source://date//lib/date.rb#51 + def coerce(other); end + + # @return [Boolean] + # + # source://date//lib/date.rb#26 + def finite?; end + + # @return [Boolean] + # + # source://date//lib/date.rb#27 + def infinite?; end + + # @return [Boolean] + # + # source://date//lib/date.rb#28 + def nan?; end + + # source://date//lib/date.rb#59 + def to_f; end + + # @return [Boolean] + # + # source://date//lib/date.rb#25 + def zero?; end + + protected + + # source://date//lib/date.rb#21 + def d; end +end + +# source://date//lib/date.rb#7 +Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/diff-lcs@1.5.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/diff-lcs@1.5.1.rbi new file mode 100644 index 0000000..8fcd4d7 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/diff-lcs@1.5.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `diff-lcs` gem. +# Please instead update this file by running `bin/tapioca gem diff-lcs`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dotenv@3.1.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dotenv@3.1.4.rbi new file mode 100644 index 0000000..75cfff7 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dotenv@3.1.4.rbi @@ -0,0 +1,441 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dotenv` gem. +# Please instead update this file by running `bin/tapioca gem dotenv`. + + +# Shim to load environment variables from `.env files into `ENV`. +# +# source://dotenv//lib/dotenv/version.rb#1 +module Dotenv + extend ::Dotenv + + # Returns the value of attribute instrumenter. + # + # source://dotenv//lib/dotenv.rb#15 + def instrumenter; end + + # Sets the attribute instrumenter + # + # @param value the value to set the attribute instrumenter to. + # + # source://dotenv//lib/dotenv.rb#15 + def instrumenter=(_arg0); end + + # Loads environment variables from one or more `.env` files. See `#parse` for more details. + # + # source://dotenv//lib/dotenv.rb#18 + def load(*filenames, overwrite: T.unsafe(nil), ignore: T.unsafe(nil)); end + + # Same as `#load`, but raises Errno::ENOENT if any files don't exist + # + # source://dotenv//lib/dotenv.rb#27 + def load!(*filenames); end + + # Modify `ENV` for the block and restore it to its previous state afterwards. + # + # Note that the block is synchronized to prevent concurrent modifications to `ENV`, + # so multiple threads will be executed serially. + # + # @param env [Hash] Hash of keys and values to set in `ENV` + # + # source://dotenv//lib/dotenv.rb#116 + def modify(env = T.unsafe(nil), &block); end + + # same as `#load`, but will overwrite existing values in `ENV` + # + # source://dotenv//lib/dotenv.rb#32 + def overload(*filenames); end + + # same as `#overwrite`, but raises Errno::ENOENT if any files don't exist + # + # source://dotenv//lib/dotenv.rb#38 + def overload!(*filenames); end + + # same as `#load`, but will overwrite existing values in `ENV` + # + # source://dotenv//lib/dotenv.rb#32 + def overwrite(*filenames); end + + # same as `#overwrite`, but raises Errno::ENOENT if any files don't exist + # + # source://dotenv//lib/dotenv.rb#38 + def overwrite!(*filenames); end + + # Parses the given files, yielding for each file if a block is given. + # + # @param filenames [String, Array] Files to parse + # @param overwrite [Boolean] Overwrite existing `ENV` values + # @param ignore [Boolean] Ignore non-existent files + # @param block [Proc] Block to yield for each parsed `Dotenv::Environment` + # @return [Hash] parsed key/value pairs + # + # source://dotenv//lib/dotenv.rb#50 + def parse(*filenames, overwrite: T.unsafe(nil), ignore: T.unsafe(nil), &block); end + + # @raise [MissingKeys] + # + # source://dotenv//lib/dotenv.rb#126 + def require_keys(*keys); end + + # Restore `ENV` to a given state + # + # @param env [Hash] Hash of keys and values to restore, defaults to the last saved state + # @param safe [Boolean] Is it safe to modify `ENV`? Defaults to `true` in the main thread, otherwise raises an error. + # + # source://dotenv//lib/dotenv.rb#77 + def restore(env = T.unsafe(nil), safe: T.unsafe(nil)); end + + # Save the current `ENV` to be restored later + # + # source://dotenv//lib/dotenv.rb#67 + def save; end + + # Update `ENV` with the given hash of keys and values + # + # @param env [Hash] Hash of keys and values to set in `ENV` + # @param overwrite [Boolean] Overwrite existing `ENV` values + # + # source://dotenv//lib/dotenv.rb#98 + def update(env = T.unsafe(nil), overwrite: T.unsafe(nil)); end + + private + + # source://dotenv//lib/dotenv.rb#134 + def instrument(name, payload = T.unsafe(nil), &block); end +end + +# A diff between multiple states of ENV. +# +# source://dotenv//lib/dotenv/diff.rb#3 +class Dotenv::Diff + # Create a new diff. If given a block, the state of ENV after the block will be preserved as + # the final state for comparison. Otherwise, the current ENV will be the final state. + # + # @param a [Hash] the initial state, defaults to a snapshot of current ENV + # @param b [Hash] the final state, defaults to the current ENV + # @return [Diff] a new instance of Diff + # @yield [diff] a block to execute before recording the final state + # + # source://dotenv//lib/dotenv/diff.rb#16 + def initialize(a: T.unsafe(nil), b: T.unsafe(nil), &block); end + + # The initial state + # + # source://dotenv//lib/dotenv/diff.rb#5 + def a; end + + # Return a Hash of keys added with their new values + # + # source://dotenv//lib/dotenv/diff.rb#24 + def added; end + + # Returns true if any keys were added, removed, or changed + # + # @return [Boolean] + # + # source://dotenv//lib/dotenv/diff.rb#46 + def any?; end + + # The final or current state + # + # source://dotenv//lib/dotenv/diff.rb#8 + def b; end + + # Returns of Hash of keys changed with an array of their previous and new values + # + # source://dotenv//lib/dotenv/diff.rb#34 + def changed; end + + # Returns a Hash of all added, changed, and removed keys and their new values + # + # source://dotenv//lib/dotenv/diff.rb#41 + def env; end + + # Returns a Hash of keys removed with their previous values + # + # source://dotenv//lib/dotenv/diff.rb#29 + def removed; end + + private + + # source://dotenv//lib/dotenv/diff.rb#52 + def snapshot; end +end + +# A `.env` file that will be read and parsed into a Hash +# +# source://dotenv//lib/dotenv/environment.rb#3 +class Dotenv::Environment < ::Hash + # Create a new Environment + # + # @param filename [String] the path to the file to read + # @param overwrite [Boolean] whether the parser should assume existing values will be overwritten + # @return [Environment] a new instance of Environment + # + # source://dotenv//lib/dotenv/environment.rb#10 + def initialize(filename, overwrite: T.unsafe(nil)); end + + # Returns the value of attribute filename. + # + # source://dotenv//lib/dotenv/environment.rb#4 + def filename; end + + # source://dotenv//lib/dotenv/environment.rb#17 + def load; end + + # Returns the value of attribute overwrite. + # + # source://dotenv//lib/dotenv/environment.rb#4 + def overwrite; end + + # source://dotenv//lib/dotenv/environment.rb#21 + def read; end +end + +# source://dotenv//lib/dotenv/missing_keys.rb#2 +class Dotenv::Error < ::StandardError; end + +# Error raised when encountering a syntax error while parsing a .env file. +# +# source://dotenv//lib/dotenv/parser.rb#6 +class Dotenv::FormatError < ::SyntaxError; end + +# Logs instrumented events +# +# Usage: +# require "active_support/notifications" +# require "dotenv/log_subscriber" +# Dotenv.instrumenter = ActiveSupport::Notifications +# +# source://dotenv//lib/dotenv/log_subscriber.rb#11 +class Dotenv::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://dotenv//lib/dotenv/log_subscriber.rb#18 + def load(event); end + + # source://dotenv//lib/dotenv/log_subscriber.rb#14 + def logger; end + + # source://dotenv//lib/dotenv/log_subscriber.rb#34 + def restore(event); end + + # source://dotenv//lib/dotenv/log_subscriber.rb#30 + def save(event); end + + # source://dotenv//lib/dotenv/log_subscriber.rb#24 + def update(event); end + + private + + # source://dotenv//lib/dotenv/log_subscriber.rb#57 + def color_env_constant; end + + # source://dotenv//lib/dotenv/log_subscriber.rb#49 + def color_filename(filename); end + + # source://dotenv//lib/dotenv/log_subscriber.rb#53 + def color_var(name); end +end + +# source://dotenv//lib/dotenv/missing_keys.rb#4 +class Dotenv::MissingKeys < ::Dotenv::Error + # @return [MissingKeys] a new instance of MissingKeys + # + # source://dotenv//lib/dotenv/missing_keys.rb#5 + def initialize(keys); end +end + +# Parses the `.env` file format into key/value pairs. +# It allows for variable substitutions, command substitutions, and exporting of variables. +# +# source://dotenv//lib/dotenv/parser.rb#10 +class Dotenv::Parser + # @return [Parser] a new instance of Parser + # + # source://dotenv//lib/dotenv/parser.rb#40 + def initialize(string, overwrite: T.unsafe(nil)); end + + # source://dotenv//lib/dotenv/parser.rb#46 + def call; end + + private + + # source://dotenv//lib/dotenv/parser.rb#82 + def expand_newlines(value); end + + # source://dotenv//lib/dotenv/parser.rb#62 + def parse_line(line); end + + # source://dotenv//lib/dotenv/parser.rb#70 + def parse_value(value); end + + # source://dotenv//lib/dotenv/parser.rb#104 + def perform_substitutions(value, maybe_quote); end + + # source://dotenv//lib/dotenv/parser.rb#78 + def unescape_characters(value); end + + # source://dotenv//lib/dotenv/parser.rb#94 + def unescape_value(value, maybe_quote); end + + # @return [Boolean] + # + # source://dotenv//lib/dotenv/parser.rb#90 + def variable_not_set?(line); end + + class << self + # source://dotenv//lib/dotenv/parser.rb#35 + def call(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute substitutions. + # + # source://dotenv//lib/dotenv/parser.rb#33 + def substitutions; end + end +end + +# source://dotenv//lib/dotenv/parser.rb#14 +Dotenv::Parser::LINE = T.let(T.unsafe(nil), Regexp) + +# Rails integration for using Dotenv to load ENV variables from a file +# +# source://dotenv//lib/dotenv/rails.rb#22 +class Dotenv::Rails < ::Rails::Railtie + # @return [Rails] a new instance of Rails + # + # source://dotenv//lib/dotenv/rails.rb#25 + def initialize; end + + # source://dotenv//lib/dotenv/rails.rb#23 + def autorestore(*_arg0, **_arg1, &_arg2); end + + # source://dotenv//lib/dotenv/rails.rb#23 + def autorestore=(arg); end + + # source://dotenv//lib/dotenv/rails.rb#83 + def deprecator; end + + # The current environment that the app is running in. + # + # When running `rake`, the Rails application is initialized in development, so we have to + # check which rake tasks are being run to determine the environment. + # + # See https://github.com/bkeepers/dotenv/issues/219 + # + # source://dotenv//lib/dotenv/rails.rb#73 + def env; end + + # source://dotenv//lib/dotenv/rails.rb#23 + def files(*_arg0, **_arg1, &_arg2); end + + # source://dotenv//lib/dotenv/rails.rb#23 + def files=(arg); end + + # Public: Load dotenv + # + # This will get called during the `before_configuration` callback, but you + # can manually call `Dotenv::Rails.load` if you needed it sooner. + # + # source://dotenv//lib/dotenv/rails.rb#45 + def load; end + + # source://dotenv//lib/dotenv/rails.rb#23 + def logger(*_arg0, **_arg1, &_arg2); end + + # Set a new logger and replay logs + # + # source://dotenv//lib/dotenv/rails.rb#62 + def logger=(new_logger); end + + # source://dotenv//lib/dotenv/rails.rb#49 + def overload; end + + # source://dotenv//lib/dotenv/rails.rb#23 + def overwrite(*_arg0, **_arg1, &_arg2); end + + # source://dotenv//lib/dotenv/rails.rb#23 + def overwrite=(arg); end + + # Internal: `Rails.root` is nil in Rails 4.1 before the application is + # initialized, so this falls back to the `RAILS_ROOT` environment variable, + # or the current working directory. + # + # source://dotenv//lib/dotenv/rails.rb#57 + def root; end + + class << self + # Rails uses `#method_missing` to delegate all class methods to the + # instance, which means `Kernel#load` gets called here. We don't want that. + # + # source://dotenv//lib/dotenv/rails.rb#89 + def load; end + end +end + +# source://dotenv//lib/dotenv/rails.rb#81 +Dotenv::Rails::TEST_RAKE_TASKS = T.let(T.unsafe(nil), Regexp) + +# source://dotenv//lib/dotenv/rails.rb#110 +Dotenv::Railtie = Dotenv::Rails + +# A logger that can be used before the apps real logger is initialized. +# +# source://dotenv//lib/dotenv/replay_logger.rb#3 +class Dotenv::ReplayLogger < ::Logger + # @return [ReplayLogger] a new instance of ReplayLogger + # + # source://dotenv//lib/dotenv/replay_logger.rb#4 + def initialize; end + + # Override the add method to store logs so we can replay them to a real logger later. + # + # source://dotenv//lib/dotenv/replay_logger.rb#10 + def add(*args, &block); end + + # Replay the store logs to a real logger. + # + # source://dotenv//lib/dotenv/replay_logger.rb#15 + def replay(logger); end +end + +# An internal monitor to synchronize access to ENV in multi-threaded environments. +# +# source://dotenv//lib/dotenv.rb#12 +Dotenv::SEMAPHORE = T.let(T.unsafe(nil), Monitor) + +# source://dotenv//lib/dotenv/substitutions/variable.rb#4 +module Dotenv::Substitutions; end + +# Substitute shell commands in a value. +# +# SHA=$(git rev-parse HEAD) +# +# source://dotenv//lib/dotenv/substitutions/command.rb#9 +module Dotenv::Substitutions::Command + class << self + # source://dotenv//lib/dotenv/substitutions/command.rb#23 + def call(value, _env, overwrite: T.unsafe(nil)); end + end +end + +# Substitute variables in a value. +# +# HOST=example.com +# URL="https://$HOST" +# +# source://dotenv//lib/dotenv/substitutions/variable.rb#10 +module Dotenv::Substitutions::Variable + class << self + # source://dotenv//lib/dotenv/substitutions/variable.rb#21 + def call(value, env, overwrite: T.unsafe(nil)); end + + private + + # source://dotenv//lib/dotenv/substitutions/variable.rb#31 + def substitute(match, variable, env); end + end +end + +# source://dotenv//lib/dotenv/version.rb#2 +Dotenv::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/drb@2.2.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/drb@2.2.1.rbi new file mode 100644 index 0000000..d97695d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/drb@2.2.1.rbi @@ -0,0 +1,1347 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `drb` gem. +# Please instead update this file by running `bin/tapioca gem drb`. + + +# for ruby-1.8.0 +# +# source://drb//lib/drb/eq.rb#2 +module DRb + private + + # Get the configuration of the current server. + # + # If there is no current server, this returns the default configuration. + # See #current_server and DRbServer::make_config. + # + # source://drb//lib/drb/drb.rb#1832 + def config; end + + # Get the 'current' server. + # + # In the context of execution taking place within the main + # thread of a dRuby server (typically, as a result of a remote + # call on the server or one of its objects), the current + # server is that server. Otherwise, the current server is + # the primary server. + # + # If the above rule fails to find a server, a DRbServerNotFound + # error is raised. + # + # @raise [DRbServerNotFound] + # + # source://drb//lib/drb/drb.rb#1789 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//lib/drb/drb.rb#1934 + def fetch_server(uri); end + + # Get the front object of the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1843 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1822 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//lib/drb/drb.rb#1888 + def install_acl(acl); end + + # Set the default id conversion object. + # + # This is expected to be an instance such as DRb::DRbIdConv that responds to + # #to_id and #to_obj that can convert objects to and from DRb references. + # + # See DRbServer#default_id_conv. + # + # source://drb//lib/drb/drb.rb#1880 + def install_id_conv(idconv); end + + # source://drb//lib/drb/drb.rb#1894 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server=(_arg0); end + + # Registers +server+ with DRb. + # + # This is called when a new DRb::DRbServer is created. + # + # If there is no primary server then +server+ becomes the primary server. + # + # Example: + # + # require 'drb' + # + # s = DRb::DRbServer.new # automatically calls regist_server + # DRb.fetch_server s.uri #=> # + # + # source://drb//lib/drb/drb.rb#1912 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//lib/drb/drb.rb#1921 + def remove_server(server); end + + # Start a dRuby server locally. + # + # The new dRuby server will become the primary server, even + # if another server is currently the primary server. + # + # +uri+ is the URI for the server to bind to. If nil, + # the server will bind to random port on the default local host + # name and use the default dRuby protocol. + # + # +front+ is the server's front object. This may be nil. + # + # +config+ is the configuration for the new server. This may + # be nil. + # + # See DRbServer::new. + # + # source://drb//lib/drb/drb.rb#1768 + def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end + + # Stop the local dRuby server. + # + # This operates on the primary server. If there is no primary + # server currently running, it is a noop. + # + # source://drb//lib/drb/drb.rb#1801 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//lib/drb/drb.rb#1869 + def thread; end + + # Get a reference id for an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1860 + def to_id(obj); end + + # Convert a reference into an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1852 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//lib/drb/drb.rb#1810 + def uri; end + + class << self + # Get the configuration of the current server. + # + # If there is no current server, this returns the default configuration. + # See #current_server and DRbServer::make_config. + # + # source://drb//lib/drb/drb.rb#1832 + def config; end + + # Get the 'current' server. + # + # In the context of execution taking place within the main + # thread of a dRuby server (typically, as a result of a remote + # call on the server or one of its objects), the current + # server is that server. Otherwise, the current server is + # the primary server. + # + # If the above rule fails to find a server, a DRbServerNotFound + # error is raised. + # + # @raise [DRbServerNotFound] + # + # source://drb//lib/drb/drb.rb#1789 + def current_server; end + + # Retrieves the server with the given +uri+. + # + # See also regist_server and remove_server. + # + # source://drb//lib/drb/drb.rb#1934 + def fetch_server(uri); end + + # Get the front object of the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1843 + def front; end + + # Is +uri+ the URI for the current local server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1822 + def here?(uri); end + + # Set the default ACL to +acl+. + # + # See DRb::DRbServer.default_acl. + # + # source://drb//lib/drb/drb.rb#1888 + def install_acl(acl); end + + # Set the default id conversion object. + # + # This is expected to be an instance such as DRb::DRbIdConv that responds to + # #to_id and #to_obj that can convert objects to and from DRb references. + # + # See DRbServer#default_id_conv. + # + # source://drb//lib/drb/drb.rb#1880 + def install_id_conv(idconv); end + + # source://drb//lib/drb/drb.rb#1894 + def mutex; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server; end + + # The primary local dRuby server. + # + # This is the server created by the #start_service call. + # + # source://drb//lib/drb/drb.rb#1776 + def primary_server=(_arg0); end + + # Registers +server+ with DRb. + # + # This is called when a new DRb::DRbServer is created. + # + # If there is no primary server then +server+ becomes the primary server. + # + # Example: + # + # require 'drb' + # + # s = DRb::DRbServer.new # automatically calls regist_server + # DRb.fetch_server s.uri #=> # + # + # source://drb//lib/drb/drb.rb#1912 + def regist_server(server); end + + # Removes +server+ from the list of registered servers. + # + # source://drb//lib/drb/drb.rb#1921 + def remove_server(server); end + + # Start a dRuby server locally. + # + # The new dRuby server will become the primary server, even + # if another server is currently the primary server. + # + # +uri+ is the URI for the server to bind to. If nil, + # the server will bind to random port on the default local host + # name and use the default dRuby protocol. + # + # +front+ is the server's front object. This may be nil. + # + # +config+ is the configuration for the new server. This may + # be nil. + # + # See DRbServer::new. + # + # source://drb//lib/drb/drb.rb#1768 + def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end + + # Stop the local dRuby server. + # + # This operates on the primary server. If there is no primary + # server currently running, it is a noop. + # + # source://drb//lib/drb/drb.rb#1801 + def stop_service; end + + # Get the thread of the primary server. + # + # This returns nil if there is no primary server. See #primary_server. + # + # source://drb//lib/drb/drb.rb#1869 + def thread; end + + # Get a reference id for an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1860 + def to_id(obj); end + + # Convert a reference into an object using the current server. + # + # This raises a DRbServerNotFound error if there is no current server. + # See #current_server. + # + # source://drb//lib/drb/drb.rb#1852 + def to_obj(ref); end + + # Get the URI defining the local dRuby space. + # + # This is the URI of the current server. See #current_server. + # + # source://drb//lib/drb/drb.rb#1810 + def uri; end + end +end + +# An Array wrapper that can be sent to another server via DRb. +# +# All entries in the array will be dumped or be references that point to +# the local server. +# +# source://drb//lib/drb/drb.rb#518 +class DRb::DRbArray + # Creates a new DRbArray that either dumps or wraps all the items in the + # Array +ary+ so they can be loaded by a remote DRb server. + # + # @return [DRbArray] a new instance of DRbArray + # + # source://drb//lib/drb/drb.rb#523 + def initialize(ary); end + + # source://drb//lib/drb/drb.rb#542 + def _dump(lv); end + + class << self + # source://drb//lib/drb/drb.rb#538 + def _load(s); end + end +end + +# Class handling the connection between a DRbObject and the +# server the real object lives on. +# +# This class maintains a pool of connections, to reduce the +# overhead of starting and closing down connections for each +# method call. +# +# This class is used internally by DRbObject. The user does +# not normally need to deal with it directly. +# +# source://drb//lib/drb/drb.rb#1256 +class DRb::DRbConn + # @return [DRbConn] a new instance of DRbConn + # + # source://drb//lib/drb/drb.rb#1317 + def initialize(remote_uri); end + + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1333 + def alive?; end + + # source://drb//lib/drb/drb.rb#1328 + def close; end + + # source://drb//lib/drb/drb.rb#1323 + def send_message(ref, msg_id, arg, block); end + + # source://drb//lib/drb/drb.rb#1321 + def uri; end + + class << self + # source://drb//lib/drb/drb.rb#1259 + def make_pool; end + + # source://drb//lib/drb/drb.rb#1297 + def open(remote_uri); end + + # source://drb//lib/drb/drb.rb#1292 + def stop_pool; end + end +end + +# Class responsible for converting between an object and its id. +# +# This, the default implementation, uses an object's local ObjectSpace +# __id__ as its id. This means that an object's identification over +# drb remains valid only while that object instance remains alive +# within the server runtime. +# +# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb +# and DRbNameIdConv in sample/name.rb in the full drb distribution. +# +# source://drb//lib/drb/drb.rb#360 +class DRb::DRbIdConv + # Convert an object into a reference id. + # + # This implementation returns the object's __id__ in the local + # object space. + # + # source://drb//lib/drb/drb.rb#374 + def to_id(obj); end + + # Convert an object reference id to an object. + # + # This implementation looks up the reference id in the local object + # space and returns the object it refers to. + # + # source://drb//lib/drb/drb.rb#366 + def to_obj(ref); end +end + +# Handler for sending and receiving drb messages. +# +# This takes care of the low-level marshalling and unmarshalling +# of drb requests and responses sent over the wire between server +# and client. This relieves the implementor of a new drb +# protocol layer with having to deal with these details. +# +# The user does not have to directly deal with this object in +# normal use. +# +# source://drb//lib/drb/drb.rb#556 +class DRb::DRbMessage + # @return [DRbMessage] a new instance of DRbMessage + # + # source://drb//lib/drb/drb.rb#557 + def initialize(config); end + + # source://drb//lib/drb/drb.rb#562 + def dump(obj, error = T.unsafe(nil)); end + + # @raise [DRbConnError] + # + # source://drb//lib/drb/drb.rb#579 + def load(soc); end + + # source://drb//lib/drb/drb.rb#639 + def recv_reply(stream); end + + # @raise [DRbConnError] + # + # source://drb//lib/drb/drb.rb#619 + def recv_request(stream); end + + # source://drb//lib/drb/drb.rb#633 + def send_reply(stream, succ, result); end + + # source://drb//lib/drb/drb.rb#605 + def send_request(stream, ref, msg_id, arg, b); end + + private + + # source://drb//lib/drb/drb.rb#646 + def make_proxy(obj, error = T.unsafe(nil)); end +end + +# source://drb//lib/drb/eq.rb#3 +class DRb::DRbObject + # Create a new remote object stub. + # + # +obj+ is the (local) object we want to create a stub for. Normally + # this is +nil+. +uri+ is the URI of the remote object that this + # will be a stub for. + # + # @return [DRbObject] a new instance of DRbObject + # + # source://drb//lib/drb/drb.rb#1089 + def initialize(obj, uri = T.unsafe(nil)); end + + # source://drb//lib/drb/eq.rb#4 + def ==(other); end + + # Get the reference of the object, if local. + # + # source://drb//lib/drb/drb.rb#1115 + def __drbref; end + + # Get the URI of the remote object. + # + # source://drb//lib/drb/drb.rb#1110 + def __drburi; end + + # Marshall this object. + # + # The URI and ref of the object are marshalled. + # + # source://drb//lib/drb/drb.rb#1080 + def _dump(lv); end + + # source://drb//lib/drb/eq.rb#4 + def eql?(other); end + + # source://drb//lib/drb/eq.rb#9 + def hash; end + + # source://drb//lib/drb/drb.rb#1135 + def method_missing(msg_id, *a, **_arg2, &b); end + + # source://drb//lib/drb/drb.rb#1187 + def pretty_print(q); end + + # source://drb//lib/drb/drb.rb#1191 + def pretty_print_cycle(q); end + + # Routes respond_to? to the referenced remote object. + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1123 + def respond_to?(msg_id, priv = T.unsafe(nil)); end + + class << self + # Unmarshall a marshalled DRbObject. + # + # If the referenced object is located within the local server, then + # the object itself is returned. Otherwise, a new DRbObject is + # created to act as a stub for the remote referenced object. + # + # source://drb//lib/drb/drb.rb#1051 + def _load(s); end + + # Creates a DRb::DRbObject given the reference information to the remote + # host +uri+ and object +ref+. + # + # source://drb//lib/drb/drb.rb#1065 + def new_with(uri, ref); end + + # Create a new DRbObject from a URI alone. + # + # source://drb//lib/drb/drb.rb#1073 + def new_with_uri(uri); end + + # Returns a modified backtrace from +result+ with the +uri+ where each call + # in the backtrace came from. + # + # source://drb//lib/drb/drb.rb#1173 + def prepare_backtrace(uri, result); end + + # Given the +uri+ of another host executes the block provided. + # + # source://drb//lib/drb/drb.rb#1160 + def with_friend(uri); end + end +end + +# Module managing the underlying network protocol(s) used by drb. +# +# By default, drb uses the DRbTCPSocket protocol. Other protocols +# can be defined. A protocol must define the following class methods: +# +# [open(uri, config)] Open a client connection to the server at +uri+, +# using configuration +config+. Return a protocol +# instance for this connection. +# [open_server(uri, config)] Open a server listening at +uri+, +# using configuration +config+. Return a +# protocol instance for this listener. +# [uri_option(uri, config)] Take a URI, possibly containing an option +# component (e.g. a trailing '?param=val'), +# and return a [uri, option] tuple. +# +# All of these methods should raise a DRbBadScheme error if the URI +# does not identify the protocol they support (e.g. "druby:" for +# the standard Ruby protocol). This is how the DRbProtocol module, +# given a URI, determines which protocol implementation serves that +# protocol. +# +# The protocol instance returned by #open_server must have the +# following methods: +# +# [accept] Accept a new connection to the server. Returns a protocol +# instance capable of communicating with the client. +# [close] Close the server connection. +# [uri] Get the URI for this server. +# +# The protocol instance returned by #open must have the following methods: +# +# [send_request (ref, msg_id, arg, b)] +# Send a request to +ref+ with the given message id and arguments. +# This is most easily implemented by calling DRbMessage.send_request, +# providing a stream that sits on top of the current protocol. +# [recv_reply] +# Receive a reply from the server and return it as a [success-boolean, +# reply-value] pair. This is most easily implemented by calling +# DRb.recv_reply, providing a stream that sits on top of the +# current protocol. +# [alive?] +# Is this connection still alive? +# [close] +# Close this connection. +# +# The protocol instance returned by #open_server().accept() must have +# the following methods: +# +# [recv_request] +# Receive a request from the client and return a [object, message, +# args, block] tuple. This is most easily implemented by calling +# DRbMessage.recv_request, providing a stream that sits on top of +# the current protocol. +# [send_reply(succ, result)] +# Send a reply to the client. This is most easily implemented +# by calling DRbMessage.send_reply, providing a stream that sits +# on top of the current protocol. +# [close] +# Close this connection. +# +# A new protocol is registered with the DRbProtocol module using +# the add_protocol method. +# +# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, +# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full +# drb distribution. +# +# source://drb//lib/drb/drb.rb#721 +module DRb::DRbProtocol + private + + # Add a new protocol to the DRbProtocol module. + # + # source://drb//lib/drb/drb.rb#724 + def add_protocol(prot); end + + # source://drb//lib/drb/drb.rb#802 + def auto_load(uri); end + + # Open a client connection to +uri+ with the configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. If a protocol accepts the + # URI, but an error occurs in opening it, a DRbConnError is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#736 + def open(uri, config, first = T.unsafe(nil)); end + + # Open a server listening for connections at +uri+ with + # configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open a server at the URI. Each protocol signals that it does + # not handle that URI by raising a DRbBadScheme error. If no protocol + # recognises the URI, then a DRbBadURI error is raised. If a protocol + # accepts the URI, but an error occurs in opening it, the underlying + # error is passed on to the caller. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#764 + def open_server(uri, config, first = T.unsafe(nil)); end + + # Parse +uri+ into a [uri, option] pair. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to parse the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#785 + def uri_option(uri, config, first = T.unsafe(nil)); end + + class << self + # Add a new protocol to the DRbProtocol module. + # + # source://drb//lib/drb/drb.rb#724 + def add_protocol(prot); end + + # source://drb//lib/drb/drb.rb#802 + def auto_load(uri); end + + # Open a client connection to +uri+ with the configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. If a protocol accepts the + # URI, but an error occurs in opening it, a DRbConnError is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#736 + def open(uri, config, first = T.unsafe(nil)); end + + # Open a server listening for connections at +uri+ with + # configuration +config+. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to open a server at the URI. Each protocol signals that it does + # not handle that URI by raising a DRbBadScheme error. If no protocol + # recognises the URI, then a DRbBadURI error is raised. If a protocol + # accepts the URI, but an error occurs in opening it, the underlying + # error is passed on to the caller. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#764 + def open_server(uri, config, first = T.unsafe(nil)); end + + # Parse +uri+ into a [uri, option] pair. + # + # The DRbProtocol module asks each registered protocol in turn to + # try to parse the URI. Each protocol signals that it does not handle that + # URI by raising a DRbBadScheme error. If no protocol recognises the + # URI, then a DRbBadURI error is raised. + # + # @raise [DRbBadURI] + # + # source://drb//lib/drb/drb.rb#785 + def uri_option(uri, config, first = T.unsafe(nil)); end + end +end + +# An exception wrapping an error object +# +# source://drb//lib/drb/drb.rb#431 +class DRb::DRbRemoteError < ::DRb::DRbError + # Creates a new remote error that wraps the Exception +error+ + # + # @return [DRbRemoteError] a new instance of DRbRemoteError + # + # source://drb//lib/drb/drb.rb#434 + def initialize(error); end + + # the class of the error, as a string. + # + # source://drb//lib/drb/drb.rb#441 + def reason; end +end + +# source://drb//lib/drb/drb.rb#1350 +class DRb::DRbServer + # Create a new DRbServer instance. + # + # +uri+ is the URI to bind to. This is normally of the form + # 'druby://:' where is a hostname of + # the local machine. If nil, then the system's default hostname + # will be bound to, on a port selected by the system; these value + # can be retrieved from the +uri+ attribute. 'druby:' specifies + # the default dRuby transport protocol: another protocol, such + # as 'drbunix:', can be specified instead. + # + # +front+ is the front object for the server, that is, the object + # to which remote method calls on the server will be passed. If + # nil, then the server will not accept remote method calls. + # + # If +config_or_acl+ is a hash, it is the configuration to + # use for this server. The following options are recognised: + # + # :idconv :: an id-to-object conversion object. This defaults + # to an instance of the class DRb::DRbIdConv. + # :verbose :: if true, all unsuccessful remote calls on objects + # in the server will be logged to $stdout. false + # by default. + # :tcp_acl :: the access control list for this server. See + # the ACL class from the main dRuby distribution. + # :load_limit :: the maximum message size in bytes accepted by + # the server. Defaults to 25 MB (26214400). + # :argc_limit :: the maximum number of arguments to a remote + # method accepted by the server. Defaults to + # 256. + # The default values of these options can be modified on + # a class-wide basis by the class methods #default_argc_limit, + # #default_load_limit, #default_acl, #default_id_conv, + # and #verbose= + # + # If +config_or_acl+ is not a hash, but is not nil, it is + # assumed to be the access control list for this server. + # See the :tcp_acl option for more details. + # + # If no other server is currently set as the primary server, + # this will become the primary server. + # + # The server will immediately start running in its own thread. + # + # @return [DRbServer] a new instance of DRbServer + # + # source://drb//lib/drb/drb.rb#1451 + def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end + + # Is this server alive? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1506 + def alive?; end + + # Check that a method is callable via dRuby. + # + # +obj+ is the object we want to invoke the method on. +msg_id+ is the + # method name, as a Symbol. + # + # If the method is an insecure method (see #insecure_method?) a + # SecurityError is thrown. If the method is private or undefined, + # a NameError is thrown. + # + # @raise [ArgumentError] + # + # source://drb//lib/drb/drb.rb#1594 + def check_insecure_method(obj, msg_id); end + + # The configuration of this DRbServer + # + # source://drb//lib/drb/drb.rb#1493 + def config; end + + # The front object of the DRbServer. + # + # This object receives remote method calls made on the server's + # URI alone, with an object id. + # + # source://drb//lib/drb/drb.rb#1490 + def front; end + + # Is +uri+ the URI for this server? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1511 + def here?(uri); end + + # Stop this server. + # + # source://drb//lib/drb/drb.rb#1516 + def stop_service; end + + # The main thread of this DRbServer. + # + # This is the thread that listens for and accepts connections + # from clients, not that handles each client's request-response + # session. + # + # source://drb//lib/drb/drb.rb#1484 + def thread; end + + # Convert a local object to a dRuby reference. + # + # source://drb//lib/drb/drb.rb#1533 + def to_id(obj); end + + # Convert a dRuby reference to the local object it refers to. + # + # source://drb//lib/drb/drb.rb#1526 + def to_obj(ref); end + + # The URI of this DRbServer. + # + # source://drb//lib/drb/drb.rb#1477 + def uri; end + + # Get whether the server is in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//lib/drb/drb.rb#1503 + def verbose; end + + # Set whether to operate in verbose mode. + # + # In verbose mode, failed calls are logged to stdout. + # + # source://drb//lib/drb/drb.rb#1498 + def verbose=(v); end + + private + + # Coerce an object to a string, providing our own representation if + # to_s is not defined for the object. + # + # source://drb//lib/drb/drb.rb#1580 + def any_to_s(obj); end + + # source://drb//lib/drb/drb.rb#1696 + def error_print(exception); end + + # Has a method been included in the list of insecure methods? + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1574 + def insecure_method?(msg_id); end + + # The main loop performed by a DRbServer's internal thread. + # + # Accepts a connection from a client, and starts up its own + # thread to handle it. This thread loops, receiving requests + # from the client, invoking them on a local object, and + # returning responses, until the client closes the connection + # or a local method call fails. + # + # source://drb//lib/drb/drb.rb#1714 + def main_loop; end + + # Starts the DRb main loop in a new thread. + # + # source://drb//lib/drb/drb.rb#1555 + def run; end + + # source://drb//lib/drb/drb.rb#1540 + def shutdown; end + + class << self + # Set the default access control list to +acl+. The default ACL is +nil+. + # + # See also DRb::ACL and #new() + # + # source://drb//lib/drb/drb.rb#1375 + def default_acl(acl); end + + # Set the default value for the :argc_limit option. + # + # See #new(). The initial default value is 256. + # + # source://drb//lib/drb/drb.rb#1361 + def default_argc_limit(argc); end + + # Set the default value for the :id_conv option. + # + # See #new(). The initial default value is a DRbIdConv instance. + # + # source://drb//lib/drb/drb.rb#1382 + def default_id_conv(idconv); end + + # Set the default value for the :load_limit option. + # + # See #new(). The initial default value is 25 MB. + # + # source://drb//lib/drb/drb.rb#1368 + def default_load_limit(sz); end + + # source://drb//lib/drb/drb.rb#1398 + def make_config(hash = T.unsafe(nil)); end + + # Get the default value of the :verbose option. + # + # source://drb//lib/drb/drb.rb#1394 + def verbose; end + + # Set the default value of the :verbose option. + # + # See #new(). The initial default value is false. + # + # source://drb//lib/drb/drb.rb#1389 + def verbose=(on); end + end +end + +# source://drb//lib/drb/drb.rb#1624 +class DRb::DRbServer::InvokeMethod + include ::DRb::DRbServer::InvokeMethod18Mixin + + # @return [InvokeMethod] a new instance of InvokeMethod + # + # source://drb//lib/drb/drb.rb#1625 + def initialize(drb_server, client); end + + # source://drb//lib/drb/drb.rb#1630 + def perform; end + + private + + # source://drb//lib/drb/drb.rb#1667 + def check_insecure_method; end + + # source://drb//lib/drb/drb.rb#1659 + def init_with_client; end + + # source://drb//lib/drb/drb.rb#1676 + def perform_without_block; end + + # source://drb//lib/drb/drb.rb#1671 + def setup_message; end +end + +# source://drb//lib/drb/invokemethod.rb#6 +module DRb::DRbServer::InvokeMethod18Mixin + # source://drb//lib/drb/invokemethod.rb#7 + def block_yield(x); end + + # source://drb//lib/drb/invokemethod.rb#14 + def perform_with_block; end +end + +# The default drb protocol which communicates over a TCP socket. +# +# The DRb TCP protocol URI looks like: +# druby://:?. The option is optional. +# +# source://drb//lib/drb/drb.rb#815 +class DRb::DRbTCPSocket + # Create a new DRbTCPSocket instance. + # + # +uri+ is the URI we are connected to. + # +soc+ is the tcp socket we are bound to. +config+ is our + # configuration. + # + # @return [DRbTCPSocket] a new instance of DRbTCPSocket + # + # source://drb//lib/drb/drb.rb#903 + def initialize(uri, soc, config = T.unsafe(nil)); end + + # On the server side, for an instance returned by #open_server, + # accept a client connection and return a new instance to handle + # the server's side of this client-server session. + # + # source://drb//lib/drb/drb.rb#971 + def accept; end + + # Check to see if this connection is alive. + # + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1001 + def alive?; end + + # Close the connection. + # + # If this is an instance returned by #open_server, then this stops + # listening for new connections altogether. If this is an instance + # returned by #open or by #accept, then it closes this particular + # client-server session. + # + # source://drb//lib/drb/drb.rb#953 + def close; end + + # Get the address of our TCP peer (the other end of the socket + # we are bound to. + # + # source://drb//lib/drb/drb.rb#918 + def peeraddr; end + + # On the client side, receive a reply from the server. + # + # source://drb//lib/drb/drb.rb#941 + def recv_reply; end + + # On the server side, receive a request from the client. + # + # source://drb//lib/drb/drb.rb#931 + def recv_request; end + + # On the server side, send a reply to the client. + # + # source://drb//lib/drb/drb.rb#936 + def send_reply(succ, result); end + + # On the client side, send a request to the server. + # + # source://drb//lib/drb/drb.rb#926 + def send_request(ref, msg_id, arg, b); end + + # source://drb//lib/drb/drb.rb#1010 + def set_sockopt(soc); end + + # Graceful shutdown + # + # source://drb//lib/drb/drb.rb#996 + def shutdown; end + + # Get the socket. + # + # source://drb//lib/drb/drb.rb#923 + def stream; end + + # Get the URI that we are connected to. + # + # source://drb//lib/drb/drb.rb#914 + def uri; end + + private + + # source://drb//lib/drb/drb.rb#986 + def accept_or_shutdown; end + + # source://drb//lib/drb/drb.rb#962 + def close_shutdown_pipe; end + + class << self + # Returns the hostname of this server + # + # source://drb//lib/drb/drb.rb#845 + def getservername; end + + # Open a client connection to +uri+ (DRb URI string) using configuration + # +config+. + # + # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a + # recognized protocol. See DRb::DRbServer.new for information on built-in + # URI protocols. + # + # source://drb//lib/drb/drb.rb#838 + def open(uri, config); end + + # Open a server listening for connections at +uri+ using + # configuration +config+. + # + # source://drb//lib/drb/drb.rb#876 + def open_server(uri, config); end + + # For the families available for +host+, returns a TCPServer on +port+. + # If +port+ is 0 the first available port is used. IPv4 servers are + # preferred over IPv6 servers. + # + # source://drb//lib/drb/drb.rb#861 + def open_server_inaddr_any(host, port); end + + # source://drb//lib/drb/drb.rb#818 + def parse_uri(uri); end + + # Parse +uri+ into a [uri, option] pair. + # + # source://drb//lib/drb/drb.rb#893 + def uri_option(uri, config); end + end +end + +# Implements DRb over a UNIX socket +# +# DRb UNIX socket URIs look like drbunix:?. The +# option is optional. +# +# source://drb//lib/drb/unix.rb#15 +class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket + # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket + # + # source://drb//lib/drb/unix.rb#62 + def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end + + # source://drb//lib/drb/unix.rb#105 + def accept; end + + # source://drb//lib/drb/unix.rb#95 + def close; end + + # source://drb//lib/drb/unix.rb#111 + def set_sockopt(soc); end + + class << self + # source://drb//lib/drb/unix.rb#28 + def open(uri, config); end + + # source://drb//lib/drb/unix.rb#34 + def open_server(uri, config); end + + # :stopdoc: + # + # source://drb//lib/drb/unix.rb#17 + def parse_uri(uri); end + + # source://drb//lib/drb/unix.rb#72 + def temp_server; end + + # source://drb//lib/drb/unix.rb#57 + def uri_option(uri, config); end + end +end + +# import from tempfile.rb +# +# source://drb//lib/drb/unix.rb#70 +DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) + +# source://drb//lib/drb/drb.rb#1021 +class DRb::DRbURIOption + # @return [DRbURIOption] a new instance of DRbURIOption + # + # source://drb//lib/drb/drb.rb#1022 + def initialize(option); end + + # source://drb//lib/drb/drb.rb#1028 + def ==(other); end + + # source://drb//lib/drb/drb.rb#1028 + def eql?(other); end + + # source://drb//lib/drb/drb.rb#1033 + def hash; end + + # Returns the value of attribute option. + # + # source://drb//lib/drb/drb.rb#1025 + def option; end + + # source://drb//lib/drb/drb.rb#1026 + def to_s; end +end + +# Mixin module making an object undumpable or unmarshallable. +# +# If an object which includes this module is returned by method +# called over drb, then the object remains in the server space +# and a reference to the object is returned, rather than the +# object being marshalled and moved into the client space. +# +# source://drb//lib/drb/drb.rb#390 +module DRb::DRbUndumped + # @raise [TypeError] + # + # source://drb//lib/drb/drb.rb#391 + def _dump(dummy); end +end + +# Class wrapping a marshalled object whose type is unknown locally. +# +# If an object is returned by a method invoked over drb, but the +# class of the object is unknown in the client namespace, or +# the object is a constant unknown in the client namespace, then +# the still-marshalled object is returned wrapped in a DRbUnknown instance. +# +# If this object is passed as an argument to a method invoked over +# drb, then the wrapped object is passed instead. +# +# The class or constant name of the object can be read from the +# +name+ attribute. The marshalled object is held in the +buf+ +# attribute. +# +# source://drb//lib/drb/drb.rb#457 +class DRb::DRbUnknown + # Create a new DRbUnknown object. + # + # +buf+ is a string containing a marshalled object that could not + # be unmarshalled. +err+ is the error message that was raised + # when the unmarshalling failed. It is used to determine the + # name of the unmarshalled object. + # + # @return [DRbUnknown] a new instance of DRbUnknown + # + # source://drb//lib/drb/drb.rb#465 + def initialize(err, buf); end + + # source://drb//lib/drb/drb.rb#494 + def _dump(lv); end + + # Buffer contained the marshalled, unknown object. + # + # source://drb//lib/drb/drb.rb#484 + def buf; end + + # Create a DRbUnknownError exception containing this object. + # + # source://drb//lib/drb/drb.rb#508 + def exception; end + + # The name of the unknown thing. + # + # Class name for unknown objects; variable name for unknown + # constants. + # + # source://drb//lib/drb/drb.rb#481 + def name; end + + # Attempt to load the wrapped marshalled object again. + # + # If the class of the object is now known locally, the object + # will be unmarshalled and returned. Otherwise, a new + # but identical DRbUnknown object will be returned. + # + # source://drb//lib/drb/drb.rb#503 + def reload; end + + class << self + # source://drb//lib/drb/drb.rb#486 + def _load(s); end + end +end + +# An exception wrapping a DRb::DRbUnknown object +# +# source://drb//lib/drb/drb.rb#410 +class DRb::DRbUnknownError < ::DRb::DRbError + # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ + # + # @return [DRbUnknownError] a new instance of DRbUnknownError + # + # source://drb//lib/drb/drb.rb#413 + def initialize(unknown); end + + # source://drb//lib/drb/drb.rb#425 + def _dump(lv); end + + # Get the wrapped DRb::DRbUnknown object. + # + # source://drb//lib/drb/drb.rb#419 + def unknown; end + + class << self + # source://drb//lib/drb/drb.rb#421 + def _load(s); end + end +end + +# source://drb//lib/drb/drb.rb#1199 +class DRb::ThreadObject + include ::MonitorMixin + + # @return [ThreadObject] a new instance of ThreadObject + # + # source://drb//lib/drb/drb.rb#1202 + def initialize(&blk); end + + # source://drb//lib/drb/drb.rb#1237 + def _execute; end + + # @return [Boolean] + # + # source://drb//lib/drb/drb.rb#1213 + def alive?; end + + # source://drb//lib/drb/drb.rb#1217 + def kill; end + + # source://drb//lib/drb/drb.rb#1222 + def method_missing(msg, *arg, &blk); end +end + +# source://drb//lib/drb/version.rb#2 +DRb::VERSION = T.let(T.unsafe(nil), String) + +# source://drb//lib/drb/drb.rb#1943 +DRbIdConv = DRb::DRbIdConv + +# :stopdoc: +# +# source://drb//lib/drb/drb.rb#1941 +DRbObject = DRb::DRbObject + +# source://drb//lib/drb/drb.rb#1942 +DRbUndumped = DRb::DRbUndumped diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-core@1.0.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-core@1.0.1.rbi new file mode 100644 index 0000000..79610ab --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-core@1.0.1.rbi @@ -0,0 +1,1878 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dry-core` gem. +# Please instead update this file by running `bin/tapioca gem dry-core`. + + +# source://dry-core//lib/dry/core/constants.rb#5 +module Dry + class << self + # Build an equalizer module for the inclusion in other class + # + # ## Credits + # + # Equalizer has been originally imported from the equalizer gem created by Dan Kubb + # + # @api public + # + # source://dry-core//lib/dry/core.rb#52 + def Equalizer(*keys, **options); end + + # source://dry-struct/1.6.0/lib/dry/struct.rb#30 + def Struct(attributes = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#253 + def Types(*namespaces, default: T.unsafe(nil), **aliases); end + end +end + +# source://dry-core//lib/dry/core/constants.rb#6 +module Dry::Core + include ::Dry::Core::Constants + + class << self + # Build an equalizer module for the inclusion in other class + # + # ## Credits + # + # Equalizer has been originally imported from the equalizer gem created by Dan Kubb + # + # @api public + # + # source://dry-core//lib/dry/core.rb#38 + def Equalizer(*keys, **options); end + + # source://dry-core//lib/dry/core.rb#15 + def loader; end + end +end + +# BasicObject +# +# @since 0.8.0 +# +# source://dry-core//lib/dry/core/basic_object.rb#9 +class Dry::Core::BasicObject < ::BasicObject + # Returns the class for debugging purposes. + # + # @see http://ruby-doc.org/core/Object.html#method-i-class + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#32 + def class; end + + # source://dry-core//lib/dry/core/basic_object.rb#44 + def inspect; end + + # @since 0.8.0 + def instance_of?(_arg0); end + + # @since 0.8.0 + def is_a?(_arg0); end + + # @since 0.8.0 + def kind_of?(_arg0); end + + # Alias for __id__ + # + # @return [Fixnum] the object id + # @see http://ruby-doc.org/core/Object.html#method-i-object_id + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#101 + def object_id; end + + # Interface for pp + # + # @param printer [PP] the Pretty Printable printer + # @return [String] the pretty-printable inspection of the object + # @see https://ruby-doc.org/stdlib/libdoc/pp/rdoc/PP.html + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#113 + def pretty_print(printer); end + + # Returns true if responds to the given method. + # + # @return [TrueClass, FalseClass] the result of the check + # @see http://ruby-doc.org/core/Object.html#method-i-respond_to-3F + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#124 + def respond_to?(method_name, include_all = T.unsafe(nil)); end + + private + + # @api private + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#140 + def __inspect; end + + # Must be overridden by descendants + # + # @api private + # @return [Boolean] + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#134 + def respond_to_missing?(_method_name, _include_all); end + + class << self + # Lookups constants at the top-level namespace, if they are missing in the + # current context. + # + # @api private + # @param name [Symbol] the constant name + # @raise [NameError] if the constant cannot be found + # @return [Object, Module] the constant + # @see https://ruby-doc.org/core/Module.html#method-i-const_missing + # @since 0.8.0 + # + # source://dry-core//lib/dry/core/basic_object.rb#23 + def const_missing(name); end + end +end + +# Allows you to cache call results that are solely determined by arguments. +# +# @api public +# @example +# require 'dry/core/cache' +# +# class Foo +# extend Dry::Core::Cache +# +# def heavy_computation(arg1, arg2) +# fetch_or_store(arg1, arg2) { arg1 ^ arg2 } +# end +# end +# +# source://dry-core//lib/dry/core/cache.rb#21 +module Dry::Core::Cache + # @api private + # + # source://dry-core//lib/dry/core/cache.rb#36 + def cache; end + + # Caches a result of the block evaluation + # + # @api public + # @note beware Proc instance hashes are not equal, i.e. -> { 1 }.hash != -> { 1 }.hash, + # this means you shouldn't pass Procs in args unless you're sure + # they are always the same instances, otherwise you introduce a memory leak + # @param args [Array] List of hashable objects + # @return [Object] block's return value (cached for subsequent calls with + # the same argument values) + # @yield An arbitrary block + # + # source://dry-core//lib/dry/core/cache.rb#51 + def fetch_or_store(*args, &block); end + + # @api private + # + # source://dry-core//lib/dry/core/cache.rb#30 + def inherited(klass); end + + class << self + # @api private + # @private + # + # source://dry-core//lib/dry/core/cache.rb#23 + def extended(klass); end + end +end + +# Instance methods +# +# @api public +# +# source://dry-core//lib/dry/core/cache.rb#56 +module Dry::Core::Cache::Methods + # Delegates call to the class-level method + # + # @api public + # @param args [Array] List of hashable objects + # @return [Object] block's return value + # @yield An arbitrary block + # + # source://dry-core//lib/dry/core/cache.rb#63 + def fetch_or_store(*_arg0, **_arg1, &_arg2); end +end + +# Internal support module for class-level settings +# +# @api public +# +# source://dry-core//lib/dry/core/class_attributes.rb#10 +module Dry::Core::ClassAttributes + include ::Dry::Core::Constants + + # Specify what attributes a class will use + # + # @api public + # @example + # class ExtraClass + # extend Dry::Core::ClassAttributes + # + # defines :hello + # + # hello 'world' + # end + # @example with inheritance and type checking + # + # class MyClass + # extend Dry::Core::ClassAttributes + # + # defines :one, :two, type: Integer + # + # one 1 + # two 2 + # end + # + # class OtherClass < MyClass + # two 3 + # end + # + # MyClass.one # => 1 + # MyClass.two # => 2 + # + # OtherClass.one # => 1 + # OtherClass.two # => 3 + # @example with dry-types + # + # class Foo + # extend Dry::Core::ClassAttributes + # + # defines :one, :two, type: Dry::Types['strict.int'] + # end + # @example with coercion using Proc + # + # class Bar + # extend Dry::Core::ClassAttributes + # + # defines :one, coerce: proc { |value| value.to_s } + # end + # @example with coercion using dry-types + # + # class Bar + # extend Dry::Core::ClassAttributes + # + # defines :one, coerce: Dry::Types['coercible.string'] + # end + # + # source://dry-core//lib/dry/core/class_attributes.rb#68 + def defines(*args, type: T.unsafe(nil), coerce: T.unsafe(nil)); end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::EMPTY_OPTS = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::IDENTITY = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::Self = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::ClassAttributes::Undefined = T.let(T.unsafe(nil), Object) + +# Class for generating more classes +# +# source://dry-core//lib/dry/core/class_builder.rb#6 +class Dry::Core::ClassBuilder + # @return [ClassBuilder] a new instance of ClassBuilder + # + # source://dry-core//lib/dry/core/class_builder.rb#11 + def initialize(name:, parent: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # Generate a class based on options + # + # @example Create anonymous class + # builder = Dry::Core::ClassBuilder.new(name: 'MyClass') + # + # klass = builder.call + # klass.name # => "MyClass" + # @example Create named class + # builder = Dry::Core::ClassBuilder.new(name: 'User', namespace: Entities) + # + # klass = builder.call + # klass.name # => "Entities::User" + # klass.superclass.name # => "Entities::User" + # Entities::User # => "Entities::User" + # klass.superclass == Entities::User # => true + # @return [Class] + # @yield [klass] + # + # source://dry-core//lib/dry/core/class_builder.rb#35 + def call; end + + # Returns the value of attribute name. + # + # source://dry-core//lib/dry/core/class_builder.rb#9 + def name; end + + # Returns the value of attribute namespace. + # + # source://dry-core//lib/dry/core/class_builder.rb#9 + def namespace; end + + # Returns the value of attribute parent. + # + # source://dry-core//lib/dry/core/class_builder.rb#9 + def parent; end + + private + + # @api private + # + # source://dry-core//lib/dry/core/class_builder.rb#50 + def create_anonymous; end + + # @api private + # + # source://dry-core//lib/dry/core/class_builder.rb#81 + def create_base(namespace, name, parent); end + + # @api private + # + # source://dry-core//lib/dry/core/class_builder.rb#64 + def create_named; end +end + +# source://dry-core//lib/dry/core/class_builder.rb#7 +class Dry::Core::ClassBuilder::ParentClassMismatch < ::TypeError; end + +# A list of constants you can use to avoid memory allocations or identity checks. +# +# @api public +# @example Just include this module to your class or module +# class Foo +# include Dry::Core::Constants +# def call(value = EMPTY_ARRAY) +# value.map(&:to_s) +# end +# end +# +# source://dry-core//lib/dry/core/constants.rb#18 +module Dry::Core::Constants + class << self + # @api public + # @private + # + # source://dry-core//lib/dry/core/constants.rb#108 + def included(base); end + end +end + +# An empty array +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#20 +Dry::Core::Constants::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# An empty hash +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#22 +Dry::Core::Constants::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# An empty list of options +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#24 +Dry::Core::Constants::EMPTY_OPTS = T.let(T.unsafe(nil), Hash) + +# An empty set +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#26 +Dry::Core::Constants::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# An empty string +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#28 +Dry::Core::Constants::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# Identity function +# +# @api public +# +# source://dry-core//lib/dry/core/constants.rb#30 +Dry::Core::Constants::IDENTITY = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/constants.rb#45 +Dry::Core::Constants::Self = T.let(T.unsafe(nil), Proc) + +# A special value you can use as a default to know if no arguments +# were passed to the method +# +# @api public +# @example +# def method(value = Undefined) +# if Undefined.equal?(value) +# puts 'no args' +# else +# puts value +# end +# end +# +# source://dry-core//lib/dry/core/constants.rb#43 +Dry::Core::Constants::Undefined = T.let(T.unsafe(nil), Object) + +# Thread-safe object registry +# +# @api public +# @example +# +# container = Dry::Core::Container.new +# container.register(:item, 'item') +# container.resolve(:item) +# => 'item' +# +# container.register(:item1, -> { 'item' }) +# container.resolve(:item1) +# => 'item' +# +# container.register(:item2, -> { 'item' }, call: false) +# container.resolve(:item2) +# => # +# +# source://dry-core//lib/dry/core/container.rb#23 +class Dry::Core::Container + include ::Dry::Core::Container::Mixin::Initializer + include ::Dry::Core::Constants + include ::Dry::Core::Container::Mixin + extend ::Dry::Core::Container::Configuration + + # source://dry-core//lib/dry/core/container/mixin.rb#83 + def config; end +end + +# @api public +# +# source://dry-core//lib/dry/core/container/config.rb#7 +class Dry::Core::Container::Config + # @api private + # @return [Config] a new instance of Config + # + # source://dry-core//lib/dry/core/container/config.rb#22 + def initialize(namespace_separator: T.unsafe(nil), resolver: T.unsafe(nil), registry: T.unsafe(nil)); end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#13 + def namespace_separator; end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#13 + def namespace_separator=(_arg0); end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#19 + def registry; end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#19 + def registry=(_arg0); end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#16 + def resolver; end + + # @api public + # + # source://dry-core//lib/dry/core/container/config.rb#16 + def resolver=(_arg0); end +end + +# @api public +# +# source://dry-core//lib/dry/core/container/config.rb#8 +Dry::Core::Container::Config::DEFAULT_NAMESPACE_SEPARATOR = T.let(T.unsafe(nil), String) + +# @api public +# +# source://dry-core//lib/dry/core/container/config.rb#10 +Dry::Core::Container::Config::DEFAULT_REGISTRY = T.let(T.unsafe(nil), Dry::Core::Container::Registry) + +# @api public +# +# source://dry-core//lib/dry/core/container/config.rb#9 +Dry::Core::Container::Config::DEFAULT_RESOLVER = T.let(T.unsafe(nil), Dry::Core::Container::Resolver) + +# @api public +# +# source://dry-core//lib/dry/core/container/configuration.rb#7 +module Dry::Core::Container::Configuration + # source://dry-core//lib/dry/core/container/configuration.rb#25 + def config; end + + # @api private + # @yield [config] + # + # source://dry-core//lib/dry/core/container/configuration.rb#31 + def configure; end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::EMPTY_OPTS = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://dry-core//lib/dry/core/container/mixin.rb#12 +class Dry::Core::Container::Error < ::StandardError; end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::IDENTITY = T.let(T.unsafe(nil), Proc) + +# Base class to abstract Memoizable and Callable implementations +# +# @api abstract +# +# source://dry-core//lib/dry/core/container/item.rb#10 +class Dry::Core::Container::Item + # @api abstract + # @return [Item] a new instance of Item + # + # source://dry-core//lib/dry/core/container/item.rb#18 + def initialize(item, options = T.unsafe(nil)); end + + # @api abstract + # @raise [NotImplementedError] + # + # source://dry-core//lib/dry/core/container/item.rb#26 + def call; end + + # @api abstract + # @private + # @return [Boolean] + # + # source://dry-core//lib/dry/core/container/item.rb#36 + def callable?; end + + # @api abstract + # @return [Mixed] the item to be solved later + # + # source://dry-core//lib/dry/core/container/item.rb#12 + def item; end + + # Build a new item with transformation applied + # + # @api abstract + # @private + # + # source://dry-core//lib/dry/core/container/item.rb#43 + def map(func); end + + # @api abstract + # @return [Hash] the options to memoize, call or no. + # + # source://dry-core//lib/dry/core/container/item.rb#15 + def options; end + + # @api abstract + # @private + # @return [Boolean] + # + # source://dry-core//lib/dry/core/container/item.rb#31 + def value?; end +end + +# Callable class to returns a item call +# +# @api public +# +# source://dry-core//lib/dry/core/container/item/callable.rb#11 +class Dry::Core::Container::Item::Callable < ::Dry::Core::Container::Item + # Returns the result of item call or item + # + # @api public + # @return [Mixed] + # + # source://dry-core//lib/dry/core/container/item/callable.rb#15 + def call; end +end + +# Factory for create an Item to register inside of container +# +# @api public +# +# source://dry-core//lib/dry/core/container/item/factory.rb#10 +class Dry::Core::Container::Item::Factory + # Creates an Item Memoizable or Callable + # + # @api public + # @param item [Mixed] + # @param options [Hash] + # @raise [Dry::Core::Container::Error] + # @return [Dry::Core::Container::Item::Base] + # + # source://dry-core//lib/dry/core/container/item/factory.rb#18 + def call(item, options = T.unsafe(nil)); end +end + +# Memoizable class to store and execute item calls +# +# @api public +# +# source://dry-core//lib/dry/core/container/item/memoizable.rb#11 +class Dry::Core::Container::Item::Memoizable < ::Dry::Core::Container::Item + # Returns a new Memoizable instance + # + # @api public + # @param item [Mixed] + # @param options [Hash] + # @raise [Dry::Core::Container::Error] + # @return [Dry::Core::Container::Item::Base] + # + # source://dry-core//lib/dry/core/container/item/memoizable.rb#23 + def initialize(item, options = T.unsafe(nil)); end + + # Returns the result of item call using a syncronized mutex + # + # @api public + # @return [Dry::Core::Container::Item::Base] + # + # source://dry-core//lib/dry/core/container/item/memoizable.rb#33 + def call; end + + # @api public + # @return [Mutex] the stored mutex + # + # source://dry-core//lib/dry/core/container/item/memoizable.rb#13 + def memoize_mutex; end + + private + + # @api public + # @private + # @raise [::Dry::Core::Container::Error] + # + # source://dry-core//lib/dry/core/container/item/memoizable.rb#42 + def raise_not_supported_error; end +end + +# Error raised when key is not defined in the registry +# +# @api public +# +# source://dry-core//lib/dry/core/container/mixin.rb#17 +class Dry::Core::Container::KeyError < ::KeyError; end + +# Mixin to expose Inversion of Control (IoC) container behaviour +# +# +# @api public +# @example +# +# class MyClass +# extend Dry::Core::Container::Mixin +# end +# +# MyClass.register(:item, 'item') +# MyClass.resolve(:item) +# => 'item' +# +# class MyObject +# include Dry::Core::Container::Mixin +# end +# +# container = MyObject.new +# container.register(:item, 'item') +# container.resolve(:item) +# => 'item' +# +# source://dry-core//lib/dry/core/container/mixin.rb#47 +module Dry::Core::Container::Mixin + mixes_in_class_methods ::Dry::Core::Container::Configuration + + # Resolve an item from the container + # + # @api public + # @param key [Mixed] The key for the item you wish to resolve + # @return [Mixed] + # @see Dry::Core::Container::Mixin#resolve + # + # source://dry-core//lib/dry/core/container/mixin.rb#144 + def [](key); end + + # @api public + # @private no, really + # + # source://dry-core//lib/dry/core/container/mixin.rb#288 + def _container; end + + # @api public + # + # source://dry-core//lib/dry/core/container/mixin.rb#300 + def clone; end + + # Decorates an item from the container with specified decorator + # + # @api public + # @return [Dry::Core::Container::Mixin] self + # + # source://dry-core//lib/dry/core/container/mixin.rb#227 + def decorate(key, with: T.unsafe(nil), &block); end + + # @api public + # + # source://dry-core//lib/dry/core/container/mixin.rb#293 + def dup; end + + # Calls block once for each key/value pair in the container, passing the key and + # the registered item parameters. + # + # If no block is given, an enumerator is returned instead. + # + # @api public + # @note In discussions with other developers, it was felt that being able to iterate + # over not just the registered keys, but to see what was registered would be + # very helpful. This is a step toward doing that. + # @return [Enumerator] + # + # source://dry-core//lib/dry/core/container/mixin.rb#218 + def each(&block); end + + # Calls block once for each key in container, passing the key as a parameter. + # + # If no block is given, an enumerator is returned instead. + # + # @api public + # @return [Dry::Core::Container::Mixin] self + # + # source://dry-core//lib/dry/core/container/mixin.rb#201 + def each_key(&block); end + + # Enable stubbing functionality into the current container + # + # @api public + # + # source://dry-core//lib/dry/core/container/stub.rb#51 + def enable_stubs!; end + + # Freeze the container. Nothing can be registered after freezing + # + # @api public + # + # source://dry-core//lib/dry/core/container/mixin.rb#281 + def freeze; end + + # Import a namespace + # + # @api public + # @param namespace [Dry::Core::Container::Namespace] The namespace to import + # @return [Dry::Core::Container::Mixin] self + # + # source://dry-core//lib/dry/core/container/mixin.rb#272 + def import(namespace); end + + # Check whether an item is registered under the given key + # + # @api public + # @param key [Mixed] The key you wish to check for registration with + # @return [Bool] + # + # source://dry-core//lib/dry/core/container/mixin.rb#181 + def key?(key); end + + # An array of registered names for the container + # + # @api public + # @return [Array] + # + # source://dry-core//lib/dry/core/container/mixin.rb#190 + def keys; end + + # Merge in the items of the other container + # + # @api public + # @param other [Dry::Core::Container] The other container to merge in + # @param namespace [Symbol, nil] Namespace to prefix other container items with, defaults to nil + # @return [Dry::Core::Container::Mixin] self + # + # source://dry-core//lib/dry/core/container/mixin.rb#158 + def merge(other, namespace: T.unsafe(nil), &block); end + + # Evaluate block and register items in namespace + # + # @api public + # @param namespace [Mixed] The namespace to register items in + # @return [Dry::Core::Container::Mixin] self + # + # source://dry-core//lib/dry/core/container/mixin.rb#253 + def namespace(namespace, &block); end + + # Register an item with the container to be resolved later + # + # @api public + # @param key [Mixed] The key to register the container item with (used to resolve) + # @param contents [Mixed] The item to register with the container (if no block given) + # @param options [Hash] Options to pass to the registry when registering the item + # @return [Dry::Core::Container::Mixin] self + # @yield If a block is given, contents will be ignored and the block + # will be registered instead + # + # source://dry-core//lib/dry/core/container/mixin.rb#104 + def register(key, contents = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Resolve an item from the container + # + # @api public + # @param key [Mixed] The key for the item you wish to resolve + # @return [Mixed] + # @yield Fallback block to call when a key is missing. Its result will be returned + # @yieldparam key [Mixed] Missing key + # + # source://dry-core//lib/dry/core/container/mixin.rb#131 + def resolve(key, &block); end + + class << self + # @api public + # @private + # @private + # + # source://dry-core//lib/dry/core/container/mixin.rb#53 + def extended(base); end + + # @api public + # @private + # @private + # + # source://dry-core//lib/dry/core/container/mixin.rb#78 + def included(base); end + end +end + +# @api public +# @private +# +# source://dry-core//lib/dry/core/container/mixin.rb#70 +module Dry::Core::Container::Mixin::Initializer + # @api public + # + # source://dry-core//lib/dry/core/container/mixin.rb#71 + def initialize(*args, &block); end +end + +# @api public +# +# source://dry-core//lib/dry/core/container/mixin.rb#48 +Dry::Core::Container::Mixin::PREFIX_NAMESPACE = T.let(T.unsafe(nil), Proc) + +# Create a namespace to be imported +# +# @api public +# @example +# +# ns = Dry::Core::Container::Namespace.new('name') do +# register('item', 'item') +# end +# +# container = Dry::Core::Container.new +# +# container.import(ns) +# +# container.resolve('name.item') +# => 'item' +# +# source://dry-core//lib/dry/core/container/namespace.rb#23 +class Dry::Core::Container::Namespace + # Create a new namespace + # + # @api public + # @param name [Mixed] The name of the namespace + # @return [Dry::Core::Container::Namespace] + # @yield The block to evaluate when the namespace is imported + # + # source://dry-core//lib/dry/core/container/namespace.rb#40 + def initialize(name, &block); end + + # @api public + # @return [Proc] The block to be executed when the namespace is imported + # + # source://dry-core//lib/dry/core/container/namespace.rb#28 + def block; end + + # @api public + # @return [Mixed] The namespace (name) + # + # source://dry-core//lib/dry/core/container/namespace.rb#25 + def name; end +end + +# @api private +# +# source://dry-core//lib/dry/core/container/namespace_dsl.rb#9 +class Dry::Core::Container::NamespaceDSL < ::SimpleDelegator + # DSL for defining namespaces + # + # @api private + # @param container [Dry::Core::Container::Mixin] The container + # @param namespace [String] The namespace (name) + # @param namespace_separator [String] The namespace separator + # @return [Mixed] + # @yield The block to evaluate to define the namespace + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#24 + def initialize(container, namespace, namespace_separator, &block); end + + # @api private + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#45 + def import(namespace); end + + # @api private + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#41 + def namespace(namespace, &block); end + + # @api private + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#37 + def register(key, *args, &block); end + + # @api private + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#51 + def resolve(key); end + + private + + # @api private + # + # source://dry-core//lib/dry/core/container/namespace_dsl.rb#57 + def namespaced(key); end +end + +# Default registry for registering items with the container +# +# @api public +# +# source://dry-core//lib/dry/core/container/registry.rb#9 +class Dry::Core::Container::Registry + # @api public + # @private + # @return [Registry] a new instance of Registry + # + # source://dry-core//lib/dry/core/container/registry.rb#11 + def initialize; end + + # Register an item with the container to be resolved later + # + # @api public + # @option options + # @param key [Mixed] The key to register the container item with (used to resolve) + # @param options [Hash] + # @param item [Mixed] The item to register with the container + # @param container [Concurrent::Hash] The container + # @raise [Dry::Core::Container::KeyError] If an item is already registered with the given key + # @return [Mixed] + # + # source://dry-core//lib/dry/core/container/registry.rb#33 + def call(container, key, item, options); end + + # @api private + # + # source://dry-core//lib/dry/core/container/registry.rb#46 + def factory; end +end + +# Default resolver for resolving items from container +# +# @api public +# +# source://dry-core//lib/dry/core/container/resolver.rb#9 +class Dry::Core::Container::Resolver + # Resolve an item from the container + # + # @api public + # @param container [Concurrent::Hash] The container + # @param key [Mixed] The key for the item you wish to resolve + # @raise [KeyError] If the given key is not registered with the container (and no block provided) + # @return [Mixed] + # @yield Fallback block to call when a key is missing. Its result will be returned + # @yieldparam key [Mixed] Missing key + # + # source://dry-core//lib/dry/core/container/resolver.rb#27 + def call(container, key); end + + # Calls block once for each key in container, passing the key and + # the registered item parameters. + # + # If no block is given, an enumerator is returned instead. + # + # @api public + # @note In discussions with other developers, it was felt that being able + # to iterate over not just the registered keys, but to see what was + # registered would be very helpful. This is a step toward doing that. + # @return Key, Value + # + # source://dry-core//lib/dry/core/container/resolver.rb#84 + def each(container, &block); end + + # Calls block once for each key in container, passing the key as a parameter. + # + # If no block is given, an enumerator is returned instead. + # + # @api public + # @return Hash + # + # source://dry-core//lib/dry/core/container/resolver.rb#69 + def each_key(container, &block); end + + # Check whether an items is registered under the given key + # + # @api public + # @param container [Concurrent::Hash] The container + # @param key [Mixed] The key you wish to check for registration with + # @return [Bool] + # + # source://dry-core//lib/dry/core/container/resolver.rb#49 + def key?(container, key); end + + # An array of registered names for the container + # + # @api public + # @return [Array] + # + # source://dry-core//lib/dry/core/container/resolver.rb#58 + def keys(container); end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::Self = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/container/stub.rb#6 +module Dry::Core::Container::Stub + # Stubs have already been enabled turning this into a noop + # + # source://dry-core//lib/dry/core/container/stub.rb#37 + def enable_stubs!; end + + # Overrides resolve to look into stubbed keys first + # + # @api public + # + # source://dry-core//lib/dry/core/container/stub.rb#10 + def resolve(key); end + + # Add a stub to the container + # + # source://dry-core//lib/dry/core/container/stub.rb#15 + def stub(key, value, &block); end + + # Remove stubbed keys from the container + # + # source://dry-core//lib/dry/core/container/stub.rb#31 + def unstub(*keys); end + + private + + # Stubs container + # + # source://dry-core//lib/dry/core/container/stub.rb#44 + def _stubs; end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Container::Undefined = T.let(T.unsafe(nil), Object) + +# An extension for issuing warnings on using deprecated methods. +# +# @api public +# @example +# +# class Foo +# def self.old_class_api; end +# def self.new_class_api; end +# +# deprecate_class_method :old_class_api, :new_class_api +# +# def old_api; end +# def new_api; end +# +# deprecate :old_api, :new_api, message: "old_api is no-no" +# end +# @example You also can use this module for your custom messages +# +# Dry::Core::Deprecations.announce("Foo", "use bar instead") +# Dry::Core::Deprecations.warn("Baz is going to be removed soon") +# +# source://dry-core//lib/dry/core/deprecations.rb#29 +module Dry::Core::Deprecations + class << self + # @api public + # + # source://dry-core//lib/dry/core/deprecations.rb#115 + def [](tag); end + + # Wraps arguments with a standard message format and prints a warning + # + # @api public + # @param name [Object] what is deprecated + # @param msg [String] additional message usually containing upgrade instructions + # + # source://dry-core//lib/dry/core/deprecations.rb#51 + def announce(name, msg, tag: T.unsafe(nil), uplevel: T.unsafe(nil)); end + + # @api private + # + # source://dry-core//lib/dry/core/deprecations.rb#68 + def deprecated_name_message(old, new = T.unsafe(nil), msg = T.unsafe(nil)); end + + # @api private + # + # source://dry-core//lib/dry/core/deprecations.rb#60 + def deprecation_message(name, msg); end + + # Returns the logger used for printing warnings. + # You can provide your own with .set_logger! + # + # @api public + # @param output [IO] output stream + # @return [Logger] + # + # source://dry-core//lib/dry/core/deprecations.rb#85 + def logger(output = T.unsafe(nil)); end + + # Sets a custom logger. This is a global setting. + # + # @api public + # @overload set_logger! + # @overload set_logger! + # @overload set_logger! + # + # source://dry-core//lib/dry/core/deprecations.rb#105 + def set_logger!(output = T.unsafe(nil)); end + + # Prints a warning + # + # @api public + # @param msg [String] Warning string + # @param tag [String] Tag to help identify the source of the warning. + # Defaults to "deprecated" + # @param Caller [Integer] frame to add to the message + # + # source://dry-core//lib/dry/core/deprecations.rb#39 + def warn(msg, tag: T.unsafe(nil), uplevel: T.unsafe(nil)); end + end +end + +# @api public +# +# source://dry-core//lib/dry/core/deprecations.rb#133 +module Dry::Core::Deprecations::Interface + # Mark instance method as deprecated + # + # @api public + # @option [String] + # @param old_name [Symbol] deprecated method + # @param new_name [Symbol] replacement (not required) + # @param [String] [Hash] a customizable set of options + # + # source://dry-core//lib/dry/core/deprecations.rb#157 + def deprecate(old_name, new_name = T.unsafe(nil), message: T.unsafe(nil)); end + + # Mark class-level method as deprecated + # + # @api public + # @option [String] + # @param old_name [Symbol] deprecated method + # @param new_name [Symbol] replacement (not required) + # @param [String] [Hash] a customizable set of options + # + # source://dry-core//lib/dry/core/deprecations.rb#190 + def deprecate_class_method(old_name, new_name = T.unsafe(nil), message: T.unsafe(nil)); end + + # Mark a constant as deprecated + # + # @api public + # @option [String] + # @param constant_name [Symbol] constant name to be deprecated + # @param [String] [Hash] a customizable set of options + # + # source://dry-core//lib/dry/core/deprecations.rb#212 + def deprecate_constant(constant_name, message: T.unsafe(nil)); end + + # Sets/gets deprecation tag + # + # @api public + # @option [String,Symbol] + # @param [String,Symbol] [Hash] a customizable set of options + # + # source://dry-core//lib/dry/core/deprecations.rb#137 + def deprecation_tag(tag = T.unsafe(nil)); end + + # Issue a tagged warning message + # + # @api public + # @param msg [String] warning message + # + # source://dry-core//lib/dry/core/deprecations.rb#148 + def warn(msg); end +end + +# @api public +# +# source://dry-core//lib/dry/core/deprecations.rb#30 +Dry::Core::Deprecations::STACK = T.let(T.unsafe(nil), Proc) + +# @api private +# +# source://dry-core//lib/dry/core/deprecations.rb#121 +class Dry::Core::Deprecations::Tagged < ::Module + # @api private + # @return [Tagged] a new instance of Tagged + # + # source://dry-core//lib/dry/core/deprecations.rb#122 + def initialize(tag); end + + # @api private + # + # source://dry-core//lib/dry/core/deprecations.rb#127 + def extended(base); end +end + +# An implementation of descendants tracker, heavily inspired +# by the descendants_tracker gem. +# +# @example +# +# class Base +# extend Dry::Core::DescendantsTracker +# end +# +# class A < Base +# end +# +# class B < Base +# end +# +# class C < A +# end +# +# Base.descendants # => [C, B, A] +# A.descendants # => [C] +# B.descendants # => [] +# +# source://dry-core//lib/dry/core/descendants_tracker.rb#29 +module Dry::Core::DescendantsTracker + # Return the descendants of this class + # + # @api public + # @example + # descendants = Parent.descendants + # @return [Array] + # + # source://dry-core//lib/dry/core/descendants_tracker.rb#54 + def descendants; end + + protected + + # @api private + # + # source://dry-core//lib/dry/core/descendants_tracker.rb#59 + def add_descendant(descendant); end + + private + + # @api private + # + # source://dry-core//lib/dry/core/descendants_tracker.rb#70 + def inherited(descendant); end + + class << self + # @api private + # + # source://dry-core//lib/dry/core/descendants_tracker.rb#32 + def setup(target); end + + private + + # @api private + # @private + # + # source://dry-core//lib/dry/core/descendants_tracker.rb#39 + def extended(base); end + end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::EMPTY_OPTS = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# Define equality, equivalence and inspection methods +# +# source://dry-core//lib/dry/core/equalizer.rb#6 +class Dry::Core::Equalizer < ::Module + # Initialize an Equalizer with the given keys + # + # Will use the keys with which it is initialized to define #cmp?, + # #hash, and #inspect + # + # @api private + # @option options + # @option options + # @param keys [Array] + # @param options [Hash] + # @return [undefined] + # + # source://dry-core//lib/dry/core/equalizer.rb#20 + def initialize(*keys, **options); end + + private + + # Define an #cmp? method based on the instance's values identified by #keys + # + # @api private + # @return [undefined] + # + # source://dry-core//lib/dry/core/equalizer.rb#61 + def define_cmp_method; end + + # Define a #hash method based on the instance's values identified by #keys + # + # @api private + # @return [undefined] + # + # source://dry-core//lib/dry/core/equalizer.rb#76 + def define_hash_method(immutable:); end + + # Define an inspect method that reports the values of the instance's keys + # + # @api private + # @return [undefined] + # + # source://dry-core//lib/dry/core/equalizer.rb#98 + def define_inspect_method; end + + # Define the equalizer methods based on #keys + # + # @api private + # @param inspect [Boolean] whether to define #inspect method + # @param immutable [Boolean] whether to memoize #hash method + # @return [undefined] + # + # source://dry-core//lib/dry/core/equalizer.rb#50 + def define_methods(inspect: T.unsafe(nil), immutable: T.unsafe(nil)); end + + # Hook called when module is included + # + # @api private + # @param descendant [Module] the module or class including Equalizer + # @return [self] + # + # source://dry-core//lib/dry/core/equalizer.rb#37 + def included(descendant); end +end + +# The comparison methods +# +# source://dry-core//lib/dry/core/equalizer.rb#108 +module Dry::Core::Equalizer::Methods + # Compare the object with other object for equivalency + # + # @api public + # @example + # object == other # => true or false + # @param other [Object] the other object to compare with + # @return [Boolean] + # + # source://dry-core//lib/dry/core/equalizer.rb#135 + def ==(other); end + + # Compare the object with other object for equality + # + # @api public + # @example + # object.eql?(other) # => true or false + # @param other [Object] the other object to compare with + # @return [Boolean] + # + # source://dry-core//lib/dry/core/equalizer.rb#120 + def eql?(other); end +end + +# Define extensions that can be later enabled by the user. +# +# @example +# +# class Foo +# extend Dry::Core::Extensions +# +# register_extension(:bar) do +# def bar; :bar end +# end +# end +# +# Foo.new.bar # => NoMethodError +# Foo.load_extensions(:bar) +# Foo.new.bar # => :bar +# +# source://dry-core//lib/dry/core/extensions.rb#23 +module Dry::Core::Extensions + # Whether an extension is available + # + # @param name [Symbol] extension name + # @return [Boolean] Extension availability + # + # source://dry-core//lib/dry/core/extensions.rb#43 + def available_extension?(name); end + + # Enables specified extensions. Already enabled extensions remain untouched + # + # @param extensions [Array] list of extension names + # + # source://dry-core//lib/dry/core/extensions.rb#50 + def load_extensions(*extensions); end + + # Register an extension + # + # @param name [Symbol] extension name + # @yield extension block. This block guaranteed not to be called more than once + # + # source://dry-core//lib/dry/core/extensions.rb#35 + def register_extension(name, &block); end + + class << self + # @api private + # @private + # + # source://dry-core//lib/dry/core/extensions.rb#25 + def extended(obj); end + end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::IDENTITY = T.let(T.unsafe(nil), Proc) + +# Helper module providing thin interface around an inflection backend. +# +# source://dry-core//lib/dry/core/inflector.rb#6 +module Dry::Core::Inflector + class << self + # Transform string to camel case + # + # @example + # Dry::Core::Inflector.camelize('foo_bar') # => 'FooBar' + # @param input [String] input string + # @return Transformed string + # + # source://dry-core//lib/dry/core/inflector.rb#70 + def camelize(input); end + + # Transform a file path to a constant name + # + # @example + # Dry::Core::Inflector.classify('foo/bar') # => 'Foo::Bar' + # @param input [String] input string + # @return Constant name + # + # source://dry-core//lib/dry/core/inflector.rb#136 + def classify(input); end + + # Get a constant value by its name + # + # @example + # Dry::Core::Inflector.constantize('Foo::Bar') # => Foo::Bar + # @param input [String] input constant name + # @return Constant value + # + # source://dry-core//lib/dry/core/inflector.rb#125 + def constantize(input); end + + # Remove namespaces from a constant name + # + # @example + # Dry::Core::Inflector.demodulize('Deeply::Nested::Name') # => 'Name' + # @param input [String] input string + # @return Unnested constant name + # + # source://dry-core//lib/dry/core/inflector.rb#114 + def demodulize(input); end + + # Set up first available backend + # + # @api private + # + # source://dry-core//lib/dry/core/inflector.rb#37 + def detect_backend; end + + # Inflector accessor. Lazily initializes a backend + # + # @api private + # + # source://dry-core//lib/dry/core/inflector.rb#59 + def inflector; end + + # Get a plural form of a word + # + # @example + # Dry::Core::Inflector.pluralize('string') # => 'strings' + # @param input [String] input string + # @return Transformed string + # + # source://dry-core//lib/dry/core/inflector.rb#103 + def pluralize(input); end + + # Try to activate a backend + # + # @api private + # + # source://dry-core//lib/dry/core/inflector.rb#26 + def realize_backend(path, backend_factory); end + + # Set preferred backend + # + # @param name [Symbol] backend name (:activesupport or :inflecto) + # + # source://dry-core//lib/dry/core/inflector.rb#48 + def select_backend(name = T.unsafe(nil)); end + + # Get a singlular form of a word + # + # @example + # Dry::Core::Inflector.singularize('chars') # => 'char' + # @param input [String] input string + # @return Transformed string + # + # source://dry-core//lib/dry/core/inflector.rb#92 + def singularize(input); end + + # Transform string to snake case + # + # @example + # Dry::Core::Inflector.underscore('FooBar') # => 'foo_bar' + # @param input [String] input string + # @return Transformed string + # + # source://dry-core//lib/dry/core/inflector.rb#81 + def underscore(input); end + end +end + +# List of supported backends +# +# source://dry-core//lib/dry/core/inflector.rb#8 +Dry::Core::Inflector::BACKENDS = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/errors.rb#5 +class Dry::Core::InvalidClassAttributeValueError < ::StandardError + # @return [InvalidClassAttributeValueError] a new instance of InvalidClassAttributeValueError + # + # source://dry-core//lib/dry/core/errors.rb#6 + def initialize(name, value); end +end + +# source://dry-core//lib/dry/core/memoizable.rb#5 +module Dry::Core::Memoizable + mixes_in_class_methods ::Dry::Core::Memoizable::ClassInterface::Object + + class << self + # @private + # + # source://dry-core//lib/dry/core/memoizable.rb#48 + def included(klass); end + end +end + +# source://dry-core//lib/dry/core/memoizable.rb#9 +module Dry::Core::Memoizable::ClassInterface; end + +# source://dry-core//lib/dry/core/memoizable.rb#10 +module Dry::Core::Memoizable::ClassInterface::Base + # source://dry-core//lib/dry/core/memoizable.rb#15 + def inherited(base); end + + # source://dry-core//lib/dry/core/memoizable.rb#11 + def memoize(*names); end +end + +# source://dry-core//lib/dry/core/memoizable.rb#23 +module Dry::Core::Memoizable::ClassInterface::BasicObject + include ::Dry::Core::Memoizable::ClassInterface::Base + + # source://dry-core//lib/dry/core/memoizable.rb#26 + def new(*_arg0); end +end + +# source://dry-core//lib/dry/core/memoizable.rb#33 +module Dry::Core::Memoizable::ClassInterface::Object + include ::Dry::Core::Memoizable::ClassInterface::Base + + # source://dry-core//lib/dry/core/memoizable.rb#36 + def new(*_arg0, **_arg1); end +end + +# source://dry-core//lib/dry/core/memoizable.rb#6 +Dry::Core::Memoizable::MEMOIZED_HASH = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://dry-core//lib/dry/core/memoizable.rb#59 +class Dry::Core::Memoizable::Memoizer < ::Module + # @api private + # @return [Memoizer] a new instance of Memoizer + # + # source://dry-core//lib/dry/core/memoizable.rb#67 + def initialize(klass, names); end + + private + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#160 + def declaration(definition, lookup); end + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#81 + def define_memoizable(method:); end + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#192 + def make_bind_name(idx); end + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#197 + def map_bind_type(type, name, original_params, defined_types); end + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#183 + def name_from_param(name); end + + # @api private + # + # source://dry-core//lib/dry/core/memoizable.rb#229 + def param(name, type); end +end + +# @api private +# +# source://dry-core//lib/dry/core/memoizable.rb#60 +Dry::Core::Memoizable::Memoizer::KERNEL = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/memoizable.rb#7 +Dry::Core::Memoizable::PARAM_PLACEHOLDERS = T.let(T.unsafe(nil), Array) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Self = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Core::Undefined = T.let(T.unsafe(nil), Object) + +# source://dry-core//lib/dry/core/version.rb#5 +Dry::Core::VERSION = T.let(T.unsafe(nil), String) + +module Dry::Types + extend ::Dry::Core::Constants + + class << self + # source://dry-types/1.7.2/lib/dry/types/constraints.rb#13 + def Rule(options); end + + # source://dry-types/1.7.2/lib/dry/types.rb#115 + def [](name); end + + # source://dry-types/1.7.2/lib/dry/types.rb#163 + def const_missing(const); end + + # source://dry-types/1.7.2/lib/dry/types.rb#82 + def container; end + + # source://dry-types/1.7.2/lib/dry/types.rb#197 + def define_builder(method, &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#149 + def identifier(klass); end + + # source://dry-types/1.7.2/lib/dry/types.rb#73 + def included(*_arg0); end + + # source://dry-types/1.7.2/lib/dry/types.rb#33 + def loader; end + + # source://dry-core//lib/dry/core/deprecations.rb#202 + def module(*args, &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#104 + def register(name, type = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#91 + def registered?(class_or_identifier); end + + # source://dry-types/1.7.2/lib/dry/types/constraints.rb#26 + def rule_compiler; end + + # source://dry-types/1.7.2/lib/dry/types.rb#158 + def type_map; end + end +end + +class Dry::Types::Compiler + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#11 + def initialize(registry); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#15 + def call(ast); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#116 + def compile_fn(fn); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#9 + def registry; end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#19 + def visit(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#112 + def visit_any(meta); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#61 + def visit_array(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#24 + def visit_constrained(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#30 + def visit_constructor(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#102 + def visit_enum(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#67 + def visit_hash(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#82 + def visit_json_array(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#77 + def visit_json_hash(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#97 + def visit_key(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#36 + def visit_lax(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#107 + def visit_map(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#41 + def visit_nominal(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#92 + def visit_params_array(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#87 + def visit_params_hash(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#52 + def visit_rule(node); end + + # source://dry-core//lib/dry/core/deprecations.rb#168 + def visit_safe(*args, &block); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#72 + def visit_schema(node); end + + # source://dry-types/1.7.2/lib/dry/types/compiler.rb#56 + def visit_sum(node); end +end + +class Dry::Types::Container + # source://dry-core//lib/dry/core/container/mixin.rb#83 + def config; end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::EMPTY_OPTS = T.let(T.unsafe(nil), Hash) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::IDENTITY = T.let(T.unsafe(nil), Proc) + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::Self = T.let(T.unsafe(nil), Proc) + +module Dry::Types::Type + # source://dry-types/1.7.2/lib/dry/types/type.rb#18 + def ===(input = T.unsafe(nil)); end + + # source://dry-types/1.7.2/lib/dry/types/type.rb#43 + def [](input = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types/type.rb#43 + def call(input = T.unsafe(nil), &block); end + + # source://dry-core//lib/dry/core/deprecations.rb#168 + def safe(*args, &block); end + + # source://dry-types/1.7.2/lib/dry/types/type.rb#18 + def valid?(input = T.unsafe(nil)); end +end + +# source://dry-core//lib/dry/core/constants.rb#112 +Dry::Types::Undefined = T.let(T.unsafe(nil), Object) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-inflector@1.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-inflector@1.1.0.rbi new file mode 100644 index 0000000..564237a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-inflector@1.1.0.rbi @@ -0,0 +1,659 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dry-inflector` gem. +# Please instead update this file by running `bin/tapioca gem dry-inflector`. + + +# source://dry-inflector//lib/dry/inflector.rb#3 +module Dry + class << self + # source://dry-core/1.0.1/lib/dry/core.rb#52 + def Equalizer(*keys, **options); end + + # source://dry-struct/1.6.0/lib/dry/struct.rb#30 + def Struct(attributes = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#253 + def Types(*namespaces, default: T.unsafe(nil), **aliases); end + end +end + +# dry-inflector +# +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector.rb#7 +class Dry::Inflector + # Instantiate the inflector + # + # @example Basic usage + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # @example Custom inflection rules + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.plural "virus", "viruses" # specify a rule for #pluralize + # inflections.singular "thieves", "thief" # specify a rule for #singularize + # inflections.uncountable "dry-inflector" # add an exception for an uncountable word + # end + # @param blk [Proc] an optional block to specify custom inflection rules + # @return [Dry::Inflector] the inflector + # @since 0.1.0 + # @yieldparam the [Dry::Inflector::Inflections] inflection rules + # + # source://dry-inflector//lib/dry/inflector.rb#33 + def initialize(&blk); end + + # Upper camelize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.camelize_upper("data_mapper") # => "DataMapper" + # inflector.camelize_upper("dry/inflector") # => "Dry::Inflector" + # @param input [String, Symbol] the input + # @return [String] the upper camelized string + # @since 0.1.3 + # + # source://dry-inflector//lib/dry/inflector.rb#66 + def camelize(input); end + + # Lower camelize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.camelize_lower("data_mapper") # => "dataMapper" + # @param input [String, Symbol] the input + # @return [String] the lower camelized string + # @since 0.1.3 + # + # source://dry-inflector//lib/dry/inflector.rb#49 + def camelize_lower(input); end + + # Upper camelize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.camelize_upper("data_mapper") # => "DataMapper" + # inflector.camelize_upper("dry/inflector") # => "Dry::Inflector" + # @param input [String, Symbol] the input + # @return [String] the upper camelized string + # @since 0.1.3 + # + # source://dry-inflector//lib/dry/inflector.rb#66 + def camelize_upper(input); end + + # Classify a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.classify("books") # => "Book" + # @param input [String, Symbol] the input + # @return [String] the classified string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#104 + def classify(input); end + + # Find a constant with the name specified in the argument string + # + # The name is assumed to be the one of a top-level constant, + # constant scope of caller is ignored + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.constantize("Module") # => Module + # inflector.constantize("Dry::Inflector") # => Dry::Inflector + # @param input [String, Symbol] the input + # @return [Class, Module] the class or module + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#88 + def constantize(input); end + + # Dasherize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.dasherize("dry_inflector") # => "dry-inflector" + # @param input [String, Symbol] the input + # @return [String] the dasherized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#120 + def dasherize(input); end + + # Demodulize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.demodulize("Dry::Inflector") # => "Inflector" + # @param input [String, Symbol] the input + # @return [String] the demodulized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#136 + def demodulize(input); end + + # Creates a foreign key name + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.foreign_key("Message") => "message_id" + # @param input [String, Symbol] the input + # @return [String] foreign key + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#175 + def foreign_key(input); end + + # Humanize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.humanize("dry_inflector") # => "Dry inflector" + # inflector.humanize("author_id") # => "Author" + # @param input [String, Symbol] the input + # @return [String] the humanized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#153 + def humanize(input); end + + # @api public + # @return [String] + # @since 0.2.0 + # + # source://dry-inflector//lib/dry/inflector.rb#310 + def inspect; end + + # Ordinalize a number + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.ordinalize(1) # => "1st" + # inflector.ordinalize(2) # => "2nd" + # inflector.ordinalize(3) # => "3rd" + # inflector.ordinalize(10) # => "10th" + # inflector.ordinalize(23) # => "23rd" + # @param number [Integer] the input + # @return [String] the ordinalized number + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#195 + def ordinalize(number); end + + # Pluralize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.pluralize("book") # => "books" + # inflector.pluralize("money") # => "money" + # @param input [String, Symbol] the input + # @return [String] the pluralized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#223 + def pluralize(input); end + + # Singularize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.singularize("books") # => "book" + # inflector.singularize("money") # => "money" + # @param input [String] the input + # @return [String] the singularized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#243 + def singularize(input); end + + # Tableize a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.tableize("Book") # => "books" + # @param input [String, Symbol] the input + # @return [String] the tableized string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#262 + def tableize(input); end + + # @api public + # @return [String] + # @since 0.2.0 + # + # source://dry-inflector//lib/dry/inflector.rb#310 + def to_s; end + + # Check if the input is an uncountable word + # + # @api private + # @param input [String] the input + # @return [TrueClass, FalseClass] the result of the check + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#300 + def uncountable?(input); end + + # Underscore a string + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new + # inflector.underscore("dry-inflector") # => "dry_inflector" + # @param input [String, Symbol] the input + # @return [String] the underscored string + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#279 + def underscore(input); end + + private + + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector.rb#325 + def inflections; end + + # @api private + # @since 0.1.3 + # + # source://dry-inflector//lib/dry/inflector.rb#329 + def internal_camelize(input, upper); end +end + +# A set of acronyms +# +# @api private +# @since 0.1.2 +# +# source://dry-inflector//lib/dry/inflector/acronyms.rb#9 +class Dry::Inflector::Acronyms + # @api private + # @return [Acronyms] a new instance of Acronyms + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/acronyms.rb#14 + def initialize; end + + # @api private + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/acronyms.rb#27 + def add(rule, replacement); end + + # @api private + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/acronyms.rb#21 + def apply_to(word, capitalize: T.unsafe(nil)); end + + # @api private + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/acronyms.rb#10 + def regex; end + + private + + # @api private + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/acronyms.rb#36 + def define_regex_patterns; end +end + +# @api private +# @since 0.1.2 +# +# source://dry-inflector//lib/dry/inflector.rb#323 +Dry::Inflector::DEFAULT_SEPARATOR = T.let(T.unsafe(nil), String) + +# Inflections +# +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector/inflections.rb#12 +class Dry::Inflector::Inflections + # Instantiate the rules + # + # @api private + # @return [Dry::Inflector::Inflections] + # @since 0.1.0 + # @yieldparam [self] + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#76 + def initialize; end + + # Add one or more acronyms + # + # Acronyms affect how basic operations are performed, such + # as camelize/underscore. + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.acronym "HTML" + # end + # + # inflector.camelize("html") # => "HTML" + # inflector.underscore("HTMLIsFun") # => "html_is_fun" + # @param words [Array] a list of acronyms + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#197 + def acronym(*words); end + + # Acronyms + # + # @api private + # @return [Dry::Inflector::Acronyms] + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#67 + def acronyms; end + + # Add a custom humanize rule + # + # 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"`) + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.human(/_cnt$/i, '\1_count') + # inflections.human("legacy_col_person_name", "Name") + # end + # @param rule [String, Regexp] the rule + # @param replacement [String] the replacement + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#224 + def human(rule, replacement); end + + # Human rules + # + # @api private + # @return [Dry::Inflector::Rules] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#59 + def humans; end + + # Add a custom pluralization rule + # + # 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. + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.singular "octopus", "octopi" + # end + # @param singular [String] the singular + # @param plural [String] the plural + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#151 + def irregular(singular, plural); end + + # Add a custom pluralization rule + # + # 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. + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.plural "virus", "viruses" + # end + # @param rule [String, Regexp] the rule + # @param replacement [String] the replacement + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#105 + def plural(rule, replacement); end + + # Pluralization rules + # + # @api private + # @return [Dry::Inflector::Rules] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#35 + def plurals; end + + # Add a custom singularization rule + # + # 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. + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.singular "thieves", "thief" + # end + # @param rule [String, Regexp] the rule + # @param replacement [String] the replacement + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#128 + def singular(rule, replacement); end + + # Singularization rules + # + # @api private + # @return [Dry::Inflector::Rules] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#43 + def singulars; end + + # Add a custom rule for uncountable words + # + # Uncountable will not be inflected + # + # @example + # require "dry/inflector" + # + # inflector = Dry::Inflector.new do |inflections| + # inflections.uncountable "money" + # inflections.uncountable "money", "information" + # inflections.uncountable %w(money information rice) + # end + # @param words [Enumerable] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#175 + def uncountable(*words); end + + # Uncountable rules + # + # @api private + # @return [Set] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#51 + def uncountables; end + + private + + # Add irregular inflection + # + # @api private + # @param rule [String] the rule + # @param replacement [String] the replacement + # @return [undefined] + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#239 + def add_irregular(rule, replacement, target); end + + # Add a new rule + # + # @api private + # @param rule [String, Regexp] the rule + # @param replacement [String, Regexp] the replacement + # @param target [Dry::Inflector::Rules] the target + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#252 + def rule(rule, replacement, target); end + + class << self + # Instantiate a set of inflection rules. + # It adds the default rules and the optional customizations, passed as a block. + # + # @api private + # @param blk [Proc] the optional, custom rules + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections.rb#22 + def build(&blk); end + end +end + +# Default inflections +# +# +# @api private +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#12 +module Dry::Inflector::Inflections::Defaults + class << self + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#15 + def call(inflect); end + + private + + # @api private + # @since 0.1.2 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#112 + def acronyms(inflect); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#87 + def irregular(inflect); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#25 + def plural(inflect); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#55 + def singular(inflect); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#105 + def uncountable(inflect); end + end +end + +# @api private +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector.rb#319 +Dry::Inflector::ORDINALIZE_TH = T.let(T.unsafe(nil), Hash) + +# A set of inflection rules +# +# @api private +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector/rules.rb#9 +class Dry::Inflector::Rules + # @api private + # @return [Rules] a new instance of Rules + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/rules.rb#12 + def initialize; end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/rules.rb#18 + def apply_to(word); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/rules.rb#32 + def each(&blk); end + + # @api private + # @since 0.1.0 + # + # source://dry-inflector//lib/dry/inflector/rules.rb#26 + def insert(index, array); end +end + +# @since 0.1.0 +# +# source://dry-inflector//lib/dry/inflector/version.rb#6 +Dry::Inflector::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-logic@1.5.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-logic@1.5.0.rbi new file mode 100644 index 0000000..295ed47 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-logic@1.5.0.rbi @@ -0,0 +1,1102 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dry-logic` gem. +# Please instead update this file by running `bin/tapioca gem dry-logic`. + + +# source://dry-logic//lib/dry/logic.rb#6 +module Dry + class << self + # source://dry-core/1.0.1/lib/dry/core.rb#52 + def Equalizer(*keys, **options); end + + # source://dry-struct/1.6.0/lib/dry/struct.rb#30 + def Struct(attributes = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#253 + def Types(*namespaces, default: T.unsafe(nil), **aliases); end + end +end + +# source://dry-logic//lib/dry/logic.rb#7 +module Dry::Logic + include ::Dry::Core::Constants + + class << self + # source://dry-logic//lib/dry/logic/rule.rb#7 + def Rule(*args, **options, &block); end + + # source://dry-logic//lib/dry/logic.rb#10 + def loader; end + end +end + +# source://dry-logic//lib/dry/logic/appliable.rb#5 +module Dry::Logic::Appliable + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/appliable.rb#14 + def applied?; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/appliable.rb#22 + def failure?; end + + # source://dry-logic//lib/dry/logic/appliable.rb#6 + def id; end + + # source://dry-logic//lib/dry/logic/appliable.rb#10 + def result; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/appliable.rb#18 + def success?; end + + # source://dry-logic//lib/dry/logic/appliable.rb#26 + def to_ast; end +end + +# source://dry-logic//lib/dry/logic/builder.rb#8 +module Dry::Logic::Builder + # Predicate and operation builder + # + # @example Check if input is zero + # is_zero = Dry::Logic::Builder.call do + # negation { lt?(0) ^ gt?(0) } + # end + # + # p is_zero.call(1) # => false + # p is_zero.call(0) # => true + # p is_zero.call(-1) # => false + # @return [Builder::Result] + # + # source://dry-logic//lib/dry/logic/builder.rb#31 + def build(&context); end + + # Predicate and operation builder + # + # @example Check if input is zero + # is_zero = Dry::Logic::Builder.call do + # negation { lt?(0) ^ gt?(0) } + # end + # + # p is_zero.call(1) # => false + # p is_zero.call(0) # => true + # p is_zero.call(-1) # => false + # @return [Builder::Result] + # + # source://dry-logic//lib/dry/logic/builder.rb#31 + def call(&context); end + + class << self + # Predicate and operation builder + # + # @example Check if input is zero + # is_zero = Dry::Logic::Builder.call do + # negation { lt?(0) ^ gt?(0) } + # end + # + # p is_zero.call(1) # => false + # p is_zero.call(0) # => true + # p is_zero.call(-1) # => false + # @return [Builder::Result] + # + # source://dry-logic//lib/dry/logic/builder.rb#31 + def call(&context); end + end +end + +# source://dry-logic//lib/dry/logic/builder.rb#38 +class Dry::Logic::Builder::Context + include ::Dry::Core::Constants + include ::Dry::Logic + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # Defines methods for operations and predicates + # + # @return [Context] a new instance of Context + # + # source://dry-logic//lib/dry/logic/builder.rb#68 + def initialize; end + + # @see Builder#call + # + # source://dry-logic//lib/dry/logic/builder.rb#47 + def call(&context); end + + # Defines custom predicate + # + # source://dry-logic//lib/dry/logic/builder.rb#55 + def predicate(name, &context); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://dry-logic//lib/dry/logic/builder.rb#42 +module Dry::Logic::Builder::Context::Predicates + include ::Dry::Core::Constants + include ::Dry::Logic::Predicates + extend ::Dry::Logic::Predicates::Methods +end + +# source://dry-logic//lib/dry/logic/builder.rb#9 +Dry::Logic::Builder::IGNORED_OPERATIONS = T.let(T.unsafe(nil), Array) + +# source://dry-logic//lib/dry/logic/builder.rb#15 +Dry::Logic::Builder::IGNORED_PREDICATES = T.let(T.unsafe(nil), Array) + +# source://dry-logic//lib/dry/logic/evaluator.rb#5 +class Dry::Logic::Evaluator + include ::Dry::Core::Equalizer::Methods + + # @return [Evaluator] a new instance of Evaluator + # + # source://dry-logic//lib/dry/logic/evaluator.rb#43 + def initialize(path); end + + # Returns the value of attribute path. + # + # source://dry-logic//lib/dry/logic/evaluator.rb#8 + def path; end +end + +# source://dry-logic//lib/dry/logic/evaluator.rb#36 +class Dry::Logic::Evaluator::Attr < ::Dry::Logic::Evaluator + # source://dry-logic//lib/dry/logic/evaluator.rb#37 + def [](input); end + + # source://dry-logic//lib/dry/logic/evaluator.rb#37 + def call(input); end +end + +# source://dry-logic//lib/dry/logic/evaluator.rb#29 +class Dry::Logic::Evaluator::Key < ::Dry::Logic::Evaluator + # source://dry-logic//lib/dry/logic/evaluator.rb#30 + def [](input); end + + # source://dry-logic//lib/dry/logic/evaluator.rb#30 + def call(input); end +end + +# source://dry-logic//lib/dry/logic/evaluator.rb#10 +class Dry::Logic::Evaluator::Set + include ::Dry::Core::Equalizer::Methods + + # @return [Set] a new instance of Set + # + # source://dry-logic//lib/dry/logic/evaluator.rb#19 + def initialize(evaluators); end + + # source://dry-logic//lib/dry/logic/evaluator.rb#23 + def [](input); end + + # source://dry-logic//lib/dry/logic/evaluator.rb#23 + def call(input); end + + # Returns the value of attribute evaluators. + # + # source://dry-logic//lib/dry/logic/evaluator.rb#13 + def evaluators; end + + class << self + # source://dry-logic//lib/dry/logic/evaluator.rb#15 + def new(paths); end + end +end + +# source://dry-logic//lib/dry/logic/operations/and.rb#5 +module Dry::Logic::Operations; end + +# source://dry-logic//lib/dry/logic/operations/abstract.rb#6 +class Dry::Logic::Operations::Abstract + include ::Dry::Core::Constants + include ::Dry::Core::Equalizer::Methods + include ::Dry::Logic::Operators + + # @return [Abstract] a new instance of Abstract + # + # source://dry-logic//lib/dry/logic/operations/abstract.rb#15 + def initialize(*rules, **options); end + + # source://dry-logic//lib/dry/logic/operations/abstract.rb#24 + def curry(*args); end + + # source://dry-logic//lib/dry/logic/operations/abstract.rb#20 + def id; end + + # source://dry-logic//lib/dry/logic/operations/abstract.rb#28 + def new(rules, **new_options); end + + # Returns the value of attribute options. + # + # source://dry-logic//lib/dry/logic/operations/abstract.rb#13 + def options; end + + # Returns the value of attribute rules. + # + # source://dry-logic//lib/dry/logic/operations/abstract.rb#11 + def rules; end + + # source://dry-logic//lib/dry/logic/operations/abstract.rb#36 + def to_ast; end + + # source://dry-logic//lib/dry/logic/operations/abstract.rb#32 + def with(new_options); end +end + +# source://dry-logic//lib/dry/logic/operations/and.rb#6 +class Dry::Logic::Operations::And < ::Dry::Logic::Operations::Binary + # @return [And] a new instance of And + # + # source://dry-logic//lib/dry/logic/operations/and.rb#9 + def initialize(*_arg0, **_arg1); end + + # source://dry-logic//lib/dry/logic/operations/and.rb#38 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/and.rb#19 + def call(input); end + + # Returns the value of attribute hints. + # + # source://dry-logic//lib/dry/logic/operations/and.rb#7 + def hints; end + + # source://dry-logic//lib/dry/logic/operations/and.rb#14 + def operator; end + + # source://dry-logic//lib/dry/logic/operations/and.rb#14 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/attr.rb#6 +class Dry::Logic::Operations::Attr < ::Dry::Logic::Operations::Key + # source://dry-logic//lib/dry/logic/operations/attr.rb#11 + def type; end + + class << self + # source://dry-logic//lib/dry/logic/operations/attr.rb#7 + def evaluator(name); end + end +end + +# source://dry-logic//lib/dry/logic/operations/binary.rb#6 +class Dry::Logic::Operations::Binary < ::Dry::Logic::Operations::Abstract + # @return [Binary] a new instance of Binary + # + # source://dry-logic//lib/dry/logic/operations/binary.rb#11 + def initialize(left, right, **options); end + + # source://dry-logic//lib/dry/logic/operations/binary.rb#17 + def ast(input = T.unsafe(nil)); end + + # Returns the value of attribute left. + # + # source://dry-logic//lib/dry/logic/operations/binary.rb#7 + def left; end + + # Returns the value of attribute right. + # + # source://dry-logic//lib/dry/logic/operations/binary.rb#9 + def right; end + + # source://dry-logic//lib/dry/logic/operations/binary.rb#21 + def to_s; end +end + +# source://dry-logic//lib/dry/logic/operations/check.rb#6 +class Dry::Logic::Operations::Check < ::Dry::Logic::Operations::Unary + # @return [Check] a new instance of Check + # + # source://dry-logic//lib/dry/logic/operations/check.rb#20 + def initialize(*rules, **options); end + + # source://dry-logic//lib/dry/logic/operations/check.rb#40 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/check.rb#44 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/operations/check.rb#29 + def call(input); end + + # Returns the value of attribute evaluator. + # + # source://dry-logic//lib/dry/logic/operations/check.rb#7 + def evaluator; end + + # source://dry-logic//lib/dry/logic/operations/check.rb#25 + def type; end + + class << self + # source://dry-logic//lib/dry/logic/operations/check.rb#9 + def new(rule, **options); end + end +end + +# source://dry-logic//lib/dry/logic/operations/each.rb#6 +class Dry::Logic::Operations::Each < ::Dry::Logic::Operations::Unary + # source://dry-logic//lib/dry/logic/operations/each.rb#25 + def [](arr); end + + # source://dry-logic//lib/dry/logic/operations/each.rb#11 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/each.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/implication.rb#6 +class Dry::Logic::Operations::Implication < ::Dry::Logic::Operations::Binary + # source://dry-logic//lib/dry/logic/operations/implication.rb#26 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/implication.rb#15 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/implication.rb#11 + def operator; end + + # source://dry-logic//lib/dry/logic/operations/implication.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/key.rb#6 +class Dry::Logic::Operations::Key < ::Dry::Logic::Operations::Unary + # @return [Key] a new instance of Key + # + # source://dry-logic//lib/dry/logic/operations/key.rb#25 + def initialize(*rules, **options); end + + # source://dry-logic//lib/dry/logic/operations/key.rb#46 + def [](hash); end + + # source://dry-logic//lib/dry/logic/operations/key.rb#50 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/operations/key.rb#35 + def call(hash); end + + # Returns the value of attribute evaluator. + # + # source://dry-logic//lib/dry/logic/operations/key.rb#7 + def evaluator; end + + # Returns the value of attribute path. + # + # source://dry-logic//lib/dry/logic/operations/key.rb#9 + def path; end + + # source://dry-logic//lib/dry/logic/operations/key.rb#58 + def to_s; end + + # source://dry-logic//lib/dry/logic/operations/key.rb#31 + def type; end + + class << self + # source://dry-logic//lib/dry/logic/operations/key.rb#21 + def evaluator(name); end + + # source://dry-logic//lib/dry/logic/operations/key.rb#11 + def new(rules, **options); end + end +end + +# source://dry-logic//lib/dry/logic/operations/negation.rb#6 +class Dry::Logic::Operations::Negation < ::Dry::Logic::Operations::Unary + # source://dry-logic//lib/dry/logic/operations/negation.rb#15 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/negation.rb#11 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/negation.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/or.rb#6 +class Dry::Logic::Operations::Or < ::Dry::Logic::Operations::Binary + # source://dry-logic//lib/dry/logic/operations/or.rb#28 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/or.rb#12 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/or.rb#7 + def operator; end + + # source://dry-logic//lib/dry/logic/operations/or.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/set.rb#6 +class Dry::Logic::Operations::Set < ::Dry::Logic::Operations::Abstract + # source://dry-logic//lib/dry/logic/operations/set.rb#20 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/set.rb#24 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/operations/set.rb#11 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/set.rb#28 + def to_s; end + + # source://dry-logic//lib/dry/logic/operations/set.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operations/unary.rb#6 +class Dry::Logic::Operations::Unary < ::Dry::Logic::Operations::Abstract + # @return [Unary] a new instance of Unary + # + # source://dry-logic//lib/dry/logic/operations/unary.rb#9 + def initialize(*rules, **options); end + + # source://dry-logic//lib/dry/logic/operations/unary.rb#14 + def ast(input = T.unsafe(nil)); end + + # Returns the value of attribute rule. + # + # source://dry-logic//lib/dry/logic/operations/unary.rb#7 + def rule; end + + # source://dry-logic//lib/dry/logic/operations/unary.rb#18 + def to_s; end +end + +# source://dry-logic//lib/dry/logic/operations/xor.rb#6 +class Dry::Logic::Operations::Xor < ::Dry::Logic::Operations::Binary + # source://dry-logic//lib/dry/logic/operations/xor.rb#16 + def [](input); end + + # source://dry-logic//lib/dry/logic/operations/xor.rb#20 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/operations/xor.rb#12 + def call(input); end + + # source://dry-logic//lib/dry/logic/operations/xor.rb#7 + def operator; end + + # source://dry-logic//lib/dry/logic/operations/xor.rb#7 + def type; end +end + +# source://dry-logic//lib/dry/logic/operators.rb#5 +module Dry::Logic::Operators + # source://dry-logic//lib/dry/logic/operators.rb#6 + def &(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#21 + def >(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#16 + def ^(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#6 + def and(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#11 + def or(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#21 + def then(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#16 + def xor(other); end + + # source://dry-logic//lib/dry/logic/operators.rb#11 + def |(other); end +end + +# source://dry-logic//lib/dry/logic/predicates.rb#11 +module Dry::Logic::Predicates + include ::Dry::Core::Constants + extend ::Dry::Logic::Predicates::Methods + + mixes_in_class_methods ::Dry::Logic::Predicates::Methods + + class << self + # @private + # + # source://dry-logic//lib/dry/logic/predicates.rb#288 + def included(other); end + end +end + +# source://dry-logic//lib/dry/logic/predicates.rb#15 +module Dry::Logic::Predicates::Methods + # source://dry-logic//lib/dry/logic/predicates.rb#32 + def [](name); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#108 + def array?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#49 + def attr?(name, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#66 + def bool?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#153 + def bytesize?(size, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#229 + def case?(pattern, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#70 + def date?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#74 + def date_time?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#96 + def decimal?(input); end + + # source://dry-logic//lib/dry/logic/predicates.rb#275 + def deprecated(name, in_favor_of); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#53 + def empty?(input); end + + # This overrides Object#eql? so we need to make it compatible + # + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#203 + def eql?(left, right = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#116 + def even?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#184 + def excluded_from?(list, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#198 + def excludes?(value, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#175 + def exclusion?(list, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#221 + def false?(value); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#62 + def filled?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#92 + def float?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#225 + def format?(regex, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#124 + def gt?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#132 + def gteq?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#104 + def hash?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#180 + def included_in?(list, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#188 + def includes?(value, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#170 + def inclusion?(list, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#88 + def int?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#209 + def is?(left, right); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#45 + def key?(name, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#120 + def lt?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#128 + def lteq?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#166 + def max_bytesize?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#149 + def max_size?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#162 + def min_bytesize?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#145 + def min_size?(num, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#40 + def nil?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#40 + def none?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#213 + def not_eql?(left, right); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#82 + def number?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#112 + def odd?(input); end + + # source://dry-logic//lib/dry/logic/predicates.rb#271 + def predicate(name, &block); end + + # This overrides Object#respond_to? so we need to make it compatible + # + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#265 + def respond_to?(method, input = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#136 + def size?(size, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#100 + def str?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#78 + def time?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#217 + def true?(value); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#36 + def type?(type, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#255 + def uri?(schemes, input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#260 + def uri_rfc3986?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#235 + def uuid_v1?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#239 + def uuid_v2?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#243 + def uuid_v3?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#247 + def uuid_v4?(input); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/predicates.rb#251 + def uuid_v5?(input); end + + class << self + # source://dry-logic//lib/dry/logic/predicates.rb#16 + def uuid_format(version); end + end +end + +# source://dry-logic//lib/dry/logic/predicates.rb#22 +Dry::Logic::Predicates::Methods::UUIDv1 = T.let(T.unsafe(nil), Regexp) + +# source://dry-logic//lib/dry/logic/predicates.rb#24 +Dry::Logic::Predicates::Methods::UUIDv2 = T.let(T.unsafe(nil), Regexp) + +# source://dry-logic//lib/dry/logic/predicates.rb#26 +Dry::Logic::Predicates::Methods::UUIDv3 = T.let(T.unsafe(nil), Regexp) + +# source://dry-logic//lib/dry/logic/predicates.rb#28 +Dry::Logic::Predicates::Methods::UUIDv4 = T.let(T.unsafe(nil), Regexp) + +# source://dry-logic//lib/dry/logic/predicates.rb#30 +Dry::Logic::Predicates::Methods::UUIDv5 = T.let(T.unsafe(nil), Regexp) + +# source://dry-logic//lib/dry/logic/result.rb#5 +class Dry::Logic::Result + # @return [Result] a new instance of Result + # + # source://dry-logic//lib/dry/logic/result.rb#22 + def initialize(success, id = T.unsafe(nil), &block); end + + # source://dry-logic//lib/dry/logic/result.rb#40 + def ast(input = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/result.rb#32 + def failure?; end + + # Returns the value of attribute id. + # + # source://dry-logic//lib/dry/logic/result.rb#18 + def id; end + + # Returns the value of attribute serializer. + # + # source://dry-logic//lib/dry/logic/result.rb#20 + def serializer; end + + # Returns the value of attribute success. + # + # source://dry-logic//lib/dry/logic/result.rb#16 + def success; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/result.rb#28 + def success?; end + + # source://dry-logic//lib/dry/logic/result.rb#44 + def to_ast; end + + # source://dry-logic//lib/dry/logic/result.rb#52 + def to_s; end + + # source://dry-logic//lib/dry/logic/result.rb#36 + def type; end + + private + + # source://dry-logic//lib/dry/logic/result.rb#58 + def visit(ast); end + + # source://dry-logic//lib/dry/logic/result.rb#72 + def visit_and(node); end + + # source://dry-logic//lib/dry/logic/result.rb#91 + def visit_hint(node); end + + # source://dry-logic//lib/dry/logic/result.rb#87 + def visit_not(node); end + + # source://dry-logic//lib/dry/logic/result.rb#77 + def visit_or(node); end + + # source://dry-logic//lib/dry/logic/result.rb#62 + def visit_predicate(node); end + + # source://dry-logic//lib/dry/logic/result.rb#82 + def visit_xor(node); end +end + +# source://dry-logic//lib/dry/logic/result.rb#6 +Dry::Logic::Result::SUCCESS = T.let(T.unsafe(nil), T.untyped) + +# source://dry-logic//lib/dry/logic/rule.rb#15 +class Dry::Logic::Rule + include ::Dry::Core::Constants + include ::Dry::Core::Equalizer::Methods + include ::Dry::Logic::Operators + + # @return [Rule] a new instance of Rule + # + # source://dry-logic//lib/dry/logic/rule.rb#45 + def initialize(predicate, options = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://dry-logic//lib/dry/logic/rule.rb#24 + def args; end + + # Returns the value of attribute arity. + # + # source://dry-logic//lib/dry/logic/rule.rb#26 + def arity; end + + # source://dry-logic//lib/dry/logic/rule.rb#87 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/rule.rb#64 + def bind(object); end + + # source://dry-logic//lib/dry/logic/rule.rb#60 + def curry(*new_args); end + + # source://dry-logic//lib/dry/logic/rule.rb#75 + def eval_args(object); end + + # source://dry-logic//lib/dry/logic/rule.rb#56 + def id; end + + # Returns the value of attribute options. + # + # source://dry-logic//lib/dry/logic/rule.rb#22 + def options; end + + # source://dry-logic//lib/dry/logic/rule.rb#83 + def parameters; end + + # Returns the value of attribute predicate. + # + # source://dry-logic//lib/dry/logic/rule.rb#20 + def predicate; end + + # source://dry-logic//lib/dry/logic/rule.rb#52 + def type; end + + # source://dry-logic//lib/dry/logic/rule.rb#79 + def with(new_opts); end + + private + + # source://dry-logic//lib/dry/logic/rule.rb#93 + def args_with_names(*input); end + + class << self + # source://dry-logic//lib/dry/logic/rule.rb#41 + def build(predicate, args: T.unsafe(nil), arity: T.unsafe(nil), **options); end + + # source://dry-logic//lib/dry/logic/rule.rb#28 + def interfaces; end + + # source://dry-logic//lib/dry/logic/rule.rb#32 + def specialize(arity, curried, base = T.unsafe(nil)); end + end +end + +# source://dry-logic//lib/dry/logic/rule/interface.rb#6 +class Dry::Logic::Rule::Interface < ::Module + # @return [Interface] a new instance of Interface + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#13 + def initialize(arity, curried); end + + # Returns the value of attribute arity. + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#9 + def arity; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#32 + def constant?; end + + # Returns the value of attribute curried. + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#11 + def curried; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#40 + def curried?; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#133 + def curried_args; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#113 + def define_application; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#97 + def define_constant_application; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#80 + def define_constructor; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#58 + def name; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#44 + def unapplied; end + + # source://dry-logic//lib/dry/logic/rule/interface.rb#137 + def unapplied_args; end + + # @return [Boolean] + # + # source://dry-logic//lib/dry/logic/rule/interface.rb#36 + def variable_arity?; end +end + +# source://dry-logic//lib/dry/logic/rule/interface.rb#7 +Dry::Logic::Rule::Interface::SPLAT = T.let(T.unsafe(nil), Array) + +# source://dry-logic//lib/dry/logic/rule/predicate.rb#6 +class Dry::Logic::Rule::Predicate < ::Dry::Logic::Rule + # source://dry-logic//lib/dry/logic/rule/predicate.rb#27 + def ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/rule/predicate.rb#15 + def name; end + + # source://dry-logic//lib/dry/logic/rule/predicate.rb#27 + def to_ast(input = T.unsafe(nil)); end + + # source://dry-logic//lib/dry/logic/rule/predicate.rb#19 + def to_s; end + + # source://dry-logic//lib/dry/logic/rule/predicate.rb#11 + def type; end + + class << self + # source://dry-logic//lib/dry/logic/rule/predicate.rb#7 + def specialize(arity, curried, base = T.unsafe(nil)); end + end +end + +# source://dry-logic//lib/dry/logic/rule_compiler.rb#5 +class Dry::Logic::RuleCompiler + # @return [RuleCompiler] a new instance of RuleCompiler + # + # source://dry-logic//lib/dry/logic/rule_compiler.rb#8 + def initialize(predicates); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#12 + def call(ast); end + + # Returns the value of attribute predicates. + # + # source://dry-logic//lib/dry/logic/rule_compiler.rb#6 + def predicates; end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#16 + def visit(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#60 + def visit_and(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#35 + def visit_attr(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#21 + def visit_check(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#44 + def visit_each(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#75 + def visit_implication(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#30 + def visit_key(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#26 + def visit_not(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#65 + def visit_or(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#48 + def visit_predicate(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#40 + def visit_set(node); end + + # source://dry-logic//lib/dry/logic/rule_compiler.rb#70 + def visit_xor(node); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-struct@1.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-struct@1.6.0.rbi new file mode 100644 index 0000000..bd73633 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-struct@1.6.0.rbi @@ -0,0 +1,922 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dry-struct` gem. +# Please instead update this file by running `bin/tapioca gem dry-struct`. + + +# source://dry-struct//lib/dry/struct/class_interface.rb#5 +module Dry + class << self + # source://dry-core/1.0.1/lib/dry/core.rb#52 + def Equalizer(*keys, **options); end + + # Constructor method for easily creating a {Dry::Struct}. + # + # @example + # require 'dry-struct' + # + # module Types + # include Dry.Types() + # end + # + # Person = Dry.Struct(name: Types::String, age: Types::Integer) + # matz = Person.new(name: "Matz", age: 52) + # matz.name #=> "Matz" + # matz.age #=> 52 + # + # Test = Dry.Struct(expected: Types::String) { schema(schema.strict) } + # Test[expected: "foo", unexpected: "bar"] + # #=> Dry::Struct::Error: [Test.new] unexpected keys [:unexpected] in Hash input + # @return [Dry::Struct] + # + # source://dry-struct//lib/dry/struct.rb#30 + def Struct(attributes = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#253 + def Types(*namespaces, default: T.unsafe(nil), **aliases); end + end +end + +# Typed {Struct} with virtus-like DSL for defining schema. +# +# ### Differences between dry-struct and virtus +# +# {Struct} look somewhat similar to [Virtus][] but there are few significant differences: +# +# * {Struct}s don't provide attribute writers and are meant to be used +# as "data objects" exclusively. +# * Handling of attribute values is provided by standalone type objects from +# [`dry-types`][]. +# * Handling of attribute hashes is provided by standalone hash schemas from +# [`dry-types`][]. +# * Struct classes quack like [`dry-types`][], which means you can use them +# in hash schemas, as array members or sum them +# +# {Struct} class can specify a constructor type, which uses [hash schemas][] +# to handle attributes in `.new` method. +# +# [`dry-types`]: https://github.com/dry-rb/dry-types +# [Virtus]: https://github.com/solnic/virtus +# [hash schemas]: http://dry-rb.org/gems/dry-types/hash-schemas +# +# @example +# require 'dry-struct' +# +# module Types +# include Dry.Types() +# end +# +# class Book < Dry::Struct +# attribute :title, Types::String +# attribute :subtitle, Types::String.optional +# end +# +# rom_n_roda = Book.new( +# title: 'Web Development with ROM and Roda', +# subtitle: nil +# ) +# rom_n_roda.title #=> 'Web Development with ROM and Roda' +# rom_n_roda.subtitle #=> nil +# +# refactoring = Book.new( +# title: 'Refactoring', +# subtitle: 'Improving the Design of Existing Code' +# ) +# refactoring.title #=> 'Refactoring' +# refactoring.subtitle #=> 'Improving the Design of Existing Code' +# +# source://dry-struct//lib/dry/struct/class_interface.rb#6 +class Dry::Struct + include ::Dry::Core::Constants + include ::Dry::Core::Equalizer::Methods + extend ::Dry::Core::Extensions + extend ::Dry::Core::Constants + extend ::Dry::Core::ClassAttributes + extend ::Dry::Types::Type + extend ::Dry::Types::Builder + extend ::Dry::Struct::ClassInterface + extend ::Dry::Core::Deprecations::Interface + + # @param attributes [Hash, #each] + # @return [Struct] a new instance of Struct + # + # source://dry-struct//lib/dry/struct.rb#126 + def initialize(attributes); end + + # Retrieves value of previously defined attribute by its' `name` + # + # @example + # class Book < Dry::Struct + # attribute :title, Types::String + # attribute :subtitle, Types::String.optional + # end + # + # rom_n_roda = Book.new( + # title: 'Web Development with ROM and Roda', + # subtitle: nil + # ) + # rom_n_roda[:title] #=> 'Web Development with ROM and Roda' + # rom_n_roda[:subtitle] #=> nil + # @param name [String] + # @return [Object] + # + # source://dry-struct//lib/dry/struct.rb#147 + def [](name); end + + # Returns the value of attribute attributes. + # + # source://dry-struct//lib/dry/struct.rb#122 + def __attributes__; end + + # Create a copy of {Dry::Struct} with overriden attributes + # + # @example + # class Book < Dry::Struct + # attribute :title, Types::String + # attribute :subtitle, Types::String.optional + # end + # + # rom_n_roda = Book.new( + # title: 'Web Development with ROM and Roda', + # subtitle: '2nd edition' + # ) + # #=> # + # + # rom_n_roda.new(subtitle: '3rd edition') + # #=> # + # @param changeset [Hash{Symbol => Object}] + # @return [Struct] + # + # source://dry-struct//lib/dry/struct.rb#196 + def __new__(changeset); end + + # Returns the value of attribute attributes. + # + # source://dry-struct//lib/dry/struct.rb#122 + def attributes; end + + # Pattern matching support + # + # @api private + # + # source://dry-struct//lib/dry/struct.rb#218 + def deconstruct_keys(_keys); end + + # @return [String] + # + # source://dry-struct//lib/dry/struct.rb#209 + def inspect; end + + # Create a copy of {Dry::Struct} with overriden attributes + # + # @example + # class Book < Dry::Struct + # attribute :title, Types::String + # attribute :subtitle, Types::String.optional + # end + # + # rom_n_roda = Book.new( + # title: 'Web Development with ROM and Roda', + # subtitle: '2nd edition' + # ) + # #=> # + # + # rom_n_roda.new(subtitle: '3rd edition') + # #=> # + # @param changeset [Hash{Symbol => Object}] + # @return [Struct] + # + # source://dry-struct//lib/dry/struct.rb#196 + def new(changeset); end + + # Converts the {Dry::Struct} to a hash with keys representing + # each attribute (as symbols) and their corresponding values + # + # @example + # class Book < Dry::Struct + # attribute :title, Types::String + # attribute :subtitle, Types::String.optional + # end + # + # rom_n_roda = Book.new( + # title: 'Web Development with ROM and Roda', + # subtitle: nil + # ) + # rom_n_roda.to_hash + # #=> {title: 'Web Development with ROM and Roda', subtitle: nil} + # @return [Hash{Symbol => Object}] + # + # source://dry-struct//lib/dry/struct.rb#168 + def to_h; end + + # Converts the {Dry::Struct} to a hash with keys representing + # each attribute (as symbols) and their corresponding values + # TODO: remove in 2.0 + # + # @example + # class Book < Dry::Struct + # attribute :title, Types::String + # attribute :subtitle, Types::String.optional + # end + # + # rom_n_roda = Book.new( + # title: 'Web Development with ROM and Roda', + # subtitle: nil + # ) + # rom_n_roda.to_hash + # #=> {title: 'Web Development with ROM and Roda', subtitle: nil} + # @return [Hash{Symbol => Object}] + # + # source://dry-struct//lib/dry/struct.rb#168 + def to_hash; end + + class << self + # source://dry-struct//lib/dry/struct.rb#94 + def loader; end + + def prepend(*_arg0); end + end +end + +# Class-level interface of {Struct} and {Value} +# +# source://dry-struct//lib/dry/struct/class_interface.rb#8 +module Dry::Struct::ClassInterface + include ::Dry::Core::Constants + include ::Dry::Core::ClassAttributes + include ::Dry::Types::Type + include ::Dry::Types::Builder + + # @param other [Object, Dry::Struct] + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#349 + def ===(other); end + + # Make the struct abstract. This class will be used as a default + # parent class for nested structs + # + # source://dry-struct//lib/dry/struct/class_interface.rb#415 + def abstract; end + + # Adds an attribute for this {Struct} with given `name` and `type` + # and modifies {.schema} accordingly. + # + # @example with nested structs + # class Language < Dry::Struct + # attribute :name, Types::String + # attribute :details, Dry::Struct do + # attribute :type, Types::String + # end + # end + # + # Language.schema # new lines for readability + # # => # rule=[type?(String)]> + # details: Language::Details + # }> fn=Kernel.Hash>]> + # + # ruby = Language.new(name: 'Ruby', details: { type: 'OO' }) + # ruby.name #=> 'Ruby' + # ruby.details #=> # + # ruby.details.type #=> 'OO' + # @example with a nested array of structs + # class Language < Dry::Struct + # attribute :name, Types::String + # attribute :versions, Types::Array.of(Types::String) + # attribute :celebrities, Types::Array.of(Dry::Struct) do + # attribute :name, Types::String + # attribute :pseudonym, Types::String + # end + # end + # + # Language.schema # new lines for readability + # => # rule=[type?(String)]> + # versions: Constrained< + # Array rule=[type?(String)]> + # > rule=[type?(Array)]> + # celebrities: Constrained rule=[type?(Array)]> + # }> fn=Kernel.Hash>]> + # + # ruby = Language.new( + # name: 'Ruby', + # versions: %w(1.8.7 1.9.8 2.0.1), + # celebrities: [ + # { name: 'Yukihiro Matsumoto', pseudonym: 'Matz' }, + # { name: 'Aaron Patterson', pseudonym: 'tenderlove' } + # ] + # ) + # ruby.name #=> 'Ruby' + # ruby.versions #=> ['1.8.7', '1.9.8', '2.0.1'] + # ruby.celebrities + # #=> [ + # #, + # # + # ] + # ruby.celebrities[0].name #=> 'Yukihiro Matsumoto' + # ruby.celebrities[0].pseudonym #=> 'Matz' + # ruby.celebrities[1].name #=> 'Aaron Patterson' + # ruby.celebrities[1].pseudonym #=> 'tenderlove' + # @param name [Symbol] name of the defined attribute + # @param type [Dry::Types::Type, nil] or superclass of nested type + # @raise [RepeatedAttributeError] when trying to define attribute with the + # same name as previously defined one + # @return [Dry::Struct] + # @yield If a block is given, it will be evaluated in the context of + # a new struct class, and set as a nested type for the given + # attribute. A class with a matching name will also be defined for + # the nested type. + # + # source://dry-struct//lib/dry/struct/class_interface.rb#95 + def attribute(name, type = T.unsafe(nil), &block); end + + # Adds an omittable (key is not required on initialization) attribute for this {Struct} + # + # @example + # class User < Dry::Struct + # attribute :name, Types::String + # attribute? :email, Types::String + # end + # + # User.new(name: 'John') # => # + # @param name [Symbol] name of the defined attribute + # @param type [Dry::Types::Type, nil] or superclass of nested type + # @return [Dry::Struct] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#148 + def attribute?(*args, &block); end + + # Gets the list of attribute names + # + # @return [Array] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#385 + def attribute_names; end + + # @example + # class Book < Dry::Struct + # attributes( + # title: Types::String, + # author: Types::String + # ) + # end + # + # Book.schema + # # => # rule=[type?(String)]> + # # author: Constrained rule=[type?(String)]> + # # }> fn=Kernel.Hash>]> + # @param new_schema [Hash{Symbol => Dry::Types::Type}] + # @raise [RepeatedAttributeError] when trying to define attribute with the + # same name as previously defined one + # @return [Dry::Struct] + # @see #attribute + # + # source://dry-struct//lib/dry/struct/class_interface.rb#182 + def attributes(new_schema); end + + # Add atributes from another struct + # + # @example + # class Address < Dry::Struct + # attribute :city, Types::String + # attribute :country, Types::String + # end + # + # class User < Dry::Struct + # attribute :name, Types::String + # attributes_from Address + # end + # + # User.new(name: 'Quispe', city: 'La Paz', country: 'Bolivia') + # @example with nested structs + # class User < Dry::Struct + # attribute :name, Types::String + # attribute :address do + # attributes_from Address + # end + # end + # @param struct [Dry::Struct] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#123 + def attributes_from(struct); end + + # @api private + # + # source://dry-struct//lib/dry/struct/class_interface.rb#271 + def call_safe(input, &block); end + + # @api private + # + # source://dry-struct//lib/dry/struct/class_interface.rb#280 + def call_unsafe(input); end + + # @return [true] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#355 + def constrained?; end + + # @param constructor [#call, nil] + # @param block [#call, nil] + # @return [Dry::Struct::Constructor] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#298 + def constructor(constructor = T.unsafe(nil), **_arg1, &block); end + + # @return [false] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#343 + def default?; end + + # @param args [({Symbol => Object})] + # @return [Dry::Types::Result::Failure] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#332 + def failure(*args); end + + # Checks if this {Struct} has the given attribute + # + # @param key [Symbol] Attribute name + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#378 + def has_attribute?(key); end + + # @param klass [Class] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#15 + def inherited(klass); end + + # @api private + # + # source://dry-struct//lib/dry/struct/class_interface.rb#289 + def load(attributes); end + + # @return [{Symbol => Object}] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#390 + def meta(meta = T.unsafe(nil)); end + + # @param attributes [Hash{Symbol => Object}, Dry::Struct] + # @raise [Struct::Error] if the given attributes don't conform {#schema} + # + # source://dry-struct//lib/dry/struct/class_interface.rb#249 + def new(attributes = T.unsafe(nil), safe = T.unsafe(nil), &block); end + + # @return [false] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#365 + def optional?; end + + # @return [self] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#360 + def primitive; end + + # @param other [Object, Dry::Struct] + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#349 + def primitive?(other); end + + # @param klass [Class] + # @param args [({Symbol => Object})] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#338 + def result(klass, *args); end + + # @param args [({Symbol => Object})] + # @return [Dry::Types::Result::Success] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#326 + def success(*args); end + + # Dump to the AST + # + # @api public + # @return [Array] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#424 + def to_ast(meta: T.unsafe(nil)); end + + # @return [Proc] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#370 + def to_proc; end + + # Add an arbitrary transformation for input hash keys. + # + # @example + # class Book < Dry::Struct + # transform_keys(&:to_sym) + # + # attribute :title, Types::String + # end + # + # Book.new('title' => "The Old Man and the Sea") + # # => # + # @param proc [#call, nil] + # @param block [#call, nil] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#231 + def transform_keys(proc = T.unsafe(nil), &block); end + + # Add an arbitrary transformation for new attribute types. + # + # @example + # class Book < Dry::Struct + # transform_types { |t| t.meta(struct: :Book) } + # + # attribute :title, Types::String + # end + # + # Book.schema.key(:title).meta # => { struct: :Book } + # @param proc [#call, nil] + # @param block [#call, nil] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#214 + def transform_types(proc = T.unsafe(nil), &block); end + + # @param input [Hash{Symbol => Object}, Dry::Struct] + # @return [Dry::Types::Result] + # @yieldparam failure [Dry::Types::Result::Failure] + # @yieldreturn [Dry::Types::Result] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#306 + def try(input); end + + # @param input [Hash{Symbol => Object}, Dry::Struct] + # @private + # @return [Dry::Types::Result] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#316 + def try_struct(input); end + + # Build a sum type + # + # @param type [Dry::Types::Type] + # @return [Dry::Types::Sum] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#405 + def |(type); end + + private + + # Constructs a type + # + # @return [Dry::Types::Type, Dry::Struct] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#458 + def build_type(name, type = T.unsafe(nil), &block); end + + # @param new_keys [Hash{Symbol => Dry::Types::Type, Dry::Struct}] + # @raise [RepeatedAttributeError] when trying to define attribute with the + # same name as previously defined one + # + # source://dry-struct//lib/dry/struct/class_interface.rb#238 + def check_schema_duplication(new_keys); end + + # Retrieves default attributes from defined {.schema}. + # Used in a {Struct} constructor if no attributes provided to {.new} + # + # @return [Hash{Symbol => Object}] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#439 + def default_attributes(default_schema = T.unsafe(nil)); end + + # source://dry-struct//lib/dry/struct/class_interface.rb#479 + def define_accessors(keys); end + + # Checks if the given type is a Dry::Struct + # + # @param type [Dry::Types::Type] + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#450 + def struct?(type); end + + # Stores an object for building nested struct classes + # + # @return [StructBuilder] + # + # source://dry-struct//lib/dry/struct/class_interface.rb#430 + def struct_builder; end +end + +# source://dry-struct//lib/dry/struct/compiler.rb#5 +class Dry::Struct::Compiler < ::Dry::Types::Compiler + # source://dry-struct//lib/dry/struct/compiler.rb#6 + def visit_struct(node); end +end + +# source://dry-struct//lib/dry/struct/constructor.rb#5 +class Dry::Struct::Constructor < ::Dry::Types::Constructor + # source://dry-types/1.7.2/lib/dry/types/constructor.rb#16 + def primitive; end +end + +# Raised when given input doesn't conform schema and constructor type +# +# source://dry-struct//lib/dry/struct/errors.rb#6 +class Dry::Struct::Error < ::TypeError; end + +# Helper for {Struct#to_hash} implementation +# +# source://dry-struct//lib/dry/struct/hashify.rb#6 +module Dry::Struct::Hashify + class << self + # Converts value to hash recursively + # + # @param value [#to_hash, #map, Object] + # @return [Hash, Array] + # + # source://dry-struct//lib/dry/struct/hashify.rb#10 + def [](value); end + end +end + +# Raised when a struct doesn't have an attribute +# +# source://dry-struct//lib/dry/struct/errors.rb#18 +class Dry::Struct::MissingAttributeError < ::KeyError + # @return [MissingAttributeError] a new instance of MissingAttributeError + # + # source://dry-struct//lib/dry/struct/errors.rb#19 + def initialize(key); end +end + +# When struct class stored in ast was garbage collected because no alive objects exists +# This shouldn't happen in a working application +# +# source://dry-struct//lib/dry/struct/errors.rb#26 +class Dry::Struct::RecycledStructError < ::RuntimeError + # @return [RecycledStructError] a new instance of RecycledStructError + # + # source://dry-struct//lib/dry/struct/errors.rb#27 + def initialize; end +end + +# Raised when defining duplicate attributes +# +# source://dry-struct//lib/dry/struct/errors.rb#9 +class Dry::Struct::RepeatedAttributeError < ::ArgumentError + # @param key [Symbol] attribute name that is the same as previously defined one + # @return [RepeatedAttributeError] a new instance of RepeatedAttributeError + # + # source://dry-struct//lib/dry/struct/errors.rb#12 + def initialize(key); end +end + +# @private +# +# source://dry-struct//lib/dry/struct/struct_builder.rb#6 +class Dry::Struct::StructBuilder < ::Dry::Struct::Compiler + # @return [StructBuilder] a new instance of StructBuilder + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#9 + def initialize(struct); end + + # @param attr_name [Symbol|String] the name of the nested type + # @param type [Dry::Struct, Dry::Types::Type::Array, Undefined] the superclass + # of the nested struct + # @yield the body of the nested struct + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#18 + def call(attr_name, type, &block); end + + # Returns the value of attribute struct. + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#7 + def struct; end + + private + + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#50 + def array?(type); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#79 + def check_name(name); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#68 + def const_name(type, attr_name); end + + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#54 + def optional?(type); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#58 + def parent(type); end + + # @return [Boolean] + # + # source://dry-struct//lib/dry/struct/struct_builder.rb#46 + def type?(type); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#93 + def visit_array(node); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#88 + def visit_constrained(node); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#102 + def visit_constructor(node); end + + # source://dry-struct//lib/dry/struct/struct_builder.rb#98 + def visit_nominal(*_arg0); end +end + +# A sum type of two or more structs +# As opposed to Dry::Types::Sum::Constrained +# this type tries no to coerce data first. +# +# source://dry-struct//lib/dry/struct/sum.rb#8 +class Dry::Struct::Sum < ::Dry::Types::Sum::Constrained + # @return [boolean] + # + # source://dry-struct//lib/dry/struct/sum.rb#39 + def ===(value); end + + # source://dry-struct//lib/dry/struct/sum.rb#9 + def call(input); end + + # @param input [Hash{Symbol => Object}, Dry::Struct] + # @return [Dry::Types::Result] + # @yieldparam failure [Dry::Types::Result::Failure] + # @yieldreturn [Dry::Types::Result] + # + # source://dry-struct//lib/dry/struct/sum.rb#19 + def try(input); end + + # Build a new sum type + # + # @param type [Dry::Types::Type] + # @return [Dry::Types::Sum] + # + # source://dry-struct//lib/dry/struct/sum.rb#30 + def |(type); end + + protected + + # @private + # + # source://dry-struct//lib/dry/struct/sum.rb#46 + def try_struct(input, &block); end +end + +# @private +# +# source://dry-struct//lib/dry/struct/version.rb#6 +Dry::Struct::VERSION = T.let(T.unsafe(nil), String) + +# {Value} objects behave like {Struct}s but *deeply frozen* +# using [`ice_nine`](https://github.com/dkubb/ice_nine) +# +# @example +# class Location < Dry::Struct::Value +# attribute :lat, Types::Float +# attribute :lng, Types::Float +# end +# +# loc1 = Location.new(lat: 1.23, lng: 4.56) +# loc2 = Location.new(lat: 1.23, lng: 4.56) +# +# loc1.frozen? #=> true +# loc2.frozen? #=> true +# loc1 == loc2 #=> true +# @see https://github.com/dkubb/ice_nine +# +# source://dry-struct//lib/dry/struct/value.rb#26 +class Dry::Struct::Value < ::Dry::Struct + class << self + # @param attributes [Hash{Symbol => Object}, Dry::Struct] + # @return [Value] + # @see https://github.com/dkubb/ice_nine + # + # source://dry-struct//lib/dry/struct/value.rb#32 + def new(*_arg0); end + end +end + +# source://dry-struct//lib/dry/struct/printer.rb#6 +module Dry::Types + extend ::Dry::Core::Constants + + class << self + # source://dry-types/1.7.2/lib/dry/types/constraints.rb#13 + def Rule(options); end + + # source://dry-types/1.7.2/lib/dry/types.rb#115 + def [](name); end + + # source://dry-types/1.7.2/lib/dry/types.rb#163 + def const_missing(const); end + + # source://dry-types/1.7.2/lib/dry/types.rb#82 + def container; end + + # source://dry-types/1.7.2/lib/dry/types.rb#197 + def define_builder(method, &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#149 + def identifier(klass); end + + # source://dry-types/1.7.2/lib/dry/types.rb#73 + def included(*_arg0); end + + # source://dry-types/1.7.2/lib/dry/types.rb#33 + def loader; end + + # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#202 + def module(*args, &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#104 + def register(name, type = T.unsafe(nil), &block); end + + # source://dry-types/1.7.2/lib/dry/types.rb#91 + def registered?(class_or_identifier); end + + # source://dry-types/1.7.2/lib/dry/types/constraints.rb#26 + def rule_compiler; end + + # source://dry-types/1.7.2/lib/dry/types.rb#158 + def type_map; end + end +end + +# @api private +# +# source://dry-struct//lib/dry/struct/printer.rb#8 +class Dry::Types::Printer + # source://dry-types/1.7.2/lib/dry/types/printer.rb#38 + def initialize; end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#43 + def call(type); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#49 + def visit(type, &block); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#62 + def visit_any(_); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#66 + def visit_array(type); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#72 + def visit_array_member(array); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#155 + def visit_callable(callable); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#104 + def visit_composition(composition, &block); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#93 + def visit_constrained(constrained); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#80 + def visit_constructor(constructor); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#129 + def visit_default(default); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#110 + def visit_enum(enum); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#253 + def visit_hash(hash); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#243 + def visit_key(key); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#149 + def visit_lax(lax); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#229 + def visit_map(map); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#143 + def visit_nominal(type); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#272 + def visit_options(options, meta = T.unsafe(nil)); end + + # source://dry-types/1.7.2/lib/dry/types/printer.rb#190 + def visit_schema(schema); end + + # @api private + # + # source://dry-types/1.7.2/lib/dry/types/printer.rb#80 + def visit_struct_constructor(constructor); end + + # @api private + # + # source://dry-struct//lib/dry/struct/printer.rb#12 + def visit_struct_sum(sum); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-types@1.7.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-types@1.7.2.rbi new file mode 100644 index 0000000..ff2ed83 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/dry-types@1.7.2.rbi @@ -0,0 +1,3936 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `dry-types` gem. +# Please instead update this file by running `bin/tapioca gem dry-types`. + + +# Main library namespace +# +# @api public +# +# source://dry-types//lib/dry/types/constraints.rb#3 +module Dry + class << self + # source://dry-core/1.0.1/lib/dry/core.rb#52 + def Equalizer(*keys, **options); end + + # source://dry-struct/1.6.0/lib/dry/struct.rb#30 + def Struct(attributes = T.unsafe(nil), &block); end + + # Export registered types as a module with constants + # + # @api public + # @example no options + # + # module Types + # # imports all types as constants, uses modules for namespaces + # include Dry.Types() + # end + # # strict types are exported by default + # Types::Integer + # # => # rule=[type?(Integer)]>]> + # Types::Nominal::Integer + # # => #]> + # @example changing default types + # + # module Types + # include Dry.Types(default: :nominal) + # end + # Types::Integer + # # => #]> + # @example cherry-picking namespaces + # + # module Types + # include Dry.Types(:strict, :coercible) + # end + # # cherry-picking discards default types, + # # provide the :default option along with the list of + # # namespaces if you want the to be exported + # Types.constants # => [:Coercible, :Strict] + # @example custom names + # module Types + # include Dry.Types(coercible: :Kernel) + # end + # Types::Kernel::Integer + # # => # fn=Kernel.Integer>]> + # @param namespaces [Array] List of type namespaces to export + # @param default [Symbol] Default namespace to export + # @param aliases [Hash{Symbol => Symbol}] Optional renamings, like strict: :Draconian + # @return [Dry::Types::Module] + # @see Dry::Types::Module + # + # source://dry-types//lib/dry/types.rb#253 + def Types(*namespaces, default: T.unsafe(nil), **aliases); end + end +end + +# @api public +# @see Dry.Types +# +# source://dry-types//lib/dry/types/constraints.rb#7 +module Dry::Types + include ::Dry::Core::Constants + extend ::Dry::Core::Constants + extend ::Dry::Core::ClassAttributes + extend ::Dry::Core::Extensions + extend ::Dry::Core::Deprecations::Interface + + class << self + # @api public + # @param options [Hash] + # @return [Dry::Logic::Rule] + # + # source://dry-types//lib/dry/types/constraints.rb#13 + def Rule(options); end + + # Get a built-in type by its name + # + # @api public + # @param name [String, Class] + # @return [Type, Class] + # + # source://dry-types//lib/dry/types.rb#115 + def [](name); end + + # @api private + # + # source://dry-types//lib/dry/types.rb#163 + def const_missing(const); end + + # Return container with registered built-in type objects + # + # @api private + # @return [Container{String => Nominal}] + # + # source://dry-types//lib/dry/types.rb#82 + def container; end + + # Add a new type builder method. This is a public API for defining custom + # type constructors + # + # @api public + # @example simple custom type constructor + # Dry::Types.define_builder(:or_nil) do |type| + # type.optional.fallback(nil) + # end + # + # Dry::Types["integer"].or_nil.("foo") # => nil + # @example fallback alias + # Dry::Types.define_builder(:or) do |type, fallback| + # type.fallback(fallback) + # end + # + # Dry::Types["integer"].or(100).("foo") # => 100 + # @param method [Symbol] + # @param block [#call] + # + # source://dry-types//lib/dry/types.rb#197 + def define_builder(method, &block); end + + # Infer a type identifier from the provided class + # + # @api public + # @param klass [#to_s] + # @return [String] + # + # source://dry-types//lib/dry/types.rb#149 + def identifier(klass); end + + # @api private + # @private + # + # source://dry-types//lib/dry/types.rb#73 + def included(*_arg0); end + + # @api public + # + # source://dry-types//lib/dry/types.rb#33 + def loader; end + + # @api public + # + # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#202 + def module(*args, &block); end + + # Register a new built-in type + # + # @api private + # @param name [String] + # @param type [Type] + # @param block [#call, nil] + # @return [Container{String => Nominal}] + # + # source://dry-types//lib/dry/types.rb#104 + def register(name, type = T.unsafe(nil), &block); end + + # Check if a give type is registered + # + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types.rb#91 + def registered?(class_or_identifier); end + + # @api private + # @return [Dry::Logic::RuleCompiler] + # + # source://dry-types//lib/dry/types/constraints.rb#26 + def rule_compiler; end + + # Cached type map + # + # @api private + # @return [Concurrent::Map] + # + # source://dry-types//lib/dry/types.rb#158 + def type_map; end + end +end + +# All built-in primitives +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#38 +Dry::Types::ALL_PRIMITIVES = T.let(T.unsafe(nil), Hash) + +# source://dry-types//lib/dry/types/any.rb#45 +Dry::Types::Any = T.let(T.unsafe(nil), Dry::Types::AnyClass) + +# Any is a nominal type that defines Object as the primitive class +# +# This type is useful in places where you can't be specific about the type +# and anything is acceptable. +# +# @api public +# +# source://dry-types//lib/dry/types/any.rb#11 +class Dry::Types::AnyClass < ::Dry::Types::Nominal + # @api private + # @return [AnyClass] a new instance of AnyClass + # + # source://dry-types//lib/dry/types/any.rb#17 + def initialize(**options); end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/any.rb#24 + def name; end + + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/any.rb#40 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @param new_options [Hash] + # @return [Type] + # + # source://dry-types//lib/dry/types/any.rb#33 + def with(**new_options); end + + class << self + # @api public + # + # source://dry-types//lib/dry/types/any.rb#12 + def name; end + end +end + +# Array type can be used to define an array with optional member type +# +# @api public +# +# source://dry-types//lib/dry/types/array.rb#8 +class Dry::Types::Array < ::Dry::Types::Nominal + # @api private + # + # source://dry-types//lib/dry/types/array.rb#27 + def constructor_type; end + + # Build an array type with a member type + # + # @api public + # @param type [Type, #call] + # @return [Array::Member] + # + # source://dry-types//lib/dry/types/array.rb#16 + def of(type); end +end + +# @api private +# +# source://dry-types//lib/dry/types/array/constructor.rb#8 +class Dry::Types::Array::Constructor < ::Dry::Types::Constructor + # @api private + # + # source://dry-types//lib/dry/types/array/constructor.rb#10 + def constructor_type; end + + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/array/constructor.rb#17 + def lax; end + + # @api public + # @see Dry::Types::Array#of + # + # source://dry-types//lib/dry/types/array/constructor.rb#24 + def of(member); end +end + +# Member arrays define their member type that is applied to each element +# +# @api public +# +# source://dry-types//lib/dry/types/array/member.rb#9 +class Dry::Types::Array::Member < ::Dry::Types::Array + # @api private + # @option options + # @param primitive [Class] + # @param options [Hash] + # @return [Member] a new instance of Member + # + # source://dry-types//lib/dry/types/array/member.rb#19 + def initialize(primitive, **options); end + + # @api private + # @param input [Object] + # @return [Array] + # + # source://dry-types//lib/dry/types/array/member.rb#45 + def call_safe(input); end + + # @api private + # @param input [Object] + # @return [Array] + # + # source://dry-types//lib/dry/types/array/member.rb#29 + def call_unsafe(input); end + + # @api private + # + # source://dry-types//lib/dry/types/array/member.rb#116 + def constructor_type; end + + # Build a lax type + # + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/array/member.rb#100 + def lax; end + + # @api public + # @return [Type] + # + # source://dry-types//lib/dry/types/array/member.rb#11 + def member; end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/array/member.rb#107 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @param input [Array, Object] + # @param block [#call, nil] + # @return [Result, Logic::Result] + # @yieldparam failure [Failure] + # @yieldreturn [Result] + # + # source://dry-types//lib/dry/types/array/member.rb#73 + def try(input, &block); end +end + +# Common API for building types and composition +# +# +# @api public +# +# source://dry-types//lib/dry/types/builder.rb#9 +module Dry::Types::Builder + include ::Dry::Core::Constants + + # Compose two types into an Intersection type + # + # @api private + # @param other [Type] + # @return [Intersection, Intersection::Constrained] + # + # source://dry-types//lib/dry/types/builder.rb#44 + def &(other); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def <<(constructor = T.unsafe(nil), **options, &block); end + + # Compose two types into an Implication type + # + # @api private + # @param other [Type] + # @return [Implication, Implication::Constrained] + # + # source://dry-types//lib/dry/types/builder.rb#55 + def >(other); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def >>(constructor = T.unsafe(nil), **options, &block); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def append(constructor = T.unsafe(nil), **options, &block); end + + # Turn a type into a constrained type + # + # @api public + # @param options [Hash] constraining rule (see {Types.Rule}) + # @return [Constrained] + # + # source://dry-types//lib/dry/types/builder.rb#75 + def constrained(options); end + + # @api private + # @return [Class] + # + # source://dry-types//lib/dry/types/builder.rb#15 + def constrained_type; end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def constructor(constructor = T.unsafe(nil), **options, &block); end + + # @api private + # @return [Class] + # + # source://dry-types//lib/dry/types/builder.rb#22 + def constructor_type; end + + # Turn a type into a type with a default value + # + # @api public + # @option [Boolean] + # @param input [Object] + # @param block [#call, nil] + # @param [Boolean] [Hash] a customizable set of options + # @raise [ConstraintError] + # @return [Default] + # + # source://dry-types//lib/dry/types/builder.rb#90 + def default(input = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Define an enum on top of the existing type + # + # @api public + # @param values [Array] + # @return [Enum] + # + # source://dry-types//lib/dry/types/builder.rb#123 + def enum(*values); end + + # Use the given value on type mismatch + # + # @api public + # @option [Boolean] + # @param value [Object] + # @param fallback [#call, nil] + # @param [Boolean] [Hash] a customizable set of options + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#170 + def fallback(value = T.unsafe(nil), shared: T.unsafe(nil), &_fallback); end + + # Turn a type into a lax type that will rescue from type-errors and + # return the original input + # + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/builder.rb#140 + def lax; end + + # Turn a type into an optional type + # + # @api public + # @return [Sum] + # + # source://dry-types//lib/dry/types/builder.rb#64 + def optional; end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def prepend(constructor = T.unsafe(nil), **options, &block); end + + # Compose two types into a Sum type + # + # @api private + # @param other [Type] + # @return [Sum, Sum::Constrained] + # + # source://dry-types//lib/dry/types/builder.rb#33 + def |(other); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/builder.rb#208 + def compose(other, composition_class); end +end + +# Common API for building type objects in a convenient way +# +# @api public +# +# source://dry-types//lib/dry/types/builder_methods.rb#9 +module Dry::Types::BuilderMethods + # Build an array type. + # + # Shortcut for Array#of. + # + # @api public + # @example + # Types::Strings = Types.Array(Types::String) + # @param type [Dry::Types::Type] + # @return [Dry::Types::Array] + # + # source://dry-types//lib/dry/types/builder_methods.rb#26 + def Array(type); end + + # Build a type with a single value + # The equality check done with `equal?` + # + # @api public + # @param object [Object] + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#71 + def Constant(object); end + + # Build a constructor type + # If no constructor block given it uses .new method + # + # @api public + # @param klass [Class] + # @param cons [#call, nil] Value constructor + # @param block [#call, nil] Value constructor + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#83 + def Constructor(klass, cons = T.unsafe(nil), &block); end + + # Build a hash schema + # + # @api public + # @param type_map [Hash{Symbol => Dry::Types::Type}] + # @return [Dry::Types::Array] + # + # source://dry-types//lib/dry/types/builder_methods.rb#35 + def Hash(type_map); end + + # Build a type which values are instances of a given class + # Values are checked using `is_a?` call + # + # @api public + # @example + # Types::Error = Types.Instance(StandardError) + # Types::Error = Types.Strict(StandardError) + # Types.Strict(Integer) == Types::Strict::Int # => true + # @param klass [Class, Module] Class or module + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#50 + def Instance(klass); end + + # Builds a constrained nominal type accepting any value that + # responds to given methods + # + # @api public + # @example + # Types::Callable = Types.Interface(:call) + # Types::Contact = Types.Interface(:name, :address) + # @param methods [Array] Method names + # @return [Dry::Types::Contrained] + # + # source://dry-types//lib/dry/types/builder_methods.rb#134 + def Interface(*methods); end + + # Build a map type + # + # @api public + # @example + # Types::IntMap = Types.Map(Types::Strict::Integer, 'any') + # Types::IntStringMap = Types.Map(Types::Strict::Integer, Types::Strict::String) + # @param key_type [Type] Key type + # @param value_type [Type] Value type + # @return [Dry::Types::Map] + # + # source://dry-types//lib/dry/types/builder_methods.rb#120 + def Map(key_type, value_type); end + + # Build a nominal type + # + # @api public + # @param klass [Class] + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#100 + def Nominal(klass); end + + # Build a type which values are instances of a given class + # Values are checked using `is_a?` call + # + # @api public + # @example + # Types::Error = Types.Instance(StandardError) + # Types::Error = Types.Strict(StandardError) + # Types.Strict(Integer) == Types::Strict::Int # => true + # @param klass [Class, Module] Class or module + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#50 + def Strict(klass); end + + # Build a type with a single value + # The equality check done with `eql?` + # + # @api public + # @param value [Object] + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/builder_methods.rb#61 + def Value(value); end + + # @api private + # + # source://dry-types//lib/dry/types/builder_methods.rb#11 + def included(base); end +end + +# All coercible types +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#41 +Dry::Types::COERCIBLE = T.let(T.unsafe(nil), Hash) + +# Base class for coercion errors raise by dry-types +# +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#15 +class Dry::Types::CoercionError < ::StandardError + # @api private + # @return [CoercionError] a new instance of CoercionError + # + # source://dry-types//lib/dry/types/errors.rb#35 + def initialize(message, meta: T.unsafe(nil), backtrace: T.unsafe(nil)); end + + # Metadata associated with the error + # + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/errors.rb#32 + def meta; end + + class << self + # @api private + # + # source://dry-types//lib/dry/types/errors.rb#17 + def handle(exception, meta: T.unsafe(nil)); end + end +end + +# Common coercion functions used by the built-in `Params` and `JSON` types +# +# @api public +# +# source://dry-types//lib/dry/types/coercions.rb#8 +module Dry::Types::Coercions + include ::Dry::Core::Constants + + # @api public + # @param input [#to_str, Object] + # @return [Date, Object] + # @see Date.parse + # + # source://dry-types//lib/dry/types/coercions.rb#18 + def to_date(input, &block); end + + # @api public + # @param input [#to_str, Object] + # @return [DateTime, Object] + # @see DateTime.parse + # + # source://dry-types//lib/dry/types/coercions.rb#41 + def to_date_time(input, &block); end + + # @api public + # @param input [#to_sym, Object] + # @raise CoercionError + # @return [Symbol, Object] + # + # source://dry-types//lib/dry/types/coercions.rb#87 + def to_symbol(input, &block); end + + # @api public + # @param input [#to_str, Object] + # @return [Time, Object] + # @see Time.parse + # + # source://dry-types//lib/dry/types/coercions.rb#64 + def to_time(input, &block); end + + private + + # Checks whether String is empty + # + # @api private + # @param value [String, Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/coercions.rb#102 + def empty_str?(value); end +end + +# JSON-specific coercions +# +# @api public +# +# source://dry-types//lib/dry/types/coercions/json.rb#14 +module Dry::Types::Coercions::JSON + extend ::Dry::Core::Constants + extend ::Dry::Types::Coercions + + class << self + # @api public + # @param input [#to_d, Object] + # @raise CoercionError + # @return [BigDecimal, nil] + # + # source://dry-types//lib/dry/types/coercions/json.rb#41 + def to_decimal(input, &_block); end + + # @api public + # @param input [Object] + # @raise CoercionError + # @return [nil] if the input is nil + # + # source://dry-types//lib/dry/types/coercions/json.rb#24 + def to_nil(input, &_block); end + end +end + +# Params-specific coercions +# +# @api public +# +# source://dry-types//lib/dry/types/coercions/params.rb#12 +module Dry::Types::Coercions::Params + extend ::Dry::Core::Constants + extend ::Dry::Types::Coercions + + class << self + # @api public + # @param input [Array, String, Object] + # @raise CoercionError + # @return [Array, Object] + # + # source://dry-types//lib/dry/types/coercions/params.rb#135 + def to_ary(input, &_block); end + + # @api public + # @param input [#to_d, Object] + # @raise CoercionError + # @return [BigDecimal, nil, Object] + # + # source://dry-types//lib/dry/types/coercions/params.rb#116 + def to_decimal(input, &_block); end + + # @api public + # @param input [String, Object] + # @raise CoercionError + # @return [Boolean, Object] + # @see TRUE_VALUES + # @see FALSE_VALUES + # + # source://dry-types//lib/dry/types/coercions/params.rb#69 + def to_false(input, &_block); end + + # @api public + # @param input [#to_f, Object] + # @raise CoercionError + # @return [Float, nil, Object] + # + # source://dry-types//lib/dry/types/coercions/params.rb#103 + def to_float(input, &block); end + + # @api public + # @param input [Hash, String, Object] + # @raise CoercionError + # @return [Hash, Object] + # + # source://dry-types//lib/dry/types/coercions/params.rb#154 + def to_hash(input, &_block); end + + # @api public + # @param input [#to_int, #to_i, Object] + # @raise CoercionError + # @return [Integer, nil, Object] + # + # source://dry-types//lib/dry/types/coercions/params.rb#86 + def to_int(input, &block); end + + # @api public + # @param input [Object] + # @raise CoercionError + # @return [nil] if the input is an empty string or nil + # + # source://dry-types//lib/dry/types/coercions/params.rb#29 + def to_nil(input, &_block); end + + # @api public + # @param input [String, Object] + # @raise CoercionError + # @return [Boolean, Object] + # @see TRUE_VALUES + # @see FALSE_VALUES + # + # source://dry-types//lib/dry/types/coercions/params.rb#49 + def to_true(input, &_block); end + end +end + +# @api public +# +# source://dry-types//lib/dry/types/coercions/params.rb#15 +Dry::Types::Coercions::Params::BOOLEAN_MAP = T.let(T.unsafe(nil), Hash) + +# @api public +# +# source://dry-types//lib/dry/types/coercions/params.rb#14 +Dry::Types::Coercions::Params::FALSE_VALUES = T.let(T.unsafe(nil), Array) + +# @api public +# +# source://dry-types//lib/dry/types/coercions/params.rb#13 +Dry::Types::Coercions::Params::TRUE_VALUES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://dry-types//lib/dry/types/compiler.rb#6 +class Dry::Types::Compiler + extend ::Dry::Core::Deprecations::Interface + + # @api private + # @return [Compiler] a new instance of Compiler + # + # source://dry-types//lib/dry/types/compiler.rb#11 + def initialize(registry); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#15 + def call(ast); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#116 + def compile_fn(fn); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#9 + def registry; end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#19 + def visit(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#112 + def visit_any(meta); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#61 + def visit_array(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#24 + def visit_constrained(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#30 + def visit_constructor(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#102 + def visit_enum(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#67 + def visit_hash(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#82 + def visit_json_array(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#77 + def visit_json_hash(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#97 + def visit_key(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#36 + def visit_lax(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#107 + def visit_map(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#41 + def visit_nominal(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#92 + def visit_params_array(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#87 + def visit_params_hash(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#52 + def visit_rule(node); end + + # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#168 + def visit_safe(*args, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#72 + def visit_schema(node); end + + # @api private + # + # source://dry-types//lib/dry/types/compiler.rb#56 + def visit_sum(node); end +end + +# source://dry-types//lib/dry/types/composition.rb#9 +module Dry::Types::Composition + include ::Dry::Types::Type + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Options + include ::Dry::Types::Meta + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Composition::Constrained + + # @api private + # @param left [Type] + # @param right [Type] + # @param options [Hash] + # + # source://dry-types//lib/dry/types/composition.rb#46 + def initialize(left, right, **options); end + + # @api private + # @param input [Object] + # @raise [NotImplementedError] + # @return [Object] + # + # source://dry-types//lib/dry/types/composition.rb#94 + def call_safe(input, &block); end + + # @api private + # @param input [Object] + # @raise [NotImplementedError] + # @return [Object] + # + # source://dry-types//lib/dry/types/composition.rb#85 + def call_unsafe(input); end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/composition.rb#69 + def constrained?; end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/composition.rb#62 + def default?; end + + # @api private + # + # source://dry-types//lib/dry/types/composition.rb#116 + def failure(input, _error = T.unsafe(nil)); end + + # @return [Type] + # + # source://dry-types//lib/dry/types/composition.rb#18 + def left; end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/composition.rb#55 + def name; end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/composition.rb#76 + def optional?; end + + # @api private + # @param value [Object] + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/composition.rb#130 + def primitive?(value); end + + # @return [Type] + # + # source://dry-types//lib/dry/types/composition.rb#21 + def right; end + + # @api private + # + # source://dry-types//lib/dry/types/composition.rb#106 + def success(input); end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/composition.rb#137 + def to_ast(meta: T.unsafe(nil)); end + + # Wrap the type with a proc + # + # @api public + # @return [Proc] + # + # source://dry-types//lib/dry/types/composition.rb#147 + def to_proc; end + + # @api public + # @param input [Object] + # @raise [NotImplementedError] + # + # source://dry-types//lib/dry/types/composition.rb#101 + def try(input); end + + class << self + # @private + # + # source://dry-types//lib/dry/types/composition.rb#33 + def included(base); end + end +end + +# source://dry-types//lib/dry/types/composition.rb#23 +module Dry::Types::Composition::Constrained + # @return [Boolean] + # + # source://dry-types//lib/dry/types/composition.rb#28 + def constrained?; end + + # source://dry-types//lib/dry/types/composition.rb#24 + def rule; end +end + +# Constrained types apply rules to the input +# +# @api public +# +# source://dry-types//lib/dry/types/constrained.rb#8 +class Dry::Types::Constrained + include ::Dry::Types::Type + include ::Dry::Types::Options + include ::Dry::Types::Decorator + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + + # @api public + # @param type [Type] + # @param options [Hash] + # @return [Constrained] a new instance of Constrained + # + # source://dry-types//lib/dry/types/constrained.rb#23 + def initialize(type, **options); end + + # @api public + # @param value [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/constrained.rb#103 + def ===(value); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constrained.rb#44 + def call_safe(input, &block); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constrained.rb#31 + def call_unsafe(input); end + + # @api public + # @param options [Hash] The options hash provided to {Types.Rule} and combined + # using {&} with previous {#rule} + # @return [Constrained] + # @see Dry::Logic::Operators#and + # + # source://dry-types//lib/dry/types/constrained.rb#87 + def constrained(options); end + + # @api public + # @return [true] + # + # source://dry-types//lib/dry/types/constrained.rb#94 + def constrained?; end + + # @api private + # + # source://dry-types//lib/dry/types/constrained.rb#122 + def constructor_type; end + + # Build lax type. Constraints are not applicable to lax types hence unwrapping + # + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/constrained.rb#111 + def lax; end + + # @api public + # @return [Dry::Logic::Rule] + # + # source://dry-types//lib/dry/types/constrained.rb#16 + def rule; end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/constrained.rb#117 + def to_ast(meta: T.unsafe(nil)); end + + # Safe coercion attempt. It is similar to #call with a + # block given but returns a Result instance with metadata + # about errors (if any). + # + # @api public + # @overload try + # @overload try + # + # source://dry-types//lib/dry/types/constrained.rb#67 + def try(input, &block); end + + private + + # @api private + # @param response [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/constrained.rb#133 + def decorate?(response); end +end + +# Common coercion-related API for constrained types +# +# @api public +# +# source://dry-types//lib/dry/types/constrained/coercible.rb#9 +class Dry::Types::Constrained::Coercible < ::Dry::Types::Constrained + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constrained/coercible.rb#27 + def call_safe(input); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constrained/coercible.rb#13 + def call_unsafe(input); end + + # @api public + # @see Dry::Types::Constrained#try + # + # source://dry-types//lib/dry/types/constrained/coercible.rb#40 + def try(input, &block); end +end + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#116 +class Dry::Types::ConstraintError < ::Dry::Types::CoercionError + # @api public + # @param result [String, #to_s] + # @param input [Object] + # @return [ConstraintError] a new instance of ConstraintError + # + # source://dry-types//lib/dry/types/errors.rb#124 + def initialize(result, input); end + + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/errors.rb#120 + def input; end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/errors.rb#136 + def message; end + + # @api public + # @return [String, #to_s] + # + # source://dry-types//lib/dry/types/errors.rb#118 + def result; end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/errors.rb#136 + def to_s; end +end + +# Constructor types apply a function to the input that is supposed to return +# a new value. Coercion is a common use case for constructor types. +# +# @api public +# +# source://dry-types//lib/dry/types/constructor.rb#9 +class Dry::Types::Constructor < ::Dry::Types::Nominal + # Instantiate a new constructor type instance + # + # @api private + # @param type [Type] + # @param fn [Function] + # @param options [Hash] + # @return [Constructor] a new instance of Constructor + # + # source://dry-types//lib/dry/types/constructor.rb#62 + def initialize(type, fn: T.unsafe(nil), **options); end + + # Build a new constructor by prepending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor.rb#144 + def <<(new_fn = T.unsafe(nil), **options, &block); end + + # Build a new constructor by appending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor.rb#109 + def >>(new_fn = T.unsafe(nil), **options, &block); end + + # Build a new constructor by appending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor.rb#109 + def append(new_fn = T.unsafe(nil), **options, &block); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor.rb#72 + def call_safe(input); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor.rb#80 + def call_unsafe(input); end + + # @api private + # @return [Class] + # + # source://dry-types//lib/dry/types/constructor.rb#124 + def constrained_type; end + + # Build a new constructor by appending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor.rb#109 + def constructor(new_fn = T.unsafe(nil), **options, &block); end + + # @api public + # @return [#call] + # + # source://dry-types//lib/dry/types/constructor.rb#13 + def fn; end + + # Build a lax type + # + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/constructor.rb#153 + def lax; end + + # Build a new constructor by prepending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor.rb#144 + def prepend(new_fn = T.unsafe(nil), **options, &block); end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/constructor.rb#131 + def to_ast(meta: T.unsafe(nil)); end + + # Wrap the type with a proc + # + # @api public + # @return [Proc] + # + # source://dry-types//lib/dry/types/constructor.rb#162 + def to_proc; end + + # @api public + # @param input [Object] + # @param block [#call, nil] + # @return [Logic::Result, Types::Result] + # @return [Object] if block given and try fails + # + # source://dry-types//lib/dry/types/constructor.rb#91 + def try(input, &block); end + + # @api public + # @return [Type] + # + # source://dry-types//lib/dry/types/constructor.rb#16 + def type; end + + private + + # Delegates missing methods to {#type} + # + # @api private + # @param method [Symbol] + # @param args [Array] + # @param block [#call, nil] + # + # source://dry-types//lib/dry/types/constructor.rb#184 + def method_missing(method, *args, &block); end + + # @api private + # @param meth [Symbol] + # @param include_private [Boolean] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/constructor.rb#173 + def respond_to_missing?(meth, include_private = T.unsafe(nil)); end + + class << self + # @api public + # @param input [Builder, Object] + # @param options [Hash] + # @param block [#call, nil] + # + # source://dry-types//lib/dry/types/constructor.rb#35 + def [](type, fn:, **options); end + + # @api public + # @param input [Builder, Object] + # @param options [Hash] + # @param block [#call, nil] + # + # source://dry-types//lib/dry/types/constructor.rb#25 + def new(input, fn: T.unsafe(nil), **options, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/constructor.rb#46 + def wrapper_type; end + end +end + +# Function is used internally by Constructor types +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#11 +class Dry::Types::Constructor::Function + include ::Dry::Core::Equalizer::Methods + + # @api private + # @return [Function] a new instance of Function + # + # source://dry-types//lib/dry/types/constructor/function.rb#173 + def initialize(fn); end + + # @api private + # @return [Function] + # + # source://dry-types//lib/dry/types/constructor/function.rb#208 + def <<(other); end + + # @api private + # @return [Function] + # + # source://dry-types//lib/dry/types/constructor/function.rb#202 + def >>(other); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/function.rb#178 + def [](input, &block); end + + # @api private + # @return [Integer] + # + # source://dry-types//lib/dry/types/constructor/function.rb#184 + def arity; end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/function.rb#178 + def call(input, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#171 + def fn; end + + # @api private + # @return [Array] + # + # source://dry-types//lib/dry/types/constructor/function.rb#193 + def to_ast; end + + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/constructor/function.rb#188 + def wrapper?; end + + class << self + # Choose or build specialized invokation code for a callable + # + # @api private + # @param fn [#call] + # @raise [::ArgumentError] + # @return [Function] + # + # source://dry-types//lib/dry/types/constructor/function.rb#141 + def [](fn); end + + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/constructor/function.rb#158 + def yields_block?(fn); end + end +end + +# Coercion via a method call on a known object +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#26 +class Dry::Types::Constructor::Function::MethodCall < ::Dry::Types::Constructor::Function + # @api private + # @return [MethodCall] a new instance of MethodCall + # + # source://dry-types//lib/dry/types/constructor/function.rb#112 + def initialize(fn); end + + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#110 + def name; end + + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#110 + def target; end + + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#118 + def to_ast; end + + class << self + # @api private + # @return [MethodCall] + # + # source://dry-types//lib/dry/types/constructor/function.rb#105 + def [](fn, safe); end + + # Choose or build the base class + # + # @api private + # @return [Function] + # + # source://dry-types//lib/dry/types/constructor/function.rb#32 + def call_class(method, public, safe); end + end +end + +# Coercion via a private method call +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#85 +class Dry::Types::Constructor::Function::MethodCall::PrivateCall < ::Dry::Types::Constructor::Function::MethodCall + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#86 + def call(input, &block); end +end + +# Coercion via an unsafe private method call +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#94 +class Dry::Types::Constructor::Function::MethodCall::PrivateSafeCall < ::Dry::Types::Constructor::Function::MethodCall::PrivateCall + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#95 + def call(input, &block); end +end + +# Coercion with a publicly accessible method call +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#53 +class Dry::Types::Constructor::Function::MethodCall::PublicCall < ::Dry::Types::Constructor::Function::MethodCall + class << self + # Choose or build the interface + # + # @api private + # @return [::Module] + # + # source://dry-types//lib/dry/types/constructor/function.rb#59 + def call_interface(method, safe); end + end +end + +# Wrapper for unsafe coercion functions +# +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#15 +class Dry::Types::Constructor::Function::Safe < ::Dry::Types::Constructor::Function + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#16 + def call(input, &block); end +end + +# @api private +# +# source://dry-types//lib/dry/types/constructor/function.rb#123 +class Dry::Types::Constructor::Function::Wrapper < ::Dry::Types::Constructor::Function + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/function.rb#125 + def [](input, type, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/constructor/function.rb#132 + def arity; end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/function.rb#125 + def call(input, type, &block); end +end + +# @api public +# +# source://dry-types//lib/dry/types/constructor/wrapper.rb#7 +module Dry::Types::Constructor::Wrapper + # Build a new constructor by prepending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#60 + def <<(new_fn = T.unsafe(nil), **options, &block); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def >>(constructor = T.unsafe(nil), **options, &block); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def append(constructor = T.unsafe(nil), **options, &block); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#11 + def call_safe(input, &block); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#18 + def call_unsafe(input); end + + # Define a constructor for the type + # + # @api public + # @param constructor [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/builder.rb#153 + def constructor(constructor = T.unsafe(nil), **options, &block); end + + # @api public + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#77 + def lax; end + + # Build a new constructor by prepending a block to the coercion function + # + # @api public + # @param new_fn [#call, nil] + # @param options [Hash] + # @param block [#call, nil] + # @return [Constructor] + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#60 + def prepend(new_fn = T.unsafe(nil), **options, &block); end + + # @api public + # @param input [Object] + # @param block [#call, nil] + # @return [Logic::Result, Types::Result] + # @return [Object] if block given and try fails + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#29 + def try(input, &block); end + + private + + # Replace underlying type + # + # @api private + # + # source://dry-types//lib/dry/types/constructor/wrapper.rb#88 + def __new__(type); end +end + +# Internal container for the built-in types +# +# @api private +# +# source://dry-types//lib/dry/types/container.rb#8 +class Dry::Types::Container + include ::Dry::Core::Container::Mixin::Initializer + include ::Dry::Core::Container::Mixin + extend ::Dry::Core::Container::Configuration + + # source://dry-core/1.0.1/lib/dry/core/container/mixin.rb#83 + def config; end +end + +# Common API for types +# +# @api public +# +# source://dry-types//lib/dry/types/decorator.rb#8 +module Dry::Types::Decorator + include ::Dry::Types::Options + + # @api public + # @param type [Type] + # + # source://dry-types//lib/dry/types/decorator.rb#15 + def initialize(type, *_arg1, **_arg2); end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/decorator.rb#41 + def constrained?; end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/decorator.rb#34 + def default?; end + + # Wrap the type with a proc + # + # @api public + # @return [Proc] + # + # source://dry-types//lib/dry/types/decorator.rb#60 + def to_proc; end + + # @api public + # @param input [Object] + # @param block [#call, nil] + # @return [Result, Logic::Result] + # @return [Object] if block given and try fails + # + # source://dry-types//lib/dry/types/decorator.rb#27 + def try(input, &block); end + + # @api public + # @return [Type] + # + # source://dry-types//lib/dry/types/decorator.rb#12 + def type; end + + private + + # Replace underlying type + # + # @api private + # + # source://dry-types//lib/dry/types/decorator.rb#100 + def __new__(type); end + + # @api private + # @param response [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/decorator.rb#71 + def decorate?(response); end + + # Delegates missing methods to {#type} + # + # @api private + # @param meth [Symbol] + # @param args [Array] + # @param block [#call, nil] + # + # source://dry-types//lib/dry/types/decorator.rb#82 + def method_missing(meth, *args, **_arg2, &block); end + + # @api public + # @param meth [Symbol] + # @param include_private [Boolean] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/decorator.rb#51 + def respond_to_missing?(meth, include_private = T.unsafe(nil)); end +end + +# Default types are useful when a missing value should be replaced by a default one +# +# @api public +# +# source://dry-types//lib/dry/types/default.rb#8 +class Dry::Types::Default + include ::Dry::Types::Type + include ::Dry::Types::Options + include ::Dry::Types::Decorator + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + + # @api private + # @param type [Type] + # @param value [Object] + # @return [Default] a new instance of Default + # + # source://dry-types//lib/dry/types/default.rb#53 + def initialize(type, value, **_arg2); end + + # @api private + # @param input [Object] + # @return [Object] value passed through {#type} or {#default} value + # + # source://dry-types//lib/dry/types/default.rb#110 + def call_safe(input = T.unsafe(nil), &block); end + + # @api private + # @param input [Object] + # @return [Object] value passed through {#type} or {#default} value + # + # source://dry-types//lib/dry/types/default.rb#97 + def call_unsafe(input = T.unsafe(nil)); end + + # @api private + # @return [false] + # + # source://dry-types//lib/dry/types/default.rb#121 + def callable?; end + + # Build a constrained type + # + # @api public + # @param args [Array] see {Dry::Types::Builder#constrained} + # @return [Default] + # + # source://dry-types//lib/dry/types/default.rb#65 + def constrained(*_arg0, **_arg1, &_arg2); end + + # @api public + # @return [true] + # + # source://dry-types//lib/dry/types/default.rb#72 + def default?; end + + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/default.rb#32 + def evaluate; end + + # @api public + # @param input [Object] + # @return [Result::Success] + # + # source://dry-types//lib/dry/types/default.rb#81 + def try(input); end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/default.rb#88 + def valid?(value = T.unsafe(nil)); end + + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/default.rb#32 + def value; end + + class << self + # @api private + # @param value [Object, #call] + # @return [Class] {Default} or {Default::Callable} + # + # source://dry-types//lib/dry/types/default.rb#41 + def [](value); end + end +end + +# @api private +# +# source://dry-types//lib/dry/types/default.rb#10 +class Dry::Types::Default::Callable < ::Dry::Types::Default + # @api private + # @return [true] + # + # source://dry-types//lib/dry/types/default.rb#20 + def callable?; end + + # Evaluates given callable + # + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/default.rb#15 + def evaluate; end +end + +# @api public +Dry::Types::Definition = Dry::Types::Nominal + +# Enum types can be used to define an enum on top of an existing type +# +# @api public +# +# source://dry-types//lib/dry/types/enum.rb#8 +class Dry::Types::Enum + include ::Dry::Types::Type + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Options + include ::Dry::Types::Decorator + include ::Dry::Core::Constants + include ::Dry::Types::Builder + + # @api private + # @option options + # @param type [Type] + # @param options [Hash] + # @return [Enum] a new instance of Enum + # + # source://dry-types//lib/dry/types/enum.rb#28 + def initialize(type, **options); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/enum.rb#46 + def call_safe(input, &block); end + + # @api private + # @return [Object] + # + # source://dry-types//lib/dry/types/enum.rb#39 + def call_unsafe(input); end + + # @api private + # + # source://dry-types//lib/dry/types/enum.rb#58 + def default(*_arg0); end + + # Check whether a value is in the enum + # + # @api public + # + # source://dry-types//lib/dry/types/type.rb#18 + def include?(input = T.unsafe(nil)); end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/enum.rb#76 + def inspect; end + + # @api public + # @return [Hash] + # + # source://dry-types//lib/dry/types/enum.rb#21 + def inverted_mapping; end + + # @api public + # @return [Hash] + # + # source://dry-types//lib/dry/types/enum.rb#18 + def mapping; end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/enum.rb#69 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/enum.rb#76 + def to_s; end + + # @api public + # @see Dry::Types::Constrained#try + # + # source://dry-types//lib/dry/types/enum.rb#53 + def try(input); end + + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/enum.rb#15 + def values; end + + private + + # Maps a value + # + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/enum.rb#90 + def map_value(input); end +end + +# Internal container for constructor functions used by the built-in types +# +# @api private +# +# source://dry-types//lib/dry/types/fn_container.rb#8 +class Dry::Types::FnContainer + class << self + # @api private + # + # source://dry-types//lib/dry/types/fn_container.rb#23 + def [](fn_name); end + + # @api private + # + # source://dry-types//lib/dry/types/fn_container.rb#10 + def container; end + + # @api private + # + # source://dry-types//lib/dry/types/fn_container.rb#15 + def register(function = T.unsafe(nil), &block); end + + # @api private + # + # source://dry-types//lib/dry/types/fn_container.rb#32 + def register_name(function); end + end +end + +# Hash types can be used to define maps and schemas +# +# @api public +# +# source://dry-types//lib/dry/types/hash.rb#8 +class Dry::Types::Hash < ::Dry::Types::Nominal + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#77 + def constructor_type; end + + # Build a map type + # + # @api public + # @param key_type [Type] + # @param value_type [Type] + # @return [Map] + # + # source://dry-types//lib/dry/types/hash.rb#40 + def map(key_type, value_type); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#50 + def permissive(*_arg0); end + + # @api public + # @overload schema + # @overload schema + # + # source://dry-types//lib/dry/types/hash.rb#22 + def schema(keys_or_map, meta = T.unsafe(nil)); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#50 + def strict(*_arg0); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#50 + def strict_with_defaults(*_arg0); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#50 + def symbolized(*_arg0); end + + # @api public + # @param meta [Boolean] Whether to dump the meta to the AST + # @return [Array] An AST representation + # + # source://dry-types//lib/dry/types/hash.rb#95 + def to_ast(meta: T.unsafe(nil)); end + + # Whether the type transforms types of schemas created by {Dry::Types::Hash#schema} + # + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/hash.rb#86 + def transform_types?; end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#50 + def weak(*_arg0); end + + # Injects a type transformation function for building schemas + # + # @api public + # @param proc [#call, nil] + # @param block [#call, nil] + # @raise [ArgumentError] + # @return [Hash] + # + # source://dry-types//lib/dry/types/hash.rb#67 + def with_type_transform(proc = T.unsafe(nil), &block); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#102 + def build_keys(type_map); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#123 + def key_name(key); end + + # @api private + # + # source://dry-types//lib/dry/types/hash.rb#114 + def resolve_type(type); end +end + +# @api public +# +# source://dry-types//lib/dry/types/hash/constructor.rb#9 +class Dry::Types::Hash::Constructor < ::Dry::Types::Constructor + # @api private + # + # source://dry-types//lib/dry/types/hash/constructor.rb#11 + def constructor_type; end + + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/hash/constructor.rb#18 + def lax; end + + # @api public + # @see Dry::Types::Array#of + # + # source://dry-types//lib/dry/types/hash/constructor.rb#25 + def schema(*_arg0, **_arg1, &_arg2); end +end + +# @api public +# +# source://dry-types//lib/dry/types/hash.rb#9 +Dry::Types::Hash::NOT_REQUIRED = T.let(T.unsafe(nil), Hash) + +# Implication type +# +# @api public +# +# source://dry-types//lib/dry/types/implication.rb#8 +class Dry::Types::Implication + include ::Dry::Types::Type + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Options + include ::Dry::Types::Meta + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Composition + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/implication.rb#33 + def call_safe(input, &block); end + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/implication.rb#20 + def call_unsafe(input); end + + # @api private + # @param value [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/implication.rb#57 + def primitive?(value); end + + # @api public + # @param input [Object] + # + # source://dry-types//lib/dry/types/implication.rb#44 + def try(input); end + + class << self + # source://dry-types//lib/dry/types/composition.rb#36 + def ast_type; end + + # source://dry-types//lib/dry/types/composition.rb#37 + def composition_name; end + + # @api public + # + # source://dry-types//lib/dry/types/implication.rb#11 + def operator; end + end +end + +# source://dry-types//lib/dry/types/implication.rb#0 +class Dry::Types::Implication::Constrained < ::Dry::Types::Implication + include ::Dry::Types::Composition::Constrained +end + +# @api public +# +# source://dry-types//lib/dry/types/inflector.rb#7 +Dry::Types::Inflector = T.let(T.unsafe(nil), Dry::Inflector) + +# Intersection type +# +# @api public +# +# source://dry-types//lib/dry/types/intersection.rb#12 +class Dry::Types::Intersection + include ::Dry::Types::Type + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Options + include ::Dry::Types::Meta + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Composition + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/intersection.rb#33 + def call_safe(input, &block); end + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/intersection.rb#24 + def call_unsafe(input); end + + # @api private + # @param value [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/intersection.rb#55 + def primitive?(value); end + + # @api public + # @param input [Object] + # + # source://dry-types//lib/dry/types/intersection.rb#40 + def try(input); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/intersection.rb#94 + def merge_results(left_result, right_result); end + + # @api private + # + # source://dry-types//lib/dry/types/intersection.rb#76 + def try_side(side, input); end + + # @api private + # + # source://dry-types//lib/dry/types/intersection.rb#62 + def try_sides(input, &block); end + + class << self + # source://dry-types//lib/dry/types/composition.rb#36 + def ast_type; end + + # source://dry-types//lib/dry/types/composition.rb#37 + def composition_name; end + + # @api public + # + # source://dry-types//lib/dry/types/intersection.rb#15 + def operator; end + end +end + +# source://dry-types//lib/dry/types/intersection.rb#0 +class Dry::Types::Intersection::Constrained < ::Dry::Types::Intersection + include ::Dry::Types::Composition::Constrained +end + +# Primitives with {Kernel} coercion methods +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#6 +Dry::Types::KERNEL_COERCIBLE = T.let(T.unsafe(nil), Hash) + +# Lax types rescue from type-related errors when constructors fail +# +# @api public +# +# source://dry-types//lib/dry/types/lax.rb#8 +class Dry::Types::Lax + include ::Dry::Types::Type + include ::Dry::Types::Options + include ::Dry::Types::Decorator + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + + # @api public + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/lax.rb#22 + def [](input); end + + # @api public + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/lax.rb#22 + def call(input); end + + # @api public + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/lax.rb#22 + def call_safe(input); end + + # @api public + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/lax.rb#22 + def call_unsafe(input); end + + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/lax.rb#52 + def lax; end + + # @api public + # @see Nominal#to_ast + # + # source://dry-types//lib/dry/types/lax.rb#45 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @param input [Object] + # @param block [#call, nil] + # @return [Result, Logic::Result] + # @yieldparam failure [Failure] + # @yieldreturn [Result] + # + # source://dry-types//lib/dry/types/lax.rb#38 + def try(input, &block); end + + private + + # @api private + # @param response [Object, Dry::Types::Constructor] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/lax.rb#63 + def decorate?(response); end +end + +# Primitives with coercions through by convention `to_*` methods +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#16 +Dry::Types::METHOD_COERCIBLE = T.let(T.unsafe(nil), Hash) + +# By convention methods to coerce {METHOD_COERCIBLE} primitives +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#21 +Dry::Types::METHOD_COERCIBLE_METHODS = T.let(T.unsafe(nil), Hash) + +# Homogeneous mapping. It describes a hash with unknown keys that match a certain type. +# +# @api public +# @example +# type = Dry::Types['hash'].map( +# Dry::Types['integer'].constrained(gteq: 1, lteq: 10), +# Dry::Types['string'] +# ) +# +# type.(1 => 'right') +# # => {1 => 'right'} +# +# type.('1' => 'wrong') +# # Dry::Types::MapError: "1" violates constraints (type?(Integer, "1") +# # AND gteq?(1, "1") +# # AND lteq?(10, "1") failed) +# +# type.(11 => 'wrong') +# # Dry::Types::MapError: 11 violates constraints (lteq?(10, 11) failed) +# +# source://dry-types//lib/dry/types/map.rb#25 +class Dry::Types::Map < ::Dry::Types::Nominal + # @api public + # @return [Map] a new instance of Map + # + # source://dry-types//lib/dry/types/map.rb#26 + def initialize(primitive, key_type: T.unsafe(nil), value_type: T.unsafe(nil), meta: T.unsafe(nil)); end + + # @api private + # @param hash [Hash] + # @return [Hash] + # + # source://dry-types//lib/dry/types/map.rb#67 + def call_safe(hash); end + + # @api private + # @param hash [Hash] + # @return [Hash] + # + # source://dry-types//lib/dry/types/map.rb#56 + def call_unsafe(hash); end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/map.rb#98 + def constrained?; end + + # @api public + # @return [Type] + # + # source://dry-types//lib/dry/types/map.rb#33 + def key_type; end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/map.rb#47 + def name; end + + # @api public + # @param meta [Boolean] Whether to dump the meta to the AST + # @return [Array] An AST representation + # + # source://dry-types//lib/dry/types/map.rb#88 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @param hash [Hash] + # @return [Result] + # @yield [result] + # + # source://dry-types//lib/dry/types/map.rb#76 + def try(hash); end + + # @api public + # @return [Type] + # + # source://dry-types//lib/dry/types/map.rb#40 + def value_type; end + + private + + # @api private + # + # source://dry-types//lib/dry/types/map.rb#107 + def coerce(input); end +end + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#89 +class Dry::Types::MapError < ::Dry::Types::CoercionError; end + +# Storage for meta-data +# +# @api public +# +# source://dry-types//lib/dry/types/meta.rb#8 +module Dry::Types::Meta + # @api public + # + # source://dry-types//lib/dry/types/meta.rb#9 + def initialize(*args, meta: T.unsafe(nil), **options); end + + # @api public + # @overload meta + # @overload meta + # + # source://dry-types//lib/dry/types/meta.rb#31 + def meta(data = T.unsafe(nil)); end + + # Resets meta + # + # @api public + # @return [Dry::Types::Type] + # + # source://dry-types//lib/dry/types/meta.rb#46 + def pristine; end + + # @api public + # @param options [Hash] new_options + # @return [Type] + # + # source://dry-types//lib/dry/types/meta.rb#19 + def with(**options); end +end + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#94 +class Dry::Types::MissingKeyError < ::Dry::Types::SchemaKeyError + # @api public + # @param key [String, Symbol] + # @return [MissingKeyError] a new instance of MissingKeyError + # + # source://dry-types//lib/dry/types/errors.rb#99 + def initialize(key); end + + # @api public + # @return [Symbol] + # + # source://dry-types//lib/dry/types/errors.rb#96 + def key; end +end + +# Export types registered in a container as module constants. +# +# @api public +# @example +# module Types +# include Dry.Types(:strict, :coercible, :nominal, default: :strict) +# end +# +# Types.constants +# # => [:Class, :Strict, :Symbol, :Integer, :Float, :String, :Array, :Hash, +# # :Decimal, :Nil, :True, :False, :Bool, :Date, :Nominal, :DateTime, :Range, +# # :Coercible, :Time] +# +# source://dry-types//lib/dry/types/module.rb#19 +class Dry::Types::Module < ::Module + # @api public + # @return [Module] a new instance of Module + # + # source://dry-types//lib/dry/types/module.rb#20 + def initialize(registry, *args, **kwargs); end + + # @api private + # + # source://dry-types//lib/dry/types/module.rb#76 + def registry_tree; end + + # @api private + # + # source://dry-types//lib/dry/types/module.rb#43 + def type_constants(*namespaces, default: T.unsafe(nil), **aliases); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/module.rb#91 + def check_parameters(*namespaces, default: T.unsafe(nil), **aliases); end + + # @api private + # + # source://dry-types//lib/dry/types/module.rb#111 + def define_constants(constants, mod = T.unsafe(nil)); end +end + +# Collection of multiple errors +# +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#48 +class Dry::Types::MultipleError < ::Dry::Types::CoercionError + # @api public + # @param errors [Array] + # @return [MultipleError] a new instance of MultipleError + # + # source://dry-types//lib/dry/types/errors.rb#53 + def initialize(errors); end + + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/errors.rb#50 + def errors; end + + # @api public + # @return string + # + # source://dry-types//lib/dry/types/errors.rb#59 + def message; end + + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/errors.rb#64 + def meta; end +end + +# Primitives that are non-coercible +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#26 +Dry::Types::NON_COERCIBLE = T.let(T.unsafe(nil), Hash) + +# All built-in primitives except {NilClass} +# +# @api public +# +# source://dry-types//lib/dry/types/core.rb#44 +Dry::Types::NON_NIL = T.let(T.unsafe(nil), Hash) + +# Nominal types define a primitive class and do not apply any constructors or constraints +# +# Use these types for annotations and the base for building more complex types on top of them. +# +# @api public +# +# source://dry-types//lib/dry/types/nominal.rb#10 +class Dry::Types::Nominal + include ::Dry::Types::Type + include ::Dry::Types::Options + include ::Dry::Types::Meta + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + + # @api private + # @param primitive [Type, Class] + # @param options [Hash] + # @return [Nominal] a new instance of Nominal + # + # source://dry-types//lib/dry/types/nominal.rb#42 + def initialize(primitive, **options); end + + # @api private + # @param input [BasicObject] + # @return [BasicObject] + # + # source://dry-types//lib/dry/types/nominal.rb#90 + def call_safe(input); end + + # @api private + # @param input [BasicObject] + # @return [BasicObject] + # + # source://dry-types//lib/dry/types/nominal.rb#81 + def call_unsafe(input); end + + # @api private + # + # source://dry-types//lib/dry/types/nominal.rb#139 + def coerce(input, &_block); end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/nominal.rb#65 + def constrained?; end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/nominal.rb#58 + def default?; end + + # @api public + # @raise [ArgumentError] + # @return [Result::Failure] + # + # source://dry-types//lib/dry/types/nominal.rb#121 + def failure(input, error); end + + # Return self. Nominal types are lax by definition + # + # @api public + # @return [Nominal] + # + # source://dry-types//lib/dry/types/nominal.rb#181 + def lax; end + + # @api public + # @return [String] + # + # source://dry-types//lib/dry/types/nominal.rb#51 + def name; end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/nominal.rb#72 + def optional?; end + + # @api public + # @return [Class] + # + # source://dry-types//lib/dry/types/nominal.rb#19 + def primitive; end + + # Checks whether value is of a #primitive class + # + # @api public + # @param value [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/nominal.rb#134 + def primitive?(value); end + + # @api public + # @return [Result::Success] + # + # source://dry-types//lib/dry/types/nominal.rb#112 + def success(input); end + + # Return AST representation of a type nominal + # + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/nominal.rb#172 + def to_ast(meta: T.unsafe(nil)); end + + # Wrap the type with a proc + # + # @api public + # @return [Proc] + # + # source://dry-types//lib/dry/types/nominal.rb#190 + def to_proc; end + + # @api public + # @param input [Object] + # @return [Result, Logic::Result] when a block is not provided + # @return [nil] otherwise + # @yieldparam failure [Failure] + # @yieldreturn [Result] + # + # source://dry-types//lib/dry/types/nominal.rb#103 + def try(input); end + + # @api private + # + # source://dry-types//lib/dry/types/nominal.rb#150 + def try_coerce(input); end + + class << self + # @api private + # @param primitive [Class] + # @return [Type] + # + # source://dry-types//lib/dry/types/nominal.rb#26 + def [](primitive); end + end +end + +# @api public +# +# source://dry-types//lib/dry/types/nominal.rb#36 +Dry::Types::Nominal::ALWAYS = T.let(T.unsafe(nil), Proc) + +# Common API for types with options +# +# @api private +# +# source://dry-types//lib/dry/types/options.rb#8 +module Dry::Types::Options + # @api private + # @see Nominal#initialize + # + # source://dry-types//lib/dry/types/options.rb#15 + def initialize(*args, **options); end + + # @api private + # @return [Hash] + # + # source://dry-types//lib/dry/types/options.rb#10 + def options; end + + # @api private + # @param new_options [Hash] + # @return [Type] + # + # source://dry-types//lib/dry/types/options.rb#25 + def with(**new_options); end +end + +# source://dry-types//lib/dry/types/printer.rb#296 +Dry::Types::PRINTER = T.let(T.unsafe(nil), Dry::Types::Printer) + +# PredicateInferrer returns the list of predicates used by a type. +# +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#8 +class Dry::Types::PredicateInferrer + include ::Dry::Core::Cache::Methods + extend ::Dry::Core::Cache + + # @api private + # @return [PredicateInferrer] a new instance of PredicateInferrer + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#214 + def initialize(registry = T.unsafe(nil)); end + + # Infer predicate identifier from the provided type + # + # @api private + # @param type [Type] + # @return [Symbol] + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#224 + def [](type); end + + # @api private + # @return [Compiler] + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#211 + def compiler; end +end + +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#31 +Dry::Types::PredicateInferrer::ARRAY = T.let(T.unsafe(nil), Array) + +# Compiler reduces type AST into a list of predicates +# +# @api private +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#38 +class Dry::Types::PredicateInferrer::Compiler + extend ::Dry::Core::Constants + extend ::Dry::Core::ClassAttributes + + # @api private + # @return [Compiler] a new instance of Compiler + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#49 + def initialize(registry); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#54 + def infer_predicate(type); end + + # @api private + # @return [PredicateRegistry] + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#46 + def registry; end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#89 + def visit(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#165 + def visit_and(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#160 + def visit_any(_); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#113 + def visit_array(_); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#148 + def visit_constrained(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#123 + def visit_constructor(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#129 + def visit_enum(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#107 + def visit_hash(_); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#118 + def visit_lax(node); end + + # @api private + # @raise [NotImplementedError] + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#189 + def visit_map(_node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#95 + def visit_nominal(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#171 + def visit_predicate(node); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#107 + def visit_schema(_); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#135 + def visit_sum(node); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/predicate_inferrer.rb#196 + def merge_predicates(nodes); end +end + +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#29 +Dry::Types::PredicateInferrer::HASH = T.let(T.unsafe(nil), Array) + +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#33 +Dry::Types::PredicateInferrer::NIL = T.let(T.unsafe(nil), Array) + +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#25 +Dry::Types::PredicateInferrer::REDUCED_TYPES = T.let(T.unsafe(nil), Hash) + +# @api public +# +# source://dry-types//lib/dry/types/predicate_inferrer.rb#11 +Dry::Types::PredicateInferrer::TYPE_TO_PREDICATE = T.let(T.unsafe(nil), Hash) + +# A registry with predicate objects from `Dry::Logic::Predicates` +# +# @api private +# +# source://dry-types//lib/dry/types/predicate_registry.rb#8 +class Dry::Types::PredicateRegistry + # @api private + # @return [PredicateRegistry] a new instance of PredicateRegistry + # + # source://dry-types//lib/dry/types/predicate_registry.rb#19 + def initialize(predicates = T.unsafe(nil)); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_registry.rb#29 + def [](name); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_registry.rb#13 + def has_predicate; end + + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/predicate_registry.rb#24 + def key?(name); end + + # @api private + # + # source://dry-types//lib/dry/types/predicate_registry.rb#10 + def predicates; end +end + +# @api private +# +# source://dry-types//lib/dry/types/predicate_registry.rb#15 +Dry::Types::PredicateRegistry::KERNEL_RESPOND_TO = T.let(T.unsafe(nil), UnboundMethod) + +# PrimitiveInferrer returns the list of classes matching a type. +# +# @api public +# +# source://dry-types//lib/dry/types/primitive_inferrer.rb#8 +class Dry::Types::PrimitiveInferrer + include ::Dry::Core::Cache::Methods + extend ::Dry::Core::Cache + + # @api private + # @return [PrimitiveInferrer] a new instance of PrimitiveInferrer + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#79 + def initialize; end + + # Infer primitives from the provided type + # + # @api private + # @return [Array[Class]] + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#88 + def [](type); end + + # @api private + # @return [Compiler] + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#76 + def compiler; end +end + +# Compiler reduces type AST into a list of primitives +# +# @api private +# +# source://dry-types//lib/dry/types/primitive_inferrer.rb#14 +class Dry::Types::PrimitiveInferrer::Compiler + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#16 + def visit(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#69 + def visit_any(_); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#34 + def visit_array(_); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#63 + def visit_constrained(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#44 + def visit_constructor(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#50 + def visit_enum(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#28 + def visit_hash(_); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#39 + def visit_lax(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#22 + def visit_nominal(node); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#28 + def visit_schema(_); end + + # @api private + # + # source://dry-types//lib/dry/types/primitive_inferrer.rb#56 + def visit_sum(node); end +end + +# @api private +# +# source://dry-types//lib/dry/types/printable.rb#6 +module Dry::Types::Printable + # @api private + # @return [String] + # + # source://dry-types//lib/dry/types/printable.rb#10 + def inspect; end + + # @api private + # @return [String] + # + # source://dry-types//lib/dry/types/printable.rb#10 + def to_s; end +end + +# @api private +# +# source://dry-types//lib/dry/types/printer/composition.rb#6 +class Dry::Types::Printer + # @api private + # @return [Printer] a new instance of Printer + # + # source://dry-types//lib/dry/types/printer.rb#38 + def initialize; end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#43 + def call(type); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#49 + def visit(type, &block); end + + # @api private + # @yield ["Any"] + # + # source://dry-types//lib/dry/types/printer.rb#62 + def visit_any(_); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#66 + def visit_array(type); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#72 + def visit_array_member(array); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#155 + def visit_callable(callable); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#104 + def visit_composition(composition, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#93 + def visit_constrained(constrained); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#80 + def visit_constructor(constructor); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#129 + def visit_default(default); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#110 + def visit_enum(enum); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#253 + def visit_hash(hash); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#243 + def visit_key(key); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#149 + def visit_lax(lax); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#229 + def visit_map(map); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#143 + def visit_nominal(type); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#272 + def visit_options(options, meta = T.unsafe(nil)); end + + # @api private + # + # source://dry-types//lib/dry/types/printer.rb#190 + def visit_schema(schema); end + + # source://dry-types//lib/dry/types/printer.rb#80 + def visit_struct_constructor(constructor); end + + # source://dry-struct/1.6.0/lib/dry/struct/printer.rb#12 + def visit_struct_sum(sum); end +end + +# @api private +# +# source://dry-types//lib/dry/types/printer/composition.rb#8 +class Dry::Types::Printer::Composition + # @api private + # @return [Composition] a new instance of Composition + # + # source://dry-types//lib/dry/types/printer/composition.rb#9 + def initialize(printer, composition_class); end + + # @api private + # + # source://dry-types//lib/dry/types/printer/composition.rb#15 + def visit(composition); end + + private + + # @api private + # + # source://dry-types//lib/dry/types/printer/composition.rb#33 + def visit_constructor(type, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/printer/composition.rb#25 + def visit_constructors(composition); end +end + +# @api private +# +# source://dry-types//lib/dry/types/printer.rb#11 +Dry::Types::Printer::MAPPING = T.let(T.unsafe(nil), Hash) + +# Result class used by {Type#try} +# +# @api public +# +# source://dry-types//lib/dry/types/result.rb#8 +class Dry::Types::Result + include ::Dry::Core::Equalizer::Methods + + # @api private + # @param input [Object] + # @return [Result] a new instance of Result + # + # source://dry-types//lib/dry/types/result.rb#17 + def initialize(input); end + + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/result.rb#12 + def input; end +end + +# Failure result +# +# @api public +# +# source://dry-types//lib/dry/types/result.rb#43 +class Dry::Types::Result::Failure < ::Dry::Types::Result + # @api private + # @param input [Object] + # @param error [#to_s] + # @return [Failure] a new instance of Failure + # + # source://dry-types//lib/dry/types/result.rb#54 + def initialize(input, error); end + + # @api public + # @return [#to_s] + # + # source://dry-types//lib/dry/types/result.rb#47 + def error; end + + # @api public + # @return [true] + # + # source://dry-types//lib/dry/types/result.rb#76 + def failure?; end + + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/result.rb#69 + def success?; end + + # @api private + # @return [String] + # + # source://dry-types//lib/dry/types/result.rb#62 + def to_s; end +end + +# Success result +# +# @api public +# +# source://dry-types//lib/dry/types/result.rb#24 +class Dry::Types::Result::Success < ::Dry::Types::Result + # @api public + # @return [false] + # + # source://dry-types//lib/dry/types/result.rb#35 + def failure?; end + + # @api public + # @return [true] + # + # source://dry-types//lib/dry/types/result.rb#28 + def success?; end +end + +# @api public +Dry::Types::Safe = Dry::Types::Lax + +# The built-in Hash type can be defined in terms of keys and associated types +# its values can contain. Such definitions are named {Schema}s and defined +# as lists of {Key} types. +# +# {Schema} evaluates default values for keys missing in input hash +# +# {Schema} implements Enumerable using its keys as collection. +# +# @api public +# @see Dry::Types::Schema::Key +# @see Dry::Types::Default#evaluate +# @see Dry::Types::Default::Callable#evaluate +# +# source://dry-types//lib/dry/types/schema.rb#19 +class Dry::Types::Schema < ::Dry::Types::Hash + include ::Enumerable + + # @api private + # @option options + # @option options + # @param _primitive [Class] + # @param options [Hash] + # @return [Schema] a new instance of Schema + # + # source://dry-types//lib/dry/types/schema.rb#41 + def initialize(_primitive, **options); end + + # @api public + # @option options + # @option options + # @param hash [Hash] + # @param options [Hash] a customizable set of options + # @return [Hash{Symbol => Object}] + # + # source://dry-types//lib/dry/types/schema.rb#80 + def apply(hash, options = T.unsafe(nil)); end + + # @api private + # @param hash [Hash] + # @return [Hash{Symbol => Object}] + # + # source://dry-types//lib/dry/types/schema.rb#68 + def call_safe(hash, options = T.unsafe(nil)); end + + # @api private + # @param hash [Hash] + # @return [Hash{Symbol => Object}] + # + # source://dry-types//lib/dry/types/schema.rb#59 + def call_unsafe(hash, options = T.unsafe(nil)); end + + # Empty schema with the same options + # + # @api public + # @return [Schema] + # + # source://dry-types//lib/dry/types/schema.rb#298 + def clear; end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema.rb#270 + def constrained?; end + + # Iterate over each key type + # + # @api public + # @return [Array, Enumerator] + # + # source://dry-types//lib/dry/types/schema.rb#229 + def each(&block); end + + # Fetch key type by a key name + # + # Behaves as ::Hash#fetch + # + # @api public + # @overload key + # @overload key + # + # source://dry-types//lib/dry/types/schema.rb#259 + def key(name, fallback = T.unsafe(nil), &block); end + + # Whether the schema has the given key + # + # @api public + # @param name [Symbol] Key name + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema.rb#240 + def key?(name); end + + # @api public + # @return [Array[Dry::Types::Schema::Key]] + # + # source://dry-types//lib/dry/types/schema.rb#26 + def keys; end + + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/schema.rb#277 + def lax; end + + # Merge given schema keys into current schema + # + # A new instance is returned. + # + # @api public + # @param other [Schema] schema + # @return [Schema] + # + # source://dry-types//lib/dry/types/schema.rb#289 + def merge(other); end + + # @api public + # @return [Hash[Symbol, Dry::Types::Schema::Key]] + # + # source://dry-types//lib/dry/types/schema.rb#29 + def name_key_map; end + + # @api public + # @overload schema + # @overload schema + # + # source://dry-types//lib/dry/types/schema.rb#213 + def schema(keys_or_map); end + + # Make the schema intolerant to unknown keys + # + # @api public + # @return [Schema] + # + # source://dry-types//lib/dry/types/schema.rb#172 + def strict(strict = T.unsafe(nil)); end + + # Whether the schema rejects unknown keys + # + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema.rb#163 + def strict?; end + + # @api public + # @param meta [Boolean] Whether to dump the meta to the AST + # @return [Array] An AST representation + # + # source://dry-types//lib/dry/types/schema.rb#149 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @return [#call] + # + # source://dry-types//lib/dry/types/schema.rb#32 + def transform_key; end + + # Whether the schema transforms input keys + # + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema.rb#198 + def transform_keys?; end + + # @api public + # @param input [Hash] hash + # @return [Logic::Result] + # @return [Object] if coercion fails and a block is given + # @yieldparam failure [Failure] + # @yieldreturn [Result] + # + # source://dry-types//lib/dry/types/schema.rb#95 + def try(input); end + + # Inject a key transformation function + # + # @api public + # @param proc [#call, nil] + # @param block [#call, nil] + # @raise [ArgumentError] + # @return [Schema] + # + # source://dry-types//lib/dry/types/schema.rb#184 + def with_key_transform(proc = T.unsafe(nil), &block); end + + private + + # @api private + # @param keys [Array] + # @return [Dry::Types::Schema] + # + # source://dry-types//lib/dry/types/schema.rb#309 + def merge_keys(*keys); end + + # @api private + # @return [MissingKeyError] + # + # source://dry-types//lib/dry/types/schema.rb#405 + def missing_key(key); end + + # Try to add missing keys to the hash + # + # @api private + # + # source://dry-types//lib/dry/types/schema.rb#373 + def resolve_missing_keys(hash, options); end + + # Validate and coerce a hash. Call a block and halt on any error + # + # @api private + # @return [Hash] + # + # source://dry-types//lib/dry/types/schema.rb#351 + def resolve_safe(hash, options = T.unsafe(nil), &block); end + + # Validate and coerce a hash. Raise an exception on any error + # + # @api private + # @return [Hash] + # + # source://dry-types//lib/dry/types/schema.rb#321 + def resolve_unsafe(hash, options = T.unsafe(nil)); end + + # @api private + # @param hash_keys [Array] + # @return [UnknownKeysError] + # + # source://dry-types//lib/dry/types/schema.rb#397 + def unexpected_keys(hash_keys); end +end + +# Proxy type for schema keys. Contains only key name and +# whether it's required or not. All other calls deletaged +# to the wrapped type. +# +# @api public +# @see Dry::Types::Schema +# +# source://dry-types//lib/dry/types/schema/key.rb#14 +class Dry::Types::Schema::Key + include ::Dry::Types::Type + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Options + include ::Dry::Types::Decorator + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Printable + extend ::Dry::Core::Deprecations::Interface + + # @api private + # @return [Key] a new instance of Key + # + # source://dry-types//lib/dry/types/schema/key.rb#26 + def initialize(type, name, required: T.unsafe(nil), **options); end + + # @api private + # + # source://dry-types//lib/dry/types/schema/key.rb#40 + def call_safe(input, &block); end + + # @api private + # + # source://dry-types//lib/dry/types/schema/key.rb#45 + def call_unsafe(input); end + + # Turn key into a lax type. Lax types are not strict hence such keys are not required + # + # @api public + # @return [Lax] + # + # source://dry-types//lib/dry/types/schema/key.rb#99 + def lax; end + + # @api public + # @see Dry::Types::Meta#meta + # + # source://dry-types//lib/dry/types/schema/key.rb#131 + def meta(data = T.unsafe(nil)); end + + # @api public + # @return [Symbol] + # + # source://dry-types//lib/dry/types/schema/key.rb#23 + def name; end + + # Make key not required + # + # @api public + # @return [Dry::Types::Schema::Key] + # + # source://dry-types//lib/dry/types/schema/key.rb#90 + def omittable; end + + # Make wrapped type optional + # + # @api public + # @return [Key] + # + # source://dry-types//lib/dry/types/schema/key.rb#108 + def optional; end + + # Control whether the key is required + # + # @api public + # @overload required + # @overload required + # + # source://dry-types//lib/dry/types/schema/key.rb#77 + def required(required = T.unsafe(nil)); end + + # Whether the key is required in schema input + # + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema/key.rb#61 + def required?; end + + # Dump to internal AST representation + # + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/schema/key.rb#117 + def to_ast(meta: T.unsafe(nil)); end + + # @api public + # @see Dry::Types::Nominal#try + # + # source://dry-types//lib/dry/types/schema/key.rb#52 + def try(input, &block); end + + private + + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/schema/key.rb#147 + def decorate?(response); end +end + +# @api public +# +# source://dry-types//lib/dry/types/schema.rb#20 +Dry::Types::Schema::NO_TRANSFORM = T.let(T.unsafe(nil), String) + +# @api public +# +# source://dry-types//lib/dry/types/schema.rb#21 +Dry::Types::Schema::SYMBOLIZE_KEY = T.let(T.unsafe(nil), String) + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#69 +class Dry::Types::SchemaError < ::Dry::Types::CoercionError + # @api public + # @param key [String, Symbol] + # @param value [Object] + # @param result [String, #to_s] + # @return [SchemaError] a new instance of SchemaError + # + # source://dry-types//lib/dry/types/errors.rb#79 + def initialize(key, value, result); end + + # @api public + # @return [String, Symbol] + # + # source://dry-types//lib/dry/types/errors.rb#71 + def key; end + + # @api public + # @return [Object] + # + # source://dry-types//lib/dry/types/errors.rb#74 + def value; end +end + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#91 +class Dry::Types::SchemaKeyError < ::Dry::Types::CoercionError; end + +# Sum type +# +# @api public +# +# source://dry-types//lib/dry/types/sum.rb#8 +class Dry::Types::Sum + include ::Dry::Types::Type + include ::Dry::Core::Constants + include ::Dry::Types::Builder + include ::Dry::Types::Options + include ::Dry::Types::Meta + include ::Dry::Types::Printable + include ::Dry::Core::Equalizer::Methods + include ::Dry::Types::Composition + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/sum.rb#36 + def call_safe(input, &block); end + + # @api private + # @param input [Object] + # @return [Object] + # + # source://dry-types//lib/dry/types/sum.rb#27 + def call_unsafe(input); end + + # @api public + # @param options [Hash] + # @return [Constrained, Sum] + # @see Builder#constrained + # + # source://dry-types//lib/dry/types/sum.rb#87 + def constrained(options); end + + # Manage metadata to the type. If the type is an optional, #meta delegates + # to the right branch + # + # @api public + # @see [Meta#meta] + # + # source://dry-types//lib/dry/types/sum.rb#70 + def meta(data = T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://dry-types//lib/dry/types/sum.rb#18 + def optional?; end + + # @api private + # @param value [Object] + # @return [Boolean] + # + # source://dry-types//lib/dry/types/sum.rb#60 + def primitive?(value); end + + # @api public + # @param input [Object] + # + # source://dry-types//lib/dry/types/sum.rb#43 + def try(input); end + + class << self + # source://dry-types//lib/dry/types/composition.rb#36 + def ast_type; end + + # source://dry-types//lib/dry/types/composition.rb#37 + def composition_name; end + + # @api public + # + # source://dry-types//lib/dry/types/sum.rb#11 + def operator; end + end +end + +# source://dry-types//lib/dry/types/sum.rb#0 +class Dry::Types::Sum::Constrained < ::Dry::Types::Sum + include ::Dry::Types::Composition::Constrained +end + +# @api public +# +# source://dry-types//lib/dry/types.rb#31 +Dry::Types::TYPE_SPEC_REGEX = T.let(T.unsafe(nil), Regexp) + +# Common Type module denoting an object is a Type +# +# @api public +# +# source://dry-types//lib/dry/types/type.rb#8 +module Dry::Types::Type + extend ::Dry::Core::Deprecations::Interface + + # Whether a value is a valid member of the type + # Anything can be coerced matches + # + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/type.rb#18 + def ===(input = T.unsafe(nil)); end + + # Apply type to a value + # + # @api public + # @overload call + # @overload call + # + # source://dry-types//lib/dry/types/type.rb#43 + def [](input = T.unsafe(nil), &block); end + + # Apply type to a value + # + # @api public + # @overload call + # @overload call + # + # source://dry-types//lib/dry/types/type.rb#43 + def call(input = T.unsafe(nil), &block); end + + # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#168 + def safe(*args, &block); end + + # Whether a value is a valid member of the type + # + # @api private + # @return [Boolean] + # + # source://dry-types//lib/dry/types/type.rb#18 + def valid?(input = T.unsafe(nil)); end +end + +# @api public +# +# source://dry-types//lib/dry/types/errors.rb#105 +class Dry::Types::UnknownKeysError < ::Dry::Types::SchemaKeyError + # @api public + # @param keys [] + # @return [UnknownKeysError] a new instance of UnknownKeysError + # + # source://dry-types//lib/dry/types/errors.rb#110 + def initialize(keys); end + + # @api public + # @return [Array] + # + # source://dry-types//lib/dry/types/errors.rb#107 + def keys; end +end + +# source://dry-types//lib/dry/types/version.rb#5 +Dry::Types::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ed25519@1.3.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ed25519@1.3.0.rbi new file mode 100644 index 0000000..b97e7ed --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ed25519@1.3.0.rbi @@ -0,0 +1,194 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ed25519` gem. +# Please instead update this file by running `bin/tapioca gem ed25519`. + + +# The Ed25519 digital signatre algorithm +# +# source://ed25519//lib/ed25519/version.rb#3 +module Ed25519 + private + + # Perform a self-test to ensure the selected provider is working + # + # source://ed25519//lib/ed25519.rb#48 + def self_test; end + + # Ensure a serialized key meets the requirements + # + # source://ed25519//lib/ed25519.rb#40 + def validate_key_bytes(key_bytes); end + + class << self + # Obtain the backend provider module used to perform signatures + # + # source://ed25519//lib/ed25519.rb#26 + def provider; end + + # Obtain the backend provider module used to perform signatures + # + # source://ed25519//lib/ed25519.rb#26 + def provider=(_arg0); end + + # Perform a self-test to ensure the selected provider is working + # + # @raise [SelfTestFailure] + # + # source://ed25519//lib/ed25519.rb#48 + def self_test; end + + # Ensure a serialized key meets the requirements + # + # @raise [TypeError] + # + # source://ed25519//lib/ed25519.rb#40 + def validate_key_bytes(key_bytes); end + end +end + +# Size of an Ed25519 key (public or private) in bytes +# +# source://ed25519//lib/ed25519.rb#13 +Ed25519::KEY_SIZE = T.let(T.unsafe(nil), Integer) + +module Ed25519::Provider; end + +module Ed25519::Provider::Ref10 + class << self + def create_keypair(_arg0); end + def sign(_arg0, _arg1); end + def verify(_arg0, _arg1, _arg2); end + end +end + +# Size of an Ed25519 signature in bytes +# +# source://ed25519//lib/ed25519.rb#16 +Ed25519::SIGNATURE_SIZE = T.let(T.unsafe(nil), Integer) + +# Raised when the built-in self-test fails +# +# source://ed25519//lib/ed25519.rb#22 +class Ed25519::SelfTestFailure < ::StandardError; end + +# Private key for producing digital signatures +# +# source://ed25519//lib/ed25519/signing_key.rb#7 +class Ed25519::SigningKey + # Create a new Ed25519::SigningKey from the given seed value + # + # @param seed [String] 32-byte seed value from which the key should be derived + # @return [SigningKey] a new instance of SigningKey + # + # source://ed25519//lib/ed25519/signing_key.rb#30 + def initialize(seed); end + + # String inspection that does not leak secret values + # + # source://ed25519//lib/ed25519/signing_key.rb#48 + def inspect; end + + # Returns the value of attribute keypair. + # + # source://ed25519//lib/ed25519/signing_key.rb#8 + def keypair; end + + # Returns the value of attribute seed. + # + # source://ed25519//lib/ed25519/signing_key.rb#8 + def seed; end + + # Sign the given message, returning an Ed25519 signature + # + # @param message [String] message to be signed + # @return [String] 64-byte Ed25519 signature + # + # source://ed25519//lib/ed25519/signing_key.rb#43 + def sign(message); end + + # Return a bytestring representation of this signing key + # + # @return [String] signing key converted to a bytestring + # + # source://ed25519//lib/ed25519/signing_key.rb#55 + def to_bytes; end + + # Return a bytestring representation of this signing key + # + # @return [String] signing key converted to a bytestring + # + # source://ed25519//lib/ed25519/signing_key.rb#55 + def to_str; end + + # Returns the value of attribute verify_key. + # + # source://ed25519//lib/ed25519/signing_key.rb#8 + def verify_key; end + + class << self + # Create a SigningKey from a 64-byte Ed25519 keypair (i.e. public + private) + # + # @param keypair [String] 64-byte keypair value containing both seed + public key + # @raise [TypeError] + # + # source://ed25519//lib/ed25519/signing_key.rb#18 + def from_keypair(keypair); end + + # Generate a random Ed25519 signing key (i.e. private scalar) + # + # source://ed25519//lib/ed25519/signing_key.rb#11 + def generate; end + end +end + +# source://ed25519//lib/ed25519/version.rb#4 +Ed25519::VERSION = T.let(T.unsafe(nil), String) + +# Raised when a signature fails to verify +# +# source://ed25519//lib/ed25519.rb#19 +class Ed25519::VerifyError < ::StandardError; end + +# Public key for verifying digital signatures +# +# source://ed25519//lib/ed25519/verify_key.rb#5 +class Ed25519::VerifyKey + # Create a Ed25519::VerifyKey from its serialized Twisted Edwards representation + # + # @param key [String] 32-byte string representing a serialized public key + # @return [VerifyKey] a new instance of VerifyKey + # + # source://ed25519//lib/ed25519/verify_key.rb#9 + def initialize(key); end + + # Show hex representation of serialized coordinate in string inspection + # + # source://ed25519//lib/ed25519/verify_key.rb#41 + def inspect; end + + # Return a compressed twisted Edwards coordinate representing the public key + # + # @return [String] bytestring serialization of this public key + # + # source://ed25519//lib/ed25519/verify_key.rb#35 + def to_bytes; end + + # Return a compressed twisted Edwards coordinate representing the public key + # + # @return [String] bytestring serialization of this public key + # + # source://ed25519//lib/ed25519/verify_key.rb#35 + def to_str; end + + # Verify an Ed25519 signature against the message + # + # @param signature [String] 64-byte string containing an Ed25519 signature + # @param message [String] string containing message to be verified + # @raise Ed25519::VerifyError signature verification failed + # @return [true] message verified successfully + # + # source://ed25519//lib/ed25519/verify_key.rb#22 + def verify(signature, message); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/erubi@1.13.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/erubi@1.13.0.rbi new file mode 100644 index 0000000..16d45fa --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/erubi@1.13.0.rbi @@ -0,0 +1,150 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erubi` gem. +# Please instead update this file by running `bin/tapioca gem erubi`. + + +# source://erubi//lib/erubi.rb#3 +module Erubi + private + + def h(_arg0); end + + class << self + def h(_arg0); end + end +end + +# source://erubi//lib/erubi.rb#51 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#91 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#62 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#59 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#56 + def src; end + + private + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#223 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # source://erubi//lib/erubi.rb#232 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#241 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#246 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # source://erubi//lib/erubi.rb#252 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # source://erubi//lib/erubi.rb#210 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # @raise [ArgumentError] + # + # source://erubi//lib/erubi.rb#258 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # source://erubi//lib/erubi.rb#286 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # source://erubi//lib/erubi.rb#268 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#53 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://erubi//lib/erubi.rb#17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# source://erubi//lib/erubi.rb#8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/et-orbi@1.2.11.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/et-orbi@1.2.11.rbi new file mode 100644 index 0000000..5608eae --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/et-orbi@1.2.11.rbi @@ -0,0 +1,473 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `et-orbi` gem. +# Please instead update this file by running `bin/tapioca gem et-orbi`. + + +# source://et-orbi//lib/et-orbi/info.rb#2 +module EtOrbi + class << self + # For `make info` + # + # source://et-orbi//lib/et-orbi/info.rb#36 + def _make_info; end + + # test tool + # + # source://et-orbi//lib/et-orbi/zones.rb#89 + def _os_zone; end + + # test tool + # + # source://et-orbi//lib/et-orbi/zones.rb#89 + def _os_zone=(_arg0); end + + # source://et-orbi//lib/et-orbi/zones.rb#109 + def centos_tz; end + + # source://et-orbi//lib/et-orbi/make.rb#9 + def chronic_enabled=(b); end + + # @return [Boolean] + # + # source://et-orbi//lib/et-orbi/make.rb#6 + def chronic_enabled?; end + + # system tz determination + # + # source://et-orbi//lib/et-orbi/zones.rb#102 + def debian_tz; end + + # source://et-orbi//lib/et-orbi/zones.rb#53 + def determine_local_tzone; end + + # source://et-orbi//lib/et-orbi/zones.rb#35 + def extract_zone(str); end + + # source://et-orbi//lib/et-orbi/zones.rb#131 + def gather_tzs; end + + # source://et-orbi//lib/et-orbi/zone.rb#6 + def get_tzone(o); end + + # https://en.wikipedia.org/wiki/ISO_8601 + # Postel's law applies + # + # source://et-orbi//lib/et-orbi/zones.rb#21 + def list_iso8601_zones(s); end + + # source://et-orbi//lib/et-orbi/make.rb#51 + def make(*a); end + + # source://et-orbi//lib/et-orbi/make.rb#51 + def make_time(*a); end + + # source://et-orbi//lib/et-orbi/make.rb#15 + def now(zone = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/zones.rb#91 + def os_tz; end + + # source://et-orbi//lib/et-orbi/zones.rb#122 + def osx_tz; end + + # source://et-orbi//lib/et-orbi/make.rb#20 + def parse(str, opts = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/info.rb#6 + def platform_info; end + + # source://et-orbi//lib/et-orbi/info.rb#42 + def render_nozone_time(seconds); end + + # source://et-orbi//lib/et-orbi/zones.rb#164 + def tweak_zone_name(name); end + + # Semi-helpful, since it requires the current time + # + # source://et-orbi//lib/et-orbi/zones.rb#138 + def windows_zone_name(zone_name, time); end + + # source://et-orbi//lib/et-orbi/zones.rb#53 + def zone; end + + protected + + # source://et-orbi//lib/et-orbi/make.rb#73 + def chronic_parse(str, opts); end + + # source://et-orbi//lib/et-orbi/zone.rb#56 + def create_offset_tzone(utc_off, id); end + + # source://et-orbi//lib/et-orbi/zones.rb#240 + def custom_tzs; end + + # source://et-orbi//lib/et-orbi/zones.rb#210 + def determine_local_tzones; end + + # https://api.rubyonrails.org/classes/ActiveSupport/TimeWithZone.html + # + # If it responds to #time_zone, then return that time zone. + # + # source://et-orbi//lib/et-orbi/zone.rb#126 + def get_as_tzone(t); end + + # source://et-orbi//lib/et-orbi/zone.rb#115 + def get_local_tzone(t); end + + # custom timezones, no DST, just an offset, like "+08:00" or "-01:30" + # + # source://et-orbi//lib/et-orbi/zone.rb#29 + def get_offset_tzone(str); end + + # source://et-orbi//lib/et-orbi/zone.rb#95 + def get_tzinfo_tzone(name); end + + # source://et-orbi//lib/et-orbi/zone.rb#74 + def get_x_offset_tzone(str); end + + # source://et-orbi//lib/et-orbi/make.rb#108 + def make_from_array(a, zone); end + + # source://et-orbi//lib/et-orbi/make.rb#99 + def make_from_date(d, zone); end + + # source://et-orbi//lib/et-orbi/make.rb#125 + def make_from_eotime(eot, zone); end + + # source://et-orbi//lib/et-orbi/make.rb#120 + def make_from_numeric(f, zone); end + + # source://et-orbi//lib/et-orbi/make.rb#115 + def make_from_string(s, zone); end + + # source://et-orbi//lib/et-orbi/make.rb#84 + def make_from_time(t, zone); end + + # source://et-orbi//lib/et-orbi/zones.rb#176 + def normalize(name); end + + # source://et-orbi//lib/et-orbi/zone.rb#84 + def to_offset(n); end + + # source://et-orbi//lib/et-orbi/zones.rb#241 + def tz_all; end + + # source://et-orbi//lib/et-orbi/info.rb#67 + def tzinfo_data_version; end + + # source://et-orbi//lib/et-orbi/info.rb#59 + def tzinfo_version; end + + # source://et-orbi//lib/et-orbi/zones.rb#181 + def unzz(name); end + + # source://et-orbi//lib/et-orbi/zone.rb#106 + def windows_zone_code_x(zone_name); end + end +end + +# Our EoTime class (which quacks like a ::Time). +# +# An EoTime instance should respond to most of the methods ::Time instances +# respond to. If a method is missing, feel free to open an issue to +# ask (politely) for it. If it makes sense, it'll get added, else +# a workaround will get suggested. +# The immediate workaround is to call #to_t on the EoTime instance to get +# equivalent ::Time instance in the local, current, timezone. +# +# source://et-orbi//lib/et-orbi/time.rb#13 +class EtOrbi::EoTime + # @return [EoTime] a new instance of EoTime + # + # source://et-orbi//lib/et-orbi/time.rb#67 + def initialize(s, zone); end + + # source://et-orbi//lib/et-orbi/time.rb#251 + def +(t); end + + # source://et-orbi//lib/et-orbi/time.rb#252 + def -(t); end + + # source://et-orbi//lib/et-orbi/time.rb#244 + def <(o); end + + # source://et-orbi//lib/et-orbi/time.rb#245 + def <=(o); end + + # source://et-orbi//lib/et-orbi/time.rb#246 + def <=>(o); end + + # source://et-orbi//lib/et-orbi/time.rb#221 + def ==(o); end + + # Nota Bene: + # + # Unlike ==, the equal? method should never be overridden by subclasses + # as it is used to determine object identity (that is, a.equal?(b) if and + # only if a is the same object as b) + # + # The eql? method returns true if obj and other refer to the same hash key. + # This is used by Hash to test members for equality. + # + # source://et-orbi//lib/et-orbi/time.rb#242 + def >(o); end + + # source://et-orbi//lib/et-orbi/time.rb#243 + def >=(o); end + + # source://et-orbi//lib/et-orbi/time.rb#248 + def add(t); end + + # Returns true if this EoTime instance corresponds to 2 different UTC + # times. + # It happens when transitioning from DST to winter time. + # + # https://www.timeanddate.com/time/change/usa/new-york?year=2018 + # + # @return [Boolean] + # + # source://et-orbi//lib/et-orbi/time.rb#128 + def ambiguous?; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def asctime; end + + # source://et-orbi//lib/et-orbi/time.rb#409 + def clone; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def day; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current UTC timezone. + # + # source://et-orbi//lib/et-orbi/time.rb#142 + def getgm; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current UTC timezone. + # + # source://et-orbi//lib/et-orbi/time.rb#142 + def getutc; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def hour; end + + # source://et-orbi//lib/et-orbi/time.rb#339 + def in_time_zone(zone = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#317 + def inc(t, dir = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://et-orbi//lib/et-orbi/time.rb#189 + def is_dst?; end + + # @return [Boolean] + # + # source://et-orbi//lib/et-orbi/time.rb#189 + def isdst; end + + # source://et-orbi//lib/et-orbi/time.rb#292 + def iso8601(fraction_digits = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#339 + def localtime(zone = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def min; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def month; end + + # source://et-orbi//lib/et-orbi/time.rb#257 + def monthdays; end + + # "reference week", used in fugit for cron modulo notation + # + # source://et-orbi//lib/et-orbi/time.rb#367 + def rday; end + + # source://et-orbi//lib/et-orbi/time.rb#377 + def reach(points); end + + # "reference week", used in fugit for cron modulo notation + # + # source://et-orbi//lib/et-orbi/time.rb#355 + def rweek; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def sec; end + + # instance methods + # + # source://et-orbi//lib/et-orbi/time.rb#64 + def seconds; end + + # source://et-orbi//lib/et-orbi/time.rb#103 + def seconds=(f); end + + # source://et-orbi//lib/et-orbi/time.rb#170 + def strftime(format); end + + # source://et-orbi//lib/et-orbi/time.rb#249 + def subtract(t); end + + # source://et-orbi//lib/et-orbi/time.rb#195 + def to_debug_s; end + + # source://et-orbi//lib/et-orbi/time.rb#160 + def to_f; end + + # source://et-orbi//lib/et-orbi/time.rb#165 + def to_i; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current timezone. + # + # Has a #to_t alias. + # + # source://et-orbi//lib/et-orbi/time.rb#182 + def to_local_time; end + + # source://et-orbi//lib/et-orbi/time.rb#282 + def to_s; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current timezone. + # + # Has a #to_t alias. + # + # source://et-orbi//lib/et-orbi/time.rb#182 + def to_t; end + + # source://et-orbi//lib/et-orbi/time.rb#312 + def to_time_s; end + + # Debug current time by showing local time / delta / utc time + # for example: "0120-7(0820)" + # + # source://et-orbi//lib/et-orbi/time.rb#301 + def to_utc_comparison_s; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current UTC timezone. + # + # source://et-orbi//lib/et-orbi/time.rb#142 + def to_utc_time; end + + # source://et-orbi//lib/et-orbi/time.rb#287 + def to_zs; end + + # Nullify the "caches" used by #to_time, #rweek, and others + # + # source://et-orbi//lib/et-orbi/time.rb#96 + def touch; end + + # source://et-orbi//lib/et-orbi/time.rb#339 + def translate(zone = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def usec; end + + # Returns this ::EtOrbi::EoTime as a ::Time instance + # in the current UTC timezone. + # + # source://et-orbi//lib/et-orbi/time.rb#142 + def utc; end + + # Returns true if this ::EtOrbi::EoTime instance timezone is UTC. + # Returns false else. + # + # @return [Boolean] + # + # source://et-orbi//lib/et-orbi/time.rb#150 + def utc?; end + + # source://et-orbi//lib/et-orbi/time.rb#210 + def utc_offset; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def wday; end + + # source://et-orbi//lib/et-orbi/time.rb#347 + def wday_in_month; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def yday; end + + # source://et-orbi//lib/et-orbi/time.rb#218 + def year; end + + # Returns the value of attribute zone. + # + # source://et-orbi//lib/et-orbi/time.rb#65 + def zone; end + + # source://et-orbi//lib/et-orbi/time.rb#112 + def zone=(z); end + + protected + + # source://et-orbi//lib/et-orbi/time.rb#465 + def _to_f(o); end + + # source://et-orbi//lib/et-orbi/time.rb#426 + def count_weeks(start, dir); end + + # source://et-orbi//lib/et-orbi/time.rb#439 + def strfz(code); end + + # Returns a Ruby Time instance. + # + # Warning: the timezone of that Time instance will be UTC when used with + # TZInfo < 2.0.0. + # + # source://et-orbi//lib/et-orbi/time.rb#421 + def to_time; end + + class << self + # source://et-orbi//lib/et-orbi/time.rb#30 + def get_tzone(o); end + + # source://et-orbi//lib/et-orbi/time.rb#55 + def local(*a); end + + # source://et-orbi//lib/et-orbi/time.rb#35 + def local_tzone; end + + # source://et-orbi//lib/et-orbi/time.rb#45 + def make(o); end + + # source://et-orbi//lib/et-orbi/time.rb#20 + def now(zone = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#25 + def parse(str, opts = T.unsafe(nil)); end + + # source://et-orbi//lib/et-orbi/time.rb#40 + def platform_info; end + + # source://et-orbi//lib/et-orbi/time.rb#50 + def utc(*a); end + end +end + +# source://et-orbi//lib/et-orbi/time.rb#254 +EtOrbi::EoTime::DAY_S = T.let(T.unsafe(nil), Integer) + +# source://et-orbi//lib/et-orbi/time.rb#255 +EtOrbi::EoTime::WEEK_S = T.let(T.unsafe(nil), Integer) + +# source://et-orbi//lib/et-orbi.rb#16 +EtOrbi::VERSION = T.let(T.unsafe(nil), String) + +# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones +# https://support.microsoft.com/en-ca/help/973627/microsoft-time-zone-index-values +# https://ss64.com/nt/timezones.html +# +# source://et-orbi//lib/et-orbi/zones.rb#248 +EtOrbi::ZONE_ALIASES = T.let(T.unsafe(nil), Hash) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/fugit@1.11.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/fugit@1.11.1.rbi new file mode 100644 index 0000000..8429982 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/fugit@1.11.1.rbi @@ -0,0 +1,1500 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `fugit` gem. +# Please instead update this file by running `bin/tapioca gem fugit`. + + +# source://fugit//lib/fugit.rb#4 +module Fugit + class << self + # source://fugit//lib/fugit/parse.rb#66 + def determine_type(s); end + + # source://fugit//lib/fugit/parse.rb#30 + def do_parse(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/parse.rb#16 + def do_parse_at(s); end + + # source://fugit//lib/fugit/parse.rb#13 + def do_parse_cron(s); end + + # source://fugit//lib/fugit/parse.rb#60 + def do_parse_cronish(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/parse.rb#14 + def do_parse_duration(s); end + + # source://fugit//lib/fugit/parse.rb#17 + def do_parse_in(s); end + + # source://fugit//lib/fugit/parse.rb#15 + def do_parse_nat(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/misc.rb#10 + def isostamp(show_date, show_time, show_usec, time); end + + # source://fugit//lib/fugit/parse.rb#19 + def parse(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/parse.rb#10 + def parse_at(s); end + + # source://fugit//lib/fugit/parse.rb#7 + def parse_cron(s); end + + # source://fugit//lib/fugit/parse.rb#53 + def parse_cronish(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/parse.rb#8 + def parse_duration(s); end + + # source://fugit//lib/fugit/parse.rb#11 + def parse_in(s); end + + # source://fugit//lib/fugit/parse.rb#9 + def parse_nat(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/misc.rb#28 + def time_to_plain_s(t = T.unsafe(nil), z = T.unsafe(nil)); end + + # source://fugit//lib/fugit/misc.rb#23 + def time_to_s(t); end + + # source://fugit//lib/fugit/misc.rb#33 + def time_to_zone_s(t = T.unsafe(nil)); end + end +end + +# source://fugit//lib/fugit/at.rb#5 +module Fugit::At + class << self + # source://fugit//lib/fugit/at.rb#14 + def do_parse(s); end + + # source://fugit//lib/fugit/at.rb#9 + def parse(s); end + end +end + +# source://fugit//lib/fugit/cron.rb#5 +class Fugit::Cron + # source://fugit//lib/fugit/cron.rb#502 + def ==(o); end + + # Mostly used as a #next_time sanity check. + # Avoid for "business" use, it's slow. + # + # 2017 is a non leap year (though it is preceded by + # a leap second on 2016-12-31) + # + # Nota bene: cron with seconds are not supported. + # + # source://fugit//lib/fugit/cron.rb#400 + def brute_frequency(year = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#211 + def day_match?(nt); end + + # source://fugit//lib/fugit/cron.rb#502 + def eql?(o); end + + # source://fugit//lib/fugit/cron.rb#508 + def hash; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#164 + def hour_match?(nt); end + + # Returns the value of attribute hours. + # + # source://fugit//lib/fugit/cron.rb#22 + def hours; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#241 + def match?(t); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#165 + def min_match?(nt); end + + # Returns the value of attribute minutes. + # + # source://fugit//lib/fugit/cron.rb#22 + def minutes; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#163 + def month_match?(nt); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#200 + def monthday_match?(nt); end + + # Returns the value of attribute monthdays. + # + # source://fugit//lib/fugit/cron.rb#22 + def monthdays; end + + # Returns the value of attribute months. + # + # source://fugit//lib/fugit/cron.rb#22 + def months; end + + # Returns an ::Enumerable instance that yields each "next time" in + # succession + # + # source://fugit//lib/fugit/cron.rb#365 + def next(from = T.unsafe(nil)); end + + # See gh-15 and tst/iteration_count.rb + # + # Initially set to 1024 after seeing the worst case for #next_time + # at 167 iterations, I placed it at 2048 after experimenting with + # gh-18 and noticing some > 1024 for some experiments. 2048 should + # be ok. + # + # source://fugit//lib/fugit/cron.rb#258 + def next_time(from = T.unsafe(nil)); end + + # Returns the value of attribute original. + # + # source://fugit//lib/fugit/cron.rb#20 + def original; end + + # Returns an ::Enumerable instance that yields each "previous time" in + # succession + # + # source://fugit//lib/fugit/cron.rb#373 + def prev(from = T.unsafe(nil)); end + + # source://fugit//lib/fugit/cron.rb#310 + def previous_time(from = T.unsafe(nil)); end + + # source://fugit//lib/fugit/cron.rb#430 + def rough_frequency; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#166 + def sec_match?(nt); end + + # Returns the value of attribute seconds. + # + # source://fugit//lib/fugit/cron.rb#22 + def seconds; end + + # Returns the value of attribute timezone. + # + # source://fugit//lib/fugit/cron.rb#22 + def timezone; end + + # source://fugit//lib/fugit/cron.rb#487 + def to_a; end + + # source://fugit//lib/fugit/cron.rb#66 + def to_cron_s; end + + # source://fugit//lib/fugit/cron.rb#492 + def to_h; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#168 + def weekday_hash_match?(nt, hsh); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#184 + def weekday_match?(nt); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#179 + def weekday_modulo_match?(nt, mod); end + + # Returns the value of attribute weekdays. + # + # source://fugit//lib/fugit/cron.rb#22 + def weekdays; end + + # Returns an array of EtOrbi::EoTime instances that correspond to + # the occurrences of the cron within the given time range + # + # source://fugit//lib/fugit/cron.rb#381 + def within(time_range, time_end = T.unsafe(nil)); end + + # Returns the value of attribute zone. + # + # source://fugit//lib/fugit/cron.rb#20 + def zone; end + + protected + + # source://fugit//lib/fugit/cron.rb#515 + def compact_month_days; end + + # source://fugit//lib/fugit/cron.rb#669 + def determine_hours(arr); end + + # source://fugit//lib/fugit/cron.rb#665 + def determine_minutes(arr); end + + # source://fugit//lib/fugit/cron.rb#673 + def determine_monthdays(arr); end + + # source://fugit//lib/fugit/cron.rb#677 + def determine_months(arr); end + + # source://fugit//lib/fugit/cron.rb#661 + def determine_seconds(arr); end + + # source://fugit//lib/fugit/cron.rb#708 + def determine_timezone(z); end + + # source://fugit//lib/fugit/cron.rb#681 + def determine_weekdays(arr); end + + # source://fugit//lib/fugit/cron.rb#644 + def do_determine(key, arr, min, max); end + + # source://fugit//lib/fugit/cron.rb#581 + def expand(min, max, r); end + + # source://fugit//lib/fugit/cron.rb#558 + def init(original, h); end + + # source://fugit//lib/fugit/cron.rb#602 + def range(min, max, sta, edn, sla); end + + # source://fugit//lib/fugit/cron.rb#531 + def rough_days; end + + # source://fugit//lib/fugit/cron.rb#715 + def weekdays_to_cron_s; end + + class << self + # source://fugit//lib/fugit/cron.rb#46 + def do_parse(s); end + + # source://fugit//lib/fugit/cron.rb#27 + def new(original); end + + # source://fugit//lib/fugit/cron.rb#32 + def parse(s); end + + protected + + # source://fugit//lib/fugit/cron.rb#54 + def trunc(s); end + end +end + +# Used by Fugit::Cron#next and Fugit::Cron#prev +# +# source://fugit//lib/fugit/cron.rb#340 +class Fugit::Cron::CronIterator + include ::Enumerable + + # @return [CronIterator] a new instance of CronIterator + # + # source://fugit//lib/fugit/cron.rb#345 + def initialize(cron, direction, start); end + + # Returns the value of attribute cron. + # + # source://fugit//lib/fugit/cron.rb#343 + def cron; end + + # Returns the value of attribute current. + # + # source://fugit//lib/fugit/cron.rb#343 + def current; end + + # Returns the value of attribute direction. + # + # source://fugit//lib/fugit/cron.rb#343 + def direction; end + + # source://fugit//lib/fugit/cron.rb#353 + def each; end + + # Returns the value of attribute start. + # + # source://fugit//lib/fugit/cron.rb#343 + def start; end +end + +# source://fugit//lib/fugit/cron.rb#556 +Fugit::Cron::FREQUENCY_CACHE = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/cron.rb#459 +class Fugit::Cron::Frequency + # @return [Frequency] a new instance of Frequency + # + # source://fugit//lib/fugit/cron.rb#464 + def initialize(deltas, span); end + + # Returns the value of attribute delta_max. + # + # source://fugit//lib/fugit/cron.rb#461 + def delta_max; end + + # Returns the value of attribute delta_min. + # + # source://fugit//lib/fugit/cron.rb#461 + def delta_min; end + + # Returns the value of attribute occurrences. + # + # source://fugit//lib/fugit/cron.rb#461 + def occurrences; end + + # Returns the value of attribute span. + # + # source://fugit//lib/fugit/cron.rb#461 + def span; end + + # Returns the value of attribute span_years. + # + # source://fugit//lib/fugit/cron.rb#462 + def span_years; end + + # source://fugit//lib/fugit/cron.rb#474 + def to_debug_s; end + + # Returns the value of attribute yearly_occurrences. + # + # source://fugit//lib/fugit/cron.rb#462 + def yearly_occurrences; end +end + +# source://fugit//lib/fugit/cron.rb#17 +Fugit::Cron::MAXDAYS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/cron.rb#249 +Fugit::Cron::MAX_ITERATION_COUNT = T.let(T.unsafe(nil), Integer) + +# source://fugit//lib/fugit/cron.rb#733 +module Fugit::Cron::Parser + include ::Raabro + extend ::Raabro::ModuleMethods + extend ::Raabro + extend ::Fugit::Cron::Parser + + # source://fugit//lib/fugit/cron.rb#769 + def _dom(i); end + + # source://fugit//lib/fugit/cron.rb#771 + def _dow(i); end + + # source://fugit//lib/fugit/cron.rb#768 + def _hou(i); end + + # source://fugit//lib/fugit/cron.rb#770 + def _mon(i); end + + # source://fugit//lib/fugit/cron.rb#767 + def _mos(i); end + + # source://fugit//lib/fugit/cron.rb#828 + def _tz(i); end + + # source://fugit//lib/fugit/cron.rb#825 + def _tz_delta(i); end + + # source://fugit//lib/fugit/cron.rb#822 + def _tz_name(i); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#755 + def and?(i); end + + # source://fugit//lib/fugit/cron.rb#830 + def classic_cron(i); end + + # source://fugit//lib/fugit/cron.rb#753 + def comma(i); end + + # @return [Boolean] + # + # source://fugit//lib/fugit/cron.rb#754 + def comma?(i); end + + # source://fugit//lib/fugit/cron.rb#839 + def cron(i); end + + # source://fugit//lib/fugit/cron.rb#761 + def dom(i); end + + # source://fugit//lib/fugit/cron.rb#797 + def dom_elt(i); end + + # source://fugit//lib/fugit/cron.rb#763 + def dow(i); end + + # source://fugit//lib/fugit/cron.rb#799 + def dow_elt(i); end + + # source://fugit//lib/fugit/cron.rb#806 + def dow_elt_(i); end + + # source://fugit//lib/fugit/cron.rb#765 + def dow_hash(i); end + + # source://fugit//lib/fugit/cron.rb#804 + def h_dow(i); end + + # source://fugit//lib/fugit/cron.rb#760 + def hou(i); end + + # source://fugit//lib/fugit/cron.rb#796 + def hou_elt(i); end + + # source://fugit//lib/fugit/cron.rb#752 + def hyphen(i); end + + # source://fugit//lib/fugit/cron.rb#818 + def ldom_(i); end + + # source://fugit//lib/fugit/cron.rb#820 + def ldow(i); end + + # source://fugit//lib/fugit/cron.rb#817 + def lhou_(i); end + + # source://fugit//lib/fugit/cron.rb#811 + def list_dom(i); end + + # source://fugit//lib/fugit/cron.rb#813 + def list_dow(i); end + + # source://fugit//lib/fugit/cron.rb#810 + def list_hou(i); end + + # source://fugit//lib/fugit/cron.rb#809 + def list_min(i); end + + # source://fugit//lib/fugit/cron.rb#812 + def list_mon(i); end + + # source://fugit//lib/fugit/cron.rb#808 + def list_sec(i); end + + # source://fugit//lib/fugit/cron.rb#816 + def lmin_(i); end + + # source://fugit//lib/fugit/cron.rb#819 + def lmon_(i); end + + # source://fugit//lib/fugit/cron.rb#815 + def lsec_(i); end + + # source://fugit//lib/fugit/cron.rb#801 + def mod(i); end + + # source://fugit//lib/fugit/cron.rb#803 + def mod_dow(i); end + + # source://fugit//lib/fugit/cron.rb#762 + def mon(i); end + + # source://fugit//lib/fugit/cron.rb#798 + def mon_elt(i); end + + # min or sec + # + # source://fugit//lib/fugit/cron.rb#759 + def mos(i); end + + # ssws: slash or sorws + # + # source://fugit//lib/fugit/cron.rb#795 + def mos_elt(i); end + + # source://fugit//lib/fugit/cron.rb#776 + def r_dom(i); end + + # source://fugit//lib/fugit/cron.rb#778 + def r_dow(i); end + + # source://fugit//lib/fugit/cron.rb#775 + def r_hou(i); end + + # source://fugit//lib/fugit/cron.rb#777 + def r_mon(i); end + + # r: range + # + # source://fugit//lib/fugit/cron.rb#774 + def r_mos(i); end + + # rewriting the parsed tree + # + # source://fugit//lib/fugit/cron.rb#845 + def rewrite_bound(k, t); end + + # source://fugit//lib/fugit/cron.rb#906 + def rewrite_cron(t); end + + # source://fugit//lib/fugit/cron.rb#863 + def rewrite_elt(k, t); end + + # source://fugit//lib/fugit/cron.rb#891 + def rewrite_entry(t); end + + # source://fugit//lib/fugit/cron.rb#855 + def rewrite_mod(k, t); end + + # source://fugit//lib/fugit/cron.rb#898 + def rewrite_tz(t); end + + # piece parsers bottom to top + # + # source://fugit//lib/fugit/cron.rb#750 + def s(i); end + + # source://fugit//lib/fugit/cron.rb#834 + def second_cron(i); end + + # source://fugit//lib/fugit/cron.rb#757 + def slash(i); end + + # source://fugit//lib/fugit/cron.rb#783 + def sor_dom(i); end + + # source://fugit//lib/fugit/cron.rb#785 + def sor_dow(i); end + + # source://fugit//lib/fugit/cron.rb#782 + def sor_hou(i); end + + # source://fugit//lib/fugit/cron.rb#784 + def sor_mon(i); end + + # sor: star or range + # + # source://fugit//lib/fugit/cron.rb#781 + def sor_mos(i); end + + # source://fugit//lib/fugit/cron.rb#790 + def sorws_dom(i); end + + # source://fugit//lib/fugit/cron.rb#792 + def sorws_dow(i); end + + # source://fugit//lib/fugit/cron.rb#789 + def sorws_hou(i); end + + # source://fugit//lib/fugit/cron.rb#791 + def sorws_mon(i); end + + # sorws: star or range with[out] slash + # + # source://fugit//lib/fugit/cron.rb#788 + def sorws_mos(i); end + + # source://fugit//lib/fugit/cron.rb#751 + def star(i); end +end + +# source://fugit//lib/fugit/cron.rb#740 +Fugit::Cron::Parser::DOW_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/cron.rb#743 +Fugit::Cron::Parser::MONTHS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/cron.rb#745 +Fugit::Cron::Parser::MONTH_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/cron.rb#735 +Fugit::Cron::Parser::WEEKDAYS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/cron.rb#738 +Fugit::Cron::Parser::WEEKDS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/cron.rb#424 +Fugit::Cron::SLOTS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/cron.rb#7 +Fugit::Cron::SPECIALS = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/cron.rb#79 +class Fugit::Cron::TimeCursor + # @return [TimeCursor] a new instance of TimeCursor + # + # source://fugit//lib/fugit/cron.rb#81 + def initialize(cron, t); end + + # source://fugit//lib/fugit/cron.rb#93 + def day; end + + # source://fugit//lib/fugit/cron.rb#96 + def dec(i); end + + # source://fugit//lib/fugit/cron.rb#145 + def dec_day; end + + # source://fugit//lib/fugit/cron.rb#148 + def dec_hour; end + + # source://fugit//lib/fugit/cron.rb#151 + def dec_min; end + + # source://fugit//lib/fugit/cron.rb#141 + def dec_month; end + + # source://fugit//lib/fugit/cron.rb#155 + def dec_sec; end + + # source://fugit//lib/fugit/cron.rb#93 + def hour; end + + # source://fugit//lib/fugit/cron.rb#95 + def inc(i); end + + # source://fugit//lib/fugit/cron.rb#109 + def inc_day; end + + # source://fugit//lib/fugit/cron.rb#126 + def inc_hour; end + + # source://fugit//lib/fugit/cron.rb#129 + def inc_min; end + + # source://fugit//lib/fugit/cron.rb#98 + def inc_month; end + + # source://fugit//lib/fugit/cron.rb#133 + def inc_sec; end + + # source://fugit//lib/fugit/cron.rb#93 + def min; end + + # source://fugit//lib/fugit/cron.rb#93 + def month; end + + # source://fugit//lib/fugit/cron.rb#93 + def rday; end + + # source://fugit//lib/fugit/cron.rb#93 + def rweek; end + + # source://fugit//lib/fugit/cron.rb#93 + def sec; end + + # source://fugit//lib/fugit/cron.rb#87 + def time; end + + # source://fugit//lib/fugit/cron.rb#90 + def to_i; end + + # source://fugit//lib/fugit/cron.rb#88 + def to_t; end + + # source://fugit//lib/fugit/cron.rb#93 + def wday; end + + # source://fugit//lib/fugit/cron.rb#93 + def wday_in_month; end + + # source://fugit//lib/fugit/cron.rb#93 + def year; end +end + +# source://fugit//lib/fugit/misc.rb#5 +Fugit::DAY_S = T.let(T.unsafe(nil), Integer) + +# source://fugit//lib/fugit/duration.rb#5 +class Fugit::Duration + # source://fugit//lib/fugit/duration.rb#255 + def +(a); end + + # source://fugit//lib/fugit/duration.rb#268 + def -(a); end + + # source://fugit//lib/fugit/duration.rb#199 + def -@; end + + # source://fugit//lib/fugit/duration.rb#281 + def ==(o); end + + # source://fugit//lib/fugit/duration.rb#255 + def add(a); end + + # source://fugit//lib/fugit/duration.rb#216 + def add_duration(d); end + + # source://fugit//lib/fugit/duration.rb#208 + def add_numeric(n); end + + # source://fugit//lib/fugit/duration.rb#223 + def add_to_time(t); end + + # source://fugit//lib/fugit/duration.rb#163 + def deflate(options = T.unsafe(nil)); end + + # Returns a copy of this duration, omitting its seconds. + # + # source://fugit//lib/fugit/duration.rb#299 + def drop_seconds; end + + # source://fugit//lib/fugit/duration.rb#281 + def eql?(o); end + + # Returns the value of attribute h. + # + # source://fugit//lib/fugit/duration.rb#7 + def h; end + + # source://fugit//lib/fugit/duration.rb#287 + def hash; end + + # source://fugit//lib/fugit/duration.rb#143 + def inflate; end + + # source://fugit//lib/fugit/duration.rb#292 + def next_time(from = T.unsafe(nil)); end + + # source://fugit//lib/fugit/duration.rb#199 + def opposite; end + + # Returns the value of attribute options. + # + # source://fugit//lib/fugit/duration.rb#7 + def options; end + + # Returns the value of attribute original. + # + # source://fugit//lib/fugit/duration.rb#7 + def original; end + + # source://fugit//lib/fugit/duration.rb#268 + def subtract(a); end + + # For now, let's alias to #h + # + # source://fugit//lib/fugit/duration.rb#128 + def to_h; end + + # source://fugit//lib/fugit/duration.rb#90 + def to_iso_s; end + + # source://fugit//lib/fugit/duration.rb#109 + def to_long_s(opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/duration.rb#87 + def to_plain_s; end + + # source://fugit//lib/fugit/duration.rb#130 + def to_rufus_h; end + + # source://fugit//lib/fugit/duration.rb#88 + def to_rufus_s; end + + # Warning: this is an "approximation", months are 30 days and years are + # 365 days, ... + # + # source://fugit//lib/fugit/duration.rb#138 + def to_sec; end + + protected + + # source://fugit//lib/fugit/duration.rb#76 + def _to_s(key); end + + # source://fugit//lib/fugit/duration.rb#310 + def init(original, options, h); end + + class << self + # source://fugit//lib/fugit/duration.rb#51 + def common_rewrite_dur(t); end + + # source://fugit//lib/fugit/duration.rb#41 + def do_parse(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/duration.rb#11 + def new(s); end + + # source://fugit//lib/fugit/duration.rb#16 + def parse(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/duration.rb#48 + def to_iso_s(o); end + + # source://fugit//lib/fugit/duration.rb#49 + def to_long_s(o, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/duration.rb#47 + def to_plain_s(o); end + end +end + +# source://fugit//lib/fugit/duration.rb#72 +Fugit::Duration::INFLA_KEYS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/duration.rb#374 +module Fugit::Duration::IsoParser + include ::Raabro + extend ::Raabro::ModuleMethods + extend ::Raabro + extend ::Fugit::Duration::IsoParser + + # source://fugit//lib/fugit/duration.rb#392 + def date(i); end + + # source://fugit//lib/fugit/duration.rb#384 + def day(i); end + + # source://fugit//lib/fugit/duration.rb#389 + def delt(i); end + + # source://fugit//lib/fugit/duration.rb#396 + def dur(i); end + + # source://fugit//lib/fugit/duration.rb#385 + def hou(i); end + + # source://fugit//lib/fugit/duration.rb#386 + def min(i); end + + # source://fugit//lib/fugit/duration.rb#382 + def mon(i); end + + # piece parsers bottom to top + # + # source://fugit//lib/fugit/duration.rb#378 + def p(i); end + + # rewrite parsed tree + # + # source://fugit//lib/fugit/duration.rb#400 + def rewrite_dur(t); end + + # source://fugit//lib/fugit/duration.rb#387 + def sec(i); end + + # source://fugit//lib/fugit/duration.rb#379 + def t(i); end + + # source://fugit//lib/fugit/duration.rb#394 + def t_time(i); end + + # source://fugit//lib/fugit/duration.rb#390 + def telt(i); end + + # source://fugit//lib/fugit/duration.rb#393 + def time(i); end + + # source://fugit//lib/fugit/duration.rb#383 + def wee(i); end + + # source://fugit//lib/fugit/duration.rb#381 + def yea(i); end +end + +# source://fugit//lib/fugit/duration.rb#63 +Fugit::Duration::KEYS = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/duration.rb#72 +Fugit::Duration::NON_INFLA_KEYS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/duration.rb#325 +module Fugit::Duration::Parser + include ::Raabro + extend ::Raabro::ModuleMethods + extend ::Raabro + extend ::Fugit::Duration::Parser + + # source://fugit//lib/fugit/duration.rb#334 + def day(i); end + + # source://fugit//lib/fugit/duration.rb#346 + def dur(i); end + + # source://fugit//lib/fugit/duration.rb#341 + def elt(i); end + + # source://fugit//lib/fugit/duration.rb#335 + def hou(i); end + + # rewrite parsed tree + # + # source://fugit//lib/fugit/duration.rb#350 + def merge(h0, h1); end + + # source://fugit//lib/fugit/duration.rb#336 + def min(i); end + + # source://fugit//lib/fugit/duration.rb#332 + def mon(i); end + + # source://fugit//lib/fugit/duration.rb#367 + def rewrite_dur(t); end + + # source://fugit//lib/fugit/duration.rb#357 + def rewrite_sdur(t); end + + # source://fugit//lib/fugit/duration.rb#344 + def sdur(i); end + + # source://fugit//lib/fugit/duration.rb#338 + def sec(i); end + + # source://fugit//lib/fugit/duration.rb#339 + def sek(i); end + + # piece parsers bottom to top + # + # source://fugit//lib/fugit/duration.rb#329 + def sep(i); end + + # source://fugit//lib/fugit/duration.rb#342 + def sign(i); end + + # source://fugit//lib/fugit/duration.rb#333 + def wee(i); end + + # source://fugit//lib/fugit/duration.rb#331 + def yea(i); end +end + +# Round float seconds to 9 decimals when deflating +# +# source://fugit//lib/fugit/duration.rb#161 +Fugit::Duration::SECOND_ROUND = T.let(T.unsafe(nil), Integer) + +# A natural language set of parsers for fugit. +# Focuses on cron expressions. The rest is better left to Chronic and friends. +# +# source://fugit//lib/fugit/nat.rb#8 +module Fugit::Nat + class << self + # source://fugit//lib/fugit/nat.rb#42 + def do_parse(s, opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/nat.rb#14 + def parse(s, opts = T.unsafe(nil)); end + end +end + +# source://fugit//lib/fugit/nat.rb#10 +Fugit::Nat::MAX_INPUT_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://fugit//lib/fugit/nat.rb#49 +module Fugit::Nat::Parser + include ::Raabro + extend ::Raabro::ModuleMethods + extend ::Raabro + extend ::Fugit::Nat::Parser + + # source://fugit//lib/fugit/nat.rb#121 + def _and(i); end + + # source://fugit//lib/fugit/nat.rb#122 + def _and_or_or(i); end + + # source://fugit//lib/fugit/nat.rb#125 + def _and_or_or_or_comma(i); end + + # source://fugit//lib/fugit/nat.rb#117 + def _at(i); end + + # source://fugit//lib/fugit/nat.rb#131 + def _day_s(i); end + + # source://fugit//lib/fugit/nat.rb#158 + def _dmin(i); end + + # parsers bottom to top ################################################# + # + # source://fugit//lib/fugit/nat.rb#115 + def _every(i); end + + # source://fugit//lib/fugit/nat.rb#116 + def _from(i); end + + # source://fugit//lib/fugit/nat.rb#123 + def _in_or_on(i); end + + # source://fugit//lib/fugit/nat.rb#156 + def _minute(i); end + + # source://fugit//lib/fugit/nat.rb#118 + def _on(i); end + + # source://fugit//lib/fugit/nat.rb#247 + def _point(i); end + + # source://fugit//lib/fugit/nat.rb#373 + def _rewrite_sub(t, key = T.unsafe(nil)); end + + # source://fugit//lib/fugit/nat.rb#370 + def _rewrite_subs(t, key = T.unsafe(nil)); end + + # source://fugit//lib/fugit/nat.rb#135 + def _sep(i); end + + # source://fugit//lib/fugit/nat.rb#134 + def _space(i); end + + # source://fugit//lib/fugit/nat.rb#132 + def _the(i); end + + # source://fugit//lib/fugit/nat.rb#119 + def _to(i); end + + # source://fugit//lib/fugit/nat.rb#128 + def _to_or_dash(i); end + + # Try to follow https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight + # + # source://fugit//lib/fugit/nat.rb#498 + def adjust_h(h, m, ap); end + + # source://fugit//lib/fugit/nat.rb#212 + def ampm(i); end + + # source://fugit//lib/fugit/nat.rb#161 + def and_dmin(i); end + + # source://fugit//lib/fugit/nat.rb#273 + def at(i); end + + # at five + # at five pm + # at five o'clock + # at 16:30 + # at noon + # at 18:00 UTC <-- ...tz + # + # source://fugit//lib/fugit/nat.rb#266 + def at_object(i); end + + # source://fugit//lib/fugit/nat.rb#269 + def at_objects(i); end + + # source://fugit//lib/fugit/nat.rb#253 + def at_p(i); end + + # source://fugit//lib/fugit/nat.rb#256 + def at_point(i); end + + # source://fugit//lib/fugit/nat.rb#196 + def city_tz(i); end + + # source://fugit//lib/fugit/nat.rb#137 + def count(i); end + + # source://fugit//lib/fugit/nat.rb#249 + def counts(i); end + + # source://fugit//lib/fugit/nat.rb#215 + def dark(i); end + + # source://fugit//lib/fugit/nat.rb#202 + def delta_tz(i); end + + # source://fugit//lib/fugit/nat.rb#219 + def digital_h(i); end + + # source://fugit//lib/fugit/nat.rb#222 + def digital_hour(i); end + + # source://fugit//lib/fugit/nat.rb#352 + def every(i); end + + # every day + # every 1 minute + # + # source://fugit//lib/fugit/nat.rb#283 + def every_interval(i); end + + # source://fugit//lib/fugit/nat.rb#338 + def every_named(i); end + + # source://fugit//lib/fugit/nat.rb#342 + def every_object(i); end + + # source://fugit//lib/fugit/nat.rb#348 + def every_objects(i); end + + # every 1st of the month + # every first of the month + # Every 2nd of the month + # Every second of the month + # every 15th of the month + # + # source://fugit//lib/fugit/nat.rb#334 + def every_of_the_month(i); end + + # source://fugit//lib/fugit/nat.rb#287 + def every_single_interval(i); end + + # every monday + # every Fri-Sun + # every Monday and Tuesday + # + # source://fugit//lib/fugit/nat.rb#321 + def every_weekday(i); end + + # source://fugit//lib/fugit/nat.rb#314 + def from(i); end + + # source://fugit//lib/fugit/nat.rb#308 + def from_object(i); end + + # source://fugit//lib/fugit/nat.rb#311 + def from_objects(i); end + + # source://fugit//lib/fugit/nat.rb#277 + def interval(i); end + + # source://fugit//lib/fugit/nat.rb#142 + def monthday(i); end + + # source://fugit//lib/fugit/nat.rb#150 + def monthdays(i); end + + # source://fugit//lib/fugit/nat.rb#240 + def named_h(i); end + + # source://fugit//lib/fugit/nat.rb#243 + def named_hour(i); end + + # source://fugit//lib/fugit/nat.rb#233 + def named_m(i); end + + # source://fugit//lib/fugit/nat.rb#236 + def named_min(i); end + + # source://fugit//lib/fugit/nat.rb#199 + def named_tz(i); end + + # source://fugit//lib/fugit/nat.rb#359 + def nat(i); end + + # source://fugit//lib/fugit/nat.rb#356 + def nat_elt(i); end + + # source://fugit//lib/fugit/nat.rb#139 + def omonthday(i); end + + # source://fugit//lib/fugit/nat.rb#149 + def omonthdays(i); end + + # 'every month on day 2 at 10:00' => '0 10 2 * *', + # 'every month on day 2 and 5 at 10:00' => '0 10 2,5 * *', + # 'every month on days 1,15 at 10:00' => '0 10 1,15 * *', + # + # 'every week on monday 18:23' => '23 18 * * 1', + # + # every month on the 1st + # + # source://fugit//lib/fugit/nat.rb#192 + def on(i); end + + # source://fugit//lib/fugit/nat.rb#174 + def on_days(i); end + + # source://fugit//lib/fugit/nat.rb#165 + def on_minutes(i); end + + # source://fugit//lib/fugit/nat.rb#177 + def on_object(i); end + + # source://fugit//lib/fugit/nat.rb#180 + def on_objects(i); end + + # source://fugit//lib/fugit/nat.rb#154 + def on_the(i); end + + # source://fugit//lib/fugit/nat.rb#173 + def on_thes(i); end + + # source://fugit//lib/fugit/nat.rb#169 + def on_thex(i); end + + # source://fugit//lib/fugit/nat.rb#175 + def on_weekdays(i); end + + # source://fugit//lib/fugit/nat.rb#325 + def otm(i); end + + # source://fugit//lib/fugit/nat.rb#554 + def rewrite_at(t); end + + # source://fugit//lib/fugit/nat.rb#417 + def rewrite_at_p(t); end + + # source://fugit//lib/fugit/nat.rb#511 + def rewrite_digital_hour(t); end + + # source://fugit//lib/fugit/nat.rb#378 + def rewrite_dmin(t); end + + # source://fugit//lib/fugit/nat.rb#558 + def rewrite_every(t); end + + # source://fugit//lib/fugit/nat.rb#438 + def rewrite_every_interval(t); end + + # source://fugit//lib/fugit/nat.rb#458 + def rewrite_every_named(t); end + + # source://fugit//lib/fugit/nat.rb#430 + def rewrite_every_single_interval(t); end + + # source://fugit//lib/fugit/nat.rb#409 + def rewrite_monthday(t); end + + # source://fugit//lib/fugit/nat.rb#528 + def rewrite_named_hour(t); end + + # source://fugit//lib/fugit/nat.rb#562 + def rewrite_nat(t); end + + # source://fugit//lib/fugit/nat.rb#413 + def rewrite_omonthday(t); end + + # source://fugit//lib/fugit/nat.rb#405 + def rewrite_on(t); end + + # source://fugit//lib/fugit/nat.rb#401 + def rewrite_on_days(t); end + + # source://fugit//lib/fugit/nat.rb#382 + def rewrite_on_minutes(t); end + + # source://fugit//lib/fugit/nat.rb#398 + def rewrite_on_thes(t); end + + # source://fugit//lib/fugit/nat.rb#389 + def rewrite_on_thex(t); end + + # source://fugit//lib/fugit/nat.rb#477 + def rewrite_on_weekdays(t); end + + # source://fugit//lib/fugit/nat.rb#520 + def rewrite_simple_hour(t); end + + # source://fugit//lib/fugit/nat.rb#544 + def rewrite_to_hour(t); end + + # source://fugit//lib/fugit/nat.rb#491 + def rewrite_to_omonthday(t); end + + # source://fugit//lib/fugit/nat.rb#484 + def rewrite_to_weekday(t); end + + # source://fugit//lib/fugit/nat.rb#467 + def rewrite_tz(t); end + + # source://fugit//lib/fugit/nat.rb#472 + def rewrite_weekday(t); end + + # source://fugit//lib/fugit/nat.rb#477 + def rewrite_weekdays(t); end + + # source://fugit//lib/fugit/nat.rb#226 + def simple_h(i); end + + # source://fugit//lib/fugit/nat.rb#229 + def simple_hour(i); end + + # rewrite parsed tree ################################################### + # + # source://fugit//lib/fugit/nat.rb#366 + def slot(key, data0, data1 = T.unsafe(nil), opts = T.unsafe(nil)); end + + # source://fugit//lib/fugit/nat.rb#304 + def to_hour(i); end + + # source://fugit//lib/fugit/nat.rb#299 + def to_omonthday(i); end + + # source://fugit//lib/fugit/nat.rb#291 + def to_weekday(i); end + + # source://fugit//lib/fugit/nat.rb#205 + def tz(i); end + + # source://fugit//lib/fugit/nat.rb#208 + def tzone(i); end + + # source://fugit//lib/fugit/nat.rb#145 + def weekday(i); end + + # source://fugit//lib/fugit/nat.rb#295 + def weekday_range(i); end + + # source://fugit//lib/fugit/nat.rb#152 + def weekdays(i); end +end + +# source://fugit//lib/fugit/nat.rb#83 +Fugit::Nat::Parser::INTERVALS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/nat.rb#110 +Fugit::Nat::Parser::INTERVAL_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#104 +Fugit::Nat::Parser::MONTHDAY_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#108 +Fugit::Nat::Parser::NAMED_H_REX = T.let(T.unsafe(nil), Regexp) + +# prevent "mon" from eating "monday" +# +# source://fugit//lib/fugit/nat.rb#107 +Fugit::Nat::Parser::NAMED_M_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#63 +Fugit::Nat::Parser::NHOURS = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/nat.rb#69 +Fugit::Nat::Parser::NMINUTES = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/nat.rb#101 +Fugit::Nat::Parser::OMONTHDAYS = T.let(T.unsafe(nil), Hash) + +# source://fugit//lib/fugit/nat.rb#103 +Fugit::Nat::Parser::OMONTHDAY_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#80 +Fugit::Nat::Parser::POINTS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/nat.rb#109 +Fugit::Nat::Parser::POINT_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#76 +Fugit::Nat::Parser::WEEKDAYS = T.let(T.unsafe(nil), Array) + +# source://fugit//lib/fugit/nat.rb#105 +Fugit::Nat::Parser::WEEKDAY_REX = T.let(T.unsafe(nil), Regexp) + +# source://fugit//lib/fugit/nat.rb#568 +class Fugit::Nat::Slot + # @return [Slot] a new instance of Slot + # + # source://fugit//lib/fugit/nat.rb#571 + def initialize(key, d0, d1 = T.unsafe(nil), opts = T.unsafe(nil)); end + + # Returns the value of attribute _data0. + # + # source://fugit//lib/fugit/nat.rb#570 + def _data0; end + + # Sets the attribute _data0 + # + # @param value the value to set the attribute _data0 to. + # + # source://fugit//lib/fugit/nat.rb#570 + def _data0=(_arg0); end + + # Returns the value of attribute _data1. + # + # source://fugit//lib/fugit/nat.rb#570 + def _data1; end + + # Sets the attribute _data1 + # + # @param value the value to set the attribute _data1 to. + # + # source://fugit//lib/fugit/nat.rb#570 + def _data1=(_arg0); end + + # source://fugit//lib/fugit/nat.rb#592 + def a; end + + # source://fugit//lib/fugit/nat.rb#581 + def append(slot); end + + # source://fugit//lib/fugit/nat.rb#576 + def data0; end + + # source://fugit//lib/fugit/nat.rb#577 + def data1; end + + # @return [Boolean] + # + # source://fugit//lib/fugit/nat.rb#580 + def graded?; end + + # source://fugit//lib/fugit/nat.rb#586 + def inspect; end + + # Returns the value of attribute key. + # + # source://fugit//lib/fugit/nat.rb#569 + def key; end + + # source://fugit//lib/fugit/nat.rb#579 + def strong; end + + # source://fugit//lib/fugit/nat.rb#578 + def weak; end + + protected + + # source://fugit//lib/fugit/nat.rb#598 + def conflate(index, slot); end + + # source://fugit//lib/fugit/nat.rb#614 + def hour_range; end + + # source://fugit//lib/fugit/nat.rb#594 + def to_a(x); end +end + +# source://fugit//lib/fugit/nat.rb#620 +class Fugit::Nat::SlotGroup + # @return [SlotGroup] a new instance of SlotGroup + # + # source://fugit//lib/fugit/nat.rb#622 + def initialize(slots); end + + # source://fugit//lib/fugit/nat.rb#647 + def to_crons(opts); end + + protected + + # source://fugit//lib/fugit/nat.rb#670 + def determine_hms; end + + # source://fugit//lib/fugit/nat.rb#665 + def make_slot(key, data0, data1 = T.unsafe(nil)); end + + # source://fugit//lib/fugit/nat.rb#693 + def parse_cron(hm, opts); end + + # Return nil if the cron is "not strict" + # + # For example, "0 0/17 * * *" (gh-86) is a perfectly valid + # cron string, but makes not much sense when derived via `.parse_nat` + # from "every 17 hours". + # + # It happens here because it's nat being strict, not cron. + # + # source://fugit//lib/fugit/nat.rb#730 + def restrict(a, cron); end + + # source://fugit//lib/fugit/nat.rb#741 + def slot(key, default); end +end + +# source://fugit//lib/fugit.rb#6 +Fugit::VERSION = T.let(T.unsafe(nil), String) + +# source://fugit//lib/fugit/misc.rb#6 +Fugit::YEAR_S = T.let(T.unsafe(nil), Integer) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/globalid@1.2.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/globalid@1.2.1.rbi new file mode 100644 index 0000000..163c2c8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/globalid@1.2.1.rbi @@ -0,0 +1,742 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `globalid` gem. +# Please instead update this file by running `bin/tapioca gem globalid`. + + +# source://globalid//lib/global_id/global_id.rb#7 +class GlobalID + extend ::ActiveSupport::Autoload + + # @return [GlobalID] a new instance of GlobalID + # + # source://globalid//lib/global_id/global_id.rb#44 + def initialize(gid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/global_id.rb#63 + def ==(other); end + + # source://globalid//lib/global_id/global_id.rb#42 + def app(*_arg0, **_arg1, &_arg2); end + + # source://globalid//lib/global_id/global_id.rb#76 + def as_json(*_arg0); end + + # source://globalid//lib/global_id/global_id.rb#42 + def deconstruct_keys(*_arg0, **_arg1, &_arg2); end + + # source://globalid//lib/global_id/global_id.rb#63 + def eql?(other); end + + # source://globalid//lib/global_id/global_id.rb#48 + def find(options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/global_id.rb#68 + def hash; end + + # source://globalid//lib/global_id/global_id.rb#52 + def model_class; end + + # source://globalid//lib/global_id/global_id.rb#42 + def model_id(*_arg0, **_arg1, &_arg2); end + + # source://globalid//lib/global_id/global_id.rb#42 + def model_name(*_arg0, **_arg1, &_arg2); end + + # source://globalid//lib/global_id/global_id.rb#42 + def params(*_arg0, **_arg1, &_arg2); end + + # source://globalid//lib/global_id/global_id.rb#72 + def to_param; end + + # source://globalid//lib/global_id/global_id.rb#42 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute uri. + # + # source://globalid//lib/global_id/global_id.rb#41 + def uri; end + + class << self + # Returns the value of attribute app. + # + # source://globalid//lib/global_id/global_id.rb#9 + def app; end + + # source://globalid//lib/global_id/global_id.rb#31 + def app=(app); end + + # source://globalid//lib/global_id/global_id.rb#11 + def create(model, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id.rb#20 + def deprecator; end + + # source://globalid//lib/global_id.rb#15 + def eager_load!; end + + # source://globalid//lib/global_id/global_id.rb#21 + def find(gid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/global_id.rb#25 + def parse(gid, options = T.unsafe(nil)); end + + private + + # source://globalid//lib/global_id/global_id.rb#36 + def parse_encoded_gid(gid, options); end + end +end + +# Mix `GlobalID::Identification` into any model with a `#find(id)` class +# method. Support is automatically included in Active Record. +# +# class Person +# include ActiveModel::Model +# include GlobalID::Identification +# +# attr_accessor :id +# +# def self.find(id) +# new id: id +# end +# +# def ==(other) +# id == other.try(:id) +# end +# end +# +# person_gid = Person.find(1).to_global_id +# # => # # "gid://app/Person/1" +# GlobalID::Locator.locate person_gid +# # => # +# +# source://globalid//lib/global_id/identification.rb#28 +module GlobalID::Identification + # Returns the Global ID of the model. + # + # model = Person.new id: 1 + # global_id = model.to_global_id + # global_id.modal_class # => Person + # global_id.modal_id # => "1" + # global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#37 + def to_gid(options = T.unsafe(nil)); end + + # Returns the Global ID parameter of the model. + # + # model = Person.new id: 1 + # model.to_gid_param # => ""Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#46 + def to_gid_param(options = T.unsafe(nil)); end + + # Returns the Global ID of the model. + # + # model = Person.new id: 1 + # global_id = model.to_global_id + # global_id.modal_class # => Person + # global_id.modal_id # => "1" + # global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x" + # + # source://globalid//lib/global_id/identification.rb#37 + def to_global_id(options = T.unsafe(nil)); end + + # Returns the Signed Global ID of the model. + # Signed Global IDs ensure that the data hasn't been tampered with. + # + # model = Person.new id: 1 + # signed_global_id = model.to_signed_global_id + # signed_global_id.modal_class # => Person + # signed_global_id.modal_id # => "1" + # signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # ==== Expiration + # + # Signed Global IDs can expire some time in the future. This is useful if + # there's a resource people shouldn't have indefinite access to, like a + # share link. + # + # expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') + # # => # + # # Within 2 hours... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => # + # # More than 2 hours later... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => nil + # + # In Rails, an auto-expiry of 1 month is set by default. + # + # You need to explicitly pass `expires_in: nil` to generate a permanent + # SGID that will not expire, + # + # never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil) + # # => # + # + # # Any time later... + # GlobalID::Locator.locate_signed never_expiring_sgid + # # => # + # + # It's also possible to pass a specific expiry time + # + # explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1)) + # # => # + # + # # 1 hour later... + # GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s + # # => nil + # + # Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`. + # + # ==== Purpose + # + # You can even bump the security up some more by explaining what purpose a + # Signed Global ID is for. In this way evildoers can't reuse a sign-up + # form's SGID on the login page. For example. + # + # signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') + # # => # # + # + # source://globalid//lib/global_id/identification.rb#107 + def to_sgid(options = T.unsafe(nil)); end + + # Returns the Signed Global ID parameter. + # + # model = Person.new id: 1 + # model.to_sgid_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # source://globalid//lib/global_id/identification.rb#116 + def to_sgid_param(options = T.unsafe(nil)); end + + # Returns the Signed Global ID of the model. + # Signed Global IDs ensure that the data hasn't been tampered with. + # + # model = Person.new id: 1 + # signed_global_id = model.to_signed_global_id + # signed_global_id.modal_class # => Person + # signed_global_id.modal_id # => "1" + # signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..." + # + # ==== Expiration + # + # Signed Global IDs can expire some time in the future. This is useful if + # there's a resource people shouldn't have indefinite access to, like a + # share link. + # + # expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') + # # => # + # # Within 2 hours... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => # + # # More than 2 hours later... + # GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') + # # => nil + # + # In Rails, an auto-expiry of 1 month is set by default. + # + # You need to explicitly pass `expires_in: nil` to generate a permanent + # SGID that will not expire, + # + # never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil) + # # => # + # + # # Any time later... + # GlobalID::Locator.locate_signed never_expiring_sgid + # # => # + # + # It's also possible to pass a specific expiry time + # + # explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1)) + # # => # + # + # # 1 hour later... + # GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s + # # => nil + # + # Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`. + # + # ==== Purpose + # + # You can even bump the security up some more by explaining what purpose a + # Signed Global ID is for. In this way evildoers can't reuse a sign-up + # form's SGID on the login page. For example. + # + # signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') + # # => # # + # + # source://globalid//lib/global_id/identification.rb#107 + def to_signed_global_id(options = T.unsafe(nil)); end +end + +# source://globalid//lib/global_id/locator.rb#4 +module GlobalID::Locator + class << self + # Takes either a GlobalID or a string that can be turned into a GlobalID + # + # Options: + # * :includes - A Symbol, Array, Hash or combination of them. + # The same structure you would pass into a +includes+ method of Active Record. + # If present, locate will load all the relationships specified here. + # See https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations. + # * :only - A class, module or Array of classes and/or modules that are + # allowed to be located. Passing one or more classes limits instances of returned + # classes to those classes or their subclasses. Passing one or more modules in limits + # instances of returned classes to those including that module. If no classes or + # modules match, +nil+ is returned. + # + # source://globalid//lib/global_id/locator.rb#20 + def locate(gid, options = T.unsafe(nil)); end + + # Takes an array of GlobalIDs or strings that can be turned into a GlobalIDs. + # All GlobalIDs must belong to the same app, as they will be located using + # the same locator using its locate_many method. + # + # By default the GlobalIDs will be located using Model.find(array_of_ids), so the + # models must respond to that finder signature. + # + # This approach will efficiently call only one #find (or #where(id: id), when using ignore_missing) + # per model class, but still interpolate the results to match the order in which the gids were passed. + # + # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_many will load all the relationships specified here. + # Note: It only works if all the gids models have that relationships. + # * :only - A class, module or Array of classes and/or modules that are + # allowed to be located. Passing one or more classes limits instances of returned + # classes to those classes or their subclasses. Passing one or more modules in limits + # instances of returned classes to those including that module. If no classes or + # modules match, +nil+ is returned. + # * :ignore_missing - By default, locate_many will call #find on the model to locate the + # ids extracted from the GIDs. In Active Record (and other data stores following the same pattern), + # #find will raise an exception if a named ID can't be found. When you set this option to true, + # we will use #where(id: ids) instead, which does not raise on missing records. + # + # source://globalid//lib/global_id/locator.rb#60 + def locate_many(gids, options = T.unsafe(nil)); end + + # Takes an array of SignedGlobalIDs or strings that can be turned into a SignedGlobalIDs. + # The SignedGlobalIDs are located using Model.find(array_of_ids), so the models must respond to + # that finder signature. + # + # This approach will efficiently call only one #find per model class, but still interpolate + # the results to match the order in which the gids were passed. + # + # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_many_signed will load all the relationships specified here. + # Note: It only works if all the gids models have that relationships. + # * :only - A class, module or Array of classes and/or modules that are + # allowed to be located. Passing one or more classes limits instances of returned + # classes to those classes or their subclasses. Passing one or more modules in limits + # instances of returned classes to those including that module. If no classes or + # modules match, +nil+ is returned. + # + # source://globalid//lib/global_id/locator.rb#103 + def locate_many_signed(sgids, options = T.unsafe(nil)); end + + # Takes either a SignedGlobalID or a string that can be turned into a SignedGlobalID + # + # Options: + # * :includes - A Symbol, Array, Hash or combination of them + # The same structure you would pass into a includes method of Active Record. + # @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations + # If present, locate_signed will load all the relationships specified here. + # * :only - A class, module or Array of classes and/or modules that are + # allowed to be located. Passing one or more classes limits instances of returned + # classes to those classes or their subclasses. Passing one or more modules in limits + # instances of returned classes to those including that module. If no classes or + # modules match, +nil+ is returned. + # + # source://globalid//lib/global_id/locator.rb#81 + def locate_signed(sgid, options = T.unsafe(nil)); end + + # Tie a locator to an app. + # Useful when different apps collaborate and reference each others' Global IDs. + # + # The locator can be either a block or a class. + # + # Using a block: + # + # GlobalID::Locator.use :foo do |gid, options| + # FooRemote.const_get(gid.model_name).find(gid.model_id) + # end + # + # Using a class: + # + # GlobalID::Locator.use :bar, BarLocator.new + # + # class BarLocator + # def locate(gid, options = {}) + # @search_client.search name: gid.model_name, id: gid.model_id + # end + # end + # + # @raise [ArgumentError] + # + # source://globalid//lib/global_id/locator.rb#127 + def use(app, locator = T.unsafe(nil), &locator_block); end + + private + + # @return [Boolean] + # + # source://globalid//lib/global_id/locator.rb#140 + def find_allowed?(model_class, only = T.unsafe(nil)); end + + # source://globalid//lib/global_id/locator.rb#136 + def locator_for(gid); end + + # source://globalid//lib/global_id/locator.rb#148 + def normalize_app(app); end + + # source://globalid//lib/global_id/locator.rb#144 + def parse_allowed(gids, only = T.unsafe(nil)); end + end +end + +# source://globalid//lib/global_id/locator.rb#156 +class GlobalID::Locator::BaseLocator + # source://globalid//lib/global_id/locator.rb#157 + def locate(gid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/locator.rb#165 + def locate_many(gids, options = T.unsafe(nil)); end + + private + + # source://globalid//lib/global_id/locator.rb#189 + def find_records(model_class, ids, options); end + + # @return [Boolean] + # + # source://globalid//lib/global_id/locator.rb#199 + def model_id_is_valid?(gid); end + + # source://globalid//lib/global_id/locator.rb#203 + def primary_key(model_class); end +end + +# source://globalid//lib/global_id/locator.rb#228 +class GlobalID::Locator::BlockLocator + # @return [BlockLocator] a new instance of BlockLocator + # + # source://globalid//lib/global_id/locator.rb#229 + def initialize(block); end + + # source://globalid//lib/global_id/locator.rb#233 + def locate(gid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/locator.rb#237 + def locate_many(gids, options = T.unsafe(nil)); end +end + +# source://globalid//lib/global_id/locator.rb#226 +GlobalID::Locator::DEFAULT_LOCATOR = T.let(T.unsafe(nil), GlobalID::Locator::UnscopedLocator) + +# source://globalid//lib/global_id/locator.rb#5 +class GlobalID::Locator::InvalidModelIdError < ::StandardError; end + +# source://globalid//lib/global_id/locator.rb#208 +class GlobalID::Locator::UnscopedLocator < ::GlobalID::Locator::BaseLocator + # source://globalid//lib/global_id/locator.rb#209 + def locate(gid, options = T.unsafe(nil)); end + + private + + # source://globalid//lib/global_id/locator.rb#214 + def find_records(model_class, ids, options); end + + # source://globalid//lib/global_id/locator.rb#218 + def unscoped(model_class); end +end + +# source://globalid//lib/global_id/railtie.rb#12 +class GlobalID::Railtie < ::Rails::Railtie; end + +# source://globalid//lib/global_id/verifier.rb#4 +class GlobalID::Verifier < ::ActiveSupport::MessageVerifier + private + + # source://globalid//lib/global_id/verifier.rb#10 + def decode(data, **_arg1); end + + # source://globalid//lib/global_id/verifier.rb#6 + def encode(data, **_arg1); end +end + +# source://globalid//lib/global_id/signed_global_id.rb#4 +class SignedGlobalID < ::GlobalID + # @return [SignedGlobalID] a new instance of SignedGlobalID + # + # source://globalid//lib/global_id/signed_global_id.rb#59 + def initialize(gid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/signed_global_id.rb#71 + def ==(other); end + + # Returns the value of attribute expires_at. + # + # source://globalid//lib/global_id/signed_global_id.rb#57 + def expires_at; end + + # source://globalid//lib/global_id/signed_global_id.rb#75 + def inspect; end + + # Returns the value of attribute purpose. + # + # source://globalid//lib/global_id/signed_global_id.rb#57 + def purpose; end + + # source://globalid//lib/global_id/signed_global_id.rb#66 + def to_param; end + + # source://globalid//lib/global_id/signed_global_id.rb#66 + def to_s; end + + # Returns the value of attribute verifier. + # + # source://globalid//lib/global_id/signed_global_id.rb#57 + def verifier; end + + private + + # source://globalid//lib/global_id/signed_global_id.rb#80 + def pick_expiration(options); end + + class << self + # Returns the value of attribute expires_in. + # + # source://globalid//lib/global_id/signed_global_id.rb#8 + def expires_in; end + + # Sets the attribute expires_in + # + # @param value the value to set the attribute expires_in to. + # + # source://globalid//lib/global_id/signed_global_id.rb#8 + def expires_in=(_arg0); end + + # source://globalid//lib/global_id/signed_global_id.rb#10 + def parse(sgid, options = T.unsafe(nil)); end + + # source://globalid//lib/global_id/signed_global_id.rb#24 + def pick_purpose(options); end + + # Grab the verifier from options and fall back to SignedGlobalID.verifier. + # Raise ArgumentError if neither is available. + # + # source://globalid//lib/global_id/signed_global_id.rb#16 + def pick_verifier(options); end + + # Returns the value of attribute verifier. + # + # source://globalid//lib/global_id/signed_global_id.rb#8 + def verifier; end + + # Sets the attribute verifier + # + # @param value the value to set the attribute verifier to. + # + # source://globalid//lib/global_id/signed_global_id.rb#8 + def verifier=(_arg0); end + + private + + # source://globalid//lib/global_id/signed_global_id.rb#50 + def raise_if_expired(expires_at); end + + # source://globalid//lib/global_id/signed_global_id.rb#29 + def verify(sgid, options); end + + # source://globalid//lib/global_id/signed_global_id.rb#40 + def verify_with_legacy_self_validated_metadata(sgid, options); end + + # source://globalid//lib/global_id/signed_global_id.rb#34 + def verify_with_verifier_validated_metadata(sgid, options); end + end +end + +# source://globalid//lib/global_id/signed_global_id.rb#5 +class SignedGlobalID::ExpiredMessage < ::StandardError; end + +# source://globalid//lib/global_id/uri/gid.rb#7 +class URI::GID < ::URI::Generic + # URI::GID encodes an app unique reference to a specific model as an URI. + # It has the components: app name, model class name, model id and params. + # All components except params are required. + # + # The URI format looks like "gid://app/model_name/model_id". + # + # Simple metadata can be stored in params. Useful if your app has multiple databases, + # for instance, and you need to find out which one to look up the model in. + # + # Params will be encoded as query parameters like so + # "gid://app/model_name/model_id?key=value&another_key=another_value". + # + # Params won't be typecast, they're always strings. + # For convenience params can be accessed using both strings and symbol keys. + # + # Multi value params aren't supported. Any params encoding multiple values under + # the same key will return only the last value. For example, when decoding + # params like "key=first_value&key=last_value" key will only be last_value. + # + # Read the documentation for +parse+, +create+ and +build+ for more. + # + # source://uri/0.13.1/lib/uri/generic.rb#243 + def app; end + + # source://globalid//lib/global_id/uri/gid.rb#107 + def deconstruct_keys(_keys); end + + # Returns the value of attribute model_id. + # + # source://globalid//lib/global_id/uri/gid.rb#29 + def model_id; end + + # Returns the value of attribute model_name. + # + # source://globalid//lib/global_id/uri/gid.rb#29 + def model_name; end + + # Returns the value of attribute params. + # + # source://globalid//lib/global_id/uri/gid.rb#29 + def params; end + + # source://globalid//lib/global_id/uri/gid.rb#102 + def to_s; end + + protected + + # Ruby 2.2 uses #query= instead of #set_query + # + # source://globalid//lib/global_id/uri/gid.rb#118 + def query=(query); end + + # source://globalid//lib/global_id/uri/gid.rb#129 + def set_params(params); end + + # source://globalid//lib/global_id/uri/gid.rb#112 + def set_path(path); end + + # Ruby 2.1 or less uses #set_query to assign the query + # + # source://globalid//lib/global_id/uri/gid.rb#124 + def set_query(query); end + + private + + # source://globalid//lib/global_id/uri/gid.rb#136 + def check_host(host); end + + # source://globalid//lib/global_id/uri/gid.rb#141 + def check_path(path); end + + # source://globalid//lib/global_id/uri/gid.rb#146 + def check_scheme(scheme); end + + # source://globalid//lib/global_id/uri/gid.rb#195 + def parse_query_params(query); end + + # source://globalid//lib/global_id/uri/gid.rb#154 + def set_model_components(path, validate = T.unsafe(nil)); end + + # @raise [URI::InvalidComponentError] + # + # source://globalid//lib/global_id/uri/gid.rb#174 + def validate_component(component); end + + # @raise [InvalidModelIdError] + # + # source://globalid//lib/global_id/uri/gid.rb#188 + def validate_model_id(model_id_part); end + + # @raise [MissingModelIdError] + # + # source://globalid//lib/global_id/uri/gid.rb#181 + def validate_model_id_section(model_id, model_name); end + + class << self + # Create a new URI::GID from components with argument check. + # + # The allowed components are app, model_name, model_id and params, which can be + # either a hash or an array. + # + # Using a hash: + # + # URI::GID.build(app: 'bcx', model_name: 'Person', model_id: '1', params: { key: 'value' }) + # + # Using an array, the arguments must be in order [app, model_name, model_id, params]: + # + # URI::GID.build(['bcx', 'Person', '1', key: 'value']) + # + # source://globalid//lib/global_id/uri/gid.rb#88 + def build(args); end + + # Shorthand to build a URI::GID from an app, a model and optional params. + # + # URI::GID.create('bcx', Person.find(5), database: 'superhumans') + # + # source://globalid//lib/global_id/uri/gid.rb#72 + def create(app, model, params = T.unsafe(nil)); end + + # Create a new URI::GID by parsing a gid string with argument check. + # + # URI::GID.parse 'gid://bcx/Person/1?key=value' + # + # This differs from URI() and URI.parse which do not check arguments. + # + # URI('gid://bcx') # => URI::GID instance + # URI.parse('gid://bcx') # => URI::GID instance + # URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError + # + # source://globalid//lib/global_id/uri/gid.rb#64 + def parse(uri); end + + # Validates +app+'s as URI hostnames containing only alphanumeric characters + # and hyphens. An ArgumentError is raised if +app+ is invalid. + # + # URI::GID.validate_app('bcx') # => 'bcx' + # URI::GID.validate_app('foo-bar') # => 'foo-bar' + # + # URI::GID.validate_app(nil) # => ArgumentError + # URI::GID.validate_app('foo/bar') # => ArgumentError + # + # source://globalid//lib/global_id/uri/gid.rb#48 + def validate_app(app); end + end +end + +# source://globalid//lib/global_id/uri/gid.rb#134 +URI::GID::COMPONENT = T.let(T.unsafe(nil), Array) + +# source://globalid//lib/global_id/uri/gid.rb#37 +URI::GID::COMPOSITE_MODEL_ID_DELIMITER = T.let(T.unsafe(nil), String) + +# Maximum size of a model id segment +# +# source://globalid//lib/global_id/uri/gid.rb#36 +URI::GID::COMPOSITE_MODEL_ID_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://globalid//lib/global_id/uri/gid.rb#33 +class URI::GID::InvalidModelIdError < ::URI::InvalidComponentError; end + +# Raised when creating a Global ID for a model without an id +# +# source://globalid//lib/global_id/uri/gid.rb#32 +class URI::GID::MissingModelIdError < ::URI::InvalidComponentError; end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/i18n@1.14.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/i18n@1.14.6.rbi new file mode 100644 index 0000000..72a32f1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/i18n@1.14.6.rbi @@ -0,0 +1,2359 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `i18n` gem. +# Please instead update this file by running `bin/tapioca gem i18n`. + + +# source://i18n//lib/i18n/gettext/po_parser.rb#15 +module GetText; end + +# source://i18n//lib/i18n/gettext/po_parser.rb#17 +class GetText::PoParser < ::Racc::Parser + # source://i18n//lib/i18n/gettext/po_parser.rb#19 + def _(x); end + + def _reduce_10(val, _values, result); end + def _reduce_12(val, _values, result); end + def _reduce_13(val, _values, result); end + def _reduce_14(val, _values, result); end + def _reduce_15(val, _values, result); end + def _reduce_5(val, _values, result); end + def _reduce_8(val, _values, result); end + def _reduce_9(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#323 + def _reduce_none(val, _values, result); end + + def next_token; end + def on_comment(comment); end + def on_message(msgid, msgstr); end + def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end + def unescape(orig); end +end + +# source://i18n//lib/i18n/gettext/po_parser.rb#184 +GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/gettext/po_parser.rb#221 +GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass) + +# source://i18n//lib/i18n/gettext/po_parser.rb#200 +GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# Simple Locale tag implementation that computes subtags by simply splitting +# the locale tag at '-' occurrences. +# +# source://i18n//lib/i18n/version.rb#3 +module I18n + extend ::I18n::Base + + class << self + # source://i18n//lib/i18n/backend/cache.rb#64 + def cache_key_digest; end + + # source://i18n//lib/i18n/backend/cache.rb#68 + def cache_key_digest=(key_digest); end + + # source://i18n//lib/i18n/backend/cache.rb#56 + def cache_namespace; end + + # source://i18n//lib/i18n/backend/cache.rb#60 + def cache_namespace=(namespace); end + + # source://i18n//lib/i18n/backend/cache.rb#48 + def cache_store; end + + # source://i18n//lib/i18n/backend/cache.rb#52 + def cache_store=(store); end + + # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#17 + def fallbacks; end + + # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#23 + def fallbacks=(fallbacks); end + + # Return String or raises MissingInterpolationArgument exception. + # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler. + # + # @raise [ReservedInterpolationKey] + # + # source://i18n//lib/i18n/interpolate/ruby.rb#23 + def interpolate(string, values); end + + # source://i18n//lib/i18n/interpolate/ruby.rb#29 + def interpolate_hash(string, values); end + + # source://i18n//lib/i18n.rb#38 + def new_double_nested_cache; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/cache.rb#72 + def perform_caching?; end + + # Marks a key as reserved. Reserved keys are used internally, + # and can't also be used for interpolation. If you are using any + # extra keys as I18n options, you should call I18n.reserve_key + # before any I18n.translate (etc) calls are made. + # + # source://i18n//lib/i18n.rb#46 + def reserve_key(key); end + + # source://i18n//lib/i18n.rb#51 + def reserved_keys_pattern; end + end +end + +# source://i18n//lib/i18n/exceptions.rb#16 +class I18n::ArgumentError < ::ArgumentError; end + +# source://i18n//lib/i18n/backend.rb#4 +module I18n::Backend; end + +# source://i18n//lib/i18n/backend/base.rb#8 +module I18n::Backend::Base + include ::I18n::Backend::Transliterator + + # Returns an array of locales for which translations are available + # ignoring the reserved translation meta data key :i18n. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#97 + def available_locales; end + + # source://i18n//lib/i18n/backend/base.rb#105 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#71 + def exists?(locale, key, options = T.unsafe(nil)); end + + # Accepts a list of paths to translation files. Loads translations from + # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json + # for details. + # + # source://i18n//lib/i18n/backend/base.rb#14 + def load_translations(*filenames); end + + # Acts the same as +strftime+, but uses a localized version of the + # format string. Takes a key from the date/time formats translations as + # a format argument (e.g., :short in :'date.formats'). + # + # @raise [ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#78 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#101 + def reload!; end + + # This method receives a locale, a data hash and options for storing translations. + # Should be implemented + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#24 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#28 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # Deep interpolation + # + # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } }, + # ann: 'good', john: 'big' + # #=> { people: { ann: "Ann is good", john: "John is big" } } + # + # source://i18n//lib/i18n/backend/base.rb#217 + def deep_interpolate(locale, data, values = T.unsafe(nil)); end + + # Evaluates defaults. + # If given subject is an Array, it walks the array and returns the + # first translation that can be resolved. Otherwise it tries to resolve + # the translation directly. + # + # source://i18n//lib/i18n/backend/base.rb#128 + def default(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#111 + def eager_loaded?; end + + # Interpolates values into a given subject. + # + # if the given subject is a string then: + # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X' + # # => "file test.txt opened by %{user}" + # + # if the given subject is an array then: + # each element of the array is recursively interpolated (until it finds a string) + # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" + # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] + # + # source://i18n//lib/i18n/backend/base.rb#201 + def interpolate(locale, subject, values = T.unsafe(nil)); end + + # Loads a single translations file by delegating to #load_rb or + # #load_yml depending on the file extension and directly merges the + # data to the existing translations. Raises I18n::UnknownFileType + # for all other file extensions. + # + # @raise [UnknownFileType] + # + # source://i18n//lib/i18n/backend/base.rb#240 + def load_file(filename); end + + # Loads a JSON translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#276 + def load_json(filename); end + + # Loads a plain Ruby translations file. eval'ing the file must yield + # a Hash containing translation data with locales as toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#254 + def load_rb(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#261 + def load_yaml(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#261 + def load_yml(filename); end + + # The method which actually looks up for the translation in the store. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#116 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#308 + def pluralization_key(entry, count); end + + # Picks a translation from a pluralized mnemonic subkey according to English + # pluralization rules : + # - It will pick the :one subkey if count is equal to 1. + # - It will pick the :other subkey otherwise. + # - It will pick the :zero subkey in the special case where count is + # equal to 0 and there is a :zero subkey present. This behaviour is + # not standard with regards to the CLDR pluralization rules. + # Other backends can implement more flexible or complex pluralization rules. + # + # @raise [InvalidPluralizationData] + # + # source://i18n//lib/i18n/backend/base.rb#182 + def pluralize(locale, entry, count); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#150 + def resolve(locale, object, subject, options = T.unsafe(nil)); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#150 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#120 + def subtrees?; end + + # source://i18n//lib/i18n/backend/base.rb#289 + def translate_localization_format(locale, object, format, options); end +end + +# TODO Should the cache be cleared if new translations are stored? +# +# source://i18n//lib/i18n/backend/cache.rb#79 +module I18n::Backend::Cache + # source://i18n//lib/i18n/backend/cache.rb#80 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/cache.rb#93 + def _fetch(cache_key, &block); end + + # source://i18n//lib/i18n/backend/cache.rb#101 + def cache_key(locale, key, options); end + + # source://i18n//lib/i18n/backend/cache.rb#86 + def fetch(cache_key, &block); end + + private + + # source://i18n//lib/i18n/backend/cache.rb#108 + def digest_item(key); end +end + +# Overwrites the Base load_file method to cache loaded file contents. +# +# source://i18n//lib/i18n/backend/cache_file.rb#8 +module I18n::Backend::CacheFile + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots; end + + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots=(_arg0); end + + protected + + # Track loaded translation files in the `i18n.load_file` scope, + # and skip loading the file if its contents are still up-to-date. + # + # source://i18n//lib/i18n/backend/cache_file.rb#17 + def load_file(filename); end + + # Translate absolute filename to relative path for i18n key. + # + # source://i18n//lib/i18n/backend/cache_file.rb#28 + def normalized_path(file); end +end + +# source://i18n//lib/i18n/backend/cascade.rb#35 +module I18n::Backend::Cascade + # source://i18n//lib/i18n/backend/cascade.rb#36 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Backend that chains multiple other backends and checks each of them when +# a translation needs to be looked up. This is useful when you want to use +# standard translations with a Simple backend but store custom application +# translations in a database or other backends. +# +# To use the Chain backend instantiate it and set it to the I18n module. +# You can add chained backends through the initializer or backends +# accessor: +# +# # preserves the existing Simple backend set to I18n.backend +# I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) +# +# The implementation assumes that all backends added to the Chain implement +# a lookup method with the same API as Simple backend does. +# +# Fallback translations using the :default option are only used by the last backend of a chain. +# +# source://i18n//lib/i18n/backend/chain.rb#21 +class I18n::Backend::Chain + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Chain::Implementation +end + +# source://i18n//lib/i18n/backend/chain.rb#22 +module I18n::Backend::Chain::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # source://i18n//lib/i18n/backend/chain.rb#27 + def initialize(*backends); end + + # source://i18n//lib/i18n/backend/chain.rb#52 + def available_locales; end + + # Returns the value of attribute backends. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends; end + + # Sets the attribute backends + # + # @param value the value to set the attribute backends to. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends=(_arg0); end + + # source://i18n//lib/i18n/backend/chain.rb#44 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#76 + def exists?(locale, key, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#31 + def initialized?; end + + # source://i18n//lib/i18n/backend/chain.rb#82 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#40 + def reload!; end + + # source://i18n//lib/i18n/backend/chain.rb#48 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#56 + def translate(locale, key, default_options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/chain.rb#92 + def init_translations; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#108 + def namespace_lookup?(result, options); end + + # source://i18n//lib/i18n/backend/chain.rb#98 + def translations; end + + private + + # This is approximately what gets used in ActiveSupport. + # However since we are not guaranteed to run in an ActiveSupport context + # it is wise to have our own copy. We underscore it + # to not pollute the namespace of the including class. + # + # source://i18n//lib/i18n/backend/chain.rb#117 + def _deep_merge(hash, other_hash); end +end + +# source://i18n//lib/i18n/backend/fallbacks.rb#30 +module I18n::Backend::Fallbacks + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/fallbacks.rb#98 + def exists?(locale, key, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#89 + def extract_non_symbol_default!(options); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#67 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # Overwrites the Base backend translate method so that it will try each + # locale given by I18n.fallbacks for the given locale. E.g. for the + # locale :"de-DE" it might try the locales :"de-DE", :de and :en + # (depends on the fallbacks implementation) until it finds a result with + # the given options. If it does not find any result for any of the + # locales it will then throw MissingTranslation as usual. + # + # The default option takes precedence over fallback locales only when + # it's a Symbol. When the default contains a String, Proc or Hash + # it is evaluated last after all the fallback locales have been tried. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#41 + def translate(locale, key, options = T.unsafe(nil)); end + + private + + # Overwrite on_fallback to add specified logic when the fallback succeeds. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#114 + def on_fallback(_original_locale, _fallback_locale, _key, _options); end +end + +# This module contains several helpers to assist flattening translations. +# You may want to flatten translations for: +# +# 1) speed up lookups, as in the Memoize backend; +# 2) In case you want to store translations in a data store, as in ActiveRecord backend; +# +# You can check both backends above for some examples. +# This module also keeps all links in a hash so they can be properly resolved when flattened. +# +# source://i18n//lib/i18n/backend/flatten.rb#13 +module I18n::Backend::Flatten + # Flatten keys for nested Hashes by chaining up keys: + # + # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind + # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" } + # + # source://i18n//lib/i18n/backend/flatten.rb#59 + def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end + + # Receives a hash of translations (where the key is a locale and + # the value is another hash) and return a hash with all + # translations flattened. + # + # Nested hashes are included in the flattened hash just if subtree + # is true and Symbols are automatically stored as links. + # + # source://i18n//lib/i18n/backend/flatten.rb#74 + def flatten_translations(locale, data, escape, subtree); end + + # Store flattened links. + # + # source://i18n//lib/i18n/backend/flatten.rb#50 + def links; end + + # Shortcut to I18n::Backend::Flatten.normalize_flat_keys + # and then resolve_links. + # + # source://i18n//lib/i18n/backend/flatten.rb#44 + def normalize_flat_keys(locale, key, scope, separator); end + + protected + + # source://i18n//lib/i18n/backend/flatten.rb#112 + def escape_default_separator(key); end + + # source://i18n//lib/i18n/backend/flatten.rb#106 + def find_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#93 + def resolve_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#89 + def store_link(locale, key, link); end + + class << self + # Receives a string and escape the default separator. + # + # source://i18n//lib/i18n/backend/flatten.rb#38 + def escape_default_separator(key); end + + # normalize_keys the flatten way. This method is significantly faster + # and creates way less objects than the one at I18n.normalize_keys. + # It also handles escaping the translation keys. + # + # source://i18n//lib/i18n/backend/flatten.rb#20 + def normalize_flat_keys(locale, key, scope, separator); end + end +end + +# source://i18n//lib/i18n/backend/flatten.rb#15 +I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/backend/flatten.rb#14 +I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) + +# Experimental support for using Gettext po files to store translations. +# +# To use this you can simply include the module to the Simple backend - or +# whatever other backend you are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Gettext) +# +# Now you should be able to include your Gettext translation (*.po) files to +# the +I18n.load_path+ so they're loaded to the backend and you can use them as +# usual: +# +# I18n.load_path += Dir["path/to/locales/*.po"] +# +# Following the Gettext convention this implementation expects that your +# translation files are named by their locales. E.g. the file en.po would +# contain the translations for the English locale. +# +# To translate text you must use one of the translate methods provided by +# I18n::Gettext::Helpers. +# +# include I18n::Gettext::Helpers +# puts _("some string") +# +# Without it strings containing periods (".") will not be translated. +# +# source://i18n//lib/i18n/backend/gettext.rb#33 +module I18n::Backend::Gettext + protected + + # source://i18n//lib/i18n/backend/gettext.rb#41 + def load_po(filename); end + + # source://i18n//lib/i18n/backend/gettext.rb#51 + def normalize(locale, data); end + + # source://i18n//lib/i18n/backend/gettext.rb#68 + def normalize_pluralization(locale, key, value); end + + # source://i18n//lib/i18n/backend/gettext.rb#47 + def parse(filename); end +end + +# source://i18n//lib/i18n/backend/gettext.rb#34 +class I18n::Backend::Gettext::PoData < ::Hash + # source://i18n//lib/i18n/backend/gettext.rb#35 + def set_comment(msgid_or_sym, comment); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 +module I18n::Backend::InterpolationCompiler + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97 + def interpolate(locale, string, values); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113 + def compile_all_strings_in(data); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 +module I18n::Backend::InterpolationCompiler::Compiler + extend ::I18n::Backend::InterpolationCompiler::Compiler + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26 + def compile_if_an_interpolation(string); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#38 + def interpolated_str?(str); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58 + def compile_interpolation_token(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48 + def compiled_interpolation_body(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71 + def direct_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91 + def escape_key_sym(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87 + def escape_plain_str(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54 + def handle_interpolation_token(token); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67 + def interpolate_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62 + def interpolate_or_raise_missing(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79 + def missing_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75 + def nil_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83 + def reserved_key(key); end + + # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44 + def tokenize(str); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 +I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) + +# This is a basic backend for key value stores. It receives on +# initialization the store, which should respond to three methods: +# +# * store#[](key) - Used to get a value +# * store#[]=(key, value) - Used to set a value +# * store#keys - Used to get all keys +# +# Since these stores only supports string, all values are converted +# to JSON before being stored, allowing it to also store booleans, +# hashes and arrays. However, this store does not support Procs. +# +# As the ActiveRecord backend, Symbols are just supported when loading +# translations from the filesystem or through explicit store translations. +# +# Also, avoid calling I18n.available_locales since it's a somehow +# expensive operation in most stores. +# +# == Example +# +# To setup I18n to use TokyoCabinet in memory is quite straightforward: +# +# require 'rufus/tokyo/cabinet' # gem install rufus-tokyo +# I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*')) +# +# == Performance +# +# You may make this backend even faster by including the Memoize module. +# However, notice that you should properly clear the cache if you change +# values directly in the key-store. +# +# == Subtrees +# +# In most backends, you are allowed to retrieve part of a translation tree: +# +# I18n.backend.store_translations :en, :foo => { :bar => :baz } +# I18n.t "foo" #=> { :bar => :baz } +# +# This backend supports this feature by default, but it slows down the storage +# of new data considerably and makes hard to delete entries. That said, you are +# allowed to disable the storage of subtrees on initialization: +# +# I18n::Backend::KeyValue.new(@store, false) +# +# This is useful if you are using a KeyValue backend chained to a Simple backend. +# +# source://i18n//lib/i18n/backend/key_value.rb#69 +class I18n::Backend::KeyValue + include ::I18n::Backend::Flatten + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::KeyValue::Implementation +end + +# source://i18n//lib/i18n/backend/key_value.rb#70 +module I18n::Backend::KeyValue::Implementation + include ::I18n::Backend::Flatten + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # source://i18n//lib/i18n/backend/key_value.rb#75 + def initialize(store, subtrees = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/key_value.rb#102 + def available_locales; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#79 + def initialized?; end + + # Returns the value of attribute store. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 + def store; end + + # Sets the attribute store + # + # @param value the value to set the attribute store to. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 + def store=(_arg0); end + + # source://i18n//lib/i18n/backend/key_value.rb#83 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/key_value.rb#124 + def init_translations; end + + # source://i18n//lib/i18n/backend/key_value.rb#136 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/key_value.rb#150 + def pluralize(locale, entry, count); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#132 + def subtrees?; end + + # Queries the translations from the key-value store and converts + # them into a hash such as the one returned from loading the + # haml files + # + # source://i18n//lib/i18n/backend/key_value.rb#115 + def translations; end +end + +# source://i18n//lib/i18n/backend/key_value.rb#161 +class I18n::Backend::KeyValue::SubtreeProxy + # @return [SubtreeProxy] a new instance of SubtreeProxy + # + # source://i18n//lib/i18n/backend/key_value.rb#162 + def initialize(master_key, store); end + + # source://i18n//lib/i18n/backend/key_value.rb#172 + def [](key); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#168 + def has_key?(key); end + + # source://i18n//lib/i18n/backend/key_value.rb#196 + def inspect; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#188 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#183 + def is_a?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#183 + def kind_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#192 + def nil?; end +end + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 +class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple + # @return [LazyLoadable] a new instance of LazyLoadable + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#66 + def initialize(lazy_load: T.unsafe(nil)); end + + # Parse the load path and extract all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#99 + def available_locales; end + + # Eager loading is not supported in the lazy context. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#90 + def eager_load!; end + + # Returns whether the current locale is initialized. + # + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#71 + def initialized?; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # Clean up translations and uninitialize all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#80 + def reload!; end + + protected + + # Load translations from files that belong to the current locale. + # + # @raise [InvalidFilenames] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#121 + def init_translations; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 + def initialized_locales; end + + private + + # Checks if a filename is named in correspondence to the translations it loaded. + # The locale extracted from the path must be the single locale loaded in the translations. + # + # @raise [FilenameIncorrect] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#175 + def assert_file_named_correctly!(file, translations); end + + # Select all files from I18n load path that belong to current locale. + # These files must start with the locale identifier (ie. "en", "pt-BR"), + # followed by an "_" demarcation to separate proceeding text. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#167 + def filenames_for_current_locale; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#139 + def lazy_load?; end + + # Loads each file supplied and asserts that the file only loads + # translations as expected by the name. The method returns a list of + # errors corresponding to offending files. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#152 + def load_translations_and_collect_file_errors(files); end +end + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#143 +class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError + # @return [FilenameIncorrect] a new instance of FilenameIncorrect + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#144 + def initialize(file, expected_locale, unexpected_locales); end +end + +# Backend that lazy loads translations based on the current locale. This +# implementation avoids loading all translations up front. Instead, it only +# loads the translations that belong to the current locale. This offers a +# performance incentive in local development and test environments for +# applications with many translations for many different locales. It's +# particularly useful when the application only refers to a single locales' +# translations at a time (ex. A Rails workload). The implementation +# identifies which translation files from the load path belong to the +# current locale by pattern matching against their path name. +# +# Specifically, a translation file is considered to belong to a locale if: +# a) the filename is in the I18n load path +# b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb) +# c) the filename starts with the locale identifier +# d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_". +# +# Examples: +# Valid files that will be selected by this backend: +# +# "files/locales/en_translation.yml" (Selected for locale "en") +# "files/locales/fr.po" (Selected for locale "fr") +# +# Invalid files that won't be selected by this backend: +# +# "files/locales/translation-file" +# "files/locales/en-translation.unsupported" +# "files/locales/french/translation.yml" +# "files/locales/fr/translation.yml" +# +# The implementation uses this assumption to defer the loading of +# translation files until the current locale actually requires them. +# +# The backend has two working modes: lazy_load and eager_load. +# +# Note: This backend should only be enabled in test environments! +# When the mode is set to false, the backend behaves exactly like the +# Simple backend, with an additional check that the paths being loaded +# abide by the format. If paths can't be matched to the format, an error is raised. +# +# You can configure lazy loaded backends through the initializer or backends +# accessor: +# +# # In test environments +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true) +# +# # In other environments, such as production and CI +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default +# +# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 +class I18n::Backend::LocaleExtractor + class << self + # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 + def locale_from_path(path); end + end +end + +# source://i18n//lib/i18n/backend/memoize.rb#14 +module I18n::Backend::Memoize + # source://i18n//lib/i18n/backend/memoize.rb#15 + def available_locales; end + + # source://i18n//lib/i18n/backend/memoize.rb#29 + def eager_load!; end + + # source://i18n//lib/i18n/backend/memoize.rb#24 + def reload!; end + + # source://i18n//lib/i18n/backend/memoize.rb#19 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/memoize.rb#37 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/memoize.rb#44 + def memoized_lookup; end + + # source://i18n//lib/i18n/backend/memoize.rb#48 + def reset_memoizations!(locale = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/backend/metadata.rb#21 +module I18n::Backend::Metadata + # source://i18n//lib/i18n/backend/metadata.rb#52 + def interpolate(locale, entry, values = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/metadata.rb#57 + def pluralize(locale, entry, count); end + + # source://i18n//lib/i18n/backend/metadata.rb#40 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/metadata.rb#63 + def with_metadata(metadata, &block); end + + class << self + # @private + # + # source://i18n//lib/i18n/backend/metadata.rb#23 + def included(base); end + end +end + +# source://i18n//lib/i18n/backend/pluralization.rb#16 +module I18n::Backend::Pluralization + # Overwrites the Base backend translate method so that it will check the + # translation meta data space (:i18n) for a locale specific pluralization + # rule and use it to pluralize the given entry. I.e., the library expects + # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') + # + # Pluralization rules are expected to respond to #call(count) and + # return a pluralization key. Valid keys depend on the pluralization + # rules for the locale, as defined in the CLDR. + # As of v41, 6 locale-specific plural categories are defined: + # :few, :many, :one, :other, :two, :zero + # + # n.b., The :one plural category does not imply the number 1. + # Instead, :one is a category for any number that behaves like 1 in + # that locale. For example, in some locales, :one is used for numbers + # that end in "1" (like 1, 21, 151) but that don't end in + # 11 (like 11, 111, 10311). + # Similar notes apply to the :two, and :zero plural categories. + # + # If you want to have different strings for the categories of count == 0 + # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") + # use the explicit `"0"` and `"1"` keys. + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + # + # source://i18n//lib/i18n/backend/pluralization.rb#39 + def pluralize(locale, entry, count); end + + protected + + # source://i18n//lib/i18n/backend/pluralization.rb#81 + def pluralizer(locale); end + + # source://i18n//lib/i18n/backend/pluralization.rb#77 + def pluralizers; end + + private + + # Normalizes categories of 0.0 and 1.0 + # and returns the symbolic version + # + # source://i18n//lib/i18n/backend/pluralization.rb#89 + def symbolic_count(count); end +end + +# A simple backend that reads translations from YAML files and stores them in +# an in-memory hash. Relies on the Base backend. +# +# The implementation is provided by a Implementation module allowing to easily +# extend Simple backend's behavior by including modules. E.g.: +# +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# source://i18n//lib/i18n/backend/simple.rb#21 +class I18n::Backend::Simple + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Simple::Implementation +end + +# source://i18n//lib/i18n/backend/simple.rb#22 +module I18n::Backend::Simple::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # Get available locales from the translations hash + # + # source://i18n//lib/i18n/backend/simple.rb#49 + def available_locales; end + + # source://i18n//lib/i18n/backend/simple.rb#64 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/simple.rb#28 + def initialized?; end + + # Clean up translations hash and set initialized to false on reload! + # + # source://i18n//lib/i18n/backend/simple.rb#58 + def reload!; end + + # Stores translations for the given locale in memory. + # This uses a deep merge for the translations hash, so existing + # translations will be overwritten by new ones only at the deepest + # level of the hash. + # + # source://i18n//lib/i18n/backend/simple.rb#36 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/simple.rb#69 + def translations(do_init: T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/simple.rb#83 + def init_translations; end + + # Looks up a translation from the translations hash. Returns nil if + # either key is nil, or locale, scope or key do not exist as a key in the + # nested translations hash. Splits keys or scopes containing dots + # into multiple keys, i.e. currency.format is regarded the same as + # %w(currency format). + # + # source://i18n//lib/i18n/backend/simple.rb#93 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Mutex to ensure that concurrent translations loading will be thread-safe +# +# source://i18n//lib/i18n/backend/simple.rb#26 +I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://i18n//lib/i18n/backend/transliterator.rb#6 +module I18n::Backend::Transliterator + # Given a locale and a UTF-8 string, return the locale's ASCII + # approximation for the string. + # + # source://i18n//lib/i18n/backend/transliterator.rb#11 + def transliterate(locale, string, replacement = T.unsafe(nil)); end + + class << self + # Get a transliterator instance. + # + # source://i18n//lib/i18n/backend/transliterator.rb#19 + def get(rule = T.unsafe(nil)); end + end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#7 +I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# A transliterator which accepts a Hash of characters as its translation +# rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#42 +class I18n::Backend::Transliterator::HashTransliterator + # @return [HashTransliterator] a new instance of HashTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#74 + def initialize(rule = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/transliterator.rb#80 + def transliterate(string, replacement = T.unsafe(nil)); end + + private + + # Add transliteration rules to the approximations hash. + # + # source://i18n//lib/i18n/backend/transliterator.rb#100 + def add(hash); end + + # source://i18n//lib/i18n/backend/transliterator.rb#93 + def add_default_approximations; end + + # source://i18n//lib/i18n/backend/transliterator.rb#89 + def approximations; end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#43 +I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash) + +# A transliterator which accepts a Proc as its transliteration rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#30 +class I18n::Backend::Transliterator::ProcTransliterator + # @return [ProcTransliterator] a new instance of ProcTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#31 + def initialize(rule); end + + # source://i18n//lib/i18n/backend/transliterator.rb#35 + def transliterate(string, replacement = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n.rb#55 +module I18n::Base + # source://i18n//lib/i18n.rb#70 + def available_locales; end + + # source://i18n//lib/i18n.rb#74 + def available_locales=(value); end + + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#386 + def available_locales_initialized?; end + + # source://i18n//lib/i18n.rb#70 + def backend; end + + # source://i18n//lib/i18n.rb#74 + def backend=(value); end + + # Gets I18n configuration object. + # + # source://i18n//lib/i18n.rb#57 + def config; end + + # Sets I18n configuration object. + # + # source://i18n//lib/i18n.rb#62 + def config=(value); end + + # source://i18n//lib/i18n.rb#70 + def default_locale; end + + # source://i18n//lib/i18n.rb#74 + def default_locale=(value); end + + # source://i18n//lib/i18n.rb#70 + def default_separator; end + + # source://i18n//lib/i18n.rb#74 + def default_separator=(value); end + + # Tells the backend to load translations now. Used in situations like the + # Rails production environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#91 + def eager_load!; end + + # source://i18n//lib/i18n.rb#70 + def enforce_available_locales; end + + # Raises an InvalidLocale exception when the passed locale is not available. + # + # source://i18n//lib/i18n.rb#380 + def enforce_available_locales!(locale); end + + # source://i18n//lib/i18n.rb#74 + def enforce_available_locales=(value); end + + # source://i18n//lib/i18n.rb#70 + def exception_handler; end + + # source://i18n//lib/i18n.rb#74 + def exception_handler=(value); end + + # Returns true if a translation exists for a given key, otherwise returns false. + # + # @raise [Disabled] + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#265 + def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Returns an array of interpolation keys for the given translation key + # + # *Examples* + # + # Suppose we have the following: + # I18n.t 'example.zero' == 'Zero interpolations' + # I18n.t 'example.one' == 'One interpolation %{foo}' + # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}' + # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}'] + # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}' + # + # Then we can expect the following results: + # I18n.interpolation_keys('example.zero') #=> [] + # I18n.interpolation_keys('example.one') #=> ['foo'] + # I18n.interpolation_keys('example.two') #=> ['foo', 'bar'] + # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz'] + # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz'] + # I18n.interpolation_keys('does-not-exist') #=> [] + # I18n.interpolation_keys('example') #=> [] + # + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n.rb#254 + def interpolation_keys(key, **options); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#335 + def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # source://i18n//lib/i18n.rb#70 + def load_path; end + + # source://i18n//lib/i18n.rb#74 + def load_path=(value); end + + # source://i18n//lib/i18n.rb#70 + def locale; end + + # source://i18n//lib/i18n.rb#74 + def locale=(value); end + + # Returns true when the passed locale, which can be either a String or a + # Symbol, is in the list of available locales. Returns false otherwise. + # + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#375 + def locale_available?(locale); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#335 + def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # Merges the given locale, key and scope into a single array of keys. + # Splits keys that contain dots into multiple keys. Makes sure all + # keys are Symbols. + # + # source://i18n//lib/i18n.rb#363 + def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end + + # Tells the backend to reload translations. Used in situations like the + # Rails development environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#83 + def reload!; end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # BULK LOOKUP + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # Ruby 2.7+ keyword arguments warning + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#211 + def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#230 + def t!(key, **options); end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # BULK LOOKUP + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # Ruby 2.7+ keyword arguments warning + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#211 + def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#230 + def translate!(key, **options); end + + # Transliterates UTF-8 characters to ASCII. By default this method will + # transliterate only Latin strings to an ASCII approximation: + # + # I18n.transliterate("Ærøskøbing") + # # => "AEroskobing" + # + # I18n.transliterate("日本語") + # # => "???" + # + # It's also possible to add support for per-locale transliterations. I18n + # expects transliteration rules to be stored at + # i18n.transliterate.rule. + # + # Transliteration rules can either be a Hash or a Proc. Procs must accept a + # single string argument. Hash rules inherit the default transliteration + # rules, while Procs do not. + # + # *Examples* + # + # Setting a Hash in .yml: + # + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # Setting a Hash using Ruby: + # + # store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # Setting a Proc: + # + # translit = lambda {|string| MyTransliterator.transliterate(string) } + # store_translations(:xx, :i18n => {:transliterate => {:rule => translit}) + # + # Transliterating strings: + # + # I18n.locale = :en + # I18n.transliterate("Jürgen") # => "Jurgen" + # I18n.locale = :de + # I18n.transliterate("Jürgen") # => "Juergen" + # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" + # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" + # + # source://i18n//lib/i18n.rb#324 + def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end + + # Executes block with given I18n.locale set. + # + # source://i18n//lib/i18n.rb#346 + def with_locale(tmp_locale = T.unsafe(nil)); end + + private + + # Any exceptions thrown in translate will be sent to the @@exception_handler + # which can be a Symbol, a Proc or any other Object unless they're forced to + # be raised or thrown (MissingTranslation). + # + # If exception_handler is a Symbol then it will simply be sent to I18n as + # a method call. A Proc will simply be called. In any other case the + # method #call will be called on the exception_handler object. + # + # Examples: + # + # I18n.exception_handler = :custom_exception_handler # this is the default + # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = lambda { |*args| ... } # a lambda + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = I18nExceptionHandler.new # an object + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # source://i18n//lib/i18n.rb#422 + def handle_exception(handling, exception, locale, key, options); end + + # source://i18n//lib/i18n.rb#464 + def interpolation_keys_from_translation(translation); end + + # source://i18n//lib/i18n.rb#440 + def normalize_key(key, separator); end + + # source://i18n//lib/i18n.rb#392 + def translate_key(key, throw, raise, locale, backend, options); end +end + +# source://i18n//lib/i18n/config.rb#6 +class I18n::Config + # Returns an array of locales for which translations are available. + # Unless you explicitly set these through I18n.available_locales= + # the call will be delegated to the backend. + # + # source://i18n//lib/i18n/config.rb#43 + def available_locales; end + + # Sets the available locales. + # + # source://i18n//lib/i18n/config.rb#57 + def available_locales=(locales); end + + # Returns true if the available_locales have been initialized + # + # @return [Boolean] + # + # source://i18n//lib/i18n/config.rb#64 + def available_locales_initialized?; end + + # Caches the available locales list as both strings and symbols in a Set, so + # that we can have faster lookups to do the available locales enforce check. + # + # source://i18n//lib/i18n/config.rb#50 + def available_locales_set; end + + # Returns the current backend. Defaults to +Backend::Simple+. + # + # source://i18n//lib/i18n/config.rb#20 + def backend; end + + # Sets the current backend. Used to set a custom backend. + # + # source://i18n//lib/i18n/config.rb#25 + def backend=(backend); end + + # Clears the available locales set so it can be recomputed again after I18n + # gets reloaded. + # + # source://i18n//lib/i18n/config.rb#70 + def clear_available_locales_set; end + + # Returns the current default locale. Defaults to :'en' + # + # source://i18n//lib/i18n/config.rb#30 + def default_locale; end + + # Sets the current default locale. Used to set a custom default locale. + # + # source://i18n//lib/i18n/config.rb#35 + def default_locale=(locale); end + + # Returns the current default scope separator. Defaults to '.' + # + # source://i18n//lib/i18n/config.rb#75 + def default_separator; end + + # Sets the current default scope separator. + # + # source://i18n//lib/i18n/config.rb#80 + def default_separator=(separator); end + + # source://i18n//lib/i18n/config.rb#141 + def enforce_available_locales; end + + # source://i18n//lib/i18n/config.rb#145 + def enforce_available_locales=(enforce_available_locales); end + + # Returns the current exception handler. Defaults to an instance of + # I18n::ExceptionHandler. + # + # source://i18n//lib/i18n/config.rb#86 + def exception_handler; end + + # Sets the exception handler. + # + # source://i18n//lib/i18n/config.rb#91 + def exception_handler=(exception_handler); end + + # Returns the current interpolation patterns. Defaults to + # I18n::DEFAULT_INTERPOLATION_PATTERNS. + # + # source://i18n//lib/i18n/config.rb#151 + def interpolation_patterns; end + + # Sets the current interpolation patterns. Used to set a interpolation + # patterns. + # + # E.g. using {{}} as a placeholder like "{{hello}}, world!": + # + # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ + # + # source://i18n//lib/i18n/config.rb#161 + def interpolation_patterns=(interpolation_patterns); end + + # Allow clients to register paths providing translation data sources. The + # backend defines acceptable sources. + # + # E.g. the provided SimpleBackend accepts a list of paths to translation + # files which are either named *.rb and contain plain Ruby Hashes or are + # named *.yml and contain YAML data. So for the SimpleBackend clients may + # register translation files like this: + # I18n.load_path << 'path/to/locale/en.yml' + # + # source://i18n//lib/i18n/config.rb#126 + def load_path; end + + # Sets the load path instance. Custom implementations are expected to + # behave like a Ruby Array. + # + # source://i18n//lib/i18n/config.rb#132 + def load_path=(load_path); end + + # The only configuration value that is not global and scoped to thread is :locale. + # It defaults to the default_locale. + # + # source://i18n//lib/i18n/config.rb#9 + def locale; end + + # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. + # + # source://i18n//lib/i18n/config.rb#14 + def locale=(locale); end + + # Returns the current handler for situations when interpolation argument + # is missing. MissingInterpolationArgument will be raised by default. + # + # source://i18n//lib/i18n/config.rb#97 + def missing_interpolation_argument_handler; end + + # Sets the missing interpolation argument handler. It can be any + # object that responds to #call. The arguments that will be passed to #call + # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+ + # if you don't care about arity. + # + # == Example: + # You can suppress raising an exception and return string instead: + # + # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| + # "#{key} is missing" + # end + # + # source://i18n//lib/i18n/config.rb#114 + def missing_interpolation_argument_handler=(exception_handler); end +end + +# source://i18n//lib/i18n/interpolate/ruby.rb#7 +I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#18 +class I18n::Disabled < ::I18n::ArgumentError + # @return [Disabled] a new instance of Disabled + # + # source://i18n//lib/i18n/exceptions.rb#19 + def initialize(method); end +end + +# source://i18n//lib/i18n.rb#36 +I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#6 +class I18n::ExceptionHandler + # source://i18n//lib/i18n/exceptions.rb#7 + def call(exception, _locale, _key, _options); end +end + +# source://i18n//lib/i18n/gettext.rb#4 +module I18n::Gettext + class << self + # source://i18n//lib/i18n/gettext.rb#21 + def extract_scope(msgid, separator); end + + # returns an array of plural keys for the given locale or the whole hash + # of locale mappings to plural keys so that we can convert from gettext's + # integer-index based style + # TODO move this information to the pluralization module + # + # source://i18n//lib/i18n/gettext.rb#17 + def plural_keys(*args); end + end +end + +# source://i18n//lib/i18n/gettext.rb#6 +I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) + +# Implements classical Gettext style accessors. To use this include the +# module to the global namespace or wherever you want to use it. +# +# include I18n::Gettext::Helpers +# +# source://i18n//lib/i18n/gettext/helpers.rb#11 +module I18n::Gettext::Helpers + # Makes dynamic translation messages readable for the gettext parser. + # _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, + # you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. + # * msgid: the message id. + # * Returns: msgid. + # + # source://i18n//lib/i18n/gettext/helpers.rb#17 + def N_(msgsid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 + def _(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 + def gettext(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 + def n_(msgid, msgid_plural, n = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 + def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 + def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 + def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 + def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 + def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 + def p_(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 + def pgettext(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 + def s_(msgid, separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 + def sgettext(msgid, separator = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/gettext.rb#5 +I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/interpolate/ruby.rb#12 +I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/interpolate/ruby.rb#15 +I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#134 +class I18n::InvalidFilenames < ::I18n::ArgumentError + # @return [InvalidFilenames] a new instance of InvalidFilenames + # + # source://i18n//lib/i18n/exceptions.rb#136 + def initialize(file_errors); end +end + +# source://i18n//lib/i18n/exceptions.rb#135 +I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) + +# source://i18n//lib/i18n/exceptions.rb#32 +class I18n::InvalidLocale < ::I18n::ArgumentError + # @return [InvalidLocale] a new instance of InvalidLocale + # + # source://i18n//lib/i18n/exceptions.rb#34 + def initialize(locale); end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#33 + def locale; end +end + +# source://i18n//lib/i18n/exceptions.rb#40 +class I18n::InvalidLocaleData < ::I18n::ArgumentError + # @return [InvalidLocaleData] a new instance of InvalidLocaleData + # + # source://i18n//lib/i18n/exceptions.rb#42 + def initialize(filename, exception_message); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#41 + def filename; end +end + +# source://i18n//lib/i18n/exceptions.rb#92 +class I18n::InvalidPluralizationData < ::I18n::ArgumentError + # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData + # + # source://i18n//lib/i18n/exceptions.rb#94 + def initialize(entry, count, key); end + + # Returns the value of attribute count. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def count; end + + # Returns the value of attribute entry. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def entry; end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def key; end +end + +# source://i18n//lib/i18n/backend/key_value.rb#21 +I18n::JSON = ActiveSupport::JSON + +# source://i18n//lib/i18n/locale.rb#4 +module I18n::Locale; end + +# source://i18n//lib/i18n/locale/fallbacks.rb#48 +class I18n::Locale::Fallbacks < ::Hash + # @return [Fallbacks] a new instance of Fallbacks + # + # source://i18n//lib/i18n/locale/fallbacks.rb#49 + def initialize(*mappings); end + + # @raise [InvalidLocale] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#60 + def [](locale); end + + # Returns the value of attribute defaults. + # + # source://i18n//lib/i18n/locale/fallbacks.rb#58 + def defaults; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#55 + def defaults=(defaults); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#82 + def empty?; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#86 + def inspect; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#67 + def map(*args, &block); end + + protected + + # source://i18n//lib/i18n/locale/fallbacks.rb#92 + def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/locale/tag.rb#5 +module I18n::Locale::Tag + class << self + # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+. + # + # source://i18n//lib/i18n/locale/tag.rb#12 + def implementation; end + + # Sets the current locale tag implementation. Use this to set a different locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#17 + def implementation=(implementation); end + + # Factory method for locale tags. Delegates to the current locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#22 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/parents.rb#4 +module I18n::Locale::Tag::Parents + # source://i18n//lib/i18n/locale/tag/parents.rb#5 + def parent; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#18 + def parents; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#14 + def self_and_parents; end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 +I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11 +I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14 +class I18n::Locale::Tag::Rfc4646 < ::Struct + include ::I18n::Locale::Tag::Parents + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def language; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def region; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def script; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 + def to_sym; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def variant; end + + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 + def parser; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 + def parser=(parser); end + + # Parses the given tag and returns a Tag instance if it is valid. + # Returns false if the given tag is not valid according to RFC 4646. + # + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 +module I18n::Locale::Tag::Rfc4646::Parser + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63 + def match(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 +I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/locale/tag/simple.rb#6 +class I18n::Locale::Tag::Simple + include ::I18n::Locale::Tag::Parents + + # @return [Simple] a new instance of Simple + # + # source://i18n//lib/i18n/locale/tag/simple.rb#17 + def initialize(*tag); end + + # source://i18n//lib/i18n/locale/tag/simple.rb#21 + def subtags; end + + # Returns the value of attribute tag. + # + # source://i18n//lib/i18n/locale/tag/simple.rb#15 + def tag; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#33 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#29 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#25 + def to_sym; end + + class << self + # source://i18n//lib/i18n/locale/tag/simple.rb#8 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/middleware.rb#4 +class I18n::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://i18n//lib/i18n/middleware.rb#6 + def initialize(app); end + + # source://i18n//lib/i18n/middleware.rb#10 + def call(env); end +end + +# source://i18n//lib/i18n/exceptions.rb#100 +class I18n::MissingInterpolationArgument < ::I18n::ArgumentError + # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument + # + # source://i18n//lib/i18n/exceptions.rb#102 + def initialize(key, values, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def string; end + + # Returns the value of attribute values. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def values; end +end + +# source://i18n//lib/i18n/exceptions.rb#48 +class I18n::MissingTranslation < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n/exceptions.rb#49 +module I18n::MissingTranslation::Base + # source://i18n//lib/i18n/exceptions.rb#54 + def initialize(locale, key, options = T.unsafe(nil)); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def key; end + + # source://i18n//lib/i18n/exceptions.rb#59 + def keys; end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def locale; end + + # source://i18n//lib/i18n/exceptions.rb#65 + def message; end + + # source://i18n//lib/i18n/exceptions.rb#74 + def normalized_option(key); end + + # Returns the value of attribute options. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def options; end + + # source://i18n//lib/i18n/exceptions.rb#80 + def to_exception; end + + # source://i18n//lib/i18n/exceptions.rb#65 + def to_s; end +end + +# source://i18n//lib/i18n/exceptions.rb#50 +I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#88 +class I18n::MissingTranslationData < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n.rb#19 +I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#108 +class I18n::ReservedInterpolationKey < ::I18n::ArgumentError + # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey + # + # source://i18n//lib/i18n/exceptions.rb#110 + def initialize(key, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#109 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#109 + def string; end +end + +# source://i18n//lib/i18n/tests.rb#4 +module I18n::Tests; end + +# source://i18n//lib/i18n/tests/localization.rb#3 +module I18n::Tests::Localization + class << self + # @private + # + # source://i18n//lib/i18n/tests/localization.rb#9 + def included(base); end + end +end + +# source://i18n//lib/i18n/exceptions.rb#116 +class I18n::UnknownFileType < ::I18n::ArgumentError + # @return [UnknownFileType] a new instance of UnknownFileType + # + # source://i18n//lib/i18n/exceptions.rb#118 + def initialize(type, filename); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#117 + def filename; end + + # Returns the value of attribute type. + # + # source://i18n//lib/i18n/exceptions.rb#117 + def type; end +end + +# source://i18n//lib/i18n/exceptions.rb#124 +class I18n::UnsupportedMethod < ::I18n::ArgumentError + # @return [UnsupportedMethod] a new instance of UnsupportedMethod + # + # source://i18n//lib/i18n/exceptions.rb#126 + def initialize(method, backend_klass, msg); end + + # Returns the value of attribute backend_klass. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def backend_klass; end + + # Returns the value of attribute method. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def method; end + + # Returns the value of attribute msg. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def msg; end +end + +# source://i18n//lib/i18n/utils.rb#4 +module I18n::Utils + class << self + # source://i18n//lib/i18n/utils.rb#18 + def deep_merge(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#22 + def deep_merge!(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#34 + def deep_symbolize_keys(hash); end + + # source://i18n//lib/i18n/utils.rb#7 + def except(hash, *keys); end + + private + + # source://i18n//lib/i18n/utils.rb#43 + def deep_symbolize_keys_in_object(value); end + end +end + +# source://i18n//lib/i18n/version.rb#4 +I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ice_nine@0.11.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ice_nine@0.11.2.rbi new file mode 100644 index 0000000..26e6d52 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ice_nine@0.11.2.rbi @@ -0,0 +1,334 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ice_nine` gem. +# Please instead update this file by running `bin/tapioca gem ice_nine`. + + +# Base IceNine module +# +# source://ice_nine//lib/ice_nine/support/recursion_guard.rb#3 +module IceNine + class << self + # Deep Freeze an object + # + # @api public + # @example + # object = IceNine.deep_freeze(object) + # @param object [Object] + # @return [Object] + # + # source://ice_nine//lib/ice_nine.rb#37 + def deep_freeze(object); end + + # Deep Freeze an object + # + # This method uses a faster algorithm that will assume objects that are + # `frozen?` do not need to be frozen deeply. Use this method when `object` + # contains no shallowly frozen objects that need deep freezing. + # + # @api public + # @example + # IceNine.deep_freeze!(['a', 'b']).map(&:frozen?) # [true, true] + # @example + # IceNine.deep_freeze!(['a', 'b'].freeze).map(&:frozen?) # [false, false] + # @param object [Object] + # @return [Object] + # + # source://ice_nine//lib/ice_nine.rb#58 + def deep_freeze!(object); end + end +end + +# The default class that handles freezing objects +# +# source://ice_nine//lib/ice_nine/freezer.rb#6 +class IceNine::Freezer + class << self + # Look up the Freezer descendant by object type + # + # @api public + # @example + # freezer_class = IceNine::Freezer[mod] + # @param mod [Module] + # @return [Class] + # + # source://ice_nine//lib/ice_nine/freezer.rb#27 + def [](mod); end + + # Deep freeze an object with a particular Freezer + # + # @api public + # @param object [Object] + # @return [Object] + # @see IceNine.deep_freeze + # + # source://ice_nine//lib/ice_nine/freezer.rb#40 + def deep_freeze(object); end + + # Deep freeze an object with a particular Freezer + # + # @api public + # @param object [Object] + # @return [Object] + # @see IceNine.deep_freeze! + # + # source://ice_nine//lib/ice_nine/freezer.rb#53 + def deep_freeze!(object); end + + protected + + # Look up a constant in the namespace + # + # @api private + # @param namespace [String] + # @return [Module] returned if a matching constant is found + # @return [nil] returned if no matching constant is found + # + # source://ice_nine//lib/ice_nine/freezer.rb#86 + def const_lookup(namespace); end + + # Deep freeze an object with a particular Freezer and RecursionGuard + # + # @api private + # @param object [Object] + # @param recursion_guard [RecursionGuard] + # @return [Object] + # + # source://ice_nine//lib/ice_nine/freezer.rb#98 + def guarded_deep_freeze(object, recursion_guard); end + + private + + # Find a Freezer descendant by name + # + # @api private + # @param name [String] + # @return [Class] returned if a matching freezer is found + # @return [nil] returned if no matching freezer is found + # + # source://ice_nine//lib/ice_nine/freezer.rb#67 + def find(name); end + end +end + +# A freezer class for handling Array objects +# +# source://ice_nine//lib/ice_nine/freezer/array.rb#7 +class IceNine::Freezer::Array < ::IceNine::Freezer::Object + class << self + # Deep Freeze an Array + # + # @example + # array = IceNine:Freezer::Array.deep_freeze(%w[a b c]) + # array.select(&:frozen?) # => ['a', 'b', 'c'] + # @param array [Array] + # @param recursion_guard [RecursionGuard] + # @return [Array] + # + # source://ice_nine//lib/ice_nine/freezer/array.rb#19 + def guarded_deep_freeze(array, recursion_guard); end + end +end + +# Object +# +# source://ice_nine//lib/ice_nine/freezer/object.rb#47 +IceNine::Freezer::BasicObject = IceNine::Freezer::Object + +# Skip freezing false objects +# +# source://ice_nine//lib/ice_nine/freezer/false_class.rb#7 +class IceNine::Freezer::FalseClass < ::IceNine::Freezer::NoFreeze; end + +# A freezer class for handling Hash objects +# +# source://ice_nine//lib/ice_nine/freezer/hash.rb#7 +class IceNine::Freezer::Hash < ::IceNine::Freezer::Object + class << self + # Deep Freeze a Hash + # + # @example + # hash = IceNine::Freezer::Hash.deep_freeze('a' => '1', 'b' => '2') + # hash.keys.select(&:frozen?) # => ['a', 'b'] + # hash.values.select(&:frozen?) # => ['1', '2'] + # @param hash [Hash] + # @param recursion_guard [RecursionGuard] + # @return [Hash] + # + # source://ice_nine//lib/ice_nine/freezer/hash.rb#20 + def guarded_deep_freeze(hash, recursion_guard); end + + private + + # Handle freezing the key/value pairs + # + # @api private + # @param hash [Hash] + # @param recursion_guard [RecursionGuard] + # @return [undefined] + # + # source://ice_nine//lib/ice_nine/freezer/hash.rb#35 + def freeze_key_value_pairs(hash, recursion_guard); end + end +end + +# Skip freezing Hash::State objects on Rubinius +# +# source://ice_nine//lib/ice_nine/freezer/hash/state.rb#8 +class IceNine::Freezer::Hash::State < ::IceNine::Freezer::NoFreeze; end + +# Skip freezing Module objects +# +# source://ice_nine//lib/ice_nine/freezer/module.rb#7 +class IceNine::Freezer::Module < ::IceNine::Freezer::NoFreeze; end + +# Skip freezing nil objects +# +# source://ice_nine//lib/ice_nine/freezer/nil_class.rb#7 +class IceNine::Freezer::NilClass < ::IceNine::Freezer::NoFreeze; end + +# A freezer class that does not freeze anything +# +# source://ice_nine//lib/ice_nine/freezer/no_freeze.rb#7 +class IceNine::Freezer::NoFreeze < ::IceNine::Freezer + class << self + # Pass through the object without freezing it + # + # @example + # object = IceNine::Freezer::NoFreeze.deep_freeze(object) + # object.frozen? # => false + # @param object [Object] + # @param _recursion_guard [RecursionGuard] + # @return [Object] + # + # source://ice_nine//lib/ice_nine/freezer/no_freeze.rb#19 + def guarded_deep_freeze(object, _recursion_guard); end + end +end + +# Skip freezing Numeric objects +# +# source://ice_nine//lib/ice_nine/freezer/numeric.rb#7 +class IceNine::Freezer::Numeric < ::IceNine::Freezer::NoFreeze; end + +# A freezer class for handling Object instances +# +# source://ice_nine//lib/ice_nine/freezer/object.rb#7 +class IceNine::Freezer::Object < ::IceNine::Freezer + class << self + # Deep Freeze an object + # + # @example + # object = IceNine.deep_freeze(Object.new) + # @param object [Object] + # @param recursion_guard [RecursionGuard] + # @return [Object] + # + # source://ice_nine//lib/ice_nine/freezer/object.rb#18 + def guarded_deep_freeze(object, recursion_guard); end + + private + + # Handle freezing the object's instance variables + # + # @api private + # @param object [Object] + # @param recursion_guard [RecursionGuard] + # @return [undefined] + # + # source://ice_nine//lib/ice_nine/freezer/object.rb#34 + def freeze_instance_variables(object, recursion_guard); end + end +end + +# A freezer class for handling Range objects +# +# source://ice_nine//lib/ice_nine/freezer/range.rb#7 +class IceNine::Freezer::Range < ::IceNine::Freezer::Object + class << self + # Deep Freeze a Range + # + # @example + # range = IceNine:Freezer::Range.deep_freeze('a'..'z') + # range.begin.frozen? # => true + # range.end.frozen? # => true + # @param range [Range] + # @param recursion_guard [RecursionGuard] + # @return [Range] + # + # source://ice_nine//lib/ice_nine/freezer/range.rb#20 + def guarded_deep_freeze(range, recursion_guard); end + end +end + +# Skip freezing Rubinius objects +# +# source://ice_nine//lib/ice_nine/freezer/rubinius.rb#7 +class IceNine::Freezer::Rubinius < ::IceNine::Freezer::NoFreeze; end + +# A freezer class for handling Struct objects +# +# source://ice_nine//lib/ice_nine/freezer/struct.rb#7 +class IceNine::Freezer::Struct < ::IceNine::Freezer::Array; end + +# Skip freezing Symbol objects +# +# source://ice_nine//lib/ice_nine/freezer/symbol.rb#7 +class IceNine::Freezer::Symbol < ::IceNine::Freezer::NoFreeze; end + +# Skip freezing true objects +# +# source://ice_nine//lib/ice_nine/freezer/true_class.rb#7 +class IceNine::Freezer::TrueClass < ::IceNine::Freezer::NoFreeze; end + +# Protect against infinite recursion +# +# @private +# +# source://ice_nine//lib/ice_nine/support/recursion_guard.rb#8 +class IceNine::RecursionGuard; end + +# Protects against infinite recursion by not yielding with frozen objects +# +# source://ice_nine//lib/ice_nine/support/recursion_guard.rb#42 +class IceNine::RecursionGuard::Frozen < ::IceNine::RecursionGuard + # Guard against recursively calling a block with the same frozen object + # + # @param object [Object] + # @return [Object] + # + # source://ice_nine//lib/ice_nine/support/recursion_guard.rb#49 + def guard(object); end +end + +# Protects against infinite recursion by never yielding with the same +# object more than once. +# +# source://ice_nine//lib/ice_nine/support/recursion_guard.rb#12 +class IceNine::RecursionGuard::ObjectSet < ::IceNine::RecursionGuard + # Initialize a recursion guard + # + # @return [undefined] + # + # source://ice_nine//lib/ice_nine/support/recursion_guard.rb#17 + def initialize; end + + # Guard against recursively calling a block with the same object + # + # @example + # recursion_guard = IceNine::RecursionGuard::ObjectSet.new + # recursion_guard.guard(object) do + # logic_which_may_be_recursively_called_with_object(recursion_guard) + # end + # @param object [Object] + # @return [Object] + # + # source://ice_nine//lib/ice_nine/support/recursion_guard.rb#32 + def guard(object); end +end + +# Gem version +# +# source://ice_nine//lib/ice_nine/version.rb#6 +IceNine::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/infra@1.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/infra@1.0.0.rbi new file mode 100644 index 0000000..d7c695e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/infra@1.0.0.rbi @@ -0,0 +1,192 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `infra` gem. +# Please instead update this file by running `bin/tapioca gem infra`. + + +# source://infra//lib/infra/command.rb#1 +module Infra; end + +# source://infra//lib/infra/aggregate_root_repository.rb#5 +class Infra::AggregateRootRepository + # @return [AggregateRootRepository] a new instance of AggregateRootRepository + # + # source://infra//lib/infra/aggregate_root_repository.rb#6 + def initialize(event_store, notifications = T.unsafe(nil)); end + + # source://infra//lib/infra/aggregate_root_repository.rb#22 + def stream_name(aggregate_class, aggregate_id); end + + # source://infra//lib/infra/aggregate_root_repository.rb#14 + def with_aggregate(aggregate_class, aggregate_id, &block); end +end + +# source://infra//lib/infra/command.rb#2 +class Infra::Command < ::Dry::Struct + extend ::Dry::Core::DescendantsTracker + + class << self + # source://infra//lib/infra/command.rb#5 + def new(*_arg0); end + end +end + +# source://infra//lib/infra/command.rb#3 +class Infra::Command::Invalid < ::StandardError; end + +# source://infra//lib/infra/command_bus.rb#2 +Infra::CommandBus = Arkency::CommandBus + +# source://infra//lib/infra/event.rb#4 +class Infra::Event < ::RubyEventStore::Event + include ::Infra::Event::WithSchema + include ::Infra::Event::WithSchema::Constructor + extend ::Infra::Event::WithSchema::ClassMethods +end + +# source://infra//lib/infra/event.rb#5 +module Infra::Event::WithSchema + include ::Infra::Event::WithSchema::Constructor + + mixes_in_class_methods ::Infra::Event::WithSchema::ClassMethods + + class << self + # @private + # + # source://infra//lib/infra/event.rb#25 + def included(klass); end + end +end + +# source://infra//lib/infra/event.rb#10 +module Infra::Event::WithSchema::ClassMethods + extend ::Forwardable + + # source://forwardable/1.3.3/forwardable.rb#231 + def attribute(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def attribute?(*args, **_arg1, &block); end + + # source://infra//lib/infra/event.rb#14 + def schema; end +end + +# source://infra//lib/infra/event.rb#19 +module Infra::Event::WithSchema::Constructor + # source://infra//lib/infra/event.rb#20 + def initialize(event_id: T.unsafe(nil), metadata: T.unsafe(nil), data: T.unsafe(nil)); end +end + +# source://infra//lib/infra/event.rb#6 +class Infra::Event::WithSchema::Schema < ::Dry::Struct + extend ::Dry::Core::DescendantsTracker +end + +# source://infra//lib/infra/event_store.rb#2 +class Infra::EventStore < ::SimpleDelegator + # source://infra//lib/infra/event_store.rb#27 + def link_event_to_stream(event, stream, expected_version: T.unsafe(nil)); end + + # source://infra//lib/infra/event_store.rb#23 + def subscribe(subscriber, to:); end + + class << self + # source://infra//lib/infra/event_store.rb#7 + def in_memory; end + + # source://infra//lib/infra/event_store.rb#15 + def in_memory_rails; end + + # source://infra//lib/infra/event_store.rb#3 + def main; end + end +end + +# source://infra//lib/infra/testing.rb#64 +class Infra::InMemoryTest < ::Minitest::Test + include ::Infra::TestPlumbing + include ::Infra::TestPlumbing::TestMethods +end + +# source://infra//lib/infra/process.rb#2 +class Infra::Process + # @return [Process] a new instance of Process + # + # source://infra//lib/infra/process.rb#3 + def initialize(event_store, command_bus); end + + # source://infra//lib/infra/process.rb#8 + def call(event_name, event_data_keys, command, command_data_keys); end +end + +# source://infra//lib/infra/testing.rb#2 +module Infra::TestPlumbing + class << self + # @private + # + # source://infra//lib/infra/testing.rb#15 + def included(klass); end + + # source://infra//lib/infra/testing.rb#3 + def with(event_store:, command_bus:); end + end +end + +# source://infra//lib/infra/testing.rb#22 +module Infra::TestPlumbing::TestMethods + # source://infra//lib/infra/testing.rb#29 + def act(command); end + + # source://infra//lib/infra/testing.rb#25 + def arrange(*commands); end + + # source://infra//lib/infra/testing.rb#57 + def assert_changes(actuals, expected); end + + # source://infra//lib/infra/testing.rb#34 + def assert_events(stream_name, *expected_events); end + + # source://infra//lib/infra/testing.rb#45 + def assert_events_contain(stream_name, *expected_events); end + + # Returns the value of attribute command_bus. + # + # source://infra//lib/infra/testing.rb#23 + def command_bus; end + + # Returns the value of attribute event_store. + # + # source://infra//lib/infra/testing.rb#23 + def event_store; end + + # source://infra//lib/infra/testing.rb#29 + def run_command(command); end +end + +# source://infra//lib/infra/types.rb#2 +module Infra::Types + extend ::Dry::Types::BuilderMethods + extend ::Dry::Core::Deprecations::Interface + + mixes_in_class_methods ::Dry::Types::BuilderMethods +end + +# source://infra//lib/infra/types.rb#8 +Infra::Types::ID = T.let(T.unsafe(nil), Dry::Types::Constrained) + +# source://infra//lib/infra/types.rb#9 +Infra::Types::Metadata = T.let(T.unsafe(nil), Dry::Types::Constrained) + +# source://infra//lib/infra/types.rb#14 +Infra::Types::Price = T.let(T.unsafe(nil), Dry::Types::Constrained::Coercible) + +# source://infra//lib/infra/types.rb#13 +Infra::Types::Quantity = T.let(T.unsafe(nil), Dry::Types::Constrained) + +# source://infra//lib/infra/types.rb#4 +Infra::Types::UUID = T.let(T.unsafe(nil), Dry::Types::Constrained) + +# source://infra//lib/infra/types.rb#15 +Infra::Types::Value = T.let(T.unsafe(nil), Dry::Types::Constructor) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/io-console@0.7.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/io-console@0.7.2.rbi new file mode 100644 index 0000000..73616ab --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/io-console@0.7.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/json@2.7.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/json@2.7.2.rbi new file mode 100644 index 0000000..ce4a9b2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/json@2.7.2.rbi @@ -0,0 +1,1553 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + + +# Extends any Class to include _json_creatable?_ method. +# +# source://json//lib/json/common.rb#690 +class Class < ::Module + # Returns true if this class can be used to create an instance + # from a serialised JSON string. The class has to implement a class + # method _json_create_ that expects a hash as first parameter. The hash + # should include the required data. + # + # @return [Boolean] + # + # source://json//lib/json/common.rb#695 + def json_creatable?; end +end + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# A \JSON value is one of the following: +# - Double-quoted text: "foo". +# - Number: +1+, +1.0+, +2.0e2+. +# - Boolean: +true+, +false+. +# - Null: +null+. +# - \Array: an ordered list of values, enclosed by square brackets: +# ["foo", 1, 1.0, 2.0e2, true, false, null] +# +# - \Object: a collection of name/value pairs, enclosed by curly braces; +# each name is double-quoted text; +# the values may be any \JSON values: +# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} +# +# A \JSON array or object may contain nested arrays, objects, and scalars +# to any depth: +# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} +# [{"foo": 0, "bar": 1}, ["baz", 2]] +# +# == Using \Module \JSON +# +# To make module \JSON available in your code, begin with: +# require 'json' +# +# All examples here assume that this has been done. +# +# === Parsing \JSON +# +# You can parse a \String containing \JSON data using +# either of two methods: +# - JSON.parse(source, opts) +# - JSON.parse!(source, opts) +# +# where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# The difference between the two methods +# is that JSON.parse! omits some checks +# and may not be safe for some +source+ data; +# use it only for data from trusted sources. +# Use the safer method JSON.parse for less trusted sources. +# +# ==== Parsing \JSON Arrays +# +# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: +# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' +# ruby = JSON.parse(json) +# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] +# ruby.class # => Array +# +# The \JSON array may contain nested arrays, objects, and scalars +# to any depth: +# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' +# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] +# +# ==== Parsing \JSON \Objects +# +# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: +# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' +# ruby = JSON.parse(json) +# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} +# ruby.class # => Hash +# +# The \JSON object may contain nested arrays, objects, and scalars +# to any depth: +# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' +# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} +# +# ==== Parsing \JSON Scalars +# +# When the source is a \JSON scalar (not an array or object), +# JSON.parse returns a Ruby scalar. +# +# \String: +# ruby = JSON.parse('"foo"') +# ruby # => 'foo' +# ruby.class # => String +# \Integer: +# ruby = JSON.parse('1') +# ruby # => 1 +# ruby.class # => Integer +# \Float: +# ruby = JSON.parse('1.0') +# ruby # => 1.0 +# ruby.class # => Float +# ruby = JSON.parse('2.0e2') +# ruby # => 200 +# ruby.class # => Float +# Boolean: +# ruby = JSON.parse('true') +# ruby # => true +# ruby.class # => TrueClass +# ruby = JSON.parse('false') +# ruby # => false +# ruby.class # => FalseClass +# Null: +# ruby = JSON.parse('null') +# ruby # => nil +# ruby.class # => NilClass +# +# ==== Parsing Options +# +# ====== Input Options +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; +# defaults to +100+; specify +false+ to disable depth checking. +# +# With the default, +false+: +# source = '[0, [1, [2, [3]]]]' +# ruby = JSON.parse(source) +# ruby # => [0, [1, [2, [3]]]] +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.parse(source, {max_nesting: 1}) +# Bad value: +# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): +# JSON.parse(source, {max_nesting: :foo}) +# +# --- +# +# Option +allow_nan+ (boolean) specifies whether to allow +# NaN, Infinity, and MinusInfinity in +source+; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): +# JSON.parse('[NaN]') +# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): +# JSON.parse('[Infinity]') +# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): +# JSON.parse('[-Infinity]') +# Allow: +# source = '[NaN, Infinity, -Infinity]' +# ruby = JSON.parse(source, {allow_nan: true}) +# ruby # => [NaN, Infinity, -Infinity] +# +# ====== Output Options +# +# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys +# should be Symbols; +# defaults to +false+ (use Strings). +# +# With the default, +false+: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} +# Use Symbols: +# ruby = JSON.parse(source, {symbolize_names: true}) +# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} +# +# --- +# +# Option +object_class+ (\Class) specifies the Ruby class to be used +# for each \JSON object; +# defaults to \Hash. +# +# With the default, \Hash: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby.class # => Hash +# Use class \OpenStruct: +# ruby = JSON.parse(source, {object_class: OpenStruct}) +# ruby # => # +# +# --- +# +# Option +array_class+ (\Class) specifies the Ruby class to be used +# for each \JSON array; +# defaults to \Array. +# +# With the default, \Array: +# source = '["foo", 1.0, true, false, null]' +# ruby = JSON.parse(source) +# ruby.class # => Array +# Use class \Set: +# ruby = JSON.parse(source, {array_class: Set}) +# ruby # => # +# +# --- +# +# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. +# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. +# +# === Generating \JSON +# +# To generate a Ruby \String containing \JSON data, +# use method JSON.generate(source, opts), where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# ==== Generating \JSON from Arrays +# +# When the source is a Ruby \Array, JSON.generate returns +# a \String containing a \JSON array: +# ruby = [0, 's', :foo] +# json = JSON.generate(ruby) +# json # => '[0,"s","foo"]' +# +# The Ruby \Array array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = [0, [1, 2], {foo: 3, bar: 4}] +# json = JSON.generate(ruby) +# json # => '[0,[1,2],{"foo":3,"bar":4}]' +# +# ==== Generating \JSON from Hashes +# +# When the source is a Ruby \Hash, JSON.generate returns +# a \String containing a \JSON object: +# ruby = {foo: 0, bar: 's', baz: :bat} +# json = JSON.generate(ruby) +# json # => '{"foo":0,"bar":"s","baz":"bat"}' +# +# The Ruby \Hash array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} +# json = JSON.generate(ruby) +# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' +# +# ==== Generating \JSON from Other Objects +# +# When the source is neither an \Array nor a \Hash, +# the generated \JSON data depends on the class of the source. +# +# When the source is a Ruby \Integer or \Float, JSON.generate returns +# a \String containing a \JSON number: +# JSON.generate(42) # => '42' +# JSON.generate(0.42) # => '0.42' +# +# When the source is a Ruby \String, JSON.generate returns +# a \String containing a \JSON string (with double-quotes): +# JSON.generate('A string') # => '"A string"' +# +# When the source is +true+, +false+ or +nil+, JSON.generate returns +# a \String containing the corresponding \JSON token: +# JSON.generate(true) # => 'true' +# JSON.generate(false) # => 'false' +# JSON.generate(nil) # => 'null' +# +# When the source is none of the above, JSON.generate returns +# a \String containing a \JSON string representation of the source: +# JSON.generate(:foo) # => '"foo"' +# JSON.generate(Complex(0, 0)) # => '"0+0i"' +# JSON.generate(Dir.new('.')) # => '"#"' +# +# ==== Generating Options +# +# ====== Input Options +# +# Option +allow_nan+ (boolean) specifies whether +# +NaN+, +Infinity+, and -Infinity may be generated; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): +# JSON.generate(JSON::NaN) +# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): +# JSON.generate(JSON::Infinity) +# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): +# JSON.generate(JSON::MinusInfinity) +# +# Allow: +# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Escaping Options +# +# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029' +# and '/' should be escaped as to make the JSON object safe to interpolate in script +# tags. +# +# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range +# should be escaped. +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# When you "round trip" a non-\String object from Ruby to \JSON and back, +# you have a new \String, instead of the object you began with: +# ruby0 = Range.new(0, 2) +# json = JSON.generate(ruby0) +# json # => '0..2"' +# ruby1 = JSON.parse(json) +# ruby1 # => '0..2' +# ruby1.class # => String +# +# You can use \JSON _additions_ to preserve the original object. +# The addition is an extension of a ruby class, so that: +# - \JSON.generate stores more information in the \JSON string. +# - \JSON.parse, called with option +create_additions+, +# uses that information to create a proper Ruby object. +# +# This example shows a \Range being generated into \JSON +# and parsed back into Ruby, both without and with +# the addition for \Range: +# ruby = Range.new(0, 2) +# # This passage does not use the addition for Range. +# json0 = JSON.generate(ruby) +# ruby0 = JSON.parse(json0) +# # This passage uses the addition for Range. +# require 'json/add/range' +# json1 = JSON.generate(ruby) +# ruby1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <require 'json/add/bigdecimal' +# - Complex: require 'json/add/complex' +# - Date: require 'json/add/date' +# - DateTime: require 'json/add/date_time' +# - Exception: require 'json/add/exception' +# - OpenStruct: require 'json/add/ostruct' +# - Range: require 'json/add/range' +# - Rational: require 'json/add/rational' +# - Regexp: require 'json/add/regexp' +# - Set: require 'json/add/set' +# - Struct: require 'json/add/struct' +# - Symbol: require 'json/add/symbol' +# - Time: require 'json/add/time' +# +# To reduce punctuation clutter, the examples below +# show the generated \JSON via +puts+, rather than the usual +inspect+, +# +# \BigDecimal: +# require 'json/add/bigdecimal' +# ruby0 = BigDecimal(0) # 0.0 +# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} +# ruby1 = JSON.parse(json, create_additions: true) # 0.0 +# ruby1.class # => BigDecimal +# +# \Complex: +# require 'json/add/complex' +# ruby0 = Complex(1+0i) # 1+0i +# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} +# ruby1 = JSON.parse(json, create_additions: true) # 1+0i +# ruby1.class # Complex +# +# \Date: +# require 'json/add/date' +# ruby0 = Date.today # 2020-05-02 +# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 +# ruby1.class # Date +# +# \DateTime: +# require 'json/add/date_time' +# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 +# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 +# ruby1.class # DateTime +# +# \Exception (and its subclasses including \RuntimeError): +# require 'json/add/exception' +# ruby0 = Exception.new('A message') # A message +# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # A message +# ruby1.class # Exception +# ruby0 = RuntimeError.new('Another message') # Another message +# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # Another message +# ruby1.class # RuntimeError +# +# \OpenStruct: +# require 'json/add/ostruct' +# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # +# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # OpenStruct +# +# \Range: +# require 'json/add/range' +# ruby0 = Range.new(0, 2) # 0..2 +# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} +# ruby1 = JSON.parse(json, create_additions: true) # 0..2 +# ruby1.class # Range +# +# \Rational: +# require 'json/add/rational' +# ruby0 = Rational(1, 3) # 1/3 +# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} +# ruby1 = JSON.parse(json, create_additions: true) # 1/3 +# ruby1.class # Rational +# +# \Regexp: +# require 'json/add/regexp' +# ruby0 = Regexp.new('foo') # (?-mix:foo) +# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) +# ruby1.class # Regexp +# +# \Set: +# require 'json/add/set' +# ruby0 = Set.new([0, 1, 2]) # # +# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Set +# +# \Struct: +# require 'json/add/struct' +# Customer = Struct.new(:name, :address) # Customer +# ruby0 = Customer.new("Dave", "123 Main") # # +# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Customer +# +# \Symbol: +# require 'json/add/symbol' +# ruby0 = :foo # foo +# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # foo +# ruby1.class # Symbol +# +# \Time: +# require 'json/add/time' +# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 +# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 +# ruby1.class # Time +# +# +# === Custom \JSON Additions +# +# In addition to the \JSON additions provided, +# you can craft \JSON additions of your own, +# either for Ruby built-in classes or for user-defined classes. +# +# Here's a user-defined class +Foo+: +# class Foo +# attr_accessor :bar, :baz +# def initialize(bar, baz) +# self.bar = bar +# self.baz = baz +# end +# end +# +# Here's the \JSON addition for it: +# # Extend class Foo with JSON addition. +# class Foo +# # Serialize Foo object with its class name and arguments +# def to_json(*args) +# { +# JSON.create_id => self.class.name, +# 'a' => [ bar, baz ] +# }.to_json(*args) +# end +# # Deserialize JSON string by constructing new Foo object with arguments. +# def self.json_create(object) +# new(*object['a']) +# end +# end +# +# Demonstration: +# require 'json' +# # This Foo object has no custom addition. +# foo0 = Foo.new(0, 1) +# json0 = JSON.generate(foo0) +# obj0 = JSON.parse(json0) +# # Lood the custom addition. +# require_relative 'foo_addition' +# # This foo has the custom addition. +# foo1 = Foo.new(0, 1) +# json1 = JSON.generate(foo1) +# obj1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +# +# source://json//lib/json/version.rb#2 +module JSON + extend ::Bootsnap::CompileCache::JSON::Patch + + private + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#615 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#329 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#329 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#300 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#541 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//lib/json/common.rb#249 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#260 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # source://json//lib/json/common.rb#643 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#219 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#234 + def parse!(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#374 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#374 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#559 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#541 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#300 + def unparse(obj, opts = T.unsafe(nil)); end + + class << self + # :call-seq: + # JSON[object] -> new_array or new_string + # + # If +object+ is a \String, + # calls JSON.parse with +object+ and +opts+ (see method #parse): + # json = '[0, 1, null]' + # JSON[json]# => [0, 1, nil] + # + # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): + # ruby = [0, 1, nil] + # JSON[ruby] # => '[0,1,null]' + # + # source://json//lib/json/common.rb#22 + def [](object, opts = T.unsafe(nil)); end + + # source://json//lib/json/common.rb#85 + def create_fast_state; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # source://json//lib/json/common.rb#130 + def create_id; end + + # Sets create identifier, which is used to decide if the _json_create_ + # hook of a class should be called; initial value is +json_class+: + # JSON.create_id # => 'json_class' + # + # source://json//lib/json/common.rb#124 + def create_id=(new_value); end + + # source://json//lib/json/common.rb#95 + def create_pretty_state; end + + # Return the constant located at _path_. The format of _path_ has to be + # either ::A::B::C or A::B::C. In any case, A has to be located at the top + # level (absolute namespace path?). If there doesn't exist a constant at + # the given path, an ArgumentError is raised. + # + # source://json//lib/json/common.rb#46 + def deep_const_get(path); end + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#615 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # + # source://json//lib/json/common.rb#580 + def dump_default_options; end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # + # source://json//lib/json/common.rb#580 + def dump_default_options=(_arg0); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#329 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#329 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#300 + def generate(obj, opts = T.unsafe(nil)); end + + # Returns the JSON generator module that is used by JSON. This is + # either JSON::Ext::Generator or JSON::Pure::Generator: + # JSON.generator # => JSON::Ext::Generator + # + # source://json//lib/json/common.rb#107 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # source://json//lib/json/common.rb#62 + def generator=(generator); end + + # Encodes string using String.encode. + # + # source://json//lib/json/common.rb#639 + def iconv(to, from, string); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#541 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#404 + def load_default_options; end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#404 + def load_default_options=(_arg0); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#260 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#219 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#234 + def parse!(source, opts = T.unsafe(nil)); end + + # Returns the JSON parser class that is used by JSON. This is either + # JSON::Ext::Parser or JSON::Pure::Parser: + # JSON.parser # => JSON::Ext::Parser + # + # source://json//lib/json/common.rb#33 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # source://json//lib/json/common.rb#36 + def parser=(parser); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#374 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#374 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#559 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#541 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//lib/json/common.rb#112 + def state; end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//lib/json/common.rb#112 + def state=(_arg0); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#300 + def unparse(obj, opts = T.unsafe(nil)); end + + private + + # source://json//lib/json/common.rb#643 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + end +end + +# source://json//lib/json/common.rb#118 +JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) + +# source://json//lib/json/common.rb#115 +JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + +# source://json//lib/json/generic_object.rb#9 +class JSON::GenericObject < ::OpenStruct + # source://json//lib/json/generic_object.rb#67 + def as_json(*_arg0); end + + # source://json//lib/json/generic_object.rb#51 + def to_hash; end + + # source://json//lib/json/generic_object.rb#71 + def to_json(*a); end + + # source://json//lib/json/generic_object.rb#63 + def |(other); end + + class << self + # source://json//lib/json/generic_object.rb#45 + def dump(obj, *args); end + + # source://json//lib/json/generic_object.rb#25 + def from_hash(object); end + + # Sets the attribute json_creatable + # + # @param value the value to set the attribute json_creatable to. + # + # source://json//lib/json/generic_object.rb#17 + def json_creatable=(_arg0); end + + # @return [Boolean] + # + # source://json//lib/json/generic_object.rb#13 + def json_creatable?; end + + # source://json//lib/json/generic_object.rb#19 + def json_create(data); end + + # source://json//lib/json/generic_object.rb#40 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# The base exception for JSON errors. +# +# source://json//lib/json/common.rb#141 +class JSON::JSONError < ::StandardError + class << self + # source://json//lib/json/common.rb#142 + def wrap(exception); end + end +end + +# source://json//lib/json/common.rb#7 +JSON::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://json//lib/json/common.rb#39 +JSON::Parser = JSON::Ext::Parser + +# source://json//lib/json/common.rb#77 +JSON::State = JSON::Ext::Generator::State + +# For backwards compatibility +# +# source://json//lib/json/common.rb#163 +JSON::UnparserError = JSON::GeneratorError + +# source://json//lib/json/common.rb#653 +module Kernel + private + + # If _object_ is string-like, parse the string and return the parsed result as + # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively. See + # generate and parse for their documentation. + # + # source://json//lib/json/common.rb#680 + def JSON(object, *args); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # source://json//lib/json/common.rb#658 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # source://json//lib/json/common.rb#667 + def jj(*objs); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/kamal@2.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/kamal@2.0.0.rbi new file mode 100644 index 0000000..7086931 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/kamal@2.0.0.rbi @@ -0,0 +1,3766 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kamal` gem. +# Please instead update this file by running `bin/tapioca gem kamal`. + + +# SSHKit uses instance eval, so we need a global const for ergonomics +# +# source://kamal//lib/kamal/cli.rb#8 +KAMAL = T.let(T.unsafe(nil), Kamal::Commander) + +# source://kamal//lib/kamal.rb#1 +module Kamal; end + +# source://kamal//lib/kamal/cli.rb#1 +module Kamal::Cli; end + +# source://kamal//lib/kamal/cli/accessory.rb#1 +class Kamal::Cli::Accessory < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/accessory.rb#3 + def boot(name, prepare: T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/accessory.rb#102 + def details(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#43 + def directories(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#116 + def exec(name, cmd); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/accessory.rb#151 + def logs(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#56 + def reboot(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#176 + def remove(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#189 + def remove_container(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#201 + def remove_image(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#213 + def remove_service_directory(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#94 + def restart(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#70 + def start(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#82 + def stop(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#226 + def upgrade(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#26 + def upload(name); end + + private + + # source://kamal//lib/kamal/cli/accessory.rb#260 + def accessory_hosts(accessory); end + + # source://kamal//lib/kamal/cli/accessory.rb#252 + def error_on_missing_accessory(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#275 + def prepare(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#268 + def remove_accessory(name); end + + # source://kamal//lib/kamal/cli/accessory.rb#243 + def with_accessory(name); end +end + +# source://kamal//lib/kamal.rb#0 +module Kamal::Cli::Alias; end + +# source://kamal//lib/kamal/cli/alias/command.rb#1 +class Kamal::Cli::Alias::Command < ::Thor::DynamicCommand + # source://kamal//lib/kamal/cli/alias/command.rb#2 + def run(instance, args = T.unsafe(nil)); end +end + +# source://kamal//lib/kamal/cli/app.rb#1 +class Kamal::Cli::App < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/app.rb#3 + def boot; end + + # source://kamal//lib/kamal/cli/app.rb#149 + def containers; end + + # source://kamal//lib/kamal/cli/app.rb#83 + def details; end + + # source://kamal//lib/kamal/cli/app.rb#97 + def exec(*cmd); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/app.rb#181 + def images; end + + # source://kamal//lib/kamal/cli/app.rb#192 + def logs; end + + # source://kamal//lib/kamal/cli/app.rb#231 + def remove; end + + # source://kamal//lib/kamal/cli/app.rb#279 + def remove_app_directory; end + + # source://kamal//lib/kamal/cli/app.rb#241 + def remove_container(version); end + + # source://kamal//lib/kamal/cli/app.rb#255 + def remove_containers; end + + # source://kamal//lib/kamal/cli/app.rb#269 + def remove_images; end + + # source://kamal//lib/kamal/cli/app.rb#155 + def stale_containers; end + + # source://kamal//lib/kamal/cli/app.rb#35 + def start; end + + # source://kamal//lib/kamal/cli/app.rb#58 + def stop; end + + # source://kamal//lib/kamal/cli/app.rb#293 + def version; end + + private + + # source://kamal//lib/kamal/cli/app.rb#315 + def current_running_version(host: T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/app.rb#301 + def using_version(new_version); end + + # source://kamal//lib/kamal/cli/app.rb#324 + def version_or_latest; end + + # source://kamal//lib/kamal/cli/app.rb#328 + def with_lock_if_stopping; end +end + +# source://kamal//lib/kamal/cli/app/boot.rb#1 +class Kamal::Cli::App::Boot + # @return [Boot] a new instance of Boot + # + # source://kamal//lib/kamal/cli/app/boot.rb#6 + def initialize(host, role, sshkit, version, barrier); end + + # source://kamal//lib/kamal/cli/app/boot.rb#4 + def assets?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute barrier. + # + # source://kamal//lib/kamal/cli/app/boot.rb#2 + def barrier; end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def capture_with_info(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def capture_with_pretty_json(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def error(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def execute(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute host. + # + # source://kamal//lib/kamal/cli/app/boot.rb#2 + def host; end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def info(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute role. + # + # source://kamal//lib/kamal/cli/app/boot.rb#2 + def role; end + + # source://kamal//lib/kamal/cli/app/boot.rb#14 + def run; end + + # source://kamal//lib/kamal/cli/app/boot.rb#4 + def running_proxy?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute sshkit. + # + # source://kamal//lib/kamal/cli/app/boot.rb#2 + def sshkit; end + + # source://kamal//lib/kamal/cli/app/boot.rb#3 + def upload!(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute version. + # + # source://kamal//lib/kamal/cli/app/boot.rb#2 + def version; end + + private + + # source://kamal//lib/kamal/cli/app/boot.rb#106 + def app; end + + # source://kamal//lib/kamal/cli/app/boot.rb#114 + def audit(message); end + + # source://kamal//lib/kamal/cli/app/boot.rb#110 + def auditor; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/app/boot.rb#102 + def barrier_role?; end + + # source://kamal//lib/kamal/cli/app/boot.rb#90 + def close_barrier; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/app/boot.rb#118 + def gatekeeper?; end + + # source://kamal//lib/kamal/cli/app/boot.rb#35 + def old_version_renamed_if_clashing; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/app/boot.rb#122 + def queuer?; end + + # source://kamal//lib/kamal/cli/app/boot.rb#75 + def release_barrier; end + + # source://kamal//lib/kamal/cli/app/boot.rb#46 + def start_new_version; end + + # source://kamal//lib/kamal/cli/app/boot.rb#66 + def stop_new_version; end + + # source://kamal//lib/kamal/cli/app/boot.rb#70 + def stop_old_version(version); end + + # source://kamal//lib/kamal/cli/app/boot.rb#81 + def wait_at_barrier; end +end + +# source://kamal//lib/kamal/cli/app/prepare_assets.rb#1 +class Kamal::Cli::App::PrepareAssets + # @return [PrepareAssets] a new instance of PrepareAssets + # + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#6 + def initialize(host, role, sshkit); end + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#4 + def assets?(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#3 + def capture_with_info(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#3 + def execute(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute host. + # + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#2 + def host; end + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#3 + def info(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute role. + # + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#2 + def role; end + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#12 + def run; end + + # Returns the value of attribute sshkit. + # + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#2 + def sshkit; end + + private + + # source://kamal//lib/kamal/cli/app/prepare_assets.rb#21 + def app; end +end + +# source://kamal//lib/kamal/cli/base.rb#5 +class Kamal::Cli::Base < ::Thor + include ::SSHKit::DSL + + # @return [Base] a new instance of Base + # + # source://kamal//lib/kamal/cli/base.rb#25 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + private + + # source://kamal//lib/kamal/cli/base.rb#103 + def acquire_lock; end + + # source://kamal//lib/kamal/cli/base.rb#157 + def command; end + + # source://kamal//lib/kamal/cli/base.rb#93 + def confirming(question); end + + # source://kamal//lib/kamal/cli/base.rb#183 + def ensure_run_directory; end + + # source://kamal//lib/kamal/cli/base.rb#175 + def first_invocation; end + + # source://kamal//lib/kamal/cli/base.rb#41 + def initialize_commander; end + + # source://kamal//lib/kamal/cli/base.rb#148 + def on(*args, &block); end + + # source://kamal//lib/kamal/cli/base.rb#37 + def options_with_subcommand_class_options; end + + # source://kamal//lib/kamal/cli/base.rb#63 + def print_runtime; end + + # source://kamal//lib/kamal/cli/base.rb#121 + def raise_if_locked; end + + # source://kamal//lib/kamal/cli/base.rb#114 + def release_lock; end + + # source://kamal//lib/kamal/cli/base.rb#179 + def reset_invocation(cli_class); end + + # source://kamal//lib/kamal/cli/base.rb#133 + def run_hook(hook, **extra_details); end + + # source://kamal//lib/kamal/cli/base.rb#168 + def subcommand; end + + # source://kamal//lib/kamal/cli/base.rb#189 + def with_env(env); end + + # source://kamal//lib/kamal/cli/base.rb#72 + def with_lock; end + + class << self + # source://kamal//lib/kamal/cli/base.rb#9 + def dynamic_command_class; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/base.rb#8 + def exit_on_failure?; end + end +end + +# source://kamal//lib/kamal/cli.rb#2 +class Kamal::Cli::BootError < ::StandardError; end + +# source://kamal//lib/kamal/cli/build.rb#3 +class Kamal::Cli::Build < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/build.rb#75 + def create; end + + # source://kamal//lib/kamal/cli/build.rb#7 + def deliver; end + + # source://kamal//lib/kamal/cli/build.rb#104 + def details; end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/build.rb#62 + def pull; end + + # source://kamal//lib/kamal/cli/build.rb#13 + def push; end + + # source://kamal//lib/kamal/cli/build.rb#96 + def remove; end + + private + + # source://kamal//lib/kamal/cli/build.rb#126 + def connect_to_remote_host(remote_host); end + + # source://kamal//lib/kamal/cli/build.rb#139 + def mirror_hosts; end + + # source://kamal//lib/kamal/cli/build.rb#154 + def pull_on_hosts(hosts); end + + # source://kamal//lib/kamal/cli/build.rb#112 + def verify_local_dependencies; end +end + +# source://kamal//lib/kamal/cli/build.rb#4 +class Kamal::Cli::Build::BuildError < ::StandardError; end + +# source://kamal//lib/kamal/cli/build/clone.rb#3 +class Kamal::Cli::Build::Clone + # @return [Clone] a new instance of Clone + # + # source://kamal//lib/kamal/cli/build/clone.rb#7 + def initialize(sshkit); end + + # source://kamal//lib/kamal/cli/build/clone.rb#5 + def capture_with_info(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/build/clone.rb#5 + def error(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/build/clone.rb#5 + def execute(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/build/clone.rb#5 + def info(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/cli/build/clone.rb#11 + def prepare; end + + # Returns the value of attribute sshkit. + # + # source://kamal//lib/kamal/cli/build/clone.rb#4 + def sshkit; end + + private + + # source://kamal//lib/kamal/cli/build/clone.rb#32 + def clone_repo; end + + # source://kamal//lib/kamal/cli/build/clone.rb#39 + def reset; end + + # source://kamal//lib/kamal/cli/build/clone.rb#47 + def validate!; end +end + +# source://kamal//lib/kamal.rb#0 +module Kamal::Cli::Healthcheck; end + +# source://kamal//lib/kamal/cli/healthcheck/barrier.rb#3 +class Kamal::Cli::Healthcheck::Barrier + # @return [Barrier] a new instance of Barrier + # + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#4 + def initialize; end + + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#8 + def close; end + + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#12 + def open; end + + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#16 + def wait; end + + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#23 + def opened?; end + + # source://kamal//lib/kamal/cli/healthcheck/barrier.rb#27 + def set(value); end +end + +# source://kamal//lib/kamal/cli/healthcheck/error.rb#1 +class Kamal::Cli::Healthcheck::Error < ::StandardError; end + +# source://kamal//lib/kamal/cli/healthcheck/poller.rb#1 +module Kamal::Cli::Healthcheck::Poller + extend ::Kamal::Cli::Healthcheck::Poller + + # source://kamal//lib/kamal/cli/healthcheck/poller.rb#4 + def wait_for_healthy(role, &block); end + + private + + # source://kamal//lib/kamal/cli/healthcheck/poller.rb#39 + def info(message); end +end + +# source://kamal//lib/kamal/cli.rb#3 +class Kamal::Cli::HookError < ::StandardError; end + +# source://kamal//lib/kamal/cli/lock.rb#1 +class Kamal::Cli::Lock < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/lock.rb#13 + def acquire; end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/lock.rb#26 + def release; end + + # source://kamal//lib/kamal/cli/lock.rb#3 + def status; end + + private + + # source://kamal//lib/kamal/cli/lock.rb#36 + def handle_missing_lock; end +end + +# source://kamal//lib/kamal/cli.rb#4 +class Kamal::Cli::LockError < ::StandardError; end + +# source://kamal//lib/kamal/cli/main.rb#1 +class Kamal::Cli::Main < ::Kamal::Cli::Base + # source://thor/1.3.2/lib/thor.rb#334 + def accessory(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def app(*args); end + + # source://kamal//lib/kamal/cli/main.rb#113 + def audit; end + + # source://thor/1.3.2/lib/thor.rb#334 + def build(*args); end + + # source://kamal//lib/kamal/cli/main.rb#120 + def config; end + + # source://kamal//lib/kamal/cli/main.rb#20 + def deploy; end + + # source://kamal//lib/kamal/cli/main.rb#106 + def details; end + + # source://kamal//lib/kamal/cli/main.rb#127 + def docs(section = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/main.rb#140 + def init; end + + # source://thor/1.3.2/lib/thor.rb#334 + def lock(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def proxy(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def prune(*args); end + + # source://kamal//lib/kamal/cli/main.rb#56 + def redeploy; end + + # source://thor/1.3.2/lib/thor.rb#334 + def registry(*args); end + + # source://kamal//lib/kamal/cli/main.rb#181 + def remove; end + + # source://kamal//lib/kamal/cli/main.rb#82 + def rollback(version); end + + # source://thor/1.3.2/lib/thor.rb#334 + def secrets(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def server(*args); end + + # source://kamal//lib/kamal/cli/main.rb#4 + def setup; end + + # source://kamal//lib/kamal/cli/main.rb#195 + def upgrade; end + + # source://kamal//lib/kamal/cli/main.rb#224 + def version; end + + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/main.rb#256 + def container_available?(version); end + + # source://kamal//lib/kamal/cli/main.rb#276 + def deploy_options; end +end + +# source://kamal//lib/kamal/cli/proxy.rb#1 +class Kamal::Cli::Proxy < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/proxy.rb#3 + def boot; end + + # source://kamal//lib/kamal/cli/proxy.rb#29 + def boot_config(subcommand); end + + # source://kamal//lib/kamal/cli/proxy.rb#164 + def details; end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/proxy.rb#174 + def logs; end + + # source://kamal//lib/kamal/cli/proxy.rb#57 + def reboot; end + + # source://kamal//lib/kamal/cli/proxy.rb#196 + def remove; end + + # source://kamal//lib/kamal/cli/proxy.rb#208 + def remove_container; end + + # source://kamal//lib/kamal/cli/proxy.rb#218 + def remove_image; end + + # source://kamal//lib/kamal/cli/proxy.rb#228 + def remove_proxy_directory; end + + # source://kamal//lib/kamal/cli/proxy.rb#156 + def restart; end + + # source://kamal//lib/kamal/cli/proxy.rb#136 + def start; end + + # source://kamal//lib/kamal/cli/proxy.rb#146 + def stop; end + + # source://kamal//lib/kamal/cli/proxy.rb#98 + def upgrade; end + + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/cli/proxy.rb#237 + def removal_allowed?(force); end +end + +# source://kamal//lib/kamal/cli/prune.rb#1 +class Kamal::Cli::Prune < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/prune.rb#3 + def all; end + + # source://kamal//lib/kamal/cli/prune.rb#23 + def containers; end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/prune.rb#11 + def images; end +end + +# source://kamal//lib/kamal/cli/registry.rb#1 +class Kamal::Cli::Registry < ::Kamal::Cli::Base + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://kamal//lib/kamal/cli/registry.rb#5 + def login; end + + # source://kamal//lib/kamal/cli/registry.rb#13 + def logout; end +end + +# source://kamal//lib/kamal/cli/secrets.rb#1 +class Kamal::Cli::Secrets < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/secrets.rb#15 + def extract(name, secrets); end + + # source://kamal//lib/kamal/cli/secrets.rb#7 + def fetch(*secrets); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + private + + # source://kamal//lib/kamal/cli/secrets.rb#25 + def adapter(adapter); end + + # source://kamal//lib/kamal/cli/secrets.rb#29 + def return_or_puts(value, inline: T.unsafe(nil)); end +end + +# source://kamal//lib/kamal/cli/server.rb#1 +class Kamal::Cli::Server < ::Kamal::Cli::Base + # source://kamal//lib/kamal/cli/server.rb#26 + def bootstrap; end + + # source://kamal//lib/kamal/cli/server.rb#4 + def exec(*cmd); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end +end + +# source://kamal//lib/kamal/commander.rb#5 +class Kamal::Commander + # @return [Commander] a new instance of Commander + # + # source://kamal//lib/kamal/commander.rb#9 + def initialize; end + + # source://kamal//lib/kamal/commander.rb#79 + def accessories_on(host); end + + # source://kamal//lib/kamal/commander.rb#88 + def accessory(name); end + + # source://kamal//lib/kamal/commander.rb#7 + def accessory_hosts(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#75 + def accessory_names; end + + # source://kamal//lib/kamal/commander.rb#128 + def alias(name); end + + # source://kamal//lib/kamal/commander.rb#84 + def app(role: T.unsafe(nil), host: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commander.rb#92 + def auditor(**details); end + + # source://kamal//lib/kamal/commander.rb#145 + def boot_strategy; end + + # source://kamal//lib/kamal/commander.rb#96 + def builder; end + + # source://kamal//lib/kamal/commander.rb#16 + def config; end + + # source://kamal//lib/kamal/commander.rb#23 + def configure(**kwargs); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/commander.rb#27 + def configured?; end + + # Returns the value of attribute connected. + # + # source://kamal//lib/kamal/commander.rb#6 + def connected; end + + # Sets the attribute connected + # + # @param value the value to set the attribute connected to. + # + # source://kamal//lib/kamal/commander.rb#6 + def connected=(_arg0); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/commander.rb#157 + def connected?; end + + # source://kamal//lib/kamal/commander.rb#100 + def docker; end + + # Returns the value of attribute holding_lock. + # + # source://kamal//lib/kamal/commander.rb#6 + def holding_lock; end + + # Sets the attribute holding_lock + # + # @param value the value to set the attribute holding_lock to. + # + # source://kamal//lib/kamal/commander.rb#6 + def holding_lock=(_arg0); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/commander.rb#153 + def holding_lock?; end + + # source://kamal//lib/kamal/commander.rb#104 + def hook; end + + # source://kamal//lib/kamal/commander.rb#7 + def hosts(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#108 + def lock; end + + # source://kamal//lib/kamal/commander.rb#7 + def primary_host(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#7 + def primary_role(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#112 + def proxy; end + + # source://kamal//lib/kamal/commander.rb#7 + def proxy_hosts(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#116 + def prune; end + + # source://kamal//lib/kamal/commander.rb#120 + def registry; end + + # source://kamal//lib/kamal/commander.rb#7 + def roles(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#7 + def roles_on(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commander.rb#124 + def server; end + + # Returns the value of attribute specific_hosts. + # + # source://kamal//lib/kamal/commander.rb#31 + def specific_hosts; end + + # source://kamal//lib/kamal/commander.rb#55 + def specific_hosts=(hosts); end + + # source://kamal//lib/kamal/commander.rb#33 + def specific_primary!; end + + # Returns the value of attribute specific_roles. + # + # source://kamal//lib/kamal/commander.rb#31 + def specific_roles; end + + # source://kamal//lib/kamal/commander.rb#42 + def specific_roles=(role_names); end + + # Returns the value of attribute verbosity. + # + # source://kamal//lib/kamal/commander.rb#6 + def verbosity; end + + # Sets the attribute verbosity + # + # @param value the value to set the attribute verbosity to. + # + # source://kamal//lib/kamal/commander.rb#6 + def verbosity=(_arg0); end + + # source://kamal//lib/kamal/commander.rb#68 + def with_specific_hosts(hosts); end + + # source://kamal//lib/kamal/commander.rb#133 + def with_verbosity(level); end + + private + + # Lazy setup of SSHKit + # + # source://kamal//lib/kamal/commander.rb#163 + def configure_sshkit_with(config); end + + # source://kamal//lib/kamal/commander.rb#173 + def specifics; end +end + +# source://kamal//lib/kamal/commander/specifics.rb#1 +class Kamal::Commander::Specifics + # @return [Specifics] a new instance of Specifics + # + # source://kamal//lib/kamal/commander/specifics.rb#5 + def initialize(config, specific_hosts, specific_roles); end + + # source://kamal//lib/kamal/commander/specifics.rb#25 + def accessory_hosts; end + + # Returns the value of attribute hosts. + # + # source://kamal//lib/kamal/commander/specifics.rb#2 + def hosts; end + + # Returns the value of attribute primary_host. + # + # source://kamal//lib/kamal/commander/specifics.rb#2 + def primary_host; end + + # Returns the value of attribute primary_role. + # + # source://kamal//lib/kamal/commander/specifics.rb#2 + def primary_role; end + + # source://kamal//lib/kamal/commander/specifics.rb#21 + def proxy_hosts; end + + # Returns the value of attribute roles. + # + # source://kamal//lib/kamal/commander/specifics.rb#2 + def roles; end + + # source://kamal//lib/kamal/commander/specifics.rb#17 + def roles_on(host); end + + # source://kamal//lib/kamal/commander/specifics.rb#3 + def stable_sort!(elements, &_arg1); end + + private + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/commander/specifics.rb#30 + def config; end + + # source://kamal//lib/kamal/commander/specifics.rb#36 + def primary_or_first_role(roles); end + + # source://kamal//lib/kamal/commander/specifics.rb#32 + def primary_specific_role; end + + # Returns the value of attribute specific_hosts. + # + # source://kamal//lib/kamal/commander/specifics.rb#30 + def specific_hosts; end + + # Returns the value of attribute specific_roles. + # + # source://kamal//lib/kamal/commander/specifics.rb#30 + def specific_roles; end + + # source://kamal//lib/kamal/commander/specifics.rb#45 + def specified_hosts; end + + # source://kamal//lib/kamal/commander/specifics.rb#40 + def specified_roles; end +end + +# source://kamal//lib/kamal/commands.rb#1 +module Kamal::Commands; end + +# source://kamal//lib/kamal/commands/accessory.rb#1 +class Kamal::Commands::Accessory < ::Kamal::Commands::Base + # @return [Accessory] a new instance of Accessory + # + # source://kamal//lib/kamal/commands/accessory.rb#8 + def initialize(config, name:); end + + # Returns the value of attribute accessory_config. + # + # source://kamal//lib/kamal/commands/accessory.rb#2 + def accessory_config; end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def cmd(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def directories(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#105 + def ensure_env_directory; end + + # source://kamal//lib/kamal/commands/accessory.rb#87 + def ensure_local_file_present(local_file); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def env_args(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def env_directory(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#56 + def execute_in_existing_container(*command, interactive: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/accessory.rb#74 + def execute_in_existing_container_over_ssh(*command); end + + # source://kamal//lib/kamal/commands/accessory.rb#63 + def execute_in_new_container(*command, interactive: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/accessory.rb#78 + def execute_in_new_container_over_ssh(*command); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def files(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#48 + def follow_logs(timestamps: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def hosts(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def image(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#37 + def info; end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def label_args(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#42 + def logs(timestamps: T.unsafe(nil), since: T.unsafe(nil), lines: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def option_args(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def port(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def publish_args(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#97 + def remove_container; end + + # source://kamal//lib/kamal/commands/accessory.rb#101 + def remove_image; end + + # source://kamal//lib/kamal/commands/accessory.rb#93 + def remove_service_directory; end + + # source://kamal//lib/kamal/commands/accessory.rb#13 + def run; end + + # source://kamal//lib/kamal/commands/accessory.rb#82 + def run_over_ssh(command); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def secrets_io(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def secrets_path(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def service_name(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/accessory.rb#29 + def start; end + + # source://kamal//lib/kamal/commands/accessory.rb#33 + def stop; end + + # source://kamal//lib/kamal/commands/accessory.rb#3 + def volume_args(*_arg0, **_arg1, &_arg2); end + + private + + # source://kamal//lib/kamal/commands/accessory.rb#110 + def service_filter; end +end + +# source://kamal//lib/kamal/commands/app.rb#1 +class Kamal::Commands::App < ::Kamal::Commands::Base + include ::Kamal::Commands::App::Proxy + include ::Kamal::Commands::App::Logging + include ::Kamal::Commands::App::Images + include ::Kamal::Commands::App::Execution + include ::Kamal::Commands::App::Containers + include ::Kamal::Commands::App::Assets + + # @return [App] a new instance of App + # + # source://kamal//lib/kamal/commands/app.rb#10 + def initialize(config, role: T.unsafe(nil), host: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#58 + def container_id_for_version(version, only_running: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#8 + def container_name(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/app.rb#54 + def current_running_container_id; end + + # source://kamal//lib/kamal/commands/app.rb#62 + def current_running_version; end + + # source://kamal//lib/kamal/commands/app.rb#74 + def ensure_env_directory; end + + # Returns the value of attribute host. + # + # source://kamal//lib/kamal/commands/app.rb#6 + def host; end + + # source://kamal//lib/kamal/commands/app.rb#49 + def info; end + + # source://kamal//lib/kamal/commands/app.rb#68 + def list_versions(*docker_args, statuses: T.unsafe(nil)); end + + # Returns the value of attribute role. + # + # source://kamal//lib/kamal/commands/app.rb#6 + def role; end + + # source://kamal//lib/kamal/commands/app.rb#16 + def run(hostname: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#35 + def start; end + + # source://kamal//lib/kamal/commands/app.rb#39 + def status(version:); end + + # source://kamal//lib/kamal/commands/app.rb#43 + def stop(version: T.unsafe(nil)); end + + private + + # source://kamal//lib/kamal/commands/app.rb#83 + def current_running_container(format:); end + + # source://kamal//lib/kamal/commands/app.rb#101 + def extract_version_from_name; end + + # source://kamal//lib/kamal/commands/app.rb#97 + def filter_args(statuses: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#106 + def filters(statuses: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#93 + def latest_container(format:, filters: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app.rb#89 + def latest_image_container(format:); end + + # source://kamal//lib/kamal/commands/app.rb#79 + def latest_image_id; end +end + +# source://kamal//lib/kamal/commands/app.rb#4 +Kamal::Commands::App::ACTIVE_DOCKER_STATUSES = T.let(T.unsafe(nil), Array) + +# source://kamal//lib/kamal/commands/app/assets.rb#1 +module Kamal::Commands::App::Assets + # source://kamal//lib/kamal/commands/app/assets.rb#30 + def clean_up_assets; end + + # source://kamal//lib/kamal/commands/app/assets.rb#2 + def extract_assets; end + + # source://kamal//lib/kamal/commands/app/assets.rb#14 + def sync_asset_volumes(old_version: T.unsafe(nil)); end + + private + + # source://kamal//lib/kamal/commands/app/assets.rb#48 + def copy_contents(source, destination, continue_on_error: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app/assets.rb#37 + def find_and_remove_older_siblings(path); end +end + +# source://kamal//lib/kamal/commands/app/containers.rb#1 +module Kamal::Commands::App::Containers + # source://kamal//lib/kamal/commands/app/containers.rb#26 + def container_health_log(version:); end + + # source://kamal//lib/kamal/commands/app/containers.rb#8 + def list_container_names; end + + # source://kamal//lib/kamal/commands/app/containers.rb#4 + def list_containers; end + + # source://kamal//lib/kamal/commands/app/containers.rb#12 + def remove_container(version:); end + + # source://kamal//lib/kamal/commands/app/containers.rb#22 + def remove_containers; end + + # source://kamal//lib/kamal/commands/app/containers.rb#18 + def rename_container(version:, new_version:); end +end + +# source://kamal//lib/kamal/commands/app/containers.rb#2 +Kamal::Commands::App::Containers::DOCKER_HEALTH_LOG_FORMAT = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/commands/app/execution.rb#1 +module Kamal::Commands::App::Execution + # source://kamal//lib/kamal/commands/app/execution.rb#2 + def execute_in_existing_container(*command, env:, interactive: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app/execution.rb#23 + def execute_in_existing_container_over_ssh(*command, env:); end + + # source://kamal//lib/kamal/commands/app/execution.rb#10 + def execute_in_new_container(*command, env:, interactive: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app/execution.rb#27 + def execute_in_new_container_over_ssh(*command, env:); end +end + +# source://kamal//lib/kamal/commands/app/images.rb#1 +module Kamal::Commands::App::Images + # source://kamal//lib/kamal/commands/app/images.rb#2 + def list_images; end + + # source://kamal//lib/kamal/commands/app/images.rb#6 + def remove_images; end + + # source://kamal//lib/kamal/commands/app/images.rb#10 + def tag_latest_image; end +end + +# source://kamal//lib/kamal/commands/app/logging.rb#1 +module Kamal::Commands::App::Logging + # source://kamal//lib/kamal/commands/app/logging.rb#9 + def follow_logs(host:, timestamps: T.unsafe(nil), lines: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/app/logging.rb#2 + def logs(version: T.unsafe(nil), timestamps: T.unsafe(nil), since: T.unsafe(nil), lines: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end +end + +# source://kamal//lib/kamal/commands/app/proxy.rb#1 +module Kamal::Commands::App::Proxy + # source://kamal//lib/kamal/commands/app/proxy.rb#4 + def deploy(target:); end + + # source://kamal//lib/kamal/commands/app/proxy.rb#2 + def proxy_container_name(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/app/proxy.rb#8 + def remove(target:); end + + private + + # source://kamal//lib/kamal/commands/app/proxy.rb#13 + def proxy_exec(*command); end +end + +# source://kamal//lib/kamal/commands/auditor.rb#1 +class Kamal::Commands::Auditor < ::Kamal::Commands::Base + # @return [Auditor] a new instance of Auditor + # + # source://kamal//lib/kamal/commands/auditor.rb#4 + def initialize(config, **details); end + + # Returns the value of attribute details. + # + # source://kamal//lib/kamal/commands/auditor.rb#2 + def details; end + + # Runs remotely + # + # source://kamal//lib/kamal/commands/auditor.rb#10 + def record(line, **details); end + + # source://kamal//lib/kamal/commands/auditor.rb#19 + def reveal; end + + private + + # source://kamal//lib/kamal/commands/auditor.rb#24 + def audit_log_file; end + + # source://kamal//lib/kamal/commands/auditor.rb#30 + def audit_tags(**details); end +end + +# source://kamal//lib/kamal/commands/base.rb#2 +class Kamal::Commands::Base + # @return [Base] a new instance of Base + # + # source://kamal//lib/kamal/commands/base.rb#9 + def initialize(config); end + + # source://kamal//lib/kamal/commands/base.rb#3 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/commands/base.rb#7 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://kamal//lib/kamal/commands/base.rb#7 + def config=(_arg0); end + + # source://kamal//lib/kamal/commands/base.rb#24 + def container_id_for(container_name:, only_running: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/base.rb#32 + def make_directory(path); end + + # source://kamal//lib/kamal/commands/base.rb#28 + def make_directory_for(remote_file); end + + # source://kamal//lib/kamal/commands/base.rb#36 + def remove_directory(path); end + + # source://kamal//lib/kamal/commands/base.rb#40 + def remove_file(path); end + + # source://kamal//lib/kamal/commands/base.rb#13 + def run_over_ssh(*command, host:); end + + # source://kamal//lib/kamal/commands/base.rb#3 + def sensitive(*_arg0, **_arg1, &_arg2); end + + private + + # source://kamal//lib/kamal/commands/base.rb#68 + def any(*commands); end + + # source://kamal//lib/kamal/commands/base.rb#60 + def append(*commands); end + + # source://kamal//lib/kamal/commands/base.rb#52 + def chain(*commands); end + + # source://kamal//lib/kamal/commands/base.rb#45 + def combine(*commands, by: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/base.rb#80 + def docker(*args); end + + # source://kamal//lib/kamal/commands/base.rb#84 + def git(*args, path: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/base.rb#88 + def grep(*args); end + + # source://kamal//lib/kamal/commands/base.rb#56 + def pipe(*commands); end + + # source://kamal//lib/kamal/commands/base.rb#76 + def shell(command); end + + # source://kamal//lib/kamal/commands/base.rb#92 + def tags(**details); end + + # source://kamal//lib/kamal/commands/base.rb#64 + def write(*commands); end + + # source://kamal//lib/kamal/commands/base.rb#72 + def xargs(command); end +end + +# source://kamal//lib/kamal/commands/base.rb#5 +Kamal::Commands::Base::DOCKER_HEALTH_STATUS_FORMAT = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/commands/builder.rb#3 +class Kamal::Commands::Builder < ::Kamal::Commands::Base + include ::Kamal::Commands::Builder::Clone + + # source://kamal//lib/kamal/commands/builder/clone.rb#5 + def build_directory(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def clean(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/clone.rb#5 + def clone_directory(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def create(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#38 + def ensure_local_dependencies_installed; end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def first_mirror(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#33 + def hybrid; end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def info(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def inspect_builder(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#29 + def local; end + + # source://kamal//lib/kamal/commands/builder.rb#5 + def local?(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#9 + def name; end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def pull(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def push(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#25 + def remote; end + + # source://kamal//lib/kamal/commands/builder.rb#5 + def remote?(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def remove(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder.rb#13 + def target; end + + # source://kamal//lib/kamal/commands/builder.rb#4 + def validate_image(*_arg0, **_arg1, &_arg2); end + + private + + # source://kamal//lib/kamal/commands/builder.rb#53 + def ensure_local_buildx_installed; end + + # source://kamal//lib/kamal/commands/builder.rb#49 + def ensure_local_docker_installed; end +end + +# source://kamal//lib/kamal/commands/builder/base.rb#1 +class Kamal::Commands::Builder::Base < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def arches(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def args(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#6 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#43 + def build_context; end + + # source://kamal//lib/kamal/commands/builder/base.rb#39 + def build_options; end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def cache_from(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def cache_to(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#12 + def clean; end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def docker_driver?(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def dockerfile(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def driver(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#56 + def first_mirror; end + + # source://kamal//lib/kamal/commands/builder/base.rb#29 + def info; end + + # source://kamal//lib/kamal/commands/builder/base.rb#35 + def inspect_builder; end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def local_arches(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#25 + def pull; end + + # source://kamal//lib/kamal/commands/builder/base.rb#16 + def push; end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def remote(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def remote_arches(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def secrets(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def ssh(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#7 + def target(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/builder/base.rb#47 + def validate_image; end + + private + + # source://kamal//lib/kamal/commands/builder/base.rb#76 + def build_args; end + + # source://kamal//lib/kamal/commands/builder/base.rb#65 + def build_cache; end + + # source://kamal//lib/kamal/commands/builder/base.rb#84 + def build_dockerfile; end + + # source://kamal//lib/kamal/commands/builder/base.rb#72 + def build_labels; end + + # source://kamal//lib/kamal/commands/builder/base.rb#80 + def build_secrets; end + + # source://kamal//lib/kamal/commands/builder/base.rb#96 + def build_ssh; end + + # source://kamal//lib/kamal/commands/builder/base.rb#61 + def build_tags; end + + # source://kamal//lib/kamal/commands/builder/base.rb#92 + def build_target; end + + # source://kamal//lib/kamal/commands/builder/base.rb#100 + def builder_config; end + + # source://kamal//lib/kamal/commands/builder/base.rb#104 + def platform_options(arches); end +end + +# source://kamal//lib/kamal/commands/builder/base.rb#2 +class Kamal::Commands::Builder::Base::BuilderError < ::StandardError; end + +# source://kamal//lib/kamal/commands/builder/base.rb#4 +Kamal::Commands::Builder::Base::ENDPOINT_DOCKER_HOST_INSPECT = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/commands/builder/clone.rb#1 +module Kamal::Commands::Builder::Clone + extend ::ActiveSupport::Concern + + # source://kamal//lib/kamal/commands/builder/clone.rb#8 + def clone; end + + # source://kamal//lib/kamal/commands/builder/clone.rb#12 + def clone_reset_steps; end + + # source://kamal//lib/kamal/commands/builder/clone.rb#26 + def clone_revision; end + + # source://kamal//lib/kamal/commands/builder/clone.rb#22 + def clone_status; end +end + +# source://kamal//lib/kamal/commands/builder/hybrid.rb#1 +class Kamal::Commands::Builder::Hybrid < ::Kamal::Commands::Builder::Remote + # source://kamal//lib/kamal/commands/builder/hybrid.rb#2 + def create; end + + private + + # source://kamal//lib/kamal/commands/builder/hybrid.rb#18 + def append_remote_buildx; end + + # source://kamal//lib/kamal/commands/builder/hybrid.rb#10 + def builder_name; end + + # source://kamal//lib/kamal/commands/builder/hybrid.rb#14 + def create_local_buildx; end +end + +# source://kamal//lib/kamal/commands/builder/local.rb#1 +class Kamal::Commands::Builder::Local < ::Kamal::Commands::Builder::Base + # source://kamal//lib/kamal/commands/builder/local.rb#2 + def create; end + + # source://kamal//lib/kamal/commands/builder/local.rb#6 + def remove; end + + private + + # source://kamal//lib/kamal/commands/builder/local.rb#11 + def builder_name; end +end + +# source://kamal//lib/kamal/commands/builder/remote.rb#1 +class Kamal::Commands::Builder::Remote < ::Kamal::Commands::Builder::Base + # source://kamal//lib/kamal/commands/builder/remote.rb#2 + def create; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#14 + def info; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#20 + def inspect_builder; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#8 + def remove; end + + private + + # source://kamal//lib/kamal/commands/builder/remote.rb#28 + def builder_name; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#56 + def create_buildx; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#48 + def create_remote_context; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#36 + def inspect_buildx; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#42 + def inspect_remote_context; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#32 + def remote_context_name; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#60 + def remove_buildx; end + + # source://kamal//lib/kamal/commands/builder/remote.rb#52 + def remove_remote_context; end +end + +# source://kamal//lib/kamal/commands/docker.rb#1 +class Kamal::Commands::Docker < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/docker.rb#22 + def create_network; end + + # Install Docker using the https://github.com/docker/docker-install convenience script. + # + # source://kamal//lib/kamal/commands/docker.rb#3 + def install; end + + # Checks the Docker client version. Fails if Docker is not installed. + # + # @return [Boolean] + # + # source://kamal//lib/kamal/commands/docker.rb#8 + def installed?; end + + # Checks the Docker server version. Fails if Docker is not running. + # + # @return [Boolean] + # + # source://kamal//lib/kamal/commands/docker.rb#13 + def running?; end + + # Do we have superuser access to install Docker and start system services? + # + # @return [Boolean] + # + # source://kamal//lib/kamal/commands/docker.rb#18 + def superuser?; end + + private + + # source://kamal//lib/kamal/commands/docker.rb#27 + def get_docker; end +end + +# source://kamal//lib/kamal/commands/hook.rb#1 +class Kamal::Commands::Hook < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/hook.rb#6 + def env(secrets: T.unsafe(nil), **details); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/commands/hook.rb#12 + def hook_exists?(hook); end + + # source://kamal//lib/kamal/commands/hook.rb#2 + def run(hook); end + + private + + # source://kamal//lib/kamal/commands/hook.rb#17 + def hook_file(hook); end +end + +# source://kamal//lib/kamal/commands/lock.rb#5 +class Kamal::Commands::Lock < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/lock.rb#6 + def acquire(message, version); end + + # source://kamal//lib/kamal/commands/lock.rb#24 + def ensure_locks_directory; end + + # source://kamal//lib/kamal/commands/lock.rb#12 + def release; end + + # source://kamal//lib/kamal/commands/lock.rb#18 + def status; end + + private + + # source://kamal//lib/kamal/commands/lock.rb#57 + def lock_details(message, version); end + + # source://kamal//lib/kamal/commands/lock.rb#53 + def lock_details_file; end + + # source://kamal//lib/kamal/commands/lock.rb#47 + def lock_dir; end + + # source://kamal//lib/kamal/commands/lock.rb#65 + def locked_by; end + + # source://kamal//lib/kamal/commands/lock.rb#35 + def read_lock_details; end + + # source://kamal//lib/kamal/commands/lock.rb#41 + def stat_lock_dir; end + + # source://kamal//lib/kamal/commands/lock.rb#29 + def write_lock_details(message, version); end +end + +# source://kamal//lib/kamal/commands/proxy.rb#1 +class Kamal::Commands::Proxy < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/proxy.rb#2 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/proxy.rb#58 + def cleanup_traefik; end + + # source://kamal//lib/kamal/commands/proxy.rb#67 + def ensure_proxy_directory; end + + # source://kamal//lib/kamal/commands/proxy.rb#43 + def follow_logs(host:, timestamps: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/proxy.rb#75 + def get_boot_options; end + + # source://kamal//lib/kamal/commands/proxy.rb#27 + def info; end + + # source://kamal//lib/kamal/commands/proxy.rb#37 + def logs(timestamps: T.unsafe(nil), since: T.unsafe(nil), lines: T.unsafe(nil), grep: T.unsafe(nil), grep_options: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/proxy.rb#2 + def optionize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/commands/proxy.rb#50 + def remove_container; end + + # source://kamal//lib/kamal/commands/proxy.rb#54 + def remove_image; end + + # source://kamal//lib/kamal/commands/proxy.rb#71 + def remove_proxy_directory; end + + # source://kamal//lib/kamal/commands/proxy.rb#79 + def reset_boot_options; end + + # source://kamal//lib/kamal/commands/proxy.rb#4 + def run; end + + # source://kamal//lib/kamal/commands/proxy.rb#15 + def start; end + + # source://kamal//lib/kamal/commands/proxy.rb#23 + def start_or_run; end + + # source://kamal//lib/kamal/commands/proxy.rb#19 + def stop(name: T.unsafe(nil)); end + + # source://kamal//lib/kamal/commands/proxy.rb#31 + def version; end + + private + + # source://kamal//lib/kamal/commands/proxy.rb#84 + def container_name; end +end + +# source://kamal//lib/kamal/commands/prune.rb#4 +class Kamal::Commands::Prune < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/prune.rb#16 + def app_containers(retain:); end + + # source://kamal//lib/kamal/commands/prune.rb#5 + def dangling_images; end + + # source://kamal//lib/kamal/commands/prune.rb#9 + def tagged_images; end + + private + + # source://kamal//lib/kamal/commands/prune.rb#28 + def active_image_list; end + + # source://kamal//lib/kamal/commands/prune.rb#35 + def service_filter; end + + # source://kamal//lib/kamal/commands/prune.rb#24 + def stopped_containers_filters; end +end + +# source://kamal//lib/kamal/commands/registry.rb#1 +class Kamal::Commands::Registry < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/registry.rb#4 + def login; end + + # source://kamal//lib/kamal/commands/registry.rb#11 + def logout; end + + # source://kamal//lib/kamal/commands/registry.rb#2 + def registry(*_arg0, **_arg1, &_arg2); end +end + +# source://kamal//lib/kamal/commands/server.rb#1 +class Kamal::Commands::Server < ::Kamal::Commands::Base + # source://kamal//lib/kamal/commands/server.rb#10 + def app_directory_count; end + + # source://kamal//lib/kamal/commands/server.rb#2 + def ensure_run_directory; end + + # source://kamal//lib/kamal/commands/server.rb#6 + def remove_app_directory; end +end + +# source://kamal//lib/kamal/configuration.rb#8 +class Kamal::Configuration + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Configuration] a new instance of Configuration + # + # source://kamal//lib/kamal/configuration.rb#48 + def initialize(raw_config, destination: T.unsafe(nil), version: T.unsafe(nil), validate: T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration.rb#91 + def abbreviated_version; end + + # source://kamal//lib/kamal/configuration.rb#156 + def absolute_image; end + + # Returns the value of attribute accessories. + # + # source://kamal//lib/kamal/configuration.rb#13 + def accessories; end + + # source://kamal//lib/kamal/configuration.rb#115 + def accessory(name); end + + # Returns the value of attribute aliases. + # + # source://kamal//lib/kamal/configuration.rb#13 + def aliases; end + + # source://kamal//lib/kamal/configuration.rb#120 + def all_hosts; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration.rb#136 + def allow_empty_roles?; end + + # source://kamal//lib/kamal/configuration.rb#215 + def app_directory; end + + # source://kamal//lib/kamal/configuration.rb#211 + def apps_directory; end + + # source://kamal//lib/kamal/configuration.rb#10 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration.rb#232 + def asset_path; end + + # source://kamal//lib/kamal/configuration.rb#223 + def assets_directory; end + + # Returns the value of attribute boot. + # + # source://kamal//lib/kamal/configuration.rb#13 + def boot; end + + # Returns the value of attribute builder. + # + # source://kamal//lib/kamal/configuration.rb#13 + def builder; end + + # source://kamal//lib/kamal/configuration.rb#198 + def deploy_timeout; end + + # Returns the value of attribute destination. + # + # source://kamal//lib/kamal/configuration.rb#12 + def destination; end + + # source://kamal//lib/kamal/configuration.rb#202 + def drain_timeout; end + + # Returns the value of attribute env. + # + # source://kamal//lib/kamal/configuration.rb#13 + def env; end + + # source://kamal//lib/kamal/configuration.rb#219 + def env_directory; end + + # source://kamal//lib/kamal/configuration.rb#245 + def env_tag(name); end + + # source://kamal//lib/kamal/configuration.rb#237 + def env_tags; end + + # source://kamal//lib/kamal/configuration.rb#228 + def hooks_path; end + + # source://kamal//lib/kamal/configuration.rb#9 + def image(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration.rb#9 + def labels(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration.rb#160 + def latest_image; end + + # source://kamal//lib/kamal/configuration.rb#164 + def latest_tag; end + + # Returns the value of attribute logging. + # + # source://kamal//lib/kamal/configuration.rb#13 + def logging; end + + # source://kamal//lib/kamal/configuration.rb#189 + def logging_args; end + + # source://kamal//lib/kamal/configuration.rb#102 + def minimum_version; end + + # source://kamal//lib/kamal/configuration.rb#10 + def optionize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration.rb#124 + def primary_host; end + + # source://kamal//lib/kamal/configuration.rb#132 + def primary_role; end + + # source://kamal//lib/kamal/configuration.rb#128 + def primary_role_name; end + + # Returns the value of attribute proxy. + # + # source://kamal//lib/kamal/configuration.rb#13 + def proxy; end + + # source://kamal//lib/kamal/configuration.rb#261 + def proxy_container_name; end + + # source://kamal//lib/kamal/configuration.rb#265 + def proxy_directory; end + + # source://kamal//lib/kamal/configuration.rb#148 + def proxy_hosts; end + + # source://kamal//lib/kamal/configuration.rb#257 + def proxy_image; end + + # source://kamal//lib/kamal/configuration.rb#253 + def proxy_options_default; end + + # source://kamal//lib/kamal/configuration.rb#269 + def proxy_options_file; end + + # source://kamal//lib/kamal/configuration.rb#249 + def proxy_publish_args(http_port, https_port); end + + # source://kamal//lib/kamal/configuration.rb#144 + def proxy_role_names; end + + # source://kamal//lib/kamal/configuration.rb#140 + def proxy_roles; end + + # Returns the value of attribute raw_config. + # + # source://kamal//lib/kamal/configuration.rb#12 + def raw_config; end + + # source://kamal//lib/kamal/configuration.rb#194 + def readiness_delay; end + + # Returns the value of attribute registry. + # + # source://kamal//lib/kamal/configuration.rb#13 + def registry; end + + # source://kamal//lib/kamal/configuration.rb#152 + def repository; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration.rb#172 + def require_destination?; end + + # source://kamal//lib/kamal/configuration.rb#176 + def retain_containers; end + + # source://kamal//lib/kamal/configuration.rb#111 + def role(name); end + + # source://kamal//lib/kamal/configuration.rb#107 + def roles; end + + # source://kamal//lib/kamal/configuration.rb#207 + def run_directory; end + + # Returns the value of attribute secrets. + # + # source://kamal//lib/kamal/configuration.rb#12 + def secrets; end + + # Returns the value of attribute servers. + # + # source://kamal//lib/kamal/configuration.rb#13 + def servers; end + + # source://kamal//lib/kamal/configuration.rb#9 + def service(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration.rb#168 + def service_with_version; end + + # Returns the value of attribute ssh. + # + # source://kamal//lib/kamal/configuration.rb#13 + def ssh; end + + # Returns the value of attribute sshkit. + # + # source://kamal//lib/kamal/configuration.rb#13 + def sshkit; end + + # source://kamal//lib/kamal/configuration.rb#274 + def to_h; end + + # source://kamal//lib/kamal/configuration.rb#87 + def version; end + + # source://kamal//lib/kamal/configuration.rb#83 + def version=(version); end + + # source://kamal//lib/kamal/configuration.rb#181 + def volume_args; end + + private + + # Will raise ArgumentError if any required config keys are missing + # + # source://kamal//lib/kamal/configuration.rb#294 + def ensure_destination_if_required; end + + # source://kamal//lib/kamal/configuration.rb#346 + def ensure_no_traefik_reboot_hooks; end + + # source://kamal//lib/kamal/configuration.rb#356 + def ensure_one_host_for_ssl_roles; end + + # source://kamal//lib/kamal/configuration.rb#302 + def ensure_required_keys_present; end + + # @raise [Kamal::ConfigurationError] + # + # source://kamal//lib/kamal/configuration.rb#340 + def ensure_retain_containers_valid; end + + # @raise [Kamal::ConfigurationError] + # + # source://kamal//lib/kamal/configuration.rb#362 + def ensure_unique_hosts_for_ssl_roles; end + + # source://kamal//lib/kamal/configuration.rb#332 + def ensure_valid_kamal_version; end + + # @raise [Kamal::ConfigurationError] + # + # source://kamal//lib/kamal/configuration.rb#326 + def ensure_valid_service_name; end + + # source://kamal//lib/kamal/configuration.rb#375 + def git_version; end + + # source://kamal//lib/kamal/configuration.rb#371 + def role_names; end + + class << self + # source://kamal//lib/kamal/configuration.rb#22 + def create_from(config_file:, destination: T.unsafe(nil), version: T.unsafe(nil)); end + + private + + # source://kamal//lib/kamal/configuration.rb#43 + def destination_config_file(base_config_file, destination); end + + # source://kamal//lib/kamal/configuration.rb#33 + def load_config_file(file); end + + # source://kamal//lib/kamal/configuration.rb#29 + def load_config_files(*files); end + end +end + +# source://kamal//lib/kamal/configuration/accessory.rb#1 +class Kamal::Configuration::Accessory + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Accessory] a new instance of Accessory + # + # source://kamal//lib/kamal/configuration/accessory.rb#8 + def initialize(name, config:); end + + # Returns the value of attribute accessory_config. + # + # source://kamal//lib/kamal/configuration/accessory.rb#6 + def accessory_config; end + + # source://kamal//lib/kamal/configuration/accessory.rb#4 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/accessory.rb#99 + def cmd; end + + # source://kamal//lib/kamal/configuration/accessory.rb#76 + def directories; end + + # Returns the value of attribute env. + # + # source://kamal//lib/kamal/configuration/accessory.rb#6 + def env; end + + # source://kamal//lib/kamal/configuration/accessory.rb#53 + def env_args; end + + # source://kamal//lib/kamal/configuration/accessory.rb#57 + def env_directory; end + + # source://kamal//lib/kamal/configuration/accessory.rb#69 + def files; end + + # source://kamal//lib/kamal/configuration/accessory.rb#31 + def hosts; end + + # source://kamal//lib/kamal/configuration/accessory.rb#27 + def image; end + + # source://kamal//lib/kamal/configuration/accessory.rb#49 + def label_args; end + + # source://kamal//lib/kamal/configuration/accessory.rb#45 + def labels; end + + # Returns the value of attribute name. + # + # source://kamal//lib/kamal/configuration/accessory.rb#6 + def name; end + + # source://kamal//lib/kamal/configuration/accessory.rb#91 + def option_args; end + + # source://kamal//lib/kamal/configuration/accessory.rb#4 + def optionize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/accessory.rb#35 + def port; end + + # source://kamal//lib/kamal/configuration/accessory.rb#41 + def publish_args; end + + # source://kamal//lib/kamal/configuration/accessory.rb#61 + def secrets_io; end + + # source://kamal//lib/kamal/configuration/accessory.rb#65 + def secrets_path; end + + # source://kamal//lib/kamal/configuration/accessory.rb#23 + def service_name; end + + # source://kamal//lib/kamal/configuration/accessory.rb#87 + def volume_args; end + + # source://kamal//lib/kamal/configuration/accessory.rb#83 + def volumes; end + + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/accessory.rb#155 + def absolute_path?(path); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/accessory.rb#104 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://kamal//lib/kamal/configuration/accessory.rb#104 + def config=(_arg0); end + + # source://kamal//lib/kamal/configuration/accessory.rb#106 + def default_labels; end + + # source://kamal//lib/kamal/configuration/accessory.rb#151 + def expand_host_path(host_path); end + + # source://kamal//lib/kamal/configuration/accessory.rb#110 + def expand_local_file(local_file); end + + # source://kamal//lib/kamal/configuration/accessory.rb#129 + def expand_remote_file(remote_file); end + + # source://kamal//lib/kamal/configuration/accessory.rb#163 + def hosts_from_host; end + + # source://kamal//lib/kamal/configuration/accessory.rb#167 + def hosts_from_hosts; end + + # source://kamal//lib/kamal/configuration/accessory.rb#171 + def hosts_from_roles; end + + # source://kamal//lib/kamal/configuration/accessory.rb#125 + def read_dynamic_file(local_file); end + + # source://kamal//lib/kamal/configuration/accessory.rb#144 + def remote_directories_as_volumes; end + + # source://kamal//lib/kamal/configuration/accessory.rb#137 + def remote_files_as_volumes; end + + # source://kamal//lib/kamal/configuration/accessory.rb#159 + def service_data_directory; end + + # source://kamal//lib/kamal/configuration/accessory.rb#133 + def specific_volumes; end + + # source://kamal//lib/kamal/configuration/accessory.rb#118 + def with_clear_env_loaded; end +end + +# source://kamal//lib/kamal/configuration/alias.rb#1 +class Kamal::Configuration::Alias + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Alias] a new instance of Alias + # + # source://kamal//lib/kamal/configuration/alias.rb#6 + def initialize(name, config:); end + + # Returns the value of attribute command. + # + # source://kamal//lib/kamal/configuration/alias.rb#4 + def command; end + + # Returns the value of attribute name. + # + # source://kamal//lib/kamal/configuration/alias.rb#4 + def name; end +end + +# source://kamal//lib/kamal/configuration/boot.rb#1 +class Kamal::Configuration::Boot + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Boot] a new instance of Boot + # + # source://kamal//lib/kamal/configuration/boot.rb#6 + def initialize(config:); end + + # Returns the value of attribute boot_config. + # + # source://kamal//lib/kamal/configuration/boot.rb#4 + def boot_config; end + + # Returns the value of attribute host_count. + # + # source://kamal//lib/kamal/configuration/boot.rb#4 + def host_count; end + + # source://kamal//lib/kamal/configuration/boot.rb#12 + def limit; end + + # source://kamal//lib/kamal/configuration/boot.rb#22 + def wait; end +end + +# source://kamal//lib/kamal/configuration/builder.rb#1 +class Kamal::Configuration::Builder + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Builder] a new instance of Builder + # + # source://kamal//lib/kamal/configuration/builder.rb#8 + def initialize(config:); end + + # source://kamal//lib/kamal/configuration/builder.rb#26 + def arches; end + + # source://kamal//lib/kamal/configuration/builder.rb#60 + def args; end + + # source://kamal//lib/kamal/configuration/builder.rb#122 + def build_directory; end + + # Returns the value of attribute builder_config. + # + # source://kamal//lib/kamal/configuration/builder.rb#4 + def builder_config; end + + # source://kamal//lib/kamal/configuration/builder.rb#88 + def cache_from; end + + # source://kamal//lib/kamal/configuration/builder.rb#99 + def cache_to; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#56 + def cached?; end + + # source://kamal//lib/kamal/configuration/builder.rb#118 + def clone_directory; end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/builder.rb#4 + def config; end + + # source://kamal//lib/kamal/configuration/builder.rb#76 + def context; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#131 + def docker_driver?; end + + # source://kamal//lib/kamal/configuration/builder.rb#68 + def dockerfile; end + + # source://kamal//lib/kamal/configuration/builder.rb#80 + def driver; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#114 + def git_clone?; end + + # source://kamal//lib/kamal/configuration/builder.rb#5 + def image(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#52 + def local?; end + + # source://kamal//lib/kamal/configuration/builder.rb#30 + def local_arches; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#84 + def local_disabled?; end + + # source://kamal//lib/kamal/configuration/builder.rb#22 + def remote; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#48 + def remote?; end + + # source://kamal//lib/kamal/configuration/builder.rb#40 + def remote_arches; end + + # source://kamal//lib/kamal/configuration/builder.rb#64 + def secrets; end + + # source://kamal//lib/kamal/configuration/builder.rb#6 + def server(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/builder.rb#5 + def service(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/builder.rb#110 + def ssh; end + + # source://kamal//lib/kamal/configuration/builder.rb#72 + def target; end + + # source://kamal//lib/kamal/configuration/builder.rb#18 + def to_h; end + + private + + # source://kamal//lib/kamal/configuration/builder.rb#156 + def cache_from_config_for_gha; end + + # source://kamal//lib/kamal/configuration/builder.rb#160 + def cache_from_config_for_registry; end + + # source://kamal//lib/kamal/configuration/builder.rb#148 + def cache_image; end + + # source://kamal//lib/kamal/configuration/builder.rb#152 + def cache_image_ref; end + + # source://kamal//lib/kamal/configuration/builder.rb#164 + def cache_to_config_for_gha; end + + # source://kamal//lib/kamal/configuration/builder.rb#168 + def cache_to_config_for_registry; end + + # source://kamal//lib/kamal/configuration/builder.rb#184 + def default_arch; end + + # source://kamal//lib/kamal/configuration/builder.rb#180 + def pwd_sha; end + + # source://kamal//lib/kamal/configuration/builder.rb#172 + def repo_basename; end + + # source://kamal//lib/kamal/configuration/builder.rb#176 + def repo_relative_pwd; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/builder.rb#136 + def valid?; end +end + +# source://kamal//lib/kamal/configuration/env.rb#1 +class Kamal::Configuration::Env + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Env] a new instance of Env + # + # source://kamal//lib/kamal/configuration/env.rb#8 + def initialize(config:, secrets:, context: T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/env.rb#6 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute clear. + # + # source://kamal//lib/kamal/configuration/env.rb#5 + def clear; end + + # source://kamal//lib/kamal/configuration/env.rb#16 + def clear_args; end + + # Returns the value of attribute context. + # + # source://kamal//lib/kamal/configuration/env.rb#4 + def context; end + + # source://kamal//lib/kamal/configuration/env.rb#24 + def merge(other); end + + # Returns the value of attribute secret_keys. + # + # source://kamal//lib/kamal/configuration/env.rb#5 + def secret_keys; end + + # Returns the value of attribute secrets. + # + # source://kamal//lib/kamal/configuration/env.rb#4 + def secrets; end + + # source://kamal//lib/kamal/configuration/env.rb#20 + def secrets_io; end +end + +# source://kamal//lib/kamal/configuration/env/tag.rb#1 +class Kamal::Configuration::Env::Tag + # @return [Tag] a new instance of Tag + # + # source://kamal//lib/kamal/configuration/env/tag.rb#4 + def initialize(name, config:, secrets:); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/env/tag.rb#2 + def config; end + + # source://kamal//lib/kamal/configuration/env/tag.rb#10 + def env; end + + # Returns the value of attribute name. + # + # source://kamal//lib/kamal/configuration/env/tag.rb#2 + def name; end + + # Returns the value of attribute secrets. + # + # source://kamal//lib/kamal/configuration/env/tag.rb#2 + def secrets; end +end + +# source://kamal//lib/kamal/configuration/logging.rb#1 +class Kamal::Configuration::Logging + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Logging] a new instance of Logging + # + # source://kamal//lib/kamal/configuration/logging.rb#8 + def initialize(logging_config:, context: T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/logging.rb#25 + def args; end + + # source://kamal//lib/kamal/configuration/logging.rb#2 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/logging.rb#13 + def driver; end + + # Returns the value of attribute logging_config. + # + # source://kamal//lib/kamal/configuration/logging.rb#6 + def logging_config; end + + # source://kamal//lib/kamal/configuration/logging.rb#21 + def merge(other); end + + # source://kamal//lib/kamal/configuration/logging.rb#2 + def optionize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/logging.rb#17 + def options; end +end + +# source://kamal//lib/kamal/configuration.rb#19 +Kamal::Configuration::PROXY_HTTPS_PORT = T.let(T.unsafe(nil), Integer) + +# source://kamal//lib/kamal/configuration.rb#18 +Kamal::Configuration::PROXY_HTTP_PORT = T.let(T.unsafe(nil), Integer) + +# source://kamal//lib/kamal/configuration.rb#17 +Kamal::Configuration::PROXY_MINIMUM_VERSION = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/configuration/proxy.rb#1 +class Kamal::Configuration::Proxy + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Proxy] a new instance of Proxy + # + # source://kamal//lib/kamal/configuration/proxy.rb#11 + def initialize(config:, proxy_config:, context: T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/proxy.rb#17 + def app_port; end + + # source://kamal//lib/kamal/configuration/proxy.rb#7 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/proxy.rb#9 + def config; end + + # source://kamal//lib/kamal/configuration/proxy.rb#50 + def deploy_command_args(target:); end + + # source://kamal//lib/kamal/configuration/proxy.rb#29 + def deploy_options; end + + # source://kamal//lib/kamal/configuration/proxy.rb#25 + def host; end + + # source://kamal//lib/kamal/configuration/proxy.rb#58 + def merge(other); end + + # source://kamal//lib/kamal/configuration/proxy.rb#7 + def optionize(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute proxy_config. + # + # source://kamal//lib/kamal/configuration/proxy.rb#9 + def proxy_config; end + + # source://kamal//lib/kamal/configuration/proxy.rb#54 + def remove_command_args(target:); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/proxy.rb#21 + def ssl?; end + + private + + # source://kamal//lib/kamal/configuration/proxy.rb#63 + def seconds_duration(value); end +end + +# source://kamal//lib/kamal/configuration/proxy.rb#5 +Kamal::Configuration::Proxy::CONTAINER_NAME = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/configuration/proxy.rb#4 +Kamal::Configuration::Proxy::DEFAULT_LOG_REQUEST_HEADERS = T.let(T.unsafe(nil), Array) + +# source://kamal//lib/kamal/configuration/registry.rb#1 +class Kamal::Configuration::Registry + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Registry] a new instance of Registry + # + # source://kamal//lib/kamal/configuration/registry.rb#6 + def initialize(config:); end + + # source://kamal//lib/kamal/configuration/registry.rb#20 + def password; end + + # Returns the value of attribute registry_config. + # + # source://kamal//lib/kamal/configuration/registry.rb#4 + def registry_config; end + + # Returns the value of attribute secrets. + # + # source://kamal//lib/kamal/configuration/registry.rb#4 + def secrets; end + + # source://kamal//lib/kamal/configuration/registry.rb#12 + def server; end + + # source://kamal//lib/kamal/configuration/registry.rb#16 + def username; end + + private + + # source://kamal//lib/kamal/configuration/registry.rb#25 + def lookup(key); end +end + +# source://kamal//lib/kamal/configuration/role.rb#1 +class Kamal::Configuration::Role + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Role] a new instance of Role + # + # source://kamal//lib/kamal/configuration/role.rb#10 + def initialize(name, config:); end + + # source://kamal//lib/kamal/configuration/role.rb#4 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/configuration/role.rb#144 + def asset_extracted_directory(version = T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/role.rb#129 + def asset_path; end + + # source://kamal//lib/kamal/configuration/role.rb#137 + def asset_volume(version = T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/role.rb#110 + def asset_volume_args; end + + # source://kamal//lib/kamal/configuration/role.rb#148 + def asset_volume_directory(version = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/role.rb#133 + def assets?; end + + # source://kamal//lib/kamal/configuration/role.rb#42 + def cmd; end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def config; end + + # source://kamal//lib/kamal/configuration/role.rb#120 + def container_name(version = T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/role.rb#124 + def container_prefix; end + + # source://kamal//lib/kamal/configuration/role.rb#152 + def ensure_one_host_for_ssl; end + + # source://kamal//lib/kamal/configuration/role.rb#89 + def env(host); end + + # source://kamal//lib/kamal/configuration/role.rb#94 + def env_args(host); end + + # source://kamal//lib/kamal/configuration/role.rb#98 + def env_directory; end + + # source://kamal//lib/kamal/configuration/role.rb#38 + def env_tags(host); end + + # source://kamal//lib/kamal/configuration/role.rb#34 + def hosts; end + + # source://kamal//lib/kamal/configuration/role.rb#58 + def label_args; end + + # source://kamal//lib/kamal/configuration/role.rb#54 + def labels; end + + # source://kamal//lib/kamal/configuration/role.rb#66 + def logging; end + + # source://kamal//lib/kamal/configuration/role.rb#62 + def logging_args; end + + # Returns the value of attribute name. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def name; end + + # source://kamal//lib/kamal/configuration/role.rb#46 + def option_args; end + + # source://kamal//lib/kamal/configuration/role.rb#4 + def optionize(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/role.rb#115 + def primary?; end + + # source://kamal//lib/kamal/configuration/role.rb#30 + def primary_host; end + + # source://kamal//lib/kamal/configuration/role.rb#70 + def proxy; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/role.rb#74 + def running_proxy?; end + + # source://kamal//lib/kamal/configuration/role.rb#102 + def secrets_io(host); end + + # source://kamal//lib/kamal/configuration/role.rb#106 + def secrets_path; end + + # Returns the value of attribute specialized_env. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def specialized_env; end + + # Returns the value of attribute specialized_logging. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def specialized_logging; end + + # Returns the value of attribute specialized_proxy. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def specialized_proxy; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/role.rb#78 + def ssl?; end + + # source://kamal//lib/kamal/configuration/role.rb#82 + def stop_args; end + + # Returns the value of attribute name. + # + # source://kamal//lib/kamal/configuration/role.rb#6 + def to_s; end + + private + + # source://kamal//lib/kamal/configuration/role.rb#214 + def custom_labels; end + + # source://kamal//lib/kamal/configuration/role.rb#202 + def default_labels; end + + # source://kamal//lib/kamal/configuration/role.rb#193 + def extract_hosts_from_config; end + + # source://kamal//lib/kamal/configuration/role.rb#159 + def initialize_specialized_proxy; end + + # source://kamal//lib/kamal/configuration/role.rb#206 + def specializations; end + + # source://kamal//lib/kamal/configuration/role.rb#180 + def tagged_hosts; end +end + +# source://kamal//lib/kamal/configuration/servers.rb#1 +class Kamal::Configuration::Servers + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Servers] a new instance of Servers + # + # source://kamal//lib/kamal/configuration/servers.rb#6 + def initialize(config:); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/servers.rb#4 + def config; end + + # Returns the value of attribute roles. + # + # source://kamal//lib/kamal/configuration/servers.rb#4 + def roles; end + + # Returns the value of attribute servers_config. + # + # source://kamal//lib/kamal/configuration/servers.rb#4 + def servers_config; end + + private + + # source://kamal//lib/kamal/configuration/servers.rb#15 + def role_names; end +end + +# source://kamal//lib/kamal/configuration/ssh.rb#1 +class Kamal::Configuration::Ssh + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Ssh] a new instance of Ssh + # + # source://kamal//lib/kamal/configuration/ssh.rb#8 + def initialize(config:); end + + # source://kamal//lib/kamal/configuration/ssh.rb#37 + def key_data; end + + # source://kamal//lib/kamal/configuration/ssh.rb#33 + def keys; end + + # source://kamal//lib/kamal/configuration/ssh.rb#29 + def keys_only; end + + # source://kamal//lib/kamal/configuration/ssh.rb#41 + def options; end + + # source://kamal//lib/kamal/configuration/ssh.rb#17 + def port; end + + # source://kamal//lib/kamal/configuration/ssh.rb#21 + def proxy; end + + # Returns the value of attribute ssh_config. + # + # source://kamal//lib/kamal/configuration/ssh.rb#6 + def ssh_config; end + + # source://kamal//lib/kamal/configuration/ssh.rb#45 + def to_h; end + + # source://kamal//lib/kamal/configuration/ssh.rb#13 + def user; end + + private + + # source://kamal//lib/kamal/configuration/ssh.rb#54 + def log_level; end + + # source://kamal//lib/kamal/configuration/ssh.rb#50 + def logger; end +end + +# source://kamal//lib/kamal/configuration/ssh.rb#2 +Kamal::Configuration::Ssh::LOGGER = T.let(T.unsafe(nil), Logger) + +# source://kamal//lib/kamal/configuration/sshkit.rb#1 +class Kamal::Configuration::Sshkit + include ::Kamal::Configuration::Validation + extend ::Kamal::Configuration::Validation::ClassMethods + + # @return [Sshkit] a new instance of Sshkit + # + # source://kamal//lib/kamal/configuration/sshkit.rb#6 + def initialize(config:); end + + # source://kamal//lib/kamal/configuration/sshkit.rb#11 + def max_concurrent_starts; end + + # source://kamal//lib/kamal/configuration/sshkit.rb#15 + def pool_idle_timeout; end + + # Returns the value of attribute sshkit_config. + # + # source://kamal//lib/kamal/configuration/sshkit.rb#4 + def sshkit_config; end + + # source://kamal//lib/kamal/configuration/sshkit.rb#19 + def to_h; end +end + +# source://kamal//lib/kamal/configuration/validation.rb#4 +module Kamal::Configuration::Validation + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::Kamal::Configuration::Validation::ClassMethods + + # source://kamal//lib/kamal/configuration/validation.rb#17 + def validate!(config, example: T.unsafe(nil), context: T.unsafe(nil), with: T.unsafe(nil)); end + + # source://kamal//lib/kamal/configuration/validation.rb#24 + def validation_yml; end +end + +# source://kamal//lib/kamal/configuration/validation.rb#0 +module Kamal::Configuration::Validation::ClassMethods + # source://kamal//lib/kamal/configuration/validation.rb#12 + def validation_config_key; end + + # source://kamal//lib/kamal/configuration/validation.rb#8 + def validation_doc; end +end + +# source://kamal//lib/kamal/configuration/validator.rb#1 +class Kamal::Configuration::Validator + # @return [Validator] a new instance of Validator + # + # source://kamal//lib/kamal/configuration/validator.rb#4 + def initialize(config, example:, context:); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/configuration/validator.rb#2 + def config; end + + # Returns the value of attribute context. + # + # source://kamal//lib/kamal/configuration/validator.rb#2 + def context; end + + # Returns the value of attribute example. + # + # source://kamal//lib/kamal/configuration/validator.rb#2 + def example; end + + # source://kamal//lib/kamal/configuration/validator.rb#10 + def validate!; end + + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator.rb#158 + def allow_extensions?; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator.rb#72 + def boolean?(type); end + + # source://kamal//lib/kamal/configuration/validator.rb#166 + def check_unknown_keys!(config, example); end + + # @raise [Kamal::ConfigurationError] + # + # source://kamal//lib/kamal/configuration/validator.rb#134 + def error(message); end + + # source://kamal//lib/kamal/configuration/validator.rb#146 + def error_context; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator.rb#162 + def extension?(key); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator.rb#76 + def stringish?(value); end + + # source://kamal//lib/kamal/configuration/validator.rb#62 + def type_description(type); end + + # source://kamal//lib/kamal/configuration/validator.rb#138 + def type_error(*expected_types); end + + # source://kamal//lib/kamal/configuration/validator.rb#142 + def unknown_keys_error(unknown_keys); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator.rb#56 + def valid_type?(value, type); end + + # source://kamal//lib/kamal/configuration/validator.rb#15 + def validate_against_example!(validation_config, example); end + + # source://kamal//lib/kamal/configuration/validator.rb#90 + def validate_array_of!(array, type); end + + # source://kamal//lib/kamal/configuration/validator.rb#80 + def validate_array_of_or_type!(value, type); end + + # source://kamal//lib/kamal/configuration/validator.rb#100 + def validate_hash_of!(hash, type); end + + # source://kamal//lib/kamal/configuration/validator.rb#110 + def validate_servers!(servers); end + + # source://kamal//lib/kamal/configuration/validator.rb#130 + def validate_type!(value, *types); end + + # source://kamal//lib/kamal/configuration/validator.rb#150 + def with_context(context); end +end + +# source://kamal//lib/kamal/configuration/validator/accessory.rb#1 +class Kamal::Configuration::Validator::Accessory < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/accessory.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/validator/alias.rb#1 +class Kamal::Configuration::Validator::Alias < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/alias.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/validator/builder.rb#1 +class Kamal::Configuration::Validator::Builder < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/builder.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/validator/configuration.rb#1 +class Kamal::Configuration::Validator::Configuration < ::Kamal::Configuration::Validator + private + + # @return [Boolean] + # + # source://kamal//lib/kamal/configuration/validator/configuration.rb#3 + def allow_extensions?; end +end + +# source://kamal//lib/kamal/configuration/validator/env.rb#1 +class Kamal::Configuration::Validator::Env < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/env.rb#4 + def validate!; end + + private + + # source://kamal//lib/kamal/configuration/validator/env.rb#25 + def known_keys; end + + # source://kamal//lib/kamal/configuration/validator/env.rb#29 + def unknown_keys; end + + # source://kamal//lib/kamal/configuration/validator/env.rb#17 + def validate_complex_env!; end + + # source://kamal//lib/kamal/configuration/validator/env.rb#13 + def validate_simple_env!; end + + # source://kamal//lib/kamal/configuration/validator/env.rb#33 + def validate_tags!; end +end + +# source://kamal//lib/kamal/configuration/validator/env.rb#2 +Kamal::Configuration::Validator::Env::SPECIAL_KEYS = T.let(T.unsafe(nil), Array) + +# source://kamal//lib/kamal/configuration/validator/proxy.rb#1 +class Kamal::Configuration::Validator::Proxy < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/proxy.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/validator/registry.rb#1 +class Kamal::Configuration::Validator::Registry < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/registry.rb#4 + def validate!; end + + private + + # source://kamal//lib/kamal/configuration/validator/registry.rb#14 + def validate_string_or_one_item_array!(key); end +end + +# source://kamal//lib/kamal/configuration/validator/registry.rb#2 +Kamal::Configuration::Validator::Registry::STRING_OR_ONE_ITEM_ARRAY_KEYS = T.let(T.unsafe(nil), Array) + +# source://kamal//lib/kamal/configuration/validator/role.rb#1 +class Kamal::Configuration::Validator::Role < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/role.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/validator/servers.rb#1 +class Kamal::Configuration::Validator::Servers < ::Kamal::Configuration::Validator + # source://kamal//lib/kamal/configuration/validator/servers.rb#2 + def validate!; end +end + +# source://kamal//lib/kamal/configuration/volume.rb#1 +class Kamal::Configuration::Volume + # @return [Volume] a new instance of Volume + # + # source://kamal//lib/kamal/configuration/volume.rb#5 + def initialize(host_path:, container_path:); end + + # source://kamal//lib/kamal/configuration/volume.rb#3 + def argumentize(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute container_path. + # + # source://kamal//lib/kamal/configuration/volume.rb#2 + def container_path; end + + # source://kamal//lib/kamal/configuration/volume.rb#10 + def docker_args; end + + # Returns the value of attribute host_path. + # + # source://kamal//lib/kamal/configuration/volume.rb#2 + def host_path; end + + private + + # source://kamal//lib/kamal/configuration/volume.rb#15 + def host_path_for_docker_volume; end +end + +# source://kamal//lib/kamal.rb#2 +class Kamal::ConfigurationError < ::StandardError; end + +# Encode an env hash as a string where secret values have been looked up and all values escaped for Docker. +# +# source://kamal//lib/kamal/env_file.rb#2 +class Kamal::EnvFile + # @return [EnvFile] a new instance of EnvFile + # + # source://kamal//lib/kamal/env_file.rb#3 + def initialize(env); end + + # source://kamal//lib/kamal/env_file.rb#18 + def to_io; end + + # source://kamal//lib/kamal/env_file.rb#7 + def to_s; end + + # source://kamal//lib/kamal/env_file.rb#7 + def to_str; end + + private + + # source://kamal//lib/kamal/env_file.rb#25 + def docker_env_file_line(key, value); end + + # source://kamal//lib/kamal/env_file.rb#37 + def escape_docker_env_file_ascii_value(value); end + + # Escape a value to make it safe to dump in a docker file. + # + # source://kamal//lib/kamal/env_file.rb#30 + def escape_docker_env_file_value(value); end +end + +# source://kamal//lib/kamal/git.rb#1 +module Kamal::Git + extend ::Kamal::Git + + # source://kamal//lib/kamal/git.rb#12 + def email; end + + # source://kamal//lib/kamal/git.rb#16 + def revision; end + + # source://kamal//lib/kamal/git.rb#24 + def root; end + + # source://kamal//lib/kamal/git.rb#20 + def uncommitted_changes; end + + # @return [Boolean] + # + # source://kamal//lib/kamal/git.rb#4 + def used?; end + + # source://kamal//lib/kamal/git.rb#8 + def user_name; end +end + +# source://kamal//lib/kamal/secrets.rb#3 +class Kamal::Secrets + # @return [Secrets] a new instance of Secrets + # + # source://kamal//lib/kamal/secrets.rb#8 + def initialize(destination: T.unsafe(nil)); end + + # source://kamal//lib/kamal/secrets.rb#14 + def [](key); end + + # Returns the value of attribute secrets_files. + # + # source://kamal//lib/kamal/secrets.rb#4 + def secrets_files; end + + # source://kamal//lib/kamal/secrets.rb#27 + def to_h; end + + private + + # source://kamal//lib/kamal/secrets.rb#32 + def secrets; end +end + +# source://kamal//lib/kamal/secrets/adapters.rb#2 +module Kamal::Secrets::Adapters + class << self + # source://kamal//lib/kamal/secrets/adapters.rb#9 + def adapter_class(name); end + + # source://kamal//lib/kamal/secrets/adapters.rb#3 + def lookup(name); end + end +end + +# source://kamal//lib/kamal/secrets/adapters/base.rb#1 +class Kamal::Secrets::Adapters::Base + # source://kamal//lib/kamal/secrets/adapters/base.rb#4 + def fetch(secrets, account:, from: T.unsafe(nil)); end + + # source://kamal//lib/kamal/secrets/adapters/base.rb#2 + def optionize(*_arg0, **_arg1, &_arg2); end + + private + + # @raise [NotImplementedError] + # + # source://kamal//lib/kamal/secrets/adapters/base.rb#15 + def fetch_secrets(*_arg0, **_arg1, &_arg2); end + + # @raise [NotImplementedError] + # + # source://kamal//lib/kamal/secrets/adapters/base.rb#11 + def login(*_arg0, **_arg1, &_arg2); end +end + +# source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#1 +class Kamal::Secrets::Adapters::Bitwarden < ::Kamal::Secrets::Adapters::Base + private + + # source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#24 + def fetch_secrets(secrets, account:, session:); end + + # source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#45 + def items_fields(secrets); end + + # @raise [RuntimeError] + # + # source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#3 + def login(account); end + + # source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#59 + def run_command(command, session: T.unsafe(nil), raw: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/secrets/adapters/bitwarden.rb#55 + def signedin?(account); end +end + +# source://kamal//lib/kamal/secrets/adapters/last_pass.rb#1 +class Kamal::Secrets::Adapters::LastPass < ::Kamal::Secrets::Adapters::Base + private + + # @raise [RuntimeError] + # + # source://kamal//lib/kamal/secrets/adapters/last_pass.rb#14 + def fetch_secrets(secrets, account:, session:); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/secrets/adapters/last_pass.rb#10 + def loggedin?(account); end + + # source://kamal//lib/kamal/secrets/adapters/last_pass.rb#3 + def login(account); end +end + +# source://kamal//lib/kamal/secrets/adapters/one_password.rb#1 +class Kamal::Secrets::Adapters::OnePassword < ::Kamal::Secrets::Adapters::Base + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#2 + def optionize(*_arg0, **_arg1, &_arg2); end + + private + + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#18 + def fetch_secrets(secrets, account:, session:); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#13 + def loggedin?(account); end + + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#5 + def login(account); end + + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#53 + def op_item_get(vault, item, fields, account:, session:); end + + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#35 + def to_options(**options); end + + # source://kamal//lib/kamal/secrets/adapters/one_password.rb#39 + def vaults_items_fields(secrets); end +end + +# source://kamal//lib/kamal/secrets/adapters/test.rb#1 +class Kamal::Secrets::Adapters::Test < ::Kamal::Secrets::Adapters::Base + private + + # source://kamal//lib/kamal/secrets/adapters/test.rb#7 + def fetch_secrets(secrets, account:, session:); end + + # source://kamal//lib/kamal/secrets/adapters/test.rb#3 + def login(account); end +end + +# source://kamal//lib/kamal/secrets.rb#0 +module Kamal::Secrets::Dotenv; end + +# source://kamal//lib/kamal/secrets/dotenv/inline_command_substitution.rb#1 +class Kamal::Secrets::Dotenv::InlineCommandSubstitution + class << self + # source://kamal//lib/kamal/secrets/dotenv/inline_command_substitution.rb#7 + def call(value, _env, overwrite: T.unsafe(nil)); end + + # source://kamal//lib/kamal/secrets/dotenv/inline_command_substitution.rb#28 + def inline_secrets_command(command); end + + # source://kamal//lib/kamal/secrets/dotenv/inline_command_substitution.rb#3 + def install!; end + end +end + +# source://kamal//lib/kamal/tags.rb#3 +class Kamal::Tags + # @return [Tags] a new instance of Tags + # + # source://kamal//lib/kamal/tags.rb#25 + def initialize(**tags); end + + # Returns the value of attribute config. + # + # source://kamal//lib/kamal/tags.rb#4 + def config; end + + # source://kamal//lib/kamal/tags.rb#29 + def env; end + + # source://kamal//lib/kamal/tags.rb#37 + def except(*tags); end + + # Returns the value of attribute tags. + # + # source://kamal//lib/kamal/tags.rb#4 + def tags; end + + # source://kamal//lib/kamal/tags.rb#33 + def to_s; end + + class << self + # source://kamal//lib/kamal/tags.rb#11 + def default_tags(config); end + + # source://kamal//lib/kamal/tags.rb#7 + def from_config(config, **extra); end + + # source://kamal//lib/kamal/tags.rb#20 + def service_version(config); end + end +end + +# source://kamal//lib/kamal/utils.rb#3 +module Kamal::Utils + extend ::Kamal::Utils + + # Return a list of escaped shell arguments using the same named argument against the passed attributes (hash or array). + # + # source://kamal//lib/kamal/utils.rb#9 + def argumentize(argument, attributes, sensitive: T.unsafe(nil)); end + + # source://kamal//lib/kamal/utils.rb#93 + def docker_arch; end + + # source://kamal//lib/kamal/utils.rb#64 + def escape_ascii_shell_value(value); end + + # Escape a value to make it safe for shell use. + # + # source://kamal//lib/kamal/utils.rb#58 + def escape_shell_value(value); end + + # Apply a list of host or role filters, including wildcard matches + # + # source://kamal//lib/kamal/utils.rb#71 + def filter_specific_items(filters, items); end + + # Flattens a one-to-many structure into an array of two-element arrays each containing a key-value pair + # + # source://kamal//lib/kamal/utils.rb#33 + def flatten_args(args); end + + # source://kamal//lib/kamal/utils.rb#89 + def join_commands(commands); end + + # @return [Boolean] + # + # source://kamal//lib/kamal/utils.rb#105 + def older_version?(version, other_version); end + + # Returns a list of shell-dashed option arguments. If the value is true, it's treated like a value-less option. + # + # source://kamal//lib/kamal/utils.rb#22 + def optionize(args, with: T.unsafe(nil)); end + + # source://kamal//lib/kamal/utils.rb#44 + def redacted(value); end + + # Marks sensitive values for redaction in logs and human-visible output. + # Pass `redaction:` to change the default `"[REDACTED]"` redaction, e.g. + # `sensitive "#{arg}=#{secret}", redaction: "#{arg}=xxxx" + # + # source://kamal//lib/kamal/utils.rb#40 + def sensitive(*_arg0, **_arg1, &_arg2); end + + # source://kamal//lib/kamal/utils.rb#85 + def stable_sort!(elements, &block); end +end + +# source://kamal//lib/kamal/utils.rb#6 +Kamal::Utils::DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://kamal//lib/kamal/utils/sensitive.rb#4 +class Kamal::Utils::Sensitive + include ::SSHKit::Redaction + + # @return [Sensitive] a new instance of Sensitive + # + # source://kamal//lib/kamal/utils/sensitive.rb#12 + def initialize(value, redaction: T.unsafe(nil)); end + + # Sensitive values won't leak into YAML output. + # + # source://kamal//lib/kamal/utils/sensitive.rb#17 + def encode_with(coder); end + + # source://kamal//lib/kamal/utils/sensitive.rb#10 + def inspect(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute redaction. + # + # source://kamal//lib/kamal/utils/sensitive.rb#8 + def redaction; end + + # source://kamal//lib/kamal/utils/sensitive.rb#9 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute unredacted. + # + # source://kamal//lib/kamal/utils/sensitive.rb#8 + def unredacted; end +end + +# source://kamal//lib/kamal/version.rb#2 +Kamal::VERSION = T.let(T.unsafe(nil), String) + +# source://kamal//lib/kamal/sshkit_with_ext.rb#8 +class SSHKit::Backend::Abstract + include ::SSHKit::Backend::Abstract::CommandEnvMerge + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#36 + def initialize(host, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#105 + def as(who, &_block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#70 + def background(*args); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#64 + def capture(*args); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#13 + def capture_with_debug(*args, **kwargs); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#9 + def capture_with_info(*args, **kwargs); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#17 + def capture_with_pretty_json(*args, **kwargs); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#137 + def download!(_remote, _local = T.unsafe(nil), _options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def error(*args, **_arg1, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#78 + def execute(*args); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fatal(*args, **_arg1, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#27 + def host; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def info(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def log(*args, **_arg1, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#51 + def make(commands = T.unsafe(nil)); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#21 + def puts_by_host(host, output, type: T.unsafe(nil)); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#55 + def rake(commands = T.unsafe(nil)); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#47 + def redact(arg); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#29 + def run; end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#59 + def test(*args); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#136 + def upload!(_local, _remote, _options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def warn(*args, **_arg1, &block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#97 + def with(environment, &_block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#83 + def within(directory, &_block); end + + private + + # source://kamal//lib/kamal/sshkit_with_ext.rb#36 + def command(args, options); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#147 + def create_command_and_execute(args, options); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#138 + def execute_command(_cmd); end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#143 + def output; end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#151 + def pwd_path; end + + class << self + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#126 + def config; end + + # source://sshkit/1.23.1/lib/sshkit/backends/abstract.rb#130 + def configure; end + end +end + +# Our execution pattern is for the CLI execute args lists returned +# from commands, but this doesn't support returning execution options +# from the command. +# +# Support this by using kwargs for CLI options and merging with the +# args-extracted options. +# +# source://kamal//lib/kamal/sshkit_with_ext.rb#31 +module SSHKit::Backend::Abstract::CommandEnvMerge + private + + # Destructure options to pluck out env for merge + # + # source://kamal//lib/kamal/sshkit_with_ext.rb#44 + def build_command(args, env: T.unsafe(nil), **options); end + + # Override to merge options returned by commands in the args list with + # options passed by the CLI and pass them along as kwargs. + # + # source://kamal//lib/kamal/sshkit_with_ext.rb#36 + def command(args, options); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#49 + def default_command_options; end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#53 + def env_for(env); end +end + +# source://kamal//lib/kamal/sshkit_with_ext.rb#64 +class SSHKit::Backend::Netssh < ::SSHKit::Backend::Abstract + include ::SSHKit::Backend::Netssh::LimitConcurrentStartsInstance + extend ::SSHKit::Backend::Netssh::LimitConcurrentStartsClass + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#87 + def download!(remote, local = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#79 + def upload!(local, remote, options = T.unsafe(nil)); end + + private + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#141 + def execute_command(cmd); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#116 + def transfer_summarizer(action, options = T.unsafe(nil)); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#83 + def with_ssh(&block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#201 + def with_transfer(summarizer); end + + class << self + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#24 + def assert_valid_transfer_method!(method); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#109 + def config; end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#68 + def configure(&block); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#103 + def pool; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#103 + def pool=(_arg0); end + end +end + +# source://kamal//lib/kamal/sshkit_with_ext.rb#60 +class SSHKit::Backend::Netssh::Configuration + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#35 + def initialize; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#31 + def connection_timeout; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#31 + def connection_timeout=(_arg0); end + + # Returns the value of attribute max_concurrent_starts. + # + # source://kamal//lib/kamal/sshkit_with_ext.rb#61 + def max_concurrent_starts; end + + # Sets the attribute max_concurrent_starts + # + # @param value the value to set the attribute max_concurrent_starts to. + # + # source://kamal//lib/kamal/sshkit_with_ext.rb#61 + def max_concurrent_starts=(_arg0); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#31 + def pty; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#31 + def pty=(_arg0); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#45 + def ssh_options; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#33 + def ssh_options=(_arg0); end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#32 + def transfer_method; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#39 + def transfer_method=(method); end + + private + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#64 + def assign_defaults; end + + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#52 + def default_options; end +end + +# source://kamal//lib/kamal/sshkit_with_ext.rb#65 +module SSHKit::Backend::Netssh::LimitConcurrentStartsClass + # source://kamal//lib/kamal/sshkit_with_ext.rb#68 + def configure(&block); end + + # Returns the value of attribute start_semaphore. + # + # source://kamal//lib/kamal/sshkit_with_ext.rb#66 + def start_semaphore; end +end + +# source://kamal//lib/kamal/sshkit_with_ext.rb#81 +module SSHKit::Backend::Netssh::LimitConcurrentStartsInstance + private + + # source://kamal//lib/kamal/sshkit_with_ext.rb#94 + def start_with_concurrency_limit(*args); end + + # source://kamal//lib/kamal/sshkit_with_ext.rb#83 + def with_ssh(&block); end +end + +module SSHKit::Runner; end + +# source://kamal//lib/kamal/sshkit_with_ext.rb#108 +class SSHKit::Runner::Parallel < ::SSHKit::Runner::Abstract + include ::SSHKit::Runner::Parallel::CompleteAll + + # source://kamal//lib/kamal/sshkit_with_ext.rb#115 + def execute; end +end + +# SSHKit joins the threads in sequence and fails on the first error it encounters, which means that we wait threads +# before the first failure to complete but not for ones after. +# +# We'll patch it to wait for them all to complete, and to record all the threads that errored so we can see when a +# problem occurs on multiple hosts. +# +# source://kamal//lib/kamal/sshkit_with_ext.rb#114 +module SSHKit::Runner::Parallel::CompleteAll + # source://kamal//lib/kamal/sshkit_with_ext.rb#115 + def execute; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi new file mode 100644 index 0000000..a0375c0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,14238 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + + +# source://language_server-protocol//lib/language_server/protocol/version.rb#1 +module LanguageServer; end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#2 +module LanguageServer::Protocol; end + +# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 +module LanguageServer::Protocol::Constant; end + +# The kind of a code action. +# +# Kinds are a hierarchical list of identifiers separated by `.`, +# e.g. `"refactor.extract.function"`. +# +# The set of kinds is open and client needs to announce the kinds it supports +# to the server during initialization. +# A set of predefined code action kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 +module LanguageServer::Protocol::Constant::CodeActionKind; end + +# Empty kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) + +# Base kind for quickfix actions: 'quickfix'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 +LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) + +# Base kind for refactoring actions: 'refactor'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) + +# Base kind for refactoring extraction actions: 'refactor.extract'. +# +# Example extract actions: +# +# - Extract method +# - Extract function +# - Extract variable +# - Extract interface from class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) + +# Base kind for refactoring inline actions: 'refactor.inline'. +# +# Example inline actions: +# +# - Inline function +# - Inline variable +# - Inline constant +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) + +# Base kind for refactoring rewrite actions: 'refactor.rewrite'. +# +# Example rewrite actions: +# +# - Convert JavaScript function to class +# - Add or remove parameter +# - Encapsulate field +# - Make method static +# - Move method to base class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) + +# Base kind for source actions: `source`. +# +# Source code actions apply to the entire file. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) + +# Base kind for a 'fix all' source action: `source.fixAll`. +# +# 'Fix all' actions automatically fix errors that have a clear fix that +# do not require user input. They should not suppress errors or perform +# unsafe fixes such as generating new types or classes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) + +# Base kind for an organize imports source action: +# `source.organizeImports`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) + +# The reason why code actions were requested. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end + +# Code actions were requested automatically. +# +# This typically happens when current selection in a file changes, but can +# also be triggered when file content changes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) + +# Code actions were explicitly requested by the user or by an extension. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# The kind of a completion entry. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionItemKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 +LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 +LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 +LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 +LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 +LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 +LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 +LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 +LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 +LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 +LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 +LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 +LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 +LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 +LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 +LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 +LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 +LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 +LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Completion item tags are extra annotations that tweak the rendering of a +# completion item. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 +module LanguageServer::Protocol::Constant::CompletionItemTag; end + +# Render a completion as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 +LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# How a completion was triggered +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionTriggerKind; end + +# Completion was triggered by typing an identifier (24x7 code +# complete), manual invocation (e.g Ctrl+Space) or via API. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Completion was triggered by a trigger character specified by +# the `triggerCharacters` properties of the +# `CompletionRegistrationOptions`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# Completion was re-triggered as the current completion list is incomplete. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 +module LanguageServer::Protocol::Constant::DiagnosticSeverity; end + +# Reports an error. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 +LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) + +# Reports a hint. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 +LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) + +# Reports an information. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 +LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) + +# Reports a warning. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 +LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) + +# The diagnostic tags. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 +module LanguageServer::Protocol::Constant::DiagnosticTag; end + +# Deprecated or obsolete code. +# +# Clients are allowed to rendered diagnostics with this tag strike through. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 +LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Unused or unnecessary code. +# +# Clients are allowed to render diagnostics with this tag faded out +# instead of having an error squiggle. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 +LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) + +# The document diagnostic report kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end + +# A diagnostic report with a full +# set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) + +# A report indicating that the last +# returned report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) + +# A document highlight kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentHighlightKind; end + +# Read-access of a symbol, like reading a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 +LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) + +# A textual occurrence. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 +LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) + +# Write-access of a symbol, like writing to a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 +LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 +module LanguageServer::Protocol::Constant::ErrorCodes; end + +# The server detected that the content of a document got +# modified outside normal conditions. A server should +# NOT send this error code if it detects a content change +# in it unprocessed messages. The result even computed +# on an older state might still be useful for the client. +# +# If a client decides that a result is not of any use anymore +# the client should cancel the request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 +LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 +LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# This is the end range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. No LSP error codes should +# be defined between the start and end range. For backwards +# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` +# are left in the range. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# This is the end range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 +LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 +LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# The client has canceled a request and a server as detected +# the cancel. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# A request failed but it was syntactically correct, e.g the +# method name was known and the parameters were valid. The error +# message should contain human readable information about why +# the request failed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) + +# The server cancelled the request. This error code should +# only be used for requests that explicitly support being +# server cancellable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# Error code indicating that a server received a notification or +# request before the server has received the `initialize` request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 +LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 +module LanguageServer::Protocol::Constant::FailureHandlingKind; end + +# Applying the workspace change is simply aborted if one of the changes +# provided fails. All operations executed before the failing operation +# stay executed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 +LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) + +# If the workspace edit contains only textual file changes they are +# executed transactional. If resource changes (create, rename or delete +# file) are part of the change the failure handling strategy is abort. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 +LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# All operations are executed transactional. That means they either all +# succeed or no changes at all are applied to the workspace. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 +LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# The client tries to undo the operations already executed. But there is no +# guarantee that this is succeeding. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 +LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) + +# The file event type. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 +module LanguageServer::Protocol::Constant::FileChangeType; end + +# The file got changed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 +LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) + +# The file got created. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 +LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) + +# The file got deleted. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 +LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) + +# A pattern kind describing if a glob pattern matches a file a folder or +# both. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 +module LanguageServer::Protocol::Constant::FileOperationPatternKind; end + +# The pattern matches a file only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) + +# The pattern matches a folder only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) + +# A set of predefined range kinds. +# The type is a string since the value set is extensible +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 +module LanguageServer::Protocol::Constant::FoldingRangeKind; end + +# Folding range for a comment +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 +LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) + +# Folding range for imports or includes +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 +LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) + +# Folding range for a region (e.g. `#region`) +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 +LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) + +# Known error codes for an `InitializeErrorCodes`; +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 +module LanguageServer::Protocol::Constant::InitializeErrorCodes; end + +# If the protocol version provided by the client can't be handled by +# the server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 +LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) + +# Inlay hint kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 +module LanguageServer::Protocol::Constant::InlayHintKind; end + +# An inlay hint that is for a parameter. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 +LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) + +# An inlay hint that for a type annotation. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 +LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) + +# Defines whether the insert text in a completion item should be interpreted as +# plain text or a snippet. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 +module LanguageServer::Protocol::Constant::InsertTextFormat; end + +# The primary text to be inserted is treated as a plain string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 +LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) + +# The primary text to be inserted is treated as a snippet. +# +# A snippet can define tab stops and placeholders with `$1`, `$2` +# and `${3:foo}`. `$0` defines the final tab stop, it defaults to +# the end of the snippet. Placeholders with equal identifiers are linked, +# that is typing in one will update others too. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 +LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) + +# How whitespace and indentation is handled during completion +# item insertion. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 +module LanguageServer::Protocol::Constant::InsertTextMode; end + +# The editor adjusts leading whitespace of new lines so that +# they match the indentation up to the cursor of the line for +# which the item is accepted. +# +# Consider a line like this: <2tabs><3tabs>foo. Accepting a +# multi line completion item is indented using 2 tabs and all +# following lines inserted will be indented using 2 tabs as well. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 +LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) + +# The insertion or replace strings is taken as it is. If the +# value is multi line the lines below the cursor will be +# inserted using the indentation defined in the string value. +# The client will not apply any kind of adjustments to the +# string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 +LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) + +# Describes the content type that a client supports in various +# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. +# +# Please note that `MarkupKinds` must not start with a `$`. This kinds +# are reserved for internal usage. +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 +module LanguageServer::Protocol::Constant::MarkupKind; end + +# Markdown is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 +LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) + +# Plain text is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 +LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 +module LanguageServer::Protocol::Constant::MessageType; end + +# An error message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 +LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) + +# An information message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 +LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) + +# A log message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 +LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) + +# A warning message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 +LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) + +# The moniker kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 +module LanguageServer::Protocol::Constant::MonikerKind; end + +# The moniker represents a symbol that is exported from a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 +LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) + +# The moniker represent a symbol that is imported into a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 +LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) + +# The moniker represents a symbol that is local to a project (e.g. a local +# variable of a function, a class not visible outside the project, ...) +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 +LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) + +# A notebook cell kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 +module LanguageServer::Protocol::Constant::NotebookCellKind; end + +# A code-cell is source code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 +LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) + +# A markup-cell is formatted source that is used for display. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 +LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) + +# A type indicating how positions are encoded, +# specifically what column offsets mean. +# A set of predefined position encoding kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 +module LanguageServer::Protocol::Constant::PositionEncodingKind; end + +# Character offsets count UTF-16 code units. +# +# This is the default and must always be supported +# by servers +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-32 code units. +# +# Implementation note: these are the same as Unicode code points, +# so this `PositionEncodingKind` may also be used for an +# encoding-agnostic representation of character offsets. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-8 code units (e.g bytes). +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 +module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end + +# The client's default behavior is to select the identifier +# according to the language's syntax rule. +# +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 +LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) + +# The kind of resource operations supported by the client. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 +module LanguageServer::Protocol::Constant::ResourceOperationKind; end + +# Supports creating new files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 +LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) + +# Supports deleting existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 +LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) + +# Supports renaming existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 +LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenTypes; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 +LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 +LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 +LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 +LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 +LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 +LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 +LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 +LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) + +# Represents a generic type. Acts as a fallback for types which +# can't be mapped to a specific type like class or enum. +# +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 +LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) + +# How a signature help was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end + +# Signature help was triggered by the cursor moving or by the document +# content changing. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) + +# Signature help was invoked manually by the user or by a command. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Signature help was triggered by a trigger character. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# A symbol kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 +module LanguageServer::Protocol::Constant::SymbolKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 +LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 +LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 +LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 +LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 +LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 +LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 +LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 +LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 +LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 +LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 +LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 +LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 +LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 +LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 +LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 +LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 +LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 +LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 +LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 +LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 +LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 +LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 +LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 +LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 +LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 +LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Symbol tags are extra annotations that tweak the rendering of a symbol. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 +module LanguageServer::Protocol::Constant::SymbolTag; end + +# Render a symbol as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 +LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Represents reasons why a text document is saved. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 +module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end + +# Automatic after a delay. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) + +# When the editor lost focus. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) + +# Manually triggered, e.g. by the user pressing save, by starting +# debugging, or by an API call. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) + +# Defines how the host (editor) should sync document changes to the language +# server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 +module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end + +# Documents are synced by always sending the full content +# of the document. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) + +# Documents are synced by sending the full content on open. +# After that only incremental updates to the document are +# sent. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) + +# Documents should not be synced at all. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 +module LanguageServer::Protocol::Constant::TokenFormat; end + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 +LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) + +# Moniker uniqueness level to define scope of the moniker. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 +module LanguageServer::Protocol::Constant::UniquenessLevel; end + +# The moniker is only unique inside a document +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 +LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) + +# The moniker is globally unique +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 +LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the group to which a project belongs +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 +LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) + +# The moniker is unique inside a project for which a dump got created +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 +LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the moniker scheme. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 +LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 +module LanguageServer::Protocol::Constant::WatchKind; end + +# Interested in change events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 +LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) + +# Interested in create events. +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 +LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) + +# Interested in delete events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 +LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 +module LanguageServer::Protocol::Interface; end + +# A special text edit with an additional change annotation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 +class LanguageServer::Protocol::Interface::AnnotatedTextEdit + # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 + def initialize(range:, new_text:, annotation_id:); end + + # The actual annotation identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams + # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 + def initialize(edit:, label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 + def attributes; end + + # The edits to apply. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 + def edit; end + + # An optional label of the workspace edit. This label is + # presented in the user interface for example on an undo + # stack to undo the workspace edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult + # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 + def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end + + # Indicates whether the edit was applied or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 + def applied; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 + def attributes; end + + # Depending on the client's failure handling strategy `failedChange` + # might contain the index of the change that failed. This property is + # only available if the client signals a `failureHandling` strategy + # in its client capabilities. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 + def failed_change; end + + # An optional textual description for why the edit was not applied. + # This may be used by the server for diagnostic logging or to provide + # a suitable error for a request that triggered the edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 + def failure_reason; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities + # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall + # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 + def initialize(from:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 + def attributes; end + + # The item that makes the call. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 + def from; end + + # The ranges at which the calls appear. This is relative to the caller + # denoted by [`this.from`](#CallHierarchyIncomingCall.from). + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 + def from_ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams + # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyItem + # @return [CallHierarchyItem] a new instance of CallHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 + def attributes; end + + # A data entry field that is preserved between a call hierarchy prepare and + # incoming calls or outgoing calls requests. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#CallHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOptions + # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall + # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 + def initialize(to:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 + def attributes; end + + # The range at which this item is called. This is the range relative to + # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 + def from_ranges; end + + # The item that is called. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 + def to; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams + # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams + # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions + # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 +class LanguageServer::Protocol::Interface::CancelParams + # @return [CancelParams] a new instance of CancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 + def initialize(id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 + def attributes; end + + # The request id to cancel. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 + def to_json(*args); end +end + +# Additional information that describes document changes. +# +# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 +class LanguageServer::Protocol::Interface::ChangeAnnotation + # @return [ChangeAnnotation] a new instance of ChangeAnnotation + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 + def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 + def attributes; end + + # A human-readable string which is rendered less prominent in + # the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 + def description; end + + # A human-readable string describing the actual change. The string + # is rendered prominent in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 + def label; end + + # A flag which indicates that user confirmation is needed + # before applying the change. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 + def needs_confirmation; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ClientCapabilities + # @return [ClientCapabilities] a new instance of ClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 + def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 + def attributes; end + + # Experimental client capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 + def experimental; end + + # General client capabilities. + # + # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 + def general; end + + # Capabilities specific to the notebook document support. + # + # @return [NotebookDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 + def notebook_document; end + + # Text document specific client capabilities. + # + # @return [TextDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 + def to_json(*args); end + + # Window specific client capabilities. + # + # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 + def window; end + + # Workspace specific client capabilities. + # + # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 + def workspace; end +end + +# A code action represents a change that can be performed in code, e.g. to fix +# a problem or to refactor code. +# +# A CodeAction must set either `edit` and/or a `command`. If both are supplied, +# the `edit` is applied first, then the `command` is executed. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 +class LanguageServer::Protocol::Interface::CodeAction + # @return [CodeAction] a new instance of CodeAction + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 + def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 + def attributes; end + + # A command this code action executes. If a code action + # provides an edit and a command, first the edit is + # executed and then the command. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 + def command; end + + # A data entry field that is preserved on a code action between + # a `textDocument/codeAction` and a `codeAction/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 + def data; end + + # The diagnostics that this code action resolves. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 + def diagnostics; end + + # Marks that the code action cannot currently be applied. + # + # Clients should follow the following guidelines regarding disabled code + # actions: + # + # - Disabled code actions are not shown in automatic lightbulbs code + # action menus. + # + # - Disabled actions are shown as faded out in the code action menu when + # the user request a more specific type of code action, such as + # refactorings. + # + # - If the user has a keybinding that auto applies a code action and only + # a disabled code actions are returned, the client should show the user + # an error message with `reason` in the editor. + # + # @return [{ reason: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 + def disabled; end + + # The workspace edit this code action performs. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 + def edit; end + + # Marks this as a preferred action. Preferred actions are used by the + # `auto fix` command and can be targeted by keybindings. + # + # A quick fix should be marked preferred if it properly addresses the + # underlying error. A refactoring should be marked preferred if it is the + # most reasonable choice of actions to take. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 + def is_preferred; end + + # The kind of the code action. + # + # Used to filter code actions. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 + def kind; end + + # A short, human-readable, title for this code action. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeActionClientCapabilities + # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 + def attributes; end + + # The client supports code action literals as a valid + # response of the `textDocument/codeAction` request. + # + # @return [{ codeActionKind: { valueSet: string[]; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 + def code_action_literal_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/codeAction` and a + # `codeAction/resolve` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 + def data_support; end + + # Whether code action supports the `disabled` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 + def disabled_support; end + + # Whether code action supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # `CodeAction#edit` property by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 + def honors_change_annotations; end + + # Whether code action supports the `isPreferred` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 + def is_preferred_support; end + + # Whether the client supports resolving additional code action + # properties via a separate `codeAction/resolve` request. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 + def to_json(*args); end +end + +# Contains additional diagnostic information about the context in which +# a code action is run. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 +class LanguageServer::Protocol::Interface::CodeActionContext + # @return [CodeActionContext] a new instance of CodeActionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 + def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 + def attributes; end + + # An array of diagnostics known on the client side overlapping the range + # provided to the `textDocument/codeAction` request. They are provided so + # that the server knows which errors are currently presented to the user + # for the given range. There is no guarantee that these accurately reflect + # the error state of the resource. The primary parameter + # to compute code actions is the provided range. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 + def diagnostics; end + + # Requested kind of actions to return. + # + # Actions not of this kind are filtered out by the client before being + # shown. So servers can omit computing them. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 + def only; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 + def to_json(*args); end + + # The reason why code actions were requested. + # + # @return [CodeActionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionOptions + # @return [CodeActionOptions] a new instance of CodeActionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 + def code_action_kinds; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 + def work_done_progress; end +end + +# Params for the CodeActionRequest +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 +class LanguageServer::Protocol::Interface::CodeActionParams + # @return [CodeActionParams] a new instance of CodeActionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 + def attributes; end + + # Context carrying additional information. + # + # @return [CodeActionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 + def partial_result_token; end + + # The range for which the command was invoked. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 + def range; end + + # The document in which the command was invoked. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions + # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 + def code_action_kinds; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 + def document_selector; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 + def work_done_progress; end +end + +# Structure to capture a description for an error code. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 +class LanguageServer::Protocol::Interface::CodeDescription + # @return [CodeDescription] a new instance of CodeDescription + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 + def initialize(href:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 + def attributes; end + + # An URI to open with more information about the diagnostic error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 + def href; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 + def to_json(*args); end +end + +# A code lens represents a command that should be shown along with +# source text, like the number of references, a way to run tests, etc. +# +# A code lens is _unresolved_ when no command is associated to it. For +# performance reasons the creation of a code lens and resolving should be done +# in two stages. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 +class LanguageServer::Protocol::Interface::CodeLens + # @return [CodeLens] a new instance of CodeLens + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 + def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 + def attributes; end + + # The command this code lens represents. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 + def command; end + + # A data entry field that is preserved on a code lens item between + # a code lens and a code lens resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 + def data; end + + # The range in which this code lens is valid. Should only span a single + # line. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensClientCapabilities + # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 + def attributes; end + + # Whether code lens supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensOptions + # @return [CodeLensOptions] a new instance of CodeLensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 + def attributes; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 +class LanguageServer::Protocol::Interface::CodeLensParams + # @return [CodeLensParams] a new instance of CodeLensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 + def partial_result_token; end + + # The document to request code lens for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions + # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 + def document_selector; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities + # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from the + # server to the client. + # + # Note that this event is global and will force the client to refresh all + # code lenses currently shown. It should be used with absolute care and is + # useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# Represents a color in RGBA space. +# +# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 +class LanguageServer::Protocol::Interface::Color + # @return [Color] a new instance of Color + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 + def initialize(red:, green:, blue:, alpha:); end + + # The alpha component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 + def alpha; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 + def attributes; end + + # The blue component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 + def blue; end + + # The green component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 + def green; end + + # The red component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 + def red; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 +class LanguageServer::Protocol::Interface::ColorInformation + # @return [ColorInformation] a new instance of ColorInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 + def initialize(range:, color:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 + def attributes; end + + # The actual color value for this color range. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 + def color; end + + # The range in the document where this color appears. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentation + # @return [ColorPresentation] a new instance of ColorPresentation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 + def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end + + # An optional array of additional [text edits](#TextEdit) that are applied + # when selecting this color presentation. Edits must not overlap with the + # main [edit](#ColorPresentation.textEdit) nor with themselves. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 + def attributes; end + + # The label of this color presentation. It will be shown on the color + # picker header. By default this is also the text that is inserted when + # selecting this color presentation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 + def label; end + + # An [edit](#TextEdit) which is applied to a document when selecting + # this presentation for the color. When `falsy` the + # [label](#ColorPresentation.label) is used. + # + # @return [TextEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 + def text_edit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentationParams + # @return [ColorPresentationParams] a new instance of ColorPresentationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 + def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 + def attributes; end + + # The color information to request presentations for. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 + def color; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 + def partial_result_token; end + + # The range where the color would be inserted. Serves as a context. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 +class LanguageServer::Protocol::Interface::Command + # @return [Command] a new instance of Command + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 + def initialize(title:, command:, arguments: T.unsafe(nil)); end + + # Arguments that the command handler should be + # invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 + def command; end + + # Title of the command, like `save`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CompletionClientCapabilities + # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 + def attributes; end + + # The client supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 + def completion_item; end + + # @return [{ valueSet?: CompletionItemKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 + def completion_item_kind; end + + # The client supports the following `CompletionList` specific + # capabilities. + # + # @return [{ itemDefaults?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 + def completion_list; end + + # The client supports to send additional context information for a + # `textDocument/completion` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 + def context_support; end + + # Whether completion supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 + def dynamic_registration; end + + # The client's default when the completion item doesn't provide a + # `insertTextMode` property. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 + def insert_text_mode; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 + def to_json(*args); end +end + +# Contains additional information about the context in which a completion +# request is triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 +class LanguageServer::Protocol::Interface::CompletionContext + # @return [CompletionContext] a new instance of CompletionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 + def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 + def to_json(*args); end + + # The trigger character (a single character) that has trigger code + # complete. Is undefined if + # `triggerKind !== CompletionTriggerKind.TriggerCharacter` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 + def trigger_character; end + + # How the completion was triggered. + # + # @return [CompletionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 +class LanguageServer::Protocol::Interface::CompletionItem + # @return [CompletionItem] a new instance of CompletionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 + def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # An optional array of additional text edits that are applied when + # selecting this completion. Edits must not overlap (including the same + # insert position) with the main edit nor with themselves. + # + # Additional text edits should be used to change text unrelated to the + # current cursor position (for example adding an import statement at the + # top of the file if the completion item will insert an unqualified type). + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 + def attributes; end + + # An optional command that is executed *after* inserting this completion. + # *Note* that additional modifications to the current document should be + # described with the additionalTextEdits-property. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 + def command; end + + # An optional set of characters that when pressed while this completion is + # active will accept it first and then type that character. *Note* that all + # commit characters should have `length=1` and that superfluous characters + # will be ignored. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 + def commit_characters; end + + # A data entry field that is preserved on a completion item between + # a completion and a completion resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 + def data; end + + # Indicates if this item is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 + def deprecated; end + + # A human-readable string with additional information + # about this item, like type or symbol information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 + def detail; end + + # A human-readable string that represents a doc-comment. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 + def documentation; end + + # A string that should be used when filtering a set of + # completion items. When `falsy` the label is used as the + # filter text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 + def filter_text; end + + # A string that should be inserted into a document when selecting + # this completion. When `falsy` the label is used as the insert text + # for this item. + # + # The `insertText` is subject to interpretation by the client side. + # Some tools might not take the string literally. For example + # VS Code when code complete is requested in this example + # `con` and a completion item with an `insertText` of + # `console` is provided it will only insert `sole`. Therefore it is + # recommended to use `textEdit` instead since it avoids additional client + # side interpretation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 + def insert_text; end + + # The format of the insert text. The format applies to both the + # `insertText` property and the `newText` property of a provided + # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + # + # Please note that the insertTextFormat doesn't apply to + # `additionalTextEdits`. + # + # @return [InsertTextFormat] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 + def insert_text_format; end + + # How whitespace and indentation is handled during completion + # item insertion. If not provided the client's default value depends on + # the `textDocument.completion.insertTextMode` client capability. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 + def insert_text_mode; end + + # The kind of this completion item. Based of the kind + # an icon is chosen by the editor. The standardized set + # of available values is defined in `CompletionItemKind`. + # + # @return [CompletionItemKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 + def kind; end + + # The label of this completion item. + # + # The label property is also by default the text that + # is inserted when selecting this completion. + # + # If label details are provided the label itself should + # be an unqualified name of the completion item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 + def label; end + + # Additional details for the label + # + # @return [CompletionItemLabelDetails] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 + def label_details; end + + # Select this item when showing. + # + # *Note* that only one completion item can be selected and that the + # tool / client decides which item that is. The rule is that the *first* + # item of those that match best is selected. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 + def preselect; end + + # A string that should be used when comparing this item + # with other items. When `falsy` the label is used + # as the sort text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 + def sort_text; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 + def tags; end + + # An edit which is applied to a document when selecting this completion. + # When an edit is provided the value of `insertText` is ignored. + # + # *Note:* The range of the edit must be a single line range and it must + # contain the position at which completion has been requested. + # + # Most editors support two different operations when accepting a completion + # item. One is to insert a completion text and the other is to replace an + # existing text with a completion text. Since this can usually not be + # predetermined by a server it can report both ranges. Clients need to + # signal support for `InsertReplaceEdit`s via the + # `textDocument.completion.completionItem.insertReplaceSupport` client + # capability property. + # + # *Note 1:* The text edit's range as well as both ranges from an insert + # replace edit must be a [single line] and they must contain the position + # at which completion has been requested. + # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + # must be a prefix of the edit's replace range, that means it must be + # contained and starting at the same position. + # + # @return [TextEdit | InsertReplaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 + def text_edit; end + + # The edit text used if the completion item is part of a CompletionList and + # CompletionList defines an item default for the text edit range. + # + # Clients will only honor this property if they opt into completion list + # item defaults using the capability `completionList.itemDefaults`. + # + # If not provided and a list's default range is provided the label + # property is used as a text. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 + def text_edit_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 + def to_json(*args); end +end + +# Additional details for a completion item label. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 +class LanguageServer::Protocol::Interface::CompletionItemLabelDetails + # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 + def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 + def attributes; end + + # An optional string which is rendered less prominently after + # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified + # names or file path. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 + def description; end + + # An optional string which is rendered less prominently directly after + # {@link CompletionItem.label label}, without any spacing. Should be + # used for function signatures or type annotations. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 + def detail; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 + def to_json(*args); end +end + +# Represents a collection of [completion items](#CompletionItem) to be +# presented in the editor. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 +class LanguageServer::Protocol::Interface::CompletionList + # @return [CompletionList] a new instance of CompletionList + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 + def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 + def attributes; end + + # This list is not complete. Further typing should result in recomputing + # this list. + # + # Recomputed lists have all their items replaced (not appended) in the + # incomplete completion sessions. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 + def is_incomplete; end + + # In many cases the items of an actual completion result share the same + # value for properties like `commitCharacters` or the range of a text + # edit. A completion list can therefore define item defaults which will + # be used if a completion item itself doesn't specify the value. + # + # If a completion list specifies a default value and a completion item + # also specifies a corresponding value the one from the item is used. + # + # Servers are only allowed to return default values if the client + # signals support for this via the `completionList.itemDefaults` + # capability. + # + # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 + def item_defaults; end + + # The completion items. + # + # @return [CompletionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 + def to_json(*args); end +end + +# Completion options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 +class LanguageServer::Protocol::Interface::CompletionOptions + # @return [CompletionOptions] a new instance of CompletionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 + def completion_item; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 +class LanguageServer::Protocol::Interface::CompletionParams + # @return [CompletionParams] a new instance of CompletionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 + def attributes; end + + # The completion context. This is only available if the client specifies + # to send this using the client capability + # `completion.contextSupport === true` + # + # @return [CompletionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CompletionRegistrationOptions + # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 + def completion_item; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 + def document_selector; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationItem + # @return [ConfigurationItem] a new instance of ConfigurationItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 + def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 + def attributes; end + + # The scope to get the configuration section for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 + def scope_uri; end + + # The configuration section asked for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 + def section; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationParams + # @return [ConfigurationParams] a new instance of ConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 + def attributes; end + + # @return [ConfigurationItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 + def to_json(*args); end +end + +# Create file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 +class LanguageServer::Protocol::Interface::CreateFile + # @return [CreateFile] a new instance of CreateFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 + def attributes; end + + # A create + # + # @return ["create"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 + def kind; end + + # Additional options + # + # @return [CreateFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 + def to_json(*args); end + + # The resource to create. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 + def uri; end +end + +# Options to create a file. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 +class LanguageServer::Protocol::Interface::CreateFileOptions + # @return [CreateFileOptions] a new instance of CreateFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 + def attributes; end + + # Ignore if exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite existing file. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated creation +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 +class LanguageServer::Protocol::Interface::CreateFilesParams + # @return [CreateFilesParams] a new instance of CreateFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 + def attributes; end + + # An array of all files/folders created in this operation. + # + # @return [FileCreate[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DeclarationClientCapabilities + # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 + def attributes; end + + # Whether declaration supports dynamic registration. If this is set to + # `true` the client supports the new `DeclarationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of declaration links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationOptions + # @return [DeclarationOptions] a new instance of DeclarationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 +class LanguageServer::Protocol::Interface::DeclarationParams + # @return [DeclarationParams] a new instance of DeclarationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions + # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DefinitionClientCapabilities + # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 + def attributes; end + + # Whether definition supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionOptions + # @return [DefinitionOptions] a new instance of DefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 +class LanguageServer::Protocol::Interface::DefinitionParams + # @return [DefinitionParams] a new instance of DefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions + # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 + def work_done_progress; end +end + +# Delete file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 +class LanguageServer::Protocol::Interface::DeleteFile + # @return [DeleteFile] a new instance of DeleteFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 + def attributes; end + + # A delete + # + # @return ["delete"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 + def kind; end + + # Delete options. + # + # @return [DeleteFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 + def to_json(*args); end + + # The file to delete. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 + def uri; end +end + +# Delete file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 +class LanguageServer::Protocol::Interface::DeleteFileOptions + # @return [DeleteFileOptions] a new instance of DeleteFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 + def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 + def attributes; end + + # Ignore the operation if the file doesn't exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 + def ignore_if_not_exists; end + + # Delete the content recursively if a folder is denoted. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 + def recursive; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated deletes +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 +class LanguageServer::Protocol::Interface::DeleteFilesParams + # @return [DeleteFilesParams] a new instance of DeleteFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 + def attributes; end + + # An array of all files/folders deleted in this operation. + # + # @return [FileDelete[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 +class LanguageServer::Protocol::Interface::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 + def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 + def attributes; end + + # The diagnostic's code, which might appear in the user interface. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 + def code; end + + # An optional property to describe the error code. + # + # @return [CodeDescription] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 + def code_description; end + + # A data entry field that is preserved between a + # `textDocument/publishDiagnostics` notification and + # `textDocument/codeAction` request. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 + def data; end + + # The diagnostic's message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 + def message; end + + # The range at which the message applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 + def range; end + + # An array of related diagnostic information, e.g. when symbol-names within + # a scope collide all definitions can be marked via this property. + # + # @return [DiagnosticRelatedInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 + def related_information; end + + # The diagnostic's severity. Can be omitted. If omitted it is up to the + # client to interpret diagnostics as error, warning, info or hint. + # + # @return [DiagnosticSeverity] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 + def severity; end + + # A human-readable string describing the source of this + # diagnostic, e.g. 'typescript' or 'super lint'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 + def source; end + + # Additional metadata about the diagnostic. + # + # @return [DiagnosticTag[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 + def to_json(*args); end +end + +# Client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities + # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 + def dynamic_registration; end + + # Whether the clients supports related documents for document diagnostic + # pulls. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 + def related_document_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 + def to_json(*args); end +end + +# Diagnostic options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticOptions + # @return [DiagnosticOptions] a new instance of DiagnosticOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 + def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 + def attributes; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 + def workspace_diagnostics; end +end + +# Diagnostic registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions + # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 + def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 + def id; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 + def workspace_diagnostics; end +end + +# Represents a related message and source code location for a diagnostic. +# This should be used to point to code locations that cause or are related to +# a diagnostics, e.g when duplicating a symbol in a scope. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 +class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation + # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 + def initialize(location:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 + def attributes; end + + # The location of this related diagnostic information. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 + def location; end + + # The message of this related diagnostic information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 + def to_json(*args); end +end + +# Cancellation data returned from a diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData + # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 + def initialize(retrigger_request:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 + def attributes; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 + def retrigger_request; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 + def to_json(*args); end +end + +# Workspace client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities + # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # pulled diagnostics currently shown. It should be used with absolute care + # and is useful for situation where a server for example detects a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities + # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 + def attributes; end + + # Did change configuration notification supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationParams + # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 + def initialize(settings:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 + def attributes; end + + # The actual changed settings + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 + def settings; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 + def to_json(*args); end +end + +# The params sent in a change notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams + # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 + def initialize(notebook_document:, change:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 + def attributes; end + + # The actual changes to the notebook document. + # + # The change describes single state change to the notebook document. + # So it moves a notebook document, its cells and its cell text document + # contents from state S to S'. + # + # To mirror the content of a notebook using change events use the + # following approach: + # - start with the same initial content + # - apply the 'notebookDocument/didChange' notifications in the order + # you receive them. + # + # @return [NotebookDocumentChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 + def change; end + + # The notebook document that did change. The version number points + # to the version after all provided changes have been applied. + # + # @return [VersionedNotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams + # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 + def initialize(text_document:, content_changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 + def attributes; end + + # The actual content changes. The content changes describe single state + # changes to the document. So if there are two content changes c1 (at + # array index 0) and c2 (at array index 1) for a document in state S then + # c1 moves the document from S to S' and c2 from S' to S''. So c1 is + # computed on the state S and c2 is computed on the state S'. + # + # To mirror the content of a document using change events use the following + # approach: + # - start with the same initial content + # - apply the 'textDocument/didChange' notifications in the order you + # receive them. + # - apply the `TextDocumentContentChangeEvent`s in a single notification + # in the order you receive them. + # + # @return [TextDocumentContentChangeEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 + def content_changes; end + + # The document that did change. The version number points + # to the version after all provided content changes have + # been applied. + # + # @return [VersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities + # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 + def attributes; end + + # Did change watched files notification supports dynamic registration. + # Please note that the current protocol doesn't support static + # configuration for file changes from the server side. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client has support for relative patterns + # or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 + def relative_pattern_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams + # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 + def initialize(changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 + def attributes; end + + # The actual file events. + # + # @return [FileEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 + def changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 + def to_json(*args); end +end + +# Describe options to be used when registering for file system change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions + # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 + def initialize(watchers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 + def to_json(*args); end + + # The watchers to register. + # + # @return [FileSystemWatcher[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 + def watchers; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams + # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 + def initialize(event:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 + def attributes; end + + # The actual workspace folder change event. + # + # @return [WorkspaceFoldersChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 + def event; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 + def to_json(*args); end +end + +# The params sent in a close notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams + # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell that got closed. + # + # @return [TextDocumentIdentifier[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got closed. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams + # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 + def attributes; end + + # The document that was closed. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in an open notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams + # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell. + # + # @return [TextDocumentItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got opened. + # + # @return [NotebookDocument] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams + # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 + def attributes; end + + # The document that was opened. + # + # @return [TextDocumentItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in a save notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams + # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 + def initialize(notebook_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 + def attributes; end + + # The notebook document that got saved. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams + # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 + def initialize(text_document:, text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 + def attributes; end + + # Optional the content when saved. Depends on the includeText value + # when the save notification was requested. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 + def text; end + + # The document that was saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities + # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 + def attributes; end + + # Whether document color supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorOptions + # @return [DocumentColorOptions] a new instance of DocumentColorOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorParams + # @return [DocumentColorParams] a new instance of DocumentColorParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions + # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 + def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 + def work_done_progress; end +end + +# Parameters of the document diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticParams + # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 + def partial_result_token; end + + # The result id of a previous response if provided. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 + def work_done_token; end +end + +# A partial result for a document diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult + # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 + def initialize(related_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 + def related_documents; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 +class LanguageServer::Protocol::Interface::DocumentFilter + # @return [DocumentFilter] a new instance of DocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 + def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 + def attributes; end + + # A language id, like `typescript`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 + def language; end + + # A glob pattern, like `*.{ts,js}`. + # + # Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities + # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingOptions + # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingParams + # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 + def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 + def attributes; end + + # The format options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 + def options; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions + # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# A document highlight is a range inside a text document which deserves +# special attention. Usually a document highlight is visualized by changing +# the background color of its range. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 +class LanguageServer::Protocol::Interface::DocumentHighlight + # @return [DocumentHighlight] a new instance of DocumentHighlight + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 + def initialize(range:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 + def attributes; end + + # The highlight kind, default is DocumentHighlightKind.Text. + # + # @return [DocumentHighlightKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 + def kind; end + + # The range this highlight applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities + # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 + def attributes; end + + # Whether document highlight supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightOptions + # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightParams + # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions + # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 + def work_done_progress; end +end + +# A document link is a range in a text document that links to an internal or +# external resource, like another text document or a web site. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 +class LanguageServer::Protocol::Interface::DocumentLink + # @return [DocumentLink] a new instance of DocumentLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 + def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 + def attributes; end + + # A data entry field that is preserved on a document link between a + # DocumentLinkRequest and a DocumentLinkResolveRequest. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 + def data; end + + # The range this link applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 + def range; end + + # The uri this link points to. If missing a resolve request is sent later. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 + def target; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 + def to_json(*args); end + + # The tooltip text when you hover over this link. + # + # If a tooltip is provided, is will be displayed in a string that includes + # instructions on how to trigger the link, such as `{0} (ctrl + click)`. + # The specific instructions vary depending on OS, user settings, and + # localization. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 + def tooltip; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities + # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 + def attributes; end + + # Whether document link supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 + def to_json(*args); end + + # Whether the client supports the `tooltip` property on `DocumentLink`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 + def tooltip_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkOptions + # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 + def attributes; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkParams + # @return [DocumentLinkParams] a new instance of DocumentLinkParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 + def partial_result_token; end + + # The document to provide document links for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions + # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 + def document_selector; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities + # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether on type formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions + # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 + def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 + def attributes; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams + # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 + def initialize(text_document:, position:, ch:, options:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 + def attributes; end + + # The character that has been typed that triggered the formatting + # on type request. That is not necessarily the last character that + # got inserted into the document since the client could auto insert + # characters as well (e.g. like automatic brace completion). + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 + def ch; end + + # The formatting options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 + def options; end + + # The position around which the on type formatting should happen. + # This is not necessarily the exact position where the character denoted + # by the property `ch` got typed. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 + def position; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions + # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 + def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 + def document_selector; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities + # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions + # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams + # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 + def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 + def attributes; end + + # The format options + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 + def options; end + + # The range to format + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 + def range; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions + # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# Represents programming constructs like variables, classes, interfaces etc. +# that appear in a document. Document symbols can be hierarchical and they +# have two ranges: one that encloses its definition and one that points to its +# most interesting range, e.g. the range of an identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 +class LanguageServer::Protocol::Interface::DocumentSymbol + # @return [DocumentSymbol] a new instance of DocumentSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 + def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 + def attributes; end + + # Children of this symbol, e.g. properties of a class. + # + # @return [DocumentSymbol[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 + def children; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 + def deprecated; end + + # More detail for this symbol, e.g the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 + def detail; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 + def kind; end + + # The name of this symbol. Will be displayed in the user interface and + # therefore must not be an empty string or a string only consisting of + # white spaces. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else like comments. This information is typically used to + # determine if the clients cursor is inside the symbol to reveal in the + # symbol in the UI. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the `range`. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 + def selection_range; end + + # Tags for this document symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities + # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 + def attributes; end + + # Whether document symbol supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 + def dynamic_registration; end + + # The client supports hierarchical document symbols. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 + def hierarchical_document_symbol_support; end + + # The client supports an additional label presented in the UI when + # registering a document symbol provider. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 + def label_support; end + + # Specific capabilities for the `SymbolKind` in the + # `textDocument/documentSymbol` request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 + def symbol_kind; end + + # The client supports tags on `SymbolInformation`. Tags are supported on + # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolOptions + # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 + def attributes; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolParams + # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions + # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 + def document_selector; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities + # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 + def attributes; end + + # Execute command supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandOptions + # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandParams + # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 + def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Arguments that the command should be invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 + def command; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 + def work_done_token; end +end + +# Execute command registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 +class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions + # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 +class LanguageServer::Protocol::Interface::ExecutionSummary + # @return [ExecutionSummary] a new instance of ExecutionSummary + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 + def initialize(execution_order:, success: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 + def attributes; end + + # A strict monotonically increasing value + # indicating the execution order of a cell + # inside a notebook. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 + def execution_order; end + + # Whether the execution was successful or + # not if known by the client. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 + def to_json(*args); end +end + +# Represents information on a file/folder create. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 +class LanguageServer::Protocol::Interface::FileCreate + # @return [FileCreate] a new instance of FileCreate + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being created. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 + def uri; end +end + +# Represents information on a file/folder delete. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 +class LanguageServer::Protocol::Interface::FileDelete + # @return [FileDelete] a new instance of FileDelete + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being deleted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 + def uri; end +end + +# An event describing a file change. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 +class LanguageServer::Protocol::Interface::FileEvent + # @return [FileEvent] a new instance of FileEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 + def initialize(uri:, type:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 + def to_json(*args); end + + # The change type. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 + def type; end + + # The file's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 + def uri; end +end + +# A filter to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 +class LanguageServer::Protocol::Interface::FileOperationFilter + # @return [FileOperationFilter] a new instance of FileOperationFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 + def initialize(pattern:, scheme: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 + def attributes; end + + # The actual file operation pattern. + # + # @return [FileOperationPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 + def pattern; end + + # A Uri like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 + def to_json(*args); end +end + +# A pattern to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 +class LanguageServer::Protocol::Interface::FileOperationPattern + # @return [FileOperationPattern] a new instance of FileOperationPattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 + def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 + def attributes; end + + # The glob pattern to match. Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 + def glob; end + + # Whether to match files or folders with this pattern. + # + # Matches both if undefined. + # + # @return [FileOperationPatternKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 + def matches; end + + # Additional options used during matching. + # + # @return [FileOperationPatternOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 + def to_json(*args); end +end + +# Matching options for the file operation pattern. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationPatternOptions + # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 + def initialize(ignore_case: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 + def attributes; end + + # The pattern should be matched ignoring casing. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 + def ignore_case; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 + def to_json(*args); end +end + +# The options to register for file operations. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions + # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 + def initialize(filters:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 + def attributes; end + + # The actual filters. + # + # @return [FileOperationFilter[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 + def filters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 + def to_json(*args); end +end + +# Represents information on a file/folder rename. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 +class LanguageServer::Protocol::Interface::FileRename + # @return [FileRename] a new instance of FileRename + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 + def initialize(old_uri:, new_uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 + def attributes; end + + # A file:// URI for the new location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 + def new_uri; end + + # A file:// URI for the original location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 + def old_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 +class LanguageServer::Protocol::Interface::FileSystemWatcher + # @return [FileSystemWatcher] a new instance of FileSystemWatcher + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 + def initialize(glob_pattern:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 + def attributes; end + + # The glob pattern to watch. See {@link GlobPattern glob pattern} + # for more detail. + # + # @return [GlobPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 + def glob_pattern; end + + # The kind of events of interest. If omitted it defaults + # to WatchKind.Create | WatchKind.Change | WatchKind.Delete + # which is 7. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 + def to_json(*args); end +end + +# Represents a folding range. To be valid, start and end line must be bigger +# than zero and smaller than the number of lines in the document. Clients +# are free to ignore invalid ranges. +# +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 +class LanguageServer::Protocol::Interface::FoldingRange + # @return [FoldingRange] a new instance of FoldingRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 + def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 + def attributes; end + + # The text that the client should show when the specified range is + # collapsed. If not defined or not supported by the client, a default + # will be chosen by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 + def collapsed_text; end + + # The zero-based character offset before the folded range ends. If not + # defined, defaults to the length of the end line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 + def end_character; end + + # The zero-based end line of the range to fold. The folded area ends with + # the line's last character. To be valid, the end must be zero or larger + # and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 + def end_line; end + + # Describes the kind of the folding range such as `comment` or `region`. + # The kind is used to categorize folding ranges and used by commands like + # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an + # enumeration of standardized kinds. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 + def kind; end + + # The zero-based character offset from where the folded range starts. If + # not defined, defaults to the length of the start line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 + def start_character; end + + # The zero-based start line of the range to fold. The folded area starts + # after the line's last character. To be valid, the end must be zero or + # larger and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 + def start_line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities + # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 + def attributes; end + + # Whether implementation supports dynamic registration for folding range + # providers. If this is set to `true` the client supports the new + # `FoldingRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 + def dynamic_registration; end + + # Specific options for the folding range. + # + # @return [{ collapsedText?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 + def folding_range; end + + # Specific options for the folding range kind. + # + # @return [{ valueSet?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 + def folding_range_kind; end + + # If set, the client signals that it only supports folding complete lines. + # If set, client will ignore specified `startCharacter` and `endCharacter` + # properties in a FoldingRange. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 + def line_folding_only; end + + # The maximum number of folding ranges that the client prefers to receive + # per document. The value serves as a hint, servers are free to follow the + # limit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 + def range_limit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeOptions + # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeParams + # @return [FoldingRangeParams] a new instance of FoldingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions + # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 + def work_done_progress; end +end + +# Value-object describing what options formatting should use. +# +# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 +class LanguageServer::Protocol::Interface::FormattingOptions + # @return [FormattingOptions] a new instance of FormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 + def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 + def attributes; end + + # Insert a newline character at the end of the file if one does not exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 + def insert_final_newline; end + + # Prefer spaces over tabs. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 + def insert_spaces; end + + # Size of a tab in spaces. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 + def tab_size; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 + def to_json(*args); end + + # Trim all newlines after the final newline at the end of the file. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 + def trim_final_newlines; end + + # Trim trailing whitespace on a line. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 + def trim_trailing_whitespace; end +end + +# A diagnostic report with a full set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport + # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 + def to_json(*args); end +end + +# The result of a hover request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 +class LanguageServer::Protocol::Interface::Hover + # @return [Hover] a new instance of Hover + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 + def initialize(contents:, range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 + def attributes; end + + # The hover's content + # + # @return [MarkupContent | MarkedString | MarkedString[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 + def contents; end + + # An optional range is a range inside a text document + # that is used to visualize a hover, e.g. by changing the background color. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::HoverClientCapabilities + # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 + def attributes; end + + # Client supports the follow content formats if the content + # property refers to a `literal of type MarkupContent`. + # The order describes the preferred format of the client. + # + # @return [MarkupKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 + def content_format; end + + # Whether hover supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 +class LanguageServer::Protocol::Interface::HoverOptions + # @return [HoverOptions] a new instance of HoverOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 +class LanguageServer::Protocol::Interface::HoverParams + # @return [HoverParams] a new instance of HoverParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 +class LanguageServer::Protocol::Interface::HoverRegistrationOptions + # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 +class LanguageServer::Protocol::Interface::HoverResult + # @return [HoverResult] a new instance of HoverResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ImplementationClientCapabilities + # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `ImplementationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationOptions + # @return [ImplementationOptions] a new instance of ImplementationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 +class LanguageServer::Protocol::Interface::ImplementationParams + # @return [ImplementationParams] a new instance of ImplementationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions + # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 +class LanguageServer::Protocol::Interface::InitializeError + # @return [InitializeError] a new instance of InitializeError + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 + def initialize(retry:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 + def attributes; end + + # Indicates whether the client execute the following retry logic: + # (1) show the message provided by the ResponseError to the user + # (2) user selects retry or cancel + # (3) if user selected retry the initialize method is sent again. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 + def retry; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 +class LanguageServer::Protocol::Interface::InitializeParams + # @return [InitializeParams] a new instance of InitializeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 + def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 + def attributes; end + + # The capabilities provided by the client (editor or tool) + # + # @return [ClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 + def capabilities; end + + # Information about the client + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 + def client_info; end + + # User provided initialization options. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 + def initialization_options; end + + # The locale the client is currently showing the user interface + # in. This must not necessarily be the locale of the operating + # system. + # + # Uses IETF language tags as the value's syntax + # (See https://en.wikipedia.org/wiki/IETF_language_tag) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 + def locale; end + + # The process Id of the parent process that started the server. Is null if + # the process has not been started by another process. If the parent + # process is not alive then the server should exit (see exit notification) + # its process. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 + def process_id; end + + # The rootPath of the workspace. Is null + # if no folder is open. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 + def root_path; end + + # The rootUri of the workspace. Is null if no + # folder is open. If both `rootPath` and `rootUri` are set + # `rootUri` wins. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 + def root_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 + def to_json(*args); end + + # The initial trace setting. If omitted trace is disabled ('off'). + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 + def trace; end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 + def work_done_token; end + + # The workspace folders configured in the client when the server starts. + # This property is only available if the client supports workspace folders. + # It can be `null` if the client supports workspace folders but none are + # configured. + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 + def workspace_folders; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 +class LanguageServer::Protocol::Interface::InitializeResult + # @return [InitializeResult] a new instance of InitializeResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 + def initialize(capabilities:, server_info: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 + def attributes; end + + # The capabilities the language server provides. + # + # @return [ServerCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 + def capabilities; end + + # Information about the server. + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 + def server_info; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 +class LanguageServer::Protocol::Interface::InitializedParams + # @return [InitializedParams] a new instance of InitializedParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 + def initialize; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 + def to_json(*args); end +end + +# Inlay hint information. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 +class LanguageServer::Protocol::Interface::InlayHint + # @return [InlayHint] a new instance of InlayHint + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 + def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 + def attributes; end + + # A data entry field that is preserved on an inlay hint between + # a `textDocument/inlayHint` and a `inlayHint/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 + def data; end + + # The kind of this hint. Can be omitted in which case the client + # should fall back to a reasonable default. + # + # @return [InlayHintKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 + def kind; end + + # The label of this hint. A human readable string or an array of + # InlayHintLabelPart label parts. + # + # *Note* that neither the string nor the label part can be empty. + # + # @return [string | InlayHintLabelPart[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 + def label; end + + # Render padding before the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 + def padding_left; end + + # Render padding after the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 + def padding_right; end + + # The position of this hint. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 + def position; end + + # Optional text edits that are performed when accepting this inlay hint. + # + # *Note* that edits are expected to change the document so that the inlay + # hint (or its nearest variant) is now part of the document and the inlay + # hint itself is now obsolete. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 + def text_edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 + def to_json(*args); end + + # The tooltip text when you hover over this item. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 + def tooltip; end +end + +# Inlay hint client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintClientCapabilities + # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 + def attributes; end + + # Whether inlay hints support dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 + def dynamic_registration; end + + # Indicates which properties a client can resolve lazily on an inlay + # hint. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 + def to_json(*args); end +end + +# An inlay hint label part allows for interactive and composite labels +# of inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 +class LanguageServer::Protocol::Interface::InlayHintLabelPart + # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 + def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 + def attributes; end + + # An optional command for this label part. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 + def command; end + + # An optional source code location that represents this + # label part. + # + # The editor will use this location for the hover and for code navigation + # features: This part will become a clickable link that resolves to the + # definition of the symbol at the given location (not necessarily the + # location itself), it shows the hover that shows at the given location, + # and it shows a context menu with further code navigation commands. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 + def location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 + def to_json(*args); end + + # The tooltip text when you hover over this label part. Depending on + # the client capability `inlayHint.resolveSupport` clients might resolve + # this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 + def tooltip; end + + # The value of this label part. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 + def value; end +end + +# Inlay hint options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintOptions + # @return [InlayHintOptions] a new instance of InlayHintOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 + def attributes; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 + def work_done_progress; end +end + +# A parameter literal used in inlay hint requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 +class LanguageServer::Protocol::Interface::InlayHintParams + # @return [InlayHintParams] a new instance of InlayHintParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 + def attributes; end + + # The visible document range for which inlay hints should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 + def work_done_token; end +end + +# Inlay hint options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions + # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 + def id; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 + def work_done_progress; end +end + +# Client workspace capabilities specific to inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities + # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inlay hints currently shown. It should be used with absolute care and + # is useful for situation where a server for example detects a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# Client capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueClientCapabilities + # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 + def attributes; end + + # Whether implementation supports dynamic registration for inline + # value providers. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 +class LanguageServer::Protocol::Interface::InlineValueContext + # @return [InlineValueContext] a new instance of InlineValueContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 + def initialize(frame_id:, stopped_location:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 + def attributes; end + + # The stack frame (as a DAP Id) where the execution has stopped. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 + def frame_id; end + + # The document range where execution has stopped. + # Typically the end position of the range denotes the line where the + # inline values are shown. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 + def stopped_location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 + def to_json(*args); end +end + +# Provide an inline value through an expression evaluation. +# +# If only a range is specified, the expression will be extracted from the +# underlying document. +# +# An optional expression can be used to override the extracted expression. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 +class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression + # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 + def initialize(range:, expression: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 + def attributes; end + + # If specified the expression overrides the extracted expression. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 + def expression; end + + # The document range for which the inline value applies. + # The range is used to extract the evaluatable expression from the + # underlying document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 + def to_json(*args); end +end + +# Inline value options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueOptions + # @return [InlineValueOptions] a new instance of InlineValueOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 + def work_done_progress; end +end + +# A parameter literal used in inline value requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 +class LanguageServer::Protocol::Interface::InlineValueParams + # @return [InlineValueParams] a new instance of InlineValueParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 + def attributes; end + + # Additional information about the context in which inline values were + # requested. + # + # @return [InlineValueContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 + def context; end + + # The document range for which inline values should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 + def work_done_token; end +end + +# Inline value options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions + # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 + def work_done_progress; end +end + +# Provide inline value as text. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 +class LanguageServer::Protocol::Interface::InlineValueText + # @return [InlineValueText] a new instance of InlineValueText + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 + def initialize(range:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 + def attributes; end + + # The document range for which the inline value applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 + def range; end + + # The text of the inline value. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 + def to_json(*args); end +end + +# Provide inline value through a variable lookup. +# +# If only a range is specified, the variable name will be extracted from +# the underlying document. +# +# An optional variable name can be used to override the extracted name. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 +class LanguageServer::Protocol::Interface::InlineValueVariableLookup + # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 + def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 + def attributes; end + + # How to perform the lookup. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 + def case_sensitive_lookup; end + + # The document range for which the inline value applies. + # The range is used to extract the variable name from the underlying + # document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 + def to_json(*args); end + + # If specified the name of the variable to look up. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 + def variable_name; end +end + +# Client workspace capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities + # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inline values currently shown. It should be used with absolute care and + # is useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# A special text edit to provide an insert and a replace operation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 +class LanguageServer::Protocol::Interface::InsertReplaceEdit + # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 + def initialize(new_text:, insert:, replace:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 + def attributes; end + + # The range if the insert is requested + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 + def insert; end + + # The string to be inserted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 + def new_text; end + + # The range if the replace is requested. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 + def replace; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities + # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 + def attributes; end + + # Whether the implementation supports dynamic registration. + # If this is set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions + # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeParams + # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions + # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRanges + # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 + def initialize(ranges:, word_pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 + def attributes; end + + # A list of ranges that can be renamed together. The ranges must have + # identical length and contain identical text content. The ranges cannot + # overlap. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 + def ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 + def to_json(*args); end + + # An optional word pattern (regular expression) that describes valid + # contents for the given ranges. If no pattern is provided, the client + # configuration's word pattern will be used. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 + def word_pattern; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 +class LanguageServer::Protocol::Interface::Location + # @return [Location] a new instance of Location + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 + def initialize(uri:, range:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 + def attributes; end + + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 +class LanguageServer::Protocol::Interface::LocationLink + # @return [LocationLink] a new instance of LocationLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 + def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 + def attributes; end + + # Span of the origin of this link. + # + # Used as the underlined span for mouse interaction. Defaults to the word + # range at the mouse position. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 + def origin_selection_range; end + + # The full target range of this link. If the target for example is a symbol + # then target range is the range enclosing this symbol not including + # leading/trailing whitespace but everything else like comments. This + # information is typically used to highlight the range in the editor. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 + def target_range; end + + # The range that should be selected and revealed when this link is being + # followed, e.g the name of a function. Must be contained by the + # `targetRange`. See also `DocumentSymbol#range` + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 + def target_selection_range; end + + # The target resource identifier of this link. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 + def target_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 +class LanguageServer::Protocol::Interface::LogMessageParams + # @return [LogMessageParams] a new instance of LogMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 + def type; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 +class LanguageServer::Protocol::Interface::LogTraceParams + # @return [LogTraceParams] a new instance of LogTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 + def initialize(message:, verbose: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 + def attributes; end + + # The message to be logged. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 + def to_json(*args); end + + # Additional information that can be computed if the `trace` configuration + # is set to `'verbose'` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 + def verbose; end +end + +# A `MarkupContent` literal represents a string value which content is +# interpreted base on its kind flag. Currently the protocol supports +# `plaintext` and `markdown` as markup kinds. +# +# If the kind is `markdown` then the value can contain fenced code blocks like +# in GitHub issues. +# +# Here is an example how such a string can be constructed using +# JavaScript / TypeScript: +# ```typescript +# let markdown: MarkdownContent = { +# kind: MarkupKind.Markdown, +# value: [ +# '# Header', +# 'Some text', +# '```typescript', +# 'someCode();', +# '```' +# ].join('\n') +# }; +# ``` +# +# *Please Note* that clients might sanitize the return markdown. A client could +# decide to remove HTML from the markdown to avoid script execution. +# +# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 +class LanguageServer::Protocol::Interface::MarkupContent + # @return [MarkupContent] a new instance of MarkupContent + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 + def initialize(kind:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 + def attributes; end + + # The type of the Markup + # + # @return [MarkupKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 + def to_json(*args); end + + # The content itself + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 +class LanguageServer::Protocol::Interface::Message + # @return [Message] a new instance of Message + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 + def initialize(jsonrpc:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 + def jsonrpc; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 +class LanguageServer::Protocol::Interface::MessageActionItem + # @return [MessageActionItem] a new instance of MessageActionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 + def initialize(title:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 + def attributes; end + + # A short title like 'Retry', 'Open Log' etc. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 + def to_json(*args); end +end + +# Moniker definition to match LSIF 0.5 moniker definition. +# +# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 +class LanguageServer::Protocol::Interface::Moniker + # @return [Moniker] a new instance of Moniker + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 + def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 + def attributes; end + + # The identifier of the moniker. The value is opaque in LSIF however + # schema owners are allowed to define the structure if they want. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 + def identifier; end + + # The moniker kind if known. + # + # @return [MonikerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 + def kind; end + + # The scheme of the moniker. For example tsc or .Net + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 + def to_json(*args); end + + # The scope in which the moniker is unique + # + # @return [UniquenessLevel] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 + def unique; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::MonikerClientCapabilities + # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerOptions + # @return [MonikerOptions] a new instance of MonikerOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 +class LanguageServer::Protocol::Interface::MonikerParams + # @return [MonikerParams] a new instance of MonikerParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerRegistrationOptions + # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 + def work_done_progress; end +end + +# A notebook cell. +# +# A cell's document URI must be unique across ALL notebook +# cells and can therefore be used to uniquely identify a +# notebook cell or the cell's text document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 +class LanguageServer::Protocol::Interface::NotebookCell + # @return [NotebookCell] a new instance of NotebookCell + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 + def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 + def attributes; end + + # The URI of the cell's text document + # content. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 + def document; end + + # Additional execution summary information + # if supported by the client. + # + # @return [ExecutionSummary] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 + def execution_summary; end + + # The cell's kind + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 + def kind; end + + # Additional metadata stored with the cell. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 + def to_json(*args); end +end + +# A change describing how to move a `NotebookCell` +# array from state S to S'. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellArrayChange + # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 + def initialize(start:, delete_count:, cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 + def attributes; end + + # The new cells, if any + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 + def cells; end + + # The deleted cells + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 + def delete_count; end + + # The start offset of the cell that changed. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 + def to_json(*args); end +end + +# A notebook cell text document filter denotes a cell text +# document by different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter + # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 + def initialize(notebook:, language: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 + def attributes; end + + # A language id like `python`. + # + # Will be matched against the language id of the + # notebook cell document. '*' matches every language. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 + def language; end + + # A filter that matches against the notebook + # containing the notebook cell. If a string + # value is provided it matches against the + # notebook type. '*' matches every notebook. + # + # @return [string | NotebookDocumentFilter] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 + def notebook; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 + def to_json(*args); end +end + +# A notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocument + # @return [NotebookDocument] a new instance of NotebookDocument + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 + def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 + def attributes; end + + # The cells of a notebook. + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 + def cells; end + + # Additional metadata stored with the notebook + # document. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 + def metadata; end + + # The type of the notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 + def notebook_type; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 + def version; end +end + +# A change event for a notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent + # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 + def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 + def attributes; end + + # Changes to cells + # + # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 + def cells; end + + # The changed meta data if any. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 + def to_json(*args); end +end + +# Capabilities specific to the notebook document support. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities + # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 + def initialize(synchronization:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to notebook document synchronization + # + # @return [NotebookDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 + def to_json(*args); end +end + +# A notebook document filter denotes a notebook document by +# different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookDocumentFilter + # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 + def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 + def attributes; end + + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 + def notebook_type; end + + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 + def to_json(*args); end +end + +# A literal to identify a notebook document in the client. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier + # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 + def uri; end +end + +# Notebook specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities + # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 + def attributes; end + + # Whether implementation supports dynamic registration. If this is + # set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 + def dynamic_registration; end + + # The client supports sending execution summary data per cell. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 + def execution_summary_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 + def to_json(*args); end +end + +# Options specific to a notebook plus its cells +# to be synced to the server. +# +# If a selector provides a notebook document +# filter but no cell selector all cells of a +# matching notebook document will be synced. +# +# If a selector provides no notebook document +# filter but only a cell selector all notebook +# documents that contain at least one matching +# cell will be synced. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions + # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 + def initialize(notebook_selector:, save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 + def attributes; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 + def to_json(*args); end +end + +# Registration options specific to a notebook. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions + # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 + def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 + def id; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 +class LanguageServer::Protocol::Interface::NotificationMessage + # @return [NotificationMessage] a new instance of NotificationMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 + def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 + def method; end + + # The notification's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier + # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. If an optional versioned text document + # identifier is sent from the server to the client and the file is not + # open in the editor (the server has not received an open notification + # before) the server can send `null` to indicate that the version is + # known and the content on disk is the master (as specified with document + # content ownership). + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 + def version; end +end + +# Represents a parameter of a callable-signature. A parameter can +# have a label and a doc-comment. +# +# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 +class LanguageServer::Protocol::Interface::ParameterInformation + # @return [ParameterInformation] a new instance of ParameterInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 + def initialize(label:, documentation: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 + def attributes; end + + # The human-readable doc-comment of this parameter. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 + def documentation; end + + # The label of this parameter information. + # + # Either a string or an inclusive start and exclusive end offsets within + # its containing signature label. (see SignatureInformation.label). The + # offsets are based on a UTF-16 string representation as `Position` and + # `Range` does. + # + # *Note*: a label of type string should be a substring of its containing + # signature label. Its intended use case is to highlight the parameter + # label part in the `SignatureInformation.label`. + # + # @return [string | [number, number]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 +class LanguageServer::Protocol::Interface::PartialResultParams + # @return [PartialResultParams] a new instance of PartialResultParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 + def initialize(partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 +class LanguageServer::Protocol::Interface::Position + # @return [Position] a new instance of Position + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 + def initialize(line:, character:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 + def attributes; end + + # Character offset on a line in a document (zero-based). The meaning of this + # offset is determined by the negotiated `PositionEncodingKind`. + # + # If the character value is greater than the line length it defaults back + # to the line length. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 + def character; end + + # Line position in a document (zero-based). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 + def line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 +class LanguageServer::Protocol::Interface::PrepareRenameParams + # @return [PrepareRenameParams] a new instance of PrepareRenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 + def work_done_token; end +end + +# A previous result id in a workspace pull request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 +class LanguageServer::Protocol::Interface::PreviousResultId + # @return [PreviousResultId] a new instance of PreviousResultId + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 + def initialize(uri:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 + def to_json(*args); end + + # The URI for which the client knows a + # result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 + def uri; end + + # The value of the previous result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 +class LanguageServer::Protocol::Interface::ProgressParams + # @return [ProgressParams] a new instance of ProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 + def initialize(token:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 + def to_json(*args); end + + # The progress token provided by the client or server. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 + def token; end + + # The progress data. + # + # @return [T] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities + # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 + def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 + def attributes; end + + # Client supports a codeDescription property + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 + def code_description_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/publishDiagnostics` and + # `textDocument/codeAction` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 + def data_support; end + + # Whether the clients accepts diagnostics with related information. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 + def related_information; end + + # Client supports the tag property to provide meta data about a diagnostic. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: DiagnosticTag[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 + def to_json(*args); end + + # Whether the client interprets the version property of the + # `textDocument/publishDiagnostics` notification's parameter. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 + def version_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsParams + # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 + def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 + def attributes; end + + # An array of diagnostic information items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 + def diagnostics; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 + def uri; end + + # Optional the version number of the document the diagnostics are published + # for. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 +class LanguageServer::Protocol::Interface::Range + # @return [Range] a new instance of Range + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 + def initialize(start:, end:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 + def attributes; end + + # The range's end position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 + def end; end + + # The range's start position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ReferenceClientCapabilities + # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 + def attributes; end + + # Whether references supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 +class LanguageServer::Protocol::Interface::ReferenceContext + # @return [ReferenceContext] a new instance of ReferenceContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 + def initialize(include_declaration:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 + def attributes; end + + # Include the declaration of the current symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 + def include_declaration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceOptions + # @return [ReferenceOptions] a new instance of ReferenceOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 +class LanguageServer::Protocol::Interface::ReferenceParams + # @return [ReferenceParams] a new instance of ReferenceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 + def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 + def attributes; end + + # @return [ReferenceContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions + # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 + def work_done_progress; end +end + +# General parameters to register for a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 +class LanguageServer::Protocol::Interface::Registration + # @return [Registration] a new instance of Registration + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 + def initialize(id:, method:, register_options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 + def id; end + + # The method / capability to register for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 + def method; end + + # Options necessary for the registration. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 + def register_options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 +class LanguageServer::Protocol::Interface::RegistrationParams + # @return [RegistrationParams] a new instance of RegistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 + def initialize(registrations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 + def attributes; end + + # @return [Registration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 + def registrations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 + def to_json(*args); end +end + +# Client capabilities specific to regular expressions. +# +# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities + # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 + def initialize(engine:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 + def attributes; end + + # The engine's name. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 + def engine; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 + def to_json(*args); end + + # The engine's version. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 + def version; end +end + +# A full diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport + # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 + def related_documents; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 + def to_json(*args); end +end + +# An unchanged diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport + # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 + def related_documents; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 + def to_json(*args); end +end + +# A relative pattern is a helper to construct glob patterns that are matched +# relatively to a base URI. The common value for a `baseUri` is a workspace +# folder root, but it can be another absolute URI as well. +# +# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 +class LanguageServer::Protocol::Interface::RelativePattern + # @return [RelativePattern] a new instance of RelativePattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 + def initialize(base_uri:, pattern:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 + def attributes; end + + # A workspace folder or a base URI to which this pattern will be matched + # against relatively. + # + # @return [string | WorkspaceFolder] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 + def base_uri; end + + # The actual glob pattern; + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 + def pattern; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::RenameClientCapabilities + # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 + def attributes; end + + # Whether rename supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # rename request's workspace edit by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 + def honors_change_annotations; end + + # Client supports testing for validity of rename operations + # before execution. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 + def prepare_support; end + + # Client supports the default behavior result + # (`{ defaultBehavior: boolean }`). + # + # The value indicates the default behavior used by the + # client. + # + # @return [1] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 + def prepare_support_default_behavior; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 + def to_json(*args); end +end + +# Rename file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 +class LanguageServer::Protocol::Interface::RenameFile + # @return [RenameFile] a new instance of RenameFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 + def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 + def attributes; end + + # A rename + # + # @return ["rename"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 + def kind; end + + # The new location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 + def new_uri; end + + # The old (existing) location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 + def old_uri; end + + # Rename options. + # + # @return [RenameFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 + def to_json(*args); end +end + +# Rename file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 +class LanguageServer::Protocol::Interface::RenameFileOptions + # @return [RenameFileOptions] a new instance of RenameFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 + def attributes; end + + # Ignores if target exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite target if existing. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated renames +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 +class LanguageServer::Protocol::Interface::RenameFilesParams + # @return [RenameFilesParams] a new instance of RenameFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 + def attributes; end + + # An array of all files/folders renamed in this operation. When a folder + # is renamed, only the folder will be included, and not its children. + # + # @return [FileRename[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 +class LanguageServer::Protocol::Interface::RenameOptions + # @return [RenameOptions] a new instance of RenameOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 + def attributes; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 +class LanguageServer::Protocol::Interface::RenameParams + # @return [RenameParams] a new instance of RenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 + def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 + def attributes; end + + # The new name of the symbol. If the given name is not valid the + # request must return a [ResponseError](#ResponseError) with an + # appropriate message set. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 + def new_name; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 +class LanguageServer::Protocol::Interface::RenameRegistrationOptions + # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 + def document_selector; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 +class LanguageServer::Protocol::Interface::RequestMessage + # @return [RequestMessage] a new instance of RequestMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 + def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 + def attributes; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 + def method; end + + # The method's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 +class LanguageServer::Protocol::Interface::ResponseError + # @return [ResponseError] a new instance of ResponseError + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 + def initialize(code:, message:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 + def attributes; end + + # A number indicating the error type that occurred. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 + def code; end + + # A primitive or structured value that contains additional + # information about the error. Can be omitted. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 + def data; end + + # A string providing a short description of the error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 +class LanguageServer::Protocol::Interface::ResponseMessage + # @return [ResponseMessage] a new instance of ResponseMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 + def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 + def attributes; end + + # The error object in case a request fails. + # + # @return [ResponseError] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 + def error; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 + def jsonrpc; end + + # The result of a request. This member is REQUIRED on success. + # This member MUST NOT exist if there was an error invoking the method. + # + # @return [string | number | boolean | object] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 + def result; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 +class LanguageServer::Protocol::Interface::SaveOptions + # @return [SaveOptions] a new instance of SaveOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 + def initialize(include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 + def attributes; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 +class LanguageServer::Protocol::Interface::SelectionRange + # @return [SelectionRange] a new instance of SelectionRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 + def initialize(range:, parent: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 + def attributes; end + + # The parent selection range containing this range. Therefore + # `parent.range` must contain `this.range`. + # + # @return [SelectionRange] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 + def parent; end + + # The [range](#Range) of this selection range. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities + # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration for selection range + # providers. If this is set to `true` the client supports the new + # `SelectionRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeOptions + # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeParams + # @return [SelectionRangeParams] a new instance of SelectionRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 + def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 + def partial_result_token; end + + # The positions inside the text document. + # + # @return [Position[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 + def positions; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions + # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokens + # @return [SemanticTokens] a new instance of SemanticTokens + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 + def initialize(data:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 + def attributes; end + + # The actual tokens. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 + def data; end + + # An optional result id. If provided and clients support delta updating + # the client will include the result id in the next semantic token request. + # A server can then instead of computing all semantic tokens again simply + # send a delta. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities + # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 + def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 + def attributes; end + + # Whether the client uses semantic tokens to augment existing + # syntax tokens. If set to `true` client side created syntax + # tokens and semantic tokens are both used for colorization. If + # set to `false` the client only uses the returned semantic tokens + # for colorization. + # + # If the value is `undefined` then the client behavior is not + # specified. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 + def augments_syntax_tokens; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 + def dynamic_registration; end + + # The formats the clients supports. + # + # @return ["relative"[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 + def formats; end + + # Whether the client supports tokens that can span multiple lines. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 + def multiline_token_support; end + + # Whether the client supports tokens that can overlap each other. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 + def overlapping_token_support; end + + # Which requests the client supports and might send to the server + # depending on the server's capability. Please note that clients might not + # show semantic tokens or degrade some of the user experience if a range + # or full request is advertised by the client but not provided by the + # server. If for example the client capability `requests.full` and + # `request.range` are both set to true but the server only provides a + # range provider the client might not render a minimap correctly or might + # even decide to not show any semantic tokens at all. + # + # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 + def requests; end + + # Whether the client allows the server to actively cancel a + # semantic token request, e.g. supports returning + # ErrorCodes.ServerCancelled. If a server does the client + # needs to retrigger the request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 + def server_cancel_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 + def to_json(*args); end + + # The token modifiers that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 + def token_modifiers; end + + # The token types that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDelta + # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 + def initialize(edits:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 + def attributes; end + + # The semantic token edits to transform a previous result into a new + # result. + # + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 + def edits; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams + # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 + def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 + def partial_result_token; end + + # The result id of a previous response. The result Id can either point to + # a full response or a delta response depending on what was received last. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult + # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 + def initialize(edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 + def attributes; end + + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 + def edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensEdit + # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 + def initialize(start:, delete_count:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 + def attributes; end + + # The elements to insert. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 + def data; end + + # The count of elements to remove. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 + def delete_count; end + + # The start offset of the edit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensLegend + # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 + def initialize(token_types:, token_modifiers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 + def to_json(*args); end + + # The token modifiers a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 + def token_modifiers; end + + # The token types a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensOptions + # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 + def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 + def attributes; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 + def full; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensParams + # @return [SemanticTokensParams] a new instance of SemanticTokensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensPartialResult + # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 + def initialize(data:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 + def attributes; end + + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 + def data; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRangeParams + # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 + def partial_result_token; end + + # The range the semantic tokens are requested for. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions + # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 + def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 + def document_selector; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 + def full; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 + def id; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities + # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # semantic tokens currently shown. It should be used with absolute care + # and is useful for situation where a server for example detect a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ServerCapabilities + # @return [ServerCapabilities] a new instance of ServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 + def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 + def attributes; end + + # The server provides call hierarchy support. + # + # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 + def call_hierarchy_provider; end + + # The server provides code actions. The `CodeActionOptions` return type is + # only valid if the client signals code action literal support via the + # property `textDocument.codeAction.codeActionLiteralSupport`. + # + # @return [boolean | CodeActionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 + def code_action_provider; end + + # The server provides code lens. + # + # @return [CodeLensOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 + def code_lens_provider; end + + # The server provides color provider support. + # + # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 + def color_provider; end + + # The server provides completion support. + # + # @return [CompletionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 + def completion_provider; end + + # The server provides go to declaration support. + # + # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 + def declaration_provider; end + + # The server provides goto definition support. + # + # @return [boolean | DefinitionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 + def definition_provider; end + + # The server has support for pull model diagnostics. + # + # @return [DiagnosticOptions | DiagnosticRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 + def diagnostic_provider; end + + # The server provides document formatting. + # + # @return [boolean | DocumentFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 + def document_formatting_provider; end + + # The server provides document highlight support. + # + # @return [boolean | DocumentHighlightOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 + def document_highlight_provider; end + + # The server provides document link support. + # + # @return [DocumentLinkOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 + def document_link_provider; end + + # The server provides document formatting on typing. + # + # @return [DocumentOnTypeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 + def document_on_type_formatting_provider; end + + # The server provides document range formatting. + # + # @return [boolean | DocumentRangeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 + def document_range_formatting_provider; end + + # The server provides document symbol support. + # + # @return [boolean | DocumentSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 + def document_symbol_provider; end + + # The server provides execute command support. + # + # @return [ExecuteCommandOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 + def execute_command_provider; end + + # Experimental server capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 + def experimental; end + + # The server provides folding provider support. + # + # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 + def folding_range_provider; end + + # The server provides hover support. + # + # @return [boolean | HoverOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 + def hover_provider; end + + # The server provides goto implementation support. + # + # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 + def implementation_provider; end + + # The server provides inlay hints. + # + # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 + def inlay_hint_provider; end + + # The server provides inline values. + # + # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 + def inline_value_provider; end + + # The server provides linked editing range support. + # + # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 + def linked_editing_range_provider; end + + # Whether server provides moniker support. + # + # @return [boolean | MonikerOptions | MonikerRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 + def moniker_provider; end + + # Defines how notebook documents are synced. + # + # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 + def notebook_document_sync; end + + # The position encoding the server picked from the encodings offered + # by the client via the client capability `general.positionEncodings`. + # + # If the client didn't provide any position encodings the only valid + # value that a server can return is 'utf-16'. + # + # If omitted it defaults to 'utf-16'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 + def position_encoding; end + + # The server provides find references support. + # + # @return [boolean | ReferenceOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 + def references_provider; end + + # The server provides rename support. RenameOptions may only be + # specified if the client states that it supports + # `prepareSupport` in its initial `initialize` request. + # + # @return [boolean | RenameOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 + def rename_provider; end + + # The server provides selection range support. + # + # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 + def selection_range_provider; end + + # The server provides semantic tokens support. + # + # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 + def semantic_tokens_provider; end + + # The server provides signature help support. + # + # @return [SignatureHelpOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 + def signature_help_provider; end + + # Defines how text documents are synced. Is either a detailed structure + # defining each notification or for backwards compatibility the + # TextDocumentSyncKind number. If omitted it defaults to + # `TextDocumentSyncKind.None`. + # + # @return [TextDocumentSyncOptions | TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 + def text_document_sync; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 + def to_json(*args); end + + # The server provides goto type definition support. + # + # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 + def type_definition_provider; end + + # The server provides type hierarchy support. + # + # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 + def type_hierarchy_provider; end + + # Workspace specific server capabilities + # + # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 + def workspace; end + + # The server provides workspace symbol support. + # + # @return [boolean | WorkspaceSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 + def workspace_symbol_provider; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 +class LanguageServer::Protocol::Interface::SetTraceParams + # @return [SetTraceParams] a new instance of SetTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 + def to_json(*args); end + + # The new value that should be assigned to the trace setting. + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 + def value; end +end + +# Client capabilities for the show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities + # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 + def initialize(support:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 + def attributes; end + + # The client has support for the show document + # request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 + def support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 + def to_json(*args); end +end + +# Params to show a resource. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentParams + # @return [ShowDocumentParams] a new instance of ShowDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 + def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 + def attributes; end + + # Indicates to show the resource in an external program. + # To show, for example, `https://code.visualstudio.com/` + # in the default WEB browser set `external` to `true`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 + def external; end + + # An optional selection range if the document is a text + # document. Clients might ignore the property if an + # external program is started or the file is not a text + # file. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 + def selection; end + + # An optional property to indicate whether the editor + # showing the document should take focus or not. + # Clients might ignore this property if an external + # program is started. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 + def take_focus; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 + def to_json(*args); end + + # The uri to show. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 + def uri; end +end + +# The result of an show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentResult + # @return [ShowDocumentResult] a new instance of ShowDocumentResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 + def initialize(success:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 + def attributes; end + + # A boolean indicating if the show was successful. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageParams + # @return [ShowMessageParams] a new instance of ShowMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 + def attributes; end + + # The actual message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType}. + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 + def type; end +end + +# Show message request client capabilities +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities + # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 + def initialize(message_action_item: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to the `MessageActionItem` type. + # + # @return [{ additionalPropertiesSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 + def message_action_item; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageRequestParams + # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 + def initialize(type:, message:, actions: T.unsafe(nil)); end + + # The message action items to present. + # + # @return [MessageActionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 + def actions; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 + def type; end +end + +# Signature help represents the signature of something +# callable. There can be multiple signature but only one +# active and only one active parameter. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 +class LanguageServer::Protocol::Interface::SignatureHelp + # @return [SignatureHelp] a new instance of SignatureHelp + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 + def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The active parameter of the active signature. If omitted or the value + # lies outside the range of `signatures[activeSignature].parameters` + # defaults to 0 if the active signature has parameters. If + # the active signature has no parameters it is ignored. + # In future version of the protocol this property might become + # mandatory to better express the active parameter if the + # active signature does have any. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 + def active_parameter; end + + # The active signature. If omitted or the value lies outside the + # range of `signatures` the value defaults to zero or is ignore if + # the `SignatureHelp` as no signatures. + # + # Whenever possible implementors should make an active decision about + # the active signature and shouldn't rely on a default value. + # + # In future version of the protocol this property might become + # mandatory to better express this. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 + def active_signature; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 + def attributes; end + + # One or more signatures. If no signatures are available the signature help + # request should return `null`. + # + # @return [SignatureInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 + def signatures; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities + # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 + def attributes; end + + # The client supports to send additional context information for a + # `textDocument/signatureHelp` request. A client that opts into + # contextSupport will also support the `retriggerCharacters` on + # `SignatureHelpOptions`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 + def context_support; end + + # Whether signature help supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 + def dynamic_registration; end + + # The client supports the following `SignatureInformation` + # specific properties. + # + # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 + def signature_information; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 + def to_json(*args); end +end + +# Additional information about the context in which a signature help request +# was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 +class LanguageServer::Protocol::Interface::SignatureHelpContext + # @return [SignatureHelpContext] a new instance of SignatureHelpContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 + def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end + + # The currently active `SignatureHelp`. + # + # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field + # updated based on the user navigating through available signatures. + # + # @return [SignatureHelp] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 + def active_signature_help; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 + def attributes; end + + # `true` if signature help was already showing when it was triggered. + # + # Retriggers occur when the signature help is already active and can be + # caused by actions such as typing a trigger character, a cursor move, or + # document content changes. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 + def is_retrigger; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 + def to_json(*args); end + + # Character that caused signature help to be triggered. + # + # This is undefined when triggerKind !== + # SignatureHelpTriggerKind.TriggerCharacter + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 + def trigger_character; end + + # Action that caused signature help to be triggered. + # + # @return [SignatureHelpTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpOptions + # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 + def attributes; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpParams + # @return [SignatureHelpParams] a new instance of SignatureHelpParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 + def attributes; end + + # The signature help context. This is only available if the client + # specifies to send this using the client capability + # `textDocument.signatureHelp.contextSupport === true` + # + # @return [SignatureHelpContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 + def context; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions + # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 + def document_selector; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 + def work_done_progress; end +end + +# Represents the signature of something callable. A signature +# can have a label, like a function-name, a doc-comment, and +# a set of parameters. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 +class LanguageServer::Protocol::Interface::SignatureInformation + # @return [SignatureInformation] a new instance of SignatureInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 + def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The index of the active parameter. + # + # If provided, this is used in place of `SignatureHelp.activeParameter`. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 + def active_parameter; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 + def attributes; end + + # The human-readable doc-comment of this signature. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 + def documentation; end + + # The label of this signature. Will be shown in + # the UI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 + def label; end + + # The parameters of this signature. + # + # @return [ParameterInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 + def parameters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 + def to_json(*args); end +end + +# Static registration options to be returned in the initialize request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 +class LanguageServer::Protocol::Interface::StaticRegistrationOptions + # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 + def initialize(id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 + def to_json(*args); end +end + +# Represents information about programming constructs like variables, classes, +# interfaces etc. +# +# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 +class LanguageServer::Protocol::Interface::SymbolInformation + # @return [SymbolInformation] a new instance of SymbolInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 + def container_name; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 + def deprecated; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 + def kind; end + + # The location of this symbol. The location's range is used by a tool + # to reveal the location in the editor. If the symbol is selected in the + # tool the range's start information is used to position the cursor. So + # the range usually spans more then the actual symbol's name and does + # normally include things like visibility modifiers. + # + # The range doesn't have to denote a node range in the sense of an abstract + # syntax tree. It can therefore not be used to re-construct a hierarchy of + # the symbols. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 + def name; end + + # Tags for this symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 + def to_json(*args); end +end + +# Describe options to be used when registering for text document change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions + # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 + def initialize(document_selector:, sync_kind:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 + def document_selector; end + + # How documents are synced to the server. See TextDocumentSyncKind.Full + # and TextDocumentSyncKind.Incremental. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 + def sync_kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 + def to_json(*args); end +end + +# Text document specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities + # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 + def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 + def attributes; end + + # Capabilities specific to the various call hierarchy requests. + # + # @return [CallHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 + def call_hierarchy; end + + # Capabilities specific to the `textDocument/codeAction` request. + # + # @return [CodeActionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 + def code_action; end + + # Capabilities specific to the `textDocument/codeLens` request. + # + # @return [CodeLensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 + def code_lens; end + + # Capabilities specific to the `textDocument/documentColor` and the + # `textDocument/colorPresentation` request. + # + # @return [DocumentColorClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 + def color_provider; end + + # Capabilities specific to the `textDocument/completion` request. + # + # @return [CompletionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 + def completion; end + + # Capabilities specific to the `textDocument/declaration` request. + # + # @return [DeclarationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 + def declaration; end + + # Capabilities specific to the `textDocument/definition` request. + # + # @return [DefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 + def definition; end + + # Capabilities specific to the diagnostic pull model. + # + # @return [DiagnosticClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 + def diagnostic; end + + # Capabilities specific to the `textDocument/documentHighlight` request. + # + # @return [DocumentHighlightClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 + def document_highlight; end + + # Capabilities specific to the `textDocument/documentLink` request. + # + # @return [DocumentLinkClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 + def document_link; end + + # Capabilities specific to the `textDocument/documentSymbol` request. + # + # @return [DocumentSymbolClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 + def document_symbol; end + + # Capabilities specific to the `textDocument/foldingRange` request. + # + # @return [FoldingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 + def folding_range; end + + # Capabilities specific to the `textDocument/formatting` request. + # + # @return [DocumentFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 + def formatting; end + + # Capabilities specific to the `textDocument/hover` request. + # + # @return [HoverClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 + def hover; end + + # Capabilities specific to the `textDocument/implementation` request. + # + # @return [ImplementationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 + def implementation; end + + # Capabilities specific to the `textDocument/inlayHint` request. + # + # @return [InlayHintClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 + def inlay_hint; end + + # Capabilities specific to the `textDocument/inlineValue` request. + # + # @return [InlineValueClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 + def inline_value; end + + # Capabilities specific to the `textDocument/linkedEditingRange` request. + # + # @return [LinkedEditingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 + def linked_editing_range; end + + # Capabilities specific to the `textDocument/moniker` request. + # + # @return [MonikerClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 + def moniker; end + + # request. + # Capabilities specific to the `textDocument/onTypeFormatting` request. + # + # @return [DocumentOnTypeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 + def on_type_formatting; end + + # Capabilities specific to the `textDocument/publishDiagnostics` + # notification. + # + # @return [PublishDiagnosticsClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 + def publish_diagnostics; end + + # Capabilities specific to the `textDocument/rangeFormatting` request. + # + # @return [DocumentRangeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 + def range_formatting; end + + # Capabilities specific to the `textDocument/references` request. + # + # @return [ReferenceClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 + def references; end + + # Capabilities specific to the `textDocument/rename` request. + # + # @return [RenameClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 + def rename; end + + # Capabilities specific to the `textDocument/selectionRange` request. + # + # @return [SelectionRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 + def selection_range; end + + # Capabilities specific to the various semantic token requests. + # + # @return [SemanticTokensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 + def semantic_tokens; end + + # Capabilities specific to the `textDocument/signatureHelp` request. + # + # @return [SignatureHelpClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 + def signature_help; end + + # @return [TextDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 + def to_json(*args); end + + # Capabilities specific to the `textDocument/typeDefinition` request. + # + # @return [TypeDefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 + def type_definition; end + + # Capabilities specific to the various type hierarchy requests. + # + # @return [TypeHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 + def type_hierarchy; end +end + +# An event describing a change to a text document. If only a text is provided +# it is considered to be the full content of the document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 +class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent + # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 + def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 + def attributes; end + + # The range of the document that changed. + # + # @return [Range, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 + def range; end + + # The optional length of the range that got replaced. + # + # @return [number, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 + def range_length; end + + # The new text for the provided range. + # + # --- OR --- + # + # The new text of the whole document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentEdit + # @return [TextDocumentEdit] a new instance of TextDocumentEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 + def initialize(text_document:, edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 + def attributes; end + + # The edits to be applied. + # + # @return [(TextEdit | AnnotatedTextEdit)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 + def edits; end + + # The text document to change. + # + # @return [OptionalVersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentIdentifier + # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentItem + # @return [TextDocumentItem] a new instance of TextDocumentItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 + def initialize(uri:, language_id:, version:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 + def attributes; end + + # The text document's language identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 + def language_id; end + + # The content of the opened text document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentPositionParams + # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 + def initialize(text_document:, position:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 + def to_json(*args); end +end + +# General text document registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions + # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 + def initialize(document_selector:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions + # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 + def initialize(document_selector:, include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 + def document_selector; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities + # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 + def attributes; end + + # The client supports did save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 + def did_save; end + + # Whether text document synchronization supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 + def to_json(*args); end + + # The client supports sending will save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 + def will_save; end + + # The client supports sending a will save request and + # waits for a response providing text edits which will + # be applied to the document before it is saved. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncOptions + # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 + def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 + def attributes; end + + # Change notifications are sent to the server. See + # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and + # TextDocumentSyncKind.Incremental. If omitted it defaults to + # TextDocumentSyncKind.None. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 + def change; end + + # Open and close notifications are sent to the server. If omitted open + # close notifications should not be sent. + # Open and close notifications are sent to the server. If omitted open + # close notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 + def open_close; end + + # If present save notifications are sent to the server. If omitted the + # notification should not be sent. + # + # @return [boolean | SaveOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 + def to_json(*args); end + + # If present will save notifications are sent to the server. If omitted + # the notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 + def will_save; end + + # If present will save wait until requests are sent to the server. If + # omitted the request should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 +class LanguageServer::Protocol::Interface::TextEdit + # @return [TextEdit] a new instance of TextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 + def initialize(range:, new_text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities + # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `TypeDefinitionRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionOptions + # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionParams + # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions + # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyItem + # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 + def attributes; end + + # A data entry field that is preserved between a type hierarchy prepare and + # supertypes or subtypes requests. It could also be used to identify the + # type hierarchy in the server, helping improve the performance on + # resolving supertypes and subtypes. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#TypeHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyOptions + # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams + # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions + # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams + # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams + # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 + def work_done_token; end +end + +# A diagnostic report indicating that the last returned +# report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 +class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport + # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 + def initialize(kind:, result_id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 + def to_json(*args); end +end + +# General parameters to unregister a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 +class LanguageServer::Protocol::Interface::Unregistration + # @return [Unregistration] a new instance of Unregistration + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 + def initialize(id:, method:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 + def attributes; end + + # The id used to unregister the request or notification. Usually an id + # provided during the register request. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 + def id; end + + # The method / capability to unregister for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 + def method; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 +class LanguageServer::Protocol::Interface::UnregistrationParams + # @return [UnregistrationParams] a new instance of UnregistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 + def initialize(unregisterations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 + def to_json(*args); end + + # @return [Unregistration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 + def unregisterations; end +end + +# A versioned notebook document identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier + # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 + def initialize(version:, uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 + def uri; end + + # The version number of this notebook document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier + # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 + def version; end +end + +# The parameters send in a will save text document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 +class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams + # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 + def initialize(text_document:, reason:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 + def attributes; end + + # The 'TextDocumentSaveReason'. + # + # @return [TextDocumentSaveReason] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 + def reason; end + + # The document that will be saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressBegin + # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 + def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 + def attributes; end + + # Controls if a cancel button should show to allow the user to cancel the + # long running operation. Clients that don't support cancellation are + # allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 + def cancellable; end + + # @return ["begin"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 + def percentage; end + + # Mandatory title of the progress operation. Used to briefly inform about + # the kind of operation being performed. + # + # Examples: "Indexing" or "Linking dependencies". + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams + # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams + # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressEnd + # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 + def initialize(kind:, message: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 + def attributes; end + + # @return ["end"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 + def kind; end + + # Optional, a final message indicating to for example indicate the outcome + # of the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressOptions + # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressParams + # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 + def initialize(work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressReport + # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 + def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 + def attributes; end + + # Controls enablement state of a cancel button. This property is only valid + # if a cancel button got requested in the `WorkDoneProgressBegin` payload. + # + # Clients that don't support cancellation or don't support control the + # button's enablement state are allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 + def cancellable; end + + # @return ["report"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 + def percentage; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 + def to_json(*args); end +end + +# Parameters of the workspace diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams + # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 + def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 + def partial_result_token; end + + # The currently known diagnostic reports with their + # previous result ids. + # + # @return [PreviousResultId[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 + def previous_result_ids; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 + def work_done_token; end +end + +# A workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport + # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 + def to_json(*args); end +end + +# A partial result for a workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult + # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEdit + # @return [WorkspaceEdit] a new instance of WorkspaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 + def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 + def attributes; end + + # A map of change annotations that can be referenced in + # `AnnotatedTextEdit`s or create, rename and delete file / folder + # operations. + # + # Whether clients honor this property depends on the client capability + # `workspace.changeAnnotationSupport`. + # + # @return [{ [id: string]: ChangeAnnotation; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 + def change_annotations; end + + # Holds changes to existing resources. + # + # @return [{}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 + def changes; end + + # Depending on the client capability + # `workspace.workspaceEdit.resourceOperations` document changes are either + # an array of `TextDocumentEdit`s to express changes to n different text + # documents where each text document edit addresses a specific version of + # a text document. Or it can contain above `TextDocumentEdit`s mixed with + # create, rename and delete file / folder operations. + # + # Whether a client supports versioned document edits is expressed via + # `workspace.workspaceEdit.documentChanges` client capability. + # + # If a client neither supports `documentChanges` nor + # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s + # using the `changes` property are supported. + # + # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 + def document_changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities + # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 + def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 + def attributes; end + + # Whether the client in general supports change annotations on text edits, + # create file, rename file and delete file changes. + # + # @return [{ groupsOnLabel?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 + def change_annotation_support; end + + # The client supports versioned document changes in `WorkspaceEdit`s + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 + def document_changes; end + + # The failure handling strategy of a client if applying the workspace edit + # fails. + # + # @return [FailureHandlingKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 + def failure_handling; end + + # Whether the client normalizes line endings to the client specific + # setting. + # If set to `true` the client will normalize line ending characters + # in a workspace edit to the client specific new line character(s). + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 + def normalizes_line_endings; end + + # The resource operations the client supports. Clients should at least + # support 'create', 'rename' and 'delete' files and folders. + # + # @return [ResourceOperationKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 + def resource_operations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFolder + # @return [WorkspaceFolder] a new instance of WorkspaceFolder + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 + def initialize(uri:, name:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 + def attributes; end + + # The name of the workspace folder. Used to refer to this + # workspace folder in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 + def name; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 + def to_json(*args); end + + # The associated URI for this workspace folder. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 + def uri; end +end + +# The workspace folder change event. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent + # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 + def initialize(added:, removed:); end + + # The array of added workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 + def added; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 + def attributes; end + + # The array of the removed workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 + def removed; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities + # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 + def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 + def attributes; end + + # Whether the server wants to receive workspace folder + # change notifications. + # + # If a string is provided, the string is treated as an ID + # under which the notification is registered on the client + # side. The ID can be used to unregister for these events + # using the `client/unregisterCapability` request. + # + # @return [string | boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 + def change_notifications; end + + # The server has support for workspace folders + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 + def supported; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 + def to_json(*args); end +end + +# A full document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport + # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 + def version; end +end + +# A special workspace symbol that supports locations without a range +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbol + # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 + def container_name; end + + # A data entry field that is preserved on a workspace symbol between a + # workspace symbol request and a workspace symbol resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 + def data; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 + def kind; end + + # The location of this symbol. Whether a server is allowed to + # return a location without a range depends on the client + # capability `workspace.symbol.resolveSupport`. + # + # See also `SymbolInformation.location`. + # + # @return [Location | { uri: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 + def name; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities + # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 + def attributes; end + + # Symbol request supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 + def dynamic_registration; end + + # The client support partial workspace symbols. The client will send the + # request `workspaceSymbol/resolve` to the server to resolve additional + # properties. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 + def resolve_support; end + + # Specific capabilities for the `SymbolKind` in the `workspace/symbol` + # request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 + def symbol_kind; end + + # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions + # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 + def work_done_progress; end +end + +# The parameters of a Workspace Symbol Request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbolParams + # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 + def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 + def partial_result_token; end + + # A query string to filter symbols by. Clients may send an empty + # string here to request all symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 + def query; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions + # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 + def work_done_progress; end +end + +# An unchanged document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport + # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 +module LanguageServer::Protocol::Transport; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 +module LanguageServer::Protocol::Transport::Io; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 +class LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 + def initialize(io); end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 + def read(&block); end + + private + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 + def io; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 +class LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 + def initialize(io); end + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 + def io; end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 + def write(response); end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 +module LanguageServer::Protocol::Transport::Stdio; end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#3 +LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/logger@1.6.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/logger@1.6.1.rbi new file mode 100644 index 0000000..4e9ceac --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/logger@1.6.1.rbi @@ -0,0 +1,920 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `logger` gem. +# Please instead update this file by running `bin/tapioca gem logger`. + + +# \Class \Logger provides a simple but sophisticated logging utility that +# you can use to create one or more +# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs] +# for your program. +# Each such log contains a chronological sequence of entries +# that provides a record of the program's activities. +# +# == About the Examples +# +# All examples on this page assume that \Logger has been required: +# +# require 'logger' +# +# == Synopsis +# +# Create a log with Logger.new: +# +# # Single log file. +# logger = Logger.new('t.log') +# # Size-based rotated logging: 3 10-megabyte files. +# logger = Logger.new('t.log', 3, 10485760) +# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly'). +# logger = Logger.new('t.log', 'daily') +# # Log to an IO stream. +# logger = Logger.new($stdout) +# +# Add entries (level, message) with Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# Close the log with Logger#close: +# +# logger.close +# +# == Entries +# +# You can add entries with method Logger#add: +# +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# logger.add(Logger::INFO, 'Non-error information') +# logger.add(Logger::WARN, 'Non-error warning') +# logger.add(Logger::ERROR, 'Non-fatal error') +# logger.add(Logger::FATAL, 'Fatal error') +# logger.add(Logger::UNKNOWN, 'Most severe') +# +# These shorthand methods also add entries: +# +# logger.debug('Maximal debugging info') +# logger.info('Non-error information') +# logger.warn('Non-error warning') +# logger.error('Non-fatal error') +# logger.fatal('Fatal error') +# logger.unknown('Most severe') +# +# When you call any of these methods, +# the entry may or may not be written to the log, +# depending on the entry's severity and on the log level; +# see {Log Level}[rdoc-ref:Logger@Log+Level] +# +# An entry always has: +# +# - A severity (the required argument to #add). +# - An automatically created timestamp. +# +# And may also have: +# +# - A message. +# - A program name. +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message.', 'mung') +# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message. +# +# The default format for an entry is: +# +# "%s, [%s #%d] %5s -- %s: %s\n" +# +# where the values to be formatted are: +# +# - \Severity (one letter). +# - Timestamp. +# - Process id. +# - \Severity (word). +# - Program name. +# - Message. +# +# You can use a different entry format by: +# +# - Setting a custom format proc (affects following entries); +# see {formatter=}[Logger.html#attribute-i-formatter]. +# - Calling any of the methods above with a block +# (affects only the one entry). +# Doing so can have two benefits: +# +# - Context: the block can evaluate the entire program context +# and create a context-dependent message. +# - Performance: the block is not evaluated unless the log level +# permits the entry actually to be written: +# +# logger.error { my_slow_message_generator } +# +# Contrast this with the string form, where the string is +# always evaluated, regardless of the log level: +# +# logger.error("#{my_slow_message_generator}") +# +# === \Severity +# +# The severity of a log entry has two effects: +# +# - Determines whether the entry is selected for inclusion in the log; +# see {Log Level}[rdoc-ref:Logger@Log+Level]. +# - Indicates to any log reader (whether a person or a program) +# the relative importance of the entry. +# +# === Timestamp +# +# The timestamp for a log entry is generated automatically +# when the entry is created. +# +# The logged timestamp is formatted by method +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime] +# using this format string: +# +# '%Y-%m-%dT%H:%M:%S.%6N' +# +# Example: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO) +# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil +# +# You can set a different format using method #datetime_format=. +# +# === Message +# +# The message is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message') +# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message +# +# For the default entry formatter, Logger::Formatter, +# the message object may be: +# +# - A string: used as-is. +# - An Exception: message.message is used. +# - Anything else: message.inspect is used. +# +# *Note*: Logger::Formatter does not escape or sanitize +# the message passed to it. +# Developers should be aware that malicious data (user input) +# may be in the message, and should explicitly escape untrusted data. +# +# You can use a custom formatter to escape message data; +# see the example at {formatter=}[Logger.html#attribute-i-formatter]. +# +# === Program Name +# +# The program name is an optional argument to an entry method: +# +# logger = Logger.new($stdout) +# logger.add(Logger::INFO, 'My message', 'mung') +# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message +# +# The default program name for a new logger may be set in the call to +# Logger.new via optional keyword argument +progname+: +# +# logger = Logger.new('t.log', progname: 'mung') +# +# The default program name for an existing logger may be set +# by a call to method #progname=: +# +# logger.progname = 'mung' +# +# The current program name may be retrieved with method +# {progname}[Logger.html#attribute-i-progname]: +# +# logger.progname # => "mung" +# +# == Log Level +# +# The log level setting determines whether an entry is actually +# written to the log, based on the entry's severity. +# +# These are the defined severities (least severe to most severe): +# +# logger = Logger.new($stdout) +# logger.add(Logger::DEBUG, 'Maximal debugging info') +# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info +# logger.add(Logger::INFO, 'Non-error information') +# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information +# logger.add(Logger::WARN, 'Non-error warning') +# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning +# logger.add(Logger::ERROR, 'Non-fatal error') +# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error +# logger.add(Logger::FATAL, 'Fatal error') +# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error +# logger.add(Logger::UNKNOWN, 'Most severe') +# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe +# +# The default initial level setting is Logger::DEBUG, the lowest level, +# which means that all entries are to be written, regardless of severity: +# +# logger = Logger.new($stdout) +# logger.level # => 0 +# logger.add(0, "My message") +# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message +# +# You can specify a different setting in a new logger +# using keyword argument +level+ with an appropriate value: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger = Logger.new($stdout, level: 'error') +# logger = Logger.new($stdout, level: :error) +# logger.level # => 3 +# +# With this level, entries with severity Logger::ERROR and higher +# are written, while those with lower severities are not written: +# +# logger = Logger.new($stdout, level: Logger::ERROR) +# logger.add(3) +# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil +# logger.add(2) # Silent. +# +# You can set the log level for an existing logger +# with method #level=: +# +# logger.level = Logger::ERROR +# +# These shorthand methods also set the level: +# +# logger.debug! # => 0 +# logger.info! # => 1 +# logger.warn! # => 2 +# logger.error! # => 3 +# logger.fatal! # => 4 +# +# You can retrieve the log level with method #level. +# +# logger.level = Logger::ERROR +# logger.level # => 3 +# +# These methods return whether a given +# level is to be written: +# +# logger.level = Logger::ERROR +# logger.debug? # => false +# logger.info? # => false +# logger.warn? # => false +# logger.error? # => true +# logger.fatal? # => true +# +# == Log File Rotation +# +# By default, a log file is a single file that grows indefinitely +# (until explicitly closed); there is no file rotation. +# +# To keep log files to a manageable size, +# you can use _log_ _file_ _rotation_, which uses multiple log files: +# +# - Each log file has entries for a non-overlapping +# time interval. +# - Only the most recent log file is open and active; +# the others are closed and inactive. +# +# === Size-Based Rotation +# +# For size-based log file rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ with a positive integer: +# the number of log files to be in the rotation. +# - Argument +shift_size+ as a positive integer: +# the maximum size (in bytes) of each log file; +# defaults to 1048576 (1 megabyte). +# +# Examples: +# +# logger = Logger.new('t.log', 3) # Three 1-megabyte files. +# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files. +# +# For these examples, suppose: +# +# logger = Logger.new('t.log', 3) +# +# Logging begins in the new log file, +t.log+; +# the log file is "full" and ready for rotation +# when a new entry would cause its size to exceed +shift_size+. +# +# The first time +t.log+ is full: +# +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# The second time +t.log+ is full: +# +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# Each subsequent time that +t.log+ is full, +# the log files are rotated: +# +# - +t.log.1+ is removed. +# - +t.log.0 is renamed as +t.log.1+. +# - +t.log+ is closed and renamed to +t.log.0+. +# - A new file +t.log+ is opened. +# +# === Periodic Rotation +# +# For periodic rotation, call Logger.new with: +# +# - Argument +logdev+ as a file path. +# - Argument +shift_age+ as a string period indicator. +# +# Examples: +# +# logger = Logger.new('t.log', 'daily') # Rotate log files daily. +# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly. +# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly. +# +# Example: +# +# logger = Logger.new('t.log', 'daily') +# +# When the given period expires: +# +# - The base log file, +t.log+ is closed and renamed +# with a date-based suffix such as +t.log.20220509+. +# - A new log file +t.log+ is opened. +# - Nothing is removed. +# +# The default format for the suffix is '%Y%m%d', +# which produces a suffix similar to the one above. +# You can set a different format using create-time option +# +shift_period_suffix+; +# see details and suggestions at +# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. +# +# source://logger//lib/logger/version.rb#3 +class Logger + include ::Logger::Severity + + # :call-seq: + # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options) + # + # With the single argument +logdev+, + # returns a new logger with all default options: + # + # Logger.new('t.log') # => # + # + # Argument +logdev+ must be one of: + # + # - A string filepath: entries are to be written + # to the file at that path; if the file at that path exists, + # new entries are appended. + # - An IO stream (typically +$stdout+, +$stderr+. or an open file): + # entries are to be written to the given stream. + # - +nil+ or +File::NULL+: no entries are to be written. + # + # Examples: + # + # Logger.new('t.log') + # Logger.new($stdout) + # + # The keyword options are: + # + # - +level+: sets the log level; default value is Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]: + # + # Logger.new('t.log', level: Logger::ERROR) + # + # - +progname+: sets the default program name; default is +nil+. + # See {Program Name}[rdoc-ref:Logger@Program+Name]: + # + # Logger.new('t.log', progname: 'mung') + # + # - +formatter+: sets the entry formatter; default is +nil+. + # See {formatter=}[Logger.html#attribute-i-formatter]. + # - +datetime_format+: sets the format for entry timestamp; + # default is +nil+. + # See #datetime_format=. + # - +binmode+: sets whether the logger writes in binary mode; + # default is +false+. + # - +shift_period_suffix+: sets the format for the filename suffix + # for periodic log file rotation; default is '%Y%m%d'. + # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # - +reraise_write_errors+: An array of exception classes, which will + # be reraised if there is an error when writing to the log device. + # The default is to swallow all exceptions raised. + # + # @return [Logger] a new instance of Logger + # + # source://logger//lib/logger.rb#581 + def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end + + # Writes the given +msg+ to the log with no formatting; + # returns the number of characters written, + # or +nil+ if no log device exists: + # + # logger = Logger.new($stdout) + # logger << 'My message.' # => 10 + # + # Output: + # + # My message. + # + # source://logger//lib/logger.rb#689 + def <<(msg); end + + # Creates a log entry, which may or may not be written to the log, + # depending on the entry's severity and on the log level. + # See {Log Level}[rdoc-ref:Logger@Log+Level] + # and {Entries}[rdoc-ref:Logger@Entries] for details. + # + # Examples: + # + # logger = Logger.new($stdout, progname: 'mung') + # logger.add(Logger::INFO) + # logger.add(Logger::ERROR, 'No good') + # logger.add(Logger::ERROR, 'No good', 'gnum') + # + # Output: + # + # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung + # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good + # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good + # + # These convenience methods have implicit severity: + # + # - #debug. + # - #info. + # - #warn. + # - #error. + # - #fatal. + # - #unknown. + # + # source://logger//lib/logger.rb#656 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Closes the logger; returns +nil+: + # + # logger = Logger.new('t.log') + # logger.close # => nil + # logger.info('foo') # Prints "log writing failed. closed stream" + # + # Related: Logger#reopen. + # + # source://logger//lib/logger.rb#736 + def close; end + + # Returns the date-time format; see #datetime_format=. + # + # source://logger//lib/logger.rb#438 + def datetime_format; end + + # Sets the date-time format. + # + # Argument +datetime_format+ should be either of these: + # + # - A string suitable for use as a format for method + # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. + # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'. + # + # source://logger//lib/logger.rb#432 + def datetime_format=(datetime_format); end + + # Equivalent to calling #add with severity Logger::DEBUG. + # + # source://logger//lib/logger.rb#695 + def debug(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::DEBUG. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # source://logger//lib/logger.rb#487 + def debug!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::DEBUG to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # @return [Boolean] + # + # source://logger//lib/logger.rb#482 + def debug?; end + + # Equivalent to calling #add with severity Logger::ERROR. + # + # source://logger//lib/logger.rb#713 + def error(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::ERROR. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # source://logger//lib/logger.rb#520 + def error!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::ERROR to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # @return [Boolean] + # + # source://logger//lib/logger.rb#515 + def error?; end + + # Equivalent to calling #add with severity Logger::FATAL. + # + # source://logger//lib/logger.rb#719 + def fatal(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::FATAL. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # source://logger//lib/logger.rb#531 + def fatal!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::FATAL to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # @return [Boolean] + # + # source://logger//lib/logger.rb#526 + def fatal?; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # source://logger//lib/logger.rb#473 + def formatter; end + + # Sets or retrieves the logger entry formatter proc. + # + # When +formatter+ is +nil+, the logger uses Logger::Formatter. + # + # When +formatter+ is a proc, a new entry is formatted by the proc, + # which is called with four arguments: + # + # - +severity+: The severity of the entry. + # - +time+: A Time object representing the entry's timestamp. + # - +progname+: The program name for the entry. + # - +msg+: The message for the entry (string or string-convertible object). + # + # The proc should return a string containing the formatted entry. + # + # This custom formatter uses + # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] + # to escape the message string: + # + # logger = Logger.new($stdout, progname: 'mung') + # original_formatter = logger.formatter || Logger::Formatter.new + # logger.formatter = proc { |severity, time, progname, msg| + # original_formatter.call(severity, time, progname, msg.dump) + # } + # logger.add(Logger::INFO, "hello \n ''") + # logger.add(Logger::INFO, "\f\x00\xff\\\"") + # + # Output: + # + # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" + # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" + # + # source://logger//lib/logger.rb#473 + def formatter=(_arg0); end + + # Equivalent to calling #add with severity Logger::INFO. + # + # source://logger//lib/logger.rb#701 + def info(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::INFO. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # source://logger//lib/logger.rb#498 + def info!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::INFO to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # @return [Boolean] + # + # source://logger//lib/logger.rb#493 + def info?; end + + # Logging severity threshold (e.g. Logger::INFO). + # + # source://logger//lib/logger.rb#383 + def level; end + + # Sets the log level; returns +severity+. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # Argument +severity+ may be an integer, a string, or a symbol: + # + # logger.level = Logger::ERROR # => 3 + # logger.level = 3 # => 3 + # logger.level = 'error' # => "error" + # logger.level = :error # => :error + # + # Logger#sev_threshold= is an alias for Logger#level=. + # + # source://logger//lib/logger.rb#399 + def level=(severity); end + + # Creates a log entry, which may or may not be written to the log, + # depending on the entry's severity and on the log level. + # See {Log Level}[rdoc-ref:Logger@Log+Level] + # and {Entries}[rdoc-ref:Logger@Entries] for details. + # + # Examples: + # + # logger = Logger.new($stdout, progname: 'mung') + # logger.add(Logger::INFO) + # logger.add(Logger::ERROR, 'No good') + # logger.add(Logger::ERROR, 'No good', 'gnum') + # + # Output: + # + # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung + # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good + # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good + # + # These convenience methods have implicit severity: + # + # - #debug. + # - #info. + # - #warn. + # - #error. + # - #fatal. + # - #unknown. + # + # source://logger//lib/logger.rb#656 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end + + # Program name to include in log messages. + # + # source://logger//lib/logger.rb#422 + def progname; end + + # Program name to include in log messages. + # + # source://logger//lib/logger.rb#422 + def progname=(_arg0); end + + # Sets the logger's output stream: + # + # - If +logdev+ is +nil+, reopens the current output stream. + # - If +logdev+ is a filepath, opens the indicated file for append. + # - If +logdev+ is an IO stream + # (usually $stdout, $stderr, or an open File object), + # opens the stream for append. + # + # Example: + # + # logger = Logger.new('t.log') + # logger.add(Logger::ERROR, 'one') + # logger.close + # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream' + # logger.reopen + # logger.add(Logger::ERROR, 'three') + # logger.close + # File.readlines('t.log') + # # => + # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n", + # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", + # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] + # + # source://logger//lib/logger.rb#624 + def reopen(logdev = T.unsafe(nil)); end + + # Logging severity threshold (e.g. Logger::INFO). + # + # source://logger//lib/logger.rb#383 + def sev_threshold; end + + # Sets the log level; returns +severity+. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # Argument +severity+ may be an integer, a string, or a symbol: + # + # logger.level = Logger::ERROR # => 3 + # logger.level = 3 # => 3 + # logger.level = 'error' # => "error" + # logger.level = :error # => :error + # + # Logger#sev_threshold= is an alias for Logger#level=. + # + # source://logger//lib/logger.rb#399 + def sev_threshold=(severity); end + + # Equivalent to calling #add with severity Logger::UNKNOWN. + # + # source://logger//lib/logger.rb#725 + def unknown(progname = T.unsafe(nil), &block); end + + # Equivalent to calling #add with severity Logger::WARN. + # + # source://logger//lib/logger.rb#707 + def warn(progname = T.unsafe(nil), &block); end + + # Sets the log level to Logger::WARN. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # source://logger//lib/logger.rb#509 + def warn!; end + + # Returns +true+ if the log level allows entries with severity + # Logger::WARN to be written, +false+ otherwise. + # See {Log Level}[rdoc-ref:Logger@Log+Level]. + # + # @return [Boolean] + # + # source://logger//lib/logger.rb#504 + def warn?; end + + # Adjust the log level during the block execution for the current Fiber only + # + # logger.with_level(:debug) do + # logger.debug { "Hello" } + # end + # + # source://logger//lib/logger.rb#408 + def with_level(severity); end + + private + + # source://logger//lib/logger.rb#754 + def format_message(severity, datetime, progname, msg); end + + # source://logger//lib/logger.rb#745 + def format_severity(severity); end + + # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. + # + # source://logger//lib/logger.rb#750 + def level_override; end +end + +# Default formatter for log messages. +# +# source://logger//lib/logger/formatter.rb#5 +class Logger::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://logger//lib/logger/formatter.rb#11 + def initialize; end + + # source://logger//lib/logger/formatter.rb#15 + def call(severity, time, progname, msg); end + + # Returns the value of attribute datetime_format. + # + # source://logger//lib/logger/formatter.rb#9 + def datetime_format; end + + # Sets the attribute datetime_format + # + # @param value the value to set the attribute datetime_format to. + # + # source://logger//lib/logger/formatter.rb#9 + def datetime_format=(_arg0); end + + private + + # source://logger//lib/logger/formatter.rb#21 + def format_datetime(time); end + + # source://logger//lib/logger/formatter.rb#25 + def msg2str(msg); end +end + +# source://logger//lib/logger/formatter.rb#7 +Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String) + +# source://logger//lib/logger/formatter.rb#6 +Logger::Formatter::Format = T.let(T.unsafe(nil), String) + +# Device used for logging messages. +# +# source://logger//lib/logger/log_device.rb#7 +class Logger::LogDevice + include ::Logger::Period + include ::MonitorMixin + + # @return [LogDevice] a new instance of LogDevice + # + # source://logger//lib/logger/log_device.rb#14 + def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end + + # source://logger//lib/logger/log_device.rb#59 + def close; end + + # Returns the value of attribute dev. + # + # source://logger//lib/logger/log_device.rb#10 + def dev; end + + # Returns the value of attribute filename. + # + # source://logger//lib/logger/log_device.rb#11 + def filename; end + + # source://logger//lib/logger/log_device.rb#69 + def reopen(log = T.unsafe(nil)); end + + # source://logger//lib/logger/log_device.rb#32 + def write(message); end + + private + + # source://logger//lib/logger/log_device.rb#126 + def add_log_header(file); end + + # source://logger//lib/logger/log_device.rb#132 + def check_shift_log; end + + # source://logger//lib/logger/log_device.rb#110 + def create_logfile(filename); end + + # source://logger//lib/logger/log_device.rb#152 + def lock_shift_log; end + + # source://logger//lib/logger/log_device.rb#102 + def open_logfile(filename); end + + # source://logger//lib/logger/log_device.rb#86 + def set_dev(log); end + + # source://logger//lib/logger/log_device.rb#183 + def shift_log_age; end + + # source://logger//lib/logger/log_device.rb#195 + def shift_log_period(period_end); end +end + +# source://logger//lib/logger/period.rb#4 +module Logger::Period + private + + # source://logger//lib/logger/period.rb#9 + def next_rotate_time(now, shift_age); end + + # source://logger//lib/logger/period.rb#31 + def previous_period_end(now, shift_age); end + + class << self + # source://logger//lib/logger/period.rb#9 + def next_rotate_time(now, shift_age); end + + # source://logger//lib/logger/period.rb#31 + def previous_period_end(now, shift_age); end + end +end + +# source://logger//lib/logger/period.rb#7 +Logger::Period::SiD = T.let(T.unsafe(nil), Integer) + +# \Severity label for logging (max 5 chars). +# +# source://logger//lib/logger.rb#743 +Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) + +# Logging severity. +# +# source://logger//lib/logger/severity.rb#5 +module Logger::Severity + class << self + # source://logger//lib/logger/severity.rb#29 + def coerce(severity); end + end +end + +# source://logger//lib/logger/severity.rb#19 +Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/loofah@2.22.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/loofah@2.22.0.rbi new file mode 100644 index 0000000..58c1bb3 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/loofah@2.22.0.rbi @@ -0,0 +1,1081 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `loofah` gem. +# Please instead update this file by running `bin/tapioca gem loofah`. + + +# == Strings and IO Objects as Input +# +# The following methods accept any IO object in addition to accepting a string: +# +# - Loofah.html4_document +# - Loofah.html4_fragment +# - Loofah.scrub_html4_document +# - Loofah.scrub_html4_fragment +# +# - Loofah.html5_document +# - Loofah.html5_fragment +# - Loofah.scrub_html5_document +# - Loofah.scrub_html5_fragment +# +# - Loofah.xml_document +# - Loofah.xml_fragment +# - Loofah.scrub_xml_document +# - Loofah.scrub_xml_fragment +# +# - Loofah.document +# - Loofah.fragment +# - Loofah.scrub_document +# - Loofah.scrub_fragment +# +# That IO object could be a file, or a socket, or a StringIO, or anything that responds to +read+ +# and +close+. +# +# source://loofah//lib/loofah.rb#5 +module Loofah + class << self + # Shortcut for Loofah::HTML4::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::Document.parse + # + # source://loofah//lib/loofah.rb#76 + def document(*args, &block); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#83 + def fragment(*args, &block); end + + # Shortcut for Loofah::HTML4::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::Document.parse + # + # source://loofah//lib/loofah.rb#76 + def html4_document(*args, &block); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#83 + def html4_fragment(*args, &block); end + + # source://loofah//lib/loofah.rb#101 + def html5_document(*args, &block); end + + # source://loofah//lib/loofah.rb#108 + def html5_fragment(*args, &block); end + + # @return [Boolean] + # + # source://loofah//lib/loofah.rb#7 + def html5_support?; end + + # A helper to remove extraneous whitespace from text-ified HTML + # + # source://loofah//lib/loofah.rb#169 + def remove_extraneous_whitespace(string); end + + # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#88 + def scrub_document(string_or_io, method); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#93 + def scrub_fragment(string_or_io, method); end + + # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#88 + def scrub_html4_document(string_or_io, method); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#93 + def scrub_html4_fragment(string_or_io, method); end + + # source://loofah//lib/loofah.rb#113 + def scrub_html5_document(string_or_io, method); end + + # source://loofah//lib/loofah.rb#118 + def scrub_html5_fragment(string_or_io, method); end + + # Shortcut for Loofah.xml_document(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#164 + def scrub_xml_document(string_or_io, method); end + + # Shortcut for Loofah.xml_fragment(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#159 + def scrub_xml_fragment(string_or_io, method); end + + # Shortcut for Loofah::XML::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::XML::Document.parse + # + # source://loofah//lib/loofah.rb#147 + def xml_document(*args, &block); end + + # Shortcut for Loofah::XML::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::XML::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#154 + def xml_fragment(*args, &block); end + end +end + +# source://loofah//lib/loofah/concerns.rb#125 +module Loofah::DocumentDecorator + # source://loofah//lib/loofah/concerns.rb#126 + def initialize(*args, &block); end +end + +# source://loofah//lib/loofah/elements.rb#6 +module Loofah::Elements; end + +# source://loofah//lib/loofah/elements.rb#93 +Loofah::Elements::BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# Elements that aren't block but should generate a newline in #to_text +# +# source://loofah//lib/loofah/elements.rb#90 +Loofah::Elements::INLINE_LINE_BREAK = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#94 +Loofah::Elements::LINEBREAKERS = T.let(T.unsafe(nil), Set) + +# The following elements may also be considered block-level +# elements since they may contain block-level elements +# +# source://loofah//lib/loofah/elements.rb#76 +Loofah::Elements::LOOSE_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#92 +Loofah::Elements::STRICT_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#7 +Loofah::Elements::STRICT_BLOCK_LEVEL_HTML4 = T.let(T.unsafe(nil), Set) + +# https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements +# +# source://loofah//lib/loofah/elements.rb#35 +Loofah::Elements::STRICT_BLOCK_LEVEL_HTML5 = T.let(T.unsafe(nil), Set) + +# Alias for Loofah::HTML4 +# +# source://loofah//lib/loofah.rb#70 +Loofah::HTML = Loofah::HTML4 + +# source://loofah//lib/loofah/html4/document.rb#4 +module Loofah::HTML4; end + +# Subclass of Nokogiri::HTML4::Document. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html4/document.rb#10 +class Loofah::HTML4::Document < ::Nokogiri::HTML4::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator + include ::Loofah::TextBehavior + include ::Loofah::HtmlDocumentBehavior + extend ::Loofah::HtmlDocumentBehavior::ClassMethods +end + +# Subclass of Nokogiri::HTML4::DocumentFragment. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html4/document_fragment.rb#10 +class Loofah::HTML4::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + include ::Loofah::TextBehavior + include ::Loofah::HtmlFragmentBehavior + extend ::Loofah::HtmlFragmentBehavior::ClassMethods +end + +# source://loofah//lib/loofah/html5/safelist.rb#6 +module Loofah::HTML5; end + +# Subclass of Nokogiri::HTML5::Document. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html5/document.rb#10 +class Loofah::HTML5::Document < ::Nokogiri::HTML5::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator + include ::Loofah::TextBehavior + include ::Loofah::HtmlDocumentBehavior + extend ::Loofah::HtmlDocumentBehavior::ClassMethods +end + +# Subclass of Nokogiri::HTML5::DocumentFragment. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html5/document_fragment.rb#10 +class Loofah::HTML5::DocumentFragment < ::Nokogiri::HTML5::DocumentFragment + include ::Loofah::TextBehavior + include ::Loofah::HtmlFragmentBehavior + extend ::Loofah::HtmlFragmentBehavior::ClassMethods +end + +# source://loofah//lib/loofah/html5/safelist.rb#49 +module Loofah::HTML5::SafeList; end + +# source://loofah//lib/loofah/html5/safelist.rb#232 +Loofah::HTML5::SafeList::ACCEPTABLE_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# https://www.w3.org/TR/css-color-3/#html4 +# +# source://loofah//lib/loofah/html5/safelist.rb#735 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_COLORS = T.let(T.unsafe(nil), Set) + +# https://www.w3.org/TR/css-color-3/#svg-color +# +# source://loofah//lib/loofah/html5/safelist.rb#755 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_EXTENDED_COLORS = T.let(T.unsafe(nil), Set) + +# see https://www.quackit.com/css/functions/ +# omit `url` and `image` from that list +# +# source://loofah//lib/loofah/html5/safelist.rb#907 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#696 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#626 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#50 +Loofah::HTML5::SafeList::ACCEPTABLE_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#980 +Loofah::HTML5::SafeList::ACCEPTABLE_PROTOCOLS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#967 +Loofah::HTML5::SafeList::ACCEPTABLE_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1011 +Loofah::HTML5::SafeList::ACCEPTABLE_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1021 +Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1024 +Loofah::HTML5::SafeList::ALLOWED_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1023 +Loofah::HTML5::SafeList::ALLOWED_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1022 +Loofah::HTML5::SafeList::ALLOWED_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# subclasses may define their own versions of these constants +# +# source://loofah//lib/loofah/html5/safelist.rb#1020 +Loofah::HTML5::SafeList::ALLOWED_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1045 +Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1026 +Loofah::HTML5::SafeList::ALLOWED_PROTOCOLS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1025 +Loofah::HTML5::SafeList::ALLOWED_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1027 +Loofah::HTML5::SafeList::ALLOWED_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#526 +Loofah::HTML5::SafeList::ARIA_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#582 +Loofah::HTML5::SafeList::ATTR_VAL_IS_URI = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#315 +Loofah::HTML5::SafeList::MATHML_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#147 +Loofah::HTML5::SafeList::MATHML_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#978 +Loofah::HTML5::SafeList::PROTOCOL_SEPARATOR = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/safelist.rb#960 +Loofah::HTML5::SafeList::SHORTHAND_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#608 +Loofah::HTML5::SafeList::SVG_ALLOW_LOCAL_HREF = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#367 +Loofah::HTML5::SafeList::SVG_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#594 +Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#183 +Loofah::HTML5::SafeList::SVG_ELEMENTS = T.let(T.unsafe(nil), Set) + +# additional tags we should consider safe since we have libxml2 fixing up our documents. +# +# source://loofah//lib/loofah/html5/safelist.rb#1040 +Loofah::HTML5::SafeList::TAGS_SAFE_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) + +# TODO: remove VOID_ELEMENTS in a future major release +# and put it in the tests (it is used only for testing, not for functional behavior) +# +# source://loofah//lib/loofah/html5/safelist.rb#1031 +Loofah::HTML5::SafeList::VOID_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/scrub.rb#8 +module Loofah::HTML5::Scrub + class << self + # @return [Boolean] + # + # source://loofah//lib/loofah/html5/scrub.rb#18 + def allowed_element?(element_name); end + + # source://loofah//lib/loofah/html5/scrub.rb#192 + def cdata_escape(node); end + + # @return [Boolean] + # + # source://loofah//lib/loofah/html5/scrub.rb#187 + def cdata_needs_escaping?(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#207 + def escape_tags(string); end + + # libxml2 >= 2.9.2 fails to escape comments within some attributes. + # + # see comments about CVE-2018-8048 within the tests for more information + # + # source://loofah//lib/loofah/html5/scrub.rb#166 + def force_correct_attribute_escaping!(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#123 + def scrub_attribute_that_allows_local_ref(attr_node); end + + # alternative implementation of the html5lib attribute scrubbing algorithm + # + # source://loofah//lib/loofah/html5/scrub.rb#23 + def scrub_attributes(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#72 + def scrub_css(style); end + + # source://loofah//lib/loofah/html5/scrub.rb#67 + def scrub_css_attribute(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#142 + def scrub_uri_attribute(attr_node); end + end +end + +# source://loofah//lib/loofah/html5/scrub.rb#9 +Loofah::HTML5::Scrub::CONTROL_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#11 +Loofah::HTML5::Scrub::CRASS_SEMICOLON = T.let(T.unsafe(nil), Hash) + +# source://loofah//lib/loofah/html5/scrub.rb#12 +Loofah::HTML5::Scrub::CSS_IMPORTANT = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/html5/scrub.rb#10 +Loofah::HTML5::Scrub::CSS_KEYWORDISH = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#14 +Loofah::HTML5::Scrub::CSS_PROPERTY_STRING_WITHOUT_EMBEDDED_QUOTES = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#13 +Loofah::HTML5::Scrub::CSS_WHITESPACE = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/html5/scrub.rb#15 +Loofah::HTML5::Scrub::DATA_ATTRIBUTE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/safelist.rb#1048 +Loofah::HTML5::WhiteList = Loofah::HTML5::SafeList + +# source://loofah//lib/loofah/concerns.rb#133 +module Loofah::HtmlDocumentBehavior + mixes_in_class_methods ::Loofah::HtmlDocumentBehavior::ClassMethods + + # source://loofah//lib/loofah/concerns.rb#164 + def serialize_root; end + + class << self + # @private + # + # source://loofah//lib/loofah/concerns.rb#159 + def included(base); end + end +end + +# source://loofah//lib/loofah/concerns.rb#134 +module Loofah::HtmlDocumentBehavior::ClassMethods + # source://loofah//lib/loofah/concerns.rb#135 + def parse(*args, &block); end + + private + + # remove comments that exist outside of the HTML element. + # + # these comments are allowed by the HTML spec: + # + # https://www.w3.org/TR/html401/struct/global.html#h-7.1 + # + # but are not scrubbed by Loofah because these nodes don't meet + # the contract that scrubbers expect of a node (e.g., it can be + # replaced, sibling and children nodes can be created). + # + # source://loofah//lib/loofah/concerns.rb#150 + def remove_comments_before_html_element(doc); end +end + +# source://loofah//lib/loofah/concerns.rb#169 +module Loofah::HtmlFragmentBehavior + mixes_in_class_methods ::Loofah::HtmlFragmentBehavior::ClassMethods + + # source://loofah//lib/loofah/concerns.rb#197 + def serialize; end + + # source://loofah//lib/loofah/concerns.rb#203 + def serialize_root; end + + # source://loofah//lib/loofah/concerns.rb#197 + def to_s; end + + class << self + # @private + # + # source://loofah//lib/loofah/concerns.rb#192 + def included(base); end + end +end + +# source://loofah//lib/loofah/concerns.rb#170 +module Loofah::HtmlFragmentBehavior::ClassMethods + # source://loofah//lib/loofah/concerns.rb#180 + def document_klass; end + + # source://loofah//lib/loofah/concerns.rb#171 + def parse(tags, encoding = T.unsafe(nil)); end +end + +# constants related to working around unhelpful libxml2 behavior +# +# ಠ_ಠ +# +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#12 +module Loofah::LibxmlWorkarounds; end + +# these attributes and qualifying parent tags are determined by the code at: +# +# https://git.gnome.org/browse/libxml2/tree/HTMLtree.c?h=v2.9.2#n714 +# +# see comments about CVE-2018-8048 within the tests for more information +# +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#20 +Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#26 +Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES_QUALIFYING_TAG = T.let(T.unsafe(nil), Hash) + +# source://loofah//lib/loofah/metahelpers.rb#4 +module Loofah::MetaHelpers + class << self + # source://loofah//lib/loofah/metahelpers.rb#6 + def add_downcased_set_members_to_all_set_constants(mojule); end + end +end + +# Mixes +scrub!+ into Document, DocumentFragment, Node and NodeSet. +# +# Traverse the document or fragment, invoking the +scrubber+ on each node. +# +# +scrubber+ must either be one of the symbols representing the built-in scrubbers (see +# Scrubbers), or a Scrubber instance. +# +# span2div = Loofah::Scrubber.new do |node| +# node.name = "div" if node.name == "span" +# end +# Loofah.html5_fragment("foo

    bar

    ").scrub!(span2div).to_s +# # => "
    foo

    bar

    " +# +# or +# +# unsafe_html = "ohai!
    div is safe
    " +# Loofah.html5_fragment(unsafe_html).scrub!(:strip).to_s +# # => "ohai!
    div is safe
    " +# +# Note that this method is called implicitly from the shortcuts Loofah.scrub_html5_fragment et +# al. +# +# Please see Scrubber for more information on implementation and traversal, and README.rdoc for +# more example usage. +# +# source://loofah//lib/loofah/concerns.rb#30 +module Loofah::ScrubBehavior + class << self + # source://loofah//lib/loofah/concerns.rb#59 + def resolve_scrubber(scrubber); end + end +end + +# source://loofah//lib/loofah/concerns.rb#31 +module Loofah::ScrubBehavior::Node + # source://loofah//lib/loofah/concerns.rb#32 + def scrub!(scrubber); end +end + +# source://loofah//lib/loofah/concerns.rb#51 +module Loofah::ScrubBehavior::NodeSet + # source://loofah//lib/loofah/concerns.rb#52 + def scrub!(scrubber); end +end + +# A Scrubber wraps up a block (or method) that is run on an HTML node (element): +# +# # change all tags to
    tags +# span2div = Loofah::Scrubber.new do |node| +# node.name = "div" if node.name == "span" +# end +# +# Alternatively, this scrubber could have been implemented as: +# +# class Span2Div < Loofah::Scrubber +# def scrub(node) +# node.name = "div" if node.name == "span" +# end +# end +# span2div = Span2Div.new +# +# This can then be run on a document: +# +# Loofah.html5_fragment("foo

    bar

    ").scrub!(span2div).to_s +# # => "
    foo

    bar

    " +# +# Scrubbers can be run on a document in either a top-down traversal (the +# default) or bottom-up. Top-down scrubbers can optionally return +# Scrubber::STOP to terminate the traversal of a subtree. +# +# source://loofah//lib/loofah/scrubber.rb#35 +class Loofah::Scrubber + # Options may include + # :direction => :top_down (the default) + # or + # :direction => :bottom_up + # + # For top_down traversals, if the block returns + # Loofah::Scrubber::STOP, then the traversal will be terminated + # for the current node's subtree. + # + # Alternatively, a Scrubber may inherit from Loofah::Scrubber, + # and implement +scrub+, which is slightly faster than using a + # block. + # + # @return [Scrubber] a new instance of Scrubber + # + # source://loofah//lib/loofah/scrubber.rb#65 + def initialize(options = T.unsafe(nil), &block); end + + # If the attribute is not set, add it + # If the attribute is set, don't overwrite the existing value + # + # source://loofah//lib/loofah/scrubber.rb#96 + def append_attribute(node, attribute, value); end + + # When a scrubber is initialized, the optional block is saved as + # :block. Note that, if no block is passed, then the +scrub+ + # method is assumed to have been implemented. + # + # source://loofah//lib/loofah/scrubber.rb#49 + def block; end + + # When a scrubber is initialized, the :direction may be specified + # as :top_down (the default) or :bottom_up. + # + # source://loofah//lib/loofah/scrubber.rb#44 + def direction; end + + # When +new+ is not passed a block, the class may implement + # +scrub+, which will be called for each document node. + # + # @raise [ScrubberNotFound] + # + # source://loofah//lib/loofah/scrubber.rb#88 + def scrub(node); end + + # Calling +traverse+ will cause the document to be traversed by + # either the lambda passed to the initializer or the +scrub+ + # method, in the direction specified at +new+ time. + # + # source://loofah//lib/loofah/scrubber.rb#80 + def traverse(node); end + + private + + # source://loofah//lib/loofah/scrubber.rb#105 + def html5lib_sanitize(node); end + + # source://loofah//lib/loofah/scrubber.rb#131 + def traverse_conditionally_bottom_up(node); end + + # source://loofah//lib/loofah/scrubber.rb#122 + def traverse_conditionally_top_down(node); end +end + +# Top-down Scrubbers may return CONTINUE to indicate that the subtree should be traversed. +# +# source://loofah//lib/loofah/scrubber.rb#37 +Loofah::Scrubber::CONTINUE = T.let(T.unsafe(nil), Object) + +# Top-down Scrubbers may return STOP to indicate that the subtree should not be traversed. +# +# source://loofah//lib/loofah/scrubber.rb#40 +Loofah::Scrubber::STOP = T.let(T.unsafe(nil), Object) + +# A RuntimeError raised when Loofah could not find an appropriate scrubber. +# +# source://loofah//lib/loofah/scrubber.rb#7 +class Loofah::ScrubberNotFound < ::RuntimeError; end + +# Loofah provides some built-in scrubbers for sanitizing with +# HTML5lib's safelist and for accomplishing some common +# transformation tasks. +# +# +# === Loofah::Scrubbers::Strip / scrub!(:strip) +# +# +:strip+ removes unknown/unsafe tags, but leaves behind the pristine contents: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:strip) +# => "ohai!
    div is safe
    but foo is not" +# +# +# === Loofah::Scrubbers::Prune / scrub!(:prune) +# +# +:prune+ removes unknown/unsafe tags and their contents (including their subtrees): +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:prune) +# => "ohai!
    div is safe
    " +# +# +# === Loofah::Scrubbers::Escape / scrub!(:escape) +# +# +:escape+ performs HTML entity escaping on the unknown/unsafe tags: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:escape) +# => "ohai!
    div is safe
    <foo>but foo is <b>not</b></foo>" +# +# +# === Loofah::Scrubbers::Whitewash / scrub!(:whitewash) +# +# +:whitewash+ removes all comments, styling and attributes in +# addition to doing markup-fixer-uppery and pruning unsafe tags. I +# like to call this "whitewashing", since it's like putting a new +# layer of paint on top of the HTML input to make it look nice. +# +# messy_markup = "ohai!
    div with attributes
    " +# Loofah.html5_fragment(messy_markup).scrub!(:whitewash) +# => "ohai!
    div with attributes
    " +# +# One use case for this scrubber is to clean up HTML that was +# cut-and-pasted from Microsoft Word into a WYSIWYG editor or a +# rich text editor. Microsoft's software is famous for injecting +# all kinds of cruft into its HTML output. Who needs that crap? +# Certainly not me. +# +# +# === Loofah::Scrubbers::NoFollow / scrub!(:nofollow) +# +# +:nofollow+ adds a rel="nofollow" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:nofollow) +# => "ohai! I like your blog post" +# +# +# === Loofah::Scrubbers::TargetBlank / scrub!(:targetblank) +# +# +:targetblank+ adds a target="_blank" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:targetblank) +# => "ohai! I like your blog post" +# +# +# === Loofah::Scrubbers::NoOpener / scrub!(:noopener) +# +# +:noopener+ adds a rel="noopener" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) +# => "ohai! I like your blog post" +# +# === Loofah::Scrubbers::NoReferrer / scrub!(:noreferrer) +# +# +:noreferrer+ adds a rel="noreferrer" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) +# => "ohai! I like your blog post" +# +# +# === Loofah::Scrubbers::Unprintable / scrub!(:unprintable) +# +# +:unprintable+ removes unprintable Unicode characters. +# +# markup = "

    Some text with an unprintable character at the end\u2028

    " +# Loofah.html5_fragment(markup).scrub!(:unprintable) +# => "

    Some text with an unprintable character at the end

    " +# +# You may not be able to see the unprintable character in the above example, but there is a +# U+2028 character right before the closing

    tag. These characters can cause issues if +# the content is ever parsed by JavaScript - more information here: +# +# http://timelessrepo.com/json-isnt-a-javascript-subset +# +# source://loofah//lib/loofah/scrubbers.rb#104 +module Loofah::Scrubbers + class << self + # Returns an array of symbols representing the built-in scrubbers + # + # source://loofah//lib/loofah/scrubbers.rb#371 + def scrubber_symbols; end + end +end + +# === scrub!(:escape) +# +# +:escape+ performs HTML entity escaping on the unknown/unsafe tags: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:escape) +# => "ohai!
    div is safe
    <foo>but foo is <b>not</b></foo>" +# +# source://loofah//lib/loofah/scrubbers.rb#159 +class Loofah::Scrubbers::Escape < ::Loofah::Scrubber + # @return [Escape] a new instance of Escape + # + # source://loofah//lib/loofah/scrubbers.rb#160 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#164 + def scrub(node); end +end + +# A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune). +# +# source://loofah//lib/loofah/scrubbers.rb#354 +Loofah::Scrubbers::MAP = T.let(T.unsafe(nil), Hash) + +# This class probably isn't useful publicly, but is used for #to_text's current implemention +# +# source://loofah//lib/loofah/scrubbers.rb#305 +class Loofah::Scrubbers::NewlineBlockElements < ::Loofah::Scrubber + # @return [NewlineBlockElements] a new instance of NewlineBlockElements + # + # source://loofah//lib/loofah/scrubbers.rb#306 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#310 + def scrub(node); end +end + +# === scrub!(:nofollow) +# +# +:nofollow+ adds a rel="nofollow" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:nofollow) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#220 +class Loofah::Scrubbers::NoFollow < ::Loofah::Scrubber + # @return [NoFollow] a new instance of NoFollow + # + # source://loofah//lib/loofah/scrubbers.rb#221 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#225 + def scrub(node); end +end + +# === scrub!(:noopener) +# +# +:noopener+ adds a rel="noopener" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#269 +class Loofah::Scrubbers::NoOpener < ::Loofah::Scrubber + # @return [NoOpener] a new instance of NoOpener + # + # source://loofah//lib/loofah/scrubbers.rb#270 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#274 + def scrub(node); end +end + +# === scrub!(:noreferrer) +# +# +:noreferrer+ adds a rel="noreferrer" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#291 +class Loofah::Scrubbers::NoReferrer < ::Loofah::Scrubber + # @return [NoReferrer] a new instance of NoReferrer + # + # source://loofah//lib/loofah/scrubbers.rb#292 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#296 + def scrub(node); end +end + +# === scrub!(:prune) +# +# +:prune+ removes unknown/unsafe tags and their contents (including their subtrees): +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:prune) +# => "ohai!
    div is safe
    " +# +# source://loofah//lib/loofah/scrubbers.rb#137 +class Loofah::Scrubbers::Prune < ::Loofah::Scrubber + # @return [Prune] a new instance of Prune + # + # source://loofah//lib/loofah/scrubbers.rb#138 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#142 + def scrub(node); end +end + +# === scrub!(:strip) +# +# +:strip+ removes unknown/unsafe tags, but leaves behind the pristine contents: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:strip) +# => "ohai!
    div is safe
    but foo is not" +# +# source://loofah//lib/loofah/scrubbers.rb#114 +class Loofah::Scrubbers::Strip < ::Loofah::Scrubber + # @return [Strip] a new instance of Strip + # + # source://loofah//lib/loofah/scrubbers.rb#115 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#119 + def scrub(node); end +end + +# === scrub!(:targetblank) +# +# +:targetblank+ adds a target="_blank" attribute to all links. +# If there is a target already set, replaces it with target="_blank". +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:targetblank) +# => "ohai! I like your blog post" +# +# On modern browsers, setting target="_blank" on anchor elements implicitly provides the same +# behavior as setting rel="noopener". +# +# source://loofah//lib/loofah/scrubbers.rb#246 +class Loofah::Scrubbers::TargetBlank < ::Loofah::Scrubber + # @return [TargetBlank] a new instance of TargetBlank + # + # source://loofah//lib/loofah/scrubbers.rb#247 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#251 + def scrub(node); end +end + +# === scrub!(:unprintable) +# +# +:unprintable+ removes unprintable Unicode characters. +# +# markup = "

    Some text with an unprintable character at the end\u2028

    " +# Loofah.html5_fragment(markup).scrub!(:unprintable) +# => "

    Some text with an unprintable character at the end

    " +# +# You may not be able to see the unprintable character in the above example, but there is a +# U+2028 character right before the closing

    tag. These characters can cause issues if +# the content is ever parsed by JavaScript - more information here: +# +# http://timelessrepo.com/json-isnt-a-javascript-subset +# +# source://loofah//lib/loofah/scrubbers.rb#338 +class Loofah::Scrubbers::Unprintable < ::Loofah::Scrubber + # @return [Unprintable] a new instance of Unprintable + # + # source://loofah//lib/loofah/scrubbers.rb#339 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#343 + def scrub(node); end +end + +# === scrub!(:whitewash) +# +# +:whitewash+ removes all comments, styling and attributes in +# addition to doing markup-fixer-uppery and pruning unsafe tags. I +# like to call this "whitewashing", since it's like putting a new +# layer of paint on top of the HTML input to make it look nice. +# +# messy_markup = "ohai!
    div with attributes
    " +# Loofah.html5_fragment(messy_markup).scrub!(:whitewash) +# => "ohai!
    div with attributes
    " +# +# One use case for this scrubber is to clean up HTML that was +# cut-and-pasted from Microsoft Word into a WYSIWYG editor or a +# rich text editor. Microsoft's software is famous for injecting +# all kinds of cruft into its HTML output. Who needs that crap? +# Certainly not me. +# +# source://loofah//lib/loofah/scrubbers.rb#191 +class Loofah::Scrubbers::Whitewash < ::Loofah::Scrubber + # @return [Whitewash] a new instance of Whitewash + # + # source://loofah//lib/loofah/scrubbers.rb#192 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#196 + def scrub(node); end +end + +# Overrides +text+ in Document and DocumentFragment classes, and mixes in +to_text+. +# +# source://loofah//lib/loofah/concerns.rb#73 +module Loofah::TextBehavior + # Returns a plain-text version of the markup contained by the document, with HTML entities + # encoded. + # + # This method is significantly faster than #to_text, but isn't clever about whitespace around + # block elements. + # + # Loofah.html5_document("

    Title

    Content
    ").text + # # => "TitleContent" + # + # By default, the returned text will have HTML entities escaped. If you want unescaped + # entities, and you understand that the result is unsafe to render in a browser, then you can + # pass an argument as shown: + # + # frag = Loofah.html5_fragment("<script>alert('EVIL');</script>") + # # ok for browser: + # frag.text # => "<script>alert('EVIL');</script>" + # # decidedly not ok for browser: + # frag.text(:encode_special_chars => false) # => "" + # + # source://loofah//lib/loofah/concerns.rb#94 + def inner_text(options = T.unsafe(nil)); end + + # Returns a plain-text version of the markup contained by the document, with HTML entities + # encoded. + # + # This method is significantly faster than #to_text, but isn't clever about whitespace around + # block elements. + # + # Loofah.html5_document("

    Title

    Content
    ").text + # # => "TitleContent" + # + # By default, the returned text will have HTML entities escaped. If you want unescaped + # entities, and you understand that the result is unsafe to render in a browser, then you can + # pass an argument as shown: + # + # frag = Loofah.html5_fragment("<script>alert('EVIL');</script>") + # # ok for browser: + # frag.text # => "<script>alert('EVIL');</script>" + # # decidedly not ok for browser: + # frag.text(:encode_special_chars => false) # => "" + # + # source://loofah//lib/loofah/concerns.rb#94 + def text(options = T.unsafe(nil)); end + + # Returns a plain-text version of the markup contained by the document, with HTML entities + # encoded. + # + # This method is significantly faster than #to_text, but isn't clever about whitespace around + # block elements. + # + # Loofah.html5_document("

    Title

    Content
    ").text + # # => "TitleContent" + # + # By default, the returned text will have HTML entities escaped. If you want unescaped + # entities, and you understand that the result is unsafe to render in a browser, then you can + # pass an argument as shown: + # + # frag = Loofah.html5_fragment("<script>alert('EVIL');</script>") + # # ok for browser: + # frag.text # => "<script>alert('EVIL');</script>" + # # decidedly not ok for browser: + # frag.text(:encode_special_chars => false) # => "" + # + # source://loofah//lib/loofah/concerns.rb#94 + def to_str(options = T.unsafe(nil)); end + + # Returns a plain-text version of the markup contained by the fragment, with HTML entities + # encoded. + # + # This method is slower than #text, but is clever about whitespace around block elements and + # line break elements. + # + # Loofah.html5_document("

    Title

    Content
    Next line
    ").to_text + # # => "\nTitle\n\nContent\nNext line\n" + # + # source://loofah//lib/loofah/concerns.rb#120 + def to_text(options = T.unsafe(nil)); end +end + +# The version of Loofah you are using +# +# source://loofah//lib/loofah/version.rb#5 +Loofah::VERSION = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/xml/document.rb#4 +module Loofah::XML; end + +# Subclass of Nokogiri::XML::Document. +# +# See Loofah::ScrubBehavior and Loofah::DocumentDecorator for additional methods. +# +# source://loofah//lib/loofah/xml/document.rb#10 +class Loofah::XML::Document < ::Nokogiri::XML::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator +end + +# Subclass of Nokogiri::XML::DocumentFragment. +# +# See Loofah::ScrubBehavior for additional methods. +# +# source://loofah//lib/loofah/xml/document_fragment.rb#10 +class Loofah::XML::DocumentFragment < ::Nokogiri::XML::DocumentFragment + class << self + # source://loofah//lib/loofah/xml/document_fragment.rb#12 + def parse(tags); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/mail@2.8.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/mail@2.8.1.rbi new file mode 100644 index 0000000..8c36831 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/mail@2.8.1.rbi @@ -0,0 +1,8658 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mail` gem. +# Please instead update this file by running `bin/tapioca gem mail`. + + +# source://mail//lib/mail.rb#3 +module Mail + class << self + # Receive all emails from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#163 + def all(*args, &block); end + + # source://mail//lib/mail/mail.rb#183 + def connection(&block); end + + # Sets the default delivery method and retriever method for all new Mail objects. + # The delivery_method and retriever_method default to :smtp and :pop3, with defaults + # set. + # + # So sending a new email, if you have an SMTP server running on localhost is + # as easy as: + # + # Mail.deliver do + # to 'mikel@test.lindsaar.net' + # from 'bob@test.lindsaar.net' + # subject 'hi there!' + # body 'this is a body' + # end + # + # If you do not specify anything, you will get the following equivalent code set in + # every new mail object: + # + # Mail.defaults do + # delivery_method :smtp, { :address => "localhost", + # :port => 25, + # :domain => 'localhost.localdomain', + # :user_name => nil, + # :password => nil, + # :authentication => nil, + # :enable_starttls_auto => true } + # + # retriever_method :pop3, { :address => "localhost", + # :port => 995, + # :user_name => nil, + # :password => nil, + # :enable_ssl => true } + # end + # + # Mail.delivery_method.new #=> Mail::SMTP instance + # Mail.retriever_method.new #=> Mail::POP3 instance + # + # Each mail object inherits the default set in Mail.delivery_method, however, on + # a per email basis, you can override the method: + # + # mail.delivery_method :smtp + # + # Or you can override the method and pass in settings: + # + # mail.delivery_method :smtp, :address => 'some.host' + # + # source://mail//lib/mail/mail.rb#98 + def defaults(&block); end + + # Delete all emails from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#174 + def delete_all(*args, &block); end + + # Send an email using the default configuration. You do need to set a default + # configuration first before you use self.deliver, if you don't, an appropriate + # error will be raised telling you to. + # + # If you do not specify a delivery type, SMTP will be used. + # + # Mail.deliver do + # to 'mikel@test.lindsaar.net' + # from 'ada@test.lindsaar.net' + # subject 'This is a test email' + # body 'Not much to say here' + # end + # + # You can also do: + # + # mail = Mail.read('email.eml') + # mail.deliver! + # + # And your email object will be created and sent. + # + # source://mail//lib/mail/mail.rb#131 + def deliver(*args, &block); end + + # Returns the delivery method selected, defaults to an instance of Mail::SMTP + # + # source://mail//lib/mail/mail.rb#103 + def delivery_method; end + + # This runs through the autoload list and explictly requires them for you. + # Useful when running mail in a threaded process. + # + # Usage: + # + # require 'mail' + # Mail.eager_autoload! + # + # source://mail//lib/mail.rb#35 + def eager_autoload!; end + + # Find emails from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#139 + def find(*args, &block); end + + # Finds and then deletes retrieved emails from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#145 + def find_and_delete(*args, &block); end + + # Receive the first email(s) from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#151 + def first(*args, &block); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/from_source.rb#4 + def from_source(source); end + + # source://mail//lib/mail/mail.rb#233 + def inform_interceptors(mail); end + + # source://mail//lib/mail/mail.rb#227 + def inform_observers(mail); end + + # Receive the first email(s) from the default retriever + # See Mail::Retriever for a complete documentation. + # + # source://mail//lib/mail/mail.rb#157 + def last(*args, &block); end + + # Allows you to create a new Mail::Message object. + # + # You can make an email via passing a string or passing a block. + # + # For example, the following two examples will create the same email + # message: + # + # Creating via a string: + # + # string = "To: mikel@test.lindsaar.net\r\n" + # string << "From: bob@test.lindsaar.net\r\n" + # string << "Subject: This is an email\r\n" + # string << "\r\n" + # string << "This is the body" + # Mail.new(string) + # + # Or creating via a block: + # + # message = Mail.new do + # to 'mikel@test.lindsaar.net' + # from 'bob@test.lindsaar.net' + # subject 'This is an email' + # body 'This is the body' + # end + # + # Or creating via a hash (or hash like object): + # + # message = Mail.new({:to => 'mikel@test.lindsaar.net', + # 'from' => 'bob@test.lindsaar.net', + # :subject => 'This is an email', + # :body => 'This is the body' }) + # + # Note, the hash keys can be strings or symbols, the passed in object + # does not need to be a hash, it just needs to respond to :each_pair + # and yield each key value pair. + # + # As a side note, you can also create a new email through creating + # a Mail::Message object directly and then passing in values via string, + # symbol or direct method calls. See Mail::Message for more information. + # + # mail = Mail.new + # mail.to = 'mikel@test.lindsaar.net' + # mail[:from] = 'bob@test.lindsaar.net' + # mail['subject'] = 'This is an email' + # mail.body = 'This is the body' + # + # source://mail//lib/mail/mail.rb#50 + def new(*args, &block); end + + # source://mail//lib/mail/mail.rb#243 + def random_tag; end + + # Reads in an email message from a path and instantiates it as a new Mail::Message + # + # source://mail//lib/mail/mail.rb#168 + def read(filename); end + + # Instantiates a new Mail::Message using a string + # + # source://mail//lib/mail/mail.rb#179 + def read_from_string(mail_as_string); end + + # source://mail//lib/mail.rb#23 + def register_autoload(name, path); end + + # You can register an object to be given every mail object that will be sent, + # before it is sent. So if you want to add special headers or modify any + # email that gets sent through the Mail library, you can do so. + # + # Your object needs to respond to a single method #delivering_email(mail) + # which receives the email that is about to be sent. Make your modifications + # directly to this object. + # + # source://mail//lib/mail/mail.rb#215 + def register_interceptor(interceptor); end + + # You can register an object to be informed of every email that is sent through + # this method. + # + # Your object needs to respond to a single method #delivered_email(mail) + # which receives the email that is sent. + # + # source://mail//lib/mail/mail.rb#196 + def register_observer(observer); end + + # Returns the retriever method selected, defaults to an instance of Mail::POP3 + # + # source://mail//lib/mail/mail.rb#108 + def retriever_method; end + + # source://mail//lib/mail/mail.rb#252 + def something_random; end + + # source://mail//lib/mail/mail.rb#256 + def uniq; end + + # Unregister the given interceptor, allowing mail to resume operations + # without it. + # + # source://mail//lib/mail/mail.rb#223 + def unregister_interceptor(interceptor); end + + # Unregister the given observer, allowing mail to resume operations + # without it. + # + # source://mail//lib/mail/mail.rb#204 + def unregister_observer(observer); end + end +end + +# Mail::Address handles all email addresses in Mail. It takes an email address string +# and parses it, breaking it down into its component parts and allowing you to get the +# address, comments, display name, name, local part, domain part and fully formatted +# address. +# +# Mail::Address requires a correctly formatted email address per RFC2822 or RFC822. It +# handles all obsolete versions including obsolete domain routing on the local part. +# +# a = Address.new('Mikel Lindsaar (My email address) ') +# a.format #=> 'Mikel Lindsaar (My email address)' +# a.address #=> 'mikel@test.lindsaar.net' +# a.display_name #=> 'Mikel Lindsaar' +# a.local #=> 'mikel' +# a.domain #=> 'test.lindsaar.net' +# a.comments #=> ['My email address'] +# a.to_s #=> 'Mikel Lindsaar (My email address)' +# +# source://mail//lib/mail/elements/address.rb#24 +class Mail::Address + # @return [Address] a new instance of Address + # + # source://mail//lib/mail/elements/address.rb#25 + def initialize(value = T.unsafe(nil)); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/address_equality.rb#5 + def ==(other_address); end + + # Returns the address that is in the address itself. That is, the + # local@domain string, without any angle brackets or the like. + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.address #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/elements/address.rb#65 + def address(output_type = T.unsafe(nil)); end + + # Provides a way to assign an address to an already made Mail::Address object. + # + # a = Address.new + # a.address = 'Mikel Lindsaar (My email address) ' + # a.address #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/elements/address.rb#79 + def address=(value); end + + # Returns an array of comments that are in the email, or nil if there + # are no comments + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.comments #=> ['My email address'] + # + # b = Address.new('Mikel Lindsaar ') + # b.comments #=> nil + # + # source://mail//lib/mail/elements/address.rb#132 + def comments; end + + # source://mail//lib/mail/elements/address.rb#173 + def decoded; end + + # Returns the display name of the email address passed in. + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.display_name #=> 'Mikel Lindsaar' + # + # source://mail//lib/mail/elements/address.rb#87 + def display_name(output_type = T.unsafe(nil)); end + + # Provides a way to assign a display name to an already made Mail::Address object. + # + # a = Address.new + # a.address = 'mikel@test.lindsaar.net' + # a.display_name = 'Mikel Lindsaar' + # a.format #=> 'Mikel Lindsaar ' + # + # source://mail//lib/mail/elements/address.rb#99 + def display_name=(str); end + + # Returns the domain part (the right hand side of the @ sign in the email address) of + # the address + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.domain #=> 'test.lindsaar.net' + # + # source://mail//lib/mail/elements/address.rb#118 + def domain(output_type = T.unsafe(nil)); end + + # source://mail//lib/mail/elements/address.rb#169 + def encoded; end + + # Returns a correctly formatted address for the email going out. If given + # an incorrectly formatted address as input, Mail::Address will do its best + # to format it correctly. This includes quoting display names as needed and + # putting the address in angle brackets etc. + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.format #=> 'Mikel Lindsaar (My email address)' + # + # source://mail//lib/mail/elements/address.rb#47 + def format(output_type = T.unsafe(nil)); end + + # source://mail//lib/mail/elements/address.rb#177 + def group; end + + # Shows the Address object basic details, including the Address + # a = Address.new('Mikel (My email) ') + # a.inspect #=> "# (My email)| >" + # + # source://mail//lib/mail/elements/address.rb#164 + def inspect; end + + # Returns the local part (the left hand side of the @ sign in the email address) of + # the address + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.local #=> 'mikel' + # + # source://mail//lib/mail/elements/address.rb#108 + def local(output_type = T.unsafe(nil)); end + + # Sometimes an address will not have a display name, but might have the name + # as a comment field after the address. This returns that name if it exists. + # + # a = Address.new('mikel@test.lindsaar.net (Mikel Lindsaar)') + # a.name #=> 'Mikel Lindsaar' + # + # source://mail//lib/mail/elements/address.rb#147 + def name; end + + # Returns the raw input of the passed in string, this is before it is passed + # by the parser. + # + # source://mail//lib/mail/elements/address.rb#36 + def raw; end + + # Returns the format of the address, or returns nothing + # + # a = Address.new('Mikel Lindsaar (My email address) ') + # a.format #=> 'Mikel Lindsaar (My email address)' + # + # source://mail//lib/mail/elements/address.rb#156 + def to_s; end + + private + + # source://mail//lib/mail/elements/address.rb#237 + def format_comments; end + + # source://mail//lib/mail/elements/address.rb#254 + def get_comments; end + + # source://mail//lib/mail/elements/address.rb#218 + def get_display_name; end + + # source://mail//lib/mail/elements/address.rb#250 + def get_domain; end + + # source://mail//lib/mail/elements/address.rb#246 + def get_local; end + + # source://mail//lib/mail/elements/address.rb#227 + def get_name; end + + # source://mail//lib/mail/elements/address.rb#183 + def parse(value = T.unsafe(nil)); end + + # source://mail//lib/mail/elements/address.rb#198 + def strip_all_comments(string); end + + # source://mail//lib/mail/elements/address.rb#207 + def strip_domain_comments(value); end + + class << self + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/address_wrapping.rb#5 + def wrap(address); end + end +end + +# source://mail//lib/mail/fields/common_address_field.rb#6 +class Mail::AddressContainer < ::Array + # @return [AddressContainer] a new instance of AddressContainer + # + # source://mail//lib/mail/fields/common_address_field.rb#7 + def initialize(field, list = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/common_address_field.rb#12 + def <<(address); end +end + +# source://mail//lib/mail/elements/address_list.rb#6 +class Mail::AddressList + # Mail::AddressList is the class that parses To, From and other address fields from + # emails passed into Mail. + # + # AddressList provides a way to query the groups and mailbox lists of the passed in + # string. + # + # It can supply all addresses in an array, or return each address as an address object. + # + # Mail::AddressList requires a correctly formatted group or mailbox list per RFC2822 or + # RFC822. It also handles all obsolete versions in those RFCs. + # + # list = 'ada@test.lindsaar.net, My Group: mikel@test.lindsaar.net, Bob ;' + # a = AddressList.new(list) + # a.addresses #=> [# ["My Group"] + # + # @return [AddressList] a new instance of AddressList + # + # source://mail//lib/mail/elements/address_list.rb#24 + def initialize(string); end + + # Returns the value of attribute addresses. + # + # source://mail//lib/mail/elements/address_list.rb#7 + def addresses; end + + # source://mail//lib/mail/elements/address_list.rb#30 + def addresses_grouped_by_group; end + + # Returns the value of attribute group_names. + # + # source://mail//lib/mail/elements/address_list.rb#7 + def group_names; end +end + +# source://mail//lib/mail/attachments_list.rb#3 +class Mail::AttachmentsList < ::Array + # @return [AttachmentsList] a new instance of AttachmentsList + # + # source://mail//lib/mail/attachments_list.rb#5 + def initialize(parts_list); end + + # Returns the attachment by filename or at index. + # + # mail.attachments['test.png'] = File.read('test.png') + # mail.attachments['test.jpg'] = File.read('test.jpg') + # + # mail.attachments['test.png'].filename #=> 'test.png' + # mail.attachments[1].filename #=> 'test.jpg' + # + # source://mail//lib/mail/attachments_list.rb#32 + def [](index_value); end + + # source://mail//lib/mail/attachments_list.rb#40 + def []=(name, value); end + + # Uses the mime type to try and guess the encoding, if it is a binary type, or unknown, then we + # set it to binary, otherwise as set to plain text + # + # source://mail//lib/mail/attachments_list.rb#91 + def guess_encoding; end + + # source://mail//lib/mail/attachments_list.rb#20 + def inline; end + + # source://mail//lib/mail/attachments_list.rb#99 + def set_mime_type(filename); end +end + +# = Blind Carbon Copy Field +# +# The Bcc field inherits from StructuredField and handles the Bcc: header +# field in the email. +# +# Sending bcc to a mail message will instantiate a Mail::Field object that +# has a BccField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Bcc field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.bcc = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:bcc] #=> '# '# '# '' # Bcc field does not get output into an email +# mail[:bcc].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:bcc].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:bcc].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/bcc_field.rb#31 +class Mail::BccField < ::Mail::CommonAddressField + # @return [BccField] a new instance of BccField + # + # source://mail//lib/mail/fields/bcc_field.rb#36 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # Bcc field should not be :encoded by default + # + # source://mail//lib/mail/fields/bcc_field.rb#42 + def encoded; end + + # Returns the value of attribute include_in_headers. + # + # source://mail//lib/mail/fields/bcc_field.rb#34 + def include_in_headers; end + + # Sets the attribute include_in_headers + # + # @param value the value to set the attribute include_in_headers to. + # + # source://mail//lib/mail/fields/bcc_field.rb#34 + def include_in_headers=(_arg0); end +end + +# source://mail//lib/mail/fields/bcc_field.rb#32 +Mail::BccField::NAME = T.let(T.unsafe(nil), String) + +# = Body +# +# The body is where the text of the email is stored. Mail treats the body +# as a single object. The body itself has no information about boundaries +# used in the MIME standard, it just looks at its content as either a single +# block of text, or (if it is a multipart message) as an array of blocks of text. +# +# A body has to be told to split itself up into a multipart message by calling +# #split with the correct boundary. This is because the body object has no way +# of knowing what the correct boundary is for itself (there could be many +# boundaries in a body in the case of a nested MIME text). +# +# Once split is called, Mail::Body will slice itself up on this boundary, +# assigning anything that appears before the first part to the preamble, and +# anything that appears after the closing boundary to the epilogue, then +# each part gets initialized into a Mail::Part object. +# +# The boundary that is used to split up the Body is also stored in the Body +# object for use on encoding itself back out to a string. You can +# overwrite this if it needs to be changed. +# +# On encoding, the body will return the preamble, then each part joined by +# the boundary, followed by a closing boundary string and then the epilogue. +# +# source://mail//lib/mail/body.rb#28 +class Mail::Body + # @return [Body] a new instance of Body + # + # source://mail//lib/mail/body.rb#30 + def initialize(string = T.unsafe(nil)); end + + # source://mail//lib/mail/body.rb#233 + def <<(val); end + + # Matches this body with another body. Also matches the decoded value of this + # body with a string. + # + # Examples: + # + # body = Mail::Body.new('The body') + # body == body #=> true + # + # body = Mail::Body.new('The body') + # body == 'The body' #=> true + # + # body = Mail::Body.new("VGhlIGJvZHk=\n") + # body.encoding = 'base64' + # body == "The body" #=> true + # + # source://mail//lib/mail/body.rb#72 + def ==(other); end + + # Accepts a string and performs a regular expression against the decoded text + # + # Examples: + # + # body = Mail::Body.new('The body') + # body =~ /The/ #=> 0 + # + # body = Mail::Body.new("VGhlIGJvZHk=\n") + # body.encoding = 'base64' + # body =~ /The/ #=> 0 + # + # source://mail//lib/mail/body.rb#90 + def =~(regexp); end + + # @return [Boolean] + # + # source://mail//lib/mail/body.rb#253 + def ascii_only?; end + + # Returns and sets the boundary used by the body + # Allows you to change the boundary of this Body object + # + # source://mail//lib/mail/body.rb#226 + def boundary; end + + # Returns and sets the boundary used by the body + # Allows you to change the boundary of this Body object + # + # source://mail//lib/mail/body.rb#226 + def boundary=(_arg0); end + + # Returns and sets the original character encoding + # + # source://mail//lib/mail/body.rb#216 + def charset; end + + # Returns and sets the original character encoding + # + # source://mail//lib/mail/body.rb#216 + def charset=(_arg0); end + + # source://mail//lib/mail/body.rb#179 + def decoded; end + + # source://mail//lib/mail/body.rb#264 + def default_encoding; end + + # @return [Boolean] + # + # source://mail//lib/mail/body.rb#260 + def empty?; end + + # Returns a body encoded using transfer_encoding. Multipart always uses an + # identiy encoding (i.e. no encoding). + # Calling this directly is not a good idea, but supported for compatibility + # TODO: Validate that preamble and epilogue are valid for requested encoding + # + # source://mail//lib/mail/body.rb#149 + def encoded(transfer_encoding = T.unsafe(nil)); end + + # source://mail//lib/mail/body.rb#191 + def encoding(val = T.unsafe(nil)); end + + # source://mail//lib/mail/body.rb#199 + def encoding=(val); end + + # Returns and sets the epilogue as a string (any text that is after the last MIME boundary) + # + # source://mail//lib/mail/body.rb#222 + def epilogue; end + + # Returns and sets the epilogue as a string (any text that is after the last MIME boundary) + # + # source://mail//lib/mail/body.rb#222 + def epilogue=(_arg0); end + + # Accepts anything that responds to #to_s and checks if it's a substring of the decoded text + # + # Examples: + # + # body = Mail::Body.new('The body') + # body.include?('The') #=> true + # + # body = Mail::Body.new("VGhlIGJvZHk=\n") + # body.encoding = 'base64' + # body.include?('The') #=> true + # + # @return [Boolean] + # + # source://mail//lib/mail/body.rb#118 + def include?(other); end + + # source://mail//lib/mail/body.rb#53 + def init_with(coder); end + + # Accepts a string and performs a regular expression against the decoded text + # + # Examples: + # + # body = Mail::Body.new('The body') + # body.match(/The/) #=> # + # + # body = Mail::Body.new("VGhlIGJvZHk=\n") + # body.encoding = 'base64' + # body.match(/The/) #=> # + # + # source://mail//lib/mail/body.rb#104 + def match(regexp); end + + # Returns true if there are parts defined in the body + # + # @return [Boolean] + # + # source://mail//lib/mail/body.rb#229 + def multipart?; end + + # source://mail//lib/mail/body.rb#141 + def negotiate_best_encoding(message_encoding, allowed_encodings = T.unsafe(nil)); end + + # Returns parts of the body + # + # source://mail//lib/mail/body.rb#213 + def parts; end + + # Returns and sets the preamble as a string (any text that is before the first MIME boundary) + # + # source://mail//lib/mail/body.rb#219 + def preamble; end + + # Returns and sets the preamble as a string (any text that is before the first MIME boundary) + # + # source://mail//lib/mail/body.rb#219 + def preamble=(_arg0); end + + # Returns the raw source that the body was initialized with, without + # any tampering + # + # source://mail//lib/mail/body.rb#210 + def raw_source; end + + # Allows you to set the sort order of the parts, overriding the default sort order. + # Defaults to 'text/plain', then 'text/enriched', then 'text/html', then 'multipart/alternative' + # with any other content type coming after. + # + # source://mail//lib/mail/body.rb#125 + def set_sort_order(order); end + + # Allows you to sort the parts according to the default sort order, or the sort order you + # set with :set_sort_order. + # + # sort_parts! is also called from :encode, so there is no need for you to call this explicitly + # + # source://mail//lib/mail/body.rb#133 + def sort_parts!; end + + # source://mail//lib/mail/body.rb#241 + def split!(boundary); end + + # source://mail//lib/mail/body.rb#187 + def to_s; end + + private + + # source://mail//lib/mail/body.rb#293 + def crlf_boundary; end + + # source://mail//lib/mail/body.rb#297 + def end_boundary; end + + # split parts by boundary, ignore first part if empty, append final part when closing boundary was missing + # + # source://mail//lib/mail/body.rb#271 + def extract_parts; end + + # source://mail//lib/mail/body.rb#301 + def set_charset; end +end + +# = Carbon Copy Field +# +# The Cc field inherits from StructuredField and handles the Cc: header +# field in the email. +# +# Sending cc to a mail message will instantiate a Mail::Field object that +# has a CcField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Cc field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.cc = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:cc] #=> '# '# '# 'Cc: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:cc].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:cc].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:cc].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/cc_field.rb#31 +class Mail::CcField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/cc_field.rb#32 +Mail::CcField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/check_delivery_params.rb#5 +module Mail::CheckDeliveryParams + class << self + # source://mail//lib/mail/check_delivery_params.rb#10 + def _deprecated_check(mail); end + + # source://mail//lib/mail/check_delivery_params.rb#32 + def _deprecated_check_addr(addr_name, addr); end + + # source://mail//lib/mail/check_delivery_params.rb#18 + def _deprecated_check_from(addr); end + + # source://mail//lib/mail/check_delivery_params.rb#53 + def _deprecated_check_message(message); end + + # source://mail//lib/mail/check_delivery_params.rb#24 + def _deprecated_check_to(addrs); end + + # source://mail//lib/mail/check_delivery_params.rb#38 + def _deprecated_validate_smtp_addr(addr); end + + def check(*args, **_arg1, &block); end + def check_addr(*args, **_arg1, &block); end + def check_from(*args, **_arg1, &block); end + def check_message(*args, **_arg1, &block); end + def check_to(*args, **_arg1, &block); end + def validate_smtp_addr(*args, **_arg1, &block); end + end +end + +# = Comments Field +# +# The Comments field inherits from UnstructuredField and handles the Comments: +# header field in the email. +# +# Sending comments to a mail message will instantiate a Mail::Field object that +# has a CommentsField as its field type. +# +# An email header can have as many comments fields as it wants. There is no upper +# limit, the comments field is also optional (that is, no comment is needed) +# +# == Examples: +# +# mail = Mail.new +# mail.comments = 'This is a comment' +# mail.comments #=> 'This is a comment' +# mail[:comments] #=> '# '# '# ['This is a comment', "This is another comment"] +# +# source://mail//lib/mail/fields/comments_field.rb#29 +class Mail::CommentsField < ::Mail::NamedUnstructuredField; end + +# source://mail//lib/mail/fields/comments_field.rb#30 +Mail::CommentsField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/fields/common_address_field.rb#17 +class Mail::CommonAddressField < ::Mail::NamedStructuredField + # @return [CommonAddressField] a new instance of CommonAddressField + # + # source://mail//lib/mail/fields/common_address_field.rb#22 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/common_address_field.rb#94 + def <<(val); end + + # source://mail//lib/mail/fields/common_address_field.rb#41 + def address; end + + # Returns the address string of all the addresses in the address list + # + # source://mail//lib/mail/fields/common_address_field.rb#46 + def addresses; end + + # Returns the actual address objects in the address list + # + # source://mail//lib/mail/fields/common_address_field.rb#64 + def addrs; end + + # Returns a list of decoded group addresses + # + # source://mail//lib/mail/fields/common_address_field.rb#80 + def decoded_group_addresses; end + + # source://mail//lib/mail/fields/common_address_field.rb#37 + def default; end + + # Returns the display name of all the addresses in the address list + # + # source://mail//lib/mail/fields/common_address_field.rb#58 + def display_names; end + + # Allows you to iterate through each address object in the address_list + # + # source://mail//lib/mail/fields/common_address_field.rb#31 + def each; end + + # source://mail//lib/mail/fields/common_address_field.rb#26 + def element; end + + # source://mail//lib/mail/fields/common_address_field.rb#105 + def encode_if_needed(val, val_charset = T.unsafe(nil)); end + + # Returns a list of encoded group addresses + # + # source://mail//lib/mail/fields/common_address_field.rb#85 + def encoded_group_addresses; end + + # Returns the formatted string of all the addresses in the address list + # + # source://mail//lib/mail/fields/common_address_field.rb#52 + def formatted; end + + # Returns the addresses that are part of groups + # + # source://mail//lib/mail/fields/common_address_field.rb#75 + def group_addresses; end + + # Returns the name of all the groups in a string + # + # source://mail//lib/mail/fields/common_address_field.rb#90 + def group_names; end + + # Returns a hash of group name => address strings for the address list + # + # source://mail//lib/mail/fields/common_address_field.rb#70 + def groups; end + + private + + # source://mail//lib/mail/fields/common_address_field.rb#150 + def do_decode; end + + # source://mail//lib/mail/fields/common_address_field.rb#140 + def do_encode; end + + # source://mail//lib/mail/fields/common_address_field.rb#160 + def get_group_addresses(group_list); end + + # Pass through UTF-8 addresses + # + # source://mail//lib/mail/fields/common_address_field.rb#123 + def utf8_if_needed(val, val_charset); end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/common_address_field.rb#18 + def singular?; end + end +end + +# source://mail//lib/mail/fields/common_date_field.rb#6 +class Mail::CommonDateField < ::Mail::NamedStructuredField + # @return [CommonDateField] a new instance of CommonDateField + # + # source://mail//lib/mail/fields/common_date_field.rb#30 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # Returns a date time object of the parsed date + # + # source://mail//lib/mail/fields/common_date_field.rb#35 + def date_time; end + + # source://mail//lib/mail/fields/common_date_field.rb#41 + def default; end + + # source://mail//lib/mail/fields/common_date_field.rb#45 + def element; end + + private + + # source://mail//lib/mail/fields/common_date_field.rb#54 + def do_decode; end + + # source://mail//lib/mail/fields/common_date_field.rb#50 + def do_encode; end + + class << self + # source://mail//lib/mail/fields/common_date_field.rb#11 + def normalize_datetime(string); end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/common_date_field.rb#7 + def singular?; end + end +end + +# source://mail//lib/mail/fields/common_field.rb#6 +class Mail::CommonField + # @return [CommonField] a new instance of CommonField + # + # source://mail//lib/mail/fields/common_field.rb#20 + def initialize(name = T.unsafe(nil), value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # Returns the value of attribute charset. + # + # source://mail//lib/mail/fields/common_field.rb#17 + def charset; end + + # Sets the attribute charset + # + # @param value the value to set the attribute charset to. + # + # source://mail//lib/mail/fields/common_field.rb#17 + def charset=(_arg0); end + + # source://mail//lib/mail/fields/common_field.rb#54 + def decoded; end + + # source://mail//lib/mail/fields/common_field.rb#50 + def default; end + + # source://mail//lib/mail/fields/common_field.rb#42 + def element; end + + # source://mail//lib/mail/fields/common_field.rb#58 + def encoded; end + + # Returns the value of attribute errors. + # + # source://mail//lib/mail/fields/common_field.rb#18 + def errors; end + + # Returns the value of attribute name. + # + # source://mail//lib/mail/fields/common_field.rb#15 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://mail//lib/mail/fields/common_field.rb#15 + def name=(_arg0); end + + # source://mail//lib/mail/fields/common_field.rb#38 + def parse; end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/common_field.rb#62 + def responsible_for?(field_name); end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/common_field.rb#28 + def singular?; end + + # source://mail//lib/mail/fields/common_field.rb#46 + def to_s; end + + # Returns the value of attribute value. + # + # source://mail//lib/mail/fields/common_field.rb#16 + def value; end + + # source://mail//lib/mail/fields/common_field.rb#32 + def value=(value); end + + private + + # source://mail//lib/mail/fields/common_field.rb#69 + def ensure_filename_quoted(value); end + + class << self + # source://mail//lib/mail/fields/common_field.rb#11 + def parse(*args); end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/common_field.rb#7 + def singular?; end + end +end + +# source://mail//lib/mail/fields/common_field.rb#68 +Mail::CommonField::FILENAME_RE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/fields/common_message_id_field.rb#7 +class Mail::CommonMessageIdField < ::Mail::NamedStructuredField + # source://mail//lib/mail/fields/common_message_id_field.rb#20 + def default; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#8 + def element; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#12 + def message_id; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#16 + def message_ids; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#25 + def to_s; end + + private + + # source://mail//lib/mail/fields/common_message_id_field.rb#34 + def do_decode; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#30 + def do_encode; end + + # source://mail//lib/mail/fields/common_message_id_field.rb#38 + def formatted_message_ids(join = T.unsafe(nil)); end +end + +# The Configuration class is a Singleton used to hold the default +# configuration for all Mail objects. +# +# Each new mail object gets a copy of these values at initialization +# which can be overwritten on a per mail object basis. +# +# source://mail//lib/mail/configuration.rb#15 +class Mail::Configuration + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Configuration] a new instance of Configuration + # + # source://mail//lib/mail/configuration.rb#18 + def initialize; end + + # source://mail//lib/mail/configuration.rb#24 + def delivery_method(method = T.unsafe(nil), settings = T.unsafe(nil)); end + + # source://mail//lib/mail/configuration.rb#29 + def lookup_delivery_method(method); end + + # source://mail//lib/mail/configuration.rb#57 + def lookup_retriever_method(method); end + + # source://mail//lib/mail/configuration.rb#72 + def param_encode_language(value = T.unsafe(nil)); end + + # source://mail//lib/mail/configuration.rb#52 + def retriever_method(method = T.unsafe(nil), settings = T.unsafe(nil)); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/constants.rb#4 +module Mail::Constants; end + +# source://mail//lib/mail/constants.rb#66 +Mail::Constants::ASTERISK = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#35 +Mail::Constants::ATOM_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#77 +Mail::Constants::B_VALUES = T.let(T.unsafe(nil), Array) + +# source://mail//lib/mail/constants.rb#72 +Mail::Constants::CAPITAL_M = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#65 +Mail::Constants::COLON = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#34 +Mail::Constants::CONTROL_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#68 +Mail::Constants::CR = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#67 +Mail::Constants::CRLF = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#70 +Mail::Constants::CR_ENCODED = T.let(T.unsafe(nil), String) + +# m is multi-line, i is case-insensitive, x is free-spacing +# +# source://mail//lib/mail/constants.rb#61 +Mail::Constants::EMPTY = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#39 +Mail::Constants::ENCODED_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#73 +Mail::Constants::EQUAL_LF = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#26 +Mail::Constants::FIELD_BODY = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#27 +Mail::Constants::FIELD_LINE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#24 +Mail::Constants::FIELD_NAME = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#25 +Mail::Constants::FIELD_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#28 +Mail::Constants::FIELD_SPLIT = T.let(T.unsafe(nil), Regexp) + +# m is multi-line, i is case-insensitive, x is free-spacing +# +# source://mail//lib/mail/constants.rb#49 +Mail::Constants::FULL_ENCODED_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#21 +Mail::Constants::FWS = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#29 +Mail::Constants::HEADER_LINE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#30 +Mail::Constants::HEADER_SPLIT = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#64 +Mail::Constants::HYPHEN = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#19 +Mail::Constants::LAX_CRLF = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#69 +Mail::Constants::LF = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#71 +Mail::Constants::LF_ENCODED = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#74 +Mail::Constants::NULL_SENDER = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#36 +Mail::Constants::PHRASE_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#33 +Mail::Constants::QP_SAFE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#32 +Mail::Constants::QP_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#76 +Mail::Constants::Q_VALUES = T.let(T.unsafe(nil), Array) + +# source://mail//lib/mail/constants.rb#62 +Mail::Constants::SPACE = T.let(T.unsafe(nil), String) + +# + obs-text +# +# source://mail//lib/mail/constants.rb#23 +Mail::Constants::TEXT = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#37 +Mail::Constants::TOKEN_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#63 +Mail::Constants::UNDERSCORE = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/constants.rb#22 +Mail::Constants::UNFOLD_WS = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/constants.rb#20 +Mail::Constants::WSP = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/fields/content_description_field.rb#6 +class Mail::ContentDescriptionField < ::Mail::NamedUnstructuredField + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_description_field.rb#9 + def singular?; end + end +end + +# source://mail//lib/mail/fields/content_description_field.rb#7 +Mail::ContentDescriptionField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/content_disposition_element.rb#6 +class Mail::ContentDispositionElement + # @return [ContentDispositionElement] a new instance of ContentDispositionElement + # + # source://mail//lib/mail/elements/content_disposition_element.rb#9 + def initialize(string); end + + # Returns the value of attribute disposition_type. + # + # source://mail//lib/mail/elements/content_disposition_element.rb#7 + def disposition_type; end + + # Returns the value of attribute parameters. + # + # source://mail//lib/mail/elements/content_disposition_element.rb#7 + def parameters; end + + private + + # source://mail//lib/mail/elements/content_disposition_element.rb#16 + def cleaned(string); end +end + +# source://mail//lib/mail/fields/content_disposition_field.rb#7 +class Mail::ContentDispositionField < ::Mail::NamedStructuredField + # @return [ContentDispositionField] a new instance of ContentDispositionField + # + # source://mail//lib/mail/fields/content_disposition_field.rb#14 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/content_disposition_field.rb#41 + def decoded; end + + # source://mail//lib/mail/fields/content_disposition_field.rb#22 + def disposition_type; end + + # source://mail//lib/mail/fields/content_disposition_field.rb#18 + def element; end + + # source://mail//lib/mail/fields/content_disposition_field.rb#36 + def encoded; end + + # source://mail//lib/mail/fields/content_disposition_field.rb#32 + def filename; end + + # source://mail//lib/mail/fields/content_disposition_field.rb#26 + def parameters; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_disposition_field.rb#10 + def singular?; end + end +end + +# source://mail//lib/mail/fields/content_disposition_field.rb#8 +Mail::ContentDispositionField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/fields/content_id_field.rb#7 +class Mail::ContentIdField < ::Mail::NamedStructuredField + # @return [ContentIdField] a new instance of ContentIdField + # + # source://mail//lib/mail/fields/content_id_field.rb#14 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/content_id_field.rb#23 + def content_id; end + + # source://mail//lib/mail/fields/content_id_field.rb#19 + def element; end + + private + + # source://mail//lib/mail/fields/content_id_field.rb#28 + def do_decode; end + + # source://mail//lib/mail/fields/content_id_field.rb#32 + def do_encode; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_id_field.rb#10 + def singular?; end + end +end + +# source://mail//lib/mail/fields/content_id_field.rb#8 +Mail::ContentIdField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/content_location_element.rb#6 +class Mail::ContentLocationElement + # @return [ContentLocationElement] a new instance of ContentLocationElement + # + # source://mail//lib/mail/elements/content_location_element.rb#9 + def initialize(string); end + + # Returns the value of attribute location. + # + # source://mail//lib/mail/elements/content_location_element.rb#7 + def location; end + + # source://mail//lib/mail/elements/content_location_element.rb#13 + def to_s(*args); end +end + +# source://mail//lib/mail/fields/content_location_field.rb#6 +class Mail::ContentLocationField < ::Mail::NamedStructuredField + # source://mail//lib/mail/fields/content_location_field.rb#25 + def decoded; end + + # source://mail//lib/mail/fields/content_location_field.rb#13 + def element; end + + # source://mail//lib/mail/fields/content_location_field.rb#21 + def encoded; end + + # source://mail//lib/mail/fields/content_location_field.rb#17 + def location; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_location_field.rb#9 + def singular?; end + end +end + +# source://mail//lib/mail/fields/content_location_field.rb#7 +Mail::ContentLocationField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/content_transfer_encoding_element.rb#6 +class Mail::ContentTransferEncodingElement + # @return [ContentTransferEncodingElement] a new instance of ContentTransferEncodingElement + # + # source://mail//lib/mail/elements/content_transfer_encoding_element.rb#9 + def initialize(string); end + + # Returns the value of attribute encoding. + # + # source://mail//lib/mail/elements/content_transfer_encoding_element.rb#7 + def encoding; end +end + +# source://mail//lib/mail/fields/content_transfer_encoding_field.rb#6 +class Mail::ContentTransferEncodingField < ::Mail::NamedStructuredField + # @return [ContentTransferEncodingField] a new instance of ContentTransferEncodingField + # + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#24 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#28 + def element; end + + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#32 + def encoding; end + + private + + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#41 + def do_decode; end + + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#37 + def do_encode; end + + class << self + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#13 + def normalize_content_transfer_encoding(value); end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_transfer_encoding_field.rb#9 + def singular?; end + end +end + +# source://mail//lib/mail/fields/content_transfer_encoding_field.rb#7 +Mail::ContentTransferEncodingField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/content_type_element.rb#6 +class Mail::ContentTypeElement + # @return [ContentTypeElement] a new instance of ContentTypeElement + # + # source://mail//lib/mail/elements/content_type_element.rb#9 + def initialize(string); end + + # Returns the value of attribute main_type. + # + # source://mail//lib/mail/elements/content_type_element.rb#7 + def main_type; end + + # Returns the value of attribute parameters. + # + # source://mail//lib/mail/elements/content_type_element.rb#7 + def parameters; end + + # Returns the value of attribute sub_type. + # + # source://mail//lib/mail/elements/content_type_element.rb#7 + def sub_type; end + + private + + # source://mail//lib/mail/elements/content_type_element.rb#17 + def cleaned(string); end +end + +# source://mail//lib/mail/fields/content_type_field.rb#7 +class Mail::ContentTypeField < ::Mail::NamedStructuredField + # @return [ContentTypeField] a new instance of ContentTypeField + # + # source://mail//lib/mail/fields/content_type_field.rb#24 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/content_type_field.rb#47 + def attempt_to_clean; end + + # source://mail//lib/mail/fields/content_type_field.rb#63 + def content_type; end + + # source://mail//lib/mail/fields/content_type_field.rb#101 + def decoded; end + + # source://mail//lib/mail/fields/content_type_field.rb#68 + def default; end + + # source://mail//lib/mail/fields/content_type_field.rb#38 + def element; end + + # source://mail//lib/mail/fields/content_type_field.rb#96 + def encoded; end + + # source://mail//lib/mail/fields/content_type_field.rb#92 + def filename; end + + # source://mail//lib/mail/fields/content_type_field.rb#55 + def main_type; end + + # source://mail//lib/mail/fields/content_type_field.rb#72 + def parameters; end + + # source://mail//lib/mail/fields/content_type_field.rb#63 + def string; end + + # source://mail//lib/mail/fields/content_type_field.rb#88 + def stringify(params); end + + # source://mail//lib/mail/fields/content_type_field.rb#59 + def sub_type; end + + # source://mail//lib/mail/fields/content_type_field.rb#80 + def value; end + + private + + # source://mail//lib/mail/fields/content_type_field.rb#163 + def get_mime_type(val); end + + # source://mail//lib/mail/fields/content_type_field.rb#108 + def method_missing(name, *args, &block); end + + # Various special cases from random emails found that I am not going to change + # the parser for + # + # source://mail//lib/mail/fields/content_type_field.rb#119 + def sanitize(val); end + + class << self + # source://mail//lib/mail/fields/content_type_field.rb#19 + def generate_boundary; end + + # @return [Boolean] + # + # source://mail//lib/mail/fields/content_type_field.rb#11 + def singular?; end + + # source://mail//lib/mail/fields/content_type_field.rb#15 + def with_boundary(type); end + end +end + +# source://mail//lib/mail/fields/content_type_field.rb#8 +Mail::ContentTypeField::NAME = T.let(T.unsafe(nil), String) + +# = Date Field +# +# The Date field inherits from StructuredField and handles the Date: header +# field in the email. +# +# Sending date to a mail message will instantiate a Mail::Field object that +# has a DateField as its field type. This includes all Mail::CommonAddress +# module instance methods. +# +# There must be excatly one Date field in an RFC2822 email. +# +# == Examples: +# +# mail = Mail.new +# mail.date = 'Mon, 24 Nov 1997 14:22:01 -0800' +# mail.date #=> # +# mail.date.to_s #=> 'Mon, 24 Nov 1997 14:22:01 -0800' +# mail[:date] #=> '# '# '# 'This is あ string' + # + # source://mail//lib/mail/encodings.rb#234 + def b_value_decode(str); end + + # Encode a string with Base64 Encoding and returns it ready to be inserted + # as a value for a field, that is, in the =??B??= format + # + # Example: + # + # Encodings.b_value_encode('This is あ string', 'UTF-8') + # #=> "=?UTF-8?B?VGhpcyBpcyDjgYIgc3RyaW5n?=" + # + # source://mail//lib/mail/encodings.rb#199 + def b_value_encode(string, encoding = T.unsafe(nil)); end + + # Split header line into proper encoded and unencoded parts. + # + # String has to be of the format =??[QB]??= + # + # Omit unencoded space after an encoded-word. + # + # source://mail//lib/mail/encodings.rb#258 + def collapse_adjacent_encodings(str); end + + # Decodes or encodes a string as needed for either Base64 or QP encoding types in + # the =??[QB]??=" format. + # + # The output type needs to be :decode to decode the input string or :encode to + # encode the input string. The character set used for encoding will be the + # encoding on the string passed in. + # + # On encoding, will only send out Base64 encoded strings. + # + # source://mail//lib/mail/encodings.rb#105 + def decode_encode(str, output_type); end + + # Is the encoding we want defined? + # + # Example: + # + # Encodings.defined?(:base64) #=> true + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings.rb#29 + def defined?(name); end + + # Partition the string into bounded-size chunks without splitting + # multibyte characters. + # + # source://mail//lib/mail/encodings.rb#280 + def each_base64_chunk_byterange(str, max_bytesize_per_base64_chunk, &block); end + + # Partition the string into bounded-size chunks without splitting + # multibyte characters. + # + # @yield [Utilities.string_byteslice(str, offset, chunksize)] + # + # source://mail//lib/mail/encodings.rb#293 + def each_chunk_byterange(str, max_bytesize_per_chunk); end + + # source://mail//lib/mail/encodings.rb#170 + def encode_non_usascii(address, charset); end + + # source://mail//lib/mail/encodings.rb#45 + def get_all; end + + # Gets a defined encoding type, QuotedPrintable or Base64 for now. + # + # Each encoding needs to be defined as a Mail::Encodings::ClassName for + # this to work, allows us to add other encodings in the future. + # + # Example: + # + # Encodings.get_encoding(:base64) #=> Mail::Encodings::Base64 + # + # source://mail//lib/mail/encodings.rb#41 + def get_encoding(name); end + + # source://mail//lib/mail/encodings.rb#49 + def get_name(name); end + + # Decodes a parameter value using URI Escaping. + # + # Example: + # + # Mail::Encodings.param_decode("This%20is%20fun", 'us-ascii') #=> "This is fun" + # + # str = Mail::Encodings.param_decode("This%20is%20fun", 'iso-8559-1') + # str.encoding #=> 'ISO-8859-1' ## Only on Ruby 1.9 + # str #=> "This is fun" + # + # source://mail//lib/mail/encodings.rb#93 + def param_decode(str, encoding); end + + # Encodes a parameter value using URI Escaping, note the language field 'en' can + # be set using Mail::Configuration, like so: + # + # Mail.defaults do + # param_encode_language 'jp' + # end + # + # The character set used for encoding will be the encoding on the string passed in. + # + # Example: + # + # Mail::Encodings.param_encode("This is fun") #=> "us-ascii'en'This%20is%20fun" + # + # source://mail//lib/mail/encodings.rb#73 + def param_encode(str); end + + # Decodes a Quoted-Printable string from the "=?UTF-8?Q?This_is_=E3=81=82_string?=" format + # + # Example: + # + # Encodings.q_value_decode("=?UTF-8?Q?This_is_=E3=81=82_string?=") + # #=> 'This is あ string' + # + # source://mail//lib/mail/encodings.rb#244 + def q_value_decode(str); end + + # Encode a string with Quoted-Printable Encoding and returns it ready to be inserted + # as a value for a field, that is, in the =??Q??= format + # + # Example: + # + # Encodings.q_value_encode('This is あ string', 'UTF-8') + # #=> "=?UTF-8?Q?This_is_=E3=81=82_string?=" + # + # source://mail//lib/mail/encodings.rb#217 + def q_value_encode(encoded_str, encoding = T.unsafe(nil)); end + + # Register transfer encoding + # + # Example + # + # Encodings.register "base64", Mail::Encodings::Base64 + # + # source://mail//lib/mail/encodings.rb#20 + def register(name, cls); end + + # source://mail//lib/mail/encodings.rb#53 + def transcode_charset(str, from_charset, to_charset = T.unsafe(nil)); end + + # Takes an encoded string of the format =??[QB]??= + # + # source://mail//lib/mail/encodings.rb#140 + def unquote_and_convert_to(str, to_encoding); end + + # Decodes a given string as Base64 or Quoted Printable, depending on what + # type it is. + # + # String has to be of the format =??[QB]??= + # + # source://mail//lib/mail/encodings.rb#122 + def value_decode(str); end + + # Gets the encoding type (Q or B) from the string. + # + # source://mail//lib/mail/encodings.rb#249 + def value_encoding_from_string(str); end + end +end + +# Base64 encoding handles binary content at the cost of 4 output bytes +# per input byte. +# +# source://mail//lib/mail/encodings/base64.rb#9 +class Mail::Encodings::Base64 < ::Mail::Encodings::SevenBit + class << self + # @return [Boolean] + # + # source://mail//lib/mail/encodings/base64.rb#14 + def can_encode?(enc); end + + # Ruby Base64 inserts newlines automatically, so it doesn't exceed + # SMTP line length limits. + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/base64.rb#33 + def compatible_input?(str); end + + # 3 bytes in -> 4 bytes out + # + # source://mail//lib/mail/encodings/base64.rb#27 + def cost(str); end + + # source://mail//lib/mail/encodings/base64.rb#18 + def decode(str); end + + # source://mail//lib/mail/encodings/base64.rb#22 + def encode(str); end + end +end + +# source://mail//lib/mail/encodings/base64.rb#10 +Mail::Encodings::Base64::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/base64.rb#11 +Mail::Encodings::Base64::PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/encodings/binary.rb#7 +class Mail::Encodings::Binary < ::Mail::Encodings::Identity; end + +# source://mail//lib/mail/encodings/binary.rb#8 +Mail::Encodings::Binary::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/binary.rb#9 +Mail::Encodings::Binary::PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/encodings/8bit.rb#7 +class Mail::Encodings::EightBit < ::Mail::Encodings::Binary + class << self + # Per RFC 2821 4.5.3.1, SMTP lines may not be longer than 1000 octets including the . + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/8bit.rb#13 + def compatible_input?(str); end + end +end + +# source://mail//lib/mail/encodings/8bit.rb#8 +Mail::Encodings::EightBit::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/8bit.rb#9 +Mail::Encodings::EightBit::PRIORITY = T.let(T.unsafe(nil), Integer) + +# Identity encodings do no encoding/decoding and have a fixed cost: +# 1 byte in -> 1 byte out. +# +# source://mail//lib/mail/encodings/identity.rb#9 +class Mail::Encodings::Identity < ::Mail::Encodings::TransferEncoding + class << self + # 1 output byte per input byte. + # + # source://mail//lib/mail/encodings/identity.rb#19 + def cost(str); end + + # source://mail//lib/mail/encodings/identity.rb#10 + def decode(str); end + + # source://mail//lib/mail/encodings/identity.rb#14 + def encode(str); end + end +end + +# source://mail//lib/mail/encodings/quoted_printable.rb#7 +class Mail::Encodings::QuotedPrintable < ::Mail::Encodings::SevenBit + class << self + # @return [Boolean] + # + # source://mail//lib/mail/encodings/quoted_printable.rb#12 + def can_encode?(enc); end + + # QP inserts newlines automatically and cannot violate the SMTP spec. + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/quoted_printable.rb#36 + def compatible_input?(str); end + + # source://mail//lib/mail/encodings/quoted_printable.rb#26 + def cost(str); end + + # Decode the string from Quoted-Printable. Cope with hard line breaks + # that were incorrectly encoded as hex instead of literal CRLF. + # + # source://mail//lib/mail/encodings/quoted_printable.rb#18 + def decode(str); end + + # source://mail//lib/mail/encodings/quoted_printable.rb#22 + def encode(str); end + end +end + +# source://mail//lib/mail/encodings/quoted_printable.rb#8 +Mail::Encodings::QuotedPrintable::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/quoted_printable.rb#10 +Mail::Encodings::QuotedPrintable::PRIORITY = T.let(T.unsafe(nil), Integer) + +# 7bit and 8bit are equivalent. 7bit encoding is for text only. +# +# source://mail//lib/mail/encodings/7bit.rb#8 +class Mail::Encodings::SevenBit < ::Mail::Encodings::EightBit + class << self + # Per RFC 2045 2.7. 7bit Data, No octets with decimal values greater than 127 are allowed. + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/7bit.rb#22 + def compatible_input?(str); end + + # source://mail//lib/mail/encodings/7bit.rb#13 + def decode(str); end + + # source://mail//lib/mail/encodings/7bit.rb#17 + def encode(str); end + end +end + +# source://mail//lib/mail/encodings/7bit.rb#9 +Mail::Encodings::SevenBit::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/7bit.rb#10 +Mail::Encodings::SevenBit::PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/encodings/transfer_encoding.rb#5 +class Mail::Encodings::TransferEncoding + class << self + # Override in subclasses to indicate that they can encode text + # that couldn't be directly transported, e.g. Base64 has 7bit output, + # but it can encode binary. + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/transfer_encoding.rb#19 + def can_encode?(enc); end + + # And encoding's superclass can always transport it since the + # class hierarchy is arranged e.g. Base64 < 7bit < 8bit < Binary. + # + # @return [Boolean] + # + # source://mail//lib/mail/encodings/transfer_encoding.rb#12 + def can_transport?(enc); end + + # @return [Boolean] + # + # source://mail//lib/mail/encodings/transfer_encoding.rb#27 + def compatible_input?(str); end + + # source://mail//lib/mail/encodings/transfer_encoding.rb#23 + def cost(str); end + + # source://mail//lib/mail/encodings/transfer_encoding.rb#56 + def lowest_cost(str, encodings); end + + # source://mail//lib/mail/encodings/transfer_encoding.rb#35 + def negotiate(message_encoding, source_encoding, str, allowed_encodings = T.unsafe(nil)); end + + # source://mail//lib/mail/encodings/transfer_encoding.rb#46 + def renegotiate(message_encoding, source_encoding, str, allowed_encodings = T.unsafe(nil)); end + + # source://mail//lib/mail/encodings/transfer_encoding.rb#31 + def to_s; end + end +end + +# source://mail//lib/mail/encodings/transfer_encoding.rb#6 +Mail::Encodings::TransferEncoding::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/encodings/transfer_encoding.rb#8 +Mail::Encodings::TransferEncoding::PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/encodings/unix_to_unix.rb#4 +class Mail::Encodings::UnixToUnix < ::Mail::Encodings::TransferEncoding + class << self + # source://mail//lib/mail/encodings/unix_to_unix.rb#7 + def decode(str); end + + # source://mail//lib/mail/encodings/unix_to_unix.rb#11 + def encode(str); end + end +end + +# source://mail//lib/mail/encodings/unix_to_unix.rb#5 +Mail::Encodings::UnixToUnix::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/envelope.rb#13 +class Mail::Envelope < ::Mail::NamedStructuredField + # source://mail//lib/mail/envelope.rb#24 + def date; end + + # source://mail//lib/mail/envelope.rb#16 + def element; end + + # source://mail//lib/mail/envelope.rb#20 + def from; end +end + +# source://mail//lib/mail/envelope.rb#14 +Mail::Envelope::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/envelope_from_element.rb#7 +class Mail::EnvelopeFromElement + # @return [EnvelopeFromElement] a new instance of EnvelopeFromElement + # + # source://mail//lib/mail/elements/envelope_from_element.rb#10 + def initialize(string); end + + # Returns the value of attribute address. + # + # source://mail//lib/mail/elements/envelope_from_element.rb#8 + def address; end + + # Returns the value of attribute date_time. + # + # source://mail//lib/mail/elements/envelope_from_element.rb#8 + def date_time; end + + # RFC 4155: + # a timestamp indicating the UTC date and time when the message + # was originally received, conformant with the syntax of the + # traditional UNIX 'ctime' output sans timezone (note that the + # use of UTC precludes the need for a timezone indicator); + # + # source://mail//lib/mail/elements/envelope_from_element.rb#21 + def formatted_date_time; end + + # source://mail//lib/mail/elements/envelope_from_element.rb#31 + def to_s; end +end + +# A delivery method implementation which sends via exim. +# +# To use this, first find out where the exim binary is on your computer, +# if you are on a mac or unix box, it is usually in /usr/sbin/exim, this will +# be your exim location. +# +# Mail.defaults do +# delivery_method :exim +# end +# +# Or if your exim binary is not at '/usr/sbin/exim' +# +# Mail.defaults do +# delivery_method :exim, :location => '/absolute/path/to/your/exim' +# end +# +# Then just deliver the email as normal: +# +# Mail.deliver do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing exim' +# body 'testing exim' +# end +# +# Or by calling deliver on a Mail message +# +# mail = Mail.new do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing exim' +# body 'testing exim' +# end +# +# mail.deliver! +# +# source://mail//lib/mail/network/delivery_methods/exim.rb#39 +class Mail::Exim < ::Mail::Sendmail + # Uses -t option to extract recipients from the message. + # + # source://mail//lib/mail/network/delivery_methods/exim.rb#46 + def destinations_for(envelope); end +end + +# source://mail//lib/mail/network/delivery_methods/exim.rb#40 +Mail::Exim::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# Provides a single class to call to create a new structured or unstructured +# field. Works out per RFC what field of field it is being given and returns +# the correct field of class back on new. +# +# ===Per RFC 2822 +# +# 2.2. Header Fields +# +# Header fields are lines composed of a field name, followed by a colon +# (":"), followed by a field body, and terminated by CRLF. A field +# name MUST be composed of printable US-ASCII characters (i.e., +# characters that have values between 33 and 126, inclusive), except +# colon. A field body may be composed of any US-ASCII characters, +# except for CR and LF. However, a field body may contain CRLF when +# used in header "folding" and "unfolding" as described in section +# 2.2.3. All field bodies MUST conform to the syntax described in +# sections 3 and 4 of this standard. +# +# source://mail//lib/mail/field.rb#25 +class Mail::Field + include ::Comparable + + # Create a field by name and optional value: + # + # Mail::Field.new("field-name", "value") + # # => # + # + # Values that aren't strings or arrays are coerced to Strings with `#to_s`. + # + # Mail::Field.new("field-name", 1234) + # # => # + # + # Mail::Field.new('content-type', ['text', 'plain', {:charset => 'UTF-8'}]) + # # => # + # + # @return [Field] a new instance of Field + # + # source://mail//lib/mail/field.rb#166 + def initialize(name, value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/field.rb#224 + def <=>(other); end + + # source://mail//lib/mail/field.rb#216 + def ==(other); end + + # source://mail//lib/mail/field.rb#186 + def field; end + + # source://mail//lib/mail/field.rb#182 + def field=(field); end + + # source://mail//lib/mail/field.rb#228 + def field_order_id; end + + # source://mail//lib/mail/field.rb#206 + def inspect; end + + # source://mail//lib/mail/field.rb#232 + def method_missing(name, *args, &block); end + + # source://mail//lib/mail/field.rb#190 + def name; end + + # @return [Boolean] + # + # source://mail//lib/mail/field.rb#220 + def responsible_for?(field_name); end + + # source://mail//lib/mail/field.rb#212 + def same(other); end + + # source://mail//lib/mail/field.rb#202 + def to_s; end + + # Returns the value of attribute unparsed_value. + # + # source://mail//lib/mail/field.rb#152 + def unparsed_value; end + + # source://mail//lib/mail/field.rb#194 + def value; end + + # source://mail//lib/mail/field.rb#198 + def value=(val); end + + private + + # source://mail//lib/mail/field.rb#253 + def create_field(name, value, charset); end + + # source://mail//lib/mail/field.rb#261 + def parse_field(name, value, charset); end + + # @return [Boolean] + # + # source://mail//lib/mail/field.rb#236 + def respond_to_missing?(method_name, include_private); end + + # 2.2.3. Long Header Fields + # + # The process of moving from this folded multiple-line representation + # of a header field to its single line representation is called + # "unfolding". Unfolding is accomplished by simply removing any CRLF + # that is immediately followed by WSP. Each header field should be + # treated in its unfolded form for further syntactic and semantic + # evaluation. + # + # source://mail//lib/mail/field.rb#279 + def unfold(string); end + + class << self + # source://mail//lib/mail/field.rb#147 + def field_class_for(name); end + + # Parse a field from a raw header line: + # + # Mail::Field.parse("field-name: field data") + # # => # + # + # source://mail//lib/mail/field.rb#122 + def parse(field, charset = T.unsafe(nil)); end + + # source://mail//lib/mail/field.rb#129 + def split(raw_field); end + end +end + +# source://mail//lib/mail/field.rb#38 +Mail::Field::FIELDS_MAP = T.let(T.unsafe(nil), Hash) + +# source://mail//lib/mail/field.rb#70 +Mail::Field::FIELD_NAME_MAP = T.let(T.unsafe(nil), Hash) + +# source://mail//lib/mail/field.rb#240 +Mail::Field::FIELD_ORDER_LOOKUP = T.let(T.unsafe(nil), Hash) + +# Generic Field Exception +# +# source://mail//lib/mail/field.rb#75 +class Mail::Field::FieldError < ::StandardError; end + +# source://mail//lib/mail/field.rb#106 +class Mail::Field::IncompleteParseError < ::Mail::Field::ParseError + # @return [IncompleteParseError] a new instance of IncompleteParseError + # + # source://mail//lib/mail/field.rb#107 + def initialize(element, original_text, unparsed_index); end +end + +# source://mail//lib/mail/field.rb#36 +Mail::Field::KNOWN_FIELDS = T.let(T.unsafe(nil), Array) + +# source://mail//lib/mail/field.rb#100 +class Mail::Field::NilParseError < ::Mail::Field::ParseError + # @return [NilParseError] a new instance of NilParseError + # + # source://mail//lib/mail/field.rb#101 + def initialize(element); end +end + +# Raised when a parsing error has occurred (ie, a StructuredField has tried +# to parse a field that is invalid or improperly written) +# +# source://mail//lib/mail/field.rb#80 +class Mail::Field::ParseError < ::Mail::Field::FieldError + # @return [ParseError] a new instance of ParseError + # + # source://mail//lib/mail/field.rb#83 + def initialize(element, value, reason); end + + # source://mail//lib/mail/field.rb#81 + def element; end + + # source://mail//lib/mail/field.rb#81 + def element=(_arg0); end + + # source://mail//lib/mail/field.rb#81 + def reason; end + + # source://mail//lib/mail/field.rb#81 + def reason=(_arg0); end + + # source://mail//lib/mail/field.rb#81 + def value; end + + # source://mail//lib/mail/field.rb#81 + def value=(_arg0); end + + private + + # source://mail//lib/mail/field.rb#91 + def to_utf8(text); end +end + +# source://mail//lib/mail/field.rb#28 +Mail::Field::STRUCTURED_FIELDS = T.let(T.unsafe(nil), Array) + +# Raised when attempting to set a structured field's contents to an invalid syntax +# +# source://mail//lib/mail/field.rb#114 +class Mail::Field::SyntaxError < ::Mail::Field::FieldError; end + +# Field List class provides an enhanced array that keeps a list of +# email fields in order. And allows you to insert new fields without +# having to worry about the order they will appear in. +# +# source://mail//lib/mail/field_list.rb#8 +class Mail::FieldList < ::Array + # source://mail//lib/mail/field_list.rb#22 + def <<(field); end + + # source://mail//lib/mail/field_list.rb#22 + def add_field(field); end + + # source://mail//lib/mail/field_list.rb#60 + def delete_field(name); end + + # source://mail//lib/mail/field_list.rb#13 + def get_field(field_name); end + + # @return [Boolean] + # + # source://mail//lib/mail/field_list.rb#9 + def has_field?(field_name); end + + # source://mail//lib/mail/field_list.rb#46 + def insert_field(field); end + + # source://mail//lib/mail/field_list.rb#31 + def replace_field(field); end + + # source://mail//lib/mail/field_list.rb#64 + def summary; end + + private + + # source://mail//lib/mail/field_list.rb#70 + def select_fields(field_name); end + + # @return [Boolean] + # + # source://mail//lib/mail/field_list.rb#79 + def singular?(field_name); end +end + +# FileDelivery class delivers emails into multiple files based on the destination +# address. Each file is appended to if it already exists. +# +# So if you have an email going to fred@test, bob@test, joe@anothertest, and you +# set your location path to /path/to/mails then FileDelivery will create the directory +# if it does not exist, and put one copy of the email in three files, called +# by their message id +# +# Make sure the path you specify with :location is writable by the Ruby process +# running Mail. +# +# source://mail//lib/mail/network/delivery_methods/file_delivery.rb#15 +class Mail::FileDelivery + # @return [FileDelivery] a new instance of FileDelivery + # + # source://mail//lib/mail/network/delivery_methods/file_delivery.rb#20 + def initialize(values); end + + # source://mail//lib/mail/network/delivery_methods/file_delivery.rb#24 + def deliver!(mail); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/file_delivery.rb#18 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/delivery_methods/file_delivery.rb#18 + def settings=(_arg0); end +end + +# = From Field +# +# The From field inherits from StructuredField and handles the From: header +# field in the email. +# +# Sending from to a mail message will instantiate a Mail::Field object that +# has a FromField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one From field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.from = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:from] #=> '# '# '# 'from: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:from].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:from].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:from].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/from_field.rb#31 +class Mail::FromField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/from_field.rb#32 +Mail::FromField::NAME = T.let(T.unsafe(nil), String) + +# Provides access to a header object. +# +# ===Per RFC2822 +# +# 2.2. Header Fields +# +# Header fields are lines composed of a field name, followed by a colon +# (":"), followed by a field body, and terminated by CRLF. A field +# name MUST be composed of printable US-ASCII characters (i.e., +# characters that have values between 33 and 126, inclusive), except +# colon. A field body may be composed of any US-ASCII characters, +# except for CR and LF. However, a field body may contain CRLF when +# used in header "folding" and "unfolding" as described in section +# 2.2.3. All field bodies MUST conform to the syntax described in +# sections 3 and 4 of this standard. +# +# source://mail//lib/mail/header.rb#22 +class Mail::Header + include ::Enumerable + + # Creates a new header object. + # + # Accepts raw text or nothing. If given raw text will attempt to parse + # it and split it into the various fields, instantiating each field as + # it goes. + # + # If it finds a field that should be a structured field (such as content + # type), but it fails to parse it, it will simply make it an unstructured + # field and leave it alone. This will mean that the data is preserved but + # no automatic processing of that field will happen. If you find one of + # these cases, please make a patch and send it in, or at the least, send + # me the example so we can fix it. + # + # @return [Header] a new instance of Header + # + # source://mail//lib/mail/header.rb#53 + def initialize(header_text = T.unsafe(nil), charset = T.unsafe(nil)); end + + # 3.6. Field definitions + # + # The following table indicates limits on the number of times each + # field may occur in a message header as well as any special + # limitations on the use of those fields. An asterisk next to a value + # in the minimum or maximum column indicates that a special restriction + # appears in the Notes column. + # + # + # + # As per RFC, many fields can appear more than once, we will return a string + # of the value if there is only one header, or if there is more than one + # matching header, will return an array of values in order that they appear + # in the header ordered from top to bottom. + # + # Example: + # + # h = Header.new + # h.fields = ['To: mikel@me.com', 'X-Mail-SPAM: 15', 'X-Mail-SPAM: 20'] + # h['To'] #=> 'mikel@me.com' + # h['X-Mail-SPAM'] #=> ['15', '20'] + # + # source://mail//lib/mail/header.rb#130 + def [](name); end + + # Sets the FIRST matching field in the header to passed value, or deletes + # the FIRST field matched from the header if passed nil + # + # Example: + # + # h = Header.new + # h.fields = ['To: mikel@me.com', 'X-Mail-SPAM: 15', 'X-Mail-SPAM: 20'] + # h['To'] = 'bob@you.com' + # h['To'] #=> 'bob@you.com' + # h['X-Mail-SPAM'] = '10000' + # h['X-Mail-SPAM'] # => ['15', '20', '10000'] + # h['X-Mail-SPAM'] = nil + # h['X-Mail-SPAM'] # => nil + # + # source://mail//lib/mail/header.rb#147 + def []=(name, value); end + + # Returns the value of attribute charset. + # + # source://mail//lib/mail/header.rb#39 + def charset; end + + # source://mail//lib/mail/header.rb#169 + def charset=(val); end + + # @raise [NoMethodError] + # + # source://mail//lib/mail/header.rb#195 + def decoded; end + + # source://mail//lib/mail/header.rb#182 + def encoded; end + + # source://mail//lib/mail/header.rb#105 + def errors; end + + # source://mail//lib/mail/header.rb#199 + def field_summary; end + + # Returns an array of all the fields in the header in order that they + # were read in. + # + # source://mail//lib/mail/header.rb#67 + def fields; end + + # 3.6. Field definitions + # + # It is important to note that the header fields are not guaranteed to + # be in a particular order. They may appear in any order, and they + # have been known to be reordered occasionally when transported over + # the Internet. However, for the purposes of this standard, header + # fields SHOULD NOT be reordered when a message is transported or + # transformed. More importantly, the trace header fields and resent + # header fields MUST NOT be reordered, and SHOULD be kept in blocks + # prepended to the message. See sections 3.6.6 and 3.6.7 for more + # information. + # + # Populates the fields container with Field objects in the order it + # receives them in. + # + # Acceps an array of field string values, for example: + # + # h = Header.new + # h.fields = ['From: mikel@me.com', 'To: bob@you.com'] + # + # source://mail//lib/mail/header.rb#90 + def fields=(unfolded_fields); end + + # Returns true if the header has a Content-ID defined (empty or not) + # + # @return [Boolean] + # + # source://mail//lib/mail/header.rb#209 + def has_content_id?; end + + # Returns true if the header has a Date defined (empty or not) + # + # @return [Boolean] + # + # source://mail//lib/mail/header.rb#214 + def has_date?; end + + # Returns true if the header has a Message-ID defined (empty or not) + # + # @return [Boolean] + # + # source://mail//lib/mail/header.rb#204 + def has_message_id?; end + + # Returns true if the header has a MIME version defined (empty or not) + # + # @return [Boolean] + # + # source://mail//lib/mail/header.rb#219 + def has_mime_version?; end + + # Returns the value of attribute raw_source. + # + # source://mail//lib/mail/header.rb#39 + def raw_source; end + + # source://mail//lib/mail/header.rb#191 + def to_s; end + + private + + # Enumerable support. Yield each field in order. + # + # source://mail//lib/mail/header.rb#233 + def each(&block); end + + # source://mail//lib/mail/header.rb#59 + def initialize_copy(original); end + + # Splits an unfolded and line break cleaned header into individual field + # strings. + # + # source://mail//lib/mail/header.rb#227 + def split_header; end + + class << self + # Large amount of headers in Email might create extra high CPU load + # Use this parameter to limit number of headers that will be parsed by + # mail library. + # Default: 1000 + # + # source://mail//lib/mail/header.rb#31 + def maximum_amount; end + + # source://mail//lib/mail/header.rb#35 + def maximum_amount=(value); end + end +end + +# The IMAP retriever allows to get the last, first or all emails from a IMAP server. +# Each email retrieved (RFC2822) is given as an instance of +Message+. +# +# While being retrieved, emails can be yielded if a block is given. +# +# === Example of retrieving Emails from GMail: +# +# Mail.defaults do +# retriever_method :imap, { :address => "imap.googlemail.com", +# :port => 993, +# :user_name => '', +# :password => '', +# :enable_ssl => true } +# end +# +# Mail.all #=> Returns an array of all emails +# Mail.first #=> Returns the first unread email +# Mail.last #=> Returns the last unread email +# +# You can also pass options into Mail.find to locate an email in your imap mailbox +# with the following options: +# +# mailbox: name of the mailbox used for email retrieval. The default is 'INBOX'. +# what: last or first emails. The default is :first. +# order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. +# count: number of emails to retrieve. The default value is 10. A value of 1 returns an +# instance of Message, not an array of Message instances. +# keys: are passed as criteria to the SEARCH command. They can either be a string holding the entire search string, +# or a single-dimension array of search keywords and arguments. Refer to [IMAP] section 6.4.4 for a full list +# The default is 'ALL' +# +# Mail.find(:what => :first, :count => 10, :order => :asc, :keys=>'ALL') +# #=> Returns the first 10 emails in ascending order +# +# source://mail//lib/mail/network/retriever_methods/imap.rb#39 +class Mail::IMAP < ::Mail::Retriever + # @return [IMAP] a new instance of IMAP + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#42 + def initialize(values); end + + # Returns the connection object of the retrievable (IMAP or POP3) + # + # @raise [ArgumentError] + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#133 + def connection(&block); end + + # Delete all emails from a IMAP mailbox + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#119 + def delete_all(mailbox = T.unsafe(nil)); end + + # Find emails in a IMAP mailbox. Without any options, the 10 last received emails are returned. + # + # Possible options: + # mailbox: mailbox to search the email(s) in. The default is 'INBOX'. + # what: last or first emails. The default is :first. + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # count: number of emails to retrieve. The default value is 10. A value of 1 returns an + # instance of Message, not an array of Message instances. + # read_only: will ensure that no writes are made to the inbox during the session. Specifically, if this is + # set to true, the code will use the EXAMINE command to retrieve the mail. If set to false, which + # is the default, a SELECT command will be used to retrieve the mail + # This is helpful when you don't want your messages to be set to read automatically. Default is false. + # delete_after_find: flag for whether to delete each retreived email after find. Default + # is false. Use #find_and_delete if you would like this to default to true. + # keys: are passed as criteria to the SEARCH command. They can either be a string holding the entire search string, + # or a single-dimension array of search keywords and arguments. Refer to [IMAP] section 6.4.4 for a full list + # The default is 'ALL' + # search_charset: charset to pass to IMAP server search. Omitted by default. Example: 'UTF-8' or 'ASCII'. + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#73 + def find(options = T.unsafe(nil), &block); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#52 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#52 + def settings=(_arg0); end + + private + + # Start an IMAP session and ensures that it will be closed in any case. + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#160 + def start(config = T.unsafe(nil), &block); end + + # Set default options + # + # source://mail//lib/mail/network/retriever_methods/imap.rb#144 + def validate_options(options); end +end + +# = In-Reply-To Field +# +# The In-Reply-To field inherits from StructuredField and handles the +# In-Reply-To: header field in the email. +# +# Sending in_reply_to to a mail message will instantiate a Mail::Field object that +# has a InReplyToField as its field type. This includes all Mail::CommonMessageId +# module instance metods. +# +# Note that, the #message_ids method will return an array of message IDs without the +# enclosing angle brackets which per RFC are not syntactically part of the message id. +# +# Only one InReplyTo field can appear in a header, though it can have multiple +# Message IDs. +# +# == Examples: +# +# mail = Mail.new +# mail.in_reply_to = '' +# mail.in_reply_to #=> '' +# mail[:in_reply_to] #=> '# '# '# ['F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@test.me.dom'] +# +# source://mail//lib/mail/fields/in_reply_to_field.rb#31 +class Mail::InReplyToField < ::Mail::CommonMessageIdField + # @return [InReplyToField] a new instance of InReplyToField + # + # source://mail//lib/mail/fields/in_reply_to_field.rb#38 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/in_reply_to_field.rb#34 + def singular?; end + end +end + +# source://mail//lib/mail/fields/in_reply_to_field.rb#32 +Mail::InReplyToField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/indifferent_hash.rb#8 +class Mail::IndifferentHash < ::Hash + # @return [IndifferentHash] a new instance of IndifferentHash + # + # source://mail//lib/mail/indifferent_hash.rb#10 + def initialize(constructor = T.unsafe(nil)); end + + # Assigns a new value to the hash: + # + # hash = HashWithIndifferentAccess.new + # hash[:key] = "value" + # + # source://mail//lib/mail/indifferent_hash.rb#41 + def []=(key, value); end + + # source://mail//lib/mail/indifferent_hash.rb#19 + def default(key = T.unsafe(nil)); end + + # Removes a specified key from the hash. + # + # source://mail//lib/mail/indifferent_hash.rb#117 + def delete(key); end + + # Returns an exact copy of the hash. + # + # source://mail//lib/mail/indifferent_hash.rb#96 + def dup; end + + # Fetches the value for the specified key, same as doing hash[key] + # + # source://mail//lib/mail/indifferent_hash.rb#80 + def fetch(key, *extras); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = HashWithIndifferentAccess.new + # hash["key"] = "value" + # hash.key? :key # => true + # hash.key? "key" # => true + # + # @return [Boolean] + # + # source://mail//lib/mail/indifferent_hash.rb#71 + def has_key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = HashWithIndifferentAccess.new + # hash["key"] = "value" + # hash.key? :key # => true + # hash.key? "key" # => true + # + # @return [Boolean] + # + # source://mail//lib/mail/indifferent_hash.rb#71 + def include?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = HashWithIndifferentAccess.new + # hash["key"] = "value" + # hash.key? :key # => true + # hash.key? "key" # => true + # + # @return [Boolean] + # + # source://mail//lib/mail/indifferent_hash.rb#71 + def key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = HashWithIndifferentAccess.new + # hash["key"] = "value" + # hash.key? :key # => true + # hash.key? "key" # => true + # + # @return [Boolean] + # + # source://mail//lib/mail/indifferent_hash.rb#71 + def member?(key); end + + # Merges the instantized and the specified hashes together, giving precedence to the values from the second hash + # Does not overwrite the existing hash. + # + # source://mail//lib/mail/indifferent_hash.rb#102 + def merge(hash); end + + # Updates the instantized hash with values from the second: + # + # hash_1 = HashWithIndifferentAccess.new + # hash_1[:key] = "value" + # + # hash_2 = HashWithIndifferentAccess.new + # hash_2[:key] = "New Value!" + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # source://mail//lib/mail/indifferent_hash.rb#57 + def merge!(other_hash); end + + def regular_update(*_arg0); end + def regular_writer(_arg0, _arg1); end + + # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second. + # This overloaded definition prevents returning a regular hash, if reverse_merge is called on a HashWithDifferentAccess. + # + # source://mail//lib/mail/indifferent_hash.rb#108 + def reverse_merge(other_hash); end + + # source://mail//lib/mail/indifferent_hash.rb#112 + def reverse_merge!(other_hash); end + + # Assigns a new value to the hash: + # + # hash = HashWithIndifferentAccess.new + # hash[:key] = "value" + # + # source://mail//lib/mail/indifferent_hash.rb#41 + def store(key, value); end + + # source://mail//lib/mail/indifferent_hash.rb#122 + def stringify_keys; end + + # source://mail//lib/mail/indifferent_hash.rb#121 + def stringify_keys!; end + + # source://mail//lib/mail/indifferent_hash.rb#123 + def symbolize_keys; end + + # source://mail//lib/mail/indifferent_hash.rb#126 + def to_hash; end + + # source://mail//lib/mail/indifferent_hash.rb#124 + def to_options!; end + + # Updates the instantized hash with values from the second: + # + # hash_1 = HashWithIndifferentAccess.new + # hash_1[:key] = "value" + # + # hash_2 = HashWithIndifferentAccess.new + # hash_2[:key] = "New Value!" + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # source://mail//lib/mail/indifferent_hash.rb#57 + def update(other_hash); end + + # Returns an array of the values at the specified indices: + # + # hash = HashWithIndifferentAccess.new + # hash[:a] = "x" + # hash[:b] = "y" + # hash.values_at("a", "b") # => ["x", "y"] + # + # source://mail//lib/mail/indifferent_hash.rb#91 + def values_at(*indices); end + + protected + + # source://mail//lib/mail/indifferent_hash.rb#132 + def convert_key(key); end + + # source://mail//lib/mail/indifferent_hash.rb#136 + def convert_value(value); end + + class << self + # source://mail//lib/mail/indifferent_hash.rb#27 + def new_from_hash_copying_default(hash); end + end +end + +# keywords = "Keywords:" phrase *("," phrase) CRLF +# +# source://mail//lib/mail/fields/keywords_field.rb#7 +class Mail::KeywordsField < ::Mail::NamedStructuredField + # source://mail//lib/mail/fields/keywords_field.rb#18 + def default; end + + # source://mail//lib/mail/fields/keywords_field.rb#10 + def element; end + + # source://mail//lib/mail/fields/keywords_field.rb#14 + def keywords; end + + private + + # source://mail//lib/mail/fields/keywords_field.rb#23 + def do_decode; end + + # source://mail//lib/mail/fields/keywords_field.rb#27 + def do_encode; end +end + +# source://mail//lib/mail/fields/keywords_field.rb#8 +Mail::KeywordsField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#4 +class Mail::LoggerDelivery + # @return [LoggerDelivery] a new instance of LoggerDelivery + # + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#7 + def initialize(settings); end + + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#13 + def deliver!(mail); end + + # Returns the value of attribute logger. + # + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#5 + def logger; end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#5 + def settings; end + + # Returns the value of attribute severity. + # + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#5 + def severity; end + + private + + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#18 + def default_logger; end + + # source://mail//lib/mail/network/delivery_methods/logger_delivery.rb#23 + def derive_severity(severity); end +end + +# source://mail//lib/mail/matchers/has_sent_mail.rb#3 +module Mail::Matchers + # source://mail//lib/mail/matchers/attachment_matchers.rb#8 + def an_attachment_with_filename(filename); end + + # source://mail//lib/mail/matchers/attachment_matchers.rb#12 + def an_attachment_with_mime_type(filename); end + + # source://mail//lib/mail/matchers/attachment_matchers.rb#4 + def any_attachment; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#4 + def have_sent_email; end +end + +# source://mail//lib/mail/matchers/attachment_matchers.rb#16 +class Mail::Matchers::AnyAttachmentMatcher + # source://mail//lib/mail/matchers/attachment_matchers.rb#17 + def ===(other); end +end + +# source://mail//lib/mail/matchers/attachment_matchers.rb#22 +class Mail::Matchers::AttachmentFilenameMatcher + # @return [AttachmentFilenameMatcher] a new instance of AttachmentFilenameMatcher + # + # source://mail//lib/mail/matchers/attachment_matchers.rb#24 + def initialize(filename); end + + # source://mail//lib/mail/matchers/attachment_matchers.rb#28 + def ===(other); end + + # Returns the value of attribute filename. + # + # source://mail//lib/mail/matchers/attachment_matchers.rb#23 + def filename; end +end + +# source://mail//lib/mail/matchers/attachment_matchers.rb#33 +class Mail::Matchers::AttachmentMimeTypeMatcher + # @return [AttachmentMimeTypeMatcher] a new instance of AttachmentMimeTypeMatcher + # + # source://mail//lib/mail/matchers/attachment_matchers.rb#35 + def initialize(mime_type); end + + # source://mail//lib/mail/matchers/attachment_matchers.rb#39 + def ===(other); end + + # Returns the value of attribute mime_type. + # + # source://mail//lib/mail/matchers/attachment_matchers.rb#34 + def mime_type; end +end + +# source://mail//lib/mail/matchers/has_sent_mail.rb#8 +class Mail::Matchers::HasSentEmailMatcher + # @return [HasSentEmailMatcher] a new instance of HasSentEmailMatcher + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#9 + def initialize(_context); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#44 + def bcc(recipient_or_list); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#33 + def cc(recipient_or_list); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#96 + def description; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#101 + def failure_message; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#108 + def failure_message_when_negated; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#17 + def from(sender); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#12 + def matches?(subject); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#81 + def matching_body(body_matcher); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#71 + def matching_subject(subject_matcher); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#22 + def to(recipient_or_list); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#61 + def with_any_attachments; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#50 + def with_attachments(attachments); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#76 + def with_body(body); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#86 + def with_html(body); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#56 + def with_no_attachments; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#66 + def with_subject(subject); end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#91 + def with_text(body); end + + protected + + # source://mail//lib/mail/matchers/has_sent_mail.rb#196 + def dump_deliveries; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#181 + def explain_expectations; end + + # source://mail//lib/mail/matchers/has_sent_mail.rb#117 + def filter_matched_deliveries(deliveries); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#159 + def matches_on_attachments?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#142 + def matches_on_blind_copy_recipients?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#165 + def matches_on_body?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#169 + def matches_on_body_matcher?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#138 + def matches_on_copy_recipients?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#154 + def matches_on_having_attachments?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#173 + def matches_on_html_part_body?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#134 + def matches_on_recipients?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#130 + def matches_on_sender?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#146 + def matches_on_subject?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#150 + def matches_on_subject_matcher?(delivery); end + + # @return [Boolean] + # + # source://mail//lib/mail/matchers/has_sent_mail.rb#177 + def matches_on_text_part_body?(delivery); end +end + +# The Message class provides a single point of access to all things to do with an +# email message. +# +# You create a new email message by calling the Mail::Message.new method, or just +# Mail.new +# +# A Message object by default has the following objects inside it: +# +# * A Header object which contains all information and settings of the header of the email +# * Body object which contains all parts of the email that are not part of the header, this +# includes any attachments, body text, MIME parts etc. +# +# ==Per RFC2822 +# +# 2.1. General Description +# +# At the most basic level, a message is a series of characters. A +# message that is conformant with this standard is comprised of +# characters with values in the range 1 through 127 and interpreted as +# US-ASCII characters [ASCII]. For brevity, this document sometimes +# refers to this range of characters as simply "US-ASCII characters". +# +# Note: This standard specifies that messages are made up of characters +# in the US-ASCII range of 1 through 127. There are other documents, +# specifically the MIME document series [RFC2045, RFC2046, RFC2047, +# RFC2048, RFC2049], that extend this standard to allow for values +# outside of that range. Discussion of those mechanisms is not within +# the scope of this standard. +# +# Messages are divided into lines of characters. A line is a series of +# characters that is delimited with the two characters carriage-return +# and line-feed; that is, the carriage return (CR) character (ASCII +# value 13) followed immediately by the line feed (LF) character (ASCII +# value 10). (The carriage-return/line-feed pair is usually written in +# this document as "CRLF".) +# +# A message consists of header fields (collectively called "the header +# of the message") followed, optionally, by a body. The header is a +# sequence of lines of characters with special syntax as defined in +# this standard. The body is simply a sequence of characters that +# follows the header and is separated from the header by an empty line +# (i.e., a line with nothing preceding the CRLF). +# +# source://mail//lib/mail/message.rb#50 +class Mail::Message + # ==Making an email + # + # You can make an new mail object via a block, passing a string, file or direct assignment. + # + # ===Making an email via a block + # + # mail = Mail.new do |m| + # m.from 'mikel@test.lindsaar.net' + # m.to 'you@test.lindsaar.net' + # m.subject 'This is a test email' + # m.body File.read('body.txt') + # end + # + # mail.to_s #=> "From: mikel@test.lindsaar.net\r\nTo: you@... + # + # If may also pass a block with no arguments, in which case it will + # be evaluated in the scope of the new message instance: + # + # mail = Mail.new do + # from 'mikel@test.lindsaar.net' + # # … + # end + # + # ===Making an email via passing a string + # + # mail = Mail.new("To: mikel@test.lindsaar.net\r\nSubject: Hello\r\n\r\nHi there!") + # mail.body.to_s #=> 'Hi there!' + # mail.subject #=> 'Hello' + # mail.to #=> 'mikel@test.lindsaar.net' + # + # ===Making an email from a file + # + # mail = Mail.read('path/to/file.eml') + # mail.body.to_s #=> 'Hi there!' + # mail.subject #=> 'Hello' + # mail.to #=> 'mikel@test.lindsaar.net' + # + # ===Making an email via assignment + # + # You can assign values to a mail object via four approaches: + # + # * Message#field_name=(value) + # * Message#field_name(value) + # * Message#['field_name']=(value) + # * Message#[:field_name]=(value) + # + # Examples: + # + # mail = Mail.new + # mail['from'] = 'mikel@test.lindsaar.net' + # mail[:to] = 'you@test.lindsaar.net' + # mail.subject 'This is a test email' + # mail.body = 'This is a body' + # + # mail.to_s #=> "From: mikel@test.lindsaar.net\r\nTo: you@... + # + # @return [Message] a new instance of Message + # + # source://mail//lib/mail/message.rb#107 + def initialize(*args, &block); end + + # Provides the operator needed for sort et al. + # + # Compares this mail object with another mail object, this is done by date, so an + # email that is older than another will appear first. + # + # Example: + # + # mail1 = Mail.new do + # date(Time.now) + # end + # mail2 = Mail.new do + # date(Time.now - 86400) # 1 day older + # end + # [mail2, mail1].sort #=> [mail2, mail1] + # + # source://mail//lib/mail/message.rb#334 + def <=>(other); end + + # Two emails are the same if they have the same fields and body contents. One + # gotcha here is that Mail will insert Message-IDs when calling encoded, so doing + # mail1.encoded == mail2.encoded is most probably not going to return what you think + # as the assigned Message-IDs by Mail (if not already defined as the same) will ensure + # that the two objects are unique, and this comparison will ALWAYS return false. + # + # So the == operator has been defined like so: Two messages are the same if they have + # the same content, ignoring the Message-ID field, unless BOTH emails have a defined and + # different Message-ID value, then they are false. + # + # So, in practice the == operator works like this: + # + # m1 = Mail.new("Subject: Hello\r\n\r\nHello") + # m2 = Mail.new("Subject: Hello\r\n\r\nHello") + # m1 == m2 #=> true + # + # m1 = Mail.new("Subject: Hello\r\n\r\nHello") + # m2 = Mail.new("Message-ID: <1234@test>\r\nSubject: Hello\r\n\r\nHello") + # m1 == m2 #=> true + # + # m1 = Mail.new("Message-ID: <1234@test>\r\nSubject: Hello\r\n\r\nHello") + # m2 = Mail.new("Subject: Hello\r\n\r\nHello") + # m1 == m2 #=> true + # + # m1 = Mail.new("Message-ID: <1234@test>\r\nSubject: Hello\r\n\r\nHello") + # m2 = Mail.new("Message-ID: <1234@test>\r\nSubject: Hello\r\n\r\nHello") + # m1 == m2 #=> true + # + # m1 = Mail.new("Message-ID: <1234@test>\r\nSubject: Hello\r\n\r\nHello") + # m2 = Mail.new("Message-ID: \r\nSubject: Hello\r\n\r\nHello") + # m1 == m2 #=> false + # + # source://mail//lib/mail/message.rb#373 + def ==(other); end + + # Allows you to read an arbitrary header + # + # Example: + # + # mail['foo'] = '1234' + # mail['foo'].to_s #=> '1234' + # + # source://mail//lib/mail/message.rb#1334 + def [](name); end + + # Allows you to add an arbitrary header + # + # Example: + # + # mail['foo'] = '1234' + # mail['foo'].to_s #=> '1234' + # + # source://mail//lib/mail/message.rb#1316 + def []=(name, value); end + + # source://mail//lib/mail/message.rb#1558 + def action; end + + # Adds a content type and charset if the body is US-ASCII + # + # Otherwise raises a warning + # + # source://mail//lib/mail/message.rb#1472 + def add_charset; end + + # Adds a content transfer encoding + # + # source://mail//lib/mail/message.rb#1487 + def add_content_transfer_encoding; end + + # Adds a content type and charset if the body is US-ASCII + # + # Otherwise raises a warning + # + # source://mail//lib/mail/message.rb#1465 + def add_content_type; end + + # Creates a new empty Date field and inserts it in the correct order + # into the Header. The DateField object will automatically generate + # DateTime.now's date if you try and encode it or output it to_s without + # specifying a date yourself. + # + # It will preserve any date you specify if you do. + # + # source://mail//lib/mail/message.rb#1448 + def add_date(date_val = T.unsafe(nil)); end + + # Adds a file to the message. You have two options with this method, you can + # just pass in the absolute path to the file you want and Mail will read the file, + # get the filename from the path you pass in and guess the MIME media type, or you + # can pass in the filename as a string, and pass in the file content as a blob. + # + # Example: + # + # m = Mail.new + # m.add_file('/path/to/filename.png') + # + # m = Mail.new + # m.add_file(:filename => 'filename.png', :content => File.read('/path/to/file.jpg')) + # + # Note also that if you add a file to an existing message, Mail will convert that message + # to a MIME multipart email, moving whatever plain text body you had into its own text + # plain part. + # + # Example: + # + # m = Mail.new do + # body 'this is some text' + # end + # m.multipart? #=> false + # m.add_file('/path/to/filename.png') + # m.multipart? #=> true + # m.parts.first.content_type.content_type #=> 'text/plain' + # m.parts.last.content_type.content_type #=> 'image/png' + # + # See also #attachments + # + # source://mail//lib/mail/message.rb#1757 + def add_file(values); end + + # Creates a new empty Message-ID field and inserts it in the correct order + # into the Header. The MessageIdField object will automatically generate + # a unique message ID if you try and encode it or output it to_s without + # specifying a message id. + # + # It will preserve the message ID you specify if you do. + # + # source://mail//lib/mail/message.rb#1438 + def add_message_id(msg_id_val = T.unsafe(nil)); end + + # Creates a new empty Mime Version field and inserts it in the correct order + # into the Header. The MimeVersion object will automatically generate + # set itself to '1.0' if you try and encode it or output it to_s without + # specifying a version yourself. + # + # It will preserve any date you specify if you do. + # + # source://mail//lib/mail/message.rb#1458 + def add_mime_version(ver_val = T.unsafe(nil)); end + + # Adds a part to the parts list or creates the part list + # + # source://mail//lib/mail/message.rb#1701 + def add_part(part); end + + # source://mail//lib/mail/message.rb#1927 + def all_parts; end + + # Returns the attachment data if there is any + # + # source://mail//lib/mail/message.rb#1918 + def attachment; end + + # Returns true if this part is an attachment, + # false otherwise. + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1913 + def attachment?; end + + # Returns an AttachmentsList object, which holds all of the attachments in + # the receiver object (either the entire email or a part within) and all + # of its descendants. + # + # It also allows you to add attachments to the mail object directly, 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 media type + # set the Content-Type, Content-Disposition, Content-Transfer-Encoding and + # base64 encode the contents of the attachment all for you. + # + # You can also specify overrides if you want by passing a hash instead of a string: + # + # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip', + # :content => File.read('/path/to/filename.jpg')} + # + # If you want to use a different encoding than Base64, you can pass an encoding in, + # but then it is up to you to pass in the content pre-encoded, and don't expect + # Mail to know how to decode this data: + # + # file_content = SpecialEncode(File.read('/path/to/filename.jpg')) + # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip', + # :encoding => 'SpecialEncoding', + # :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://mail//lib/mail/message.rb#1626 + def attachments; end + + # Returns the Bcc value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.bcc = 'Mikel ' + # mail.bcc #=> ['mikel@test.lindsaar.net'] + # mail.bcc = 'Mikel , ada@test.lindsaar.net' + # mail.bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.bcc 'Mikel ' + # mail.bcc #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.bcc 'Mikel ' + # mail.bcc << 'ada@test.lindsaar.net' + # mail.bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#500 + def bcc(val = T.unsafe(nil)); end + + # Sets the Bcc value of the mail object, pass in a string of the field + # + # Example: + # + # mail.bcc = 'Mikel ' + # mail.bcc #=> ['mikel@test.lindsaar.net'] + # mail.bcc = 'Mikel , ada@test.lindsaar.net' + # mail.bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#512 + def bcc=(val); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#21 + def bcc_addresses; end + + # Returns an array of addresses (the encoded value) in the Bcc field, + # if no Bcc field, returns an empty array + # + # source://mail//lib/mail/message.rb#1306 + def bcc_addrs; end + + # Returns the body of the message object. Or, if passed + # a parameter sets the value. + # + # Example: + # + # mail = Mail::Message.new('To: mikel\r\n\r\nThis is the body') + # mail.body #=> # # 2 + # mail.parts.last.content_type.content_type #=> 'This is a body' + # + # source://mail//lib/mail/message.rb#1237 + def body=(value); end + + # source://mail//lib/mail/message.rb#1260 + def body_encoding(value = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#1268 + def body_encoding=(value); end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1554 + def bounced?; end + + # Returns the current boundary for this message part + # + # source://mail//lib/mail/message.rb#1583 + def boundary; end + + # Returns the Cc value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.cc = 'Mikel ' + # mail.cc #=> ['mikel@test.lindsaar.net'] + # mail.cc = 'Mikel , ada@test.lindsaar.net' + # mail.cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.cc 'Mikel ' + # mail.cc #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.cc 'Mikel ' + # mail.cc << 'ada@test.lindsaar.net' + # mail.cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#541 + def cc(val = T.unsafe(nil)); end + + # Sets the Cc value of the mail object, pass in a string of the field + # + # Example: + # + # mail.cc = 'Mikel ' + # mail.cc #=> ['mikel@test.lindsaar.net'] + # mail.cc = 'Mikel , ada@test.lindsaar.net' + # mail.cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#553 + def cc=(val); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#17 + def cc_addresses; end + + # Returns an array of addresses (the encoded value) in the Cc field, + # if no Cc field, returns an empty array + # + # source://mail//lib/mail/message.rb#1300 + def cc_addrs; end + + # Returns the character set defined in the content type field + # + # source://mail//lib/mail/message.rb#1497 + def charset; end + + # Sets the charset to the supplied value. + # + # source://mail//lib/mail/message.rb#1506 + def charset=(value); end + + # source://mail//lib/mail/message.rb#557 + def comments(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#561 + def comments=(val); end + + # source://mail//lib/mail/message.rb#565 + def content_description(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#569 + def content_description=(val); end + + # source://mail//lib/mail/message.rb#573 + def content_disposition(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#577 + def content_disposition=(val); end + + # source://mail//lib/mail/message.rb#581 + def content_id(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#585 + def content_id=(val); end + + # source://mail//lib/mail/message.rb#589 + def content_location(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#593 + def content_location=(val); end + + # source://mail//lib/mail/message.rb#597 + def content_transfer_encoding(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#601 + def content_transfer_encoding=(val); end + + # source://mail//lib/mail/message.rb#605 + def content_type(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#609 + def content_type=(val); end + + # Returns the content type parameters + # + # source://mail//lib/mail/message.rb#1523 + def content_type_parameters; end + + # source://mail//lib/mail/message.rb#1773 + def convert_to_multipart; end + + # source://mail//lib/mail/message.rb#613 + def date(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#617 + def date=(val); end + + # source://mail//lib/mail/message.rb#1907 + def decode_body; end + + # source://mail//lib/mail/message.rb#1886 + def decoded; end + + # Returns the default value of the field requested as a symbol. + # + # Each header field has a :default method which returns the most common use case for + # that field, for example, the date field types will return a DateTime object when + # sent :default, the subject, or unstructured fields will return a decoded string of + # their value, the address field types will return a single addr_spec or an array of + # addr_specs if there is more than one. + # + # source://mail//lib/mail/message.rb#1204 + def default(sym, val = T.unsafe(nil)); end + + # Delivers a mail object. + # + # Examples: + # + # mail = Mail.read('file.eml') + # mail.deliver + # + # source://mail//lib/mail/message.rb#250 + def deliver; end + + # This method bypasses checking perform_deliveries and raise_delivery_errors, + # so use with caution. + # + # It still however fires off the interceptors and calls the observers callbacks if they are defined. + # + # Returns self + # + # source://mail//lib/mail/message.rb#267 + def deliver!; end + + # If you assign a delivery handler, mail will call :deliver_mail on the + # object you assign to delivery_handler, it will pass itself as the + # single argument. + # + # If you define a delivery_handler, then you are responsible for the + # following actions in the delivery cycle: + # + # * Appending the mail object to Mail.deliveries as you see fit. + # * Checking the mail.perform_deliveries flag to decide if you should + # actually call :deliver! the mail object or not. + # * Checking the mail.raise_delivery_errors flag to decide if you + # should raise delivery errors if they occur. + # * Actually calling :deliver! (with the bang) on the mail object to + # get it to deliver itself. + # + # A simplest implementation of a delivery_handler would be + # + # class MyObject + # + # def initialize + # @mail = Mail.new('To: mikel@test.lindsaar.net') + # @mail.delivery_handler = self + # end + # + # attr_accessor :mail + # + # def deliver_mail(mail) + # yield + # end + # end + # + # Then doing: + # + # obj = MyObject.new + # obj.mail.deliver + # + # Would cause Mail to call obj.deliver_mail passing itself as a parameter, + # which then can just yield and let Mail do its own private do_delivery + # method. + # + # source://mail//lib/mail/message.rb#199 + def delivery_handler; end + + # If you assign a delivery handler, mail will call :deliver_mail on the + # object you assign to delivery_handler, it will pass itself as the + # single argument. + # + # If you define a delivery_handler, then you are responsible for the + # following actions in the delivery cycle: + # + # * Appending the mail object to Mail.deliveries as you see fit. + # * Checking the mail.perform_deliveries flag to decide if you should + # actually call :deliver! the mail object or not. + # * Checking the mail.raise_delivery_errors flag to decide if you + # should raise delivery errors if they occur. + # * Actually calling :deliver! (with the bang) on the mail object to + # get it to deliver itself. + # + # A simplest implementation of a delivery_handler would be + # + # class MyObject + # + # def initialize + # @mail = Mail.new('To: mikel@test.lindsaar.net') + # @mail.delivery_handler = self + # end + # + # attr_accessor :mail + # + # def deliver_mail(mail) + # yield + # end + # end + # + # Then doing: + # + # obj = MyObject.new + # obj.mail.deliver + # + # Would cause Mail to call obj.deliver_mail passing itself as a parameter, + # which then can just yield and let Mail do its own private do_delivery + # method. + # + # source://mail//lib/mail/message.rb#199 + def delivery_handler=(_arg0); end + + # source://mail//lib/mail/message.rb#274 + def delivery_method(method = T.unsafe(nil), settings = T.unsafe(nil)); end + + # returns the part in a multipart/report email that has the content-type delivery-status + # + # source://mail//lib/mail/message.rb#1543 + def delivery_status_part; end + + # Returns true if the message is a multipart/report; report-type=delivery-status; + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1538 + def delivery_status_report?; end + + # Returns the list of addresses this message should be sent to by + # collecting the addresses off the to, cc and bcc fields. + # + # Example: + # + # mail.to = 'mikel@test.lindsaar.net' + # mail.cc = 'sam@test.lindsaar.net' + # mail.bcc = 'bob@test.lindsaar.net' + # mail.destinations.length #=> 3 + # mail.destinations.first #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#1282 + def destinations; end + + # source://mail//lib/mail/message.rb#1570 + def diagnostic_code; end + + # Outputs an encoded string representation of the mail message including + # all headers, attachments, etc. This is an encoded email in US-ASCII, + # so it is able to be directly sent to an email server. + # + # source://mail//lib/mail/message.rb#1803 + def encoded; end + + # source://mail//lib/mail/message.rb#418 + def envelope_date; end + + # source://mail//lib/mail/message.rb#414 + def envelope_from; end + + # source://mail//lib/mail/message.rb#1566 + def error_status; end + + # Returns a list of parser errors on the header, each field that had an error + # will be reparsed as an unstructured field to preserve the data inside, but + # will not be used for further processing. + # + # It returns a nested array of [field_name, value, original_error_message] + # per error found. + # + # Example: + # + # message = Mail.new("Content-Transfer-Encoding: weirdo\r\n") + # message.errors.size #=> 1 + # message.errors.first[0] #=> "Content-Transfer-Encoding" + # message.errors.first[1] #=> "weirdo" + # message.errors.first[3] #=> + # + # This is a good first defence on detecting spam by the way. Some spammers send + # invalid emails to try and get email parsers to give up parsing them. + # + # source://mail//lib/mail/message.rb#471 + def errors; end + + # Returns the filename of the attachment + # + # source://mail//lib/mail/message.rb#1923 + def filename; end + + # source://mail//lib/mail/message.rb#1562 + def final_recipient; end + + # source://mail//lib/mail/message.rb#1931 + def find_first_mime_type(mt); end + + # Returns the From value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.from = 'Mikel ' + # mail.from #=> ['mikel@test.lindsaar.net'] + # mail.from = 'Mikel , ada@test.lindsaar.net' + # mail.from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.from 'Mikel ' + # mail.from #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.from 'Mikel ' + # mail.from << 'ada@test.lindsaar.net' + # mail.from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#658 + def from(val = T.unsafe(nil)); end + + # Sets the From value of the mail object, pass in a string of the field + # + # Example: + # + # mail.from = 'Mikel ' + # mail.from #=> ['mikel@test.lindsaar.net'] + # mail.from = 'Mikel , ada@test.lindsaar.net' + # mail.from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#670 + def from=(val); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#5 + def from_address; end + + # Returns an array of addresses (the encoded value) in the From field, + # if no From field, returns an empty array + # + # source://mail//lib/mail/message.rb#1288 + def from_addrs; end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1630 + def has_attachments?; end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1423 + def has_charset?; end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1428 + def has_content_transfer_encoding?; end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1418 + def has_content_type?; end + + # Returns true if the message has a Date field, the field may or may + # not have a value, but the field exists or not. + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1408 + def has_date?; end + + # Returns true if the message has a message ID field, the field may or may + # not have a value, but the field exists or not. + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1402 + def has_message_id?; end + + # Returns true if the message has a Mime-Version field, the field may or may + # not have a value, but the field exists or not. + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1414 + def has_mime_version?; end + + # Returns the header object of the message object. Or, if passed + # a parameter sets the value. + # + # Example: + # + # mail = Mail::Message.new('To: mikel\r\nFrom: you') + # mail.header #=> # <#Mail::Header + # + # source://mail//lib/mail/message.rb#428 + def header=(value); end + + # Returns an FieldList of all the fields in the header in the order that + # they appear in the header + # + # source://mail//lib/mail/message.rb#1396 + def header_fields; end + + # Provides a way to set custom headers, by passing in a hash + # + # source://mail//lib/mail/message.rb#448 + def headers(hash = T.unsafe(nil)); end + + # Accessor for html_part + # + # source://mail//lib/mail/message.rb#1635 + def html_part(&block); end + + # Helper to add a html part to a multipart/alternative email. If this and + # text_part are both defined in a message, then it will be a multipart/alternative + # message and set itself that way. + # + # source://mail//lib/mail/message.rb#1655 + def html_part=(msg); end + + # source://mail//lib/mail/message.rb#674 + def in_reply_to(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#678 + def in_reply_to=(val); end + + # source://mail//lib/mail/message.rb#240 + def inform_interceptors; end + + # source://mail//lib/mail/message.rb#236 + def inform_observers; end + + # source://mail//lib/mail/message.rb#1873 + def inspect; end + + # source://mail//lib/mail/message.rb#1877 + def inspect_structure; end + + # Returns whether message will be marked for deletion. + # If so, the message will be deleted at session close (i.e. after #find + # exits), but only if also using the #find_and_delete method, or by + # calling #find with :delete_after_find set to true. + # + # Side-note: Just to be clear, this method will return true even if + # the message hasn't yet been marked for delete on the mail server. + # However, if this method returns true, it *will be* marked on the + # server after each block yields back to #find or #find_and_delete. + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1960 + def is_marked_for_delete?; end + + # source://mail//lib/mail/message.rb#682 + def keywords(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#686 + def keywords=(val); end + + # Returns the main content type + # + # source://mail//lib/mail/message.rb#1513 + def main_type; end + + # Sets whether this message should be deleted at session close (i.e. + # after #find). Message will only be deleted if messages are retrieved + # using the #find_and_delete method, or by calling #find with + # :delete_after_find set to true. + # + # source://mail//lib/mail/message.rb#1947 + def mark_for_delete=(value = T.unsafe(nil)); end + + # Returns the Message-ID of the mail object. Note, per RFC 2822 the Message ID + # consists of what is INSIDE the < > usually seen in the mail header, so this method + # will return only what is inside. + # + # Example: + # + # mail.message_id = '<1234@message.id>' + # mail.message_id #=> '1234@message.id' + # + # Also allows you to set the Message-ID by passing a string as a parameter + # + # mail.message_id '<1234@message.id>' + # mail.message_id #=> '1234@message.id' + # + # source://mail//lib/mail/message.rb#703 + def message_id(val = T.unsafe(nil)); end + + # Sets the Message-ID. Note, per RFC 2822 the Message ID consists of what is INSIDE + # the < > usually seen in the mail header, so this method will return only what is inside. + # + # mail.message_id = '<1234@message.id>' + # mail.message_id #=> '1234@message.id' + # + # source://mail//lib/mail/message.rb#712 + def message_id=(val); end + + # Method Missing in this implementation allows you to set any of the + # standard fields directly as you would the "to", "subject" etc. + # + # Those fields used most often (to, subject et al) are given their + # own method for ease of documentation and also to avoid the hook + # call to method missing. + # + # This will only catch the known fields listed in: + # + # Mail::Field::KNOWN_FIELDS + # + # as per RFC 2822, any ruby string or method name could pretty much + # be a field name, so we don't want to just catch ANYTHING sent to + # a message object and interpret it as a header. + # + # This method provides all three types of header call to set, read + # and explicitly set with the = operator + # + # Examples: + # + # mail.comments = 'These are some comments' + # mail.comments #=> 'These are some comments' + # + # mail.comments 'These are other comments' + # mail.comments #=> 'These are other comments' + # + # + # mail.date = 'Tue, 1 Jul 2003 10:52:37 +0200' + # mail.date.to_s #=> 'Tue, 1 Jul 2003 10:52:37 +0200' + # + # mail.date 'Tue, 1 Jul 2003 10:52:37 +0200' + # mail.date.to_s #=> 'Tue, 1 Jul 2003 10:52:37 +0200' + # + # + # mail.resent_msg_id = '<1234@resent_msg_id.lindsaar.net>' + # mail.resent_msg_id #=> '<1234@resent_msg_id.lindsaar.net>' + # + # mail.resent_msg_id '<4567@resent_msg_id.lindsaar.net>' + # mail.resent_msg_id #=> '<4567@resent_msg_id.lindsaar.net>' + # + # source://mail//lib/mail/message.rb#1377 + def method_missing(name, *args, &block); end + + # Returns the MIME media type of part we are on, this is taken from the content-type header + # + # source://mail//lib/mail/message.rb#1492 + def mime_type; end + + # Returns the MIME version of the email as a string + # + # Example: + # + # mail.mime_version = '1.0' + # mail.mime_version #=> '1.0' + # + # Also allows you to set the MIME version by passing a string as a parameter. + # + # Example: + # + # mail.mime_version '1.0' + # mail.mime_version #=> '1.0' + # + # source://mail//lib/mail/message.rb#729 + def mime_version(val = T.unsafe(nil)); end + + # Sets the MIME version of the email by accepting a string + # + # Example: + # + # mail.mime_version = '1.0' + # mail.mime_version #=> '1.0' + # + # source://mail//lib/mail/message.rb#739 + def mime_version=(val); end + + # Returns true if the message is multipart + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1528 + def multipart?; end + + # Returns true if the message is a multipart/report + # + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1533 + def multipart_report?; end + + # Allows you to add a part in block form to an existing mail message object + # + # Example: + # + # mail = Mail.new do + # part :content_type => "multipart/alternative", :content_disposition => "inline" do |p| + # p.part :content_type => "text/plain", :body => "test text\nline #2" + # p.part :content_type => "text/html", :body => "test HTML
    \nline #2" + # end + # end + # + # @yield [new_part] + # + # source://mail//lib/mail/message.rb#1722 + def part(params = T.unsafe(nil)); end + + # Returns a parts list object of all the parts in the message + # + # source://mail//lib/mail/message.rb#1588 + def parts; end + + # If set to false, mail will go through the motions of doing a delivery, + # but not actually call the delivery method or append the mail object to + # the Mail.deliveries collection. Useful for testing. + # + # Mail.deliveries.size #=> 0 + # mail.delivery_method :smtp + # mail.perform_deliveries = false + # mail.deliver # Mail::SMTP not called here + # Mail.deliveries.size #=> 0 + # + # If you want to test and query the Mail.deliveries collection to see what + # mail you sent, you should set perform_deliveries to true and use + # the :test mail delivery_method: + # + # Mail.deliveries.size #=> 0 + # mail.delivery_method :test + # mail.perform_deliveries = true + # mail.deliver + # Mail.deliveries.size #=> 1 + # + # This setting is ignored by mail (though still available as a flag) if you + # define a delivery_handler + # + # source://mail//lib/mail/message.rb#223 + def perform_deliveries; end + + # If set to false, mail will go through the motions of doing a delivery, + # but not actually call the delivery method or append the mail object to + # the Mail.deliveries collection. Useful for testing. + # + # Mail.deliveries.size #=> 0 + # mail.delivery_method :smtp + # mail.perform_deliveries = false + # mail.deliver # Mail::SMTP not called here + # Mail.deliveries.size #=> 0 + # + # If you want to test and query the Mail.deliveries collection to see what + # mail you sent, you should set perform_deliveries to true and use + # the :test mail delivery_method: + # + # Mail.deliveries.size #=> 0 + # mail.delivery_method :test + # mail.perform_deliveries = true + # mail.deliver + # Mail.deliveries.size #=> 1 + # + # This setting is ignored by mail (though still available as a flag) if you + # define a delivery_handler + # + # source://mail//lib/mail/message.rb#223 + def perform_deliveries=(_arg0); end + + # If set to false, mail will silently catch and ignore any exceptions + # raised through attempting to deliver an email. + # + # This setting is ignored by mail (though still available as a flag) if you + # define a delivery_handler + # + # source://mail//lib/mail/message.rb#230 + def raise_delivery_errors; end + + # If set to false, mail will silently catch and ignore any exceptions + # raised through attempting to deliver an email. + # + # This setting is ignored by mail (though still available as a flag) if you + # define a delivery_handler + # + # source://mail//lib/mail/message.rb#230 + def raise_delivery_errors=(_arg0); end + + # The raw_envelope is the From mikel@test.lindsaar.net Mon May 2 16:07:05 2009 + # type field that you can see at the top of any email that has come + # from a mailbox + # + # source://mail//lib/mail/message.rb#410 + def raw_envelope; end + + # Provides access to the raw source of the message as it was when it + # was instantiated. This is set at initialization and so is untouched + # by the parsers or decoder / encoders + # + # Example: + # + # mail = Mail.new('This is an invalid email message') + # mail.raw_source #=> "This is an invalid email message" + # + # source://mail//lib/mail/message.rb#397 + def raw_source; end + + # source://mail//lib/mail/message.rb#1899 + def read; end + + # Encodes the message, calls encode on all its parts, gets an email message + # ready to send + # + # source://mail//lib/mail/message.rb#1791 + def ready_to_send!; end + + # source://mail//lib/mail/message.rb#743 + def received(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#751 + def received=(val); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/recipients.rb#5 + def recipients; end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#9 + def recipients_addresses; end + + # source://mail//lib/mail/message.rb#755 + def references(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#759 + def references=(val); end + + # source://mail//lib/mail/message.rb#1574 + def remote_mta; end + + # source://mail//lib/mail/message.rb#282 + def reply(*args, &block); end + + # Returns the Reply-To value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.reply_to = 'Mikel ' + # mail.reply_to #=> ['mikel@test.lindsaar.net'] + # mail.reply_to = 'Mikel , ada@test.lindsaar.net' + # mail.reply_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.reply_to 'Mikel ' + # mail.reply_to #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.reply_to 'Mikel ' + # mail.reply_to << 'ada@test.lindsaar.net' + # mail.reply_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#788 + def reply_to(val = T.unsafe(nil)); end + + # Sets the Reply-To value of the mail object, pass in a string of the field + # + # Example: + # + # mail.reply_to = 'Mikel ' + # mail.reply_to #=> ['mikel@test.lindsaar.net'] + # mail.reply_to = 'Mikel , ada@test.lindsaar.net' + # mail.reply_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#800 + def reply_to=(val); end + + # Returns the Resent-Bcc value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.resent_bcc = 'Mikel ' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net'] + # mail.resent_bcc = 'Mikel , ada@test.lindsaar.net' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.resent_bcc 'Mikel ' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.resent_bcc 'Mikel ' + # mail.resent_bcc << 'ada@test.lindsaar.net' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#829 + def resent_bcc(val = T.unsafe(nil)); end + + # Sets the Resent-Bcc value of the mail object, pass in a string of the field + # + # Example: + # + # mail.resent_bcc = 'Mikel ' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net'] + # mail.resent_bcc = 'Mikel , ada@test.lindsaar.net' + # mail.resent_bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#841 + def resent_bcc=(val); end + + # Returns the Resent-Cc value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.resent_cc = 'Mikel ' + # mail.resent_cc #=> ['mikel@test.lindsaar.net'] + # mail.resent_cc = 'Mikel , ada@test.lindsaar.net' + # mail.resent_cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.resent_cc 'Mikel ' + # mail.resent_cc #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.resent_cc 'Mikel ' + # mail.resent_cc << 'ada@test.lindsaar.net' + # mail.resent_cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#870 + def resent_cc(val = T.unsafe(nil)); end + + # Sets the Resent-Cc value of the mail object, pass in a string of the field + # + # Example: + # + # mail.resent_cc = 'Mikel ' + # mail.resent_cc #=> ['mikel@test.lindsaar.net'] + # mail.resent_cc = 'Mikel , ada@test.lindsaar.net' + # mail.resent_cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#882 + def resent_cc=(val); end + + # source://mail//lib/mail/message.rb#886 + def resent_date(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#890 + def resent_date=(val); end + + # Returns the Resent-From value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.resent_from = 'Mikel ' + # mail.resent_from #=> ['mikel@test.lindsaar.net'] + # mail.resent_from = 'Mikel , ada@test.lindsaar.net' + # mail.resent_from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.resent_from ['Mikel '] + # mail.resent_from #=> 'mikel@test.lindsaar.net' + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.resent_from 'Mikel ' + # mail.resent_from << 'ada@test.lindsaar.net' + # mail.resent_from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#919 + def resent_from(val = T.unsafe(nil)); end + + # Sets the Resent-From value of the mail object, pass in a string of the field + # + # Example: + # + # mail.resent_from = 'Mikel ' + # mail.resent_from #=> ['mikel@test.lindsaar.net'] + # mail.resent_from = 'Mikel , ada@test.lindsaar.net' + # mail.resent_from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#931 + def resent_from=(val); end + + # source://mail//lib/mail/message.rb#935 + def resent_message_id(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#939 + def resent_message_id=(val); end + + # Returns the Resent-Sender value of the mail object, as a single string of an address + # spec. A sender per RFC 2822 must be a single address, so you can not append to + # this address. + # + # Example: + # + # mail.resent_sender = 'Mikel ' + # mail.resent_sender #=> 'mikel@test.lindsaar.net' + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.resent_sender 'Mikel ' + # mail.resent_sender #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#958 + def resent_sender(val = T.unsafe(nil)); end + + # Sets the Resent-Sender value of the mail object, pass in a string of the field + # + # Example: + # + # mail.resent_sender = 'Mikel ' + # mail.resent_sender #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#968 + def resent_sender=(val); end + + # Returns the Resent-To value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.resent_to = 'Mikel ' + # mail.resent_to #=> ['mikel@test.lindsaar.net'] + # mail.resent_to = 'Mikel , ada@test.lindsaar.net' + # mail.resent_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.resent_to 'Mikel ' + # mail.resent_to #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.resent_to 'Mikel ' + # mail.resent_to << 'ada@test.lindsaar.net' + # mail.resent_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#997 + def resent_to(val = T.unsafe(nil)); end + + # Sets the Resent-To value of the mail object, pass in a string of the field + # + # Example: + # + # mail.resent_to = 'Mikel ' + # mail.resent_to #=> ['mikel@test.lindsaar.net'] + # mail.resent_to = 'Mikel , ada@test.lindsaar.net' + # mail.resent_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#1009 + def resent_to=(val); end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1578 + def retryable?; end + + # Returns the return path of the mail object, or sets it if you pass a string + # + # source://mail//lib/mail/message.rb#1014 + def return_path(val = T.unsafe(nil)); end + + # Sets the return path of the object + # + # source://mail//lib/mail/message.rb#1019 + def return_path=(val); end + + # Returns the Sender value of the mail object, as a single string of an address + # spec. A sender per RFC 2822 must be a single address. + # + # Example: + # + # mail.sender = 'Mikel ' + # mail.sender #=> 'mikel@test.lindsaar.net' + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.sender 'Mikel ' + # mail.sender #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#1037 + def sender(val = T.unsafe(nil)); end + + # Sets the Sender value of the mail object, pass in a string of the field + # + # Example: + # + # mail.sender = 'Mikel ' + # mail.sender #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#1047 + def sender=(val); end + + # Sets the envelope from for the email + # + # source://mail//lib/mail/message.rb#402 + def set_envelope(val); end + + # Skips the deletion of this message. All other messages + # flagged for delete still will be deleted at session close (i.e. when + # #find exits). Only has an effect if you're using #find_and_delete + # or #find with :delete_after_find set to true. + # + # source://mail//lib/mail/message.rb#1939 + def skip_deletion; end + + # Returns the SMTP Envelope From value of the mail object, as a single + # string of an address spec. + # + # Defaults to Return-Path, Sender, or the first From address. + # + # Example: + # + # mail.smtp_envelope_from = 'Mikel ' + # mail.smtp_envelope_from #=> 'mikel@test.lindsaar.net' + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.smtp_envelope_from 'Mikel ' + # mail.smtp_envelope_from #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#1067 + def smtp_envelope_from(val = T.unsafe(nil)); end + + # Sets the From address on the SMTP Envelope. + # + # Example: + # + # mail.smtp_envelope_from = 'Mikel ' + # mail.smtp_envelope_from #=> 'mikel@test.lindsaar.net' + # + # source://mail//lib/mail/message.rb#1081 + def smtp_envelope_from=(val); end + + # Returns the SMTP Envelope To value of the mail object. + # + # Defaults to #destinations: To, Cc, and Bcc addresses. + # + # Example: + # + # mail.smtp_envelope_to = 'Mikel ' + # mail.smtp_envelope_to #=> 'mikel@test.lindsaar.net' + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.smtp_envelope_to ['Mikel ', 'Lindsaar '] + # mail.smtp_envelope_to #=> ['mikel@test.lindsaar.net', 'lindsaar@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#1100 + def smtp_envelope_to(val = T.unsafe(nil)); end + + # Sets the To addresses on the SMTP Envelope. + # + # Example: + # + # mail.smtp_envelope_to = 'Mikel ' + # mail.smtp_envelope_to #=> 'mikel@test.lindsaar.net' + # + # mail.smtp_envelope_to = ['Mikel ', 'Lindsaar '] + # mail.smtp_envelope_to #=> ['mikel@test.lindsaar.net', 'lindsaar@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#1117 + def smtp_envelope_to=(val); end + + # Returns the sub content type + # + # source://mail//lib/mail/message.rb#1518 + def sub_type; end + + # Returns the decoded value of the subject field, as a single string. + # + # Example: + # + # mail.subject = "G'Day mate" + # mail.subject #=> "G'Day mate" + # mail.subject = '=?UTF-8?Q?This_is_=E3=81=82_string?=' + # mail.subject #=> "This is あ string" + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.subject "G'Day mate" + # mail.subject #=> "G'Day mate" + # + # source://mail//lib/mail/message.rb#1142 + def subject(val = T.unsafe(nil)); end + + # Sets the Subject value of the mail object, pass in a string of the field + # + # Example: + # + # mail.subject = '=?UTF-8?Q?This_is_=E3=81=82_string?=' + # mail.subject #=> "This is あ string" + # + # source://mail//lib/mail/message.rb#1152 + def subject=(val); end + + # @return [Boolean] + # + # source://mail//lib/mail/message.rb#1964 + def text?; end + + # Accessor for text_part + # + # source://mail//lib/mail/message.rb#1644 + def text_part(&block); end + + # Helper to add a text part to a multipart/alternative email. If this and + # html_part are both defined in a message, then it will be a multipart/alternative + # message and set itself that way. + # + # source://mail//lib/mail/message.rb#1679 + def text_part=(msg); end + + # Returns the To value of the mail object as an array of strings of + # address specs. + # + # Example: + # + # mail.to = 'Mikel ' + # mail.to #=> ['mikel@test.lindsaar.net'] + # mail.to = 'Mikel , ada@test.lindsaar.net' + # mail.to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # Also allows you to set the value by passing a value as a parameter + # + # Example: + # + # mail.to 'Mikel ' + # mail.to #=> ['mikel@test.lindsaar.net'] + # + # Additionally, you can append new addresses to the returned Array like + # object. + # + # Example: + # + # mail.to 'Mikel ' + # mail.to << 'ada@test.lindsaar.net' + # mail.to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#1181 + def to(val = T.unsafe(nil)); end + + # Sets the To value of the mail object, pass in a string of the field + # + # Example: + # + # mail.to = 'Mikel ' + # mail.to #=> ['mikel@test.lindsaar.net'] + # mail.to = 'Mikel , ada@test.lindsaar.net' + # mail.to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] + # + # source://mail//lib/mail/message.rb#1193 + def to=(val); end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#13 + def to_addresses; end + + # Returns an array of addresses (the encoded value) in the To field, + # if no To field, returns an empty array + # + # source://mail//lib/mail/message.rb#1294 + def to_addrs; end + + # source://mail//lib/mail/message.rb#1869 + def to_s; end + + # source://mail//lib/mail/message.rb#1823 + def to_yaml(opts = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#621 + def transport_encoding(val = T.unsafe(nil)); end + + # source://mail//lib/mail/message.rb#629 + def transport_encoding=(val); end + + # source://mail//lib/mail/message.rb#1811 + def without_attachments!; end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#29 + def x_forwarded_to_addresses; end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#25 + def x_original_to_addresses; end + + private + + # source://mail//lib/mail/message.rb#2067 + def add_boundary; end + + # source://mail//lib/mail/message.rb#2032 + def add_encoding_to_body; end + + # source://mail//lib/mail/message.rb#2062 + def add_multipart_alternate_header; end + + # source://mail//lib/mail/message.rb#2079 + def add_multipart_mixed_header; end + + # source://mail//lib/mail/message.rb#2048 + def add_required_fields; end + + # source://mail//lib/mail/message.rb#2056 + def add_required_message_fields; end + + # source://actionmailbox/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_mailbox/mail_ext/addresses.rb#34 + def address_list(obj); end + + # source://mail//lib/mail/message.rb#2025 + def allowed_encodings; end + + # see comments to body=. We take data and process it lazily + # + # source://mail//lib/mail/message.rb#1990 + def body_lazy(value); end + + # source://mail//lib/mail/message.rb#2152 + def decode_body_as_text; end + + # source://mail//lib/mail/message.rb#2142 + def do_delivery; end + + # Returns the filename of the attachment (if it exists) or returns nil + # + # source://mail//lib/mail/message.rb#2124 + def find_attachment; end + + # source://mail//lib/mail/message.rb#2038 + def identify_and_set_transfer_encoding; end + + # source://mail//lib/mail/message.rb#2086 + def init_with_hash(hash); end + + # source://mail//lib/mail/message.rb#2116 + def init_with_string(string); end + + # source://mail//lib/mail/message.rb#384 + def initialize_copy(original); end + + # 2.1. General Description + # A message consists of header fields (collectively called "the header + # of the message") followed, optionally, by a body. The header is a + # sequence of lines of characters with special syntax as defined in + # this standard. The body is simply a sequence of characters that + # follows the header and is separated from the header by an empty line + # (i.e., a line with nothing preceding the CRLF). + # + # source://mail//lib/mail/message.rb#1979 + def parse_message; end + + # source://mail//lib/mail/message.rb#2005 + def process_body_raw; end + + # source://mail//lib/mail/message.rb#1985 + def raw_source=(value); end + + # source://mail//lib/mail/message.rb#2021 + def separate_parts; end + + # source://mail//lib/mail/message.rb#2013 + def set_envelope_header; end + + class << self + # source://mail//lib/mail/message.rb#232 + def default_charset; end + + # source://mail//lib/mail/message.rb#233 + def default_charset=(charset); end + + # source://mail//lib/mail/message.rb#1865 + def from_hash(hash); end + + # source://mail//lib/mail/message.rb#1843 + def from_yaml(str); end + end +end + +# source://mail//lib/mail/message.rb#1970 +Mail::Message::HEADER_SEPARATOR = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/message.rb#1770 +Mail::Message::MULTIPART_CONVERSION_CONTENT_FIELDS = T.let(T.unsafe(nil), Array) + +# Only one Message-ID field may appear in a header. +# +# Note that parsed Message IDs do not contain their enclosing angle +# brackets which, per RFC, are not part of the ID. +# +# mail = Mail.new +# mail.message_id = '' +# mail.message_id #=> '' +# mail[:message_id] #=> '# '# '# 'F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@test.me.dom' +# mail[:message_id].message_ids #=> ['F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@test.me.dom'] +# +# source://mail//lib/mail/fields/message_id_field.rb#21 +class Mail::MessageIdField < ::Mail::CommonMessageIdField + # @return [MessageIdField] a new instance of MessageIdField + # + # source://mail//lib/mail/fields/message_id_field.rb#28 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/message_id_field.rb#33 + def message_ids; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/message_id_field.rb#24 + def singular?; end + end +end + +# source://mail//lib/mail/fields/message_id_field.rb#22 +Mail::MessageIdField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/message_ids_element.rb#7 +class Mail::MessageIdsElement + # @return [MessageIdsElement] a new instance of MessageIdsElement + # + # source://mail//lib/mail/elements/message_ids_element.rb#14 + def initialize(string); end + + # source://mail//lib/mail/elements/message_ids_element.rb#18 + def message_id; end + + # Returns the value of attribute message_ids. + # + # source://mail//lib/mail/elements/message_ids_element.rb#12 + def message_ids; end + + private + + # source://mail//lib/mail/elements/message_ids_element.rb#23 + def parse(string); end + + class << self + # source://mail//lib/mail/elements/message_ids_element.rb#8 + def parse(string); end + end +end + +# source://mail//lib/mail/elements/mime_version_element.rb#6 +class Mail::MimeVersionElement + # @return [MimeVersionElement] a new instance of MimeVersionElement + # + # source://mail//lib/mail/elements/mime_version_element.rb#9 + def initialize(string); end + + # Returns the value of attribute major. + # + # source://mail//lib/mail/elements/mime_version_element.rb#7 + def major; end + + # Returns the value of attribute minor. + # + # source://mail//lib/mail/elements/mime_version_element.rb#7 + def minor; end +end + +# source://mail//lib/mail/fields/mime_version_field.rb#7 +class Mail::MimeVersionField < ::Mail::NamedStructuredField + # @return [MimeVersionField] a new instance of MimeVersionField + # + # source://mail//lib/mail/fields/mime_version_field.rb#14 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/mime_version_field.rb#39 + def decoded; end + + # source://mail//lib/mail/fields/mime_version_field.rb#19 + def element; end + + # source://mail//lib/mail/fields/mime_version_field.rb#35 + def encoded; end + + # source://mail//lib/mail/fields/mime_version_field.rb#27 + def major; end + + # source://mail//lib/mail/fields/mime_version_field.rb#31 + def minor; end + + # source://mail//lib/mail/fields/mime_version_field.rb#23 + def version; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/mime_version_field.rb#10 + def singular?; end + end +end + +# source://mail//lib/mail/fields/mime_version_field.rb#8 +Mail::MimeVersionField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/multibyte/unicode.rb#3 +module Mail::Multibyte + class << self + # Removes all invalid characters from the string. + # + # Note: this method is a no-op in Ruby 1.9 + # + # source://mail//lib/mail/multibyte/utils.rb#36 + def clean(string); end + + # Returns true if string has valid utf-8 encoding + # + # @return [Boolean] + # + # source://mail//lib/mail/multibyte/utils.rb#12 + def is_utf8?(string); end + + # == Multibyte proxy + # + # +mb_chars+ is a multibyte safe proxy for string methods. + # + # In Ruby 1.8 and older it creates and returns an instance of the Mail::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 encapsuled string. + # + # name = 'Claus Müller' + # name.reverse # => "rell??M sualC" + # name.length # => 13 + # + # name.mb_chars.reverse.to_s # => "rellüM sualC" + # name.mb_chars.length # => 12 + # + # In Ruby 1.9 and newer +mb_chars+ returns +self+ because String is (mostly) encoding aware. This means that + # it becomes easy to run one version of your code on multiple Ruby versions. + # + # == 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 Mail::Multibyte::Chars. For + # information about how to change the default Multibyte behaviour see Mail::Multibyte. + # + # source://mail//lib/mail/multibyte.rb#55 + def mb_chars(str); 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 Mail::Multibyte::Chars implementation for + # an example how to do this. + # + # Example: + # Mail::Multibyte.proxy_class = CharsForUTF32 + # + # source://mail//lib/mail/multibyte.rb#17 + 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 Mail::Multibyte::Chars implementation for + # an example how to do this. + # + # Example: + # Mail::Multibyte.proxy_class = CharsForUTF32 + # + # source://mail//lib/mail/multibyte.rb#17 + def proxy_class=(_arg0); end + + # source://mail//lib/mail/multibyte/utils.rb#40 + def to_utf8(string); end + + # Returns a regular expression that matches valid characters in the current encoding + # + # source://mail//lib/mail/multibyte/utils.rb#7 + def valid_character; end + + # Verifies the encoding of a string + # + # source://mail//lib/mail/multibyte/utils.rb#24 + def verify(string); end + + # Verifies the encoding of the string and raises an exception when it's not valid + # + # @raise [EncodingError] + # + # source://mail//lib/mail/multibyte/utils.rb#29 + def verify!(string); 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.normalize # => "the perfect string" +# +# 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 +# Mail::Multibyte.proxy_class. +# +# class CharsForUTF32 +# def size +# @wrapped_string.size / 4 +# end +# +# def self.accepts?(string) +# string.length % 4 == 0 +# end +# end +# +# Mail::Multibyte.proxy_class = CharsForUTF32 +# +# source://mail//lib/mail/multibyte/chars.rb#36 +class Mail::Multibyte::Chars + include ::Comparable + + # Creates a new Chars instance by wrapping _string_. + # + # @return [Chars] a new instance of Chars + # + # source://mail//lib/mail/multibyte/chars.rb#42 + def initialize(string); end + + # Returns -1, 0, or 1, depending on whether the Chars object is to be sorted before, + # equal or after the object on the right side of the operation. It accepts any object + # that implements +to_s+: + # + # 'é'.mb_chars <=> 'ü'.mb_chars # => -1 + # + # See String#<=> for more details. + # + # source://mail//lib/mail/multibyte/chars.rb#78 + def <=>(other); end + + # source://mail//lib/mail/multibyte/chars.rb#82 + def =~(other); end + + # Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that + # character. + # + # Example: + # Mail::Multibyte.mb_chars('こんにちは').slice(2..3).to_s # => "にち" + # + # source://mail//lib/mail/multibyte/chars.rb#148 + def [](*args); end + + # Like String#[]=, except instead of byte offsets you specify character offsets. + # + # Example: + # + # s = "Müller" + # s.mb_chars[2] = "e" # Replace character with offset 2 + # s + # # => "Müeler" + # + # s = "Müller" + # s.mb_chars[1, 2] = "ö" # Replace 2 characters at character offset 1 + # s + # # => "Möler" + # + # source://mail//lib/mail/multibyte/chars.rb#108 + def []=(*args); end + + # Enable more predictable duck-typing on String-like classes. See Object#acts_like?. + # + # @return [Boolean] + # + # source://mail//lib/mail/multibyte/chars.rb#65 + def acts_like_string?; end + + # Converts the first character to uppercase and the remainder to lowercase. + # + # Example: + # Mail::Multibyte.mb_chars('über').capitalize.to_s # => "Über" + # + # source://mail//lib/mail/multibyte/chars.rb#201 + def capitalize; end + + # source://mail//lib/mail/multibyte/chars.rb#263 + def capitalize!(*args); end + + # Performs composition on all the characters. + # + # Example: + # 'é'.length # => 3 + # Mail::Multibyte.mb_chars('é').compose.to_s.length # => 2 + # + # source://mail//lib/mail/multibyte/chars.rb#239 + def compose; end + + # Performs canonical decomposition on all the characters. + # + # Example: + # 'é'.length # => 2 + # Mail::Multibyte.mb_chars('é').decompose.to_s.length # => 3 + # + # source://mail//lib/mail/multibyte/chars.rb#230 + def decompose; end + + # Convert characters in the string to lowercase. + # + # Example: + # Mail::Multibyte.mb_chars('VĚDA A VÝZKUM').downcase.to_s # => "věda a výzkum" + # + # source://mail//lib/mail/multibyte/chars.rb#193 + def downcase; end + + # source://mail//lib/mail/multibyte/chars.rb#263 + def downcase!(*args); end + + # Returns the number of grapheme clusters in the string. + # + # Example: + # Mail::Multibyte.mb_chars('क्षि').length # => 4 + # Mail::Multibyte.mb_chars('क्षि').g_length # => 3 + # + # source://mail//lib/mail/multibyte/chars.rb#248 + def g_length; end + + # Limit 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. + # + # Example: + # s = 'こんにちは' + # s.mb_chars.limit(7) # => "こん" + # + # source://mail//lib/mail/multibyte/chars.rb#177 + def limit(limit); end + + # Forward all undefined methods to the wrapped string. + # + # source://mail//lib/mail/multibyte/chars.rb#48 + def method_missing(method, *args, &block); end + + # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for + # passing strings to databases and validations. + # + # * form - The form you want to normalize in. Should be one of the following: + # :c, :kc, :d, or :kd. Default is + # Mail::Multibyte::Unicode.default_normalization_form + # + # source://mail//lib/mail/multibyte/chars.rb#221 + def normalize(form = T.unsafe(nil)); 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://mail//lib/mail/multibyte/chars.rb#60 + def respond_to?(method, include_private = T.unsafe(nil)); end + + # Reverses all characters in the string. + # + # Example: + # Mail::Multibyte.mb_chars('Café').reverse.to_s # => 'éfaC' + # + # source://mail//lib/mail/multibyte/chars.rb#139 + def reverse; end + + # source://mail//lib/mail/multibyte/chars.rb#263 + def reverse!(*args); end + + # Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that + # character. + # + # Example: + # Mail::Multibyte.mb_chars('こんにちは').slice(2..3).to_s # => "にち" + # + # source://mail//lib/mail/multibyte/chars.rb#148 + def slice(*args); end + + # source://mail//lib/mail/multibyte/chars.rb#263 + 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. + # + # Example: + # Mail::Multibyte.mb_chars('Café périferôl').split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] + # + # source://mail//lib/mail/multibyte/chars.rb#91 + 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://mail//lib/mail/multibyte/chars.rb#255 + def tidy_bytes(force = T.unsafe(nil)); end + + # source://mail//lib/mail/multibyte/chars.rb#263 + def tidy_bytes!(*args); end + + # Capitalizes the first letter of every word, when possible. + # + # Example: + # Mail::Multibyte.mb_chars("ÉL QUE SE ENTERÓ").titleize # => "Él Que Se Enteró" + # Mail::Multibyte.mb_chars("日本語").titleize # => "日本語" + # + # source://mail//lib/mail/multibyte/chars.rb#210 + def titlecase; end + + # Capitalizes the first letter of every word, when possible. + # + # Example: + # Mail::Multibyte.mb_chars("ÉL QUE SE ENTERÓ").titleize # => "Él Que Se Enteró" + # Mail::Multibyte.mb_chars("日本語").titleize # => "日本語" + # + # source://mail//lib/mail/multibyte/chars.rb#210 + def titleize; end + + # Returns the value of attribute wrapped_string. + # + # source://mail//lib/mail/multibyte/chars.rb#37 + def to_s; end + + # Returns the value of attribute wrapped_string. + # + # source://mail//lib/mail/multibyte/chars.rb#37 + def to_str; end + + # Convert characters in the string to uppercase. + # + # Example: + # Mail::Multibyte.mb_chars('Laurent, où sont les tests ?').upcase.to_s # => "LAURENT, OÙ SONT LES TESTS ?" + # + # source://mail//lib/mail/multibyte/chars.rb#185 + def upcase; end + + # source://mail//lib/mail/multibyte/chars.rb#263 + def upcase!(*args); end + + # Returns the value of attribute wrapped_string. + # + # source://mail//lib/mail/multibyte/chars.rb#37 + def wrapped_string; end + + protected + + # source://mail//lib/mail/multibyte/chars.rb#313 + def chars(string); end + + # @raise [ArgumentError] + # + # source://mail//lib/mail/multibyte/chars.rb#288 + def justify(integer, way, padstr = T.unsafe(nil)); end + + # source://mail//lib/mail/multibyte/chars.rb#305 + def padding(padsize, padstr = T.unsafe(nil)); end + + # source://mail//lib/mail/multibyte/chars.rb#272 + def translate_offset(byte_offset); end +end + +# Raised when a problem with the encoding was found. +# +# source://mail//lib/mail/multibyte.rb#8 +class Mail::Multibyte::EncodingError < ::StandardError; end + +# source://mail//lib/mail/multibyte/unicode.rb#4 +module Mail::Multibyte::Unicode + extend ::Mail::Multibyte::Unicode + + # source://mail//lib/mail/multibyte/unicode.rb#318 + def apply_mapping(string, mapping); end + + # Compose decomposed characters to the composed form. + # + # source://mail//lib/mail/multibyte/unicode.rb#184 + def compose_codepoints(codepoints); end + + # Decompose composed characters to the decomposed form. + # + # source://mail//lib/mail/multibyte/unicode.rb#163 + def decompose_codepoints(type, codepoints); end + + # The default normalization used for operations that require normalization. It can be set to any of the + # normalizations in NORMALIZATION_FORMS. + # + # Example: + # Mail::Multibyte::Unicode.default_normalization_form = :c + # + # source://mail//lib/mail/multibyte/unicode.rb#37 + def default_normalization_form; end + + # The default normalization used for operations that require normalization. It can be set to any of the + # normalizations in NORMALIZATION_FORMS. + # + # Example: + # Mail::Multibyte::Unicode.default_normalization_form = :c + # + # source://mail//lib/mail/multibyte/unicode.rb#37 + def default_normalization_form=(_arg0); end + + # Reverse operation of g_unpack. + # + # Example: + # Unicode.g_pack(Unicode.g_unpack('क्षि')) # => 'क्षि' + # + # source://mail//lib/mail/multibyte/unicode.rb#142 + def g_pack(unpacked); end + + # Unpack the string at grapheme boundaries. Returns a list of character lists. + # + # Example: + # Unicode.g_unpack('क्षि') # => [[2325, 2381], [2359], [2367]] + # Unicode.g_unpack('Café') # => [[67], [97], [102], [233]] + # + # source://mail//lib/mail/multibyte/unicode.rb#108 + def g_unpack(string); end + + # Detect whether the codepoint is in a certain character class. Returns +true+ when it's in the specified + # character class and +false+ otherwise. Valid character classes are: :cr, :lf, :l, + # :v, :lv, :lvt and :t. + # + # Primarily used by the grapheme cluster support. + # + # @return [Boolean] + # + # source://mail//lib/mail/multibyte/unicode.rb#99 + def in_char_class?(codepoint, classes); end + + # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for + # passing strings to databases and validations. + # + # * string - The string to perform normalization on. + # * form - The form you want to normalize in. Should be one of the following: + # :c, :kc, :d, or :kd. Default is + # Mail::Multibyte.default_normalization_form + # + # source://mail//lib/mail/multibyte/unicode.rb#300 + def normalize(string, form = T.unsafe(nil)); end + + # Re-order codepoints so the string becomes canonical. + # + # source://mail//lib/mail/multibyte/unicode.rb#147 + def reorder_characters(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://mail//lib/mail/multibyte/unicode.rb#245 + def tidy_bytes(string, force = T.unsafe(nil)); end + + # Unpack the string at codepoints boundaries. Raises an EncodingError when the encoding of the string isn't + # valid UTF-8. + # + # Example: + # Unicode.u_unpack('Café') # => [67, 97, 102, 233] + # + # source://mail//lib/mail/multibyte/unicode.rb#86 + def u_unpack(string); end + + private + + # source://mail//lib/mail/multibyte/unicode.rb#399 + def database; end + + # source://mail//lib/mail/multibyte/unicode.rb#389 + def tidy_byte(byte); end + + class << self + # Returns a regular expression pattern that matches the passed Unicode codepoints + # + # source://mail//lib/mail/multibyte/unicode.rb#75 + def codepoints_to_pattern(array_of_codepoints); end + end +end + +# Holds data about a codepoint in the Unicode database. +# +# source://mail//lib/mail/multibyte/unicode.rb#11 +class Mail::Multibyte::Unicode::Codepoint + # Initializing Codepoint object with default values + # + # @return [Codepoint] a new instance of Codepoint + # + # source://mail//lib/mail/multibyte/unicode.rb#15 + def initialize; end + + # Returns the value of attribute code. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def code; end + + # Sets the attribute code + # + # @param value the value to set the attribute code to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def code=(_arg0); end + + # Returns the value of attribute combining_class. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def combining_class; end + + # Sets the attribute combining_class + # + # @param value the value to set the attribute combining_class to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def combining_class=(_arg0); end + + # Returns the value of attribute decomp_mapping. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def decomp_mapping; end + + # Sets the attribute decomp_mapping + # + # @param value the value to set the attribute decomp_mapping to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def decomp_mapping=(_arg0); end + + # Returns the value of attribute decomp_type. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def decomp_type; end + + # Sets the attribute decomp_type + # + # @param value the value to set the attribute decomp_type to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def decomp_type=(_arg0); end + + # Returns the value of attribute lowercase_mapping. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def lowercase_mapping; end + + # Sets the attribute lowercase_mapping + # + # @param value the value to set the attribute lowercase_mapping to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def lowercase_mapping=(_arg0); end + + # source://mail//lib/mail/multibyte/unicode.rb#21 + def swapcase_mapping; end + + # Returns the value of attribute uppercase_mapping. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def uppercase_mapping; end + + # Sets the attribute uppercase_mapping + # + # @param value the value to set the attribute uppercase_mapping to. + # + # source://mail//lib/mail/multibyte/unicode.rb#12 + def uppercase_mapping=(_arg0); end +end + +# source://mail//lib/mail/multibyte/unicode.rb#51 +Mail::Multibyte::Unicode::HANGUL_JAMO_FIRST = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#52 +Mail::Multibyte::Unicode::HANGUL_JAMO_LAST = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#42 +Mail::Multibyte::Unicode::HANGUL_LBASE = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#45 +Mail::Multibyte::Unicode::HANGUL_LCOUNT = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#48 +Mail::Multibyte::Unicode::HANGUL_NCOUNT = T.let(T.unsafe(nil), Integer) + +# Hangul character boundaries and properties +# +# source://mail//lib/mail/multibyte/unicode.rb#41 +Mail::Multibyte::Unicode::HANGUL_SBASE = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#49 +Mail::Multibyte::Unicode::HANGUL_SCOUNT = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#50 +Mail::Multibyte::Unicode::HANGUL_SLAST = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#44 +Mail::Multibyte::Unicode::HANGUL_TBASE = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#47 +Mail::Multibyte::Unicode::HANGUL_TCOUNT = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#43 +Mail::Multibyte::Unicode::HANGUL_VBASE = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/multibyte/unicode.rb#46 +Mail::Multibyte::Unicode::HANGUL_VCOUNT = T.let(T.unsafe(nil), Integer) + +# BOM (byte order mark) can also be seen as whitespace, it's a non-rendering character used to distinguish +# between little and big endian. This is not an issue in utf-8, so it must be ignored. +# +# source://mail//lib/mail/multibyte/unicode.rb#72 +Mail::Multibyte::Unicode::LEADERS_AND_TRAILERS = T.let(T.unsafe(nil), Array) + +# source://mail//lib/mail/multibyte/unicode.rb#79 +Mail::Multibyte::Unicode::LEADERS_PAT = T.let(T.unsafe(nil), Regexp) + +# A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more +# information about normalization. +# +# source://mail//lib/mail/multibyte/unicode.rb#30 +Mail::Multibyte::Unicode::NORMALIZATION_FORMS = T.let(T.unsafe(nil), Array) + +# source://mail//lib/mail/multibyte/unicode.rb#78 +Mail::Multibyte::Unicode::TRAILERS_PAT = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/multibyte/unicode.rb#8 +Mail::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# Holds static data from the Unicode database +# +# source://mail//lib/mail/multibyte/unicode.rb#330 +class Mail::Multibyte::Unicode::UnicodeDatabase + # @return [UnicodeDatabase] a new instance of UnicodeDatabase + # + # source://mail//lib/mail/multibyte/unicode.rb#335 + def initialize; end + + # source://mail//lib/mail/multibyte/unicode.rb#346 + def boundary; end + + # source://mail//lib/mail/multibyte/unicode.rb#333 + def boundary=(_arg0); end + + # source://mail//lib/mail/multibyte/unicode.rb#346 + def codepoints; end + + # source://mail//lib/mail/multibyte/unicode.rb#333 + def codepoints=(_arg0); end + + # source://mail//lib/mail/multibyte/unicode.rb#346 + def composition_exclusion; end + + # source://mail//lib/mail/multibyte/unicode.rb#333 + def composition_exclusion=(_arg0); end + + # source://mail//lib/mail/multibyte/unicode.rb#346 + def composition_map; end + + # source://mail//lib/mail/multibyte/unicode.rb#333 + def composition_map=(_arg0); end + + # source://mail//lib/mail/multibyte/unicode.rb#346 + def cp1252; end + + # source://mail//lib/mail/multibyte/unicode.rb#333 + def cp1252=(_arg0); end + + # Loads the Unicode database and returns all the internal objects of UnicodeDatabase. + # + # source://mail//lib/mail/multibyte/unicode.rb#354 + def load; end + + class << self + # Returns the directory in which the data files are stored + # + # source://mail//lib/mail/multibyte/unicode.rb#377 + def dirname; end + + # Returns the filename for the data file for this version + # + # source://mail//lib/mail/multibyte/unicode.rb#382 + def filename; end + end +end + +# source://mail//lib/mail/multibyte/unicode.rb#331 +Mail::Multibyte::Unicode::UnicodeDatabase::ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# All the unicode whitespace +# +# source://mail//lib/mail/multibyte/unicode.rb#55 +Mail::Multibyte::Unicode::WHITESPACE = T.let(T.unsafe(nil), Array) + +# Regular expressions that describe valid byte sequences for a character +# +# source://mail//lib/mail/multibyte.rb#64 +Mail::Multibyte::VALID_CHARACTER = T.let(T.unsafe(nil), Hash) + +# source://mail//lib/mail/fields/named_structured_field.rb#6 +class Mail::NamedStructuredField < ::Mail::StructuredField + # @return [NamedStructuredField] a new instance of NamedStructuredField + # + # source://mail//lib/mail/fields/named_structured_field.rb#7 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end +end + +# source://mail//lib/mail/fields/named_unstructured_field.rb#6 +class Mail::NamedUnstructuredField < ::Mail::UnstructuredField + # @return [NamedUnstructuredField] a new instance of NamedUnstructuredField + # + # source://mail//lib/mail/fields/named_unstructured_field.rb#7 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end +end + +# The field names of any optional-field MUST NOT be identical to any +# field name specified elsewhere in this standard. +# +# optional-field = field-name ":" unstructured CRLF +# +# source://mail//lib/mail/fields/optional_field.rb#10 +class Mail::OptionalField < ::Mail::UnstructuredField + private + + # source://mail//lib/mail/fields/optional_field.rb#12 + def do_encode; end +end + +# The Pop3 retriever allows to get the last, first or all emails from a POP3 server. +# Each email retrieved (RFC2822) is given as an instance of +Message+. +# +# While being retrieved, emails can be yielded if a block is given. +# +# === Example of retrieving Emails from GMail: +# +# Mail.defaults do +# retriever_method :pop3, { :address => "pop.gmail.com", +# :port => 995, +# :user_name => '', +# :password => '', +# :enable_ssl => true } +# end +# +# Mail.all #=> Returns an array of all emails +# Mail.first #=> Returns the first unread email +# Mail.last #=> Returns the last unread email +# +# You can also pass options into Mail.find to locate an email in your pop mailbox +# with the following options: +# +# what: last or first emails. The default is :first. +# order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. +# count: number of emails to retrieve. The default value is 10. A value of 1 returns an +# instance of Message, not an array of Message instances. +# +# Mail.find(:what => :first, :count => 10, :order => :asc) +# #=> Returns the first 10 emails in ascending order +# +# source://mail//lib/mail/network/retriever_methods/pop3.rb#35 +class Mail::POP3 < ::Mail::Retriever + # @return [POP3] a new instance of POP3 + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#38 + def initialize(values); end + + # Returns the connection object of the retrievable (IMAP or POP3) + # + # @raise [ArgumentError] + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#104 + def connection(&block); end + + # Delete all emails from a POP3 server + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#94 + def delete_all; end + + # Find emails in a POP3 mailbox. Without any options, the 5 last received emails are returned. + # + # Possible options: + # what: last or first emails. The default is :first. + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # count: number of emails to retrieve. The default value is 10. A value of 1 returns an + # instance of Message, not an array of Message instances. + # delete_after_find: flag for whether to delete each retreived email after find. Default + # is false. Use #find_and_delete if you would like this to default to true. + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#60 + def find(options = T.unsafe(nil), &block); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#48 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#48 + def settings=(_arg0); end + + private + + # Start a POP3 session and ensure that it will be closed in any case. Any messages + # marked for deletion via #find_and_delete or with the :delete_after_find option + # will be deleted when the session is closed. + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#127 + def start(config = T.unsafe(nil), &block); end + + # Set default options + # + # source://mail//lib/mail/network/retriever_methods/pop3.rb#115 + def validate_options(options); end +end + +# ParameterHash is an intelligent Hash that allows you to add +# parameter values including the MIME extension paramaters that +# have the name*0="blah", name*1="bleh" keys, and will just return +# a single key called name="blahbleh" and do any required un-encoding +# to make that happen +# +# Parameters are defined in RFC2045. Split keys are in RFC2231. +# +# source://mail//lib/mail/fields/parameter_hash.rb#15 +class Mail::ParameterHash < ::Mail::IndifferentHash + # source://mail//lib/mail/fields/parameter_hash.rb#16 + def [](key_name); end + + # source://mail//lib/mail/fields/parameter_hash.rb#55 + def decoded; end + + # source://mail//lib/mail/fields/parameter_hash.rb#45 + def encoded; end +end + +# Extends each field parser with utility methods. +# +# source://mail//lib/mail/parser_tools.rb#3 +module Mail::ParserTools + # source://mail//lib/mail/parser_tools.rb#6 + def chars(data, from_bytes, to_bytes); end +end + +# source://mail//lib/mail/parsers/date_time_parser.rb#9 +module Mail::Parsers; end + +# source://mail//lib/mail/parsers/address_lists_parser.rb#10 +module Mail::Parsers::AddressListsParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/address_lists_parser.rb#31951 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31951 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31955 + def en_main; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31955 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31946 + def error; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31946 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31942 + def first_final; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31942 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31959 + def parse(data); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31938 + def start; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31938 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31614 + def _eof_actions; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#31614 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#1300 + def _index_offsets; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#1300 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#1624 + def _indicies; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#1624 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#976 + def _key_spans; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#976 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#30983 + def _trans_actions; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#30983 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#18 + def _trans_keys; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#18 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#30352 + def _trans_targs; end + + # source://mail//lib/mail/parsers/address_lists_parser.rb#30352 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/address_lists_parser.rb#13 +class Mail::Parsers::AddressListsParser::AddressListStruct < ::Struct + def addresses; end + def addresses=(_); end + def error; end + def error=(_); end + def group_names; end + def group_names=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/address_lists_parser.rb#14 +class Mail::Parsers::AddressListsParser::AddressStruct < ::Struct + def comments; end + def comments=(_); end + def display_name; end + def display_name=(_); end + def domain; end + def domain=(_); end + def error; end + def error=(_); end + def group; end + def group=(_); end + def local; end + def local=(_); end + def obs_domain_list; end + def obs_domain_list=(_); end + def raw; end + def raw=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_disposition_parser.rb#10 +module Mail::Parsers::ContentDispositionParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/content_disposition_parser.rb#556 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#556 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#560 + def en_main; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#560 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#551 + def error; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#551 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#547 + def first_final; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#547 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#564 + def parse(data); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#543 + def start; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#543 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#530 + def _eof_actions; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#530 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#54 + def _index_offsets; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#54 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#67 + def _indicies; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#67 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#41 + def _key_spans; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#41 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#510 + def _trans_actions; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#510 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#490 + def _trans_targs; end + + # source://mail//lib/mail/parsers/content_disposition_parser.rb#490 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_disposition_parser.rb#13 +class Mail::Parsers::ContentDispositionParser::ContentDispositionStruct < ::Struct + def disposition_type; end + def disposition_type=(_); end + def error; end + def error=(_); end + def parameters; end + def parameters=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_location_parser.rb#10 +module Mail::Parsers::ContentLocationParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/content_location_parser.rb#577 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#577 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#581 + def en_main; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#581 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#572 + def error; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#572 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#568 + def first_final; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#568 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#585 + def parse(data); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#564 + def start; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#564 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/content_location_parser.rb#551 + def _eof_actions; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#551 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#52 + def _index_offsets; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#52 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#65 + def _indicies; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#65 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#39 + def _key_spans; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#39 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#533 + def _trans_actions; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#533 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/content_location_parser.rb#515 + def _trans_targs; end + + # source://mail//lib/mail/parsers/content_location_parser.rb#515 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_location_parser.rb#13 +class Mail::Parsers::ContentLocationParser::ContentLocationStruct < ::Struct + def error; end + def error=(_); end + def location; end + def location=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#10 +module Mail::Parsers::ContentTransferEncodingParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#328 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#328 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#332 + def en_main; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#332 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#323 + def error; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#323 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#319 + def first_final; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#319 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#336 + def parse(data); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#315 + def start; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#315 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#304 + def _eof_actions; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#304 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#45 + def _index_offsets; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#45 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#56 + def _indicies; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#56 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#34 + def _key_spans; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#34 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#290 + def _trans_actions; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#290 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#276 + def _trans_targs; end + + # source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#276 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_transfer_encoding_parser.rb#13 +class Mail::Parsers::ContentTransferEncodingParser::ContentTransferEncodingStruct < ::Struct + def encoding; end + def encoding=(_); end + def error; end + def error=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_type_parser.rb#10 +module Mail::Parsers::ContentTypeParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/content_type_parser.rb#681 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#681 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#685 + def en_main; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#685 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#676 + def error; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#676 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#672 + def first_final; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#672 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#689 + def parse(data); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#668 + def start; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#668 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/content_type_parser.rb#654 + def _eof_actions; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#654 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#58 + def _index_offsets; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#58 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#72 + def _indicies; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#72 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#44 + def _key_spans; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#44 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#632 + def _trans_actions; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#632 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/content_type_parser.rb#610 + def _trans_targs; end + + # source://mail//lib/mail/parsers/content_type_parser.rb#610 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/content_type_parser.rb#13 +class Mail::Parsers::ContentTypeParser::ContentTypeStruct < ::Struct + def error; end + def error=(_); end + def main_type; end + def main_type=(_); end + def parameters; end + def parameters=(_); end + def sub_type; end + def sub_type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/date_time_parser.rb#10 +module Mail::Parsers::DateTimeParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/date_time_parser.rb#660 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#660 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#664 + def en_main; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#664 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#655 + def error; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#655 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#651 + def first_final; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#651 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#668 + def parse(data); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#647 + def start; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#647 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/date_time_parser.rb#626 + def _eof_actions; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#626 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#86 + def _index_offsets; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#86 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#107 + def _indicies; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#107 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#65 + def _key_spans; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#65 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#595 + def _trans_actions; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#595 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/date_time_parser.rb#564 + def _trans_targs; end + + # source://mail//lib/mail/parsers/date_time_parser.rb#564 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/date_time_parser.rb#13 +class Mail::Parsers::DateTimeParser::DateTimeStruct < ::Struct + def date_string; end + def date_string=(_); end + def error; end + def error=(_); end + def time_string; end + def time_string=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/envelope_from_parser.rb#10 +module Mail::Parsers::EnvelopeFromParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3211 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3211 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3215 + def en_main; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3215 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3206 + def error; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3206 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3202 + def first_final; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3202 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3219 + def parse(data); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3198 + def start; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3198 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3152 + def _eof_actions; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3152 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#185 + def _index_offsets; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#185 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#231 + def _indicies; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#231 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#139 + def _key_spans; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#139 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3077 + def _trans_actions; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3077 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3002 + def _trans_targs; end + + # source://mail//lib/mail/parsers/envelope_from_parser.rb#3002 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/envelope_from_parser.rb#13 +class Mail::Parsers::EnvelopeFromParser::EnvelopeFromStruct < ::Struct + def address; end + def address=(_); end + def ctime_date; end + def ctime_date=(_); end + def error; end + def error=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/message_ids_parser.rb#10 +module Mail::Parsers::MessageIdsParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/message_ids_parser.rb#4818 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4818 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4822 + def en_main; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4822 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4813 + def error; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4813 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4809 + def first_final; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4809 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4826 + def parse(data); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4805 + def start; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4805 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4755 + def _eof_actions; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4755 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#202 + def _index_offsets; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#202 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#252 + def _indicies; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#252 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#152 + def _key_spans; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#152 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4675 + def _trans_actions; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4675 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4595 + def _trans_targs; end + + # source://mail//lib/mail/parsers/message_ids_parser.rb#4595 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/message_ids_parser.rb#13 +class Mail::Parsers::MessageIdsParser::MessageIdsStruct < ::Struct + def error; end + def error=(_); end + def message_ids; end + def message_ids=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/mime_version_parser.rb#10 +module Mail::Parsers::MimeVersionParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/mime_version_parser.rb#292 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#292 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#296 + def en_main; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#296 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#287 + def error; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#287 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#283 + def first_final; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#283 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#300 + def parse(data); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#279 + def start; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#279 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/mime_version_parser.rb#268 + def _eof_actions; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#268 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#45 + def _index_offsets; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#45 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#56 + def _indicies; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#56 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#34 + def _key_spans; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#34 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#254 + def _trans_actions; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#254 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#240 + def _trans_targs; end + + # source://mail//lib/mail/parsers/mime_version_parser.rb#240 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/mime_version_parser.rb#13 +class Mail::Parsers::MimeVersionParser::MimeVersionStruct < ::Struct + def error; end + def error=(_); end + def major; end + def major=(_); end + def minor; end + def minor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/phrase_lists_parser.rb#10 +class Mail::Parsers::PhraseListsParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#672 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#672 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#676 + def en_main; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#676 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#667 + def error; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#667 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#663 + def first_final; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#663 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#680 + def parse(data); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#659 + def start; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#659 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#646 + def _eof_actions; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#646 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#54 + def _index_offsets; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#54 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#67 + def _indicies; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#67 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#41 + def _key_spans; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#41 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#626 + def _trans_actions; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#626 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#606 + def _trans_targs; end + + # source://mail//lib/mail/parsers/phrase_lists_parser.rb#606 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/phrase_lists_parser.rb#13 +class Mail::Parsers::PhraseListsParser::PhraseListsStruct < ::Struct + def error; end + def error=(_); end + def phrases; end + def phrases=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/parsers/received_parser.rb#10 +module Mail::Parsers::ReceivedParser + extend ::Mail::ParserTools + + class << self + # source://mail//lib/mail/parsers/received_parser.rb#7484 + def en_comment_tail; end + + # source://mail//lib/mail/parsers/received_parser.rb#7484 + def en_comment_tail=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7488 + def en_main; end + + # source://mail//lib/mail/parsers/received_parser.rb#7488 + def en_main=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7479 + def error; end + + # source://mail//lib/mail/parsers/received_parser.rb#7479 + def error=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7475 + def first_final; end + + # source://mail//lib/mail/parsers/received_parser.rb#7475 + def first_final=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7492 + def parse(data); end + + # source://mail//lib/mail/parsers/received_parser.rb#7471 + def start; end + + # source://mail//lib/mail/parsers/received_parser.rb#7471 + def start=(_arg0); end + + private + + # source://mail//lib/mail/parsers/received_parser.rb#7382 + def _eof_actions; end + + # source://mail//lib/mail/parsers/received_parser.rb#7382 + def _eof_actions=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#358 + def _index_offsets; end + + # source://mail//lib/mail/parsers/received_parser.rb#358 + def _index_offsets=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#447 + def _indicies; end + + # source://mail//lib/mail/parsers/received_parser.rb#447 + def _indicies=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#269 + def _key_spans; end + + # source://mail//lib/mail/parsers/received_parser.rb#269 + def _key_spans=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7199 + def _trans_actions; end + + # source://mail//lib/mail/parsers/received_parser.rb#7199 + def _trans_actions=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#16 + def _trans_keys; end + + # source://mail//lib/mail/parsers/received_parser.rb#16 + def _trans_keys=(_arg0); end + + # source://mail//lib/mail/parsers/received_parser.rb#7016 + def _trans_targs; end + + # source://mail//lib/mail/parsers/received_parser.rb#7016 + def _trans_targs=(_arg0); end + end +end + +# source://mail//lib/mail/parsers/received_parser.rb#13 +class Mail::Parsers::ReceivedParser::ReceivedStruct < ::Struct + def date; end + def date=(_); end + def error; end + def error=(_); end + def info; end + def info=(_); end + def time; end + def time=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://mail//lib/mail/part.rb#7 +class Mail::Part < ::Mail::Message + # Either returns the action if the message has just a single report, or an + # array of all the actions, one for each report + # + # source://mail//lib/mail/part.rb#65 + def action; end + + # Creates a new empty Content-ID field and inserts it in the correct order + # into the Header. The ContentIdField object will automatically generate + # a unique content ID if you try and encode it or output it to_s without + # specifying a content id. + # + # It will preserve the content ID you specify if you do. + # + # source://mail//lib/mail/part.rb#14 + def add_content_id(content_id_val = T.unsafe(nil)); end + + # source://mail//lib/mail/part.rb#37 + def add_required_fields; end + + # source://mail//lib/mail/part.rb#42 + def add_required_message_fields; end + + # @return [Boolean] + # + # source://mail//lib/mail/part.rb#54 + def bounced?; end + + # source://mail//lib/mail/part.rb#24 + def cid; end + + # source://mail//lib/mail/part.rb#50 + def delivery_status_data; end + + # @return [Boolean] + # + # source://mail//lib/mail/part.rb#46 + def delivery_status_report_part?; end + + # source://mail//lib/mail/part.rb#77 + def diagnostic_code; end + + # source://mail//lib/mail/part.rb#73 + def error_status; end + + # source://mail//lib/mail/part.rb#69 + def final_recipient; end + + # Returns true if the part has a content ID field, the field may or may + # not have a value, but the field exists or not. + # + # @return [Boolean] + # + # source://mail//lib/mail/part.rb#20 + def has_content_id?; end + + # @return [Boolean] + # + # source://mail//lib/mail/part.rb#33 + def inline?; end + + # source://mail//lib/mail/part.rb#81 + def remote_mta; end + + # @return [Boolean] + # + # source://mail//lib/mail/part.rb#85 + def retryable?; end + + # source://mail//lib/mail/part.rb#29 + def url; end + + private + + # source://mail//lib/mail/part.rb#91 + def get_return_values(key); end + + # source://mail//lib/mail/part.rb#113 + def parse_delivery_status_report; end + + # A part may not have a header.... so, just init a body if no header + # + # source://mail//lib/mail/part.rb#102 + def parse_message; end +end + +# source://mail//lib/mail/parts_list.rb#5 +class Mail::PartsList + # @return [PartsList] a new instance of PartsList + # + # source://mail//lib/mail/parts_list.rb#8 + def initialize(*args); end + + # source://mail//lib/mail/parts_list.rb#24 + def attachments; end + + # source://mail//lib/mail/parts_list.rb#28 + def collect; end + + # @raise [NoMethodError] + # + # source://mail//lib/mail/parts_list.rb#43 + def collect!; end + + # source://mail//lib/mail/parts_list.rb#98 + def delete_attachments; end + + # The #encode_with and #to_yaml methods are just implemented + # for the sake of backward compatibility ; the delegator does + # not correctly delegate these calls to the delegated object + # + # source://mail//lib/mail/parts_list.rb#16 + def encode_with(coder); end + + # source://mail//lib/mail/parts_list.rb#47 + def inspect_structure(parent_id = T.unsafe(nil)); end + + # source://mail//lib/mail/parts_list.rb#28 + def map; end + + # @raise [NoMethodError] + # + # source://mail//lib/mail/parts_list.rb#39 + def map!; end + + # Returns the value of attribute parts. + # + # source://mail//lib/mail/parts_list.rb#6 + def parts; end + + # source://mail//lib/mail/parts_list.rb#83 + def recursive_delete_if; end + + # source://mail//lib/mail/parts_list.rb#63 + def recursive_each(&block); end + + # source://mail//lib/mail/parts_list.rb#77 + def recursive_size; end + + # source://mail//lib/mail/parts_list.rb#104 + def sort; end + + # source://mail//lib/mail/parts_list.rb#108 + def sort!(order); end + + # source://mail//lib/mail/parts_list.rb#20 + def to_yaml(options = T.unsafe(nil)); end + + private + + # source://mail//lib/mail/parts_list.rb#123 + def get_order_value(part, order); end +end + +# source://mail//lib/mail/elements/phrase_list.rb#7 +class Mail::PhraseList + # @return [PhraseList] a new instance of PhraseList + # + # source://mail//lib/mail/elements/phrase_list.rb#10 + def initialize(string); end + + # Returns the value of attribute phrases. + # + # source://mail//lib/mail/elements/phrase_list.rb#8 + def phrases; end +end + +# source://mail//lib/mail/mail.rb#241 +Mail::RANDOM_TAG = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/elements/received_element.rb#8 +class Mail::ReceivedElement + # @return [ReceivedElement] a new instance of ReceivedElement + # + # source://mail//lib/mail/elements/received_element.rb#11 + def initialize(string); end + + # Returns the value of attribute date_time. + # + # source://mail//lib/mail/elements/received_element.rb#9 + def date_time; end + + # Returns the value of attribute info. + # + # source://mail//lib/mail/elements/received_element.rb#9 + def info; end + + # source://mail//lib/mail/elements/received_element.rb#22 + def to_s(*args); end + + private + + # source://mail//lib/mail/elements/received_element.rb#27 + def datetime_for(received); end +end + +# trace = [return] +# 1*received +# +# return = "Return-Path:" path CRLF +# +# path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) / +# obs-path +# +# received = "Received:" name-val-list ";" date-time CRLF +# +# name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)] +# +# name-val-pair = item-name CFWS item-value +# +# item-name = ALPHA *(["-"] (ALPHA / DIGIT)) +# +# item-value = 1*angle-addr / addr-spec / +# atom / domain / msg-id +# +# source://mail//lib/mail/fields/received_field.rb#24 +class Mail::ReceivedField < ::Mail::NamedStructuredField + # source://mail//lib/mail/fields/received_field.rb#31 + def date_time; end + + # source://mail//lib/mail/fields/received_field.rb#27 + def element; end + + # source://mail//lib/mail/fields/received_field.rb#39 + def formatted_date; end + + # source://mail//lib/mail/fields/received_field.rb#35 + def info; end + + private + + # source://mail//lib/mail/fields/received_field.rb#54 + def do_decode; end + + # source://mail//lib/mail/fields/received_field.rb#46 + def do_encode; end +end + +# source://mail//lib/mail/fields/received_field.rb#25 +Mail::ReceivedField::NAME = T.let(T.unsafe(nil), String) + +# = References Field +# +# The References field inherits references StructuredField and handles the References: header +# field in the email. +# +# Sending references to a mail message will instantiate a Mail::Field object that +# has a ReferencesField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Note that, the #message_ids method will return an array of message IDs without the +# enclosing angle brackets which per RFC are not syntactically part of the message id. +# +# Only one References field can appear in a header, though it can have multiple +# Message IDs. +# +# == Examples: +# +# mail = Mail.new +# mail.references = '' +# mail.references #=> '' +# mail[:references] #=> '# '# '# ['F6E2D0B4-CC35-4A91-BA4C-C7C712B10C13@test.me.dom'] +# +# source://mail//lib/mail/fields/references_field.rb#31 +class Mail::ReferencesField < ::Mail::CommonMessageIdField + # @return [ReferencesField] a new instance of ReferencesField + # + # source://mail//lib/mail/fields/references_field.rb#38 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/references_field.rb#34 + def singular?; end + end +end + +# source://mail//lib/mail/fields/references_field.rb#32 +Mail::ReferencesField::NAME = T.let(T.unsafe(nil), String) + +# = Reply-To Field +# +# The Reply-To field inherits reply-to StructuredField and handles the Reply-To: header +# field in the email. +# +# Sending reply_to to a mail message will instantiate a Mail::Field object that +# has a ReplyToField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Reply-To field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.reply_to = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.reply_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:reply_to] #=> '# '# '# 'Reply-To: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:reply_to].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:reply_to].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:reply_to].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/reply_to_field.rb#31 +class Mail::ReplyToField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/reply_to_field.rb#32 +Mail::ReplyToField::NAME = T.let(T.unsafe(nil), String) + +# = Resent-Bcc Field +# +# The Resent-Bcc field inherits resent-bcc StructuredField and handles the +# Resent-Bcc: header field in the email. +# +# Sending resent_bcc to a mail message will instantiate a Mail::Field object that +# has a ResentBccField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Resent-Bcc field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.resent_bcc = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_bcc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_bcc] #=> '# '# '# 'Resent-Bcc: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:resent_bcc].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:resent_bcc].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_bcc].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/resent_bcc_field.rb#31 +class Mail::ResentBccField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/resent_bcc_field.rb#32 +Mail::ResentBccField::NAME = T.let(T.unsafe(nil), String) + +# = Resent-Cc Field +# +# The Resent-Cc field inherits resent-cc StructuredField and handles the Resent-Cc: header +# field in the email. +# +# Sending resent_cc to a mail message will instantiate a Mail::Field object that +# has a ResentCcField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Resent-Cc field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.resent_cc = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_cc #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_cc] #=> '# '# '# 'Resent-Cc: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:resent_cc].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:resent_cc].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_cc].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/resent_cc_field.rb#31 +class Mail::ResentCcField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/resent_cc_field.rb#32 +Mail::ResentCcField::NAME = T.let(T.unsafe(nil), String) + +# resent-date = "Resent-Date:" date-time CRLF +# +# source://mail//lib/mail/fields/resent_date_field.rb#8 +class Mail::ResentDateField < ::Mail::CommonDateField; end + +# source://mail//lib/mail/fields/resent_date_field.rb#9 +Mail::ResentDateField::NAME = T.let(T.unsafe(nil), String) + +# = Resent-From Field +# +# The Resent-From field inherits resent-from StructuredField and handles the Resent-From: header +# field in the email. +# +# Sending resent_from to a mail message will instantiate a Mail::Field object that +# has a ResentFromField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Resent-From field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.resent_from = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_from #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_from] #=> '# '# '# 'Resent-From: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:resent_from].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:resent_from].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_from].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/resent_from_field.rb#31 +class Mail::ResentFromField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/resent_from_field.rb#32 +Mail::ResentFromField::NAME = T.let(T.unsafe(nil), String) + +# resent-msg-id = "Resent-Message-ID:" msg-id CRLF +# +# source://mail//lib/mail/fields/resent_message_id_field.rb#8 +class Mail::ResentMessageIdField < ::Mail::CommonMessageIdField; end + +# source://mail//lib/mail/fields/resent_message_id_field.rb#9 +Mail::ResentMessageIdField::NAME = T.let(T.unsafe(nil), String) + +# = Resent-Sender Field +# +# The Resent-Sender field inherits resent-sender StructuredField and handles the Resent-Sender: header +# field in the email. +# +# Sending resent_sender to a mail message will instantiate a Mail::Field object that +# has a ResentSenderField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Resent-Sender field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.resent_sender = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_sender #=> ['mikel@test.lindsaar.net'] +# mail[:resent_sender] #=> '# '# '# 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_sender.addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail.resent_sender.formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/resent_sender_field.rb#30 +class Mail::ResentSenderField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/resent_sender_field.rb#31 +Mail::ResentSenderField::NAME = T.let(T.unsafe(nil), String) + +# = Resent-To Field +# +# The Resent-To field inherits resent-to StructuredField and handles the Resent-To: header +# field in the email. +# +# Sending resent_to to a mail message will instantiate a Mail::Field object that +# has a ResentToField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Resent-To field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.resent_to = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.resent_to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_to] #=> '# '# '# 'Resent-To: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:resent_to].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:resent_to].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:resent_to].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/resent_to_field.rb#31 +class Mail::ResentToField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/resent_to_field.rb#32 +Mail::ResentToField::NAME = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/network/retriever_methods/base.rb#6 +class Mail::Retriever + # Get all emails. + # + # Possible options: + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # + # source://mail//lib/mail/network/retriever_methods/base.rb#39 + def all(options = T.unsafe(nil), &block); end + + # Find emails in the mailbox, and then deletes them. Without any options, the + # five last received emails are returned. + # + # Possible options: + # what: last or first emails. The default is :first. + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # count: number of emails to retrieve. The default value is 10. A value of 1 returns an + # instance of Message, not an array of Message instances. + # delete_after_find: flag for whether to delete each retreived email after find. Default + # is true. Call #find if you would like this to default to false. + # + # source://mail//lib/mail/network/retriever_methods/base.rb#56 + def find_and_delete(options = T.unsafe(nil), &block); end + + # Get the oldest received email(s) + # + # Possible options: + # count: number of emails to retrieve. The default value is 1. + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # + # source://mail//lib/mail/network/retriever_methods/base.rb#14 + def first(options = T.unsafe(nil), &block); end + + # Get the most recent received email(s) + # + # Possible options: + # count: number of emails to retrieve. The default value is 1. + # order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. + # + # source://mail//lib/mail/network/retriever_methods/base.rb#27 + def last(options = T.unsafe(nil), &block); end +end + +# 4.4.3. REPLY-TO / RESENT-REPLY-TO +# +# Note: The "Return-Path" field is added by the mail transport +# service, at the time of final deliver. It is intended +# to identify a path back to the orginator of the mes- +# sage. The "Reply-To" field is added by the message +# originator and is intended to direct replies. +# +# trace = [return] +# 1*received +# +# return = "Return-Path:" path CRLF +# +# path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) / +# obs-path +# +# received = "Received:" name-val-list ";" date-time CRLF +# +# name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)] +# +# name-val-pair = item-name CFWS item-value +# +# item-name = ALPHA *(["-"] (ALPHA / DIGIT)) +# +# item-value = 1*angle-addr / addr-spec / +# atom / domain / msg-id +# +# source://mail//lib/mail/fields/return_path_field.rb#33 +class Mail::ReturnPathField < ::Mail::CommonAddressField + # @return [ReturnPathField] a new instance of ReturnPathField + # + # source://mail//lib/mail/fields/return_path_field.rb#40 + def initialize(value = T.unsafe(nil), charset = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/return_path_field.rb#48 + def default; end + + private + + # source://mail//lib/mail/fields/return_path_field.rb#57 + def do_decode; end + + # source://mail//lib/mail/fields/return_path_field.rb#53 + def do_encode; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/return_path_field.rb#36 + def singular?; end + end +end + +# source://mail//lib/mail/fields/return_path_field.rb#34 +Mail::ReturnPathField::NAME = T.let(T.unsafe(nil), String) + +# == Sending Email with SMTP +# +# Mail allows you to send emails using SMTP. This is done by wrapping Net::SMTP in +# an easy to use manner. +# +# === Sending via SMTP server on Localhost +# +# Sending locally (to a postfix or sendmail server running on localhost) requires +# no special setup. Just to Mail.deliver &block or message.deliver! and it will +# be sent in this method. +# +# === Sending via MobileMe +# +# Mail.defaults do +# delivery_method :smtp, { :address => "smtp.me.com", +# :port => 587, +# :domain => 'your.host.name', +# :user_name => '', +# :password => '', +# :authentication => 'plain', +# :enable_starttls_auto => true } +# end +# +# === Sending via GMail +# +# Mail.defaults do +# delivery_method :smtp, { :address => "smtp.gmail.com", +# :port => 587, +# :domain => 'your.host.name', +# :user_name => '', +# :password => '', +# :authentication => 'plain', +# :enable_starttls_auto => true } +# end +# +# === Certificate verification +# +# When using TLS, some mail servers provide certificates that are self-signed +# or whose names do not exactly match the hostname given in the address. +# OpenSSL will reject these by default. The best remedy is to use the correct +# hostname or update the certificate authorities trusted by your ruby. If +# that isn't possible, you can control this behavior with +# an :openssl_verify_mode setting. Its value may be either an OpenSSL +# verify mode constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER), +# or a string containing the name of an OpenSSL verify mode (none, peer). +# +# === Others +# +# Feel free to send me other examples that were tricky +# +# === Delivering the email +# +# Once you have the settings right, sending the email is done by: +# +# Mail.deliver do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# Or by calling deliver on a Mail message +# +# mail = Mail.new do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# mail.deliver! +# +# source://mail//lib/mail/network/delivery_methods/smtp.rb#76 +class Mail::SMTP + # @return [SMTP] a new instance of SMTP + # + # source://mail//lib/mail/network/delivery_methods/smtp.rb#95 + def initialize(values); end + + # source://mail//lib/mail/network/delivery_methods/smtp.rb#99 + def deliver!(mail); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/smtp.rb#77 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/delivery_methods/smtp.rb#77 + def settings=(_arg0); end + + private + + # source://mail//lib/mail/network/delivery_methods/smtp.rb#112 + def build_smtp_session; end + + # Allow SSL context to be configured via settings, for Ruby >= 1.9 + # Just returns openssl verify mode for Ruby 1.8.x + # + # source://mail//lib/mail/network/delivery_methods/smtp.rb#151 + def ssl_context; end + + # source://mail//lib/mail/network/delivery_methods/smtp.rb#108 + def start_smtp_session(&block); end +end + +# source://mail//lib/mail/network/delivery_methods/smtp.rb#79 +Mail::SMTP::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# == Sending Email with SMTP +# +# Mail allows you to send emails using an open SMTP connection. This is done by +# passing a created Net::SMTP object. This way we can get better performance to +# our local mail server by reducing the number of connections at any one time. +# +# === Sending via SMTP server on Localhost +# +# To send mail open a connection with Net::Smtp using any options you like +# === Delivering the email +# +# Once you have the settings right, sending the email is done by: +# +# smtp_conn = Net::SMTP.start(settings[:address], settings[:port]) +# Mail.defaults do +# delivery_method :smtp_connection, { :connection => smtp_conn } +# end +# +# Mail.deliver do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# Or by calling deliver on a Mail message +# +# mail = Mail.new do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# mail.deliver! +# +# source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#40 +class Mail::SMTPConnection + # @raise [ArgumentError] + # @return [SMTPConnection] a new instance of SMTPConnection + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#43 + def initialize(values); end + + # Send the message via SMTP. + # The from and to attributes are optional. If not set, they are retrieve from the Message. + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#51 + def deliver!(mail); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#41 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#41 + def settings=(_arg0); end + + # Returns the value of attribute smtp. + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#41 + def smtp; end + + # Sets the attribute smtp + # + # @param value the value to set the attribute smtp to. + # + # source://mail//lib/mail/network/delivery_methods/smtp_connection.rb#41 + def smtp=(_arg0); end +end + +# = Sender Field +# +# The Sender field inherits sender StructuredField and handles the Sender: header +# field in the email. +# +# Sending sender to a mail message will instantiate a Mail::Field object that +# has a SenderField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one Sender field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.sender = 'Mikel Lindsaar ' +# mail.sender #=> 'mikel@test.lindsaar.net' +# mail[:sender] #=> '# '# '# "Sender: Mikel Lindsaar \r\n" +# mail[:sender].decoded #=> 'Mikel Lindsaar ' +# mail[:sender].addresses #=> ['mikel@test.lindsaar.net'] +# mail[:sender].formatted #=> ['Mikel Lindsaar '] +# +# source://mail//lib/mail/fields/sender_field.rb#31 +class Mail::SenderField < ::Mail::CommonAddressField + # source://mail//lib/mail/fields/sender_field.rb#42 + def addresses; end + + # source://mail//lib/mail/fields/sender_field.rb#38 + def default; end + + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/sender_field.rb#34 + def singular?; end + end +end + +# source://mail//lib/mail/fields/sender_field.rb#32 +Mail::SenderField::NAME = T.let(T.unsafe(nil), String) + +# A delivery method implementation which sends via sendmail. +# +# To use this, first find out where the sendmail binary is on your computer, +# if you are on a mac or unix box, it is usually in /usr/sbin/sendmail, this will +# be your sendmail location. +# +# Mail.defaults do +# delivery_method :sendmail +# end +# +# Or if your sendmail binary is not at '/usr/sbin/sendmail' +# +# Mail.defaults do +# delivery_method :sendmail, :location => '/absolute/path/to/your/sendmail' +# end +# +# Then just deliver the email as normal: +# +# Mail.deliver do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# Or by calling deliver on a Mail message +# +# mail = Mail.new do +# to 'mikel@test.lindsaar.net' +# from 'ada@test.lindsaar.net' +# subject 'testing sendmail' +# body 'testing sendmail' +# end +# +# mail.deliver! +# +# source://mail//lib/mail/network/delivery_methods/sendmail.rb#40 +class Mail::Sendmail + # @return [Sendmail] a new instance of Sendmail + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#51 + def initialize(values); end + + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#64 + def deliver!(mail); end + + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#60 + def destinations_for(envelope); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#46 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#46 + def settings=(_arg0); end + + private + + # - support for delivery using string arguments + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#129 + def deprecation_warn; end + + # + support for delivery using string arguments (deprecated) + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#97 + def old_deliver(envelope); end + + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#88 + def popen(command, &block); end + + # The following is an adaptation of ruby 1.9.2's shellwords.rb file, + # with the following modifications: + # + # - Wraps in double quotes + # - Allows '+' to accept email addresses with them + # - Allows '~' as it is not unescaped in double quotes + # + # source://mail//lib/mail/network/delivery_methods/sendmail.rb#118 + def shellquote(address); end +end + +# source://mail//lib/mail/network/delivery_methods/sendmail.rb#41 +Mail::Sendmail::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://mail//lib/mail/network/delivery_methods/sendmail.rb#48 +class Mail::Sendmail::DeliveryError < ::StandardError; end + +# source://mail//lib/mail/smtp_envelope.rb#4 +class Mail::SmtpEnvelope + # @return [SmtpEnvelope] a new instance of SmtpEnvelope + # + # source://mail//lib/mail/smtp_envelope.rb#11 + def initialize(mail); end + + # Returns the value of attribute from. + # + # source://mail//lib/mail/smtp_envelope.rb#9 + def from; end + + # source://mail//lib/mail/smtp_envelope.rb#17 + def from=(addr); end + + # Returns the value of attribute message. + # + # source://mail//lib/mail/smtp_envelope.rb#9 + def message; end + + # source://mail//lib/mail/smtp_envelope.rb#35 + def message=(message); end + + # Returns the value of attribute to. + # + # source://mail//lib/mail/smtp_envelope.rb#9 + def to; end + + # source://mail//lib/mail/smtp_envelope.rb#25 + def to=(addr); end + + private + + # source://mail//lib/mail/smtp_envelope.rb#45 + def validate_addr(addr_name, addr); end +end + +# Reasonable cap on address length to avoid SMTP line length +# overflow on old SMTP servers. +# +# source://mail//lib/mail/smtp_envelope.rb#7 +Mail::SmtpEnvelope::MAX_ADDRESS_BYTESIZE = T.let(T.unsafe(nil), Integer) + +# Provides access to a structured header field +# +# ===Per RFC 2822: +# 2.2.2. Structured Header Field Bodies +# +# Some field bodies in this standard have specific syntactical +# structure more restrictive than the unstructured field bodies +# described above. These are referred to as "structured" field bodies. +# Structured field bodies are sequences of specific lexical tokens as +# described in sections 3 and 4 of this standard. Many of these tokens +# are allowed (according to their syntax) to be introduced or end with +# comments (as described in section 3.2.3) as well as the space (SP, +# ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters +# (together known as the white space characters, WSP), and those WSP +# characters are subject to header "folding" and "unfolding" as +# described in section 2.2.3. Semantic analysis of structured field +# bodies is given along with their syntax. +# +# source://mail//lib/mail/fields/structured_field.rb#23 +class Mail::StructuredField < ::Mail::CommonField; end + +# subject = "Subject:" unstructured CRLF +# +# source://mail//lib/mail/fields/subject_field.rb#8 +class Mail::SubjectField < ::Mail::NamedUnstructuredField + class << self + # @return [Boolean] + # + # source://mail//lib/mail/fields/subject_field.rb#11 + def singular?; end + end +end + +# source://mail//lib/mail/fields/subject_field.rb#9 +Mail::SubjectField::NAME = T.let(T.unsafe(nil), String) + +# The TestMailer is a bare bones mailer that does nothing. It is useful +# when you are testing. +# +# It also provides a template of the minimum methods you require to implement +# if you want to make a custom mailer for Mail +# +# source://mail//lib/mail/network/delivery_methods/test_mailer.rb#10 +class Mail::TestMailer + # @return [TestMailer] a new instance of TestMailer + # + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#33 + def initialize(values); end + + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#37 + def deliver!(mail); end + + # Returns the value of attribute settings. + # + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#31 + def settings; end + + # Sets the attribute settings + # + # @param value the value to set the attribute settings to. + # + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#31 + def settings=(_arg0); end + + class << self + # Provides a store of all the emails sent with the TestMailer so you can check them. + # + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#12 + def deliveries; end + + # Allows you to over write the default deliveries store from an array to some + # other object. If you just want to clear the store, + # call TestMailer.deliveries.clear. + # + # If you place another object here, please make sure it responds to: + # + # * << (message) + # * clear + # * length + # * size + # * and other common Array methods + # + # source://mail//lib/mail/network/delivery_methods/test_mailer.rb#27 + def deliveries=(val); end + end +end + +# source://mail//lib/mail/network/retriever_methods/test_retriever.rb#6 +class Mail::TestRetriever < ::Mail::Retriever + # @return [TestRetriever] a new instance of TestRetriever + # + # source://mail//lib/mail/network/retriever_methods/test_retriever.rb#16 + def initialize(values); end + + # source://mail//lib/mail/network/retriever_methods/test_retriever.rb#20 + def find(options = T.unsafe(nil), &block); end + + class << self + # source://mail//lib/mail/network/retriever_methods/test_retriever.rb#8 + def emails; end + + # source://mail//lib/mail/network/retriever_methods/test_retriever.rb#12 + def emails=(val); end + end +end + +# = To Field +# +# The To field inherits to StructuredField and handles the To: header +# field in the email. +# +# Sending to to a mail message will instantiate a Mail::Field object that +# has a ToField as its field type. This includes all Mail::CommonAddress +# module instance metods. +# +# Only one To field can appear in a header, though it can have multiple +# addresses and groups of addresses. +# +# == Examples: +# +# mail = Mail.new +# mail.to = 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail.to #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:to] #=> '# '# '# 'To: Mikel Lindsaar , ada@test.lindsaar.net\r\n' +# mail[:to].decoded #=> 'Mikel Lindsaar , ada@test.lindsaar.net' +# mail[:to].addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net'] +# mail[:to].formatted #=> ['Mikel Lindsaar ', 'ada@test.lindsaar.net'] +# +# source://mail//lib/mail/fields/to_field.rb#31 +class Mail::ToField < ::Mail::CommonAddressField; end + +# source://mail//lib/mail/fields/to_field.rb#32 +Mail::ToField::NAME = T.let(T.unsafe(nil), String) + +# Raised when attempting to decode an unknown encoding type +# +# source://mail//lib/mail/encodings.rb#6 +class Mail::UnknownEncodingType < ::StandardError; end + +# Provides access to an unstructured header field +# +# ===Per RFC 2822: +# 2.2.1. Unstructured Header Field Bodies +# +# Some field bodies in this standard are defined simply as +# "unstructured" (which is specified below as any US-ASCII characters, +# except for CR and LF) with no further restrictions. These are +# referred to as unstructured field bodies. Semantically, unstructured +# field bodies are simply to be treated as a single line of characters +# with no further processing (except for header "folding" and +# "unfolding" as described in section 2.2.3). +# +# source://mail//lib/mail/fields/unstructured_field.rb#19 +class Mail::UnstructuredField < ::Mail::CommonField + # @return [UnstructuredField] a new instance of UnstructuredField + # + # source://mail//lib/mail/fields/unstructured_field.rb#20 + def initialize(name, value, charset = T.unsafe(nil)); end + + # An unstructured field does not parse + # + # source://mail//lib/mail/fields/unstructured_field.rb#40 + def parse; end + + private + + # source://mail//lib/mail/fields/unstructured_field.rb#54 + def do_decode; end + + # source://mail//lib/mail/fields/unstructured_field.rb#46 + def do_encode; end + + # source://mail//lib/mail/fields/unstructured_field.rb#169 + def encode(value); end + + # source://mail//lib/mail/fields/unstructured_field.rb#180 + def encode_crlf(value); end + + # source://mail//lib/mail/fields/unstructured_field.rb#102 + def fold(prepend = T.unsafe(nil)); end + + # source://mail//lib/mail/fields/unstructured_field.rb#186 + def normalized_encoding; end + + # 6.2. Display of 'encoded-word's + # + # When displaying a particular header field that contains multiple + # 'encoded-word's, any 'linear-white-space' that separates a pair of + # adjacent 'encoded-word's is ignored. (This is to allow the use of + # multiple 'encoded-word's to represent long strings of unencoded text, + # without having to separate 'encoded-word's where spaces occur in the + # unencoded text.) + # + # source://mail//lib/mail/fields/unstructured_field.rb#96 + def wrap_lines(name, folded_lines); end + + # 2.2.3. Long Header Fields + # + # Each header field is logically a single line of characters comprising + # the field name, the colon, and the field body. For convenience + # however, and to deal with the 998/78 character limitations per line, + # the field body portion of a header field can be split into a multiple + # line representation; this is called "folding". The general rule is + # that wherever this standard allows for folding white space (not + # simply WSP characters), a CRLF may be inserted before any WSP. For + # example, the header field: + # + # Subject: This is a test + # + # can be represented as: + # + # Subject: This + # is a test + # + # Note: Though structured field bodies are defined in such a way that + # folding can take place between many of the lexical tokens (and even + # within some of the lexical tokens), folding SHOULD be limited to + # placing the CRLF at higher-level syntactic breaks. For instance, if + # a field body is defined as comma-separated values, it is recommended + # that folding occur after the comma separating the structured items in + # preference to other places where the field could be folded, even if + # it is allowed elsewhere. + # + # source://mail//lib/mail/fields/unstructured_field.rb#84 + def wrapped_value; end +end + +# source://mail//lib/mail/utilities.rb#7 +module Mail::Utilities + extend ::Mail::Utilities + + # Returns true if the string supplied is free from characters not allowed as an ATOM + # + # @return [Boolean] + # + # source://mail//lib/mail/utilities.rb#11 + def atom_safe?(str); end + + # Returns true if the object is considered blank. + # A blank includes things like '', ' ', nil, + # and arrays and hashes that have nothing in them. + # + # This logic is mostly shared with ActiveSupport's blank? + # + # @return [Boolean] + # + # source://mail//lib/mail/utilities.rb#283 + def blank?(value); end + + # Wraps a string in angle brackets and escapes any that are in the string itself + # + # Example: + # + # bracket( 'This is a string' ) #=> '' + # + # source://mail//lib/mail/utilities.rb#131 + def bracket(str); end + + # Capitalizes a string that is joined by hyphens correctly. + # + # Example: + # + # string = 'resent-from-field' + # capitalize_field( string ) #=> 'Resent-From-Field' + # + # source://mail//lib/mail/utilities.rb#188 + def capitalize_field(str); end + + # Takes an underscored word and turns it into a class name + # + # Example: + # + # constantize("hello") #=> "Hello" + # constantize("hello-there") #=> "HelloThere" + # constantize("hello-there-mate") #=> "HelloThereMate" + # + # source://mail//lib/mail/utilities.rb#199 + def constantize(str); end + + # Swaps out all underscores (_) for hyphens (-) good for stringing from symbols + # a field name. + # + # Example: + # + # string = :resent_from_field + # dasherize( string ) #=> 'resent-from-field' + # + # source://mail//lib/mail/utilities.rb#210 + def dasherize(str); end + + # Wraps supplied string in double quotes and applies \-escaping as necessary, + # unless it is already wrapped. + # + # Example: + # + # string = 'This is a string' + # dquote(string) #=> '"This is a string"' + # + # string = 'This is "a string"' + # dquote(string #=> '"This is \"a string\"' + # + # source://mail//lib/mail/utilities.rb#68 + def dquote(str); end + + # Escape parenthesies in a string + # + # Example: + # + # str = 'This is (a) string' + # escape_paren( str ) #=> 'This is \(a\) string' + # + # source://mail//lib/mail/utilities.rb#155 + def escape_paren(str); end + + # source://mail//lib/mail/utilities.rb#293 + def generate_message_id; end + + # source://mail//lib/mail/utilities.rb#225 + def map_lines(str, &block); end + + # source://mail//lib/mail/utilities.rb#229 + def map_with_index(enum, &block); end + + # Matches two objects with their to_s values case insensitively + # + # Example: + # + # obj2 = "This_is_An_object" + # obj1 = :this_IS_an_object + # match_to_s( obj1, obj2 ) #=> true + # + # source://mail//lib/mail/utilities.rb#178 + def match_to_s(obj1, obj2); end + + # Wraps a string in parenthesis and escapes any that are in the string itself. + # + # Example: + # + # paren( 'This is a string' ) #=> '(This is a string)' + # + # source://mail//lib/mail/utilities.rb#108 + def paren(str); end + + # If the string supplied has ATOM unsafe characters in it, will return the string quoted + # in double quotes, otherwise returns the string unmodified + # + # source://mail//lib/mail/utilities.rb#17 + def quote_atom(str); end + + # If the string supplied has PHRASE unsafe characters in it, will return the string quoted + # in double quotes, otherwise returns the string unmodified + # + # source://mail//lib/mail/utilities.rb#23 + def quote_phrase(str); end + + # If the string supplied has TOKEN unsafe characters in it, will return the string quoted + # in double quotes, otherwise returns the string unmodified + # + # source://mail//lib/mail/utilities.rb#44 + def quote_token(str); end + + # Returns true if the string supplied is free from characters not allowed as a TOKEN + # + # @return [Boolean] + # + # source://mail//lib/mail/utilities.rb#38 + def token_safe?(str); end + + # Unwraps a string from being wrapped in parenthesis + # + # Example: + # + # str = '' + # unbracket( str ) #=> 'This is a string' + # + # source://mail//lib/mail/utilities.rb#141 + def unbracket(str); end + + # Swaps out all hyphens (-) for underscores (_) good for stringing to symbols + # a field name. + # + # Example: + # + # string = :resent_from_field + # underscoreize ( string ) #=> 'resent_from_field' + # + # source://mail//lib/mail/utilities.rb#221 + def underscoreize(str); end + + # Removes any \-escaping. + # + # Example: + # + # string = 'This is \"a string\"' + # unescape(string) #=> 'This is "a string"' + # + # string = '"This is \"a string\""' + # unescape(string) #=> '"This is "a string""' + # + # source://mail//lib/mail/utilities.rb#99 + def unescape(str); end + + # Unwraps a string from being wrapped in parenthesis + # + # Example: + # + # str = '(This is a string)' + # unparen( str ) #=> 'This is a string' + # + # source://mail//lib/mail/utilities.rb#118 + def unparen(str); end + + # Unwraps supplied string from inside double quotes and + # removes any \-escaping. + # + # Example: + # + # string = '"This is a string"' + # unquote(string) #=> 'This is a string' + # + # string = '"This is \"a string\""' + # unqoute(string) #=> 'This is "a string"' + # + # source://mail//lib/mail/utilities.rb#82 + def unquote(str); end + + # source://mail//lib/mail/utilities.rb#159 + def uri_escape(str); end + + # source://mail//lib/mail/utilities.rb#167 + def uri_parser; end + + # source://mail//lib/mail/utilities.rb#163 + def uri_unescape(str); end + + class << self + # source://mail//lib/mail/utilities.rb#414 + def b_value_decode(str); end + + # source://mail//lib/mail/utilities.rb#409 + def b_value_encode(str, encoding = T.unsafe(nil)); end + + # source://mail//lib/mail/utilities.rb#243 + def binary_unsafe_to_crlf(string); end + + # source://mail//lib/mail/utilities.rb#233 + def binary_unsafe_to_lf(string); end + + # source://mail//lib/mail/utilities.rb#356 + def bracket(str); end + + # Returns the value of attribute charset_encoder. + # + # source://mail//lib/mail/utilities.rb#334 + def charset_encoder; end + + # Sets the attribute charset_encoder + # + # @param value the value to set the attribute charset_encoder to. + # + # source://mail//lib/mail/utilities.rb#334 + def charset_encoder=(_arg0); end + + # source://mail//lib/mail/utilities.rb#362 + def decode_base64(str); end + + # source://mail//lib/mail/utilities.rb#399 + def decode_utf7(utf7); end + + # source://mail//lib/mail/utilities.rb#369 + def encode_base64(str); end + + # From Ruby stdlib Net::IMAP + # + # source://mail//lib/mail/utilities.rb#388 + def encode_utf7(string); end + + # source://mail//lib/mail/utilities.rb#351 + def escape_bracket(str); end + + # Escapes any parenthesis in a string that are unescaped this uses + # a Ruby 1.9.1 regexp feature of negative look behind + # + # source://mail//lib/mail/utilities.rb#340 + def escape_paren(str); end + + # source://mail//lib/mail/utilities.rb#377 + def get_constant(klass, string); end + + # @return [Boolean] + # + # source://mail//lib/mail/utilities.rb#373 + def has_constant?(klass, string); end + + # source://mail//lib/mail/utilities.rb#451 + def param_decode(str, encoding); end + + # source://mail//lib/mail/utilities.rb#460 + def param_encode(str); end + + # source://mail//lib/mail/utilities.rb#345 + def paren(str); end + + # Pick a Ruby encoding corresponding to the message charset. Most + # charsets have a Ruby encoding, but some need manual aliasing here. + # + # TODO: add this as a test somewhere: + # Encoding.list.map { |e| [e.to_s.upcase == pick_encoding(e.to_s.downcase.gsub("-", "")), e.to_s] }.select {|a,b| !b} + # Encoding.list.map { |e| [e.to_s == pick_encoding(e.to_s), e.to_s] }.select {|a,b| !b} + # + # source://mail//lib/mail/utilities.rb#476 + def pick_encoding(charset); end + + # source://mail//lib/mail/utilities.rb#432 + def q_value_decode(str); end + + # source://mail//lib/mail/utilities.rb#427 + def q_value_encode(str, encoding = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://mail//lib/mail/utilities.rb#247 + def safe_for_line_ending_conversion?(string); end + + # source://mail//lib/mail/utilities.rb#536 + def string_byteslice(str, *args); end + + # Convert line endings to \r\n unless the string is binary. Used for + # encoding 8bit and base64 Content-Transfer-Encoding and for convenience + # when parsing emails with \n line endings instead of the required \r\n. + # + # source://mail//lib/mail/utilities.rb#269 + def to_crlf(string); end + + # Convert line endings to \n unless the string is binary. Used for + # sendmail delivery and for decoding 8bit Content-Transfer-Encoding. + # + # source://mail//lib/mail/utilities.rb#257 + def to_lf(string); end + + # source://mail//lib/mail/utilities.rb#381 + def transcode_charset(str, from_encoding, to_encoding = T.unsafe(nil)); end + + # source://mail//lib/mail/utilities.rb#466 + def uri_parser; end + + private + + # source://mail//lib/mail/utilities.rb#543 + def convert_to_encoding(encoding); end + + # source://mail//lib/mail/utilities.rb#556 + def transcode_to_scrubbed_utf8(str); end + end +end + +# source://mail//lib/mail/utilities.rb#308 +class Mail::Utilities::BestEffortCharsetEncoder + # source://mail//lib/mail/utilities.rb#309 + def encode(string, charset); end + + private + + # source://mail//lib/mail/utilities.rb#320 + def pick_encoding(charset); end +end + +# source://mail//lib/mail/utilities.rb#297 +class Mail::Utilities::StrictCharsetEncoder + # source://mail//lib/mail/utilities.rb#298 + def encode(string, charset); end +end + +# source://mail//lib/mail/utilities.rb#237 +Mail::Utilities::TO_CRLF_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://mail//lib/mail/version.rb#3 +module Mail::VERSION + class << self + # source://mail//lib/mail/version.rb#12 + def version; end + end +end + +# source://mail//lib/mail/version.rb#8 +Mail::VERSION::BUILD = T.let(T.unsafe(nil), T.untyped) + +# source://mail//lib/mail/version.rb#5 +Mail::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/version.rb#6 +Mail::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/version.rb#7 +Mail::VERSION::PATCH = T.let(T.unsafe(nil), Integer) + +# source://mail//lib/mail/version.rb#10 +Mail::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://mail//lib/mail/yaml.rb#4 +module Mail::YAML + class << self + # source://mail//lib/mail/yaml.rb#5 + def load(yaml); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/marcel@1.0.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/marcel@1.0.4.rbi new file mode 100644 index 0000000..861f2c1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/marcel@1.0.4.rbi @@ -0,0 +1,239 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `marcel` gem. +# Please instead update this file by running `bin/tapioca gem marcel`. + + +# This file is auto-generated. Instead of editing this file, please +# add MIMEs to data/custom.xml or lib/marcel/mime_type/definitions.rb. +# +# source://marcel//lib/marcel.rb#3 +module Marcel; end + +# @private +# +# source://marcel//lib/marcel/tables.rb#9 +Marcel::EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://marcel//lib/marcel/tables.rb#2394 +Marcel::MAGIC = T.let(T.unsafe(nil), Array) + +# Mime type detection +# +# source://marcel//lib/marcel/magic.rb#12 +class Marcel::Magic + # Mime type by type string + # + # @return [Magic] a new instance of Magic + # + # source://marcel//lib/marcel/magic.rb#16 + def initialize(type); end + + # Allow comparison with string + # + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#103 + def ==(other); end + + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#54 + def audio?; end + + # Returns true if type is child of parent type + # + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#58 + def child_of?(parent); end + + # Get mime comment + # + # source://marcel//lib/marcel/magic.rb#68 + def comment; end + + # Allow comparison with string + # + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#103 + def eql?(other); end + + # Get string list of file extensions + # + # source://marcel//lib/marcel/magic.rb#63 + def extensions; end + + # source://marcel//lib/marcel/magic.rb#107 + def hash; end + + # Mediatype shortcuts + # + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#53 + def image?; end + + # Returns the value of attribute mediatype. + # + # source://marcel//lib/marcel/magic.rb#13 + def mediatype; end + + # Returns the value of attribute subtype. + # + # source://marcel//lib/marcel/magic.rb#13 + def subtype; end + + # Returns true if type is a text format + # + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#50 + def text?; end + + # Return type as string + # + # source://marcel//lib/marcel/magic.rb#98 + def to_s; end + + # Returns the value of attribute type. + # + # source://marcel//lib/marcel/magic.rb#13 + def type; end + + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#55 + def video?; end + + class << self + # Add custom mime type. Arguments: + # * type: Mime type + # * options: Options hash + # + # Option keys: + # * :extensions: String list or single string of file extensions + # * :parents: String list or single string of parent mime types + # * :magic: Mime magic specification + # * :comment: Comment string + # + # source://marcel//lib/marcel/magic.rb#30 + def add(type, options); end + + # Lookup all mime types by magic content analysis. + # This is a slower operation. + # + # source://marcel//lib/marcel/magic.rb#93 + def all_by_magic(io); end + + # Lookup mime type by file extension + # + # source://marcel//lib/marcel/magic.rb#73 + def by_extension(ext); end + + # Lookup mime type by magic content analysis. + # This is a slow operation. + # + # source://marcel//lib/marcel/magic.rb#86 + def by_magic(io); end + + # Lookup mime type by filename + # + # source://marcel//lib/marcel/magic.rb#80 + def by_path(path); end + + # @return [Boolean] + # + # source://marcel//lib/marcel/magic.rb#113 + def child?(child, parent); end + + # Removes a mime type from the dictionary. You might want to do this if + # you're seeing impossible conflicts (for instance, application/x-gmc-link). + # * type: The mime type to remove. All associated extensions and magic are removed too. + # + # source://marcel//lib/marcel/magic.rb#42 + def remove(type); end + + private + + # source://marcel//lib/marcel/magic.rb#117 + def magic_match(io, method); end + + # source://marcel//lib/marcel/magic.rb#127 + def magic_match_io(io, matches, buffer); end + end +end + +# source://marcel//lib/marcel/mime_type.rb#4 +class Marcel::MimeType + class << self + # source://marcel//lib/marcel/mime_type.rb#8 + def extend(type, extensions: T.unsafe(nil), parents: T.unsafe(nil), magic: T.unsafe(nil)); end + + # Returns the most appropriate content type for the given file. + # + # The first argument should be a +Pathname+ or an +IO+. If it is a +Pathname+, the specified + # file will be opened first. + # + # Optional parameters: + # * +name+: file name, if known + # * +extension+: file extension, if known + # * +declared_type+: MIME type, if known + # + # The most appropriate type is determined by the following: + # * type declared by binary magic number data + # * type declared by the first of file name, file extension, or declared MIME type + # + # If no type can be determined, then +application/octet-stream+ is returned. + # + # source://marcel//lib/marcel/mime_type.rb#29 + def for(pathname_or_io = T.unsafe(nil), name: T.unsafe(nil), extension: T.unsafe(nil), declared_type: T.unsafe(nil)); end + + private + + # source://marcel//lib/marcel/mime_type.rb#36 + def for_data(pathname_or_io); end + + # source://marcel//lib/marcel/mime_type.rb#62 + def for_declared_type(declared_type); end + + # source://marcel//lib/marcel/mime_type.rb#54 + def for_extension(extension); end + + # source://marcel//lib/marcel/mime_type.rb#46 + def for_name(name); end + + # For some document types (notably Microsoft Office) we recognise the main content + # type with magic, but not the specific subclass. In this situation, if we can get a more + # specific class using either the name or declared_type, we should use that in preference + # + # source://marcel//lib/marcel/mime_type.rb#89 + def most_specific_type(*candidates); end + + # source://marcel//lib/marcel/mime_type.rb#79 + def parse_media_type(content_type); end + + # source://marcel//lib/marcel/mime_type.rb#71 + def with_io(pathname_or_io, &block); end + end +end + +# source://marcel//lib/marcel/mime_type.rb#5 +Marcel::MimeType::BINARY = T.let(T.unsafe(nil), String) + +# @private +# +# source://marcel//lib/marcel/tables.rb#1260 +Marcel::TYPE_EXTS = T.let(T.unsafe(nil), Hash) + +# Cooltalk Audio +# +# source://marcel//lib/marcel/tables.rb#2151 +Marcel::TYPE_PARENTS = T.let(T.unsafe(nil), Hash) + +# source://marcel//lib/marcel/version.rb#4 +Marcel::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/method_source@1.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/method_source@1.1.0.rbi new file mode 100644 index 0000000..2f1a741 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/method_source@1.1.0.rbi @@ -0,0 +1,304 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `method_source` gem. +# Please instead update this file by running `bin/tapioca gem method_source`. + + +# source://method_source//lib/method_source.rb#163 +class Method + include ::MethodSource::SourceLocation::MethodExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source/version.rb#1 +module MethodSource + extend ::MethodSource::CodeHelpers + + class << self + # Clear cache. + # + # source://method_source//lib/method_source.rb#59 + def clear_cache; end + + # Helper method responsible for opening source file and buffering up + # the comments for a specified method. Defined here to avoid polluting + # `Method` class. + # + # @param source_location [Array] The array returned by Method#source_location + # @param method_name [String] + # @raise [SourceNotFoundError] + # @return [String] The comments up to the point of the method. + # + # source://method_source//lib/method_source.rb#38 + def comment_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#expression_at + # + # source://method_source//lib/method_source.rb#71 + def extract_code(source_location); end + + # Load a memoized copy of the lines in a file. + # + # @param file_name [String] + # @param method_name [String] + # @raise [SourceNotFoundError] + # @return [Array] the contents of the file + # + # source://method_source//lib/method_source.rb#51 + def lines_for(file_name, name = T.unsafe(nil)); end + + # Helper method responsible for extracting method body. + # Defined here to avoid polluting `Method` class. + # + # @param source_location [Array] The array returned by Method#source_location + # @param method_name [String] + # @return [String] The method body + # + # source://method_source//lib/method_source.rb#23 + def source_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#complete_expression? + # @return [Boolean] + # + # source://method_source//lib/method_source.rb#64 + def valid_expression?(str); end + end +end + +# source://method_source//lib/method_source/code_helpers.rb#3 +module MethodSource::CodeHelpers + # Retrieve the comment describing the expression on the given line of the given file. + # + # This is useful to get module or method documentation. + # + # @param file [Array, File, String] The file to parse, either as a File or as + # a String or an Array of lines. + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is line 1! + # @return [String] The comment + # + # source://method_source//lib/method_source/code_helpers.rb#52 + def comment_describing(file, line_number); end + + # Determine if a string of code is a complete Ruby expression. + # + # @example + # complete_expression?("class Hello") #=> false + # complete_expression?("class Hello; end") #=> true + # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER + # @param code [String] The code to validate. + # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. + # @return [Boolean] Whether or not the code is a complete Ruby expression. + # + # source://method_source//lib/method_source/code_helpers.rb#66 + def complete_expression?(str); end + + # Retrieve the first expression starting on the given line of the given file. + # + # This is useful to get module or method source code. + # + # line 1! + # + # @option options + # @option options + # @param file [Array, File, String] The file to parse, either as a File or as + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is + # @param options [Hash] The optional configuration parameters. + # @raise [SyntaxError] If the first complete expression can't be identified + # @return [String] The first complete expression + # + # source://method_source//lib/method_source/code_helpers.rb#20 + def expression_at(file, line_number, options = T.unsafe(nil)); end + + private + + # Get the first expression from the input. + # + # @param lines [Array] + # @param consume [Integer] A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @raise [SyntaxError] + # @return [String] a valid ruby expression + # @yield a clean-up function to run before checking for complete_expression + # + # source://method_source//lib/method_source/code_helpers.rb#92 + def extract_first_expression(lines, consume = T.unsafe(nil), &block); end + + # Get the last comment from the input. + # + # @param lines [Array] + # @return [String] + # + # source://method_source//lib/method_source/code_helpers.rb#106 + def extract_last_comment(lines); end +end + +# An exception matcher that matches only subsets of SyntaxErrors that can be +# fixed by adding more input to the buffer. +# +# source://method_source//lib/method_source/code_helpers.rb#124 +module MethodSource::CodeHelpers::IncompleteExpression + class << self + # source://method_source//lib/method_source/code_helpers.rb#137 + def ===(ex); end + + # @return [Boolean] + # + # source://method_source//lib/method_source/code_helpers.rb#149 + def rbx?; end + end +end + +# source://method_source//lib/method_source/code_helpers.rb#125 +MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) + +# source://method_source//lib/method_source/code_helpers.rb#133 +MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) + +# This module is to be included by `Method` and `UnboundMethod` and +# provides the `#source` functionality +# +# source://method_source//lib/method_source.rb#77 +module MethodSource::MethodExtensions + # Return the comments associated with the method class/module. + # + # @example + # MethodSource::MethodExtensions.method(:included).module_comment + # => + # # This module is to be included by `Method` and `UnboundMethod` and + # # provides the `#source` functionality + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#139 + def class_comment; end + + # Return the comments associated with the method as a string. + # + # @example + # Set.instance_method(:clear).comment.display + # => + # # Removes all elements and returns self. + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#126 + def comment; end + + # Return the comments associated with the method class/module. + # + # @example + # MethodSource::MethodExtensions.method(:included).module_comment + # => + # # This module is to be included by `Method` and `UnboundMethod` and + # # provides the `#source` functionality + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#139 + def module_comment; end + + # Return the sourcecode for the method as a string + # + # @example + # Set.instance_method(:clear).source.display + # => + # def clear + # @hash.clear + # self + # end + # @raise SourceNotFoundException + # @return [String] The method sourcecode as a string + # + # source://method_source//lib/method_source.rb#114 + def source; end + + class << self + # We use the included hook to patch Method#source on rubinius. + # We need to use the included hook as Rubinius defines a `source` + # on Method so including a module will have no effect (as it's + # higher up the MRO). + # + # @param klass [Class] The class that includes the module. + # + # source://method_source//lib/method_source.rb#84 + def included(klass); end + end +end + +# source://method_source//lib/method_source/source_location.rb#2 +module MethodSource::ReeSourceLocation + # Ruby enterprise edition provides all the information that's + # needed, in a slightly different way. + # + # source://method_source//lib/method_source/source_location.rb#5 + def source_location; end +end + +# source://method_source//lib/method_source/source_location.rb#10 +module MethodSource::SourceLocation; end + +# source://method_source//lib/method_source/source_location.rb#11 +module MethodSource::SourceLocation::MethodExtensions + # Return the source location of a method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#40 + def source_location; end + + private + + # source://method_source//lib/method_source/source_location.rb#26 + def trace_func(event, file, line, id, binding, classname); end +end + +# source://method_source//lib/method_source/source_location.rb#54 +module MethodSource::SourceLocation::ProcExtensions + # Return the source location for a Proc (in implementations + # without Proc#source_location) + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # proc definition is found. + # + # source://method_source//lib/method_source/source_location.rb#74 + def source_location; end +end + +# source://method_source//lib/method_source/source_location.rb#81 +module MethodSource::SourceLocation::UnboundMethodExtensions + # Return the source location of an instance method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#101 + def source_location; end +end + +# An Exception to mark errors that were raised trying to find the source from +# a given source_location. +# +# source://method_source//lib/method_source.rb#16 +class MethodSource::SourceNotFoundError < ::StandardError; end + +# source://method_source//lib/method_source/version.rb#2 +MethodSource::VERSION = T.let(T.unsafe(nil), String) + +# source://method_source//lib/method_source.rb#173 +class Proc + include ::MethodSource::SourceLocation::ProcExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source.rb#168 +class UnboundMethod + include ::MethodSource::SourceLocation::UnboundMethodExtensions + include ::MethodSource::MethodExtensions +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/mini_mime@1.1.5.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/mini_mime@1.1.5.rbi new file mode 100644 index 0000000..1551681 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/mini_mime@1.1.5.rbi @@ -0,0 +1,173 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mini_mime` gem. +# Please instead update this file by running `bin/tapioca gem mini_mime`. + + +# source://mini_mime//lib/mini_mime/version.rb#2 +module MiniMime + class << self + # source://mini_mime//lib/mini_mime.rb#14 + def lookup_by_content_type(mime); end + + # source://mini_mime//lib/mini_mime.rb#10 + def lookup_by_extension(extension); end + + # source://mini_mime//lib/mini_mime.rb#6 + def lookup_by_filename(filename); end + end +end + +# source://mini_mime//lib/mini_mime.rb#18 +module MiniMime::Configuration + class << self + # Returns the value of attribute content_type_db_path. + # + # source://mini_mime//lib/mini_mime.rb#21 + def content_type_db_path; end + + # Sets the attribute content_type_db_path + # + # @param value the value to set the attribute content_type_db_path to. + # + # source://mini_mime//lib/mini_mime.rb#21 + def content_type_db_path=(_arg0); end + + # Returns the value of attribute ext_db_path. + # + # source://mini_mime//lib/mini_mime.rb#20 + def ext_db_path; end + + # Sets the attribute ext_db_path + # + # @param value the value to set the attribute ext_db_path to. + # + # source://mini_mime//lib/mini_mime.rb#20 + def ext_db_path=(_arg0); end + end +end + +# source://mini_mime//lib/mini_mime.rb#52 +class MiniMime::Db + # @return [Db] a new instance of Db + # + # source://mini_mime//lib/mini_mime.rb#173 + def initialize; end + + # source://mini_mime//lib/mini_mime.rb#182 + def lookup_by_content_type(content_type); end + + # source://mini_mime//lib/mini_mime.rb#178 + def lookup_by_extension(extension); end + + class << self + # source://mini_mime//lib/mini_mime.rb#66 + def lookup_by_content_type(content_type); end + + # source://mini_mime//lib/mini_mime.rb#60 + def lookup_by_extension(extension); end + + # source://mini_mime//lib/mini_mime.rb#53 + def lookup_by_filename(filename); end + end +end + +# source://mini_mime//lib/mini_mime.rb#71 +class MiniMime::Db::Cache + # @return [Cache] a new instance of Cache + # + # source://mini_mime//lib/mini_mime.rb#72 + def initialize(size); end + + # source://mini_mime//lib/mini_mime.rb#77 + def []=(key, val); end + + # source://mini_mime//lib/mini_mime.rb#83 + def fetch(key, &blk); end +end + +# For Windows support +# +# source://mini_mime//lib/mini_mime.rb#89 +MiniMime::Db::PReadFile = File + +# source://mini_mime//lib/mini_mime.rb#114 +class MiniMime::Db::RandomAccessDb + # @return [RandomAccessDb] a new instance of RandomAccessDb + # + # source://mini_mime//lib/mini_mime.rb#117 + def initialize(path, sort_order); end + + # source://mini_mime//lib/mini_mime.rb#131 + def lookup(val); end + + # lifted from marcandre/backports + # + # source://mini_mime//lib/mini_mime.rb#147 + def lookup_uncached(val); end + + # source://mini_mime//lib/mini_mime.rb#168 + def resolve(row); end +end + +# source://mini_mime//lib/mini_mime.rb#115 +MiniMime::Db::RandomAccessDb::MAX_CACHED = T.let(T.unsafe(nil), Integer) + +# source://mini_mime//lib/mini_mime.rb#28 +class MiniMime::Info + # @return [Info] a new instance of Info + # + # source://mini_mime//lib/mini_mime.rb#33 + def initialize(buffer); end + + # source://mini_mime//lib/mini_mime.rb#37 + def [](idx); end + + # @return [Boolean] + # + # source://mini_mime//lib/mini_mime.rb#47 + def binary?; end + + # Returns the value of attribute content_type. + # + # source://mini_mime//lib/mini_mime.rb#31 + def content_type; end + + # Sets the attribute content_type + # + # @param value the value to set the attribute content_type to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def content_type=(_arg0); end + + # Returns the value of attribute encoding. + # + # source://mini_mime//lib/mini_mime.rb#31 + def encoding; end + + # Sets the attribute encoding + # + # @param value the value to set the attribute encoding to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def encoding=(_arg0); end + + # Returns the value of attribute extension. + # + # source://mini_mime//lib/mini_mime.rb#31 + def extension; end + + # Sets the attribute extension + # + # @param value the value to set the attribute extension to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def extension=(_arg0); end +end + +# source://mini_mime//lib/mini_mime.rb#29 +MiniMime::Info::BINARY_ENCODINGS = T.let(T.unsafe(nil), Array) + +# source://mini_mime//lib/mini_mime/version.rb#3 +MiniMime::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/minitest@5.25.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/minitest@5.25.0.rbi new file mode 100644 index 0000000..9501420 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/minitest@5.25.0.rbi @@ -0,0 +1,1546 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + + +# :include: README.rdoc +# +# source://minitest//lib/minitest/parallel.rb#1 +module Minitest + class << self + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # source://minitest//lib/minitest.rb#322 + def __run(reporter, options); end + + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # source://minitest//lib/minitest.rb#96 + def after_run(&block); end + + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + + # Registers Minitest to run at process exit + # + # source://minitest//lib/minitest.rb#69 + def autorun; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter=(_arg0); end + + # source://minitest//lib/minitest.rb#18 + def cattr_accessor(name); end + + # source://minitest//lib/minitest.rb#1215 + def clock_time; end + + # source://minitest//lib/minitest.rb#302 + def empty_run!(options); end + + # source://minitest//lib/minitest.rb#19 + def extensions; end + + # source://minitest//lib/minitest.rb#19 + def extensions=(_arg0); end + + # source://minitest//lib/minitest.rb#335 + def filter_backtrace(bt); end + + # source://minitest//lib/minitest.rb#19 + def info_signal; end + + # source://minitest//lib/minitest.rb#19 + def info_signal=(_arg0); end + + # source://minitest//lib/minitest.rb#124 + def init_plugins(options); end + + # source://minitest//lib/minitest.rb#108 + def load_plugins; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor=(_arg0); end + + # source://minitest//lib/minitest.rb#142 + def process_args(args = T.unsafe(nil)); end + + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest//lib/minitest.rb#103 + def register_plugin(name_or_mod); end + + # source://minitest//lib/minitest.rb#19 + def reporter; end + + # source://minitest//lib/minitest.rb#19 + def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # Minitest.autorun + # Minitest.run(args) + # Minitest.load_plugins + # Minitest.process_args + # Minitest.init_plugins + # Minitest.__run(reporter, options) + # Runnable.runnables.each + # runnable_klass.run(reporter, options) + # self.runnable_methods.each + # self.run_one_method(self, runnable_method, reporter) + # Minitest.run_one_method(klass, runnable_method) + # klass.new(runnable_method).run + # + # source://minitest//lib/minitest.rb#268 + def run(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#1206 + def run_one_method(klass, method_name); end + + # source://minitest//lib/minitest.rb#19 + def seed; end + + # source://minitest//lib/minitest.rb#19 + def seed=(_arg0); end + end +end + +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# source://minitest//lib/minitest.rb#686 +class Minitest::AbstractReporter + # @return [AbstractReporter] a new instance of AbstractReporter + # + # source://minitest//lib/minitest.rb#688 + def initialize; end + + # Did this run pass? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#723 + def passed?; end + + # About to start running a test. This allows a reporter to show + # that it is starting or that we are in the middle of a test run. + # + # source://minitest//lib/minitest.rb#702 + def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # source://minitest//lib/minitest.rb#711 + def record(result); end + + # Outputs the summary of the run. + # + # source://minitest//lib/minitest.rb#717 + def report; end + + # Starts reporting on the run. + # + # source://minitest//lib/minitest.rb#695 + def start; end + + # source://minitest//lib/minitest.rb#727 + def synchronize(&block); end +end + +# Represents run failures. +# +# source://minitest//lib/minitest.rb#1019 +class Minitest::Assertion < ::Exception + # source://minitest//lib/minitest.rb#1022 + def error; end + + # Where was this run before an assertion was raised? + # + # source://minitest//lib/minitest.rb#1029 + def location; end + + # source://minitest//lib/minitest.rb#1037 + def result_code; end + + # source://minitest//lib/minitest.rb#1041 + def result_label; end +end + +# source://minitest//lib/minitest.rb#1020 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# source://minitest//lib/minitest/assertions.rb#16 +module Minitest::Assertions + # source://minitest//lib/minitest/assertions.rb#181 + def _synchronize; end + + # source://minitest//lib/minitest/assertions.rb#194 + def _where; end + + # Fails unless +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#171 + def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#188 + def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # source://minitest//lib/minitest/assertions.rb#214 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # source://minitest//lib/minitest/assertions.rb#235 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#247 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#254 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#265 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#276 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#287 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # source://minitest//lib/minitest/assertions.rb#299 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # source://minitest//lib/minitest/assertions.rb#309 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # source://minitest//lib/minitest/assertions.rb#327 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#351 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#370 + def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#391 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # source://minitest//lib/minitest/assertions.rb#418 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#450 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # source://minitest//lib/minitest/assertions.rb#460 + def assert_same(exp, act, msg = T.unsafe(nil)); end + + # +send_ary+ is a receiver, message and arguments. + # + # Fails unless the call returns a true value + # + # source://minitest//lib/minitest/assertions.rb#473 + def assert_send(send_ary, m = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # source://minitest//lib/minitest/assertions.rb#488 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # source://minitest//lib/minitest/assertions.rb#497 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # source://minitest//lib/minitest/assertions.rb#538 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # source://minitest//lib/minitest/assertions.rb#571 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # source://minitest//lib/minitest/assertions.rb#57 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # source://minitest//lib/minitest/assertions.rb#603 + def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # source://minitest//lib/minitest/assertions.rb#619 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # source://minitest//lib/minitest/assertions.rb#626 + def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that will output +msg+ along with the default message. + # + # source://minitest//lib/minitest/assertions.rb#634 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # source://minitest//lib/minitest/assertions.rb#127 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # source://minitest//lib/minitest/assertions.rb#145 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # source://minitest//lib/minitest/assertions.rb#645 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#652 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#660 + def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # source://minitest//lib/minitest/assertions.rb#671 + def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # source://minitest//lib/minitest/assertions.rb#683 + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#695 + def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#702 + def refute_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#713 + def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#723 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#731 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # source://minitest//lib/minitest/assertions.rb#741 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # source://minitest//lib/minitest/assertions.rb#776 + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#785 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#758 + def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#799 + def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#808 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # source://minitest//lib/minitest/assertions.rb#817 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # @raise [Minitest::Skip] + # + # source://minitest//lib/minitest/assertions.rb#830 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # source://minitest//lib/minitest/assertions.rb#842 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # @return [Boolean] + # + # source://minitest//lib/minitest/assertions.rb#851 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # source://minitest//lib/minitest/assertions.rb#102 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # source://minitest//lib/minitest/assertions.rb#27 + def diff; end + + # Set the diff command to use in #diff. + # + # source://minitest//lib/minitest/assertions.rb#45 + def diff=(o); end + end +end + +# source://minitest//lib/minitest/assertions.rb#199 +Minitest::Assertions::E = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest/assertions.rb#17 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# source://minitest//lib/minitest.rb#1174 +class Minitest::BacktraceFilter + # @return [BacktraceFilter] a new instance of BacktraceFilter + # + # source://minitest//lib/minitest.rb#1183 + def initialize(regexp = T.unsafe(nil)); end + + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # source://minitest//lib/minitest.rb#1191 + def filter(bt); end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp; end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp=(_arg0); end +end + +# source://minitest//lib/minitest.rb#1176 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# source://minitest//lib/minitest.rb#968 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # @return [CompositeReporter] a new instance of CompositeReporter + # + # source://minitest//lib/minitest.rb#974 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # source://minitest//lib/minitest.rb#986 + def <<(reporter); end + + # source://minitest//lib/minitest.rb#979 + def io; end + + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#990 + def passed?; end + + # source://minitest//lib/minitest.rb#998 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#1005 + def record(result); end + + # source://minitest//lib/minitest.rb#1011 + def report; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#972 + def reporters; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#972 + def reporters=(_arg0); end + + # source://minitest//lib/minitest.rb#994 + def start; end +end + +# Compresses backtraces. +# +# source://minitest//lib/minitest/compress.rb#5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # source://minitest//lib/minitest/compress.rb#11 + def compress(orig); end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# source://minitest//lib/minitest.rb#1118 +module Minitest::Guard + # Is this running on jruby? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1123 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on maglev? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1130 + def maglev?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1140 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1147 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on rubinius? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1154 + def rubinius?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1164 + def windows?(platform = T.unsafe(nil)); end +end + +# source://minitest//lib/minitest/parallel.rb#2 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# source://minitest//lib/minitest/parallel.rb#7 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # @return [Executor] a new instance of Executor + # + # source://minitest//lib/minitest/parallel.rb#17 + def initialize(size); end + + # Add a job to the queue + # + # source://minitest//lib/minitest/parallel.rb#43 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # source://minitest//lib/minitest/parallel.rb#50 + def shutdown; end + + # The size of the pool of workers. + # + # source://minitest//lib/minitest/parallel.rb#12 + def size; end + + # Start the executor + # + # source://minitest//lib/minitest/parallel.rb#26 + def start; end +end + +# source://minitest//lib/minitest/parallel.rb#56 +module Minitest::Parallel::Test + # source://minitest//lib/minitest/parallel.rb#57 + def _synchronize; end +end + +# source://minitest//lib/minitest/parallel.rb#59 +module Minitest::Parallel::Test::ClassMethods + # source://minitest//lib/minitest/parallel.rb#60 + def run_one_method(klass, method_name, reporter); end + + # source://minitest//lib/minitest/parallel.rb#64 + def test_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# source://minitest//lib/minitest.rb#758 +class Minitest::ProgressReporter < ::Minitest::Reporter + # source://minitest//lib/minitest.rb#759 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#766 + def record(result); end +end + +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# source://minitest//lib/minitest.rb#580 +module Minitest::Reportable + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#602 + def class_name; end + + # Did this run error? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#623 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # source://minitest//lib/minitest.rb#597 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#587 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # source://minitest//lib/minitest.rb#609 + def result_code; end + + # Was this run skipped? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#616 + def skipped?; end +end + +# source://minitest//lib/minitest.rb#591 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest.rb#734 +class Minitest::Reporter < ::Minitest::AbstractReporter + # @return [Reporter] a new instance of Reporter + # + # source://minitest//lib/minitest.rb#743 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#736 + def io; end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#736 + def io=(_arg0); end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#741 + def options; end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#741 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# source://minitest//lib/minitest.rb#635 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # source://minitest//lib/minitest.rb#669 + def class_name; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#644 + def klass; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#644 + def klass=(_arg0); end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#649 + def source_location; end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#649 + def source_location=(_arg0); end + + # source://minitest//lib/minitest.rb#673 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # source://minitest//lib/minitest.rb#654 + def from(runnable); end + end +end + +# re-open +# +# source://minitest//lib/minitest.rb#348 +class Minitest::Runnable + # @return [Runnable] a new instance of Runnable + # + # source://minitest//lib/minitest.rb#511 + def initialize(name); end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#352 + def assertions; end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#352 + def assertions=(_arg0); end + + # source://minitest//lib/minitest.rb#507 + def failure; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#357 + def failures; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#357 + def failures=(_arg0); end + + # source://minitest//lib/minitest.rb#493 + def marshal_dump; end + + # source://minitest//lib/minitest.rb#503 + def marshal_load(ary); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#526 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#533 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#538 + def metadata?; end + + # Name of the run. + # + # source://minitest//lib/minitest.rb#375 + def name; end + + # Set the name of the run. + # + # source://minitest//lib/minitest.rb#382 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#555 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#564 + def result_code; end + + # Runs a single method. Needs to return self. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#545 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#571 + def skipped?; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#362 + def time; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#362 + def time=(_arg0); end + + # source://minitest//lib/minitest.rb#364 + def time_it; end + + class << self + # source://minitest//lib/minitest.rb#1225 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # source://minitest//lib/minitest.rb#389 + def methods_matching(re); end + + # source://minitest//lib/minitest.rb#463 + def on_signal(name, action); end + + # source://minitest//lib/minitest.rb#393 + def reset; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # source://minitest//lib/minitest.rb#404 + def run(reporter, options = T.unsafe(nil)); end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # source://minitest//lib/minitest.rb#444 + def run_one_method(klass, method_name, reporter); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#480 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # source://minitest//lib/minitest.rb#487 + def runnables; end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#453 + def test_order; end + + # source://minitest//lib/minitest.rb#457 + def with_info_handler(reporter, handler, &block); end + end +end + +# source://minitest//lib/minitest.rb#461 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# source://minitest//lib/minitest.rb#1049 +class Minitest::Skip < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1050 + def result_label; end +end + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print "= 2.5 +# +# source://msgpack//lib/msgpack/time.rb#7 +MessagePack::Time::TIME_AT_3_AVAILABLE = T.let(T.unsafe(nil), TrueClass) + +# source://msgpack//lib/msgpack/time.rb#13 +MessagePack::Time::Unpacker = T.let(T.unsafe(nil), Proc) + +# a.k.a. "TimeSpec" +# +# source://msgpack//lib/msgpack/timestamp.rb#4 +class MessagePack::Timestamp + # @param sec [Integer] + # @param nsec [Integer] + # @return [Timestamp] a new instance of Timestamp + # + # source://msgpack//lib/msgpack/timestamp.rb#24 + def initialize(sec, nsec); end + + # source://msgpack//lib/msgpack/timestamp.rb#72 + def ==(other); end + + # @return [Integer] + # + # source://msgpack//lib/msgpack/timestamp.rb#20 + def nsec; end + + # @return [Integer] + # + # source://msgpack//lib/msgpack/timestamp.rb#17 + def sec; end + + # source://msgpack//lib/msgpack/timestamp.rb#68 + def to_msgpack_ext; end + + class << self + # source://msgpack//lib/msgpack/timestamp.rb#29 + def from_msgpack_ext(data); end + + # source://msgpack//lib/msgpack/timestamp.rb#50 + def to_msgpack_ext(sec, nsec); end + end +end + +# source://msgpack//lib/msgpack/timestamp.rb#13 +MessagePack::Timestamp::TIMESTAMP32_MAX_SEC = T.let(T.unsafe(nil), Integer) + +# source://msgpack//lib/msgpack/timestamp.rb#14 +MessagePack::Timestamp::TIMESTAMP64_MAX_SEC = T.let(T.unsafe(nil), Integer) + +# The timestamp extension type defined in the MessagePack spec. +# See https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type for details. +# +# source://msgpack//lib/msgpack/timestamp.rb#11 +MessagePack::Timestamp::TYPE = T.let(T.unsafe(nil), Integer) + +class MessagePack::UnexpectedTypeError < ::MessagePack::UnpackError + include ::MessagePack::TypeError +end + +# source://msgpack//lib/msgpack/unpacker.rb#2 +class MessagePack::Unpacker + # source://msgpack//lib/msgpack/unpacker.rb#9 + def register_type(type, klass = T.unsafe(nil), method_name = T.unsafe(nil), &block); end + + # source://msgpack//lib/msgpack/unpacker.rb#18 + def registered_types; end + + # @return [Boolean] + # + # source://msgpack//lib/msgpack/unpacker.rb#28 + def type_registered?(klass_or_type); end +end + +# source://msgpack//lib/msgpack/core_ext.rb#17 +class NilClass + include ::MessagePack::CoreExt + + private + + # source://msgpack//lib/msgpack/core_ext.rb#21 + def to_msgpack_with_packer(packer); end +end + +# source://msgpack//lib/msgpack/core_ext.rb#57 +class String + include ::Comparable + include ::MessagePack::CoreExt + + private + + # source://msgpack//lib/msgpack/core_ext.rb#61 + def to_msgpack_with_packer(packer); end +end + +# source://msgpack//lib/msgpack/symbol.rb#1 +class Symbol + include ::Comparable + include ::MessagePack::CoreExt + + private + + # source://msgpack//lib/msgpack/core_ext.rb#91 + def to_msgpack_with_packer(packer); end + + class << self + # source://msgpack//lib/msgpack/symbol.rb#12 + def from_msgpack_ext(data); end + end +end + +# source://msgpack//lib/msgpack/core_ext.rb#27 +class TrueClass + include ::MessagePack::CoreExt + + private + + # source://msgpack//lib/msgpack/core_ext.rb#31 + def to_msgpack_with_packer(packer); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-license@0.1.1.2.1627430819213747598431630701693729869473.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-license@0.1.1.2.1627430819213747598431630701693729869473.6.rbi new file mode 100644 index 0000000..1939c8e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-license@0.1.1.2.1627430819213747598431630701693729869473.6.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mutant-license` gem. +# Please instead update this file by running `bin/tapioca gem mutant-license`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-minitest@0.12.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-minitest@0.12.4.rbi new file mode 100644 index 0000000..3bbe492 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant-minitest@0.12.4.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mutant-minitest` gem. +# Please instead update this file by running `bin/tapioca gem mutant-minitest`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant@0.12.4.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant@0.12.4.rbi new file mode 100644 index 0000000..4b413a2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/mutant@0.12.4.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mutant` gem. +# Please instead update this file by running `bin/tapioca gem mutant`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-imap@0.4.16.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-imap@0.4.16.rbi new file mode 100644 index 0000000..7af7e4f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-imap@0.4.16.rbi @@ -0,0 +1,10845 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-imap` gem. +# Please instead update this file by running `bin/tapioca gem net-imap`. + + +# Net::IMAP implements Internet Message Access Protocol (\IMAP) client +# functionality. The protocol is described +# in {IMAP4rev1 [RFC3501]}[https://tools.ietf.org/html/rfc3501] +# and {IMAP4rev2 [RFC9051]}[https://tools.ietf.org/html/rfc9051]. +# +# == \IMAP Overview +# +# An \IMAP client connects to a server, and then authenticates +# itself using either #authenticate or #login. Having +# authenticated itself, there is a range of commands +# available to it. Most work with mailboxes, which may be +# arranged in an hierarchical namespace, and each of which +# contains zero or more messages. How this is implemented on +# the server is implementation-dependent; on a UNIX server, it +# will frequently be implemented as files in mailbox format +# within a hierarchy of directories. +# +# To work on the messages within a mailbox, the client must +# first select that mailbox, using either #select or #examine +# (for read-only access). Once the client has successfully +# selected a mailbox, they enter the "_selected_" state, and that +# mailbox becomes the _current_ mailbox, on which mail-item +# related commands implicitly operate. +# +# === Sequence numbers and UIDs +# +# Messages have two sorts of identifiers: message sequence +# numbers and UIDs. +# +# Message sequence numbers number messages within a mailbox +# from 1 up to the number of items in the mailbox. If a new +# message arrives during a session, it receives a sequence +# number equal to the new size of the mailbox. If messages +# are expunged from the mailbox, remaining messages have their +# sequence numbers "shuffled down" to fill the gaps. +# +# To avoid sequence number race conditions, servers must not expunge messages +# when no command is in progress, nor when responding to #fetch, #store, or +# #search. Expunges _may_ be sent during any other command, including +# #uid_fetch, #uid_store, and #uid_search. The #noop and #idle commands are +# both useful for this side-effect: they allow the server to send all mailbox +# updates, including expunges. +# +# UIDs, on the other hand, are permanently guaranteed not to +# identify another message within the same mailbox, even if +# the existing message is deleted. UIDs are required to +# be assigned in ascending (but not necessarily sequential) +# order within a mailbox; this means that if a non-IMAP client +# rearranges the order of mail items within a mailbox, the +# UIDs have to be reassigned. An \IMAP client thus cannot +# rearrange message orders. +# +# === Examples of Usage +# +# ==== List sender and subject of all recent messages in the default mailbox +# +# imap = Net::IMAP.new('mail.example.com') +# imap.authenticate('PLAIN', 'joe_user', 'joes_password') +# imap.examine('INBOX') +# imap.search(["RECENT"]).each do |message_id| +# envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"] +# puts "#{envelope.from[0].name}: \t#{envelope.subject}" +# end +# +# ==== Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03" +# +# imap = Net::IMAP.new('mail.example.com') +# imap.authenticate('PLAIN', 'joe_user', 'joes_password') +# imap.select('Mail/sent-mail') +# if not imap.list('Mail/', 'sent-apr03') +# imap.create('Mail/sent-apr03') +# end +# imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id| +# imap.copy(message_id, "Mail/sent-apr03") +# imap.store(message_id, "+FLAGS", [:Deleted]) +# end +# imap.expunge +# +# == Capabilities +# +# Most Net::IMAP methods do not _currently_ modify their behaviour according +# to the server's advertised #capabilities. Users of this class must check +# that the server is capable of extension commands or command arguments before +# sending them. Special care should be taken to follow the #capabilities +# requirements for #starttls, #login, and #authenticate. +# +# See #capable?, #auth_capable?, #capabilities, #auth_mechanisms to discover +# server capabilities. For relevant capability requirements, see the +# documentation on each \IMAP command. +# +# imap = Net::IMAP.new("mail.example.com") +# imap.capable?(:IMAP4rev1) or raise "Not an IMAP4rev1 server" +# imap.capable?(:starttls) or raise "Cannot start TLS" +# imap.starttls +# +# if imap.auth_capable?("PLAIN") +# imap.authenticate "PLAIN", username, password +# elsif !imap.capability?("LOGINDISABLED") +# imap.login username, password +# else +# raise "No acceptable authentication mechanisms" +# end +# +# # Support for "UTF8=ACCEPT" implies support for "ENABLE" +# imap.enable :utf8 if imap.capable?("UTF8=ACCEPT") +# +# namespaces = imap.namespace if imap.capable?(:namespace) +# mbox_prefix = namespaces&.personal&.first&.prefix || "" +# mbox_delim = namespaces&.personal&.first&.delim || "/" +# mbox_path = prefix + %w[path to my mailbox].join(delim) +# imap.create mbox_path +# +# === Basic IMAP4rev1 capabilities +# +# IMAP4rev1 servers must advertise +IMAP4rev1+ in their capabilities list. +# IMAP4rev1 servers must _implement_ the +STARTTLS+, AUTH=PLAIN, +# and +LOGINDISABLED+ capabilities. See #starttls, #login, and #authenticate +# for the implications of these capabilities. +# +# === Caching +CAPABILITY+ responses +# +# Net::IMAP automatically stores and discards capability data according to the +# the requirements and recommendations in +# {IMAP4rev2 §6.1.1}[https://www.rfc-editor.org/rfc/rfc9051#section-6.1.1], +# {§6.2}[https://www.rfc-editor.org/rfc/rfc9051#section-6.2], and +# {§7.1}[https://www.rfc-editor.org/rfc/rfc9051#section-7.1]. +# Use #capable?, #auth_capable?, or #capabilities to use this cache and avoid +# sending the #capability command unnecessarily. +# +# The server may advertise its initial capabilities using the +CAPABILITY+ +# ResponseCode in a +PREAUTH+ or +OK+ #greeting. When TLS has started +# (#starttls) and after authentication (#login or #authenticate), the server's +# capabilities may change and cached capabilities are discarded. The server +# may send updated capabilities with an +OK+ TaggedResponse to #login or +# #authenticate, and these will be cached by Net::IMAP. But the +# TaggedResponse to #starttls MUST be ignored--it is sent before TLS starts +# and is unprotected. +# +# When storing capability values to variables, be careful that they are +# discarded or reset appropriately, especially following #starttls. +# +# === Using IMAP4rev1 extensions +# +# See the {IANA IMAP4 capabilities +# registry}[http://www.iana.org/assignments/imap4-capabilities] for a list of +# all standard capabilities, and their reference RFCs. +# +# IMAP4rev1 servers must not activate behavior that is incompatible with the +# base specification until an explicit client action invokes a capability, +# e.g. sending a command or command argument specific to that capability. +# Servers may send data with backward compatible behavior, such as response +# codes or mailbox attributes, at any time without client action. +# +# Invoking capabilities which are unknown to Net::IMAP may cause unexpected +# behavior and errors. For example, ResponseParseError is raised when +# unknown response syntax is received. Invoking commands or command +# parameters that are unsupported by the server may raise NoResponseError, +# BadResponseError, or cause other unexpected behavior. +# +# Some capabilities must be explicitly activated using the #enable command. +# See #enable for details. +# +# == Thread Safety +# +# Net::IMAP supports concurrent threads. For example, +# +# imap = Net::IMAP.new("imap.foo.net", "imap2") +# imap.authenticate("scram-md5", "bar", "password") +# imap.select("inbox") +# fetch_thread = Thread.start { imap.fetch(1..-1, "UID") } +# search_result = imap.search(["BODY", "hello"]) +# fetch_result = fetch_thread.value +# imap.disconnect +# +# This script invokes the FETCH command and the SEARCH command concurrently. +# +# == Errors +# +# An \IMAP server can send three different types of responses to indicate +# failure: +# +# NO:: the attempted command could not be successfully completed. For +# instance, the username/password used for logging in are incorrect; +# the selected mailbox does not exist; etc. +# +# BAD:: the request from the client does not follow the server's +# understanding of the \IMAP protocol. This includes attempting +# commands from the wrong client state; for instance, attempting +# to perform a SEARCH command without having SELECTed a current +# mailbox. It can also signal an internal server +# failure (such as a disk crash) has occurred. +# +# BYE:: the server is saying goodbye. This can be part of a normal +# logout sequence, and can be used as part of a login sequence +# to indicate that the server is (for some reason) unwilling +# to accept your connection. As a response to any other command, +# it indicates either that the server is shutting down, or that +# the server is timing out the client connection due to inactivity. +# +# These three error response are represented by the errors +# Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, and +# Net::IMAP::ByeResponseError, all of which are subclasses of +# Net::IMAP::ResponseError. Essentially, all methods that involve +# sending a request to the server can generate one of these errors. +# Only the most pertinent instances have been documented below. +# +# Because the IMAP class uses Sockets for communication, its methods +# are also susceptible to the various errors that can occur when +# working with sockets. These are generally represented as +# Errno errors. For instance, any method that involves sending a +# request to the server and/or receiving a response from it could +# raise an Errno::EPIPE error if the network connection unexpectedly +# goes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2), +# and associated man pages. +# +# Finally, a Net::IMAP::DataFormatError is thrown if low-level data +# is found to be in an incorrect format (for instance, when converting +# between UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is +# thrown if a server response is non-parseable. +# +# == What's here? +# +# * {Connection control}[rdoc-ref:Net::IMAP@Connection+control+methods] +# * {Server capabilities}[rdoc-ref:Net::IMAP@Server+capabilities] +# * {Handling server responses}[rdoc-ref:Net::IMAP@Handling+server+responses] +# * {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands] +# * {for any state}[rdoc-ref:Net::IMAP@Any+state] +# * {for the "not authenticated" state}[rdoc-ref:Net::IMAP@Not+Authenticated+state] +# * {for the "authenticated" state}[rdoc-ref:Net::IMAP@Authenticated+state] +# * {for the "selected" state}[rdoc-ref:Net::IMAP@Selected+state] +# * {for the "logout" state}[rdoc-ref:Net::IMAP@Logout+state] +# * {IMAP extension support}[rdoc-ref:Net::IMAP@IMAP+extension+support] +# +# === Connection control methods +# +# - Net::IMAP.new: Creates a new \IMAP client which connects immediately and +# waits for a successful server greeting before the method returns. +# - #starttls: Asks the server to upgrade a clear-text connection to use TLS. +# - #logout: Tells the server to end the session. Enters the "_logout_" state. +# - #disconnect: Disconnects the connection (without sending #logout first). +# - #disconnected?: True if the connection has been closed. +# +# === Server capabilities +# +# - #capable?: Returns whether the server supports a given capability. +# - #capabilities: Returns the server's capabilities as an array of strings. +# - #auth_capable?: Returns whether the server advertises support for a given +# SASL mechanism, for use with #authenticate. +# - #auth_mechanisms: Returns the #authenticate SASL mechanisms which +# the server claims to support as an array of strings. +# - #clear_cached_capabilities: Clears cached capabilities. +# +# The capabilities cache is automatically cleared after completing +# #starttls, #login, or #authenticate. +# - #capability: Sends the +CAPABILITY+ command and returns the #capabilities. +# +# In general, #capable? should be used rather than explicitly sending a +# +CAPABILITY+ command to the server. +# +# === Handling server responses +# +# - #greeting: The server's initial untagged response, which can indicate a +# pre-authenticated connection. +# - #responses: Yields unhandled UntaggedResponse#data and non-+nil+ +# ResponseCode#data. +# - #clear_responses: Deletes unhandled data from #responses and returns it. +# - #add_response_handler: Add a block to be called inside the receiver thread +# with every server response. +# - #response_handlers: Returns the list of response handlers. +# - #remove_response_handler: Remove a previously added response handler. +# +# === Core \IMAP commands +# +# The following commands are defined either by +# the [IMAP4rev1[https://tools.ietf.org/html/rfc3501]] base specification, or +# by one of the following extensions: +# [IDLE[https://tools.ietf.org/html/rfc2177]], +# [NAMESPACE[https://tools.ietf.org/html/rfc2342]], +# [UNSELECT[https://tools.ietf.org/html/rfc3691]], +# [ENABLE[https://tools.ietf.org/html/rfc5161]], +# [MOVE[https://tools.ietf.org/html/rfc6851]]. +# These extensions are widely supported by modern IMAP4rev1 servers and have +# all been integrated into [IMAP4rev2[https://tools.ietf.org/html/rfc9051]]. +# *NOTE:* Net::IMAP doesn't support IMAP4rev2 yet. +# +# ==== Any state +# +# - #capability: Returns the server's capabilities as an array of strings. +# +# In general, #capable? should be used rather than explicitly sending a +# +CAPABILITY+ command to the server. +# - #noop: Allows the server to send unsolicited untagged #responses. +# - #logout: Tells the server to end the session. Enters the "_logout_" state. +# +# ==== Not Authenticated state +# +# In addition to the commands for any state, the following commands are valid +# in the "not authenticated" state: +# +# - #starttls: Upgrades a clear-text connection to use TLS. +# +# Requires the +STARTTLS+ capability. +# - #authenticate: Identifies the client to the server using the given +# {SASL mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# and credentials. Enters the "_authenticated_" state. +# +# The server should list "AUTH=#{mechanism}" capabilities for +# supported mechanisms. +# - #login: Identifies the client to the server using a plain text password. +# Using #authenticate is generally preferred. Enters the "_authenticated_" +# state. +# +# The +LOGINDISABLED+ capability must NOT be listed. +# +# ==== Authenticated state +# +# In addition to the commands for any state, the following commands are valid +# in the "_authenticated_" state: +# +# - #enable: Enables backwards incompatible server extensions. +# Requires the +ENABLE+ or +IMAP4rev2+ capability. +# - #select: Open a mailbox and enter the "_selected_" state. +# - #examine: Open a mailbox read-only, and enter the "_selected_" state. +# - #create: Creates a new mailbox. +# - #delete: Permanently remove a mailbox. +# - #rename: Change the name of a mailbox. +# - #subscribe: Adds a mailbox to the "subscribed" set. +# - #unsubscribe: Removes a mailbox from the "subscribed" set. +# - #list: Returns names and attributes of mailboxes matching a given pattern. +# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. +# Requires the +NAMESPACE+ or +IMAP4rev2+ capability. +# - #status: Returns mailbox information, e.g. message count, unseen message +# count, +UIDVALIDITY+ and +UIDNEXT+. +# - #append: Appends a message to the end of a mailbox. +# - #idle: Allows the server to send updates to the client, without the client +# needing to poll using #noop. +# Requires the +IDLE+ or +IMAP4rev2+ capability. +# - *Obsolete* #lsub: Replaced by LIST-EXTENDED and removed from +# +IMAP4rev2+. Lists mailboxes in the "subscribed" set. +# +# *Note:* Net::IMAP hasn't implemented LIST-EXTENDED yet. +# +# ==== Selected state +# +# In addition to the commands for any state and the "_authenticated_" +# commands, the following commands are valid in the "_selected_" state: +# +# - #close: Closes the mailbox and returns to the "_authenticated_" state, +# expunging deleted messages, unless the mailbox was opened as read-only. +# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, +# without expunging any messages. +# Requires the +UNSELECT+ or +IMAP4rev2+ capability. +# - #expunge: Permanently removes messages which have the Deleted flag set. +# - #uid_expunge: Restricts expunge to only remove the specified UIDs. +# Requires the +UIDPLUS+ or +IMAP4rev2+ capability. +# - #search, #uid_search: Returns sequence numbers or UIDs of messages that +# match the given searching criteria. +# - #fetch, #uid_fetch: Returns data associated with a set of messages, +# specified by sequence number or UID. +# - #store, #uid_store: Alters a message's flags. +# - #copy, #uid_copy: Copies the specified messages to the end of the +# specified destination mailbox. +# - #move, #uid_move: Moves the specified messages to the end of the +# specified destination mailbox, expunging them from the current mailbox. +# Requires the +MOVE+ or +IMAP4rev2+ capability. +# - #check: *Obsolete:* removed from +IMAP4rev2+. +# Can be replaced with #noop or #idle. +# +# ==== Logout state +# +# No \IMAP commands are valid in the "_logout_" state. If the socket is still +# open, Net::IMAP will close it after receiving server confirmation. +# Exceptions will be raised by \IMAP commands that have already started and +# are waiting for a response, as well as any that are called after logout. +# +# === \IMAP extension support +# +# ==== RFC9051: +IMAP4rev2+ +# +# Although IMAP4rev2[https://tools.ietf.org/html/rfc9051] is not supported +# yet, Net::IMAP supports several extensions that have been folded into it: +# +ENABLE+, +IDLE+, +MOVE+, +NAMESPACE+, +SASL-IR+, +UIDPLUS+, +UNSELECT+, +# STATUS=SIZE, and the fetch side of +BINARY+. +# Commands for these extensions are listed with the {Core IMAP +# commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands], above. +# +# >>> +# The following are folded into +IMAP4rev2+ but are currently +# unsupported or incompletely supported by Net::IMAP: RFC4466 +# extensions, +ESEARCH+, +SEARCHRES+, +LIST-EXTENDED+, +LIST-STATUS+, +# +LITERAL-+, and +SPECIAL-USE+. +# +# ==== RFC2087: +QUOTA+ +# - #getquota: returns the resource usage and limits for a quota root +# - #getquotaroot: returns the list of quota roots for a mailbox, as well as +# their resource usage and limits. +# - #setquota: sets the resource limits for a given quota root. +# +# ==== RFC2177: +IDLE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #idle: Allows the server to send updates to the client, without the client +# needing to poll using #noop. +# +# ==== RFC2342: +NAMESPACE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #namespace: Returns mailbox namespaces, with path prefixes and delimiters. +# +# ==== RFC2971: +ID+ +# - #id: exchanges client and server implementation information. +# +# ==== RFC3516: +BINARY+ +# The fetch side of +BINARY+ has been folded into +# IMAP4rev2[https://tools.ietf.org/html/rfc9051]. +# - Updates #fetch and #uid_fetch with the +BINARY+, +BINARY.PEEK+, and +# +BINARY.SIZE+ items. See FetchData#binary and FetchData#binary_size. +# +# >>> +# *NOTE:* The binary extension the #append command is _not_ supported yet. +# +# ==== RFC3691: +UNSELECT+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #unselect: Closes the mailbox and returns to the "_authenticated_" state, +# without expunging any messages. +# +# ==== RFC4314: +ACL+ +# - #getacl: lists the authenticated user's access rights to a mailbox. +# - #setacl: sets the access rights for a user on a mailbox +# >>> +# *NOTE:* +DELETEACL+, +LISTRIGHTS+, and +MYRIGHTS+ are not supported yet. +# +# ==== RFC4315: +UIDPLUS+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #uid_expunge: Restricts #expunge to only remove the specified UIDs. +# - Updates #select, #examine with the +UIDNOTSTICKY+ ResponseCode +# - Updates #append with the +APPENDUID+ ResponseCode +# - Updates #copy, #move with the +COPYUID+ ResponseCode +# +# ==== RFC4959: +SASL-IR+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051]. +# - Updates #authenticate with the option to send an initial response. +# +# ==== RFC5161: +ENABLE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #enable: Enables backwards incompatible server extensions. +# +# ==== RFC5256: +SORT+ +# - #sort, #uid_sort: An alternate version of #search or #uid_search which +# sorts the results by specified keys. +# ==== RFC5256: +THREAD+ +# - #thread, #uid_thread: An alternate version of #search or #uid_search, +# which arranges the results into ordered groups or threads according to a +# chosen algorithm. +# +# ==== +X-GM-EXT-1+ +# +X-GM-EXT-1+ is a non-standard Gmail extension. See {Google's +# documentation}[https://developers.google.com/gmail/imap/imap-extensions]. +# - Updates #fetch and #uid_fetch with support for +X-GM-MSGID+ (unique +# message ID), +X-GM-THRID+ (thread ID), and +X-GM-LABELS+ (Gmail labels). +# - Updates #search with the +X-GM-RAW+ search attribute. +# - #xlist: replaced by +SPECIAL-USE+ attributes in #list responses. +# +# *NOTE:* The +OBJECTID+ extension should replace +X-GM-MSGID+ and +# +X-GM-THRID+, but Gmail does not support it (as of 2023-11-10). +# +# ==== RFC6851: +MOVE+ +# Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included +# above with {Core IMAP commands}[rdoc-ref:Net::IMAP@Core+IMAP+commands]. +# - #move, #uid_move: Moves the specified messages to the end of the +# specified destination mailbox, expunging them from the current mailbox. +# +# ==== RFC6855: UTF8=ACCEPT, UTF8=ONLY +# +# - See #enable for information about support for UTF-8 string encoding. +# +# ==== RFC7162: +CONDSTORE+ +# +# - Updates #enable with +CONDSTORE+ parameter. +CONDSTORE+ will also be +# enabled by using any of the extension's command parameters, listed below. +# - Updates #status with the +HIGHESTMODSEQ+ status attribute. +# - Updates #select and #examine with the +condstore+ modifier, and adds +# either a +HIGHESTMODSEQ+ or +NOMODSEQ+ ResponseCode to the responses. +# - Updates #search, #uid_search, #sort, and #uid_sort with the +MODSEQ+ +# search criterion, and adds SearchResult#modseq to the search response. +# - Updates #thread and #uid_thread with the +MODSEQ+ search criterion +# (but thread responses are unchanged). +# - Updates #fetch and #uid_fetch with the +changedsince+ modifier and +# +MODSEQ+ FetchData attribute. +# - Updates #store and #uid_store with the +unchangedsince+ modifier and adds +# the +MODIFIED+ ResponseCode to the tagged response. +# +# ==== RFC8438: STATUS=SIZE +# - Updates #status with the +SIZE+ status attribute. +# +# ==== RFC8474: +OBJECTID+ +# - Adds +MAILBOXID+ ResponseCode to #create tagged response. +# - Adds +MAILBOXID+ ResponseCode to #select and #examine untagged response. +# - Updates #fetch and #uid_fetch with the +EMAILID+ and +THREADID+ items. +# See FetchData#emailid and FetchData#emailid. +# - Updates #status with support for the +MAILBOXID+ status attribute. +# +# == References +# +# [{IMAP4rev1}[https://www.rfc-editor.org/rfc/rfc3501.html]]:: +# Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - \VERSION 4rev1", +# RFC 3501, DOI 10.17487/RFC3501, March 2003, +# . +# +# [IMAP-ABNF-EXT[https://www.rfc-editor.org/rfc/rfc4466.html]]:: +# Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 ABNF", +# RFC 4466, DOI 10.17487/RFC4466, April 2006, +# . +# +# Note: Net::IMAP cannot parse the entire RFC4466 grammar yet. +# +# [{IMAP4rev2}[https://www.rfc-editor.org/rfc/rfc9051.html]]:: +# Melnikov, A., Ed., and B. Leiba, Ed., "Internet Message Access Protocol +# (\IMAP) - Version 4rev2", RFC 9051, DOI 10.17487/RFC9051, August 2021, +# . +# +# Note: Net::IMAP is not fully compatible with IMAP4rev2 yet. +# +# [IMAP-IMPLEMENTATION[https://www.rfc-editor.org/info/rfc2683]]:: +# Leiba, B., "IMAP4 Implementation Recommendations", +# RFC 2683, DOI 10.17487/RFC2683, September 1999, +# . +# +# [IMAP-MULTIACCESS[https://www.rfc-editor.org/info/rfc2180]]:: +# Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", RFC 2180, DOI +# 10.17487/RFC2180, July 1997, . +# +# [UTF7[https://tools.ietf.org/html/rfc2152]]:: +# Goldsmith, D. and M. Davis, "UTF-7 A Mail-Safe Transformation Format of +# Unicode", RFC 2152, DOI 10.17487/RFC2152, May 1997, +# . +# +# === Message envelope and body structure +# +# [RFC5322[https://tools.ietf.org/html/rfc5322]]:: +# Resnick, P., Ed., "Internet Message Format", +# RFC 5322, DOI 10.17487/RFC5322, October 2008, +# . +# +# Note: obsoletes +# RFC-2822[https://tools.ietf.org/html/rfc2822] (April 2001) and +# RFC-822[https://tools.ietf.org/html/rfc822] (August 1982). +# +# [CHARSET[https://tools.ietf.org/html/rfc2978]]:: +# Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, +# RFC 2978, DOI 10.17487/RFC2978, October 2000, +# . +# +# [DISPOSITION[https://tools.ietf.org/html/rfc2183]]:: +# Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation +# Information in Internet Messages: The Content-Disposition Header +# Field", RFC 2183, DOI 10.17487/RFC2183, August 1997, +# . +# +# [MIME-IMB[https://tools.ietf.org/html/rfc2045]]:: +# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions +# (MIME) Part One: Format of Internet Message Bodies", +# RFC 2045, DOI 10.17487/RFC2045, November 1996, +# . +# +# [MIME-IMT[https://tools.ietf.org/html/rfc2046]]:: +# Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions +# (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, +# November 1996, . +# +# [MIME-HDRS[https://tools.ietf.org/html/rfc2047]]:: +# Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: +# Message Header Extensions for Non-ASCII Text", +# RFC 2047, DOI 10.17487/RFC2047, November 1996, +# . +# +# [RFC2231[https://tools.ietf.org/html/rfc2231]]:: +# Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word +# Extensions: Character Sets, Languages, and Continuations", +# RFC 2231, DOI 10.17487/RFC2231, November 1997, +# . +# +# [I18n-HDRS[https://tools.ietf.org/html/rfc6532]]:: +# Yang, A., Steele, S., and N. Freed, "Internationalized Email Headers", +# RFC 6532, DOI 10.17487/RFC6532, February 2012, +# . +# +# [LANGUAGE-TAGS[https://www.rfc-editor.org/info/rfc3282]]:: +# Alvestrand, H., "Content Language Headers", +# RFC 3282, DOI 10.17487/RFC3282, May 2002, +# . +# +# [LOCATION[https://www.rfc-editor.org/info/rfc2557]]:: +# Palme, J., Hopmann, A., and N. Shelness, "MIME Encapsulation of +# Aggregate Documents, such as HTML (MHTML)", +# RFC 2557, DOI 10.17487/RFC2557, March 1999, +# . +# +# [MD5[https://tools.ietf.org/html/rfc1864]]:: +# Myers, J. and M. Rose, "The Content-MD5 Header Field", +# RFC 1864, DOI 10.17487/RFC1864, October 1995, +# . +# +# [RFC3503[https://tools.ietf.org/html/rfc3503]]:: +# Melnikov, A., "Message Disposition Notification (MDN) +# profile for Internet Message Access Protocol (IMAP)", +# RFC 3503, DOI 10.17487/RFC3503, March 2003, +# . +# +# === \IMAP Extensions +# +# [QUOTA[https://tools.ietf.org/html/rfc9208]]:: +# Melnikov, A., "IMAP QUOTA Extension", RFC 9208, DOI 10.17487/RFC9208, +# March 2022, . +# +# Note: obsoletes +# RFC-2087[https://tools.ietf.org/html/rfc2087] (January 1997). +# Net::IMAP does not fully support the RFC9208 updates yet. +# [IDLE[https://tools.ietf.org/html/rfc2177]]:: +# Leiba, B., "IMAP4 IDLE command", RFC 2177, DOI 10.17487/RFC2177, +# June 1997, . +# [NAMESPACE[https://tools.ietf.org/html/rfc2342]]:: +# Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342, +# DOI 10.17487/RFC2342, May 1998, . +# [ID[https://tools.ietf.org/html/rfc2971]]:: +# Showalter, T., "IMAP4 ID extension", RFC 2971, DOI 10.17487/RFC2971, +# October 2000, . +# [BINARY[https://tools.ietf.org/html/rfc3516]]:: +# Nerenberg, L., "IMAP4 Binary Content Extension", RFC 3516, +# DOI 10.17487/RFC3516, April 2003, +# . +# [ACL[https://tools.ietf.org/html/rfc4314]]:: +# Melnikov, A., "IMAP4 Access Control List (ACL) Extension", RFC 4314, +# DOI 10.17487/RFC4314, December 2005, +# . +# [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]:: +# Crispin, M., "Internet Message Access Protocol (\IMAP) - UIDPLUS +# extension", RFC 4315, DOI 10.17487/RFC4315, December 2005, +# . +# [SORT[https://tools.ietf.org/html/rfc5256]]:: +# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and +# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, +# . +# [THREAD[https://tools.ietf.org/html/rfc5256]]:: +# Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and +# THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, +# . +# [RFC5530[https://www.rfc-editor.org/rfc/rfc5530.html]]:: +# Gulbrandsen, A., "IMAP Response Codes", RFC 5530, DOI 10.17487/RFC5530, +# May 2009, . +# [MOVE[https://tools.ietf.org/html/rfc6851]]:: +# Gulbrandsen, A. and N. Freed, Ed., "Internet Message Access Protocol +# (\IMAP) - MOVE Extension", RFC 6851, DOI 10.17487/RFC6851, January 2013, +# . +# [UTF8=ACCEPT[https://tools.ietf.org/html/rfc6855]]:: +# [UTF8=ONLY[https://tools.ietf.org/html/rfc6855]]:: +# Resnick, P., Ed., Newman, C., Ed., and S. Shen, Ed., +# "IMAP Support for UTF-8", RFC 6855, DOI 10.17487/RFC6855, March 2013, +# . +# [CONDSTORE[https://tools.ietf.org/html/rfc7162]]:: +# [QRESYNC[https://tools.ietf.org/html/rfc7162]]:: +# Melnikov, A. and D. Cridland, "IMAP Extensions: Quick Flag Changes +# Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization +# (QRESYNC)", RFC 7162, DOI 10.17487/RFC7162, May 2014, +# . +# [OBJECTID[https://tools.ietf.org/html/rfc8474]]:: +# Gondwana, B., Ed., "IMAP Extension for Object Identifiers", +# RFC 8474, DOI 10.17487/RFC8474, September 2018, +# . +# +# === IANA registries +# * {IMAP Capabilities}[http://www.iana.org/assignments/imap4-capabilities] +# * {IMAP Response Codes}[https://www.iana.org/assignments/imap-response-codes/imap-response-codes.xhtml] +# * {IMAP Mailbox Name Attributes}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml] +# * {IMAP and JMAP Keywords}[https://www.iana.org/assignments/imap-jmap-keywords/imap-jmap-keywords.xhtml] +# * {IMAP Threading Algorithms}[https://www.iana.org/assignments/imap-threading-algorithms/imap-threading-algorithms.xhtml] +# * {SASL Mechanisms and SASL SCRAM Family Mechanisms}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# * {Service Name and Transport Protocol Port Number Registry}[https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml]: +# +imap+: tcp/143, +imaps+: tcp/993 +# * {GSSAPI/Kerberos/SASL Service Names}[https://www.iana.org/assignments/gssapi-service-names/gssapi-service-names.xhtml]: +# +imap+ +# * {Character sets}[https://www.iana.org/assignments/character-sets/character-sets.xhtml] +# ===== For currently unsupported features: +# * {IMAP Quota Resource Types}[http://www.iana.org/assignments/imap4-capabilities#imap-capabilities-2] +# * {LIST-EXTENDED options and responses}[https://www.iana.org/assignments/imap-list-extended/imap-list-extended.xhtml] +# * {IMAP METADATA Server Entry and Mailbox Entry Registries}[https://www.iana.org/assignments/imap-metadata/imap-metadata.xhtml] +# * {IMAP ANNOTATE Extension Entries and Attributes}[https://www.iana.org/assignments/imap-annotate-extension/imap-annotate-extension.xhtml] +# * {IMAP URLAUTH Access Identifiers and Prefixes}[https://www.iana.org/assignments/urlauth-access-ids/urlauth-access-ids.xhtml] +# * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml] +# +# source://net-imap//lib/net/imap.rb#719 +class Net::IMAP < ::Net::Protocol + include ::Net::IMAP::DeprecatedClientOptions + include ::MonitorMixin + include ::OpenSSL + include ::OpenSSL::SSL + extend ::Net::IMAP::Authenticators + + # Creates a new Net::IMAP object and connects it to the specified + # +host+. + # + # ==== Options + # + # Accepts the following options: + # + # [port] + # Port number. Defaults to 993 when +ssl+ is truthy, and 143 otherwise. + # + # [ssl] + # If +true+, the connection will use TLS with the default params set by + # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]. + # If +ssl+ is a hash, it's passed to + # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]; + # the keys are names of attribute assignment methods on + # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. For example: + # + # [{ca_file}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_file]] + # The path to a file containing a PEM-format CA certificate. + # [{ca_path}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_path]] + # The path to a directory containing CA certificates in PEM format. + # [{min_version}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]] + # Sets the lower bound on the supported SSL/TLS protocol version. Set to + # an +OpenSSL+ constant such as +OpenSSL::SSL::TLS1_2_VERSION+, + # [{verify_mode}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]] + # SSL session verification mode. Valid modes include + # +OpenSSL::SSL::VERIFY_PEER+ and +OpenSSL::SSL::VERIFY_NONE+. + # + # See {OpenSSL::SSL::SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] for other valid SSL context params. + # + # See DeprecatedClientOptions.new for deprecated SSL arguments. + # + # [config] + # A Net::IMAP::Config object to use as the basis for #config. By default, + # the global Net::IMAP.config is used. + # + # >>> + # *NOTE:* +config+ does not set #config directly---it sets the _parent_ + # config for inheritance. Every client creates its own unique #config. + # + # All other keyword arguments are forwarded to Net::IMAP::Config.new, to + # initialize the client's #config. For example: + # + # [{open_timeout}[rdoc-ref:Config#open_timeout]] + # Seconds to wait until a connection is opened + # [{idle_response_timeout}[rdoc-ref:Config#idle_response_timeout]] + # Seconds to wait until an IDLE response is received + # + # See Net::IMAP::Config for other valid options. + # + # ==== Examples + # + # Connect to cleartext port 143 at mail.example.com and receive the server greeting: + # imap = Net::IMAP.new('mail.example.com', ssl: false) # => # + # imap.port => 143 + # imap.tls_verified? => false + # imap.greeting => name: ("OK" | "PREAUTH") => status + # status # => "OK" + # # The client is connected in the "Not Authenticated" state. + # + # Connect with TLS to port 993 + # imap = Net::IMAP.new('mail.example.com', ssl: true) # => # + # imap.port => 993 + # imap.tls_verified? => true + # imap.greeting => name: (/OK/i | /PREAUTH/i) => status + # case status + # in /OK/i + # # The client is connected in the "Not Authenticated" state. + # imap.authenticate("PLAIN", "joe_user", "joes_password") + # in /PREAUTH/i + # # The client is connected in the "Authenticated" state. + # end + # + # Connect with prior authentication, for example using an SSL certificate: + # ssl_ctx_params = { + # cert: OpenSSL::X509::Certificate.new(File.read("client.crt")), + # key: OpenSSL::PKey::EC.new(File.read('client.key')), + # extra_chain_cert: [ + # OpenSSL::X509::Certificate.new(File.read("intermediate.crt")), + # ], + # } + # imap = Net::IMAP.new('mail.example.com', ssl: ssl_ctx_params) + # imap.port => 993 + # imap.tls_verified? => true + # imap.greeting => name: "PREAUTH" + # # The client is connected in the "Authenticated" state. + # + # ==== Exceptions + # + # The most common errors are: + # + # [Errno::ECONNREFUSED] + # Connection refused by +host+ or an intervening firewall. + # [Errno::ETIMEDOUT] + # Connection timed out (possibly due to packets being dropped by an + # intervening firewall). + # [Errno::ENETUNREACH] + # There is no route to that network. + # [SocketError] + # Hostname not known or other socket error. + # [Net::IMAP::ByeResponseError] + # Connected to the host successfully, but it immediately said goodbye. + # + # @return [IMAP] a new instance of IMAP + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#72 + def initialize(host, port_or_options = T.unsafe(nil), *deprecated, **options); end + + # Adds a response handler. For example, to detect when + # the server sends a new EXISTS response (which normally + # indicates new messages being added to the mailbox), + # add the following handler after selecting the + # mailbox: + # + # imap.add_response_handler { |resp| + # if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS" + # puts "Mailbox now has #{resp.data} messages" + # end + # } + # + # Related: #remove_response_handler, #response_handlers + # + # @raise [ArgumentError] + # + # source://net-imap//lib/net/imap.rb#2614 + def add_response_handler(handler = T.unsafe(nil), &block); end + + # Sends an {APPEND command [IMAP4rev1 §6.3.11]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.11] + # to append the +message+ to the end of the +mailbox+. The optional +flags+ + # argument is an array of flags initially passed to the new message. The + # optional +date_time+ argument specifies the creation time to assign to the + # new message; it defaults to the current time. + # + # For example: + # + # imap.append("inbox", <"AUTH=#{mechanism.to_s.upcase}". When + # available, cached capabilities are used without sending a new #capability + # command to the server. + # + # imap.capable? "AUTH=PLAIN" # => true + # imap.auth_capable? "PLAIN" # => true + # imap.auth_capable? "blurdybloop" # => false + # + # Related: #authenticate, #auth_mechanisms, #capable?, #capabilities + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1059 + def auth_capable?(mechanism); end + + # Returns the #authenticate mechanisms that the server claims to support. + # These are derived from the #capabilities with an AUTH= prefix. + # + # This may be different when the connection is cleartext or using TLS. Most + # servers will drop all AUTH= mechanisms from #capabilities after + # the connection has authenticated. + # + # imap = Net::IMAP.new(hostname, ssl: false) + # imap.capabilities # => ["IMAP4REV1", "LOGINDISABLED"] + # imap.auth_mechanisms # => [] + # + # imap.starttls + # imap.capabilities # => ["IMAP4REV1", "AUTH=PLAIN", "AUTH=XOAUTH2", + # # "AUTH=OAUTHBEARER"] + # imap.auth_mechanisms # => ["PLAIN", "XOAUTH2", "OAUTHBEARER"] + # + # imap.authenticate("XOAUTH2", username, oauth2_access_token) + # imap.auth_mechanisms # => [] + # + # Related: #authenticate, #auth_capable?, #capabilities + # + # source://net-imap//lib/net/imap.rb#1042 + def auth_mechanisms; end + + # :call-seq: + # authenticate(mechanism, *, sasl_ir: config.sasl_ir, registry: Net::IMAP::SASL.authenticators, **, &) -> ok_resp + # + # Sends an {AUTHENTICATE command [IMAP4rev1 §6.2.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.2] + # to authenticate the client. If successful, the connection enters the + # "_authenticated_" state. + # + # +mechanism+ is the name of the \SASL authentication mechanism to be used. + # + # +sasl_ir+ allows or disallows sending an "initial response" (see the + # +SASL-IR+ capability, below). Defaults to the #config value for + # {sasl_ir}[rdoc-ref:Config#sasl_ir], which defaults to +true+. + # + # All other arguments are forwarded to the registered SASL authenticator for + # the requested mechanism. The documentation for each individual + # mechanism must be consulted for its specific parameters. + # + # Related: #login, #starttls, #auth_capable?, #auth_mechanisms + # + # ==== Mechanisms + # + # Each mechanism has different properties and requirements. Please consult + # the documentation for the specific mechanisms you are using: + # + # +ANONYMOUS+:: + # See AnonymousAuthenticator[rdoc-ref:Net::IMAP::SASL::AnonymousAuthenticator]. + # + # Allows the user to gain access to public services or resources without + # authenticating or disclosing an identity. + # + # +EXTERNAL+:: + # See ExternalAuthenticator[rdoc-ref:Net::IMAP::SASL::ExternalAuthenticator]. + # + # Authenticates using already established credentials, such as a TLS + # certificate or IPsec. + # + # +OAUTHBEARER+:: + # See OAuthBearerAuthenticator[rdoc-ref:Net::IMAP::SASL::OAuthBearerAuthenticator]. + # + # Login using an OAuth2 Bearer token. This is the standard mechanism + # for using OAuth2 with \SASL, but it is not yet deployed as widely as + # +XOAUTH2+. + # + # +PLAIN+:: + # See PlainAuthenticator[rdoc-ref:Net::IMAP::SASL::PlainAuthenticator]. + # + # Login using clear-text username and password. + # + # +SCRAM-SHA-1+:: + # +SCRAM-SHA-256+:: + # See ScramAuthenticator[rdoc-ref:Net::IMAP::SASL::ScramAuthenticator]. + # + # Login by username and password. The password is not sent to the + # server but is used in a salted challenge/response exchange. + # +SCRAM-SHA-1+ and +SCRAM-SHA-256+ are directly supported by + # Net::IMAP::SASL. New authenticators can easily be added for any other + # SCRAM-* mechanism if the digest algorithm is supported by + # OpenSSL::Digest. + # + # +XOAUTH2+:: + # See XOAuth2Authenticator[rdoc-ref:Net::IMAP::SASL::XOAuth2Authenticator]. + # + # Login using a username and an OAuth2 access token. Non-standard and + # obsoleted by +OAUTHBEARER+, but widely supported. + # + # See the {SASL mechanism + # registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] + # for a list of all SASL mechanisms and their specifications. To register + # new authenticators, see Authenticators. + # + # ===== Deprecated mechanisms + # + # Obsolete mechanisms should be avoided, but are still available for + # backwards compatibility. See Net::IMAP::SASL@Deprecated+mechanisms. + # Using a deprecated mechanism will print a warning. + # + # ==== Capabilities + # + # "AUTH=#{mechanism}" capabilities indicate server support for + # mechanisms. Use #auth_capable? or #auth_mechanisms to check for support + # before using a particular mechanism. + # + # if imap.auth_capable? "XOAUTH2" + # imap.authenticate "XOAUTH2", username, oauth2_access_token + # elsif imap.auth_capable? "PLAIN" + # imap.authenticate "PLAIN", username, password + # elsif !imap.capability? "LOGINDISABLED" + # imap.login username, password + # else + # raise "No acceptable authentication mechanism is available" + # end + # + # Although servers should list all supported \SASL mechanisms, they may + # allow authentication with an unlisted +mechanism+. + # + # If [SASL-IR[https://www.rfc-editor.org/rfc/rfc4959.html]] is supported + # and the appropriate "AUTH=#{mechanism}" capability is present, + # an "initial response" may be sent as an argument to the +AUTHENTICATE+ + # command, saving a round-trip. The SASL exchange allows for server + # challenges and client responses, but many mechanisms expect the client to + # "respond" first. The initial response will only be sent for + # "client-first" mechanisms. + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Previously cached #capabilities will be cleared when this method + # completes. If the TaggedResponse to #authenticate includes updated + # capabilities, they will be cached. + # + # source://net-imap//lib/net/imap.rb#1339 + def authenticate(mechanism, *creds, sasl_ir: T.unsafe(nil), **props, &callback); end + + # Returns the server capabilities. When available, cached capabilities are + # used without sending a new #capability command to the server. + # + # To ensure a case-insensitive comparison, #capable? can be used instead. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #auth_capable?, #auth_mechanisms, #capability, #enable + # + # source://net-imap//lib/net/imap.rb#1018 + def capabilities; end + + # Returns whether capabilities have been cached. When true, #capable? and + # #capabilities don't require sending a #capability command to the server. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #capability, #clear_cached_capabilities + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1069 + def capabilities_cached?; end + + # Sends a {CAPABILITY command [IMAP4rev1 §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] + # and returns an array of capabilities that are supported by the server. + # The result is stored for use by #capable? and #capabilities. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # Net::IMAP automatically stores and discards capability data according to + # the requirements and recommendations in + # {IMAP4rev2 §6.1.1}[https://www.rfc-editor.org/rfc/rfc9051#section-6.1.1], + # {§6.2}[https://www.rfc-editor.org/rfc/rfc9051#section-6.2], and + # {§7.1}[https://www.rfc-editor.org/rfc/rfc9051#section-7.1]. + # Use #capable?, #auth_capable?, or #capabilities to this cache and avoid + # sending the #capability command unnecessarily. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #capable?, #auth_capable?, #capability, #enable + # + # source://net-imap//lib/net/imap.rb#1107 + def capability; end + + # Returns whether the server supports a given +capability+. When available, + # cached #capabilities are used without sending a new #capability command to + # the server. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #auth_capable?, #capabilities, #capability, #enable + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1004 + def capability?(capability); end + + # Returns whether the server supports a given +capability+. When available, + # cached #capabilities are used without sending a new #capability command to + # the server. + # + # *NOTE:* Most Net::IMAP methods do not _currently_ modify their + # behaviour according to the server's advertised #capabilities. + # + # See Net::IMAP@Capabilities for more about \IMAP capabilities. + # + # Related: #auth_capable?, #capabilities, #capability, #enable + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#1004 + def capable?(capability); end + + # Sends a {CHECK command [IMAP4rev1 §6.4.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.1] + # to request a checkpoint of the currently selected mailbox. This performs + # implementation-specific housekeeping; for instance, reconciling the + # mailbox's in-memory and on-disk state. + # + # Related: #idle, #noop + # + # source://net-imap//lib/net/imap.rb#1882 + def check; end + + # Clears capabilities that have been remembered by the Net::IMAP client. + # This forces a #capability command to be sent the next time a #capabilities + # query method is called. + # + # Net::IMAP automatically discards its cached capabilities when they can + # change. Explicitly calling this _should_ be unnecessary for well-behaved + # servers. + # + # Related: #capable?, #capability, #capabilities_cached? + # + # source://net-imap//lib/net/imap.rb#1082 + def clear_cached_capabilities; end + + # :call-seq: + # clear_responses -> hash + # clear_responses(type) -> array + # + # Clears and returns the unhandled #responses hash or the unhandled + # responses array for a single response +type+. + # + # Clearing responses is synchronized with other threads. The lock is + # released before returning. + # + # Related: #responses, #response_handlers + # + # source://net-imap//lib/net/imap.rb#2571 + def clear_responses(type = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#957 + def client_thread; end + + # Sends a {CLOSE command [IMAP4rev1 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] + # to close the currently selected mailbox. The CLOSE command permanently + # removes from the mailbox all messages that have the \\Deleted + # flag set. + # + # Related: #unselect + # + # source://net-imap//lib/net/imap.rb#1892 + def close; end + + # The client configuration. See Net::IMAP::Config. + # + # By default, the client's local configuration inherits from the global + # Net::IMAP.config. + # + # source://net-imap//lib/net/imap.rb#772 + def config; end + + # Sends a {COPY command [IMAP4rev1 §6.4.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.7] + # to copy the specified message(s) to the end of the specified destination + # +mailbox+. The +set+ parameter is a number, an array of numbers, or a + # Range object. The number is a message sequence number. + # + # Related: #uid_copy + # + # ===== Capabilities + # + # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is + # supported, the server's response should include a +COPYUID+ response code + # with UIDPlusData. This will report the UIDVALIDITY of the destination + # mailbox, the UID set of the source messages, and the assigned UID set of + # the moved messages. + # + # source://net-imap//lib/net/imap.rb#2197 + def copy(set, mailbox); end + + # Sends a {CREATE command [IMAP4rev1 §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] + # to create a new +mailbox+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with that name + # cannot be created. + # + # Related: #rename, #delete + # + # source://net-imap//lib/net/imap.rb#1466 + def create(mailbox); end + + # Sends a {DELETE command [IMAP4rev1 §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] + # to remove the +mailbox+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with that name + # cannot be deleted, either because it does not exist or because the + # client does not have permission to delete it. + # + # Related: #create, #rename + # + # source://net-imap//lib/net/imap.rb#1478 + def delete(mailbox); end + + # Disconnects from the server. + # + # Related: #logout, #logout! + # + # source://net-imap//lib/net/imap.rb#965 + def disconnect; end + + # Returns true if disconnected from the server. + # + # Related: #logout, #disconnect + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#990 + def disconnected?; end + + # Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1] + # {[IMAP4rev2 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.1] + # to enable the specified server +capabilities+. Each capability may be an + # array, string, or symbol. Returns a list of the capabilities that were + # enabled. + # + # The +ENABLE+ command is only valid in the _authenticated_ state, before + # any mailbox is selected. + # + # Related: #capable?, #capabilities, #capability + # + # ===== Capabilities + # + # The server's capabilities must include + # +ENABLE+ [RFC5161[https://tools.ietf.org/html/rfc5161]] + # or +IMAP4REV2+ [RFC9051[https://tools.ietf.org/html/rfc9051]]. + # + # Additionally, the server capabilities must include a capability matching + # each enabled extension (usually the same name as the enabled extension). + # The following capabilities may be enabled: + # + # [+CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]] + # + # Updates various commands to return +CONDSTORE+ extension responses. It + # is not necessary to explicitly enable +CONDSTORE+—using any of the + # command parameters defined by the extension will implicitly enable it. + # See {[RFC7162 §3.1]}[https://www.rfc-editor.org/rfc/rfc7162.html#section-3.1]. + # + # [+:utf8+ --- an alias for "UTF8=ACCEPT"] + # + # In a future release, enable(:utf8) will enable either + # "UTF8=ACCEPT" or "IMAP4rev2", depending on server + # capabilities. + # + # ["UTF8=ACCEPT" [RFC6855[https://tools.ietf.org/html/rfc6855]]] + # + # The server's capabilities must include UTF8=ACCEPT _or_ + # UTF8=ONLY. + # + # This allows the server to send strings encoded as UTF-8 which might + # otherwise need to use a 7-bit encoding, such as {modified + # UTF-7}[::decode_utf7] for mailbox names, or RFC2047 encoded-words for + # message headers. + # + # *Note:* A future update may set string encodings slightly + # differently, e.g: "US-ASCII" when UTF-8 is not enabled, and "UTF-8" + # when it is. Currently, the encoding of strings sent as "quoted" or + # "text" will _always_ be "UTF-8", even when only ASCII characters are + # used (e.g. "Subject: Agenda") And currently, string "literals" sent + # by the server will always have an "ASCII-8BIT" (binary) + # encoding, even if they generally contain UTF-8 data, if they are + # text at all. + # + # ["UTF8=ONLY" [RFC6855[https://tools.ietf.org/html/rfc6855]]] + # + # A server that reports the UTF8=ONLY capability _requires_ that + # the client enable("UTF8=ACCEPT") before any mailboxes may be + # selected. For convenience, enable("UTF8=ONLY") is aliased to + # enable("UTF8=ACCEPT"). + # + # ===== Unsupported capabilities + # + # *Note:* Some extensions that use ENABLE permit the server to send syntax + # that Net::IMAP cannot parse, which may raise an exception and disconnect. + # Some extensions may work, but the support may be incomplete, untested, or + # experimental. + # + # Until a capability is documented here as supported, enabling it may result + # in undocumented behavior and a future release may update with incompatible + # behavior without warning or deprecation. + # + # Caution is advised. + # + # source://net-imap//lib/net/imap.rb#2408 + def enable(*capabilities); end + + # Sends a {EXAMINE command [IMAP4rev1 §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] + # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. + # Behaves the same as #select, except that the selected +mailbox+ is + # identified as read-only. + # + # A Net::IMAP::NoResponseError is raised if the mailbox does not + # exist or is for some reason non-examinable. + # + # Related: #select + # + # source://net-imap//lib/net/imap.rb#1450 + def examine(mailbox, condstore: T.unsafe(nil)); end + + # Sends an {EXPUNGE command [IMAP4rev1 §6.4.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.3] + # Sends a EXPUNGE command to permanently remove from the currently + # selected mailbox all messages that have the \Deleted flag set. + # + # Related: #uid_expunge + # + # source://net-imap//lib/net/imap.rb#1917 + def expunge; end + + # :call-seq: + # fetch(set, attr, changedsince: nil) -> array of FetchData + # + # Sends a {FETCH command [IMAP4rev1 §6.4.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.5] + # to retrieve data associated with a message in the mailbox. + # + # The +set+ parameter is a number or a range between two numbers, + # or an array of those. The number is a message sequence number, + # where -1 represents a '*' for use in range notation like 100..-1 + # being interpreted as '100:*'. Beware that the +exclude_end?+ + # property of a Range object is ignored, and the contents of a + # range are independent of the order of the range endpoints as per + # the protocol specification, so 1...5, 5..1 and 5...1 are all + # equivalent to 1..5. + # + # +attr+ is a list of attributes to fetch; see the documentation + # for FetchData for a list of valid attributes. + # + # +changedsince+ is an optional integer mod-sequence. It limits results to + # messages with a mod-sequence greater than +changedsince+. + # + # The return value is an array of FetchData. + # + # Related: #uid_search, FetchData + # + # ===== For example: + # + # p imap.fetch(6..8, "UID") + # #=> [#98}>, \\ + # #99}>, \\ + # #100}>] + # p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]") + # #=> [#"Subject: test\r\n\r\n"}>] + # data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0] + # p data.seqno + # #=> 6 + # p data.attr["RFC822.SIZE"] + # #=> 611 + # p data.attr["INTERNALDATE"] + # #=> "12-Oct-2000 22:40:59 +0900" + # p data.attr["UID"] + # #=> 98 + # + # ===== Capabilities + # + # Many extensions define new message +attr+ names. See FetchData for a list + # of supported extension fields. + # + # The server's capabilities must include +CONDSTORE+ + # {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the + # +changedsince+ argument. Using +changedsince+ implicitly enables the + # +CONDSTORE+ extension. + # + # source://net-imap//lib/net/imap.rb#2092 + def fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end + + # Sends a {GETACL command [RFC4314 §3.3]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.3] + # along with a specified +mailbox+. If this mailbox exists, an array + # containing objects of MailboxACLItem will be returned. + # + # Related: #setacl, MailboxACLItem + # + # ===== Capabilities + # + # The server's capabilities must include +ACL+ + # [RFC4314[https://tools.ietf.org/html/rfc4314]]. + # + # source://net-imap//lib/net/imap.rb#1746 + def getacl(mailbox); end + + # Sends a {GETQUOTA command [RFC2087 §4.2]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.2] + # along with specified +mailbox+. If this mailbox exists, then an array + # containing a MailboxQuota object is returned. This command is generally + # only available to server admin. + # + # Related: #getquotaroot, #setquota, MailboxQuota + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1690 + def getquota(mailbox); end + + # Sends a {GETQUOTAROOT command [RFC2087 §4.3]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.3] + # along with the specified +mailbox+. This command is generally available + # to both admin and user. If this mailbox exists, it returns an array + # containing objects of type MailboxQuotaRoot and MailboxQuota. + # + # Related: #getquota, #setquota, MailboxQuotaRoot, MailboxQuota + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1669 + def getquotaroot(mailbox); end + + # Returns the initial greeting the server, an UntaggedResponse. + # + # source://net-imap//lib/net/imap.rb#766 + def greeting; end + + # The hostname this client connected to + # + # source://net-imap//lib/net/imap.rb#783 + def host; end + + # Sends an {ID command [RFC2971 §3.1]}[https://www.rfc-editor.org/rfc/rfc2971#section-3.1] + # and returns a hash of the server's response, or nil if the server does not + # identify itself. + # + # Note that the user should first check if the server supports the ID + # capability. For example: + # + # if capable?(:ID) + # id = imap.id( + # name: "my IMAP client (ruby)", + # version: MyIMAP::VERSION, + # "support-url": "mailto:bugs@example.com", + # os: RbConfig::CONFIG["host_os"], + # ) + # end + # + # See [ID[https://tools.ietf.org/html/rfc2971]] for field definitions. + # + # ===== Capabilities + # + # The server's capabilities must include +ID+ + # [RFC2971[https://tools.ietf.org/html/rfc2971]]. + # + # source://net-imap//lib/net/imap.rb#1136 + def id(client_id = T.unsafe(nil)); end + + # Sends an {IDLE command [RFC2177 §3]}[https://www.rfc-editor.org/rfc/rfc6851#section-3] + # {[IMAP4rev2 §6.3.13]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.3.13] + # that waits for notifications of new or expunged messages. Yields + # responses from the server during the IDLE. + # + # Use #idle_done to leave IDLE. + # + # If +timeout+ is given, this method returns after +timeout+ seconds passed. + # +timeout+ can be used for keep-alive. For example, the following code + # checks the connection for each 60 seconds. + # + # loop do + # imap.idle(60) do |response| + # do_something_with(response) + # imap.idle_done if some_condition?(response) + # end + # end + # + # Returns the server's response to indicate the IDLE state has ended. + # Returns +nil+ if the server does not respond to #idle_done within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds. + # + # Related: #idle_done, #noop, #check + # + # ===== Capabilities + # + # The server's capabilities must include +IDLE+ + # [RFC2177[https://tools.ietf.org/html/rfc2177]]. + # + # @raise [LocalJumpError] + # + # source://net-imap//lib/net/imap.rb#2452 + def idle(timeout = T.unsafe(nil), &response_handler); end + + # Leaves IDLE, allowing #idle to return. + # + # If the server does not respond within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds, #idle will return +nil+. + # + # Related: #idle + # + # source://net-imap//lib/net/imap.rb#2488 + def idle_done; end + + # Seconds to wait until an IDLE response is received. + # + # source://net-imap//lib/net/imap.rb#780 + def idle_response_timeout; end + + # Sends a {LIST command [IMAP4rev1 §6.3.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.8] + # and returns a subset of names from the complete set of all names available + # to the client. +refname+ provides a context (for instance, a base + # directory in a directory-based mailbox hierarchy). +mailbox+ specifies a + # mailbox or (via wildcards) mailboxes under that context. Two wildcards + # may be used in +mailbox+: "*", which matches all characters + # *including* the hierarchy delimiter (for instance, "/" on a UNIX-hosted + # directory-based mailbox hierarchy); and "%", which matches all + # characters *except* the hierarchy delimiter. + # + # If +refname+ is empty, +mailbox+ is used directly to determine + # which mailboxes to match. If +mailbox+ is empty, the root + # name of +refname+ and the hierarchy delimiter are returned. + # + # The return value is an array of MailboxList. + # + # Related: #lsub, MailboxList + # + # ===== For example: + # + # imap.create("foo/bar") + # imap.create("foo/baz") + # p imap.list("", "foo/%") + # #=> [#, \\ + # #, \\ + # #] + # + # -- + # TODO: support LIST-EXTENDED extension [RFC5258]. Needed for IMAP4rev2. + # ++ + # + # source://net-imap//lib/net/imap.rb#1550 + def list(refname, mailbox); end + + # Sends a {LOGIN command [IMAP4rev1 §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3] + # to identify the client and carries the plaintext +password+ authenticating + # this +user+. If successful, the connection enters the "_authenticated_" + # state. + # + # Using #authenticate {should be + # preferred}[https://www.rfc-editor.org/rfc/rfc9051.html#name-login-command] + # over #login. The LOGIN command is not the same as #authenticate with the + # "LOGIN" +mechanism+. + # + # A Net::IMAP::NoResponseError is raised if authentication fails. + # + # Related: #authenticate, #starttls + # + # ===== Capabilities + # + # An IMAP client MUST NOT call #login when the server advertises the + # +LOGINDISABLED+ capability. + # + # if imap.capability? "LOGINDISABLED" + # raise "Remote server has disabled the login command" + # else + # imap.login username, password + # end + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Cached capabilities _must_ be invalidated after this method completes. + # The TaggedResponse to #login may include updated capabilities in its + # ResponseCode. + # + # source://net-imap//lib/net/imap.rb#1394 + def login(user, password); end + + # Sends a {LOGOUT command [IMAP4rev1 §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] + # to inform the command to inform the server that the client is done with + # the connection. + # + # Related: #disconnect, #logout! + # + # source://net-imap//lib/net/imap.rb#1164 + def logout; end + + # Calls #logout then, after receiving the TaggedResponse for the +LOGOUT+, + # calls #disconnect. Returns the TaggedResponse from +LOGOUT+. Returns + # +nil+ when the client is already disconnected, in contrast to #logout + # which raises an exception. + # + # If #logout raises a StandardError, a warning will be printed but the + # exception will not be re-raised. + # + # This is useful in situations where the connection must be dropped, for + # example for security or after tests. If logout errors need to be handled, + # use #logout and #disconnect instead. + # + # Related: #logout, #disconnect + # + # source://net-imap//lib/net/imap.rb#1181 + def logout!; end + + # Sends a {LSUB command [IMAP4rev1 §6.3.9]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.9] + # and returns a subset of names from the set of names that the user has + # declared as being "active" or "subscribed." +refname+ and +mailbox+ are + # interpreted as for #list. + # + # The return value is an array of MailboxList objects. + # + # Related: #subscribe, #unsubscribe, #list, MailboxList + # + # source://net-imap//lib/net/imap.rb#1761 + def lsub(refname, mailbox); end + + # Sends a {MOVE command [RFC6851 §3.1]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.1] + # {[IMAP4rev2 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.8] + # to move the specified message(s) to the end of the specified destination + # +mailbox+. The +set+ parameter is a number, an array of numbers, or a + # Range object. The number is a message sequence number. + # + # Related: #uid_move + # + # ===== Capabilities + # + # The server's capabilities must include +MOVE+ + # [RFC6851[https://tools.ietf.org/html/rfc6851]]. + # + # If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is + # supported, the server's response should include a +COPYUID+ response code + # with UIDPlusData. This will report the UIDVALIDITY of the destination + # mailbox, the UID set of the source messages, and the assigned UID set of + # the moved messages. + # + # source://net-imap//lib/net/imap.rb#2233 + def move(set, mailbox); end + + # Sends a {NAMESPACE command [RFC2342 §5]}[https://www.rfc-editor.org/rfc/rfc2342#section-5] + # and returns the namespaces that are available. The NAMESPACE command + # allows a client to discover the prefixes of namespaces used by a server + # for personal mailboxes, other users' mailboxes, and shared mailboxes. + # + # The return value is a Namespaces object which has +personal+, +other+, and + # +shared+ fields, each an array of Namespace objects. These arrays will be + # empty when the server responds with +nil+. + # + # Many \IMAP servers are configured with the default personal namespaces as + # ("" "/"): no prefix and the "+/+" hierarchy delimiter. In that + # common case, the naive client may not have any trouble naming mailboxes. + # But many servers are configured with the default personal namespace as + # e.g. ("INBOX." "."), placing all personal folders under INBOX, + # with "+.+" as the hierarchy delimiter. If the client does not check for + # this, but naively assumes it can use the same folder names for all + # servers, then folder creation (and listing, moving, etc) can lead to + # errors. + # + # From RFC2342[https://tools.ietf.org/html/rfc2342]: + # >>> + # Although typically a server will support only a single Personal + # Namespace, and a single Other User's Namespace, circumstances exist + # where there MAY be multiples of these, and a client MUST be prepared + # for them. If a client is configured such that it is required to create + # a certain mailbox, there can be circumstances where it is unclear which + # Personal Namespaces it should create the mailbox in. In these + # situations a client SHOULD let the user select which namespaces to + # create the mailbox in. + # + # Related: #list, Namespaces, Namespace + # + # ===== For example: + # + # if capable?("NAMESPACE") + # namespaces = imap.namespace + # if namespace = namespaces.personal.first + # prefix = namespace.prefix # e.g. "" or "INBOX." + # delim = namespace.delim # e.g. "/" or "." + # # personal folders should use the prefix and delimiter + # imap.create(prefix + "foo") + # imap.create(prefix + "bar") + # imap.create(prefix + %w[path to my folder].join(delim)) + # end + # end + # + # ===== Capabilities + # + # The server's capabilities must include +NAMESPACE+ + # [RFC2342[https://tools.ietf.org/html/rfc2342]]. + # + # source://net-imap//lib/net/imap.rb#1607 + def namespace; end + + # Sends a {NOOP command [IMAP4rev1 §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] + # to the server. + # + # This allows the server to send unsolicited untagged EXPUNGE #responses, + # but does not execute any client request. \IMAP servers are permitted to + # send unsolicited untagged responses at any time, except for +EXPUNGE+: + # + # * +EXPUNGE+ can only be sent while a command is in progress. + # * +EXPUNGE+ must _not_ be sent during #fetch, #store, or #search. + # * +EXPUNGE+ may be sent during #uid_fetch, #uid_store, or #uid_search. + # + # Related: #idle, #check + # + # source://net-imap//lib/net/imap.rb#1155 + def noop; end + + # Seconds to wait until a connection is opened. + # If the IMAP object cannot open a connection within this time, + # it raises a Net::OpenTimeout exception. The default value is 30 seconds. + # + # source://net-imap//lib/net/imap.rb#777 + def open_timeout; end + + # The port this client connected to + # + # source://net-imap//lib/net/imap.rb#786 + def port; end + + # Removes the response handler. + # + # Related: #add_response_handler, #response_handlers + # + # source://net-imap//lib/net/imap.rb#2624 + def remove_response_handler(handler); end + + # Sends a {RENAME command [IMAP4rev1 §6.3.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.5] + # to change the name of the +mailbox+ to +newname+. + # + # A Net::IMAP::NoResponseError is raised if a mailbox with the + # name +mailbox+ cannot be renamed to +newname+ for whatever + # reason; for instance, because +mailbox+ does not exist, or + # because there is already a mailbox with the name +newname+. + # + # Related: #create, #delete + # + # source://net-imap//lib/net/imap.rb#1491 + def rename(mailbox, newname); end + + # Returns all response handlers, including those that are added internally + # by commands. Each response handler will be called with every new + # UntaggedResponse, TaggedResponse, and ContinuationRequest. + # + # Response handlers are called with a mutex inside the receiver thread. New + # responses cannot be processed and commands from other threads must wait + # until all response_handlers return. An exception will shut-down the + # receiver thread and close the connection. + # + # For thread-safety, the returned array is a frozen copy of the internal + # array. + # + # Related: #add_response_handler, #remove_response_handler + # + # source://net-imap//lib/net/imap.rb#2597 + def response_handlers; end + + # :call-seq: + # responses {|hash| ...} -> block result + # responses(type) {|array| ...} -> block result + # + # Yields unhandled responses and returns the result of the block. + # + # Unhandled responses are stored in a hash, with arrays of + # non-+nil+ UntaggedResponse#data keyed by UntaggedResponse#name + # and ResponseCode#data keyed by ResponseCode#name. Call without +type+ to + # yield the entire responses hash. Call with +type+ to yield only the array + # of responses for that type. + # + # For example: + # + # imap.select("inbox") + # p imap.responses("EXISTS", &:last) + # #=> 2 + # p imap.responses("UIDVALIDITY", &:last) + # #=> 968263756 + # + # >>> + # *Note:* Access to the responses hash is synchronized for thread-safety. + # The receiver thread and response_handlers cannot process new responses + # until the block completes. Accessing either the response hash or its + # response type arrays outside of the block is unsafe. + # + # Calling without a block is unsafe and deprecated. Future releases will + # raise ArgumentError unless a block is given. + # See Config#responses_without_block. + # + # Previously unhandled responses are automatically cleared before entering a + # mailbox with #select or #examine. Long-lived connections can receive many + # unhandled server responses, which must be pruned or they will continually + # consume more memory. Update or clear the responses hash or arrays inside + # the block, or use #clear_responses. + # + # Only non-+nil+ data is stored. Many important response codes have no data + # of their own, but are used as "tags" on the ResponseText object they are + # attached to. ResponseText will be accessible by its response types: + # "+OK+", "+NO+", "+BAD+", "+BYE+", or "+PREAUTH+". + # + # TaggedResponse#data is not saved to #responses, nor is any + # ResponseCode#data on tagged responses. Although some command methods do + # return the TaggedResponse directly, #add_response_handler must be used to + # handle all response codes. + # + # Related: #clear_responses, #response_handlers, #greeting + # + # source://net-imap//lib/net/imap.rb#2544 + def responses(type = T.unsafe(nil)); end + + # Sends a {SEARCH command [IMAP4rev1 §6.4.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.4] + # to search the mailbox for messages that match the given searching + # criteria, and returns message sequence numbers. +keys+ can either be a + # string holding the entire search string, or a single-dimension array of + # search keywords and arguments. + # + # Returns a SearchResult object. SearchResult inherits from Array (for + # backward compatibility) but adds SearchResult#modseq when the +CONDSTORE+ + # capability has been enabled. + # + # Related: #uid_search + # + # ===== Search criteria + # + # For a full list of search criteria, + # see [{IMAP4rev1 §6.4.4}[https://www.rfc-editor.org/rfc/rfc3501.html#section-6.4.4]], + # or [{IMAP4rev2 §6.4.4}[https://www.rfc-editor.org/rfc/rfc9051.html#section-6.4.4]], + # in addition to documentation for + # any [CAPABILITIES[https://www.iana.org/assignments/imap-capabilities/imap-capabilities.xhtml]] + # reported by #capabilities which may define additional search filters, e.g: + # +CONDSTORE+, +WITHIN+, +FILTERS+, SEARCH=FUZZY, +OBJECTID+, or + # +SAVEDATE+. The following are some common search criteria: + # + # :: a set of message sequence numbers. "," indicates + # an interval, "+:+" indicates a range. For instance, + # "2,10:12,15" means "2,10,11,12,15". + # + # BEFORE :: messages with an internal date strictly before + # . The date argument has a format similar + # to 8-Aug-2002, and can be formatted using + # Net::IMAP.format_date. + # + # BODY :: messages that contain within their body. + # + # CC :: messages containing in their CC field. + # + # FROM :: messages that contain in their FROM field. + # + # NEW:: messages with the \Recent, but not the \Seen, flag set. + # + # NOT :: negate the following search key. + # + # OR :: "or" two search keys together. + # + # ON :: messages with an internal date exactly equal to , + # which has a format similar to 8-Aug-2002. + # + # SINCE :: messages with an internal date on or after . + # + # SUBJECT :: messages with in their subject. + # + # TO :: messages with in their TO field. + # + # ===== For example: + # + # p imap.search(["SUBJECT", "hello", "NOT", "NEW"]) + # #=> [1, 6, 7, 8] + # + # ===== Capabilities + # + # If [CONDSTORE[https://www.rfc-editor.org/rfc/rfc7162.html]] is supported + # and enabled for the selected mailbox, a non-empty SearchResult will + # include a +MODSEQ+ value. + # imap.select("mbox", condstore: true) + # result = imap.search(["SUBJECT", "hi there", "not", "new") + # #=> Net::IMAP::SearchResult[1, 6, 7, 8, modseq: 5594] + # result.modseq # => 5594 + # + # source://net-imap//lib/net/imap.rb#2023 + def search(keys, charset = T.unsafe(nil)); end + + # Sends a {SELECT command [IMAP4rev1 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.1] + # to select a +mailbox+ so that messages in the +mailbox+ can be accessed. + # + # After you have selected a mailbox, you may retrieve the number of items in + # that mailbox from imap.responses("EXISTS", &:last), and the + # number of recent messages from imap.responses("RECENT", &:last). + # Note that these values can change if new messages arrive during a session + # or when existing messages are expunged; see #add_response_handler for a + # way to detect these events. + # + # When the +condstore+ keyword argument is true, the server is told to + # enable the extension. If +mailbox+ supports persistence of mod-sequences, + # the +HIGHESTMODSEQ+ ResponseCode will be sent as an untagged response to + # #select and all `FETCH` responses will include FetchData#modseq. + # Otherwise, the +NOMODSEQ+ ResponseCode will be sent. + # + # A Net::IMAP::NoResponseError is raised if the mailbox does not + # exist or is for some reason non-selectable. + # + # Related: #examine + # + # ===== Capabilities + # + # If [UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]] is supported, + # the server may return an untagged "NO" response with a "UIDNOTSTICKY" + # response code indicating that the mailstore does not support persistent + # UIDs: + # imap.responses("NO", &:last)&.code&.name == "UIDNOTSTICKY" + # + # If [CONDSTORE[https://www.rfc-editor.org/rfc/rfc7162.html]] is supported, + # the +condstore+ keyword parameter may be used. + # imap.select("mbox", condstore: true) + # modseq = imap.responses("HIGHESTMODSEQ", &:last) + # + # source://net-imap//lib/net/imap.rb#1432 + def select(mailbox, condstore: T.unsafe(nil)); end + + # Sends a {SETACL command [RFC4314 §3.1]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.1] + # along with +mailbox+, +user+ and the +rights+ that user is to have on that + # mailbox. If +rights+ is nil, then that user will be stripped of any + # rights to that mailbox. + # + # Related: #getacl + # + # ===== Capabilities + # + # The server's capabilities must include +ACL+ + # [RFC4314[https://tools.ietf.org/html/rfc4314]]. + # + # source://net-imap//lib/net/imap.rb#1728 + def setacl(mailbox, user, rights); end + + # Sends a {SETQUOTA command [RFC2087 §4.1]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.1] + # along with the specified +mailbox+ and +quota+. If +quota+ is nil, then + # +quota+ will be unset for that mailbox. Typically one needs to be logged + # in as a server admin for this to work. + # + # Related: #getquota, #getquotaroot + # + # ===== Capabilities + # + # The server's capabilities must include +QUOTA+ + # [RFC2087[https://tools.ietf.org/html/rfc2087]]. + # + # source://net-imap//lib/net/imap.rb#1708 + def setquota(mailbox, quota); end + + # Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # to search a mailbox for messages that match +search_keys+ and return an + # array of message sequence numbers, sorted by +sort_keys+. +search_keys+ + # are interpreted the same as for #search. + # + # -- + # TODO: describe +sort_keys+ + # ++ + # + # Related: #uid_sort, #search, #uid_search, #thread, #uid_thread + # + # ===== For example: + # + # p imap.sort(["FROM"], ["ALL"], "US-ASCII") + # #=> [1, 2, 3, 5, 6, 7, 8, 4, 9] + # p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII") + # #=> [6, 7, 8, 1] + # + # ===== Capabilities + # + # The server's capabilities must include +SORT+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2277 + def sort(sort_keys, search_keys, charset); end + + # Returns the + # {SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] + # used by the SSLSocket when TLS is attempted, even when the TLS handshake + # is unsuccessful. The context object will be frozen. + # + # Returns +nil+ for a plaintext connection. + # + # source://net-imap//lib/net/imap.rb#794 + def ssl_ctx; end + + # Returns the parameters that were sent to #ssl_ctx + # {set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params] + # when the connection tries to use TLS (even when unsuccessful). + # + # Returns +false+ for a plaintext connection. + # + # source://net-imap//lib/net/imap.rb#801 + def ssl_ctx_params; end + + # Sends a {STARTTLS command [IMAP4rev1 §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1] + # to start a TLS session. + # + # Any +options+ are forwarded directly to + # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]; + # the keys are names of attribute assignment methods on + # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. + # + # See DeprecatedClientOptions#starttls for deprecated arguments. + # + # This method returns after TLS negotiation and hostname verification are + # both successful. Any error indicates that the connection has not been + # secured. + # + # *Note:* + # >>> + # Any #response_handlers added before STARTTLS should be aware that the + # TaggedResponse to STARTTLS is sent clear-text, _before_ TLS negotiation. + # TLS starts immediately _after_ that response. Any response code sent + # with the response (e.g. CAPABILITY) is insecure and cannot be trusted. + # + # Related: Net::IMAP.new, #login, #authenticate + # + # ===== Capability + # Clients should not call #starttls unless the server advertises the + # +STARTTLS+ capability. + # + # Server capabilities may change after #starttls, #login, and #authenticate. + # Cached #capabilities will be cleared when this method completes. + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#104 + def starttls(*deprecated, **options); end + + # Sends a {STATUS command [IMAP4rev1 §6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10] + # and returns the status of the indicated +mailbox+. +attr+ is a list of one + # or more attributes whose statuses are to be requested. + # + # The return value is a hash of attributes. Most status attributes return + # integer values, but some return other value types (documented below). + # + # A Net::IMAP::NoResponseError is raised if status values + # for +mailbox+ cannot be returned; for instance, because it + # does not exist. + # + # ===== Supported attributes + # + # +MESSAGES+:: The number of messages in the mailbox. + # + # +UIDNEXT+:: The next unique identifier value of the mailbox. + # + # +UIDVALIDITY+:: The unique identifier validity value of the mailbox. + # + # +UNSEEN+:: The number of messages without the \Seen flag. + # + # +DELETED+:: The number of messages with the \Deleted flag. + # + # +SIZE+:: + # The approximate size of the mailbox---must be greater than or equal to + # the sum of all messages' +RFC822.SIZE+ fetch item values. + # + # +HIGHESTMODSEQ+:: + # The highest mod-sequence value of all messages in the mailbox. See + # +CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # +MAILBOXID+:: + # A server-allocated unique _string_ identifier for the mailbox. See + # +OBJECTID+ {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # +RECENT+:: + # The number of messages with the \Recent flag. + # _NOTE:_ +RECENT+ was removed from IMAP4rev2. + # + # Unsupported attributes may be requested. The attribute value will be + # either an Integer or an ExtensionData object. + # + # ===== For example: + # + # p imap.status("inbox", ["MESSAGES", "RECENT"]) + # #=> {"RECENT"=>0, "MESSAGES"=>44} + # + # ===== Capabilities + # + # +SIZE+ requires the server's capabilities to include either +IMAP4rev2+ or + # STATUS=SIZE + # {[RFC8483]}[https://www.rfc-editor.org/rfc/rfc8483.html]. + # + # +DELETED+ requires the server's capabilities to include +IMAP4rev2+. + # + # +HIGHESTMODSEQ+ requires the server's capabilities to include +CONDSTORE+ + # {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # +MAILBOXID+ requires the server's capabilities to include +OBJECTID+ + # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # source://net-imap//lib/net/imap.rb#1828 + def status(mailbox, attr); end + + # :call-seq: + # store(set, attr, value, unchangedsince: nil) -> array of FetchData + # + # Sends a {STORE command [IMAP4rev1 §6.4.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.6] + # to alter data associated with messages in the mailbox, in particular their + # flags. + # + # +set+ is a number, an array of numbers, or a Range object. Each number is + # a message sequence number. + # + # +attr+ is the name of a data item to store. The semantics of +value+ + # varies based on +attr+: + # * When +attr+ is "FLAGS", the flags in +value+ replace the + # message's flag list. + # * When +attr+ is "+FLAGS", the flags in +value+ are added to + # the flags for the message. + # * When +attr+ is "-FLAGS", the flags in +value+ are removed + # from the message. + # + # +unchangedsince+ is an optional integer mod-sequence. It prohibits any + # changes to messages with +mod-sequence+ greater than the specified + # +unchangedsince+ value. A SequenceSet of any messages that fail this + # check will be returned in a +MODIFIED+ ResponseCode. + # + # The return value is an array of FetchData. + # + # Related: #uid_store + # + # ===== For example: + # + # p imap.store(6..8, "+FLAGS", [:Deleted]) + # #=> [#[:Seen, :Deleted]}>, + # #[:Seen, :Deleted]}>, + # #[:Seen, :Deleted]}>] + # + # ===== Capabilities + # + # Extensions may define new data items to be used with #store. + # + # The server's capabilities must include +CONDSTORE+ + # {[RFC7162]}[https://tools.ietf.org/html/rfc7162] in order to use the + # +unchangedsince+ argument. Using +unchangedsince+ implicitly enables the + # +CONDSTORE+ extension. + # + # source://net-imap//lib/net/imap.rb#2161 + def store(set, attr, flags, unchangedsince: T.unsafe(nil)); end + + # Sends a {SUBSCRIBE command [IMAP4rev1 §6.3.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.6] + # to add the specified +mailbox+ name to the server's set of "active" or + # "subscribed" mailboxes as returned by #lsub. + # + # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be + # subscribed to; for instance, because it does not exist. + # + # Related: #unsubscribe, #lsub, #list + # + # source://net-imap//lib/net/imap.rb#1503 + def subscribe(mailbox); end + + # Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # to search a mailbox and return message sequence numbers in threaded + # format, as a ThreadMember tree. +search_keys+ are interpreted the same as + # for #search. + # + # The supported algorithms are: + # + # ORDEREDSUBJECT:: split into single-level threads according to subject, + # ordered by date. + # REFERENCES:: split into threads by parent/child relationships determined + # by which message is a reply to which. + # + # Unlike #search, +charset+ is a required argument. US-ASCII + # and UTF-8 are sample values. + # + # Related: #uid_thread, #search, #uid_search, #sort, #uid_sort + # + # ===== Capabilities + # + # The server's capabilities must include +THREAD+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2317 + def thread(algorithm, search_keys, charset); end + + # Returns true after the TLS negotiation has completed and the remote + # hostname has been verified. Returns false when TLS has been established + # but peer verification was disabled. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap.rb#955 + def tls_verified?; end + + # Sends a {UID COPY command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to copy the specified message(s) to the end of the specified destination + # +mailbox+. + # + # Similar to #copy, but +set+ contains unique identifiers. + # + # ===== Capabilities + # + # +UIDPLUS+ affects #uid_copy the same way it affects #copy. + # + # source://net-imap//lib/net/imap.rb#2210 + def uid_copy(set, mailbox); end + + # Sends a {UID EXPUNGE command [RFC4315 §2.1]}[https://www.rfc-editor.org/rfc/rfc4315#section-2.1] + # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] + # to permanently remove all messages that have both the \\Deleted + # flag set and a UID that is included in +uid_set+. + # + # By using #uid_expunge instead of #expunge when resynchronizing with + # the server, the client can ensure that it does not inadvertantly + # remove any messages that have been marked as \\Deleted by other + # clients between the time that the client was last connected and + # the time the client resynchronizes. + # + # *Note:* + # >>> + # Although the command takes a set of UIDs for its argument, the + # server still returns regular EXPUNGE responses, which contain + # a sequence number. These will be deleted from + # #responses and this method returns them as an array of + # sequence number integers. + # + # Related: #expunge + # + # ===== Capabilities + # + # The server's capabilities must include +UIDPLUS+ + # [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]]. + # + # source://net-imap//lib/net/imap.rb#1949 + def uid_expunge(uid_set); end + + # :call-seq: + # uid_fetch(set, attr, changedsince: nil) -> array of FetchData + # + # Sends a {UID FETCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to retrieve data associated with a message in the mailbox. + # + # Similar to #fetch, but the +set+ parameter contains unique identifiers + # instead of message sequence numbers. + # + # >>> + # *Note:* Servers _MUST_ implicitly include the +UID+ message data item as + # part of any +FETCH+ response caused by a +UID+ command, regardless of + # whether a +UID+ was specified as a message data item to the +FETCH+. + # + # Related: #fetch, FetchData + # + # ===== Capabilities + # Same as #fetch. + # + # source://net-imap//lib/net/imap.rb#2114 + def uid_fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end + + # Sends a {UID MOVE command [RFC6851 §3.2]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.2] + # {[IMAP4rev2 §6.4.9]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.9] + # to move the specified message(s) to the end of the specified destination + # +mailbox+. + # + # Similar to #move, but +set+ contains unique identifiers. + # + # Related: #move + # + # ===== Capabilities + # + # Same as #move: The server's capabilities must include +MOVE+ + # [RFC6851[https://tools.ietf.org/html/rfc6851]]. +UIDPLUS+ also affects + # #uid_move the same way it affects #move. + # + # source://net-imap//lib/net/imap.rb#2251 + def uid_move(set, mailbox); end + + # Sends a {UID SEARCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to search the mailbox for messages that match the given searching + # criteria, and returns unique identifiers (UIDs). + # + # Returns a SearchResult object. SearchResult inherits from Array (for + # backward compatibility) but adds SearchResult#modseq when the +CONDSTORE+ + # capability has been enabled. + # + # See #search for documentation of search criteria. + # + # source://net-imap//lib/net/imap.rb#2036 + def uid_search(keys, charset = T.unsafe(nil)); end + + # Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # to search a mailbox for messages that match +search_keys+ and return an + # array of unique identifiers, sorted by +sort_keys+. +search_keys+ are + # interpreted the same as for #search. + # + # Related: #sort, #search, #uid_search, #thread, #uid_thread + # + # ===== Capabilities + # + # The server's capabilities must include +SORT+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2292 + def uid_sort(sort_keys, search_keys, charset); end + + # :call-seq: + # uid_store(set, attr, value, unchangedsince: nil) -> array of FetchData + # + # Sends a {UID STORE command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] + # to alter data associated with messages in the mailbox, in particular their + # flags. + # + # Similar to #store, but +set+ contains unique identifiers instead of + # message sequence numbers. + # + # Related: #store + # + # ===== Capabilities + # Same as #store. + # + # source://net-imap//lib/net/imap.rb#2179 + def uid_store(set, attr, flags, unchangedsince: T.unsafe(nil)); end + + # Sends a {UID THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] + # Similar to #thread, but returns unique identifiers instead of + # message sequence numbers. + # + # Related: #thread, #search, #uid_search, #sort, #uid_sort + # + # ===== Capabilities + # + # The server's capabilities must include +THREAD+ + # [RFC5256[https://tools.ietf.org/html/rfc5256]]. + # + # source://net-imap//lib/net/imap.rb#2331 + def uid_thread(algorithm, search_keys, charset); end + + # Sends an {UNSELECT command [RFC3691 §2]}[https://www.rfc-editor.org/rfc/rfc3691#section-3] + # {[IMAP4rev2 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc9051#section-6.4.2] + # to free the session resources for a mailbox and return to the + # "_authenticated_" state. This is the same as #close, except that + # \\Deleted messages are not removed from the mailbox. + # + # Related: #close + # + # ===== Capabilities + # + # The server's capabilities must include +UNSELECT+ + # [RFC3691[https://tools.ietf.org/html/rfc3691]]. + # + # source://net-imap//lib/net/imap.rb#1908 + def unselect; end + + # Sends an {UNSUBSCRIBE command [IMAP4rev1 §6.3.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.7] + # to remove the specified +mailbox+ name from the server's set of "active" + # or "subscribed" mailboxes. + # + # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be + # unsubscribed from; for instance, because the client is not currently + # subscribed to it. + # + # Related: #subscribe, #lsub, #list + # + # source://net-imap//lib/net/imap.rb#1516 + def unsubscribe(mailbox); end + + # Sends a XLIST command, and returns a subset of names from + # the complete set of all names available to the client. + # +refname+ provides a context (for instance, a base directory + # in a directory-based mailbox hierarchy). +mailbox+ specifies + # a mailbox or (via wildcards) mailboxes under that context. + # Two wildcards may be used in +mailbox+: '*', which matches + # all characters *including* the hierarchy delimiter (for instance, + # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%', + # which matches all characters *except* the hierarchy delimiter. + # + # If +refname+ is empty, +mailbox+ is used directly to determine + # which mailboxes to match. If +mailbox+ is empty, the root + # name of +refname+ and the hierarchy delimiter are returned. + # + # The XLIST command is like the LIST command except that the flags + # returned refer to the function of the folder/mailbox, e.g. :Sent + # + # The return value is an array of MailboxList objects. For example: + # + # imap.create("foo/bar") + # imap.create("foo/baz") + # p imap.xlist("", "foo/%") + # #=> [#, \\ + # #, \\ + # #] + # + # Related: #list, MailboxList + # + # ===== Capabilities + # + # The server's capabilities must include +XLIST+, + # a deprecated Gmail extension (replaced by +SPECIAL-USE+). + # -- + # TODO: Net::IMAP doesn't yet have full SPECIAL-USE support. Supporting + # servers MAY return SPECIAL-USE attributes, but are not *required* to + # unless the SPECIAL-USE return option is supplied. + # ++ + # + # source://net-imap//lib/net/imap.rb#1651 + def xlist(refname, mailbox); end + + private + + # source://net-imap//lib/net/imap.rb#2964 + def build_ssl_ctx(ssl); end + + # NOTE: only call this for greeting, login, and authenticate + # + # source://net-imap//lib/net/imap.rb#2803 + def capabilities_from_resp_code(resp); end + + # source://net-imap//lib/net/imap.rb#2925 + def copy_internal(cmd, set, mailbox); end + + # source://net-imap//lib/net/imap.rb#2888 + def fetch_internal(cmd, set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2852 + def generate_tag; end + + # source://net-imap//lib/net/imap.rb#2766 + def get_response; end + + # @raise [Error] + # + # source://net-imap//lib/net/imap.rb#2645 + def get_server_greeting; end + + # source://net-imap//lib/net/imap.rb#2738 + def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2953 + def normalize_searching_criteria(keys); end + + # source://net-imap//lib/net/imap.rb#2857 + def put_string(str); end + + # source://net-imap//lib/net/imap.rb#2671 + def receive_responses; end + + # store name => [..., data] + # + # source://net-imap//lib/net/imap.rb#2790 + def record_untagged_response(resp); end + + # store code.name => [..., code.data] + # + # source://net-imap//lib/net/imap.rb#2796 + def record_untagged_response_code(resp); end + + # source://net-imap//lib/net/imap.rb#2993 + def sasl_adapter; end + + # source://net-imap//lib/net/imap.rb#2872 + def search_internal(cmd, keys, charset); end + + # source://net-imap//lib/net/imap.rb#2824 + def send_command(cmd, *args, &block); end + + # Calls send_command, yielding the text of each ContinuationRequest and + # responding with each block result. Returns TaggedResponse. Raises + # NoResponseError or BadResponseError. + # + # source://net-imap//lib/net/imap.rb#2815 + def send_command_with_continuations(cmd, *args); end + + # source://net-imap//lib/net/imap/command_data.rb#33 + def send_data(data, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#115 + def send_date_data(date); end + + # source://net-imap//lib/net/imap/command_data.rb#101 + def send_list_data(list, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#80 + def send_literal(str, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#97 + def send_number_data(num); end + + # source://net-imap//lib/net/imap/command_data.rb#76 + def send_quoted_string(str); end + + # source://net-imap//lib/net/imap/command_data.rb#54 + def send_string_data(str, tag = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/command_data.rb#118 + def send_symbol_data(symbol); end + + # source://net-imap//lib/net/imap/command_data.rb#116 + def send_time_data(time); end + + # source://net-imap//lib/net/imap.rb#2929 + def sort_internal(cmd, sort_keys, search_keys, charset); end + + # source://net-imap//lib/net/imap.rb#2636 + def start_imap_connection; end + + # source://net-imap//lib/net/imap.rb#2653 + def start_receiver_thread; end + + # source://net-imap//lib/net/imap.rb#2979 + def start_tls_session; end + + # source://net-imap//lib/net/imap.rb#2913 + def store_internal(cmd, set, attr, flags, unchangedsince: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap.rb#2662 + def tcp_socket(host, port); end + + # source://net-imap//lib/net/imap.rb#2941 + def thread_internal(cmd, algorithm, search_keys, charset); end + + # source://net-imap//lib/net/imap/command_data.rb#12 + def validate_data(data); end + + class << self + # Returns the global Config object + # + # source://net-imap//lib/net/imap.rb#739 + def config; end + + # Returns the global debug mode. + # + # source://net-imap//lib/net/imap.rb#742 + def debug; end + + # Sets the global debug mode. + # + # source://net-imap//lib/net/imap.rb#745 + def debug=(val); end + + # :call-seq: decode_date(string) -> Date + # + # Decodes +string+ as an IMAP formatted "date". + # + # Double quotes are optional. Day of month may be padded with zero or + # space. See STRFDATE. + # + # source://net-imap//lib/net/imap/data_encoding.rb#90 + def decode_date(string); end + + # :call-seq: decode_datetime(string) -> DateTime + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # NOTE: Although double-quotes are not optional in the IMAP grammar, + # Net::IMAP currently parses "date-time" values as "quoted" strings and this + # removes the quotation marks. To be useful for strings which have already + # been parsed as a quoted string, this method makes double-quotes optional. + # + # See STRFTIME. + # + # source://net-imap//lib/net/imap/data_encoding.rb#112 + def decode_datetime(string); end + + # :call-seq: decode_time(string) -> Time + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # Same as +decode_datetime+, but returning a Time instead. + # + # source://net-imap//lib/net/imap/data_encoding.rb#124 + def decode_time(string); end + + # Decode a string from modified UTF-7 format to UTF-8. + # + # UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a + # slightly modified version of this to encode mailbox names + # containing non-ASCII characters; see [IMAP] section 5.1.3. + # + # Net::IMAP does _not_ automatically encode and decode + # mailbox names to and from UTF-7. + # + # source://net-imap//lib/net/imap/data_encoding.rb#57 + def decode_utf7(s); end + + # The default port for IMAP connections, port 143 + # + # source://net-imap//lib/net/imap.rb#750 + def default_imap_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#755 + def default_imaps_port; end + + # The default port for IMAP connections, port 143 + # + # source://net-imap//lib/net/imap.rb#750 + def default_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#755 + def default_ssl_port; end + + # The default port for IMAPS connections, port 993 + # + # source://net-imap//lib/net/imap.rb#755 + def default_tls_port; end + + # Formats +time+ as an IMAP4 date. + # + # source://net-imap//lib/net/imap/data_encoding.rb#80 + def encode_date(date); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def encode_datetime(time); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def encode_time(time); end + + # Encode a string from UTF-8 format to modified UTF-7. + # + # source://net-imap//lib/net/imap/data_encoding.rb#68 + def encode_utf7(s); end + + # Formats +time+ as an IMAP4 date. + # + # source://net-imap//lib/net/imap/data_encoding.rb#80 + def format_date(date); end + + # DEPRECATED:: The original version returned incorrectly formatted strings. + # Strings returned by encode_datetime or format_time use the + # correct IMAP4rev1 syntax for "date-time". + # + # This invalid format has been temporarily retained for backward + # compatibility. A future release will change this method to return the + # correct format. + # + # source://net-imap//lib/net/imap/data_encoding.rb#149 + def format_datetime(time); end + + # :call-seq: encode_datetime(time) -> string + # + # Formats +time+ as an IMAP4 date-time. + # + # source://net-imap//lib/net/imap/data_encoding.rb#98 + def format_time(time); end + + # :call-seq: decode_date(string) -> Date + # + # Decodes +string+ as an IMAP formatted "date". + # + # Double quotes are optional. Day of month may be padded with zero or + # space. See STRFDATE. + # + # source://net-imap//lib/net/imap/data_encoding.rb#90 + def parse_date(string); end + + # :call-seq: decode_datetime(string) -> DateTime + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # NOTE: Although double-quotes are not optional in the IMAP grammar, + # Net::IMAP currently parses "date-time" values as "quoted" strings and this + # removes the quotation marks. To be useful for strings which have already + # been parsed as a quoted string, this method makes double-quotes optional. + # + # See STRFTIME. + # + # source://net-imap//lib/net/imap/data_encoding.rb#112 + def parse_datetime(string); end + + # :call-seq: decode_time(string) -> Time + # + # Decodes +string+ as an IMAP4 formatted "date-time". + # + # Same as +decode_datetime+, but returning a Time instead. + # + # source://net-imap//lib/net/imap/data_encoding.rb#124 + def parse_time(string); end + + # -- + # We could get the saslprep method by extending the SASLprep module + # directly. It's done indirectly, so SASLprep can be lazily autoloaded, + # because most users won't need it. + # ++ + # Delegates to Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap.rb#3003 + def saslprep(string, **opts); end + end +end + +# Mailbox attribute indicating that this mailbox presents all messages in +# the user's message store. Implementations MAY omit some messages, such as, +# perhaps, those in \Trash and \Junk. When this special use is supported, it +# is almost certain to represent a virtual mailbox +# +# source://net-imap//lib/net/imap/flags.rb#218 +Net::IMAP::ALL = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating that this mailbox is used to archive +# messages. The meaning of an "archival" mailbox is server dependent; +# typically, it will be used to get messages out of the inbox, or otherwise +# keep them out of the user's way, while still making them accessible +# +# source://net-imap//lib/net/imap/flags.rb#224 +Net::IMAP::ARCHIVE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/command_data.rb#137 +class Net::IMAP::Atom + # @return [Atom] a new instance of Atom + # + # source://net-imap//lib/net/imap/command_data.rb#147 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#138 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#142 + def validate; end +end + +# Backward compatible delegators from Net::IMAP to Net::IMAP::SASL. +# +# source://net-imap//lib/net/imap/authenticators.rb#4 +module Net::IMAP::Authenticators + # Deprecated. Use Net::IMAP::SASL.add_authenticator instead. + # + # source://net-imap//lib/net/imap/authenticators.rb#7 + def add_authenticator(*_arg0, **_arg1, &_arg2); end + + # Deprecated. Use Net::IMAP::SASL.authenticator instead. + # + # source://net-imap//lib/net/imap/authenticators.rb#18 + def authenticator(*_arg0, **_arg1, &_arg2); end +end + +# Net::IMAP::BodyStructure is included by all of the structs that can be +# returned from a "BODYSTRUCTURE" or "BODY" +# FetchData#attr value. Although these classes don't share a base class, +# this module can be used to pattern match all of them. +# +# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] +# for full description of all +BODYSTRUCTURE+ fields, and also +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# === Classes that include BodyStructure +# BodyTypeBasic:: Represents any message parts that are not handled by +# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. +# BodyTypeText:: Used by text/* parts. Contains all of the +# BodyTypeBasic fields. +# BodyTypeMessage:: Used by message/rfc822 and +# message/global parts. Contains all of the +# BodyTypeBasic fields. Other message/* types +# should use BodyTypeBasic. +# BodyTypeMultipart:: for multipart/* parts +# +# source://net-imap//lib/net/imap/response_data.rb#813 +module Net::IMAP::BodyStructure; end + +# BodyTypeAttachment is not used and will be removed in an upcoming release. +# +# === Bug Analysis +# +# \IMAP body structures are parenthesized lists and assign their fields +# positionally, so missing fields change the interpretation of all +# following fields. Additionally, different body types have a different +# number of required fields, followed by optional "extension" fields. +# +# BodyTypeAttachment was previously returned when a "message/rfc822" part, +# which should be sent as body-type-msg with ten required fields, +# was actually sent as a body-type-basic with _seven_ required +# fields. +# +# basic => type, subtype, param, id, desc, enc, octets, md5=nil, dsp=nil, lang=nil, loc=nil, *ext +# msg => type, subtype, param, id, desc, enc, octets, envelope, body, lines, md5=nil, ... +# +# Normally, +envelope+ and +md5+ are incompatible, but Net::IMAP leniently +# allowed buggy servers to send +NIL+ for +envelope+. As a result, when a +# server sent a message/rfc822 part with +NIL+ for +md5+ and a +# non-NIL +dsp+, Net::IMAP misinterpreted the +# Content-Disposition as if it were a strange body type. In all +# reported cases, the Content-Disposition was "attachment", so +# BodyTypeAttachment was created as the workaround. +# +# === Current behavior +# +# When interpreted strictly, +envelope+ and +md5+ are incompatible. So the +# current parsing algorithm peeks ahead after it has received the seventh +# body field. If the next token is not the start of an +envelope+, we assume +# the server has incorrectly sent us a body-type-basic and return +# BodyTypeBasic. As a result, what was previously BodyTypeMessage#body => +# BodyTypeAttachment is now BodyTypeBasic#disposition => ContentDisposition. +# +# source://net-imap//lib/net/imap/response_data.rb#1077 +class Net::IMAP::BodyTypeAttachment < ::Struct + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1079 + def media_type; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1107 + def multipart?; end + + # *invalid for BodyTypeAttachment* + # + # source://net-imap//lib/net/imap/response_data.rb#1087 + def subtype; end +end + +# Net::IMAP::BodyTypeBasic represents basic body structures of messages and +# message parts, unless they have a Content-Type that is handled by +# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart. +# +# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9] +# for full description of all +BODYSTRUCTURE+ fields, and also +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# source://net-imap//lib/net/imap/response_data.rb#830 +class Net::IMAP::BodyTypeBasic < ::Struct + include ::Net::IMAP::BodyStructure + + # :call-seq: media_subtype -> subtype + # + # >>> + # [Obsolete] + # Use +subtype+ instead. Calling this will generate a warning message + # to +stderr+, then return the value of +subtype+. + # -- + # TODO: why not just keep this as an alias? Would "media_subtype" be used + # for something else? + # ++ + # + # source://net-imap//lib/net/imap/response_data.rb#941 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeBasic is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#927 + def multipart?; end +end + +# === Obsolete +# BodyTypeExtension is not used and will be removed in an upcoming release. +# +# >>> +# BodyTypeExtension was (incorrectly) used for message/* parts +# (besides message/rfc822, which correctly uses BodyTypeMessage). +# +# Net::IMAP now (correctly) parses all message types (other than +# message/rfc822 or message/global) as BodyTypeBasic. +# +# source://net-imap//lib/net/imap/response_data.rb#1201 +class Net::IMAP::BodyTypeExtension < ::Struct + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1202 + def multipart?; end +end + +# Net::IMAP::BodyTypeMessage represents the body structures of messages and +# message parts, when Content-Type is message/rfc822 or +# message/global. +# +# BodyTypeMessage contains all of the fields of BodyTypeBasic. See +# BodyTypeBasic for documentation of the following fields: +# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] +# * subtype[rdoc-ref:BodyTypeBasic#subtype] +# * param[rdoc-ref:BodyTypeBasic#param] +# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] +# * description[rdoc-ref:BodyTypeBasic#description] +# * encoding[rdoc-ref:BodyTypeBasic#encoding] +# * size[rdoc-ref:BodyTypeBasic#size] +# +# source://net-imap//lib/net/imap/response_data.rb#1011 +class Net::IMAP::BodyTypeMessage < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#1037 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeMessage is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1030 + def multipart?; end +end + +# Net::IMAP::BodyTypeMultipart represents body structures of messages and +# message parts, when Content-Type is multipart/*. +# +# source://net-imap//lib/net/imap/response_data.rb#1120 +class Net::IMAP::BodyTypeMultipart < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#1184 + def media_subtype; end + + # :call-seq: multipart? -> true + # + # BodyTypeMultipart is used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#1176 + def multipart?; end +end + +# Net::IMAP::BodyTypeText represents the body structures of messages and +# message parts, when Content-Type is text/*. +# +# BodyTypeText contains all of the fields of BodyTypeBasic. See +# BodyTypeBasic for documentation of the following: +# * {media_type}[rdoc-ref:BodyTypeBasic#media_type] +# * subtype[rdoc-ref:BodyTypeBasic#subtype] +# * param[rdoc-ref:BodyTypeBasic#param] +# * {content_id}[rdoc-ref:BodyTypeBasic#content_id] +# * description[rdoc-ref:BodyTypeBasic#description] +# * encoding[rdoc-ref:BodyTypeBasic#encoding] +# * size[rdoc-ref:BodyTypeBasic#size] +# +# source://net-imap//lib/net/imap/response_data.rb#966 +class Net::IMAP::BodyTypeText < ::Struct + include ::Net::IMAP::BodyStructure + + # Obsolete: use +subtype+ instead. Calling this will + # generate a warning message to +stderr+, then return + # the value of +subtype+. + # + # source://net-imap//lib/net/imap/response_data.rb#986 + def media_subtype; end + + # :call-seq: multipart? -> false + # + # BodyTypeText is not used for multipart MIME parts. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_data.rb#979 + def multipart?; end +end + +# source://net-imap//lib/net/imap/command_data.rb#238 +class Net::IMAP::ClientID + # @return [ClientID] a new instance of ClientID + # + # source://net-imap//lib/net/imap/command_data.rb#250 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#240 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#244 + def validate; end + + private + + # source://net-imap//lib/net/imap/command_data.rb#264 + def format_internal(client_id); end + + # source://net-imap//lib/net/imap/command_data.rb#254 + def validate_internal(client_id); end +end + +# Net::IMAP::Config stores configuration options for Net::IMAP clients. +# The global configuration can be seen at either Net::IMAP.config or +# Net::IMAP::Config.global, and the client-specific configuration can be +# seen at Net::IMAP#config. +# +# When creating a new client, all unhandled keyword arguments to +# Net::IMAP.new are delegated to Config.new. Every client has its own +# config. +# +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# == Inheritance +# +# Configs have a parent[rdoc-ref:Config::AttrInheritance#parent] config, and +# any attributes which have not been set locally will inherit the parent's +# value. Every client creates its own specific config. By default, client +# configs inherit from Config.global. +# +# plain_client = Net::IMAP.new(hostname) +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# +# plain_client.config.inherited?(:debug) # => true +# debug_client.config.inherited?(:debug) # => false +# quiet_client.config.inherited?(:debug) # => false +# +# plain_client.config.debug? # => false +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# # Net::IMAP.debug is delegated to Net::IMAP::Config.global.debug +# Net::IMAP.debug = true +# plain_client.config.debug? # => true +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# Net::IMAP.debug = false +# plain_client.config.debug = true +# plain_client.config.inherited?(:debug) # => false +# plain_client.config.debug? # => true +# plain_client.config.reset(:debug) +# plain_client.config.inherited?(:debug) # => true +# plain_client.config.debug? # => false +# +# == Versioned defaults +# +# The effective default configuration for a specific +x.y+ version of +# +net-imap+ can be loaded with the +config+ keyword argument to +# Net::IMAP.new. Requesting default configurations for previous versions +# enables extra backward compatibility with those versions: +# +# client = Net::IMAP.new(hostname, config: 0.3) +# client.config.sasl_ir # => false +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.4) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.5) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :warn +# +# client = Net::IMAP.new(hostname, config: :future) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :raise +# +# The versioned default configs inherit certain specific config options from +# Config.global, for example #debug: +# +# client = Net::IMAP.new(hostname, config: 0.4) +# Net::IMAP.debug = false +# client.config.debug? # => false +# +# Net::IMAP.debug = true +# client.config.debug? # => true +# +# Use #load_defaults to globally behave like a specific version: +# client = Net::IMAP.new(hostname) +# client.config.sasl_ir # => true +# Net::IMAP.config.load_defaults 0.3 +# client.config.sasl_ir # => false +# +# === Named defaults +# In addition to +x.y+ version numbers, the following aliases are supported: +# +# [+:default+] +# An alias for +:current+. +# +# >>> +# *NOTE*: This is _not_ the same as Config.default. It inherits some +# attributes from Config.global, for example: #debug. +# [+:current+] +# An alias for the current +x.y+ version's defaults. +# [+:next+] +# The _planned_ config for the next +x.y+ version. +# [+:future+] +# The _planned_ eventual config for some future +x.y+ version. +# +# For example, to raise exceptions for all current deprecations: +# client = Net::IMAP.new(hostname, config: :future) +# client.responses # raises an ArgumentError +# +# == Thread Safety +# +# *NOTE:* Updates to config objects are not synchronized for thread-safety. +# +# source://net-imap//lib/net/imap/config/attr_accessors.rb#7 +class Net::IMAP::Config + include ::Net::IMAP::Config::AttrAccessors + include ::Net::IMAP::Config::AttrInheritance + include ::Net::IMAP::Config::AttrTypeCoercion + extend ::Net::IMAP::Config::AttrAccessors::Macros + extend ::Net::IMAP::Config::AttrInheritance::Macros + extend ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # Creates a new config object and initialize its attribute with +attrs+. + # + # If +parent+ is not given, the global config is used by default. + # + # If a block is given, the new config object is yielded to it. + # + # @return [Config] a new instance of Config + # @yield [_self] + # @yieldparam _self [Net::IMAP::Config] the object that the method was called on + # + # source://net-imap//lib/net/imap/config.rb#236 + def initialize(parent = T.unsafe(nil), **attrs); end + + # :call-seq: load_defaults(version) -> self + # + # Resets the current config to behave like the versioned default + # configuration for +version+. #parent will not be changed. + # + # Some config attributes default to inheriting from their #parent (which + # is usually Config.global) and are left unchanged, for example: #debug. + # + # See Config@Versioned+defaults and Config@Named+defaults. + # + # source://net-imap//lib/net/imap/config.rb#287 + def load_defaults(version); end + + # :call-seq: to_h -> hash + # + # Returns all config attributes in a hash. + # + # source://net-imap//lib/net/imap/config.rb#296 + def to_h; end + + # :call-seq: update(**attrs) -> self + # + # Assigns all of the provided +attrs+ to this config, and returns +self+. + # + # An ArgumentError is raised unless every key in +attrs+ matches an + # assignment method on Config. + # + # >>> + # *NOTE:* #update is not atomic. If an exception is raised due to an + # invalid attribute value, +attrs+ may be partially applied. + # + # source://net-imap//lib/net/imap/config.rb#252 + def update(**attrs); end + + # :call-seq: + # with(**attrs) -> config + # with(**attrs) {|config| } -> result + # + # Without a block, returns a new config which inherits from self. With a + # block, yields the new config and returns the block's result. + # + # If no keyword arguments are given, an ArgumentError will be raised. + # + # If +self+ is frozen, the copy will also be frozen. + # + # source://net-imap//lib/net/imap/config.rb#270 + def with(**attrs); end + + protected + + # source://net-imap//lib/net/imap/config.rb#300 + def defaults_hash; end + + class << self + # :call-seq: + # Net::IMAP::Config[number] -> versioned config + # Net::IMAP::Config[symbol] -> named config + # Net::IMAP::Config[hash] -> new frozen config + # Net::IMAP::Config[config] -> same config + # + # Given a version number, returns the default configuration for the target + # version. See Config@Versioned+defaults. + # + # Given a version name, returns the default configuration for the target + # version. See Config@Named+defaults. + # + # Given a Hash, creates a new _frozen_ config which inherits from + # Config.global. Use Config.new for an unfrozen config. + # + # Given a config, returns that same config. + # + # source://net-imap//lib/net/imap/config.rb#151 + def [](config); end + + # The default config, which is hardcoded and frozen. + # + # source://net-imap//lib/net/imap/config.rb#126 + def default; end + + # The global config object. Also available from Net::IMAP.config. + # + # source://net-imap//lib/net/imap/config.rb#129 + def global; end + + # A hash of hard-coded configurations, indexed by version number. + # + # source://net-imap//lib/net/imap/config.rb#132 + def version_defaults; end + end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# +attr_accessor+ values are stored in a struct rather than ivars, making +# it simpler to ensure that all config objects share a single object +# shape. This also simplifies iteration over all defined attributes. +# +# source://net-imap//lib/net/imap/config/attr_accessors.rb#15 +module Net::IMAP::Config::AttrAccessors + extend ::Forwardable + + mixes_in_class_methods ::Net::IMAP::Config::AttrAccessors::Macros + + # :notnew: + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#45 + def initialize; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug=(*args, **_arg1, &block); end + + # Freezes the internal attributes struct, in addition to +self+. + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#51 + def freeze; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def idle_response_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def idle_response_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def open_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def open_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def responses_without_block(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def responses_without_block=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def sasl_ir(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def sasl_ir=(*args, **_arg1, &block); end + + protected + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#58 + def data; end + + private + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#62 + def initialize_clone(other); end + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#67 + def initialize_dup(other); end + + class << self + # source://net-imap//lib/net/imap/config/attr_accessors.rb#28 + def attr_accessor(name); end + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#38 + def struct; end + + private + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#33 + def attributes; end + + # @private + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#21 + def included(mod); end + end +end + +# source://net-imap//lib/net/imap/config/attr_accessors.rb#16 +module Net::IMAP::Config::AttrAccessors::Macros + # source://net-imap//lib/net/imap/config/attr_accessors.rb#17 + def attr_accessor(name); end +end + +# source://net-imap//lib/net/imap/config.rb#0 +class Net::IMAP::Config::AttrAccessors::Struct < ::Struct + def debug; end + def debug=(_); end + def idle_response_timeout; end + def idle_response_timeout=(_); end + def open_timeout; end + def open_timeout=(_); end + def responses_without_block; end + def responses_without_block=(_); end + def sasl_ir; end + def sasl_ir=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# >>> +# *NOTE:* The public methods on this module are part of the stable +# public API of Net::IMAP::Config. But the module itself is an internal +# implementation detail, with no guarantee of backward compatibility. +# +# +attr_accessor+ methods will delegate to their #parent when the local +# value does not contain an override. Inheritance forms a singly linked +# list, so lookup will be O(n) on the number of ancestors. In +# practice, the ancestor chain is not expected to be long. Without +# customization, it is only three deep: +# >>> +# IMAP#config → Config.global → Config.default +# +# When creating a client with the +config+ keyword, for example to use +# the appropriate defaults for an application or a library while still +# relying on global for configuration of +debug+ or +logger+, most likely +# the ancestor chain is still only four deep: +# >>> +# IMAP#config → alternate defaults → Config.global → Config.default +# +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#25 +module Net::IMAP::Config::AttrInheritance + mixes_in_class_methods ::Net::IMAP::Config::AttrInheritance::Macros + + # :notnew: + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#48 + def initialize(parent = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def debug; end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def idle_response_timeout; end + + # Returns +true+ if +attr+ is inherited from #parent and not overridden + # by this config. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#59 + def inherited?(attr); end + + # Creates a new config, which inherits from +self+. + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#55 + def new(**attrs); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def open_timeout; end + + # The parent Config object + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#46 + def parent; end + + # :call-seq: + # reset -> self + # reset(attr) -> attribute value + # + # Resets an +attr+ to inherit from the #parent config. + # + # When +attr+ is nil or not given, all attributes are reset. + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#68 + def reset(attr = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def responses_without_block; end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def sasl_ir; end + + private + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#82 + def initialize_copy(other); end + + class << self + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#39 + def attr_accessor(name); end + + private + + # @private + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#34 + def included(mod); end + end +end + +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#26 +module Net::IMAP::Config::AttrInheritance::INHERITED; end + +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#29 +module Net::IMAP::Config::AttrInheritance::Macros + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#30 + def attr_accessor(name); end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# Adds a +type+ keyword parameter to +attr_accessor+, to enforce that +# config attributes have valid types, for example: boolean, numeric, +# enumeration, non-nullable, etc. +# +# source://net-imap//lib/net/imap/config/attr_type_coercion.rb#13 +module Net::IMAP::Config::AttrTypeCoercion + mixes_in_class_methods ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#39 + def debug=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#40 + def debug?; end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#44 + def idle_response_timeout=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#44 + def open_timeout=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#50 + def responses_without_block=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#39 + def sasl_ir=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#40 + def sasl_ir?; end + + class << self + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#29 + def attr_accessor(attr, type: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#38 + def boolean(attr); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#47 + def enum(attr, enum); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#43 + def integer(attr); end + + private + + # @private + # + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#24 + def included(mod); end + end +end + +# :stopdoc: internal APIs only +# +# source://net-imap//lib/net/imap/config/attr_type_coercion.rb#16 +module Net::IMAP::Config::AttrTypeCoercion::Macros + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#17 + def attr_accessor(attr, type: T.unsafe(nil)); end +end + +# Array of attribute names that are _not_ loaded by #load_defaults. +# +# source://net-imap//lib/net/imap/config.rb#122 +Net::IMAP::Config::DEFAULT_TO_INHERIT = T.let(T.unsafe(nil), Array) + +# Mailbox attribute indicating that this mailbox is used to hold draft +# messages -- typically, messages that are being composed but have not yet +# been sent. In some server implementations, this might be a virtual +# mailbox, containing messages from other mailboxes that are marked with the +# "\Draft" message flag. Alternatively, this might just be advice that a +# client put drafts here +# +# source://net-imap//lib/net/imap/flags.rb#232 +Net::IMAP::DRAFTS = T.let(T.unsafe(nil), Symbol) + +# This module handles deprecated arguments to various Net::IMAP methods. +# +# source://net-imap//lib/net/imap/deprecated_client_options.rb#7 +module Net::IMAP::DeprecatedClientOptions + # :call-seq: + # Net::IMAP.new(host, **options) # standard keyword options + # Net::IMAP.new(host, options) # obsolete hash options + # Net::IMAP.new(host, port) # obsolete port argument + # Net::IMAP.new(host, port, usessl, certs = nil, verify = true) # deprecated SSL arguments + # + # Translates Net::IMAP.new arguments for backward compatibility. + # + # ==== Obsolete arguments + # + # Use of obsolete arguments does not print a warning. Obsolete arguments + # will be deprecated by a future release. + # + # If a second positional argument is given and it is a hash (or is + # convertible via +#to_hash+), it is converted to keyword arguments. + # + # # Obsolete: + # Net::IMAP.new("imap.example.com", options_hash) + # # Use instead: + # Net::IMAP.new("imap.example.com", **options_hash) + # + # If a second positional argument is given and it is not a hash, it is + # converted to the +port+ keyword argument. + # # Obsolete: + # Net::IMAP.new("imap.example.com", 114433) + # # Use instead: + # Net::IMAP.new("imap.example.com", port: 114433) + # + # ==== Deprecated arguments + # + # Using deprecated arguments prints a warning. Convert to keyword + # arguments to avoid the warning. Deprecated arguments will be removed in + # a future release. + # + # If +usessl+ is false, +certs+, and +verify+ are ignored. When it true, + # all three arguments are converted to the +ssl+ keyword argument. + # Without +certs+ or +verify+, it is converted to ssl: true. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true) # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: true) + # + # When +certs+ is a path to a directory, it is converted to ca_path: + # certs. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, "/path/to/certs") # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {ca_path: "/path/to/certs"}) + # + # When +certs+ is a path to a file, it is converted to ca_file: + # certs. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, "/path/to/cert.pem") # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {ca_file: "/path/to/cert.pem"}) + # + # When +verify+ is +false+, it is converted to verify_mode: + # OpenSSL::SSL::VERIFY_NONE. + # # DEPRECATED: + # Net::IMAP.new("imap.example.com", nil, true, nil, false) # => prints a warning + # # Use instead: + # Net::IMAP.new("imap.example.com", ssl: {verify_mode: OpenSSL::SSL::VERIFY_NONE}) + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#72 + def initialize(host, port_or_options = T.unsafe(nil), *deprecated, **options); end + + # :call-seq: + # starttls(**options) # standard + # starttls(options = {}) # obsolete + # starttls(certs = nil, verify = true) # deprecated + # + # Translates Net::IMAP#starttls arguments for backward compatibility. + # + # Support for +certs+ and +verify+ will be dropped in a future release. + # + # See ::new for interpretation of +certs+ and +verify+. + # + # source://net-imap//lib/net/imap/deprecated_client_options.rb#104 + def starttls(*deprecated, **options); end + + private + + # source://net-imap//lib/net/imap/deprecated_client_options.rb#123 + def create_ssl_params(certs = T.unsafe(nil), verify = T.unsafe(nil)); end +end + +# Aliases for supported capabilities, to be used with the #enable command. +# +# source://net-imap//lib/net/imap.rb#723 +Net::IMAP::ENABLE_ALIASES = T.let(T.unsafe(nil), Hash) + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::ExtensionData represents data that is parsable according to the +# forward-compatible extension syntax in RFC3501, RFC4466, or RFC9051, but +# isn't directly known or understood by Net::IMAP yet. +# +# See also: UnparsedData, UnparsedNumericResponseData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#120 +class Net::IMAP::ExtensionData < ::Struct; end + +# Net::IMAP::FetchData represents the contents of a FETCH response. +# Net::IMAP#fetch and Net::IMAP#uid_fetch both return an array of +# FetchData objects. +# +# === Fetch attributes +# +# See {[IMAP4rev1 §7.4.2]}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2] +# and {[IMAP4rev2 §7.5.2]}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2] +# for a full description of the standard fetch response data items, and +# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs. +# +# ==== Static fetch data items +# +# Most message attributes are static, and must never change for a given +# (server, account, mailbox, UIDVALIDITY, UID) tuple. +# +# The static fetch data items defined by both +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] and +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] are: +# +# * "UID" --- See #uid. +# * "BODY" --- See #body. +# * "BODY[#{section_spec}]", +# "BODY[#{section_spec}]<#{offset}>" --- See #message, +# #part, #header, #header_fields, #header_fields_not, #mime, and #text. +# * "BODYSTRUCTURE" --- See #bodystructure. +# * "ENVELOPE" --- See #envelope. +# * "INTERNALDATE" --- See #internaldate. +# * "RFC822.SIZE" --- See #rfc822_size. +# +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] adds the +# additional fetch items from the +BINARY+ extension +# {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]: +# +# * "BINARY[#{part}]", +# "BINARY[#{part}]<#{offset}>" -- See #binary. +# * "BINARY.SIZE[#{part}]" -- See #binary_size. +# +# Several static message attributes in +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] are obsolete and +# been removed from +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html]: +# +# * "RFC822" --- See #rfc822 or replace with +# "BODY[]" and #message. +# * "RFC822.HEADER" --- See #rfc822_header or replace with +# "BODY[HEADER]" and #header. +# * "RFC822.TEXT" --- See #rfc822_text or replace with +# "BODY[TEXT]" and #text. +# +# Net::IMAP supports static attributes defined by the following extensions: +# * +OBJECTID+ {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html] +# * "EMAILID" --- See #emailid. +# * "THREADID" --- See #threadid. +# +# * +X-GM-EXT-1+ {[non-standard Gmail +# extension]}[https://developers.google.com/gmail/imap/imap-extensions] +# * "X-GM-MSGID" --- unique message ID. Access via #attr. +# * "X-GM-THRID" --- Thread ID. Access via #attr. +# +# [Note:] +# >>> +# Additional static fields are defined in other \IMAP extensions, but +# Net::IMAP can't parse them yet. +# +# ==== Dynamic message attributes +# +# Some message attributes can be dynamically changed, for example using the +# {STORE command}[rdoc-ref:Net::IMAP#store]. +# +# The only dynamic message attribute defined by +# IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] and +# IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] is: +# +# * "FLAGS" --- See #flags. +# +# Net::IMAP supports dynamic attributes defined by the following extensions: +# +# * +CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]: +# * "MODSEQ" --- See #modseq. +# * +X-GM-EXT-1+ {[non-standard Gmail +# extension]}[https://developers.google.com/gmail/imap/imap-extensions] +# * "X-GM-LABELS" --- Gmail labels. Access via #attr. +# +# [Note:] +# >>> +# Additional dynamic fields are defined in other \IMAP extensions, but +# Net::IMAP can't parse them yet. +# +# === Implicitly setting \Seen and using +PEEK+ +# +# Unless the mailbox is has been opened as read-only, fetching +# BODY[#{section}] or BINARY[#{section}] +# will implicitly set the \Seen flag. To avoid this, fetch using +# BODY.PEEK[#{section}] or BINARY.PEEK[#{section}] +# instead. +# +# Note that the data will always be _returned_ without ".PEEK", in +# BODY[#{specifier}] or BINARY[#{section}]. +# +# source://net-imap//lib/net/imap/fetch_data.rb#106 +class Net::IMAP::FetchData < ::Struct + # :call-seq: attr_upcase -> hash + # + # A transformation of #attr, with all the keys converted to upper case. + # + # Header field names are case-preserved but not case-sensitive, so this is + # used by #header_fields and #header_fields_not. + # + # source://net-imap//lib/net/imap/fetch_data.rb#136 + def attr_upcase; end + + # :call-seq: + # binary(*part_nums, offset: nil) -> string or nil + # + # Returns the binary representation of a particular MIME part, which has + # already been decoded according to its Content-Transfer-Encoding. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value of + # "BINARY[#{part_nums.join(".")}]" or + # "BINARY[#{part_nums.join(".")}]<#{offset}>" from #attr. + # + # The server must support either + # IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] + # or the +BINARY+ extension + # {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]. + # + # See also: #binary_size, #mime + # + # source://net-imap//lib/net/imap/fetch_data.rb#430 + def binary(*part_nums, offset: T.unsafe(nil)); end + + # :call-seq: + # binary_size(*part_nums) -> integer or nil + # + # Returns the decoded size of a particular MIME part (the size to expect + # in response to a BINARY fetch request). + # + # See #part for a description of +part_nums+. + # + # This is the same as getting the value of + # "BINARY.SIZE[#{part_nums.join(".")}]" from #attr. + # + # The server must support either + # IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html] + # or the +BINARY+ extension + # {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516.html]. + # + # See also: #binary, #mime + # + # source://net-imap//lib/net/imap/fetch_data.rb#451 + def binary_size(*part_nums); end + + # :call-seq: + # body -> body structure or nil + # + # Returns an alternate form of #bodystructure, without any extension data. + # + # This is the same as getting the value for "BODY" from #attr. + # + # [Note] + # Use #message, #part, #header, #header_fields, #header_fields_not, + # #text, or #mime to retrieve BODY[#{section_spec}] attributes. + # + # source://net-imap//lib/net/imap/fetch_data.rb#148 + def body; end + + # :call-seq: + # bodystructure -> BodyStructure struct or nil + # + # A BodyStructure object that describes the message, if it was fetched. + # + # This is the same as getting the value for "BODYSTRUCTURE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#310 + def body_structure; end + + # :call-seq: + # bodystructure -> BodyStructure struct or nil + # + # A BodyStructure object that describes the message, if it was fetched. + # + # This is the same as getting the value for "BODYSTRUCTURE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#310 + def bodystructure; end + + # :call-seq: emailid -> string or nil + # + # An ObjectID that uniquely identifies the immutable content of a single + # message. + # + # The server must return the same +EMAILID+ for both the source and + # destination messages after a COPY or MOVE command. However, it is + # possible for different messages with the same EMAILID to have different + # mutable attributes, such as flags. + # + # This is the same as getting the value for "EMAILID" from + # #attr. + # + # The server must support the +OBJECTID+ extension + # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # source://net-imap//lib/net/imap/fetch_data.rb#484 + def emailid; end + + # :call-seq: envelope -> Envelope or nil + # + # An Envelope object that describes the envelope structure of a message. + # See the documentation for Envelope for a description of the envelope + # structure attributes. + # + # This is the same as getting the value for "ENVELOPE" from + # #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#321 + def envelope; end + + # :call-seq: flags -> array of Symbols and Strings + # + # A array of flags that are set for this message. System flags are + # symbols that have been capitalized by String#capitalize. Keyword flags + # are strings and their case is not changed. + # + # This is the same as getting the value for "FLAGS" from #attr. + # + # [Note] + # The +FLAGS+ field is dynamic, and can change for a uniquely identified + # message. + # + # source://net-imap//lib/net/imap/fetch_data.rb#334 + def flags; end + + # :call-seq: + # header(*part_nums, offset: nil) -> string or nil + # header(*part_nums, fields: names, offset: nil) -> string or nil + # header(*part_nums, except: names, offset: nil) -> string or nil + # + # The {[RFC5322]}[https://www.rfc-editor.org/rfc/rfc5322.html] header of a + # message or of an encapsulated + # {[MIME-IMT]}[https://www.rfc-editor.org/rfc/rfc2046.html] + # MESSAGE/RFC822 or MESSAGE/GLOBAL message. + # + # Headers can be parsed using the "mail" gem. + # + # See #part for a description of +part_nums+ and +offset+. + # + # ==== Without +fields+ or +except+ + # This is the same as getting the value from #attr for one of: + # * BODY[HEADER] + # * BODY[HEADER]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER]" + # * BODY[#{part_nums.join "."}.HEADER]<#{offset}>" + # + # ==== With +fields+ + # When +fields+ is sent, returns a subset of the header which contains + # only the header fields that match one of the names in the list. + # + # This is the same as getting the value from #attr_upcase for one of: + # * BODY[HEADER.FIELDS (#{names.join " "})] + # * BODY[HEADER.FIELDS (#{names.join " "})]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER.FIELDS (#{names.join " "})] + # * BODY[#{part_nums.join "."}.HEADER.FIELDS (#{names.join " "})]<#{offset}> + # + # See also: #header_fields + # + # ==== With +except+ + # When +except+ is sent, returns a subset of the header which contains + # only the header fields that do _not_ match one of the names in the list. + # + # This is the same as getting the value from #attr_upcase for one of: + # * BODY[HEADER.FIELDS.NOT (#{names.join " "})] + # * BODY[HEADER.FIELDS.NOT (#{names.join " "})]<#{offset}> + # * BODY[#{part_nums.join "."}.HEADER.FIELDS.NOT (#{names.join " "})] + # * BODY[#{part_nums.join "."}.HEADER.FIELDS.NOT (#{names.join " "})]<#{offset}> + # + # See also: #header_fields_not + # + # source://net-imap//lib/net/imap/fetch_data.rb#234 + def header(*part_nums, fields: T.unsafe(nil), except: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: + # header_fields(*names, part: [], offset: nil) -> string or nil + # + # The result from #header when called with fields: names. + # + # source://net-imap//lib/net/imap/fetch_data.rb#252 + def header_fields(first, *rest, part: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: + # header_fields_not(*names, part: [], offset: nil) -> string or nil + # + # The result from #header when called with except: names. + # + # source://net-imap//lib/net/imap/fetch_data.rb#260 + def header_fields_not(first, *rest, part: T.unsafe(nil), offset: T.unsafe(nil)); end + + # :call-seq: internaldate -> Time or nil + # + # The internal date and time of the message on the server. This is not + # the date and time in the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # header, but rather a date and time which reflects when the message was + # received. + # + # This is similar to getting the value for "INTERNALDATE" from + # #attr. + # + # [Note] + # attr["INTERNALDATE"] returns a string, and this method + # returns a Time object. + # + # source://net-imap//lib/net/imap/fetch_data.rb#349 + def internal_date; end + + # :call-seq: internaldate -> Time or nil + # + # The internal date and time of the message on the server. This is not + # the date and time in the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # header, but rather a date and time which reflects when the message was + # received. + # + # This is similar to getting the value for "INTERNALDATE" from + # #attr. + # + # [Note] + # attr["INTERNALDATE"] returns a string, and this method + # returns a Time object. + # + # source://net-imap//lib/net/imap/fetch_data.rb#349 + def internaldate; end + + # :call-seq: + # message(offset: bytes) -> string or nil + # + # The RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] + # expression of the entire message, as a string. + # + # See #part for a description of +offset+. + # + # RFC5322 messages can be parsed using the "mail" gem. + # + # This is the same as getting the value for "BODY[]" or + # "BODY[]<#{offset}>" from #attr. + # + # See also: #header, #text, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#164 + def message(offset: T.unsafe(nil)); end + + # :call-seq: + # mime(*part_nums) -> string or nil + # mime(*part_nums, offset: bytes) -> string or nil + # + # The {[MIME-IMB]}[https://www.rfc-editor.org/rfc/rfc2045.html] header for + # a message part, if it was fetched. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value for + # "BODY[#{part_nums}.MIME]" or + # "BODY[#{part_nums}.MIME]<#{offset}>" from #attr. + # + # See also: #message, #header, and #text. + # + # source://net-imap//lib/net/imap/fetch_data.rb#278 + def mime(part, *subparts, offset: T.unsafe(nil)); end + + # :call-seq: modseq -> Integer + # + # The modification sequence number associated with this IMAP message. + # + # This is the same as getting the value for "MODSEQ" from #attr. + # + # The server must support the +CONDSTORE+ extension + # {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]. + # + # [Note] + # The +MODSEQ+ field is dynamic, and can change for a uniquely + # identified message. + # + # source://net-imap//lib/net/imap/fetch_data.rb#467 + def modseq; end + + # :call-seq: + # part(*part_nums, offset: bytes) -> string or nil + # + # The string representation of a particular MIME part. + # + # +part_nums+ forms a path of MIME part numbers, counting up from +1+, + # which may specify an arbitrarily nested part, similarly to Array#dig. + # Messages that don't use MIME, or MIME messages that are not multipart + # and don't hold an encapsulated message, only have part +1+. + # + # If a zero-based +offset+ is given, the returned string is a substring of + # the entire contents, starting at that origin octet. This means that + # BODY[]<0> MAY be truncated, but BODY[] is never + # truncated. + # + # This is the same as getting the value of + # "BODY[#{part_nums.join(".")}]" or + # "BODY[#{part_nums.join(".")}]<#{offset}>" from #attr. + # + # See also: #message, #header, #text, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#186 + def part(index, *subparts, offset: T.unsafe(nil)); end + + # :call-seq: rfc822 -> String + # + # Semantically equivalent to #message with no arguments. + # + # This is the same as getting the value for "RFC822" from #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822. + # + # source://net-imap//lib/net/imap/fetch_data.rb#362 + def rfc822; end + + # :call-seq: rfc822_header -> String + # + # Semantically equivalent to #header, with no arguments. + # + # This is the same as getting the value for "RFC822.HEADER" from #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822.HEADER. + # + # source://net-imap//lib/net/imap/fetch_data.rb#392 + def rfc822_header; end + + # :call-seq: rfc822_size -> Integer + # + # A number expressing the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # size of the message. + # + # This is the same as getting the value for "RFC822.SIZE" from + # #attr. + # + # [Note] + # \IMAP was originally developed for the older + # RFC822[https://www.rfc-editor.org/rfc/rfc822.html] standard, and as a + # consequence several fetch items in \IMAP incorporate "RFC822" in their + # name. With the exception of +RFC822.SIZE+, there are more modern + # replacements; for example, the modern version of +RFC822.HEADER+ is + # BODY.PEEK[HEADER]. In all cases, "RFC822" should be + # interpreted as a reference to the updated + # RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] standard. + # + # source://net-imap//lib/net/imap/fetch_data.rb#381 + def rfc822_size; end + + # :call-seq: rfc822_text -> String + # + # Semantically equivalent to #text, with no arguments. + # + # This is the same as getting the value for "RFC822.TEXT" from + # #attr. + # + # [Note] + # +IMAP4rev2+ deprecates RFC822.TEXT. + # + # source://net-imap//lib/net/imap/fetch_data.rb#403 + def rfc822_text; end + + # :call-seq: rfc822_size -> Integer + # + # A number expressing the [RFC5322[https://tools.ietf.org/html/rfc5322]] + # size of the message. + # + # This is the same as getting the value for "RFC822.SIZE" from + # #attr. + # + # [Note] + # \IMAP was originally developed for the older + # RFC822[https://www.rfc-editor.org/rfc/rfc822.html] standard, and as a + # consequence several fetch items in \IMAP incorporate "RFC822" in their + # name. With the exception of +RFC822.SIZE+, there are more modern + # replacements; for example, the modern version of +RFC822.HEADER+ is + # BODY.PEEK[HEADER]. In all cases, "RFC822" should be + # interpreted as a reference to the updated + # RFC5322[https://www.rfc-editor.org/rfc/rfc5322.html] standard. + # + # source://net-imap//lib/net/imap/fetch_data.rb#381 + def size; end + + # :call-seq: + # text(*part_nums) -> string or nil + # text(*part_nums, offset: bytes) -> string or nil + # + # The text body of a message or a message part, if it was fetched, + # omitting the {[RFC5322]}[https://www.rfc-editor.org/rfc/rfc5322.html] + # header. + # + # See #part for a description of +part_nums+ and +offset+. + # + # This is the same as getting the value from #attr for one of: + # * "BODY[TEXT]", + # * "BODY[TEXT]<#{offset}>", + # * "BODY[#{section}.TEXT]", or + # * "BODY[#{section}.TEXT]<#{offset}>". + # + # See also: #message, #header, and #mime. + # + # source://net-imap//lib/net/imap/fetch_data.rb#299 + def text(*part, offset: T.unsafe(nil)); end + + # :call-seq: threadid -> string or nil + # + # An ObjectID that uniquely identifies a set of messages that the server + # believes should be grouped together. + # + # It is generally based on some combination of References, In-Reply-To, + # and Subject, but the exact implementation is left up to the server + # implementation. The server should return the same thread identifier for + # related messages, even if they are in different mailboxes. + # + # This is the same as getting the value for "THREADID" from + # #attr. + # + # The server must support the +OBJECTID+ extension + # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. + # + # source://net-imap//lib/net/imap/fetch_data.rb#501 + def threadid; end + + # :call-seq: uid -> Integer + # + # A number expressing the unique identifier of the message. + # + # This is the same as getting the value for "UID" from #attr. + # + # source://net-imap//lib/net/imap/fetch_data.rb#410 + def uid; end + + private + + # source://net-imap//lib/net/imap/fetch_data.rb#505 + def body_section_attr(*_arg0, **_arg1, &_arg2); end + + # source://net-imap//lib/net/imap/fetch_data.rb#507 + def section_attr(attr, part = T.unsafe(nil), text = T.unsafe(nil), offset: T.unsafe(nil)); end +end + +# Alias for HAS_CHILDREN, to match the \IMAP spelling. +# +# source://net-imap//lib/net/imap/flags.rb#183 +Net::IMAP::HASCHILDREN = T.let(T.unsafe(nil), Symbol) + +# Alias for HAS_NO_CHILDREN, to match the \IMAP spelling. +# +# source://net-imap//lib/net/imap/flags.rb#185 +Net::IMAP::HASNOCHILDREN = T.let(T.unsafe(nil), Symbol) + +# The presence of this attribute indicates that the mailbox has child +# mailboxes. A server SHOULD NOT set this attribute if there are child +# mailboxes and the user does not have permission to access any of them. In +# this case, +\HasNoChildren+ SHOULD be used. In many cases, however, a +# server may not be able to efficiently compute whether a user has access to +# any child mailboxes. Note that even though the +\HasChildren+ attribute +# for a mailbox must be correct at the time of processing the mailbox, a +# client must be prepared to deal with a situation when a mailbox is marked +# with the +\HasChildren+ attribute, but no child mailbox appears in the +# response to the #list command. This might happen, for example, due to child +# mailboxes being deleted or made inaccessible to the user (using access +# control) by another client before the server is able to list them. +# +# It is an error for the server to return both a +\HasChildren+ and a +# +\HasNoChildren+ attribute in the same #list response. A client that +# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ +# attributes present should act as if both are absent in the #list response. +# +# source://net-imap//lib/net/imap/flags.rb#136 +Net::IMAP::HAS_CHILDREN = T.let(T.unsafe(nil), Symbol) + +# The presence of this attribute indicates that the mailbox has NO child +# mailboxes that are accessible to the currently authenticated user. +# +# It is an error for the server to return both a +\HasChildren+ and a +# +\HasNoChildren+ attribute in the same #list response. A client that +# encounters a #list response with both +\HasChildren+ and +\HasNoChildren+ +# attributes present should act as if both are absent in the #list response. +# +# Note: the +\HasNoChildren+ attribute should not be confused with the +# +\NoInferiors+ attribute, which indicates that no child mailboxes exist +# now and none can be created in the future. +# +# source://net-imap//lib/net/imap/flags.rb#149 +Net::IMAP::HAS_NO_CHILDREN = T.let(T.unsafe(nil), Symbol) + +# Net::IMAP::IgnoredResponse represents intentionally ignored responses. +# +# This includes untagged response "NOOP" sent by e.g. Zimbra to avoid +# some clients to close the connection. +# +# It matches no IMAP standard. +# +# source://net-imap//lib/net/imap/response_data.rb#65 +class Net::IMAP::IgnoredResponse < ::Net::IMAP::UntaggedResponse; end + +# Error raised when the server sends an invalid response. +# +# This is different from UnknownResponseError: the response has been +# rejected. Although it may be parsable, the server is forbidden from +# sending it in the current context. The client should automatically +# disconnect, abruptly (without logout). +# +# Note that InvalidResponseError does not inherit from ResponseError: it +# can be raised before the response is fully parsed. A related +# ResponseParseError or ResponseError may be the #cause. +# +# source://net-imap//lib/net/imap/errors.rb#60 +class Net::IMAP::InvalidResponseError < ::Net::IMAP::Error; end + +# Mailbox attribute indicating that this mailbox is where messages deemed to +# be junk mail are held. Some server implementations might put messages here +# automatically. Alternatively, this might just be advice to a client-side +# spam filter. +# +# source://net-imap//lib/net/imap/flags.rb#242 +Net::IMAP::JUNK = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/command_data.rb#167 +class Net::IMAP::Literal + # @return [Literal] a new instance of Literal + # + # source://net-imap//lib/net/imap/command_data.rb#177 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#168 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#172 + def validate; end +end + +# source://net-imap//lib/net/imap/command_data.rb#182 +class Net::IMAP::MessageSet + # @return [MessageSet] a new instance of MessageSet + # + # source://net-imap//lib/net/imap/command_data.rb#193 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#183 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#187 + def validate; end + + private + + # source://net-imap//lib/net/imap/command_data.rb#197 + def format_internal(data); end + + # source://net-imap//lib/net/imap/command_data.rb#218 + def validate_internal(data); end +end + +# The +\NonExistent+ attribute indicates that a mailbox name does not refer +# to an existing mailbox. Note that this attribute is not meaningful by +# itself, as mailbox names that match the canonical #list pattern but don't +# exist must not be returned unless one of the two conditions listed below +# is also satisfied: +# +# 1. The mailbox name also satisfies the selection criteria (for example, +# it is subscribed and the "SUBSCRIBED" selection option has been +# specified). +# +# 2. "RECURSIVEMATCH" has been specified, and the mailbox name has at least +# one descendant mailbox name that does not match the #list pattern and +# does match the selection criteria. +# +# In practice, this means that the +\NonExistent+ attribute is usually +# returned with one or more of +\Subscribed+, +\Remote+, +\HasChildren+, or +# the CHILDINFO extended data item. +# +# The client must treat the presence of the +\NonExistent+ attribute as if the +# +\NoSelect+ attribute was also sent by the server +# +# source://net-imap//lib/net/imap/flags.rb#105 +Net::IMAP::NONEXISTENT = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating it is not possible for any child levels of +# hierarchy to exist under this name; no child levels exist now and none can +# be created in the future children. +# +# The client must treat the presence of the +\NoInferiors+ attribute as if the +# +\HasNoChildren+ attribute was also sent by the server +# +# source://net-imap//lib/net/imap/flags.rb#113 +Net::IMAP::NO_INFERIORS = T.let(T.unsafe(nil), Symbol) + +# Mailbox attribute indicating it is not possible to use this name as a +# selectable mailbox. +# +# source://net-imap//lib/net/imap/flags.rb#117 +Net::IMAP::NO_SELECT = T.let(T.unsafe(nil), Symbol) + +# Net::IMAP::Namespace represents a single namespace contained inside a +# NAMESPACE response. +# +# Returned by Net::IMAP#namespace, contained inside a Namespaces object. +# +# source://net-imap//lib/net/imap/response_data.rb#496 +class Net::IMAP::Namespace < ::Struct; end + +# Net::IMAP::Namespaces represents a +NAMESPACE+ server response, which +# contains lists of #personal, #shared, and #other namespaces. +# +# Net::IMAP#namespace returns a Namespaces object. +# +# source://net-imap//lib/net/imap/response_data.rb#522 +class Net::IMAP::Namespaces < ::Struct; end + +# Common validators of number and nz_number types +# +# source://net-imap//lib/net/imap/data_encoding.rb#157 +module Net::IMAP::NumValidator + private + + # Ensure argument is 'mod_sequence_value' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#204 + def ensure_mod_sequence_value(num); end + + # Ensure argument is 'number' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#188 + def ensure_number(num); end + + # Ensure argument is 'nz_number' or raise DataFormatError + # + # source://net-imap//lib/net/imap/data_encoding.rb#196 + def ensure_nz_number(num); end + + # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#179 + def valid_mod_sequence_value?(num); end + + # Check is passed argument valid 'number' in RFC 3501 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#161 + def valid_number?(num); end + + # Check is passed argument valid 'nz_number' in RFC 3501 terminology + # + # source://net-imap//lib/net/imap/data_encoding.rb#170 + def valid_nz_number?(num); end + + class << self + # Ensure argument is 'mod_sequence_value' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#204 + def ensure_mod_sequence_value(num); end + + # Ensure argument is 'number' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#188 + def ensure_number(num); end + + # Ensure argument is 'nz_number' or raise DataFormatError + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/data_encoding.rb#196 + def ensure_nz_number(num); end + + # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#179 + def valid_mod_sequence_value?(num); end + + # Check is passed argument valid 'number' in RFC 3501 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#161 + def valid_number?(num); end + + # Check is passed argument valid 'nz_number' in RFC 3501 terminology + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/data_encoding.rb#170 + def valid_nz_number?(num); end + end +end + +# source://net-imap//lib/net/imap/command_data.rb#152 +class Net::IMAP::QuotedString + # @return [QuotedString] a new instance of QuotedString + # + # source://net-imap//lib/net/imap/command_data.rb#162 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#153 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#157 + def validate; end +end + +# The mailbox is a remote mailbox. +# +# source://net-imap//lib/net/imap/flags.rb#176 +Net::IMAP::REMOTE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/errors.rb#74 +Net::IMAP::RESPONSE_ERRORS = T.let(T.unsafe(nil), Hash) + +# source://net-imap//lib/net/imap/command_data.rb#122 +class Net::IMAP::RawData + # @return [RawData] a new instance of RawData + # + # source://net-imap//lib/net/imap/command_data.rb#132 + def initialize(data); end + + # source://net-imap//lib/net/imap/command_data.rb#123 + def send_data(imap, tag); end + + # source://net-imap//lib/net/imap/command_data.rb#127 + def validate; end +end + +# Superclass of all errors used to encapsulate "fail" responses +# from the server. +# +# source://net-imap//lib/net/imap/errors.rb#20 +class Net::IMAP::ResponseError < ::Net::IMAP::Error + # @return [ResponseError] a new instance of ResponseError + # + # source://net-imap//lib/net/imap/errors.rb#25 + def initialize(response); end + + # The response that caused this error + # + # source://net-imap//lib/net/imap/errors.rb#23 + def response; end + + # The response that caused this error + # + # source://net-imap//lib/net/imap/errors.rb#23 + def response=(_arg0); end +end + +# Parses an \IMAP server response. +# +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#5 +class Net::IMAP::ResponseParser + include ::Net::IMAP::ResponseParser::ParserUtils + include ::Net::IMAP::ResponseParser::ResponseConditions + extend ::Net::IMAP::ResponseParser::ParserUtils::Generator + + # :call-seq: Net::IMAP::ResponseParser.new -> Net::IMAP::ResponseParser + # + # @return [ResponseParser] a new instance of ResponseParser + # + # source://net-imap//lib/net/imap/response_parser.rb#17 + def initialize(config: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def CRLF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def EOF?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def NIL?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def PLUS!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def SP!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def STAR!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def STAR?; end + + # RFC-3501 & RFC-9051: + # body-fld-enc = (DQUOTE ("7BIT" / "8BIT" / "BINARY" / "BASE64"/ + # "QUOTED-PRINTABLE") DQUOTE) / string + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_enc; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # number in 3501, number64 in 9051 + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_lines; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def body_fld_octets; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def case_insensitive__string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def case_insensitive__string?; end + + # Returns the value of attribute config. + # + # source://net-imap//lib/net/imap/response_parser.rb#14 + def config; end + + # date-time = DQUOTE date-day-fixed "-" date-month "-" date-year + # SP time SP zone DQUOTE + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def date_time; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def lbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_CRLF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_EOF!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_NIL!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_body?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_case_insensitive__string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_number!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_quoted!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_string!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_string8!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#86 + def lookahead_tagged_ext_label!; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_thread_list?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#25 + def lookahead_thread_nested?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def lpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def lpar?; end + + # text/* + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def media_subtype; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-value = 1*DIGIT + # ;; Positive unsigned 63-bit integer + # ;; (mod-sequence) + # ;; (1 <= n <= 9,223,372,036,854,775,807). + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def mod_sequence_value; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-valzer = "0" / mod-sequence-value + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def mod_sequence_valzer; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def number; end + + # valid number ranges are not enforced by parser + # number64 = 1*DIGIT + # ; Unsigned 63-bit integer + # ; (0 <= n <= 9,223,372,036,854,775,807) + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def number64?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def number?; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def nz_number; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def nz_number64; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def nz_number?; end + + # :call-seq: + # parse(str) -> ContinuationRequest + # parse(str) -> UntaggedResponse + # parse(str) -> TaggedResponse + # + # Raises ResponseParseError for unparsable strings. + # + # source://net-imap//lib/net/imap/response_parser.rb#31 + def parse(str); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_PLUS?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_STAR?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_lbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_lpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 + def peek_rpar?; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # nz-number64 = digit-nz *DIGIT + # ; Unsigned 63-bit integer + # ; (0 < n <= 9,223,372,036,854,775,807) + # RFC7162: + # mod-sequence-value = 1*DIGIT + # ;; Positive unsigned 63-bit integer + # ;; (mod-sequence) + # ;; (1 <= n <= 9,223,372,036,854,775,807). + # RFC7162: + # permsg-modsequence = mod-sequence-value + # ;; Per-message mod-sequence. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def permsg_modsequence; end + + # Used when servers erroneously send an extra SP. + # + # As of 2023-11-28, Outlook.com (still) sends SP + # between +address+ in env-* lists. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def quirky_SP?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def quoted; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def quoted?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def rbra; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def rbra?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#46 + def rpar; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#35 + def rpar?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def string; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def string8; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def string8?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def string?; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def tagged_ext_label; end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 + def tagged_ext_label?; end + + # valid number ranges are not enforced by parser + # nz-number = digit-nz *DIGIT + # ; Non-zero unsigned 32-bit integer + # ; (0 < n < 4,294,967,296) + # valid number ranges are not enforced by parser + # uniqueid = nz-number + # ; Strictly ascending + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def uniqueid; end + + # valid number ranges are not enforced by parser + # + # a 64-bit unsigned integer and is the decimal equivalent for the ID hex + # string used in the web interface and the Gmail API. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 + def x_gm_id; end + + private + + # The RFC is very strict about this and usually we should be too. + # But skipping spaces is usually a safe workaround for buggy servers. + # + # This advances @pos directly so it's safe before changing @lex_state. + # + # source://net-imap//lib/net/imap/response_parser.rb#2028 + def accept_spaces; end + + # acl-data = "ACL" SP mailbox *(SP identifier SP rights) + # + # source://net-imap//lib/net/imap/response_parser.rb#1429 + def acl_data; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def addr_adl; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def addr_host; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def addr_mailbox; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def addr_name; end + + # address = "(" addr-name SP addr-adl SP addr-mailbox SP + # addr-host ")" + # addr-adl = nstring + # addr-host = nstring + # addr-mailbox = nstring + # addr-name = nstring + # + # source://net-imap//lib/net/imap/response_parser.rb#1897 + def address; end + + # astring = 1*ASTRING-CHAR / string + # + # source://net-imap//lib/net/imap/response_parser.rb#506 + def astring; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#510 + def astring?; end + + # source://net-imap//lib/net/imap/response_parser.rb#491 + def astring_chars; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # + # source://net-imap//lib/net/imap/response_parser.rb#490 + def atom; end + + # the #accept version of #atom + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#495 + def atom?; end + + # RFC-3501 & RFC-9051: + # body = "(" (body-type-1part / body-type-mpart) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1012 + def body; end + + # RFC2060 + # body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp + # [SPACE body_fld_lang + # [SPACE 1#body_extension]]] + # ;; MUST NOT be returned on non-extensible + # ;; "BODY" fetch + # RFC3501 & RFC9051 + # body-ext-1part = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang + # [SP body-fld-loc *(SP body-extension)]]] + # ; MUST NOT be returned on non-extensible + # ; "BODY" fetch + # + # source://net-imap//lib/net/imap/response_parser.rb#1184 + def body_ext_1part; end + + # RFC-2060: + # body_ext_mpart = body_fld_param [SP body_fld_dsp SP body_fld_lang + # [SP 1#body_extension]] + # ;; MUST NOT be returned on non-extensible + # ;; "BODY" fetch + # RFC-3501 & RFC-9051: + # body-ext-mpart = body-fld-param [SP body-fld-dsp [SP body-fld-lang + # [SP body-fld-loc *(SP body-extension)]]] + # ; MUST NOT be returned on non-extensible + # ; "BODY" fetch + # + # source://net-imap//lib/net/imap/response_parser.rb#1203 + def body_ext_mpart; end + + # body-extension = nstring / number / number64 / + # "(" body-extension *(SP body-extension) ")" + # ; Future expansion. Client implementations + # ; MUST accept body-extension fields. Server + # ; implementations MUST NOT generate + # ; body-extension fields except as defined by + # ; future Standard or Standards Track + # ; revisions of this specification. + # + # source://net-imap//lib/net/imap/response_parser.rb#1260 + def body_extension; end + + # body-extension *(SP body-extension) + # + # source://net-imap//lib/net/imap/response_parser.rb#1246 + def body_extensions; end + + # RFC-3501 & RFC-9051: + # body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP + # body-fld-enc SP body-fld-octets + # + # source://net-imap//lib/net/imap/response_parser.rb#1148 + def body_fields; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def body_fld_desc; end + + # body-fld-dsp = "(" string SP body-fld-param ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#1225 + def body_fld_dsp; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def body_fld_id; end + + # body-fld-lang = nstring / "(" string *(SP string) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1234 + def body_fld_lang; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def body_fld_loc; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def body_fld_md5; end + + # RFC3501, RFC9051: + # body-fld-param = "(" string SP string *(SP string SP string) ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#1160 + def body_fld_param; end + + # RFC-3501 & RFC9051: + # body-type-1part = (body-type-basic / body-type-msg / body-type-text) + # [SP body-ext-1part] + # + # source://net-imap//lib/net/imap/response_parser.rb#1024 + def body_type_1part; end + + # RFC-3501 & RFC9051: + # body-type-basic = media-basic SP body-fields + # + # source://net-imap//lib/net/imap/response_parser.rb#1048 + def body_type_basic; end + + # This is a malformed body-type-mpart with no subparts. + # + # source://net-imap//lib/net/imap/response_parser.rb#1097 + def body_type_mixed; end + + # RFC-3501 & RFC-9051: + # body-type-mpart = 1*body SP media-subtype + # [SP body-ext-mpart] + # + # source://net-imap//lib/net/imap/response_parser.rb#1107 + def body_type_mpart; end + + # RFC-3501 & RFC-9051: + # body-type-msg = media-message SP body-fields SP envelope + # SP body SP body-fld-lines + # + # source://net-imap//lib/net/imap/response_parser.rb#1069 + def body_type_msg; end + + # RFC-3501 & RFC-9051: + # body-type-text = media-text SP body-fields SP body-fld-lines + # + # source://net-imap//lib/net/imap/response_parser.rb#1058 + def body_type_text; end + + # Returns atom.upcase + # capability = ("AUTH=" auth-type) / atom + # ; New capabilities MUST begin with "X" or be + # ; registered with IANA as standard or + # ; standards-track + # + # source://net-imap//lib/net/imap/response_parser.rb#498 + def capability; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#501 + def capability?; end + + # As a workaround for buggy servers, allow a trailing SP: + # *(SP capability) [SP] + # + # source://net-imap//lib/net/imap/response_parser.rb#1632 + def capability__list; end + + # The presence of "IMAP4rev1" or "IMAP4rev2" is unenforced here. + # The grammar rule is used by both response-data and resp-text-code. + # But this method only returns UntaggedResponse (response-data). + # + # RFC3501: + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1" + # *(SP capability) + # RFC9051: + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" + # *(SP capability) + # + # source://net-imap//lib/net/imap/response_parser.rb#1621 + def capability_data__untagged; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#498 + def case_insensitive__atom; end + + # Returns atom?&.upcase + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#501 + def case_insensitive__atom?; end + + # use where nstring represents "LABEL" values + # + # source://net-imap//lib/net/imap/response_parser.rb#559 + def case_insensitive__nstring; end + + # See https://www.rfc-editor.org/errata/rfc3501 + # + # charset = atom / quoted + # + # source://net-imap//lib/net/imap/response_parser.rb#1968 + def charset; end + + # "(" charset *(SP charset) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1851 + def charset__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def comparator_data(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # continue-req = "+" SP (resp-text / base64) CRLF + # + # n.b: base64 is valid resp-text. And in the spirit of RFC9051 Appx E 23 + # (and to workaround existing servers), we use the following grammar: + # + # continue-req = "+" (SP (resp-text)) CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#676 + def continue_req; end + + # enable-data = "ENABLED" *(SP capability) + # + # source://net-imap//lib/net/imap/response_parser.rb#1626 + def enable_data; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_bcc; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_cc; end + + # nstring = string / nil + # env-date = nstring + # env-subject = nstring + # env-in-reply-to = nstring + # env-message-id = nstring + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def env_date; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_from; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def env_in_reply_to; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def env_message_id; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_reply_to; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_sender; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def env_subject; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def env_to; end + + # RFC3501 & RFC9051: + # envelope = "(" env-date SP env-subject SP env-from SP + # env-sender SP env-reply-to SP env-to SP env-cc SP + # env-bcc SP env-in-reply-to SP env-message-id ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#952 + def envelope; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def esearch_response(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def expunged_resp(klass = T.unsafe(nil)); end + + # flag-list = "(" [flag *(SP flag)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1918 + def flag_list; end + + # "(" [flag-perm *(SP flag-perm)] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1928 + def flag_perm__list; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # this represents the partial size for BODY or BINARY + # + # source://net-imap//lib/net/imap/response_parser.rb#490 + def gt__number__lt; end + + # RFC3501 & RFC9051: + # header-fld-name = astring + # + # NOTE: Previously, Net::IMAP recreated the raw original source string. + # Now, it grabs the raw encoded value using @str and @pos. A future + # version may simply return the decoded astring value. Although that is + # technically incompatible, it should almost never make a difference: all + # standard header field names are valid atoms: + # + # https://www.iana.org/assignments/message-headers/message-headers.xhtml + # + # Although RFC3501 allows any astring, RFC5322-valid header names are one + # or more of the printable US-ASCII characters, except SP and colon. So + # empty string isn't valid, and literals aren't needed and should not be + # used. This is explicitly unchanged by [I18N-HDRS] (RFC6532). + # + # RFC5233: + # optional-field = field-name ":" unstructured CRLF + # field-name = 1*ftext + # ftext = %d33-57 / ; Printable US-ASCII + # %d59-126 ; characters not including + # ; ":". + # + # source://net-imap//lib/net/imap/response_parser.rb#1338 + def header_fld_name; end + + # header-list = "(" header-fld-name *(SP header-fld-name) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1304 + def header_list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1645 + def id_response; end + + # Use #label or #label_in to assert specific known labels + # (+tagged-ext-label+ only, not +atom+). + # + # source://net-imap//lib/net/imap/response_parser.rb#516 + def label(word); end + + # Use #label or #label_in to assert specific known labels + # (+tagged-ext-label+ only, not +atom+). + # + # source://net-imap//lib/net/imap/response_parser.rb#523 + def label_in(*labels); end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def language_data(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def listrights_data(klass = T.unsafe(nil)); end + + # astring = 1*ASTRING-CHAR / string + # mailbox = "INBOX" / astring + # ; INBOX is case-insensitive. All case variants of + # ; INBOX (e.g., "iNbOx") MUST be interpreted as INBOX + # ; not as an astring. An astring which consists of + # ; the case-insensitive sequence "I" "N" "B" "O" "X" + # ; is considered to be INBOX and not an astring. + # ; Refer to section 5.1 for further + # ; semantic details of mailbox names. + # + # source://net-imap//lib/net/imap/response_parser.rb#506 + def mailbox; end + + # source://net-imap//lib/net/imap/response_parser.rb#835 + def mailbox_data__exists; end + + # mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list / + # "LSUB" SP mailbox-list / "SEARCH" *(SP nz-number) / + # "STATUS" SP mailbox SP "(" [status-att-list] ")" / + # number SP "EXISTS" / number SP "RECENT" + # + # source://net-imap//lib/net/imap/response_parser.rb#1351 + def mailbox_data__flags; end + + # source://net-imap//lib/net/imap/response_parser.rb#1357 + def mailbox_data__list; end + + # source://net-imap//lib/net/imap/response_parser.rb#1357 + def mailbox_data__lsub; end + + # source://net-imap//lib/net/imap/response_parser.rb#835 + def mailbox_data__recent; end + + # RFC3501: + # mailbox-data = "SEARCH" *(SP nz-number) / ... + # RFC5256: SORT + # sort-data = "SORT" *(SP nz-number) + # RFC7162: CONDSTORE, QRESYNC + # mailbox-data =/ "SEARCH" [1*(SP nz-number) SP + # search-sort-mod-seq] + # sort-data = "SORT" [1*(SP nz-number) SP + # search-sort-mod-seq] + # ; Updates the SORT response from RFC 5256. + # search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" + # RFC9051: + # mailbox-data = obsolete-search-response / ... + # obsolete-search-response = "SEARCH" *(SP nz-number) + # + # source://net-imap//lib/net/imap/response_parser.rb#1469 + def mailbox_data__search; end + + # mailbox-data =/ "STATUS" SP mailbox SP "(" [status-att-list] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1535 + def mailbox_data__status; end + + # source://net-imap//lib/net/imap/response_parser.rb#1357 + def mailbox_data__xlist; end + + # mailbox-list = "(" [mbx-list-flags] ")" SP + # (DQUOTE QUOTED-CHAR DQUOTE / nil) SP mailbox + # [SP mbox-list-extended] + # ; This is the list information pointed to by the ABNF + # ; item "mailbox-data", which is defined above + # + # source://net-imap//lib/net/imap/response_parser.rb#1370 + def mailbox_list; end + + # See Patterns::MBX_LIST_FLAGS + # + # source://net-imap//lib/net/imap/response_parser.rb#1946 + def mbx_list_flags; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # TODO: check types + # + # source://net-imap//lib/net/imap/response_parser.rb#1131 + def media_basic; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # */* --- catchall + # + # source://net-imap//lib/net/imap/response_parser.rb#1131 + def media_message; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # message/rfc822, message/global + # + # source://net-imap//lib/net/imap/response_parser.rb#1131 + def media_text; end + + # n.b. this handles both type and subtype + # + # RFC-3501 vs RFC-9051: + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "MESSAGE" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # media-basic = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / + # "FONT" / "MESSAGE" / "MODEL" / + # "VIDEO") DQUOTE) / string) SP media-subtype + # + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE "RFC822" DQUOTE + # media-message = DQUOTE "MESSAGE" DQUOTE SP + # DQUOTE ("RFC822" / "GLOBAL") DQUOTE + # + # RFC-3501 & RFC-9051: + # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype + # media-subtype = string + # + # source://net-imap//lib/net/imap/response_parser.rb#1131 + def media_type; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def message_data__converted(klass = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/response_parser.rb#835 + def message_data__expunge; end + + # message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att)) + # + # source://net-imap//lib/net/imap/response_parser.rb#828 + def message_data__fetch; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def metadata_resp(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # msg-att = "(" (msg-att-dynamic / msg-att-static) + # *(SP (msg-att-dynamic / msg-att-static)) ")" + # + # msg-att-dynamic = "FLAGS" SP "(" [flag-fetch *(SP flag-fetch)] ")" + # RFC5257 (ANNOTATE extension): + # msg-att-dynamic =/ "ANNOTATION" SP + # ( "(" entry-att *(SP entry-att) ")" / + # "(" entry *(SP entry) ")" ) + # RFC7162 (CONDSTORE extension): + # msg-att-dynamic =/ fetch-mod-resp + # fetch-mod-resp = "MODSEQ" SP "(" permsg-modsequence ")" + # RFC8970 (PREVIEW extension): + # msg-att-dynamic =/ "PREVIEW" SP nstring + # + # RFC3501: + # msg-att-static = "ENVELOPE" SP envelope / + # "INTERNALDATE" SP date-time / + # "RFC822" [".HEADER" / ".TEXT"] SP nstring / + # "RFC822.SIZE" SP number / + # "BODY" ["STRUCTURE"] SP body / + # "BODY" section ["<" number ">"] SP nstring / + # "UID" SP uniqueid + # RFC3516 (BINARY extension): + # msg-att-static =/ "BINARY" section-binary SP (nstring / literal8) + # / "BINARY.SIZE" section-binary SP number + # RFC8514 (SAVEDATE extension): + # msg-att-static =/ "SAVEDATE" SP (date-time / nil) + # RFC8474 (OBJECTID extension): + # msg-att-static =/ fetch-emailid-resp / fetch-threadid-resp + # fetch-emailid-resp = "EMAILID" SP "(" objectid ")" + # fetch-threadid-resp = "THREADID" SP ( "(" objectid ")" / nil ) + # RFC9051: + # msg-att-static = "ENVELOPE" SP envelope / + # "INTERNALDATE" SP date-time / + # "RFC822.SIZE" SP number64 / + # "BODY" ["STRUCTURE"] SP body / + # "BODY" section ["<" number ">"] SP nstring / + # "BINARY" section-binary SP (nstring / literal8) / + # "BINARY.SIZE" section-binary SP number / + # "UID" SP uniqueid + # + # Re https://www.rfc-editor.org/errata/eid7246, I'm adding "offset" to the + # official "BINARY" ABNF, like so: + # + # msg-att-static =/ "BINARY" section-binary ["<" number ">"] SP + # (nstring / literal8) + # + # source://net-imap//lib/net/imap/response_parser.rb#892 + def msg_att(n); end + + # appends "[section]" and "" to the base label + # + # source://net-imap//lib/net/imap/response_parser.rb#929 + def msg_att__label; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def myrights_data(klass = T.unsafe(nil)); end + + # namespace = nil / "(" 1*namespace-descr ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1692 + def namespace; end + + # namespace-descr = "(" string SP + # (DQUOTE QUOTED-CHAR DQUOTE / nil) + # [namespace-response-extensions] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1703 + def namespace_descr; end + + # namespace-response = "NAMESPACE" SP namespace + # SP namespace SP namespace + # ; The first Namespace is the Personal Namespace(s). + # ; The second Namespace is the Other Users' + # ; Namespace(s). + # ; The third Namespace is the Shared Namespace(s). + # + # source://net-imap//lib/net/imap/response_parser.rb#1680 + def namespace_response; end + + # namespace-response-extensions = *namespace-response-extension + # namespace-response-extension = SP string SP + # "(" string *(SP string) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1715 + def namespace_response_extensions; end + + # source://net-imap//lib/net/imap/response_parser.rb#554 + def ndatetime; end + + # source://net-imap//lib/net/imap/response_parser.rb#2035 + def next_token; end + + # source://net-imap//lib/net/imap/response_parser.rb#2017 + def nil_atom; end + + # env-from = "(" 1*address ")" / nil + # env-sender = "(" 1*address ")" / nil + # env-reply-to = "(" 1*address ")" / nil + # env-to = "(" 1*address ")" / nil + # env-cc = "(" 1*address ")" / nil + # env-bcc = "(" 1*address ")" / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#986 + def nlist__address; end + + # source://net-imap//lib/net/imap/response_parser.rb#1995 + def nparens__objectid; end + + # source://net-imap//lib/net/imap/response_parser.rb#554 + def nquoted; end + + # nstring = string / nil + # + # source://net-imap//lib/net/imap/response_parser.rb#546 + def nstring; end + + # source://net-imap//lib/net/imap/response_parser.rb#550 + def nstring8; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # RFC8474: + # objectid = 1*255(ALPHA / DIGIT / "_" / "-") + # ; characters in object identifiers are case + # ; significant + # + # source://net-imap//lib/net/imap/response_parser.rb#490 + def objectid; end + + # source://net-imap//lib/net/imap/response_parser.rb#1986 + def parens__modseq; end + + # source://net-imap//lib/net/imap/response_parser.rb#1994 + def parens__objectid; end + + # This allows illegal "]" in flag names (Gmail), + # or "\*" in a FLAGS response (greenmail). + # + # source://net-imap//lib/net/imap/response_parser.rb#1939 + def quirky__flag_list(name); end + + # source://net-imap//lib/net/imap/response_parser.rb#1378 + def quota_response; end + + # source://net-imap//lib/net/imap/response_parser.rb#1411 + def quotaroot_response; end + + # reads all the way up until CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#764 + def remaining_unparsed; end + + # As a workaround for buggy servers, allow a trailing SP: + # *(SP capability) [SP] + # + # source://net-imap//lib/net/imap/response_parser.rb#1632 + def resp_code__capability; end + + # already matched: "APPENDUID" + # + # +UIDPLUS+ ABNF:: https://www.rfc-editor.org/rfc/rfc4315.html#section-4 + # resp-code-apnd = "APPENDUID" SP nz-number SP append-uid + # append-uid = uniqueid + # append-uid =/ uid-set + # ; only permitted if client uses [MULTIAPPEND] + # ; to append multiple messages. + # + # n.b, uniqueid ⊂ uid-set. To avoid inconsistent return types, we always + # match uid_set even if that returns a single-member array. + # + # source://net-imap//lib/net/imap/response_parser.rb#1867 + def resp_code_apnd__data; end + + # already matched: "COPYUID" + # + # resp-code-copy = "COPYUID" SP nz-number SP uid-set SP uid-set + # + # source://net-imap//lib/net/imap/response_parser.rb#1876 + def resp_code_copy__data; end + + # resp-cond-auth = ("OK" / "PREAUTH") SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-auth = ("OK" / "PREAUTH") [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#809 + def resp_cond_auth; end + + # expects "OK" or "PREAUTH" and raises InvalidResponseError on failure + # + # @raise [InvalidResponseError] + # + # source://net-imap//lib/net/imap/response_parser.rb#530 + def resp_cond_auth__name; end + + # resp-cond-bye = "BYE" SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-bye = "BYE" [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#821 + def resp_cond_bye; end + + # RFC3501 & RFC9051: + # resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text + # + # NOTE: In the spirit of RFC9051 Appx E 23 (and to workaround existing + # servers), we don't require a final SP and instead parse this as: + # + # resp-cond-state = ("OK" / "NO" / "BAD") [SP resp-text] + # + # source://net-imap//lib/net/imap/response_parser.rb#795 + def resp_cond_state; end + + # expects "OK" or "NO" or "BAD" and raises InvalidResponseError on failure + # + # @raise [InvalidResponseError] + # + # source://net-imap//lib/net/imap/response_parser.rb#538 + def resp_cond_state__name; end + + # source://net-imap//lib/net/imap/response_parser.rb#799 + def resp_cond_state__untagged; end + + # RFC3501: + # resp-text = ["[" resp-text-code "]" SP] text + # RFC9051: + # resp-text = ["[" resp-text-code "]" SP] [text] + # + # We leniently re-interpret this as + # resp-text = ["[" resp-text-code "]" [SP [text]] / [text] + # + # source://net-imap//lib/net/imap/response_parser.rb#1751 + def resp_text; end + + # RFC3501 (See https://www.rfc-editor.org/errata/rfc3501): + # resp-text-code = "ALERT" / + # "BADCHARSET" [SP "(" charset *(SP charset) ")" ] / + # capability-data / "PARSE" / + # "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" / + # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / + # "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / + # "UNSEEN" SP nz-number / + # atom [SP 1*] + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev1" + # *(SP capability) + # + # RFC5530: + # resp-text-code =/ "UNAVAILABLE" / "AUTHENTICATIONFAILED" / + # "AUTHORIZATIONFAILED" / "EXPIRED" / + # "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" / + # "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" / + # "SERVERBUG" / "CLIENTBUG" / "CANNOT" / + # "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" / + # "NONEXISTENT" + # RFC9051: + # resp-text-code = "ALERT" / + # "BADCHARSET" [SP "(" charset *(SP charset) ")" ] / + # capability-data / "PARSE" / + # "PERMANENTFLAGS" SP "(" [flag-perm *(SP flag-perm)] ")" / + # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" / + # "UIDNEXT" SP nz-number / "UIDVALIDITY" SP nz-number / + # resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" / + # "UNAVAILABLE" / "AUTHENTICATIONFAILED" / + # "AUTHORIZATIONFAILED" / "EXPIRED" / + # "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" / + # "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" / + # "SERVERBUG" / "CLIENTBUG" / "CANNOT" / + # "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" / + # "NONEXISTENT" / "NOTSAVED" / "HASCHILDREN" / + # "CLOSED" / + # "UNKNOWN-CTE" / + # atom [SP 1*] + # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" + # *(SP capability) + # + # RFC4315 (UIDPLUS), RFC9051 (IMAP4rev2): + # resp-code-apnd = "APPENDUID" SP nz-number SP append-uid + # resp-code-copy = "COPYUID" SP nz-number SP uid-set SP uid-set + # resp-text-code =/ resp-code-apnd / resp-code-copy / "UIDNOTSTICKY" + # + # RFC7162 (CONDSTORE): + # resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value / + # "NOMODSEQ" / + # "MODIFIED" SP sequence-set + # RFC7162 (QRESYNC): + # resp-text-code =/ "CLOSED" + # + # RFC8474: OBJECTID + # resp-text-code =/ "MAILBOXID" SP "(" objectid ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1815 + def resp_text_code; end + + # Returns atom.upcase + # + # source://net-imap//lib/net/imap/response_parser.rb#498 + def resp_text_code__name; end + + # [RFC3501 & RFC9051:] + # response = *(continue-req / response-data) response-done + # + # For simplicity, response isn't interpreted as the combination of the + # three response types, but instead represents any individual server + # response. Our simplified interpretation is defined as: + # response = continue-req | response_data | response-tagged + # + # n.b: our "response-tagged" definition parses "greeting" too. + # + # source://net-imap//lib/net/imap/response_parser.rb#657 + def response; end + + # [RFC3501:] + # response-data = "*" SP (resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data) CRLF + # [RFC4466:] + # response-data = "*" SP response-payload CRLF + # response-payload = resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data + # RFC5161 (ENABLE capability): + # response-data =/ "*" SP enable-data CRLF + # RFC5255 (LANGUAGE capability) + # response-payload =/ language-data + # RFC5255 (I18NLEVEL=1 and I18NLEVEL=2 capabilities) + # response-payload =/ comparator-data + # [RFC9051:] + # response-data = "*" SP (resp-cond-state / resp-cond-bye / + # mailbox-data / message-data / capability-data / + # enable-data) CRLF + # + # [merging in greeting and response-fatal:] + # greeting = "*" SP (resp-cond-auth / resp-cond-bye) CRLF + # response-fatal = "*" SP resp-cond-bye CRLF + # response-data =/ "*" SP (resp-cond-auth / resp-cond-bye) CRLF + # [removing duplicates, this is simply] + # response-payload =/ resp-cond-auth + # + # TODO: remove resp-cond-auth and handle greeting separately + # + # source://net-imap//lib/net/imap/response_parser.rb#709 + def response_data; end + + # source://net-imap//lib/net/imap/response_parser.rb#769 + def response_data__ignored; end + + # source://net-imap//lib/net/imap/response_parser.rb#769 + def response_data__noop; end + + # source://net-imap//lib/net/imap/response_parser.rb#835 + def response_data__simple_numeric; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def response_data__unhandled(klass = T.unsafe(nil)); end + + # RFC3501 & RFC9051: + # response-tagged = tag SP resp-cond-state CRLF + # + # source://net-imap//lib/net/imap/response_parser.rb#784 + def response_tagged; end + + # section = "[" [section-spec] "]" + # + # source://net-imap//lib/net/imap/response_parser.rb#1268 + def section; end + + # section-binary = "[" [section-part] "]" + # + # source://net-imap//lib/net/imap/response_parser.rb#1275 + def section_binary; end + + # TODO: handle atom, astring_chars, and tag entirely inside the lexer + # section-part = nz-number *("." nz-number) + # ; body part reference. + # ; Allows for accessing nested body parts. + # + # source://net-imap//lib/net/imap/response_parser.rb#490 + def section_part; end + + # section-spec = section-msgtext / (section-part ["." section-text]) + # section-msgtext = "HEADER" / + # "HEADER.FIELDS" [".NOT"] SP header-list / + # "TEXT" + # ; top-level or MESSAGE/RFC822 or + # ; MESSAGE/GLOBAL part + # section-part = nz-number *("." nz-number) + # ; body part reference. + # ; Allows for accessing nested body parts. + # section-text = section-msgtext / "MIME" + # ; text other than actual body part (headers, + # ; etc.) + # + # n.b: we could "cheat" here and just grab all text inside the brackets, + # but literals would need special treatment. + # + # source://net-imap//lib/net/imap/response_parser.rb#1296 + def section_spec; end + + # sequence-set = (seq-number / seq-range) ["," sequence-set] + # sequence-set =/ seq-last-command + # ; Allow for "result of the last command" + # ; indicator. + # seq-last-command = "$" + # + # *note*: doesn't match seq-last-command + # + # source://net-imap//lib/net/imap/response_parser.rb#471 + def sequence_set; end + + # RFC3501: + # mailbox-data = "SEARCH" *(SP nz-number) / ... + # RFC5256: SORT + # sort-data = "SORT" *(SP nz-number) + # RFC7162: CONDSTORE, QRESYNC + # mailbox-data =/ "SEARCH" [1*(SP nz-number) SP + # search-sort-mod-seq] + # sort-data = "SORT" [1*(SP nz-number) SP + # search-sort-mod-seq] + # ; Updates the SORT response from RFC 5256. + # search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" + # RFC9051: + # mailbox-data = obsolete-search-response / ... + # obsolete-search-response = "SEARCH" *(SP nz-number) + # + # source://net-imap//lib/net/imap/response_parser.rb#1469 + def sort_data; end + + # RFC3501 + # status-att-list = status-att SP number *(SP status-att SP number) + # RFC4466, RFC9051, and RFC3501 Errata + # status-att-list = status-att-val *(SP status-att-val) + # + # source://net-imap//lib/net/imap/response_parser.rb#1546 + def status_att_list; end + + # RFC3501 Errata: + # status-att-val = ("MESSAGES" SP number) / ("RECENT" SP number) / + # ("UIDNEXT" SP nz-number) / ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) + # RFC4466: + # status-att-val = ("MESSAGES" SP number) / + # ("RECENT" SP number) / + # ("UIDNEXT" SP nz-number) / + # ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) + # ;; Extensions to the STATUS responses + # ;; should extend this production. + # ;; Extensions should use the generic + # ;; syntax defined by tagged-ext. + # RFC9051: + # status-att-val = ("MESSAGES" SP number) / + # ("UIDNEXT" SP nz-number) / + # ("UIDVALIDITY" SP nz-number) / + # ("UNSEEN" SP number) / + # ("DELETED" SP number) / + # ("SIZE" SP number64) + # ; Extensions to the STATUS responses + # ; should extend this production. + # ; Extensions should use the generic + # ; syntax defined by tagged-ext. + # RFC7162: + # status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-valzer + # ;; Extends non-terminal defined in [RFC4466]. + # ;; Value 0 denotes that the mailbox doesn't + # ;; support persistent mod-sequences + # ;; as described in Section 3.1.2.2. + # RFC7889: + # status-att-val =/ "APPENDLIMIT" SP (number / nil) + # ;; status-att-val is defined in RFC 4466 + # RFC8438: + # status-att-val =/ "SIZE" SP number64 + # RFC8474: + # status-att-val =/ "MAILBOXID" SP "(" objectid ")" + # ; follows tagged-ext production from [RFC4466] + # + # source://net-imap//lib/net/imap/response_parser.rb#1591 + def status_att_val; end + + # source://net-imap//lib/net/imap/response_parser.rb#492 + def tag; end + + # tagged-ext-comp = astring / + # tagged-ext-comp *(SP tagged-ext-comp) / + # "(" tagged-ext-comp ")" + # ; Extensions that follow this general + # ; syntax should use nstring instead of + # ; astring when appropriate in the context + # ; of the extension. + # ; Note that a message set or a "number" + # ; can always be represented as an "atom". + # ; A URL should be represented as + # ; a "quoted" string. + # + # source://net-imap//lib/net/imap/response_parser.rb#574 + def tagged_ext_comp; end + + # tagged-ext-simple is a subset of atom + # TODO: recognize sequence-set in the lexer + # + # tagged-ext-simple = sequence-set / number / number64 + # + # source://net-imap//lib/net/imap/response_parser.rb#591 + def tagged_ext_simple; end + + # tagged-ext-val = tagged-ext-simple / + # "(" [tagged-ext-comp] ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#597 + def tagged_ext_val; end + + # TEXT-CHAR = + # RFC3501: + # text = 1*TEXT-CHAR + # RFC9051: + # text = 1*(TEXT-CHAR / UTF8-2 / UTF8-3 / UTF8-4) + # ; Non-ASCII text can only be returned + # ; after ENABLE IMAP4rev2 command + # + # source://net-imap//lib/net/imap/response_parser.rb#1735 + def text; end + + # an "accept" versiun of #text + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser.rb#1740 + def text?; end + + # 1* + # + # source://net-imap//lib/net/imap/response_parser.rb#1846 + def text_chars_except_rbra; end + + # RFC5256: THREAD + # thread-data = "THREAD" [SP 1*thread-list] + # + # source://net-imap//lib/net/imap/response_parser.rb#1485 + def thread_data; end + + # RFC5256: THREAD + # thread-list = "(" (thread-members / thread-nested) ")" + # + # source://net-imap//lib/net/imap/response_parser.rb#1499 + def thread_list; end + + # RFC5256: THREAD + # thread-members = nz-number *(SP nz-number) [SP thread-nested] + # + # source://net-imap//lib/net/imap/response_parser.rb#1512 + def thread_members; end + + # RFC5256: THREAD + # thread-nested = 2*thread-list + # + # source://net-imap//lib/net/imap/response_parser.rb#1528 + def thread_nested; end + + # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): + # uid-set = (uniqueid / uid-range) *("," uid-set) + # uid-range = (uniqueid ":" uniqueid) + # ; two uniqueid values and all values + # ; between these two regardless of order. + # ; Example: 2:4 and 4:2 are equivalent. + # uniqueid = nz-number + # ; Strictly ascending + # + # source://net-imap//lib/net/imap/response_parser.rb#2005 + def uid_set; end + + # source://net-imap//lib/net/imap/response_parser.rb#751 + def uidfetch_resp(klass = T.unsafe(nil)); end + + # See https://developers.google.com/gmail/imap/imap-extensions + # + # source://net-imap//lib/net/imap/response_parser.rb#1953 + def x_gm_label; end + + # See https://developers.google.com/gmail/imap/imap-extensions + # + # source://net-imap//lib/net/imap/response_parser.rb#1956 + def x_gm_labels; end +end + +# ASTRING-CHAR = ATOM-CHAR / resp-specials +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#482 +Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#484 +Net::IMAP::ResponseParser::ASTRING_TOKENS = T.let(T.unsafe(nil), Array) + +# basic utility methods for parsing. +# +# (internal API, subject to change) +# +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#9 +module Net::IMAP::ResponseParser::ParserUtils + private + + # like match, but does not raise error on failure. + # + # returns and shifts token on successful match + # returns nil and leaves @token unshifted on no match + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#148 + def accept(*args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#193 + def accept_re(re); end + + # To be used conditionally: + # assert_no_lookahead if config.debug? + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#158 + def assert_no_lookahead; end + + # TODO: after checking the lookahead, use a regexp for remaining chars. + # That way a loop isn't needed. + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#121 + def combine_adjacent(*tokens); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#169 + def lookahead; end + + # like match, without consuming the token + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#174 + def lookahead!(*args); end + + # like accept, without consuming the token + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#165 + def lookahead?(*symbols); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#133 + def match(*args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#199 + def match_re(re, name); end + + # @raise [ResponseParseError] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#213 + def parse_error(fmt, *args); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#188 + def peek_re(re); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#183 + def peek_str?(str); end + + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#209 + def shift_token; end +end + +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#11 +module Net::IMAP::ResponseParser::ParserUtils::Generator + # we can skip lexer for single character matches, as a shortcut + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#17 + def def_char_matchers(name, char, token); end + + # TODO: move coersion to the token.value method? + # + # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#62 + def def_token_matchers(name, *token_symbols, coerce: T.unsafe(nil), send: T.unsafe(nil)); end +end + +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#13 +Net::IMAP::ResponseParser::ParserUtils::Generator::LOOKAHEAD = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser/parser_utils.rb#14 +Net::IMAP::ResponseParser::ParserUtils::Generator::SHIFT_TOKEN = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#80 +module Net::IMAP::ResponseParser::Patterns + include ::Net::IMAP::ResponseParser::Patterns::RFC5234 + include ::Net::IMAP::ResponseParser::Patterns::RFC3629 + + private + + # source://net-imap//lib/net/imap/response_parser.rb#355 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#349 + def unescape_quoted!(quoted); end + + class << self + # source://net-imap//lib/net/imap/response_parser.rb#355 + def unescape_quoted(quoted); end + + # source://net-imap//lib/net/imap/response_parser.rb#349 + def unescape_quoted!(quoted); end + end +end + +# source://net-imap//lib/net/imap/response_parser.rb#177 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#181 +Net::IMAP::ResponseParser::Patterns::ASTRING_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#175 +Net::IMAP::ResponseParser::Patterns::ASTRING_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#180 +Net::IMAP::ResponseParser::Patterns::ATOM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#182 +Net::IMAP::ResponseParser::Patterns::ATOMISH = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#178 +Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) + +# atomish = 1* +# ; We use "atomish" for msg-att and section, in order +# ; to simplify "BODY[HEADER.FIELDS (foo bar)]". +# +# atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / +# quoted-specials / resp-specials +# ATOM-CHAR = +# atom = 1*ATOM-CHAR +# ASTRING-CHAR = ATOM-CHAR / resp-specials +# tag = 1* +# +# source://net-imap//lib/net/imap/response_parser.rb#174 +Net::IMAP::ResponseParser::Patterns::ATOM_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# CHAR8 = %x01-ff +# ; any OCTET except NUL, %x00 +# +# source://net-imap//lib/net/imap/response_parser.rb#154 +Net::IMAP::ResponseParser::Patterns::CHAR8 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#190 +Net::IMAP::ResponseParser::Patterns::CODE_TEXT = T.let(T.unsafe(nil), Regexp) + +# resp-text-code = ... / atom [SP 1*] +# +# source://net-imap//lib/net/imap/response_parser.rb#189 +Net::IMAP::ResponseParser::Patterns::CODE_TEXT_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#82 +module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end + +# flag = "\Answered" / "\Flagged" / "\Deleted" / +# "\Seen" / "\Draft" / flag-keyword / flag-extension +# ; Does not include "\Recent" +# flag-extension = "\" atom +# ; Future expansion. Client implementations +# ; MUST accept flag-extension flags. Server +# ; implementations MUST NOT generate +# ; flag-extension flags except as defined by +# ; a future Standard or Standards Track +# ; revisions of this specification. +# flag-keyword = "$MDNSent" / "$Forwarded" / "$Junk" / +# "$NotJunk" / "$Phishing" / atom +# +# flag-perm = flag / "\*" +# +# Not checking for max one mbx-list-sflag in the parser. +# >>> +# mbx-list-oflag = "\Noinferiors" / child-mbox-flag / +# "\Subscribed" / "\Remote" / flag-extension +# ; Other flags; multiple from this list are +# ; possible per LIST response, but each flag +# ; can only appear once per LIST response +# mbx-list-sflag = "\NonExistent" / "\Noselect" / "\Marked" / +# "\Unmarked" +# ; Selectability flags; only one per LIST response +# child-mbox-flag = "\HasChildren" / "\HasNoChildren" +# ; attributes for the CHILDREN return option, at most +# ; one possible per LIST response +# +# source://net-imap//lib/net/imap/response_parser.rb#220 +Net::IMAP::ResponseParser::Patterns::FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#221 +Net::IMAP::ResponseParser::Patterns::FLAG_EXTENSION = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#222 +Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) + +# flag-list = "(" [flag *(SP flag)] ")" +# resp-text-code =/ "PERMANENTFLAGS" SP +# "(" [flag-perm *(SP flag-perm)] ")" +# mbx-list-flags = *(mbx-list-oflag SP) mbx-list-sflag +# *(SP mbx-list-oflag) / +# mbx-list-oflag *(SP mbx-list-oflag) +# (Not checking for max one mbx-list-sflag in the parser.) +# +# source://net-imap//lib/net/imap/response_parser.rb#233 +Net::IMAP::ResponseParser::Patterns::FLAG_LIST = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#223 +Net::IMAP::ResponseParser::Patterns::FLAG_PERM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#234 +Net::IMAP::ResponseParser::Patterns::FLAG_PERM_LIST = T.let(T.unsafe(nil), Regexp) + +# list-wildcards = "%" / "*" +# +# source://net-imap//lib/net/imap/response_parser.rb#157 +Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# literal = "{" number "}" CRLF *CHAR8 +# ; Number represents the number of CHAR8s +# RFC9051: +# literal = "{" number64 ["+"] "}" CRLF *CHAR8 +# ; represents the number of CHAR8s. +# ; A non-synchronizing literal is distinguished +# ; from a synchronizing literal by the presence of +# ; "+" before the closing "}". +# ; Non-synchronizing literals are not allowed when +# ; sent from server to the client. +# +# source://net-imap//lib/net/imap/response_parser.rb#335 +Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) + +# RFC3516 (BINARY): +# literal8 = "~{" number "}" CRLF *OCTET +# ; represents the number of OCTETs +# ; in the response string. +# RFC9051: +# literal8 = "~{" number64 "}" CRLF *OCTET +# ; represents the number of OCTETs +# ; in the response string. +# +# source://net-imap//lib/net/imap/response_parser.rb#345 +Net::IMAP::ResponseParser::Patterns::LITERAL8 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#224 +Net::IMAP::ResponseParser::Patterns::MBX_FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#235 +Net::IMAP::ResponseParser::Patterns::MBX_LIST_FLAGS = T.let(T.unsafe(nil), Regexp) + +# nz-number = digit-nz *DIGIT +# ; Non-zero unsigned 32-bit integer +# ; (0 < n < 4,294,967,296) +# +# source://net-imap//lib/net/imap/response_parser.rb#277 +Net::IMAP::ResponseParser::Patterns::NZ_NUMBER = T.let(T.unsafe(nil), Regexp) + +# Gmail allows SP and "]" in flags....... +# +# source://net-imap//lib/net/imap/response_parser.rb#238 +Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAG = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#239 +Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAGS_LIST = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#250 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_esc = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#251 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#252 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# QUOTED-CHAR = / +# "\" quoted-specials +# RFC9051: +# QUOTED-CHAR = / +# "\" quoted-specials / UTF8-2 / UTF8-3 / UTF8-4 +# RFC3501 & RFC9051: +# quoted = DQUOTE *QUOTED-CHAR DQUOTE +# +# source://net-imap//lib/net/imap/response_parser.rb#249 +Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_safe = T.let(T.unsafe(nil), Regexp) + +# quoted-specials = DQUOTE / "\" +# +# source://net-imap//lib/net/imap/response_parser.rb#159 +Net::IMAP::ResponseParser::Patterns::QUOTED_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#254 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#255 +Net::IMAP::ResponseParser::Patterns::QUOTED_rev2 = T.let(T.unsafe(nil), Regexp) + +# resp-specials = "]" +# +# source://net-imap//lib/net/imap/response_parser.rb#161 +Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp) + +# UTF-8, a transformation format of ISO 10646 +# >>> +# UTF8-1 = %x00-7F +# UTF8-tail = %x80-BF +# UTF8-2 = %xC2-DF UTF8-tail +# UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / +# %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +# UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / +# %xF4 %x80-8F 2( UTF8-tail ) +# UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 +# UTF8-octets = *( UTF8-char ) +# +# n.b. String * Integer is used for repetition, rather than /x{3}/, +# because ruby 3.2's linear-time cache-based optimization doesn't work +# with "bounded or fixed times repetition nesting in another repetition +# (e.g. /(a{2,3})*/). It is an implementation issue entirely, but we +# believe it is hard to support this case correctly." +# See https://bugs.ruby-lang.org/issues/19104 +# +# source://net-imap//lib/net/imap/response_parser.rb#134 +module Net::IMAP::ResponseParser::Patterns::RFC3629; end + +# aka ASCII 7bit +# +# source://net-imap//lib/net/imap/response_parser.rb#135 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#137 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#138 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_3 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#142 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_4 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#145 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#146 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_OCTETS = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#136 +Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), Regexp) + +# From RFC5234, "Augmented BNF for Syntax Specifications: ABNF" +# >>> +# ALPHA = %x41-5A / %x61-7A ; A-Z / a-z +# CHAR = %x01-7F +# CRLF = CR LF +# ; Internet standard newline +# CTL = %x00-1F / %x7F +# ; controls +# DIGIT = %x30-39 +# ; 0-9 +# DQUOTE = %x22 +# ; " (Double Quote) +# HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" +# OCTET = %x00-FF +# SP = %x20 +# +# source://net-imap//lib/net/imap/response_parser.rb#104 +module Net::IMAP::ResponseParser::Patterns::RFC5234; end + +# source://net-imap//lib/net/imap/response_parser.rb#105 +Net::IMAP::ResponseParser::Patterns::RFC5234::ALPHA = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#106 +Net::IMAP::ResponseParser::Patterns::RFC5234::CHAR = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#107 +Net::IMAP::ResponseParser::Patterns::RFC5234::CRLF = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#108 +Net::IMAP::ResponseParser::Patterns::RFC5234::CTL = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#109 +Net::IMAP::ResponseParser::Patterns::RFC5234::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#110 +Net::IMAP::ResponseParser::Patterns::RFC5234::DQUOTE = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#111 +Net::IMAP::ResponseParser::Patterns::RFC5234::HEXDIG = T.let(T.unsafe(nil), Regexp) + +# not using /./m for embedding purposes +# +# source://net-imap//lib/net/imap/response_parser.rb#112 +Net::IMAP::ResponseParser::Patterns::RFC5234::OCTET = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#113 +Net::IMAP::ResponseParser::Patterns::RFC5234::SP = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#321 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) + +# sequence-set = (seq-number / seq-range) ["," sequence-set] +# ; set of seq-number values, regardless of order. +# ; Servers MAY coalesce overlaps and/or execute +# ; the sequence in any order. +# ; Example: a message sequence number set of +# ; 2,4:7,9,12:* for a mailbox with 15 messages is +# ; equivalent to 2,4,5,6,7,9,12,13,14,15 +# ; Example: a message sequence number set of +# ; *:4,5:7 for a mailbox with 10 messages is +# ; equivalent to 10,9,8,7,6,5,4,5,6,7 and MAY +# ; be reordered and overlap coalesced to be +# ; 4,5,6,7,8,9,10. +# +# source://net-imap//lib/net/imap/response_parser.rb#320 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_ITEM = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#322 +Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Regexp) + +# seq-number = nz-number / "*" +# ; message sequence number (COPY, FETCH, STORE +# ; commands) or unique identifier (UID COPY, +# ; UID FETCH, UID STORE commands). +# ; * represents the largest number in use. In +# ; the case of message sequence numbers, it is +# ; the number of messages in a non-empty mailbox. +# ; In the case of unique identifiers, it is the +# ; unique identifier of the last message in the +# ; mailbox or, if the mailbox is empty, the +# ; mailbox's current UIDNEXT value. +# ; The server should respond with a tagged BAD +# ; response to a command that uses a message +# ; sequence number greater than the number of +# ; messages in the selected mailbox. This +# ; includes "*" if the selected mailbox is empty. +# +# source://net-imap//lib/net/imap/response_parser.rb#295 +Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) + +# seq-range = seq-number ":" seq-number +# ; two seq-number values and all values between +# ; these two regardless of order. +# ; Example: 2:4 and 4:2 are equivalent and +# ; indicate values 2, 3, and 4. +# ; Example: a unique identifier sequence range of +# ; 3291:* includes the UID of the last message in +# ; the mailbox, even if that value is less than +# ; 3291. +# +# source://net-imap//lib/net/imap/response_parser.rb#306 +Net::IMAP::ResponseParser::Patterns::SEQ_RANGE = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#183 +Net::IMAP::ResponseParser::Patterns::TAG = T.let(T.unsafe(nil), Regexp) + +# tagged-ext-label = tagged-label-fchar *tagged-label-char +# ; Is a valid RFC 3501 "atom". +# +# source://net-imap//lib/net/imap/response_parser.rb#272 +Net::IMAP::ResponseParser::Patterns::TAGGED_EXT_LABEL = T.let(T.unsafe(nil), Regexp) + +# tagged-label-char = tagged-label-fchar / DIGIT / ":" +# +# source://net-imap//lib/net/imap/response_parser.rb#269 +Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_CHAR = T.let(T.unsafe(nil), Regexp) + +# tagged-label-fchar = ALPHA / "-" / "_" / "." +# +# source://net-imap//lib/net/imap/response_parser.rb#267 +Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_FCHAR = T.let(T.unsafe(nil), Regexp) + +# TEXT-CHAR = +# +# source://net-imap//lib/net/imap/response_parser.rb#186 +Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) + +# RFC3501: +# text = 1*TEXT-CHAR +# RFC9051: +# text = 1*(TEXT-CHAR / UTF8-2 / UTF8-3 / UTF8-4) +# ; Non-ASCII text can only be returned +# ; after ENABLE IMAP4rev2 command +# +# source://net-imap//lib/net/imap/response_parser.rb#263 +Net::IMAP::ResponseParser::Patterns::TEXT_rev1 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#264 +Net::IMAP::ResponseParser::Patterns::TEXT_rev2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/response_parser.rb#681 +Net::IMAP::ResponseParser::RE_RESPONSE_TYPE = T.let(T.unsafe(nil), Regexp) + +# end of response string +# +# source://net-imap//lib/net/imap/response_parser.rb#65 +module Net::IMAP::ResponseParser::ResponseConditions; end + +# source://net-imap//lib/net/imap/response_parser.rb#74 +Net::IMAP::ResponseParser::ResponseConditions::AUTH_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#68 +Net::IMAP::ResponseParser::ResponseConditions::BAD = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#69 +Net::IMAP::ResponseParser::ResponseConditions::BYE = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#75 +Net::IMAP::ResponseParser::ResponseConditions::GREETING_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#67 +Net::IMAP::ResponseParser::ResponseConditions::NO = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#66 +Net::IMAP::ResponseParser::ResponseConditions::OK = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#70 +Net::IMAP::ResponseParser::ResponseConditions::PREAUTH = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/response_parser.rb#76 +Net::IMAP::ResponseParser::ResponseConditions::RESP_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#72 +Net::IMAP::ResponseParser::ResponseConditions::RESP_COND_STATES = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#73 +Net::IMAP::ResponseParser::ResponseConditions::RESP_DATA_CONDS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#462 +Net::IMAP::ResponseParser::SEQUENCE_SET_TOKENS = T.let(T.unsafe(nil), Array) + +# source://net-imap//lib/net/imap/response_parser.rb#2022 +Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# tag = 1* +# +# source://net-imap//lib/net/imap/response_parser.rb#487 +Net::IMAP::ResponseParser::TAG_TOKENS = T.let(T.unsafe(nil), Array) + +# starts with atom special +# +# source://net-imap//lib/net/imap/response_parser.rb#60 +Net::IMAP::ResponseParser::T_LITERAL8 = T.let(T.unsafe(nil), Symbol) + +# Used to avoid an allocation when ResponseText is empty +# +# source://net-imap//lib/net/imap/response_data.rb#169 +Net::IMAP::ResponseText::EMPTY = T.let(T.unsafe(nil), Net::IMAP::ResponseText) + +# Pluggable authentication mechanisms for protocols which support SASL +# (Simple Authentication and Security Layer), such as IMAP4, SMTP, LDAP, and +# XMPP. {RFC-4422}[https://tools.ietf.org/html/rfc4422] specifies the +# common \SASL framework: +# >>> +# SASL is conceptually a framework that provides an abstraction layer +# between protocols and mechanisms as illustrated in the following +# diagram. +# +# SMTP LDAP XMPP Other protocols ... +# \ | | / +# \ | | / +# SASL abstraction layer +# / | | \ +# / | | \ +# EXTERNAL GSSAPI PLAIN Other mechanisms ... +# +# Net::IMAP uses SASL via the Net::IMAP#authenticate method. +# +# == Mechanisms +# +# Each mechanism has different properties and requirements. Please consult +# the documentation for the specific mechanisms you are using: +# +# +ANONYMOUS+:: +# See AnonymousAuthenticator. +# +# Allows the user to gain access to public services or resources without +# authenticating or disclosing an identity. +# +# +EXTERNAL+:: +# See ExternalAuthenticator. +# +# Authenticates using already established credentials, such as a TLS +# certificate or IPSec. +# +# +OAUTHBEARER+:: +# See OAuthBearerAuthenticator. +# +# Login using an OAuth2 Bearer token. This is the standard mechanism +# for using OAuth2 with \SASL, but it is not yet deployed as widely as +# +XOAUTH2+. +# +# +PLAIN+:: +# See PlainAuthenticator. +# +# Login using clear-text username and password. +# +# +SCRAM-SHA-1+:: +# +SCRAM-SHA-256+:: +# See ScramAuthenticator. +# +# Login by username and password. The password is not sent to the +# server but is used in a salted challenge/response exchange. +# +SCRAM-SHA-1+ and +SCRAM-SHA-256+ are directly supported by +# Net::IMAP::SASL. New authenticators can easily be added for any other +# SCRAM-* mechanism if the digest algorithm is supported by +# OpenSSL::Digest. +# +# +XOAUTH2+:: +# See XOAuth2Authenticator. +# +# Login using a username and an OAuth2 access token. Non-standard and +# obsoleted by +OAUTHBEARER+, but widely supported. +# +# See the {SASL mechanism +# registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# for a list of all SASL mechanisms and their specifications. To register +# new authenticators, see Authenticators. +# +# === Deprecated mechanisms +# +# Obsolete mechanisms should be avoided, but are still available for +# backwards compatibility. +# +# >>> +# For +DIGEST-MD5+ see DigestMD5Authenticator. +# +# For +LOGIN+, see LoginAuthenticator. +# +# For +CRAM-MD5+, see CramMD5Authenticator. +# +# Using a deprecated mechanism will print a warning. +# +# source://net-imap//lib/net/imap/sasl.rb#90 +module Net::IMAP::SASL + private + + # See Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap/sasl.rb#173 + def saslprep(string, **opts); end + + class << self + # Delegates to ::authenticators. See Authenticators#add_authenticator. + # + # source://net-imap//lib/net/imap/sasl.rb#168 + def add_authenticator(*_arg0, **_arg1, &_arg2); end + + # Delegates to registry.new See Authenticators#new. + # + # source://net-imap//lib/net/imap/sasl.rb#163 + def authenticator(*args, registry: T.unsafe(nil), **kwargs, &block); end + + # Returns the default global SASL::Authenticators instance. + # + # source://net-imap//lib/net/imap/sasl.rb#160 + def authenticators; end + + # See Net::IMAP::StringPrep::SASLprep#saslprep. + # + # source://net-imap//lib/net/imap/sasl.rb#173 + def saslprep(string, **opts); end + end +end + +# Authenticator for the "+ANONYMOUS+" SASL mechanism, as specified by +# RFC-4505[https://tools.ietf.org/html/rfc4505]. See +# Net::IMAP#authenticate. +# +# source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#10 +class Net::IMAP::SASL::AnonymousAuthenticator + # :call-seq: + # new(anonymous_message = "", **) -> authenticator + # new(anonymous_message: "", **) -> authenticator + # + # Creates an Authenticator for the "+ANONYMOUS+" SASL mechanism, as + # specified in RFC-4505[https://tools.ietf.org/html/rfc4505]. To use + # this, see Net::IMAP#authenticate or your client's authentication + # method. + # + # ==== Parameters + # + # * _optional_ #anonymous_message — a message to send to the server. + # + # Any other keyword arguments are silently ignored. + # + # @return [AnonymousAuthenticator] a new instance of AnonymousAuthenticator + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#37 + def initialize(anon_msg = T.unsafe(nil), anonymous_message: T.unsafe(nil), **_arg2); end + + # An optional token sent for the +ANONYMOUS+ mechanism., up to 255 UTF-8 + # characters in length. + # + # If it contains an "@" sign, the message must be a valid email address + # (+addr-spec+ from RFC-2822[https://tools.ietf.org/html/rfc2822]). + # Email syntax is _not_ validated by AnonymousAuthenticator. + # + # Otherwise, it can be any UTF8 string which is permitted by the + # StringPrep::Trace profile. + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#21 + def anonymous_message; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#64 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +ANONYMOUS+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#51 + def initial_response?; end + + # Returns #anonymous_message. + # + # source://net-imap//lib/net/imap/sasl/anonymous_authenticator.rb#54 + def process(_server_challenge_string); end +end + +# Indicates an authentication exchange that will be or has been canceled +# by the client, not due to any error or failure during processing. +# +# source://net-imap//lib/net/imap/sasl.rb#106 +class Net::IMAP::SASL::AuthenticationCanceled < ::Net::IMAP::SASL::Error; end + +# Indicates an error when processing a server challenge, e.g: an invalid +# or unparsable challenge. An underlying exception may be available as +# the exception's #cause. +# +# source://net-imap//lib/net/imap/sasl.rb#111 +class Net::IMAP::SASL::AuthenticationError < ::Net::IMAP::SASL::Error; end + +# This API is *experimental*, and may change. +# +# TODO: catch exceptions in #process and send #cancel_response. +# TODO: raise an error if the command succeeds after being canceled. +# TODO: use with more clients, to verify the API can accommodate them. +# +# Create an AuthenticationExchange from a client adapter and a mechanism +# authenticator: +# def authenticate(mechanism, ...) +# authenticator = SASL.authenticator(mechanism, ...) +# SASL::AuthenticationExchange.new( +# sasl_adapter, mechanism, authenticator +# ).authenticate +# end +# +# private +# +# def sasl_adapter = MyClientAdapter.new(self, &method(:send_command)) +# +# Or delegate creation of the authenticator to ::build: +# def authenticate(...) +# SASL::AuthenticationExchange.build(sasl_adapter, ...) +# .authenticate +# end +# +# As a convenience, ::authenticate combines ::build and #authenticate: +# def authenticate(...) +# SASL::AuthenticationExchange.authenticate(sasl_adapter, ...) +# end +# +# Likewise, ClientAdapter#authenticate delegates to #authenticate: +# def authenticate(...) = sasl_adapter.authenticate(...) +# +# source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#40 +class Net::IMAP::SASL::AuthenticationExchange + # @return [AuthenticationExchange] a new instance of AuthenticationExchange + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#52 + def initialize(client, mechanism, authenticator, sasl_ir: T.unsafe(nil)); end + + # Call #authenticate to execute an authentication exchange for #client + # using #authenticator. Authentication failures will raise an + # exception. Any exceptions other than those in RESPONSE_ERRORS will + # drop the connection. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#64 + def authenticate; end + + # Returns the value of attribute authenticator. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#50 + def authenticator; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#85 + def done?; end + + # Returns the value of attribute mechanism. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#50 + def mechanism; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#77 + def send_initial_response?; end + + private + + # Returns the value of attribute client. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#91 + def client; end + + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#93 + def initial_response; end + + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#98 + def process(challenge); end + + class << self + # Convenience method for build(...).authenticate + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#42 + def authenticate(*_arg0, **_arg1, &_arg2); end + + # Use +registry+ to override the global Authenticators registry. + # + # source://net-imap//lib/net/imap/sasl/authentication_exchange.rb#45 + def build(client, mechanism, *args, sasl_ir: T.unsafe(nil), **kwargs, &block); end + end +end + +# Indicates that authentication cannot proceed because one of the server's +# messages has not passed integrity checks. +# +# source://net-imap//lib/net/imap/sasl.rb#115 +class Net::IMAP::SASL::AuthenticationFailed < ::Net::IMAP::SASL::Error; end + +# Indicates that authentication cannot proceed because one of the server's +# ended authentication prematurely. +# +# source://net-imap//lib/net/imap/sasl.rb#119 +class Net::IMAP::SASL::AuthenticationIncomplete < ::Net::IMAP::SASL::AuthenticationFailed + # @return [AuthenticationIncomplete] a new instance of AuthenticationIncomplete + # + # source://net-imap//lib/net/imap/sasl.rb#123 + def initialize(response, message = T.unsafe(nil)); end + + # The success response from the server + # + # source://net-imap//lib/net/imap/sasl.rb#121 + def response; end +end + +# Registry for SASL authenticators +# +# Registered authenticators must respond to +#new+ or +#call+ (e.g. a class or +# a proc), receiving any credentials and options and returning an +# authenticator instance. The returned object represents a single +# authentication exchange and must not be reused for multiple +# authentication attempts. +# +# An authenticator instance object must respond to +#process+, receiving the +# server's challenge and returning the client's response. Optionally, it may +# also respond to +#initial_response?+ and +#done?+. When +# +#initial_response?+ returns +true+, +#process+ may be called the first +# time with +nil+. When +#done?+ returns +false+, the exchange is incomplete +# and an exception should be raised if the exchange terminates prematurely. +# +# See the source for PlainAuthenticator, XOAuth2Authenticator, and +# ScramSHA1Authenticator for examples. +# +# source://net-imap//lib/net/imap/sasl/authenticators.rb#22 +class Net::IMAP::SASL::Authenticators + # Create a new Authenticators registry. + # + # This class is usually not instantiated directly. Use SASL.authenticators + # to reuse the default global registry. + # + # When +use_defaults+ is +false+, the registry will start empty. When + # +use_deprecated+ is +false+, deprecated authenticators will not be + # included with the defaults. + # + # @return [Authenticators] a new instance of Authenticators + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#32 + def initialize(use_defaults: T.unsafe(nil), use_deprecated: T.unsafe(nil)); end + + # :call-seq: + # add_authenticator(mechanism) + # add_authenticator(mechanism, authenticator_class) + # add_authenticator(mechanism, authenticator_proc) + # + # Registers an authenticator for #authenticator to use. +mechanism+ is the + # name of the + # {SASL mechanism}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] + # implemented by +authenticator_class+ (for instance, "PLAIN"). + # + # If +mechanism+ refers to an existing authenticator, + # the old authenticator will be replaced. + # + # When only a single argument is given, the authenticator class will be + # lazily loaded from Net::IMAP::SASL::#{name}Authenticator (case is + # preserved and non-alphanumeric characters are removed.. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#67 + def add_authenticator(name, authenticator = T.unsafe(nil)); end + + # :call-seq: + # authenticator(mechanism, ...) -> auth_session + # + # Builds an authenticator instance using the authenticator registered to + # +mechanism+. The returned object represents a single authentication + # exchange and must not be reused for multiple authentication + # attempts. + # + # All arguments (except +mechanism+) are forwarded to the registered + # authenticator's +#new+ or +#call+ method. Each authenticator must + # document its own arguments. + # + # [Note] + # This method is intended for internal use by connection protocol code + # only. Protocol client users should see refer to their client's + # documentation, e.g. Net::IMAP#authenticate. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#107 + def authenticator(mechanism, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#86 + def mechanism?(name); end + + # Returns the names of all registered SASL mechanisms. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#49 + def names; end + + # :call-seq: + # authenticator(mechanism, ...) -> auth_session + # + # Builds an authenticator instance using the authenticator registered to + # +mechanism+. The returned object represents a single authentication + # exchange and must not be reused for multiple authentication + # attempts. + # + # All arguments (except +mechanism+) are forwarded to the registered + # authenticator's +#new+ or +#call+ method. Each authenticator must + # document its own arguments. + # + # [Note] + # This method is intended for internal use by connection protocol code + # only. Protocol client users should see refer to their client's + # documentation, e.g. Net::IMAP#authenticate. + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#107 + def new(mechanism, *_arg1, **_arg2, &_arg3); end + + # Removes the authenticator registered for +name+ + # + # source://net-imap//lib/net/imap/sasl/authenticators.rb#81 + def remove_authenticator(name); end +end + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#8 +Net::IMAP::SASL::BidiStringError = Net::IMAP::StringPrep::BidiStringError + +# This API is *experimental*, and may change. +# +# TODO: use with more clients, to verify the API can accommodate them. +# +# An abstract base class for implementing a SASL authentication exchange. +# Different clients will each have their own adapter subclass, overridden +# to match their needs. +# +# Although the default implementations _may_ be sufficient, subclasses +# will probably need to override some methods. Additionally, subclasses +# may need to include a protocol adapter mixin, if the default +# ProtocolAdapters::Generic isn't sufficient. +# +# source://net-imap//lib/net/imap/sasl/client_adapter.rb#19 +class Net::IMAP::SASL::ClientAdapter + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # +command_proc+ can used to avoid exposing private methods on #client. + # It should run a command with the arguments sent to it, yield each + # continuation payload, respond to the server with the result of each + # yield, and return the result. Non-successful results *MUST* raise an + # exception. Exceptions in the block *MUST* cause the command to fail. + # + # Subclasses that override #run_command may use #command_proc for + # other purposes. + # + # @return [ClientAdapter] a new instance of ClientAdapter + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#32 + def initialize(client, &command_proc); end + + # Does the server advertise support for the mechanism? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#43 + def auth_capable?(mechanism); end + + # Delegates to AuthenticationExchange.authenticate. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#37 + def authenticate(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute client. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#22 + def client; end + + # Returns the value of attribute command_proc. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#22 + def command_proc; end + + # Drop the connection gracefully. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#65 + def drop_connection; end + + # Drop the connection abruptly. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#68 + def drop_connection!; end + + # Returns an array of server responses errors raised by run_command. + # Exceptions in this array won't drop the connection. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#62 + def response_errors; end + + # Runs the authenticate command with +mechanism+ and +initial_response+. + # When +initial_response+ is nil, an initial response must NOT be sent. + # + # Yields each continuation payload, responds to the server with the + # result of each yield, and returns the result. Non-successful results + # *MUST* raise an exception. Exceptions in the block *MUST* cause the + # command to fail. + # + # Subclasses that override this may use #command_proc differently. + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#54 + def run_command(mechanism, initial_response = T.unsafe(nil), &block); end + + # Do the protocol and server both support an initial response? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/client_adapter.rb#40 + def sasl_ir_capable?; end +end + +# Authenticator for the "+CRAM-MD5+" SASL mechanism, specified in +# RFC2195[https://tools.ietf.org/html/rfc2195]. See Net::IMAP#authenticate. +# +# == Deprecated +# +# +CRAM-MD5+ is obsolete and insecure. It is included for compatibility with +# existing servers. +# {draft-ietf-sasl-crammd5-to-historic}[https://tools.ietf.org/html/draft-ietf-sasl-crammd5-to-historic-00.html] +# recommends using +SCRAM-*+ or +PLAIN+ protected by TLS instead. +# +# Additionally, RFC8314[https://tools.ietf.org/html/rfc8314] discourage the use +# of cleartext and recommends TLS version 1.2 or greater be used for all +# traffic. With TLS +CRAM-MD5+ is okay, but so is +PLAIN+ +# +# source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#16 +class Net::IMAP::SASL::CramMD5Authenticator + # @return [CramMD5Authenticator] a new instance of CramMD5Authenticator + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#17 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg7); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#40 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#31 + def initial_response?; end + + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#33 + def process(challenge); end + + private + + # source://net-imap//lib/net/imap/sasl/cram_md5_authenticator.rb#44 + def hmac_md5(text, key); end +end + +# Net::IMAP authenticator for the "`DIGEST-MD5`" SASL mechanism type, specified +# in RFC-2831[https://tools.ietf.org/html/rfc2831]. See Net::IMAP#authenticate. +# +# == Deprecated +# +# "+DIGEST-MD5+" has been deprecated by +# RFC-6331[https://tools.ietf.org/html/rfc6331] and should not be relied on for +# security. It is included for compatibility with existing servers. +# +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#11 +class Net::IMAP::SASL::DigestMD5Authenticator + # :call-seq: + # new(username, password, authzid = nil, **options) -> authenticator + # new(username:, password:, authzid: nil, **options) -> authenticator + # new(authcid:, password:, authzid: nil, **options) -> authenticator + # + # Creates an Authenticator for the "+DIGEST-MD5+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #authcid ― Authentication identity that is associated with #password. + # + # #username ― An alias for +authcid+. + # + # * #password ― A password or passphrase associated with this #authcid. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # When +authzid+ is not set, the server should derive the authorization + # identity from the authentication identity. + # + # * _optional_ +warn_deprecation+ — Set to +false+ to silence the warning. + # + # Any other keyword arguments are silently ignored. + # + # @return [DigestMD5Authenticator] a new instance of DigestMD5Authenticator + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#70 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authz = T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), authzid: T.unsafe(nil), authcid: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg9); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#24 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The identity + # form is application protocol specific. If not provided or left blank, the + # server derives an authorization identity from the authentication identity. + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's authentication + # identity is allowed to act as (or on behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "DIGEST-MD5", "root", ->{passwd}, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#43 + def authzid; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#156 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#88 + def initial_response?; end + + # A password or passphrase that matches the #username. + # + # The +password+ will be used to create the response digest. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#30 + def password; end + + # Responds to server challenge in two stages. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#91 + def process(challenge); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#24 + def username; end + + private + + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#160 + def nc(nonce); end + + # some responses need quoting + # + # source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#170 + def qdval(k, v); end +end + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#14 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_DONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#12 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_ONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/digest_md5_authenticator.rb#13 +Net::IMAP::SASL::DigestMD5Authenticator::STAGE_TWO = T.let(T.unsafe(nil), Symbol) + +# Exception class for any client error detected during the authentication +# exchange. +# +# When the _server_ reports an authentication failure, it will respond +# with a protocol specific error instead, e.g: +BAD+ or +NO+ in IMAP. +# +# When the client encounters any error, it *must* consider the +# authentication exchange to be unsuccessful and it might need to drop the +# connection. For example, if the server reports that the authentication +# exchange was successful or the protocol does not allow additional +# authentication attempts. +# +# source://net-imap//lib/net/imap/sasl.rb#102 +class Net::IMAP::SASL::Error < ::StandardError; end + +# Authenticator for the "+EXTERNAL+" SASL mechanism, as specified by +# RFC-4422[https://tools.ietf.org/html/rfc4422]. See +# Net::IMAP#authenticate. +# +# The EXTERNAL mechanism requests that the server use client credentials +# established external to SASL, for example by TLS certificate or IPSec. +# +# source://net-imap//lib/net/imap/sasl/external_authenticator.rb#13 +class Net::IMAP::SASL::ExternalAuthenticator + # :call-seq: + # new(authzid: nil, **) -> authenticator + # new(username: nil, **) -> authenticator + # new(username = nil, **) -> authenticator + # + # Creates an Authenticator for the "+EXTERNAL+" SASL mechanism, as + # specified in RFC-4422[https://tools.ietf.org/html/rfc4422]. To use + # this, see Net::IMAP#authenticate or your client's authentication + # method. + # + # ==== Parameters + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username ― An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by the + # external credentials. + # + # Any other keyword parameters are quietly ignored. + # + # @return [ExternalAuthenticator] a new instance of ExternalAuthenticator + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#52 + def initialize(user = T.unsafe(nil), authzid: T.unsafe(nil), username: T.unsafe(nil), **_arg3); end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#27 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#78 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +EXTERNAL+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#65 + def initial_response?; end + + # Returns #authzid, or an empty string if there is no authzid. + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#68 + def process(_); end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#27 + def username; end +end + +# Originally defined for the GS2 mechanism family in +# RFC5801[https://tools.ietf.org/html/rfc5801], +# several different mechanisms start with a GS2 header: +# * +GS2-*+ --- RFC5801[https://tools.ietf.org/html/rfc5801] +# * +SCRAM-*+ --- RFC5802[https://tools.ietf.org/html/rfc5802] +# (ScramAuthenticator) +# * +SAML20+ --- RFC6595[https://tools.ietf.org/html/rfc6595] +# * +OPENID20+ --- RFC6616[https://tools.ietf.org/html/rfc6616] +# * +OAUTH10A+ --- RFC7628[https://tools.ietf.org/html/rfc7628] +# * +OAUTHBEARER+ --- RFC7628[https://tools.ietf.org/html/rfc7628] +# (OAuthBearerAuthenticator) +# +# Classes that include this module must implement +#authzid+. +# +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#20 +module Net::IMAP::SASL::GS2Header + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-authzid+ header, when +#authzid+ is not empty. + # + # If +#authzid+ is empty or +nil+, an empty string is returned. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#59 + def gs2_authzid; end + + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-cb-flag+: + # + # "+n+":: The client doesn't support channel binding. + # "+y+":: The client does support channel binding + # but thinks the server does not. + # "+p+":: The client requires channel binding. + # The selected channel binding follows "+p=+". + # + # The default always returns "+n+". A mechanism that supports channel + # binding must override this method. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#53 + def gs2_cb_flag; end + + # The {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] + # +gs2-header+, which prefixes the #initial_client_response. + # + # >>> + # Note: the actual GS2 header includes an optional flag to + # indicate that the GSS mechanism is not "standard", but since all of + # the SASL mechanisms using GS2 are "standard", we don't include that + # flag. A class for a nonstandard GSSAPI mechanism should prefix with + # "+F,+". + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#37 + def gs2_header; end + + private + + # Encodes +str+ to match RFC5801_SASLNAME. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#67 + def gs2_saslname_encode(str); end + + class << self + # Encodes +str+ to match RFC5801_SASLNAME. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#67 + def gs2_saslname_encode(str); end + end +end + +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#21 +Net::IMAP::SASL::GS2Header::NO_NULL_CHARS = T.let(T.unsafe(nil), Regexp) + +# Matches {RFC5801 §4}[https://www.rfc-editor.org/rfc/rfc5801#section-4] +# +saslname+. The output from gs2_saslname_encode matches this Regexp. +# +# source://net-imap//lib/net/imap/sasl/gs2_header.rb#26 +Net::IMAP::SASL::GS2Header::RFC5801_SASLNAME = T.let(T.unsafe(nil), Regexp) + +# Authenticator for the "+LOGIN+" SASL mechanism. See Net::IMAP#authenticate. +# +# +LOGIN+ authentication sends the password in cleartext. +# RFC3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable +# cleartext authentication until after TLS has been negotiated. +# RFC8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or +# greater be used for all traffic, and deprecate cleartext access ASAP. +LOGIN+ +# can be secured by TLS encryption. +# +# == Deprecated +# +# The {SASL mechanisms +# registry}[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml] +# marks "LOGIN" as obsoleted in favor of "PLAIN". It is included here for +# compatibility with existing servers. See +# {draft-murchison-sasl-login}[https://www.iana.org/go/draft-murchison-sasl-login] +# for both specification and deprecation. +# +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#20 +class Net::IMAP::SASL::LoginAuthenticator + # @return [LoginAuthenticator] a new instance of LoginAuthenticator + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#26 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), warn_deprecation: T.unsafe(nil), **_arg7); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#54 + def done?; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#39 + def initial_response?; end + + # source://net-imap//lib/net/imap/sasl/login_authenticator.rb#41 + def process(data); end +end + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#23 +Net::IMAP::SASL::LoginAuthenticator::STATE_DONE = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#22 +Net::IMAP::SASL::LoginAuthenticator::STATE_PASSWORD = T.let(T.unsafe(nil), Symbol) + +# source://net-imap//lib/net/imap/sasl/login_authenticator.rb#21 +Net::IMAP::SASL::LoginAuthenticator::STATE_USER = T.let(T.unsafe(nil), Symbol) + +# Abstract base class for the SASL mechanisms defined in +# RFC7628[https://tools.ietf.org/html/rfc7628]: +# * OAUTHBEARER[rdoc-ref:OAuthBearerAuthenticator] +# (OAuthBearerAuthenticator) +# * OAUTH10A +# +# source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#14 +class Net::IMAP::SASL::OAuthAuthenticator + include ::Net::IMAP::SASL::GS2Header + + # Creates an RFC7628[https://tools.ietf.org/html/rfc7628] OAuth + # authenticator. + # + # ==== Parameters + # + # See child classes for required parameter(s). The following parameters + # are all optional, but it is worth noting that application protocols + # are allowed to require #authzid (or other parameters, such as + # #host or #port) as are specific server implementations. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username — An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by the OAuth + # token. + # + # * _optional_ #host — Hostname to which the client connected. + # * _optional_ #port — Service port to which the client connected. + # * _optional_ #mthd — HTTP method + # * _optional_ #path — HTTP path data + # * _optional_ #post — HTTP post data + # * _optional_ #qs — HTTP query string + # + # _optional_ #query — An alias for #qs + # + # Any other keyword parameters are quietly ignored. + # + # @return [OAuthAuthenticator] a new instance of OAuthAuthenticator + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#84 + def initialize(authzid: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), username: T.unsafe(nil), query: T.unsafe(nil), mthd: T.unsafe(nil), path: T.unsafe(nil), post: T.unsafe(nil), qs: T.unsafe(nil), **_arg9); end + + # Value of the HTTP Authorization header + # + # Implemented by subclasses. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#124 + def authorization; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#29 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#119 + def done?; end + + # Hostname to which the client connected. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#33 + def host; end + + # The {RFC7628 §3.1}[https://www.rfc-editor.org/rfc/rfc7628#section-3.1] + # formatted response. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#99 + def initial_client_response; end + + # Stores the most recent server "challenge". When authentication fails, + # this may hold information about the failure reason, as JSON. + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#53 + def last_server_response; end + + # HTTP method. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#39 + def mthd; end + + # HTTP path data. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#42 + def path; end + + # Service port to which the client connected. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#36 + def port; end + + # HTTP post data. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#45 + def post; end + + # Returns initial_client_response the first time, then "^A". + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#108 + def process(data); end + + # The query string. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#48 + def qs; end + + # The query string. (optional) + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#48 + def query; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. The server is responsible for verifying the + # client's credentials and verifying that the identity it associates + # with the client's authentication identity is allowed to act as (or on + # behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#29 + def username; end +end + +# Authenticator for the "+OAUTHBEARER+" SASL mechanism, specified in +# RFC7628[https://tools.ietf.org/html/rfc7628]. Authenticates using OAuth +# 2.0 bearer tokens, as described in +# RFC6750[https://tools.ietf.org/html/rfc6750]. Use via +# Net::IMAP#authenticate. +# +# RFC6750[https://tools.ietf.org/html/rfc6750] requires Transport Layer +# Security (TLS) to secure the protocol interaction between the client and +# the resource server. TLS _MUST_ be used for +OAUTHBEARER+ to protect +# the bearer token. +# +# source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#138 +class Net::IMAP::SASL::OAuthBearerAuthenticator < ::Net::IMAP::SASL::OAuthAuthenticator + # :call-seq: + # new(oauth2_token, **options) -> authenticator + # new(authzid, oauth2_token, **options) -> authenticator + # new(oauth2_token:, **options) -> authenticator + # + # Creates an Authenticator for the "+OAUTHBEARER+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #oauth2_token — An OAuth2 bearer token + # + # All other keyword parameters are passed to + # {super}[rdoc-ref:OAuthAuthenticator::new] (see OAuthAuthenticator). + # The most common ones are: + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # _optional_ #username — An alias for #authzid. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authentication identity is established for the client by + # #oauth2_token. + # + # * _optional_ #host — Hostname to which the client connected. + # * _optional_ #port — Service port to which the client connected. + # + # Although only oauth2_token is required by this mechanism, it is worth + # noting that application protocols are allowed to + # require #authzid (or other parameters, such as #host + # _or_ #port) as are specific server implementations. + # + # @return [OAuthBearerAuthenticator] a new instance of OAuthBearerAuthenticator + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#177 + def initialize(arg1 = T.unsafe(nil), arg2 = T.unsafe(nil), oauth2_token: T.unsafe(nil), secret: T.unsafe(nil), **args, &blk); end + + # Value of the HTTP Authorization header + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#193 + def authorization; end + + # :call-seq: + # initial_response? -> true + # + # +OAUTHBEARER+ sends an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#190 + def initial_response?; end + + # An OAuth 2.0 bearer token. See {RFC-6750}[https://www.rfc-editor.org/rfc/rfc6750] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#141 + def oauth2_token; end + + # An OAuth 2.0 bearer token. See {RFC-6750}[https://www.rfc-editor.org/rfc/rfc6750] + # + # source://net-imap//lib/net/imap/sasl/oauthbearer_authenticator.rb#141 + def secret; end +end + +# Authenticator for the "+PLAIN+" SASL mechanism, specified in +# RFC-4616[https://tools.ietf.org/html/rfc4616]. See Net::IMAP#authenticate. +# +# +PLAIN+ authentication sends the password in cleartext. +# RFC-3501[https://tools.ietf.org/html/rfc3501] encourages servers to disable +# cleartext authentication until after TLS has been negotiated. +# RFC-8314[https://tools.ietf.org/html/rfc8314] recommends TLS version 1.2 or +# greater be used for all traffic, and deprecate cleartext access ASAP. +PLAIN+ +# can be secured by TLS encryption. +# +# source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#12 +class Net::IMAP::SASL::PlainAuthenticator + # :call-seq: + # new(username, password, authzid: nil, **) -> authenticator + # new(username:, password:, authzid: nil, **) -> authenticator + # new(authcid:, password:, authzid: nil, **) -> authenticator + # + # Creates an Authenticator for the "+PLAIN+" SASL mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # ==== Parameters + # + # * #authcid ― Authentication identity that is associated with #password. + # + # #username ― An alias for #authcid. + # + # * #password ― A password or passphrase associated with the #authcid. + # + # * _optional_ #authzid ― Authorization identity to act as or on behalf of. + # + # When +authzid+ is not set, the server should derive the authorization + # identity from the authentication identity. + # + # Any other keyword parameters are quietly ignored. + # + # @raise [ArgumentError] + # @return [PlainAuthenticator] a new instance of PlainAuthenticator + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#67 + def initialize(user = T.unsafe(nil), pass = T.unsafe(nil), authcid: T.unsafe(nil), secret: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), authzid: T.unsafe(nil), **_arg7); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#24 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The identity + # form is application protocol specific. If not provided or left blank, the + # server derives an authorization identity from the authentication identity. + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's authentication + # identity is allowed to act as (or on behalf of) the authorization identity. + # + # For example, an administrator or superuser might take on another role: + # + # imap.authenticate "PLAIN", "root", passwd, authzid: "user" + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#42 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#99 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +PLAIN+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#86 + def initial_response?; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#28 + def password; end + + # Responds with the client's credentials. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#89 + def process(data); end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#28 + def secret; end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#24 + def username; end +end + +# source://net-imap//lib/net/imap/sasl/plain_authenticator.rb#14 +Net::IMAP::SASL::PlainAuthenticator::NULL = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#9 +Net::IMAP::SASL::ProhibitedCodepoint = Net::IMAP::StringPrep::ProhibitedCodepoint + +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#7 +module Net::IMAP::SASL::ProtocolAdapters; end + +# This API is experimental, and may change. +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#9 +module Net::IMAP::SASL::ProtocolAdapters::Generic + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#17 + def cancel_response; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#10 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#16 + def decode(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#15 + def encode(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#14 + def encode_ir(string); end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#12 + def host; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#13 + def port; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#11 + def service; end +end + +# See RFC-3501 (IMAP4rev1), RFC-4959 (SASL-IR capability), +# and RFC-9051 (IMAP4rev2). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#22 +module Net::IMAP::SASL::ProtocolAdapters::IMAP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#24 + def service; end +end + +# See RFC-5034 (SASL capability). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#35 +module Net::IMAP::SASL::ProtocolAdapters::POP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#37 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#38 + def service; end +end + +# See RFC-4954 (AUTH capability). +# +# source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#28 +module Net::IMAP::SASL::ProtocolAdapters::SMTP + include ::Net::IMAP::SASL::ProtocolAdapters::Generic + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#30 + def command_name; end + + # source://net-imap//lib/net/imap/sasl/protocol_adapters.rb#31 + def service; end +end + +# Alias for Net::IMAP::StringPrep::SASLprep. +# +# source://net-imap//lib/net/imap/sasl/stringprep.rb#6 +Net::IMAP::SASL::SASLprep = Net::IMAP::StringPrep::SASLprep + +# For method descriptions, +# see {RFC5802 §2.2}[https://www.rfc-editor.org/rfc/rfc5802#section-2.2] +# and {RFC5802 §3}[https://www.rfc-editor.org/rfc/rfc5802#section-3]. +# +# source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#10 +module Net::IMAP::SASL::ScramAlgorithm + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#24 + def H(str); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#26 + def HMAC(key, data); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#13 + def Hi(str, salt, iterations); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#11 + def Normalize(str); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#28 + def XOR(str1, str2); end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#35 + def auth_message; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#48 + def client_key; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#53 + def client_proof; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#51 + def client_signature; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#44 + def salted_password; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#49 + def server_key; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#52 + def server_signature; end + + # source://net-imap//lib/net/imap/sasl/scram_algorithm.rb#50 + def stored_key; end +end + +# Abstract base class for the "+SCRAM-*+" family of SASL mechanisms, +# defined in RFC5802[https://tools.ietf.org/html/rfc5802]. Use via +# Net::IMAP#authenticate. +# +# Directly supported: +# * +SCRAM-SHA-1+ --- ScramSHA1Authenticator +# * +SCRAM-SHA-256+ --- ScramSHA256Authenticator +# +# New +SCRAM-*+ mechanisms can easily be added for any hash algorithm +# supported by +# OpenSSL::Digest[https://ruby.github.io/openssl/OpenSSL/Digest.html]. +# Subclasses need only set an appropriate +DIGEST_NAME+ constant. +# +# === SCRAM algorithm +# +# See the documentation and method definitions on ScramAlgorithm for an +# overview of the algorithm. The different mechanisms differ only by +# which hash function that is used (or by support for channel binding with +# +-PLUS+). +# +# See also the methods on GS2Header. +# +# ==== Server messages +# +# As server messages are received, they are validated and loaded into +# the various attributes, e.g: #snonce, #salt, #iterations, #verifier, +# #server_error, etc. +# +# Unlike many other SASL mechanisms, the +SCRAM-*+ family supports mutual +# authentication and can return server error data in the server messages. +# If #process raises an Error for the server-final-message, then +# server_error may contain error details. +# +# === TLS Channel binding +# +# The SCRAM-*-PLUS mechanisms and channel binding are not +# supported yet. +# +# === Caching SCRAM secrets +# +# Caching of salted_password, client_key, stored_key, and server_key +# is not supported yet. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#56 +class Net::IMAP::SASL::ScramAuthenticator + include ::Net::IMAP::SASL::GS2Header + include ::Net::IMAP::SASL::ScramAlgorithm + + # :call-seq: + # new(username, password, **options) -> auth_ctx + # new(username:, password:, **options) -> auth_ctx + # new(authcid:, password:, **options) -> auth_ctx + # + # Creates an authenticator for one of the "+SCRAM-*+" SASL mechanisms. + # Each subclass defines #digest to match a specific mechanism. + # + # Called by Net::IMAP#authenticate and similar methods on other clients. + # + # === Parameters + # + # * #authcid ― Identity whose #password is used. + # + # #username - An alias for #authcid. + # * #password ― Password or passphrase associated with this #username. + # * _optional_ #authzid ― Alternate identity to act as or on behalf of. + # * _optional_ #min_iterations - Overrides the default value (4096). + # + # Any other keyword parameters are quietly ignored. + # + # @return [ScramAuthenticator] a new instance of ScramAuthenticator + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#80 + def initialize(username_arg = T.unsafe(nil), password_arg = T.unsafe(nil), authcid: T.unsafe(nil), username: T.unsafe(nil), authzid: T.unsafe(nil), password: T.unsafe(nil), secret: T.unsafe(nil), min_iterations: T.unsafe(nil), cnonce: T.unsafe(nil), **options); end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#107 + def authcid; end + + # Authorization identity: an identity to act as or on behalf of. The + # identity form is application protocol specific. If not provided or + # left blank, the server derives an authorization identity from the + # authentication identity. For example, an administrator or superuser + # might take on another role: + # + # imap.authenticate "SCRAM-SHA-256", "root", passwd, authzid: "user" + # + # The server is responsible for verifying the client's credentials and + # verifying that the identity it associates with the client's + # authentication identity is allowed to act as (or on behalf of) the + # authorization identity. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#126 + def authzid; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +cbind-input+. + # + # >>> + # *TODO:* implement channel binding, appending +cbind-data+ here. + # + # source://net-imap//lib/net/imap/sasl/gs2_header.rb#37 + def cbind_input; end + + # The client nonce, generated by SecureRandom + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#133 + def cnonce; end + + # Returns a new OpenSSL::Digest object, set to the appropriate hash + # function for the chosen mechanism. + # + # The class's +DIGEST_NAME+ constant must be set to the name of an + # algorithm supported by OpenSSL::Digest. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#155 + def digest; end + + # Is the authentication exchange complete? + # + # If false, another server continuation is required. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#185 + def done?; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-first-message+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#159 + def initial_client_response; end + + # The iteration count for the selected hash function and user + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#142 + def iterations; end + + # The minimal allowed iteration count. Lower #iterations will raise an + # Error. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#130 + def min_iterations; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#111 + def password; end + + # responds to the server's challenges + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#164 + def process(challenge); end + + # The salt used by the server for this user + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#139 + def salt; end + + # A password or passphrase that matches the #username. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#111 + def secret; end + + # An error reported by the server during the \SASL exchange. + # + # Does not include errors reported by the protocol, e.g. + # Net::IMAP::NoResponseError. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#148 + def server_error; end + + # The server nonce, which must start with #cnonce + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#136 + def snonce; end + + # Authentication identity: the identity that matches the #password. + # + # RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+. + # "Authentication identity" is the generic term used by + # RFC-4422[https://tools.ietf.org/html/rfc4422]. + # RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate + # this to +authcid+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#107 + def username; end + + private + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-final-message-without-proof+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#240 + def client_final_message_without_proof; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-first-message-bare+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#225 + def client_first_message_bare; end + + # See {RFC5802 §7}[https://www.rfc-editor.org/rfc/rfc5802#section-7] + # +client-final-message+. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#233 + def final_message_with_proof; end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#192 + def format_message(hash); end + + # RFC5802 specifies "that the order of attributes in client or server + # messages is fixed, with the exception of extension attributes", but + # this parses it simply as a hash, without respect to order. Note that + # repeated keys (violating the spec) will use the last value. + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#257 + def parse_challenge(challenge); end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#211 + def recv_server_final_message(server_final_message); end + + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#194 + def recv_server_first_message(server_first_message); end + + # Need to store this for auth_message + # + # source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#190 + def server_first_message; end +end + +# Authenticator for the "+SCRAM-SHA-1+" SASL mechanism, defined in +# RFC5802[https://tools.ietf.org/html/rfc5802]. +# +# Uses the "SHA-1" digest algorithm from OpenSSL::Digest. +# +# See ScramAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#271 +class Net::IMAP::SASL::ScramSHA1Authenticator < ::Net::IMAP::SASL::ScramAuthenticator; end + +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#272 +Net::IMAP::SASL::ScramSHA1Authenticator::DIGEST_NAME = T.let(T.unsafe(nil), String) + +# Authenticator for the "+SCRAM-SHA-256+" SASL mechanism, defined in +# RFC7677[https://tools.ietf.org/html/rfc7677]. +# +# Uses the "SHA-256" digest algorithm from OpenSSL::Digest. +# +# See ScramAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#281 +class Net::IMAP::SASL::ScramSHA256Authenticator < ::Net::IMAP::SASL::ScramAuthenticator; end + +# source://net-imap//lib/net/imap/sasl/scram_authenticator.rb#282 +Net::IMAP::SASL::ScramSHA256Authenticator::DIGEST_NAME = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#7 +Net::IMAP::SASL::StringPrep = Net::IMAP::StringPrep + +# source://net-imap//lib/net/imap/sasl/stringprep.rb#10 +Net::IMAP::SASL::StringPrepError = Net::IMAP::StringPrep::StringPrepError + +# Authenticator for the "+XOAUTH2+" SASL mechanism. This mechanism was +# originally created for GMail and widely adopted by hosted email providers. +# +XOAUTH2+ has been documented by +# Google[https://developers.google.com/gmail/imap/xoauth2-protocol] and +# Microsoft[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth]. +# +# This mechanism requires an OAuth2 access token which has been authorized +# with the appropriate OAuth2 scopes to access the user's services. Most of +# these scopes are not standardized---consult each service provider's +# documentation for their scopes. +# +# Although this mechanism was never standardized and has been obsoleted by +# "+OAUTHBEARER+", it is still very widely supported. +# +# See Net::IMAP::SASL::OAuthBearerAuthenticator. +# +# source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#18 +class Net::IMAP::SASL::XOAuth2Authenticator + # :call-seq: + # new(username, oauth2_token, **) -> authenticator + # new(username:, oauth2_token:, **) -> authenticator + # new(authzid:, oauth2_token:, **) -> authenticator + # + # Creates an Authenticator for the "+XOAUTH2+" SASL mechanism, as specified by + # Google[https://developers.google.com/gmail/imap/xoauth2-protocol], + # Microsoft[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth] + # and Yahoo[https://senders.yahooinc.com/developer/documentation]. + # + # === Properties + # + # * #username --- the username for the account being accessed. + # + # #authzid --- an alias for #username. + # + # Note that, unlike some other authenticators, +username+ sets the + # _authorization_ identity and not the _authentication_ identity. The + # authenticated identity is established for the client with the OAuth token. + # + # * #oauth2_token --- An OAuth2.0 access token which is authorized to access + # the service for #username. + # + # Any other keyword parameters are quietly ignored. + # + # @return [XOAuth2Authenticator] a new instance of XOAuth2Authenticator + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#71 + def initialize(user = T.unsafe(nil), token = T.unsafe(nil), username: T.unsafe(nil), oauth2_token: T.unsafe(nil), authzid: T.unsafe(nil), secret: T.unsafe(nil), **_arg6); end + + # It is unclear from {Google's original XOAUTH2 + # documentation}[https://developers.google.com/gmail/imap/xoauth2-protocol], + # whether "User" refers to the authentication identity (+authcid+) or the + # authorization identity (+authzid+). The authentication identity is + # established for the client by the OAuth token, so it seems that +username+ + # must be the authorization identity. + # + # {Microsoft's documentation for shared + # mailboxes}[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#sasl-xoauth2-authentication-for-shared-mailboxes-in-office-365] + # _clearly_ indicates that the Office 365 server interprets it as the + # authorization identity. + # + # Although they _should_ validate that the token has been authorized to access + # the service for +username+, _some_ servers appear to ignore this field, + # relying only the identity and scope authorized by the token. + # Note that, unlike most other authenticators, #username is an alias for the + # authorization identity and not the authentication identity. The + # authenticated identity is established for the client by the #oauth2_token. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#35 + def authzid; end + + # Returns true when the initial client response was sent. + # + # The authentication should not succeed unless this returns true, but it + # does *not* indicate success. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#98 + def done?; end + + # :call-seq: + # initial_response? -> true + # + # +XOAUTH2+ can send an initial client response. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#84 + def initial_response?; end + + # An OAuth2 access token which has been authorized with the appropriate OAuth2 + # scopes to use the service for #username. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#44 + def oauth2_token; end + + # Returns the XOAUTH2 formatted response, which combines the +username+ + # with the +oauth2_token+. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#88 + def process(_data); end + + # An OAuth2 access token which has been authorized with the appropriate OAuth2 + # scopes to use the service for #username. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#44 + def secret; end + + # It is unclear from {Google's original XOAUTH2 + # documentation}[https://developers.google.com/gmail/imap/xoauth2-protocol], + # whether "User" refers to the authentication identity (+authcid+) or the + # authorization identity (+authzid+). The authentication identity is + # established for the client by the OAuth token, so it seems that +username+ + # must be the authorization identity. + # + # {Microsoft's documentation for shared + # mailboxes}[https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#sasl-xoauth2-authentication-for-shared-mailboxes-in-office-365] + # _clearly_ indicates that the Office 365 server interprets it as the + # authorization identity. + # + # Although they _should_ validate that the token has been authorized to access + # the service for +username+, _some_ servers appear to ignore this field, + # relying only the identity and scope authorized by the token. + # + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#35 + def username; end + + private + + # source://net-imap//lib/net/imap/sasl/xoauth2_authenticator.rb#102 + def build_oauth2_string(username, oauth2_token); end +end + +# Experimental +# +# source://net-imap//lib/net/imap/sasl_adapter.rb#7 +class Net::IMAP::SASLAdapter < ::Net::IMAP::SASL::ClientAdapter + include ::Net::IMAP::SASL::ProtocolAdapters::IMAP + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl_adapter.rb#15 + def auth_capable?(mechanism); end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#16 + def drop_connection; end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#17 + def drop_connection!; end + + # source://net-imap//lib/net/imap/sasl_adapter.rb#13 + def response_errors; end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sasl_adapter.rb#14 + def sasl_ir_capable?; end +end + +# source://net-imap//lib/net/imap/sasl_adapter.rb#10 +Net::IMAP::SASLAdapter::RESPONSE_ERRORS = T.let(T.unsafe(nil), Array) + +# Mailbox attribute indicating that this mailbox is used to hold copies of +# messages that have been sent. Some server implementations might put +# messages here automatically. Alternatively, this might just be advice that +# a client save sent messages here. +# +# source://net-imap//lib/net/imap/flags.rb#248 +Net::IMAP::SENT = T.let(T.unsafe(nil), Symbol) + +# strftime/strptime format for an IMAP4 +date+, excluding optional dquotes. +# Use via the encode_date and decode_date methods. +# +# date = date-text / DQUOTE date-text DQUOTE +# date-text = date-day "-" date-month "-" date-year +# +# date-day = 1*2DIGIT +# ; Day of month +# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / +# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +# date-year = 4DIGIT +# +# source://net-imap//lib/net/imap/data_encoding.rb#22 +Net::IMAP::STRFDATE = T.let(T.unsafe(nil), String) + +# strftime/strptime format for an IMAP4 +date-time+, including dquotes. +# See the encode_datetime and decode_datetime methods. +# +# date-time = DQUOTE date-day-fixed "-" date-month "-" date-year +# SP time SP zone DQUOTE +# +# date-day-fixed = (SP DIGIT) / 2DIGIT +# ; Fixed-format version of date-day +# date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / +# "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +# date-year = 4DIGIT +# time = 2DIGIT ":" 2DIGIT ":" 2DIGIT +# ; Hours minutes seconds +# zone = ("+" / "-") 4DIGIT +# ; Signed four-digit value of hhmm representing +# ; hours and minutes east of Greenwich (that is, +# ; the amount that the given time differs from +# ; Universal Time). Subtracting the timezone +# ; from the given time will give the UT form. +# ; The Universal Time zone is "+0000". +# +# Note that Time.strptime "%d" flexibly parses either space or zero +# padding. However, the DQUOTEs are *not* optional. +# +# source://net-imap//lib/net/imap/data_encoding.rb#47 +Net::IMAP::STRFTIME = T.let(T.unsafe(nil), String) + +# The mailbox name was subscribed to using the #subscribe command. +# +# source://net-imap//lib/net/imap/flags.rb#173 +Net::IMAP::SUBSCRIBED = T.let(T.unsafe(nil), Symbol) + +# An array of sequence numbers returned by Net::IMAP#search, or unique +# identifiers returned by Net::IMAP#uid_search. +# +# For backward compatibility, SearchResult inherits from Array. +# +# source://net-imap//lib/net/imap/search_result.rb#10 +class Net::IMAP::SearchResult < ::Array + # Returns a SearchResult populated with the given +seq_nums+. + # + # Net::IMAP::SearchResult.new([1, 3, 5], modseq: 9) + # # => Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # + # @return [SearchResult] a new instance of SearchResult + # + # source://net-imap//lib/net/imap/search_result.rb#29 + def initialize(seq_nums, modseq: T.unsafe(nil)); end + + # Returns whether +other+ is a SearchResult with the same values and the + # same #modseq. The order of numbers is irrelevant. + # + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[123, 456, modseq: 789] + # # => true + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[456, 123, modseq: 789] + # # => true + # + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[987, 654, modseq: 789] + # # => false + # Net::IMAP::SearchResult[123, 456, modseq: 789] == + # Net::IMAP::SearchResult[1, 2, 3, modseq: 9999] + # # => false + # + # SearchResult can be compared directly with Array, if #modseq is nil and + # the array is sorted. + # + # Net::IMAP::SearchResult[9, 8, 6, 4, 1] == [1, 4, 6, 8, 9] # => true + # Net::IMAP::SearchResult[3, 5, 7, modseq: 99] == [3, 5, 7] # => false + # + # Note that Array#== does require matching order and ignores #modseq. + # + # [9, 8, 6, 4, 1] == Net::IMAP::SearchResult[1, 4, 6, 8, 9] # => false + # [3, 5, 7] == Net::IMAP::SearchResult[3, 5, 7, modseq: 99] # => true + # + # source://net-imap//lib/net/imap/search_result.rb#62 + def ==(other); end + + # Hash equality. Unlike #==, order will be taken into account. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/search_result.rb#77 + def eql?(other); end + + # Hash equality. Unlike #==, order will be taken into account. + # + # source://net-imap//lib/net/imap/search_result.rb#71 + def hash; end + + # Returns a string that represents the SearchResult. + # + # Net::IMAP::SearchResult[123, 456, 789].inspect + # # => "[123, 456, 789]" + # + # Net::IMAP::SearchResult[543, 210, 678, modseq: 2048].inspect + # # => "Net::IMAP::SearchResult[543, 210, 678, modseq: 2048]" + # + # source://net-imap//lib/net/imap/search_result.rb#90 + def inspect; end + + # A modification sequence number, as described by the +CONDSTORE+ + # extension in {[RFC7162 + # §3.1.6]}[https://www.rfc-editor.org/rfc/rfc7162.html#section-3.1.6]. + # + # source://net-imap//lib/net/imap/search_result.rb#23 + def modseq; end + + # source://net-imap//lib/net/imap/search_result.rb#123 + def pretty_print(pp); end + + # Returns a string that follows the formal \IMAP syntax. + # + # data = Net::IMAP::SearchResult[2, 8, 32, 128, 256, 512] + # data.to_s # => "* SEARCH 2 8 32 128 256 512" + # data.to_s("SEARCH") # => "* SEARCH 2 8 32 128 256 512" + # data.to_s("SORT") # => "* SORT 2 8 32 128 256 512" + # data.to_s(nil) # => "2 8 32 128 256 512" + # + # data = Net::IMAP::SearchResult[1, 3, 16, 1024, modseq: 2048].to_s + # data.to_s # => "* SEARCH 1 3 16 1024 (MODSEQ 2048)" + # data.to_s("SORT") # => "* SORT 1 3 16 1024 (MODSEQ 2048)" + # data.to_s # => "1 3 16 1024 (MODSEQ 2048)" + # + # source://net-imap//lib/net/imap/search_result.rb#108 + def to_s(type = T.unsafe(nil)); end + + # Converts the SearchResult into a SequenceSet. + # + # Net::IMAP::SearchResult[9, 1, 2, 4, 10, 12, 3, modseq: 123_456] + # .to_sequence_set + # # => Net::IMAP::SequenceSet["1:4,9:10,12"] + # + # source://net-imap//lib/net/imap/search_result.rb#121 + def to_sequence_set; end + + class << self + # Returns a SearchResult populated with the given +seq_nums+. + # + # Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # # => Net::IMAP::SearchResult[1, 3, 5, modseq: 9] + # + # source://net-imap//lib/net/imap/search_result.rb#16 + def [](*seq_nums, modseq: T.unsafe(nil)); end + end +end + +# An \IMAP sequence set is a set of message sequence numbers or unique +# identifier numbers ("UIDs"). It contains numbers and ranges of numbers. +# The numbers are all non-zero unsigned 32-bit integers and one special +# value ("*") that represents the largest value in the mailbox. +# +# Certain types of \IMAP responses will contain a SequenceSet, for example +# the data for a "MODIFIED" ResponseCode. Some \IMAP commands may +# receive a SequenceSet as an argument, for example IMAP#search, IMAP#fetch, +# and IMAP#store. +# +# == EXPERIMENTAL API +# +# SequenceSet is currently experimental. Only two methods, ::[] and +# #valid_string, are considered stable. Although the API isn't expected to +# change much, any other methods may be removed or changed without +# deprecation. +# +# == Creating sequence sets +# +# SequenceSet.new with no arguments creates an empty sequence set. Note +# that an empty sequence set is invalid in the \IMAP grammar. +# +# set = Net::IMAP::SequenceSet.new +# set.empty? #=> true +# set.valid? #=> false +# set.valid_string #!> raises DataFormatError +# set << 1..10 +# set.empty? #=> false +# set.valid? #=> true +# set.valid_string #=> "1:10" +# +# SequenceSet.new may receive a single optional argument: a non-zero 32 bit +# unsigned integer, a range, a sequence-set formatted string, +# another sequence set, or an enumerable containing any of these. +# +# set = Net::IMAP::SequenceSet.new(1) +# set.valid_string #=> "1" +# set = Net::IMAP::SequenceSet.new(1..100) +# set.valid_string #=> "1:100" +# set = Net::IMAP::SequenceSet.new(1...100) +# set.valid_string #=> "1:99" +# set = Net::IMAP::SequenceSet.new([1, 2, 5..]) +# set.valid_string #=> "1:2,5:*" +# set = Net::IMAP::SequenceSet.new("1,2,3:7,5,6:10,2048,1024") +# set.valid_string #=> "1,2,3:7,5,6:10,2048,1024" +# set = Net::IMAP::SequenceSet.new(1, 2, 3..7, 5, 6..10, 2048, 1024) +# set.valid_string #=> "1:10,55,1024:2048" +# +# Use ::[] with one or more arguments to create a frozen SequenceSet. An +# invalid (empty) set cannot be created with ::[]. +# +# set = Net::IMAP::SequenceSet["1,2,3:7,5,6:10,2048,1024"] +# set.valid_string #=> "1,2,3:7,5,6:10,2048,1024" +# set = Net::IMAP::SequenceSet[1, 2, [3..7, 5], 6..10, 2048, 1024] +# set.valid_string #=> "1:10,55,1024:2048" +# +# == Normalized form +# +# When a sequence set is created with a single String value, that #string +# representation is preserved. SequenceSet's internal representation +# implicitly sorts all entries, de-duplicates numbers, and coalesces +# adjacent or overlapping ranges. Most enumeration methods and offset-based +# methods use this normalized representation. Most modification methods +# will convert #string to its normalized form. +# +# In some cases the order of the string representation is significant, such +# as the +ESORT+, CONTEXT=SORT, and +UIDPLUS+ extensions. Use +# #entries or #each_entry to enumerate the set in its original order. To +# preserve #string order while modifying a set, use #append, #string=, or +# #replace. +# +# == Using * +# +# \IMAP sequence sets may contain a special value "*", which +# represents the largest number in use. From +seq-number+ in +# {RFC9051 §9}[https://www.rfc-editor.org/rfc/rfc9051.html#section-9-5]: +# >>> +# In the case of message sequence numbers, it is the number of messages +# in a non-empty mailbox. In the case of unique identifiers, it is the +# unique identifier of the last message in the mailbox or, if the +# mailbox is empty, the mailbox's current UIDNEXT value. +# +# When creating a SequenceSet, * may be input as -1, +# "*", :*, an endless range, or a range ending in +# -1. When converting to #elements, #ranges, or #numbers, it will +# output as either :* or an endless range. For example: +# +# Net::IMAP::SequenceSet["1,3,*"].to_a #=> [1, 3, :*] +# Net::IMAP::SequenceSet["1,234:*"].to_a #=> [1, 234..] +# Net::IMAP::SequenceSet[1234..-1].to_a #=> [1234..] +# Net::IMAP::SequenceSet[1234..].to_a #=> [1234..] +# +# Net::IMAP::SequenceSet[1234..].to_s #=> "1234:*" +# Net::IMAP::SequenceSet[1234..-1].to_s #=> "1234:*" +# +# Use #limit to convert "*" to a maximum value. When a range +# includes "*", the maximum value will always be matched: +# +# Net::IMAP::SequenceSet["9999:*"].limit(max: 25) +# #=> Net::IMAP::SequenceSet["25"] +# +# === Surprising * behavior +# +# When a set includes *, some methods may have surprising behavior. +# +# For example, #complement treats * as its own number. This way, +# the #intersection of a set and its #complement will always be empty. +# This is not how an \IMAP server interprets the set: it will convert +# * to either the number of messages in the mailbox or +UIDNEXT+, +# as appropriate. And there _will_ be overlap between a set and its +# complement after #limit is applied to each: +# +# ~Net::IMAP::SequenceSet["*"] == Net::IMAP::SequenceSet[1..(2**32-1)] +# ~Net::IMAP::SequenceSet[1..5] == Net::IMAP::SequenceSet["6:*"] +# +# set = Net::IMAP::SequenceSet[1..5] +# (set & ~set).empty? => true +# +# (set.limit(max: 4) & (~set).limit(max: 4)).to_a => [4] +# +# When counting the number of numbers in a set, * will be counted +# _except_ when UINT32_MAX is also in the set: +# UINT32_MAX = 2**32 - 1 +# Net::IMAP::SequenceSet["*"].count => 1 +# Net::IMAP::SequenceSet[1..UINT32_MAX - 1, :*].count => UINT32_MAX +# +# Net::IMAP::SequenceSet["1:*"].count => UINT32_MAX +# Net::IMAP::SequenceSet[UINT32_MAX, :*].count => 1 +# Net::IMAP::SequenceSet[UINT32_MAX..].count => 1 +# +# == What's here? +# +# SequenceSet provides methods for: +# * {Creating a SequenceSet}[rdoc-ref:SequenceSet@Methods+for+Creating+a+SequenceSet] +# * {Comparing}[rdoc-ref:SequenceSet@Methods+for+Comparing] +# * {Querying}[rdoc-ref:SequenceSet@Methods+for+Querying] +# * {Iterating}[rdoc-ref:SequenceSet@Methods+for+Iterating] +# * {Set Operations}[rdoc-ref:SequenceSet@Methods+for+Set+Operations] +# * {Assigning}[rdoc-ref:SequenceSet@Methods+for+Assigning] +# * {Deleting}[rdoc-ref:SequenceSet@Methods+for+Deleting] +# * {IMAP String Formatting}[rdoc-ref:SequenceSet@Methods+for+IMAP+String+Formatting] +# +# === Methods for Creating a \SequenceSet +# * ::[]: Creates a validated frozen sequence set from one or more inputs. +# * ::new: Creates a new mutable sequence set, which may be empty (invalid). +# * ::try_convert: Calls +to_sequence_set+ on an object and verifies that +# the result is a SequenceSet. +# * ::empty: Returns a frozen empty (invalid) SequenceSet. +# * ::full: Returns a frozen SequenceSet containing every possible number. +# +# === Methods for Comparing +# +# Comparison to another \SequenceSet: +# - #==: Returns whether a given set contains the same numbers as +self+. +# - #eql?: Returns whether a given set uses the same #string as +self+. +# +# Comparison to objects which are convertible to \SequenceSet: +# - #===: +# Returns whether a given object is fully contained within +self+, or +# +nil+ if the object cannot be converted to a compatible type. +# - #cover? (aliased as #===): +# Returns whether a given object is fully contained within +self+. +# - #intersect? (aliased as #overlap?): +# Returns whether +self+ and a given object have any common elements. +# - #disjoint?: +# Returns whether +self+ and a given object have no common elements. +# +# === Methods for Querying +# These methods do not modify +self+. +# +# Set membership: +# - #include? (aliased as #member?): +# Returns whether a given object (nz-number, range, or *) is +# contained by the set. +# - #include_star?: Returns whether the set contains *. +# +# Minimum and maximum value elements: +# - #min: Returns the minimum number in the set. +# - #max: Returns the maximum number in the set. +# - #minmax: Returns the minimum and maximum numbers in the set. +# +# Accessing value by offset: +# - #[] (aliased as #slice): Returns the number or consecutive subset at a +# given offset or range of offsets. +# - #at: Returns the number at a given offset. +# - #find_index: Returns the given number's offset in the set +# +# Set cardinality: +# - #count (aliased as #size): Returns the count of numbers in the set. +# - #empty?: Returns whether the set has no members. \IMAP syntax does not +# allow empty sequence sets. +# - #valid?: Returns whether the set has any members. +# - #full?: Returns whether the set contains every possible value, including +# *. +# +# === Methods for Iterating +# +# - #each_element: Yields each number and range in the set, sorted and +# coalesced, and returns +self+. +# - #elements (aliased as #to_a): Returns an Array of every number and range +# in the set, sorted and coalesced. +# - #each_entry: Yields each number and range in the set, unsorted and +# without deduplicating numbers or coalescing ranges, and returns +self+. +# - #entries: Returns an Array of every number and range in the set, +# unsorted and without deduplicating numbers or coalescing ranges. +# - #each_range: +# Yields each element in the set as a Range and returns +self+. +# - #ranges: Returns an Array of every element in the set, converting +# numbers into ranges of a single value. +# - #each_number: Yields each number in the set and returns +self+. +# - #numbers: Returns an Array with every number in the set, expanding +# ranges into all of their contained numbers. +# - #to_set: Returns a Set containing all of the #numbers in the set. +# +# === Methods for \Set Operations +# These methods do not modify +self+. +# +# - #| (aliased as #union and #+): Returns a new set combining all members +# from +self+ with all members from the other object. +# - #& (aliased as #intersection): Returns a new set containing all members +# common to +self+ and the other object. +# - #- (aliased as #difference): Returns a copy of +self+ with all members +# in the other object removed. +# - #^ (aliased as #xor): Returns a new set containing all members from +# +self+ and the other object except those common to both. +# - #~ (aliased as #complement): Returns a new set containing all members +# that are not in +self+ +# - #limit: Returns a copy of +self+ which has replaced * with a +# given maximum value and removed all members over that maximum. +# +# === Methods for Assigning +# These methods add or replace elements in +self+. +# +# - #add (aliased as #<<): Adds a given object to the set; returns +self+. +# - #add?: If the given object is not an element in the set, adds it and +# returns +self+; otherwise, returns +nil+. +# - #merge: Merges multiple elements into the set; returns +self+. +# - #append: Adds a given object to the set, appending it to the existing +# string, and returns +self+. +# - #string=: Assigns a new #string value and replaces #elements to match. +# - #replace: Replaces the contents of the set with the contents +# of a given object. +# - #complement!: Replaces the contents of the set with its own #complement. +# +# === Methods for Deleting +# These methods remove elements from +self+. +# +# - #clear: Removes all elements in the set; returns +self+. +# - #delete: Removes a given object from the set; returns +self+. +# - #delete?: If the given object is an element in the set, removes it and +# returns it; otherwise, returns +nil+. +# - #delete_at: Removes the number at a given offset. +# - #slice!: Removes the number or consecutive numbers at a given offset or +# range of offsets. +# - #subtract: Removes each given object from the set; returns +self+. +# - #limit!: Replaces * with a given maximum value and removes all +# members over that maximum; returns +self+. +# +# === Methods for \IMAP String Formatting +# +# - #to_s: Returns the +sequence-set+ string, or an empty string when the +# set is empty. +# - #string: Returns the +sequence-set+ string, or nil when empty. +# - #valid_string: Returns the +sequence-set+ string, or raises +# DataFormatError when the set is empty. +# - #normalized_string: Returns a sequence-set string with its +# elements sorted and coalesced, or nil when the set is empty. +# - #normalize: Returns a new set with this set's normalized +sequence-set+ +# representation. +# - #normalize!: Updates #string to its normalized +sequence-set+ +# representation and returns +self+. +# +# source://net-imap//lib/net/imap/sequence_set.rb#279 +class Net::IMAP::SequenceSet + # Create a new SequenceSet object from +input+, which may be another + # SequenceSet, an IMAP formatted +sequence-set+ string, a number, a + # range, :*, or an enumerable of these. + # + # Use ::[] to create a frozen (non-empty) SequenceSet. + # + # @return [SequenceSet] a new instance of SequenceSet + # + # source://net-imap//lib/net/imap/sequence_set.rb#348 + def initialize(input = T.unsafe(nil)); end + + # :call-seq: + # self & other -> sequence set + # intersection(other) -> sequence set + # + # Returns a new sequence set containing only the numbers common to this + # set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] & [2, 4, 6] + # #=> Net::IMAP::SequenceSet["2,4"] + # + # (seqset & other) is equivalent to (seqset - ~other). + # + # source://net-imap//lib/net/imap/sequence_set.rb#623 + def &(other); end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def +(other); end + + # :call-seq: + # self - other -> sequence set + # difference(other) -> sequence set + # + # Returns a new sequence set built by duplicating this set and removing + # every number that appears in +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] - 2 - 4 - 6 + # #=> Net::IMAP::SequenceSet["1,3,5"] + # + # Related: #subtract + # + # source://net-imap//lib/net/imap/sequence_set.rb#605 + def -(other); end + + # :call-seq: + # add(object) -> self + # self << other -> self + # + # Adds a range or number to the set and returns +self+. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add?, #merge, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#674 + def <<(object); end + + # :call-seq: self == other -> true or false + # + # Returns true when the other SequenceSet represents the same message + # identifiers. Encoding difference—such as order, overlaps, or + # duplicates—are ignored. + # + # Net::IMAP::SequenceSet["1:3"] == Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,2,3"] == Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,3"] == Net::IMAP::SequenceSet["3,1"] + # #=> true + # Net::IMAP::SequenceSet["9,1:*"] == Net::IMAP::SequenceSet["1:*"] + # #=> true + # + # Related: #eql?, #normalize + # + # source://net-imap//lib/net/imap/sequence_set.rb#441 + def ==(other); end + + # :call-seq: self === other -> true | false | nil + # + # Returns whether +other+ is contained within the set. Returns +nil+ if a + # StandardError is raised while converting +other+ to a comparable type. + # + # Related: #cover?, #include?, #include_star? + # + # source://net-imap//lib/net/imap/sequence_set.rb#471 + def ===(other); end + + # :call-seq: + # seqset[index] -> integer or :* or nil + # slice(index) -> integer or :* or nil + # seqset[start, length] -> sequence set or nil + # slice(start, length) -> sequence set or nil + # seqset[range] -> sequence set or nil + # slice(range) -> sequence set or nil + # + # Returns a number or a subset from +self+, without modifying the set. + # + # When an Integer argument +index+ is given, the number at offset +index+ + # is returned: + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[0] #=> 10 + # set[5] #=> 15 + # set[10] #=> 26 + # + # If +index+ is negative, it counts relative to the end of +self+: + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[-1] #=> 26 + # set[-3] #=> 22 + # set[-6] #=> 15 + # + # If +index+ is out of range, +nil+ is returned. + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[11] #=> nil + # set[-12] #=> nil + # + # The result is based on the normalized set—sorted and de-duplicated—not + # on the assigned value of #string. + # + # set = Net::IMAP::SequenceSet["12,20:23,11:16,21"] + # set[0] #=> 11 + # set[-1] #=> 23 + # + # source://net-imap//lib/net/imap/sequence_set.rb#1088 + def [](index, length = T.unsafe(nil)); end + + # :call-seq: + # self ^ other -> sequence set + # xor(other) -> sequence set + # + # Returns a new sequence set containing numbers that are exclusive between + # this set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] ^ [2, 4, 6] + # #=> Net::IMAP::SequenceSet["1,3,5:6"] + # + # (seqset ^ other) is equivalent to ((seqset | other) - + # (seqset & other)). + # + # source://net-imap//lib/net/imap/sequence_set.rb#644 + def ^(other); end + + # :call-seq: + # add(object) -> self + # self << other -> self + # + # Adds a range or number to the set and returns +self+. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add?, #merge, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#674 + def add(object); end + + # :call-seq: add?(object) -> self or nil + # + # Adds a range or number to the set and returns +self+. Returns +nil+ + # when the object is already included in the set. + # + # #string will be regenerated. Use #merge to add many elements at once. + # + # Related: #add, #merge, #union, #include? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#700 + def add?(object); end + + # Adds a range or number to the set and returns +self+. + # + # Unlike #add, #merge, or #union, the new value is appended to #string. + # This may result in a #string which has duplicates or is out-of-order. + # + # source://net-imap//lib/net/imap/sequence_set.rb#684 + def append(object); end + + # :call-seq: at(index) -> integer or nil + # + # Returns a number from +self+, without modifying the set. Behaves the + # same as #[], except that #at only allows a single integer argument. + # + # Related: #[], #slice + # + # source://net-imap//lib/net/imap/sequence_set.rb#1037 + def at(index); end + + # Removes all elements and returns self. + # + # source://net-imap//lib/net/imap/sequence_set.rb#351 + def clear; end + + # :call-seq: + # ~ self -> sequence set + # complement -> sequence set + # + # Returns the complement of self, a SequenceSet which contains all numbers + # _except_ for those in this set. + # + # ~Net::IMAP::SequenceSet.full #=> Net::IMAP::SequenceSet.empty + # ~Net::IMAP::SequenceSet.empty #=> Net::IMAP::SequenceSet.full + # ~Net::IMAP::SequenceSet["1:5,100:222"] + # #=> Net::IMAP::SequenceSet["6:99,223:*"] + # ~Net::IMAP::SequenceSet["6:99,223:*"] + # #=> Net::IMAP::SequenceSet["1:5,100:222"] + # + # Related: #complement! + # + # source://net-imap//lib/net/imap/sequence_set.rb#662 + def complement; end + + # :call-seq: complement! -> self + # + # Converts the SequenceSet to its own #complement. It will contain all + # possible values _except_ for those currently in the set. + # + # Related: #complement + # + # source://net-imap//lib/net/imap/sequence_set.rb#1168 + def complement!; end + + # Returns the count of #numbers in the set. + # + # If * and 2**32 - 1 (the maximum 32-bit unsigned + # integer value) are both in the set, they will only be counted once. + # + # source://net-imap//lib/net/imap/sequence_set.rb#989 + def count; end + + # :call-seq: cover?(other) -> true | false | nil + # + # Returns whether +other+ is contained within the set. +other+ may be any + # object that would be accepted by ::new. + # + # Related: #===, #include?, #include_star? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#483 + def cover?(other); end + + # :call-seq: delete(object) -> self + # + # Deletes the given range or number from the set and returns +self+. + # + # #string will be regenerated after deletion. Use #subtract to remove + # many elements at once. + # + # Related: #delete?, #delete_at, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#712 + def delete(object); end + + # :call-seq: + # delete?(number) -> integer or nil + # delete?(star) -> :* or nil + # delete?(range) -> sequence set or nil + # + # Removes a specified value from the set, and returns the removed value. + # Returns +nil+ if nothing was removed. + # + # Returns an integer when the specified +number+ argument was removed: + # set = Net::IMAP::SequenceSet.new [5..10, 20] + # set.delete?(7) #=> 7 + # set #=> # + # set.delete?("20") #=> 20 + # set #=> # + # set.delete?(30) #=> nil + # + # Returns :* when * or -1 is specified and + # removed: + # set = Net::IMAP::SequenceSet.new "5:9,20,35,*" + # set.delete?(-1) #=> :* + # set #=> # + # + # And returns a new SequenceSet when a range is specified: + # + # set = Net::IMAP::SequenceSet.new [5..10, 20] + # set.delete?(9..) #=> # + # set #=> # + # set.delete?(21..) #=> nil + # + # #string will be regenerated after deletion. + # + # Related: #delete, #delete_at, #subtract, #difference, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#749 + def delete?(object); end + + # :call-seq: delete_at(index) -> number or :* or nil + # + # Deletes a number the set, indicated by the given +index+. Returns the + # number that was removed, or +nil+ if nothing was removed. + # + # #string will be regenerated after deletion. + # + # Related: #delete, #delete?, #slice!, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#772 + def delete_at(index); end + + # :call-seq: + # self - other -> sequence set + # difference(other) -> sequence set + # + # Returns a new sequence set built by duplicating this set and removing + # every number that appears in +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] - 2 - 4 - 6 + # #=> Net::IMAP::SequenceSet["1,3,5"] + # + # Related: #subtract + # + # source://net-imap//lib/net/imap/sequence_set.rb#605 + def difference(other); end + + # Returns +true+ if the set and a given object have no common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].disjoint? "7,9,11" #=> false + # Net::IMAP::SequenceSet["5:10"].disjoint? "11:33" #=> true + # + # Related: #intersection, #intersect? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#535 + def disjoint?(other); end + + # Yields each number or range (or :*) in #elements to the block + # and returns self. Returns an enumerator when called without a block. + # + # The returned numbers are sorted and de-duplicated, even when the input + # #string is not. See #normalize. + # + # Related: #elements, #each_entry + # + # source://net-imap//lib/net/imap/sequence_set.rb#924 + def each_element; end + + # Yields each number or range in #string to the block and returns +self+. + # Returns an enumerator when called without a block. + # + # The entries are yielded in the same order they appear in #string, with + # no sorting, deduplication, or coalescing. When #string is in its + # normalized form, this will yield the same values as #each_element. + # + # Related: #entries, #each_element + # + # source://net-imap//lib/net/imap/sequence_set.rb#910 + def each_entry(&block); end + + # Yields each number in #numbers to the block and returns self. + # If the set contains a *, RangeError will be raised. + # + # Returns an enumerator when called without a block (even if the set + # contains *). + # + # Related: #numbers + # + # @raise [RangeError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#964 + def each_number(&block); end + + # Yields each range in #ranges to the block and returns self. + # Returns an enumerator when called without a block. + # + # Related: #ranges + # + # source://net-imap//lib/net/imap/sequence_set.rb#946 + def each_range; end + + # Returns an array of ranges and integers and :*. + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # By itself, * translates to :*. A range containing + # * translates to an endless range. Use #limit to translate both + # cases to a maximum value. + # + # If the original input was unordered or contains overlapping ranges, the + # returned ranges will be ordered and coalesced. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].elements + # #=> [2, 5..9, 11..12, :*] + # + # Related: #each_element, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#851 + def elements; end + + # Returns true if the set contains no elements + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#565 + def empty?; end + + # Returns an array of ranges and integers and :*. + # + # The entries are in the same order they appear in #string, with no + # sorting, deduplication, or coalescing. When #string is in its + # normalized form, this will return the same result as #elements. + # This is useful when the given order is significant, for example in a + # ESEARCH response to IMAP#sort. + # + # Related: #each_entry, #elements + # + # source://net-imap//lib/net/imap/sequence_set.rb#833 + def entries; end + + # :call-seq: eql?(other) -> true or false + # + # Hash equality requires the same encoded #string representation. + # + # Net::IMAP::SequenceSet["1:3"] .eql? Net::IMAP::SequenceSet["1:3"] + # #=> true + # Net::IMAP::SequenceSet["1,2,3"].eql? Net::IMAP::SequenceSet["1:3"] + # #=> false + # Net::IMAP::SequenceSet["1,3"] .eql? Net::IMAP::SequenceSet["3,1"] + # #=> false + # Net::IMAP::SequenceSet["9,1:*"].eql? Net::IMAP::SequenceSet["1:*"] + # #=> false + # + # Related: #==, #normalize + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#460 + def eql?(other); end + + # Returns the index of +number+ in the set, or +nil+ if +number+ isn't in + # the set. + # + # Related: #[] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1000 + def find_index(number); end + + # Freezes and returns the set. A frozen SequenceSet is Ractor-safe. + # + # source://net-imap//lib/net/imap/sequence_set.rb#418 + def freeze; end + + # Returns true if the set contains every possible element. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#568 + def full?; end + + # See #eql? + # + # source://net-imap//lib/net/imap/sequence_set.rb#463 + def hash; end + + # Returns +true+ when a given number or range is in +self+, and +false+ + # otherwise. Returns +false+ unless +number+ is an Integer, Range, or + # *. + # + # set = Net::IMAP::SequenceSet["5:10,100,111:115"] + # set.include? 1 #=> false + # set.include? 5..10 #=> true + # set.include? 11..20 #=> false + # set.include? 100 #=> true + # set.include? 6 #=> true, covered by "5:10" + # set.include? 4..9 #=> true, covered by "5:10" + # set.include? "4:9" #=> true, strings are parsed + # set.include? 4..9 #=> false, intersection is not sufficient + # set.include? "*" #=> false, use #limit to re-interpret "*" + # set.include? -1 #=> false, -1 is interpreted as "*" + # + # set = Net::IMAP::SequenceSet["5:10,100,111:*"] + # set.include? :* #=> true + # set.include? "*" #=> true + # set.include? -1 #=> true + # set.include? 200.. #=> true + # set.include? 100.. #=> false + # + # Related: #include_star?, #cover?, #=== + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#509 + def include?(element); end + + # Returns +true+ when the set contains *. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#514 + def include_star?; end + + # source://net-imap//lib/net/imap/sequence_set.rb#1214 + def inspect; end + + # Returns +true+ if the set and a given object have any common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].intersect? "7,9,11" #=> true + # Net::IMAP::SequenceSet["5:10"].intersect? "11:33" #=> false + # + # Related: #intersection, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#523 + def intersect?(other); end + + # :call-seq: + # self & other -> sequence set + # intersection(other) -> sequence set + # + # Returns a new sequence set containing only the numbers common to this + # set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] & [2, 4, 6] + # #=> Net::IMAP::SequenceSet["2,4"] + # + # (seqset & other) is equivalent to (seqset - ~other). + # + # source://net-imap//lib/net/imap/sequence_set.rb#623 + def intersection(other); end + + # Returns a frozen SequenceSet with * converted to +max+, numbers + # and ranges over +max+ removed, and ranges containing +max+ converted to + # end at +max+. + # + # Net::IMAP::SequenceSet["5,10:22,50"].limit(max: 20).to_s + # #=> "5,10:20" + # + # * is always interpreted as the maximum value. When the set + # contains *, it will be set equal to the limit. + # + # Net::IMAP::SequenceSet["*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["37"] + # Net::IMAP::SequenceSet["5:*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["5:37"] + # Net::IMAP::SequenceSet["500:*"].limit(max: 37) + # #=> Net::IMAP::SequenceSet["37"] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1141 + def limit(max:); end + + # Removes all members over +max+ and returns self. If * is a + # member, it will be converted to +max+. + # + # Related: #limit + # + # source://net-imap//lib/net/imap/sequence_set.rb#1154 + def limit!(max:); end + + # :call-seq: max(star: :*) => integer or star or nil + # + # Returns the maximum value in +self+, +star+ when the set includes + # *, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#543 + def max(star: T.unsafe(nil)); end + + # Returns +true+ when a given number or range is in +self+, and +false+ + # otherwise. Returns +false+ unless +number+ is an Integer, Range, or + # *. + # + # set = Net::IMAP::SequenceSet["5:10,100,111:115"] + # set.include? 1 #=> false + # set.include? 5..10 #=> true + # set.include? 11..20 #=> false + # set.include? 100 #=> true + # set.include? 6 #=> true, covered by "5:10" + # set.include? 4..9 #=> true, covered by "5:10" + # set.include? "4:9" #=> true, strings are parsed + # set.include? 4..9 #=> false, intersection is not sufficient + # set.include? "*" #=> false, use #limit to re-interpret "*" + # set.include? -1 #=> false, -1 is interpreted as "*" + # + # set = Net::IMAP::SequenceSet["5:10,100,111:*"] + # set.include? :* #=> true + # set.include? "*" #=> true + # set.include? -1 #=> true + # set.include? 200.. #=> true + # set.include? 100.. #=> false + # + # Related: #include_star?, #cover?, #=== + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#509 + def member?(element); end + + # Merges all of the elements that appear in any of the +inputs+ into the + # set, and returns +self+. + # + # The +inputs+ may be any objects that would be accepted by ::new: + # non-zero 32 bit unsigned integers, ranges, sequence-set + # formatted strings, other sequence sets, or enumerables containing any of + # these. + # + # #string will be regenerated after all inputs have been merged. + # + # Related: #add, #add?, #union + # + # source://net-imap//lib/net/imap/sequence_set.rb#805 + def merge(*inputs); end + + # :call-seq: min(star: :*) => integer or star or nil + # + # Returns the minimum value in +self+, +star+ when the only value in the + # set is *, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#551 + def min(star: T.unsafe(nil)); end + + # :call-seq: minmax(star: :*) => nil or [integer, integer or star] + # + # Returns a 2-element array containing the minimum and maximum numbers in + # +self+, or +nil+ when the set is empty. + # + # source://net-imap//lib/net/imap/sequence_set.rb#559 + def minmax(star: T.unsafe(nil)); end + + # Returns a new SequenceSet with a normalized string representation. + # + # The returned set's #string is sorted and deduplicated. Adjacent or + # overlapping elements will be merged into a single larger range. + # + # Net::IMAP::SequenceSet["1:5,3:7,10:9,10:11"].normalize + # #=> Net::IMAP::SequenceSet["1:7,9:11"] + # + # Related: #normalize!, #normalized_string + # + # source://net-imap//lib/net/imap/sequence_set.rb#1187 + def normalize; end + + # Resets #string to be sorted, deduplicated, and coalesced. Returns + # +self+. + # + # Related: #normalize, #normalized_string + # + # source://net-imap//lib/net/imap/sequence_set.rb#1197 + def normalize!; end + + # Returns a normalized +sequence-set+ string representation, sorted + # and deduplicated. Adjacent or overlapping elements will be merged into + # a single larger range. Returns +nil+ when the set is empty. + # + # Net::IMAP::SequenceSet["1:5,3:7,10:9,10:11"].normalized_string + # #=> "1:7,9:11" + # + # Related: #normalize!, #normalize + # + # source://net-imap//lib/net/imap/sequence_set.rb#1210 + def normalized_string; end + + # Returns a sorted array of all of the number values in the sequence set. + # + # The returned numbers are sorted and de-duplicated, even when the input + # #string is not. See #normalize. + # + # Net::IMAP::SequenceSet["2,5:9,6,12:11"].numbers + # #=> [2, 5, 6, 7, 8, 9, 11, 12] + # + # If the set contains a *, RangeError is raised. See #limit. + # + # Net::IMAP::SequenceSet["10000:*"].numbers + # #!> RangeError + # + # *WARNING:* Even excluding sets with *, an enormous result can + # easily be created. An array with over 4 billion integers could be + # returned, requiring up to 32GiB of memory on a 64-bit architecture. + # + # Net::IMAP::SequenceSet[10000..2**32-1].numbers + # # ...probably freezes the process for a while... + # #!> NoMemoryError (probably) + # + # For safety, consider using #limit or #intersection to set an upper + # bound. Alternatively, use #each_element, #each_range, or even + # #each_number to avoid allocation of a result array. + # + # Related: #elements, #ranges, #to_set + # + # source://net-imap//lib/net/imap/sequence_set.rb#900 + def numbers; end + + # Returns +true+ if the set and a given object have any common elements, + # +false+ otherwise. + # + # Net::IMAP::SequenceSet["5:10"].intersect? "7,9,11" #=> true + # Net::IMAP::SequenceSet["5:10"].intersect? "11:33" #=> false + # + # Related: #intersection, #disjoint? + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#523 + def overlap?(other); end + + # Returns an array of ranges + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # * translates to an endless range. By itself, * + # translates to :*... Use #limit to set * to a maximum + # value. + # + # The returned ranges will be ordered and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].ranges + # #=> [2..2, 5..9, 11..12, :*..] + # Net::IMAP::SequenceSet["123,999:*,456:789"].ranges + # #=> [123..123, 456..789, 999..] + # + # Related: #each_range, #elements, #numbers, #to_set + # + # source://net-imap//lib/net/imap/sequence_set.rb#872 + def ranges; end + + # Replace the contents of the set with the contents of +other+ and returns + # +self+. + # + # +other+ may be another SequenceSet, or it may be an IMAP +sequence-set+ + # string, a number, a range, *, or an enumerable of these. + # + # source://net-imap//lib/net/imap/sequence_set.rb#358 + def replace(other); end + + # Unstable API: for internal use only (Net::IMAP#send_data) + # + # source://net-imap//lib/net/imap/sequence_set.rb#1234 + def send_data(imap, tag); end + + # Returns the count of #numbers in the set. + # + # If * and 2**32 - 1 (the maximum 32-bit unsigned + # integer value) are both in the set, they will only be counted once. + # + # source://net-imap//lib/net/imap/sequence_set.rb#989 + def size; end + + # :call-seq: + # seqset[index] -> integer or :* or nil + # slice(index) -> integer or :* or nil + # seqset[start, length] -> sequence set or nil + # slice(start, length) -> sequence set or nil + # seqset[range] -> sequence set or nil + # slice(range) -> sequence set or nil + # + # Returns a number or a subset from +self+, without modifying the set. + # + # When an Integer argument +index+ is given, the number at offset +index+ + # is returned: + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[0] #=> 10 + # set[5] #=> 15 + # set[10] #=> 26 + # + # If +index+ is negative, it counts relative to the end of +self+: + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[-1] #=> 26 + # set[-3] #=> 22 + # set[-6] #=> 15 + # + # If +index+ is out of range, +nil+ is returned. + # + # set = Net::IMAP::SequenceSet["10:15,20:23,26"] + # set[11] #=> nil + # set[-12] #=> nil + # + # The result is based on the normalized set—sorted and de-duplicated—not + # on the assigned value of #string. + # + # set = Net::IMAP::SequenceSet["12,20:23,11:16,21"] + # set[0] #=> 11 + # set[-1] #=> 23 + # + # source://net-imap//lib/net/imap/sequence_set.rb#1088 + def slice(index, length = T.unsafe(nil)); end + + # :call-seq: + # slice!(index) -> integer or :* or nil + # slice!(start, length) -> sequence set or nil + # slice!(range) -> sequence set or nil + # + # Deletes a number or consecutive numbers from the set, indicated by the + # given +index+, +start+ and +length+, or +range+ of offsets. Returns the + # number or sequence set that was removed, or +nil+ if nothing was + # removed. Arguments are interpreted the same as for #slice or #[]. + # + # #string will be regenerated after deletion. + # + # Related: #slice, #delete_at, #delete, #delete?, #subtract, #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#789 + def slice!(index, length = T.unsafe(nil)); end + + # Returns the \IMAP +sequence-set+ string representation, or +nil+ when + # the set is empty. Note that an empty set is invalid in the \IMAP + # syntax. + # + # Use #valid_string to raise an exception when the set is empty, or #to_s + # to return an empty string. + # + # If the set was created from a single string, it is not normalized. If + # the set is updated the string will be normalized. + # + # Related: #valid_string, #normalized_string, #to_s + # + # source://net-imap//lib/net/imap/sequence_set.rb#390 + def string; end + + # Assigns a new string to #string and resets #elements to match. It + # cannot be set to an empty string—assign +nil+ or use #clear instead. + # The string is validated but not normalized. + # + # Use #add or #merge to add a string to an existing set. + # + # Related: #replace, #clear + # + # source://net-imap//lib/net/imap/sequence_set.rb#399 + def string=(str); end + + # Removes all of the elements that appear in any of the given +objects+ + # from the set, and returns +self+. + # + # The +objects+ may be any objects that would be accepted by ::new: + # non-zero 32 bit unsigned integers, ranges, sequence-set + # formatted strings, other sequence sets, or enumerables containing any of + # these. + # + # Related: #difference + # + # source://net-imap//lib/net/imap/sequence_set.rb#819 + def subtract(*objects); end + + # Returns an array of ranges and integers and :*. + # + # The returned elements are sorted and coalesced, even when the input + # #string is not. * will sort last. See #normalize. + # + # By itself, * translates to :*. A range containing + # * translates to an endless range. Use #limit to translate both + # cases to a maximum value. + # + # If the original input was unordered or contains overlapping ranges, the + # returned ranges will be ordered and coalesced. + # + # Net::IMAP::SequenceSet["2,5:9,6,*,12:11"].elements + # #=> [2, 5..9, 11..12, :*] + # + # Related: #each_element, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#851 + def to_a; end + + # Returns the \IMAP +sequence-set+ string representation, or an empty + # string when the set is empty. Note that an empty set is invalid in the + # \IMAP syntax. + # + # Related: #valid_string, #normalized_string, #to_s + # + # source://net-imap//lib/net/imap/sequence_set.rb#415 + def to_s; end + + # Returns self + def to_sequence_set; end + + # Returns a Set with all of the #numbers in the sequence set. + # + # If the set contains a *, RangeError will be raised. + # + # See #numbers for the warning about very large sets. + # + # Related: #elements, #ranges, #numbers + # + # source://net-imap//lib/net/imap/sequence_set.rb#983 + def to_set; end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def union(other); end + + # Returns false when the set is empty. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#562 + def valid?; end + + # Returns the \IMAP +sequence-set+ string representation, or raises a + # DataFormatError when the set is empty. + # + # Use #string to return +nil+ or #to_s to return an empty string without + # error. + # + # Related: #string, #normalized_string, #to_s + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#374 + def valid_string; end + + # Unstable API: currently for internal use only (Net::IMAP#validate_data) + # + # source://net-imap//lib/net/imap/sequence_set.rb#1228 + def validate; end + + # :call-seq: + # self ^ other -> sequence set + # xor(other) -> sequence set + # + # Returns a new sequence set containing numbers that are exclusive between + # this set and +other+. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet[1..5] ^ [2, 4, 6] + # #=> Net::IMAP::SequenceSet["1,3,5:6"] + # + # (seqset ^ other) is equivalent to ((seqset | other) - + # (seqset & other)). + # + # source://net-imap//lib/net/imap/sequence_set.rb#644 + def xor(other); end + + # :call-seq: + # self + other -> sequence set + # self | other -> sequence set + # union(other) -> sequence set + # + # Returns a new sequence set that has every number in the +other+ object + # added. + # + # +other+ may be any object that would be accepted by ::new: a non-zero 32 + # bit unsigned integer, range, sequence-set formatted string, + # another sequence set, or an enumerable containing any of these. + # + # Net::IMAP::SequenceSet["1:5"] | 2 | [4..6, 99] + # #=> Net::IMAP::SequenceSet["1:6,99"] + # + # Related: #add, #merge + # + # source://net-imap//lib/net/imap/sequence_set.rb#586 + def |(other); end + + # :call-seq: + # ~ self -> sequence set + # complement -> sequence set + # + # Returns the complement of self, a SequenceSet which contains all numbers + # _except_ for those in this set. + # + # ~Net::IMAP::SequenceSet.full #=> Net::IMAP::SequenceSet.empty + # ~Net::IMAP::SequenceSet.empty #=> Net::IMAP::SequenceSet.full + # ~Net::IMAP::SequenceSet["1:5,100:222"] + # #=> Net::IMAP::SequenceSet["6:99,223:*"] + # ~Net::IMAP::SequenceSet["6:99,223:*"] + # #=> Net::IMAP::SequenceSet["1:5,100:222"] + # + # Related: #complement! + # + # source://net-imap//lib/net/imap/sequence_set.rb#662 + def ~; end + + protected + + # source://net-imap//lib/net/imap/sequence_set.rb#1240 + def tuples; end + + private + + # source://net-imap//lib/net/imap/sequence_set.rb#1011 + def each_tuple_with_index; end + + # source://net-imap//lib/net/imap/sequence_set.rb#1304 + def from_tuple_int(num); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1313 + def include_tuple?(_arg0); end + + # frozen clones are shallow copied + # + # source://net-imap//lib/net/imap/sequence_set.rb#1247 + def initialize_clone(other); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1251 + def initialize_dup(other); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1257 + def input_to_tuple(obj); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1268 + def input_to_tuples(obj); end + + # unlike SequenceSet#try_convert, this returns an Integer, Range, + # String, Set, Array, or... any type of object. + # + # source://net-imap//lib/net/imap/sequence_set.rb#1285 + def input_try_convert(input); end + + # @return [Boolean] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1315 + def intersect_tuple?(_arg0); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1409 + def nz_number(num); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1404 + def range_gte_to(num); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1293 + def range_to_tuple(range); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1244 + def remain_frozen(set); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1020 + def reverse_each_tuple_with_index; end + + # @raise [ArgumentError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1099 + def slice_length(start, length); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1107 + def slice_range(range); end + + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#1308 + def str_to_tuple(str); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1307 + def str_to_tuples(str); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1303 + def to_tuple_int(obj); end + + # --|=====| |=====new tuple=====| append + # ?????????-|=====new tuple=====|-|===lower===|-- insert + # + # |=====new tuple=====| + # ---------??=======lower=======??--------------- noop + # + # ---------??===lower==|--|==| join remaining + # ---------??===lower==|--|==|----|===upper===|-- join until upper + # ---------??===lower==|--|==|--|=====upper===|-- join to upper + # + # source://net-imap//lib/net/imap/sequence_set.rb#1333 + def tuple_add(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1342 + def tuple_coalesce(lower, lower_idx, min, max); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1400 + def tuple_gte_with_index(num); end + + # |====tuple================| + # --|====| no more 1. noop + # --|====|---------------------------|====lower====|-- 2. noop + # -------|======lower================|---------------- 3. split + # --------|=====lower================|---------------- 4. trim beginning + # + # -------|======lower====????????????----------------- trim lower + # --------|=====lower====????????????----------------- delete lower + # + # -------??=====lower===============|----------------- 5. trim/delete one + # -------??=====lower====|--|====| no more 6. delete rest + # -------??=====lower====|--|====|---|====upper====|-- 7. delete until + # -------??=====lower====|--|====|--|=====upper====|-- 8. delete and trim + # + # source://net-imap//lib/net/imap/sequence_set.rb#1369 + def tuple_subtract(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#932 + def tuple_to_entry(_arg0); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1306 + def tuple_to_str(tuple); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1379 + def tuple_trim_or_split(lower, idx, tmin, tmax); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1320 + def tuples_add(tuples); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1321 + def tuples_subtract(tuples); end + + # source://net-imap//lib/net/imap/sequence_set.rb#1386 + def tuples_trim_or_delete(lower, lower_idx, tmin, tmax); end + + class << self + # :call-seq: + # SequenceSet[*values] -> valid frozen sequence set + # + # Returns a frozen SequenceSet, constructed from +values+. + # + # An empty SequenceSet is invalid and will raise a DataFormatError. + # + # Use ::new to create a mutable or empty SequenceSet. + # + # source://net-imap//lib/net/imap/sequence_set.rb#305 + def [](first, *rest); end + + # Returns a frozen empty set singleton. Note that valid \IMAP sequence + # sets cannot be empty, so this set is _invalid_. + # + # source://net-imap//lib/net/imap/sequence_set.rb#336 + def empty; end + + # Returns a frozen full set singleton: "1:*" + # + # source://net-imap//lib/net/imap/sequence_set.rb#339 + def full; end + + # :call-seq: + # SequenceSet.try_convert(obj) -> sequence set or nil + # + # If +obj+ is a SequenceSet, returns +obj+. If +obj+ responds_to + # +to_sequence_set+, calls +obj.to_sequence_set+ and returns the result. + # Otherwise returns +nil+. + # + # If +obj.to_sequence_set+ doesn't return a SequenceSet, an exception is + # raised. + # + # @raise [DataFormatError] + # + # source://net-imap//lib/net/imap/sequence_set.rb#326 + def try_convert(obj); end + end +end + +# source://net-imap//lib/net/imap/sequence_set.rb#291 +Net::IMAP::SequenceSet::COERCIBLE = T.let(T.unsafe(nil), Proc) + +# intentionally defined after the class implementation +# +# source://net-imap//lib/net/imap/sequence_set.rb#1420 +Net::IMAP::SequenceSet::EMPTY = T.let(T.unsafe(nil), Net::IMAP::SequenceSet) + +# source://net-imap//lib/net/imap/sequence_set.rb#292 +Net::IMAP::SequenceSet::ENUMABLE = T.let(T.unsafe(nil), Proc) + +# source://net-imap//lib/net/imap/sequence_set.rb#1421 +Net::IMAP::SequenceSet::FULL = T.let(T.unsafe(nil), Net::IMAP::SequenceSet) + +# valid inputs for "*" +# +# source://net-imap//lib/net/imap/sequence_set.rb#288 +Net::IMAP::SequenceSet::STARS = T.let(T.unsafe(nil), Array) + +# represents "*" internally, to simplify sorting (etc) +# +# source://net-imap//lib/net/imap/sequence_set.rb#284 +Net::IMAP::SequenceSet::STAR_INT = T.let(T.unsafe(nil), Integer) + +# The largest possible non-zero unsigned 32-bit integer +# +# source://net-imap//lib/net/imap/sequence_set.rb#281 +Net::IMAP::SequenceSet::UINT32_MAX = T.let(T.unsafe(nil), Integer) + +# source://net-imap//lib/net/imap/command_data.rb#273 +module Net::IMAP::StringFormatter + private + + # coerces non-nil using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#300 + def nstring(str); end + + # coerces using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#290 + def string(str); end + + # Allows nil, symbols, and strings + # + # source://net-imap//lib/net/imap/command_data.rb#285 + def valid_nstring?(str); end + + # Allows symbols in addition to strings + # + # source://net-imap//lib/net/imap/command_data.rb#280 + def valid_string?(str); end + + class << self + # coerces non-nil using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#300 + def nstring(str); end + + # coerces using +to_s+ + # + # source://net-imap//lib/net/imap/command_data.rb#290 + def string(str); end + + # Allows nil, symbols, and strings + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/command_data.rb#285 + def valid_nstring?(str); end + + # Allows symbols in addition to strings + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/command_data.rb#280 + def valid_string?(str); end + end +end + +# source://net-imap//lib/net/imap/command_data.rb#275 +Net::IMAP::StringFormatter::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# Regexps and utility methods for implementing stringprep profiles. The +# \StringPrep algorithm is defined by +# {RFC-3454}[https://www.rfc-editor.org/rfc/rfc3454.html]. Each +# codepoint table defined in the RFC-3454 appendices is matched by a Regexp +# defined in this module. +# +# source://net-imap//lib/net/imap/stringprep.rb#11 +module Net::IMAP::StringPrep + private + + # Checks that +string+ obeys all of the "Bidirectional Characters" + # requirements in RFC-3454, §6: + # + # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited + # * If a string contains any RandALCat character, the string MUST NOT + # contain any LCat character. + # * If a string contains any RandALCat character, a RandALCat + # character MUST be the first character of the string, and a + # RandALCat character MUST be the last character of the string. + # + # This is usually combined with #check_prohibited!, so table "C.8" is only + # checked when c_8: true. + # + # Raises either ProhibitedCodepoint or BidiStringError unless all + # requirements are met. +profile+ is an optional string which will be + # added to any exception that is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#144 + def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Checks +string+ for any codepoint in +tables+. Raises a + # ProhibitedCodepoint describing the first matching table. + # + # Also checks bidirectional characters, when bidi: true, which may + # raise a BidiStringError. + # + # +profile+ is an optional string which will be added to any exception that + # is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#104 + def check_prohibited!(string, *tables, bidi: T.unsafe(nil), unassigned: T.unsafe(nil), stored: T.unsafe(nil), profile: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/stringprep.rb#88 + def map_tables!(string, *tables); end + + # >>> + # 1. Map -- For each character in the input, check if it has a mapping + # and, if so, replace it with its mapping. This is described in + # section 3. + # + # 2. Normalize -- Possibly normalize the result of step 1 using Unicode + # normalization. This is described in section 4. + # + # 3. Prohibit -- Check for any characters that are not allowed in the + # output. If any are found, return an error. This is described in + # section 5. + # + # 4. Check bidi -- Possibly check for right-to-left characters, and if + # any are found, make sure that the whole string satisfies the + # requirements for bidirectional strings. If the string does not + # satisfy the requirements for bidirectional strings, return an + # error. This is described in section 6. + # + # The above steps MUST be performed in the order given to comply with + # this specification. + # + # source://net-imap//lib/net/imap/stringprep.rb#76 + def stringprep(string, maps:, normalization:, prohibited:, **opts); end + + class << self + # Returns a Regexp matching the given +table+ name. + # + # source://net-imap//lib/net/imap/stringprep.rb#49 + def [](table); end + + # Checks that +string+ obeys all of the "Bidirectional Characters" + # requirements in RFC-3454, §6: + # + # * The characters in \StringPrep\[\"C.8\"] MUST be prohibited + # * If a string contains any RandALCat character, the string MUST NOT + # contain any LCat character. + # * If a string contains any RandALCat character, a RandALCat + # character MUST be the first character of the string, and a + # RandALCat character MUST be the last character of the string. + # + # This is usually combined with #check_prohibited!, so table "C.8" is only + # checked when c_8: true. + # + # Raises either ProhibitedCodepoint or BidiStringError unless all + # requirements are met. +profile+ is an optional string which will be + # added to any exception that is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#144 + def check_bidi!(string, c_8: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Checks +string+ for any codepoint in +tables+. Raises a + # ProhibitedCodepoint describing the first matching table. + # + # Also checks bidirectional characters, when bidi: true, which may + # raise a BidiStringError. + # + # +profile+ is an optional string which will be added to any exception that + # is raised (it does not affect behavior). + # + # source://net-imap//lib/net/imap/stringprep.rb#104 + def check_prohibited!(string, *tables, bidi: T.unsafe(nil), unassigned: T.unsafe(nil), stored: T.unsafe(nil), profile: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/stringprep.rb#88 + def map_tables!(string, *tables); end + + # >>> + # 1. Map -- For each character in the input, check if it has a mapping + # and, if so, replace it with its mapping. This is described in + # section 3. + # + # 2. Normalize -- Possibly normalize the result of step 1 using Unicode + # normalization. This is described in section 4. + # + # 3. Prohibit -- Check for any characters that are not allowed in the + # output. If any are found, return an error. This is described in + # section 5. + # + # 4. Check bidi -- Possibly check for right-to-left characters, and if + # any are found, make sure that the whole string satisfies the + # requirements for bidirectional strings. If the string does not + # satisfy the requirements for bidirectional strings, return an + # error. This is described in section 6. + # + # The above steps MUST be performed in the order given to comply with + # this specification. + # + # source://net-imap//lib/net/imap/stringprep.rb#76 + def stringprep(string, maps:, normalization:, prohibited:, **opts); end + end +end + +# StringPrepError raised when +string+ contains bidirectional characters +# which violate the StringPrep requirements. +# +# source://net-imap//lib/net/imap/stringprep.rb#45 +class Net::IMAP::StringPrep::BidiStringError < ::Net::IMAP::StringPrep::StringPrepError; end + +# Defined in RFC3491[https://tools.ietf.org/html/rfc3491], the +nameprep+ +# profile of "Stringprep" is: +# >>> +# used by the IDNA protocol for preparing domain names; it is not +# designed for any other purpose. It is explicitly not designed for +# processing arbitrary free text and SHOULD NOT be used for that +# purpose. +# +# ... +# +# This profile specifies prohibiting using the following tables...: +# +# - C.1.2 (Non-ASCII space characters) +# - C.2.2 (Non-ASCII control characters) +# - C.3 (Private use characters) +# - C.4 (Non-character code points) +# - C.5 (Surrogate codes) +# - C.6 (Inappropriate for plain text) +# - C.7 (Inappropriate for canonical representation) +# - C.8 (Change display properties are deprecated) +# - C.9 (Tagging characters) +# +# IMPORTANT NOTE: This profile MUST be used with the IDNA protocol. +# The IDNA protocol has additional prohibitions that are checked +# outside of this profile. +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#32 +module Net::IMAP::StringPrep::NamePrep + private + + # source://net-imap//lib/net/imap/stringprep/nameprep.rb#54 + def nameprep(string, **opts); end + + class << self + # source://net-imap//lib/net/imap/stringprep/nameprep.rb#54 + def nameprep(string, **opts); end + end +end + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §6 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#50 +Net::IMAP::StringPrep::NamePrep::CHECK_BIDI = T.let(T.unsafe(nil), TrueClass) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §3 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#41 +Net::IMAP::StringPrep::NamePrep::MAPPING_TABLES = T.let(T.unsafe(nil), Array) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §4 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#44 +Net::IMAP::StringPrep::NamePrep::NORMALIZATION = T.let(T.unsafe(nil), Symbol) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §5 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#47 +Net::IMAP::StringPrep::NamePrep::PROHIBITED_TABLES = T.let(T.unsafe(nil), Array) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §10 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#35 +Net::IMAP::StringPrep::NamePrep::STRINGPREP_PROFILE = T.let(T.unsafe(nil), String) + +# From RFC3491[https://www.rfc-editor.org/rfc/rfc3491.html] §2 +# +# source://net-imap//lib/net/imap/stringprep/nameprep.rb#38 +Net::IMAP::StringPrep::NamePrep::UNASSIGNED_TABLE = T.let(T.unsafe(nil), String) + +# StringPrepError raised when +string+ contains a codepoint prohibited by +# +table+. +# +# source://net-imap//lib/net/imap/stringprep.rb#31 +class Net::IMAP::StringPrep::ProhibitedCodepoint < ::Net::IMAP::StringPrep::StringPrepError + # @return [ProhibitedCodepoint] a new instance of ProhibitedCodepoint + # + # source://net-imap//lib/net/imap/stringprep.rb#34 + def initialize(table, *args, **kwargs); end + + # Returns the value of attribute table. + # + # source://net-imap//lib/net/imap/stringprep.rb#32 + def table; end +end + +# SASLprep#saslprep can be used to prepare a string according to [RFC4013]. +# +# \SASLprep maps characters three ways: to nothing, to space, and Unicode +# normalization form KC. \SASLprep prohibits codepoints from nearly all +# standard StringPrep tables (RFC3454, Appendix "C"), and uses +# \StringPrep's standard bidirectional characters requirements (Appendix +# "D"). \SASLprep also uses \StringPrep's definition of "Unassigned" +# codepoints (Appendix "A"). +# +# source://net-imap//lib/net/imap/stringprep/saslprep.rb#15 +module Net::IMAP::StringPrep::SASLprep + private + + # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile + # RFC4013 of the StringPrep algorithm RFC3454. + # + # By default, prohibited strings will return +nil+. When +exception+ is + # +true+, a StringPrepError describing the violation will be raised. + # + # When +stored+ is +true+, "unassigned" codepoints will be prohibited. + # For \StringPrep and the \SASLprep profile, "unassigned" refers to + # Unicode 3.2, and not later versions. See RFC3454 §7 for more + # information. + # + # source://net-imap//lib/net/imap/stringprep/saslprep.rb#42 + def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end + + class << self + # Prepares a UTF-8 +string+ for comparison, using the \SASLprep profile + # RFC4013 of the StringPrep algorithm RFC3454. + # + # By default, prohibited strings will return +nil+. When +exception+ is + # +true+, a StringPrepError describing the violation will be raised. + # + # When +stored+ is +true+, "unassigned" codepoints will be prohibited. + # For \StringPrep and the \SASLprep profile, "unassigned" refers to + # Unicode 3.2, and not later versions. See RFC3454 §7 for more + # information. + # + # source://net-imap//lib/net/imap/stringprep/saslprep.rb#42 + def saslprep(str, stored: T.unsafe(nil), exception: T.unsafe(nil)); end + end +end + +# Used to short-circuit strings that don't need preparation. +# +# source://net-imap//lib/net/imap/stringprep/saslprep.rb#18 +Net::IMAP::StringPrep::SASLprep::ASCII_NO_CTRLS = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6] +# +# A Regexp for strings that don't satisfy StringPrep's Bidirectional +# Characters rules. +# +# Equal to StringPrep::Tables::BIDI_FAILURE. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#79 +Net::IMAP::StringPrep::SASLprep::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.1 Mapping - mapped to nothing +# >>> +# the "commonly mapped to nothing" characters +# (\StringPrep\[\"B.1\"]) that can be mapped to nothing. +# +# Equal to \StringPrep\[\"B.1\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#27 +Net::IMAP::StringPrep::SASLprep::MAP_TO_NOTHING = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.1 Mapping - mapped to space +# >>> +# non-ASCII space characters (\StringPrep\[\"C.1.2\"]) that can +# be mapped to SPACE (U+0020) +# +# Equal to \StringPrep\[\"C.1.2\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#18 +Net::IMAP::StringPrep::SASLprep::MAP_TO_SPACE = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching strings prohibited by RFC4013 §2.3 and §2.4. +# +# This combines PROHIBITED_OUTPUT and BIDI_FAILURE. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#84 +Net::IMAP::StringPrep::SASLprep::PROHIBITED = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching codepoints prohibited by RFC4013 §2.3. +# +# This combines all of the TABLES_PROHIBITED tables. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#54 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_OUTPUT = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching codepoints prohibited by RFC4013 §2.3 and §2.5. +# +# This combines PROHIBITED_OUTPUT and UNASSIGNED. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#68 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_OUTPUT_STORED = T.let(T.unsafe(nil), Regexp) + +# A Regexp matching strings prohibited by RFC4013 §2.3, §2.4, and §2.5. +# +# This combines PROHIBITED_OUTPUT_STORED and BIDI_FAILURE. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#91 +Net::IMAP::StringPrep::SASLprep::PROHIBITED_STORED = T.let(T.unsafe(nil), Regexp) + +# RFC4013 §2.3 Prohibited Output +# >>> +# * Non-ASCII space characters — \StringPrep\[\"C.1.2\"] +# * ASCII control characters — \StringPrep\[\"C.2.1\"] +# * Non-ASCII control characters — \StringPrep\[\"C.2.2\"] +# * Private Use characters — \StringPrep\[\"C.3\"] +# * Non-character code points — \StringPrep\[\"C.4\"] +# * Surrogate code points — \StringPrep\[\"C.5\"] +# * Inappropriate for plain text characters — \StringPrep\[\"C.6\"] +# * Inappropriate for canonical representation characters — \StringPrep\[\"C.7\"] +# * Change display properties or deprecated characters — \StringPrep\[\"C.8\"] +# * Tagging characters — \StringPrep\[\"C.9\"] +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#41 +Net::IMAP::StringPrep::SASLprep::TABLES_PROHIBITED = T.let(T.unsafe(nil), Array) + +# Adds unassigned (by Unicode 3.2) codepoints to TABLES_PROHIBITED. +# +# RFC4013 §2.5 Unassigned Code Points +# >>> +# This profile specifies the \StringPrep\[\"A.1\"] table as its +# list of unassigned code points. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#49 +Net::IMAP::StringPrep::SASLprep::TABLES_PROHIBITED_STORED = T.let(T.unsafe(nil), Array) + +# RFC4013 §2.5 Unassigned Code Points +# >>> +# This profile specifies the \StringPrep\[\"A.1\"] table as its +# list of unassigned code points. +# +# Equal to \StringPrep\[\"A.1\"]. +# Redefined here to avoid loading StringPrep::Tables unless necessary. +# +# source://net-imap//lib/net/imap/stringprep/saslprep_tables.rb#63 +Net::IMAP::StringPrep::SASLprep::UNASSIGNED = T.let(T.unsafe(nil), Regexp) + +# ArgumentError raised when +string+ is invalid for the stringprep +# +profile+. +# +# source://net-imap//lib/net/imap/stringprep.rb#19 +class Net::IMAP::StringPrep::StringPrepError < ::ArgumentError + # @return [StringPrepError] a new instance of StringPrepError + # + # source://net-imap//lib/net/imap/stringprep.rb#22 + def initialize(*args, string: T.unsafe(nil), profile: T.unsafe(nil)); end + + # Returns the value of attribute profile. + # + # source://net-imap//lib/net/imap/stringprep.rb#20 + def profile; end + + # Returns the value of attribute string. + # + # source://net-imap//lib/net/imap/stringprep.rb#20 + def string; end +end + +# source://net-imap//lib/net/imap/stringprep/tables.rb#9 +module Net::IMAP::StringPrep::Tables; end + +# source://net-imap//lib/net/imap/stringprep/tables.rb#75 +Net::IMAP::StringPrep::Tables::BIDI_DESC_REQ2 = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/stringprep/tables.rb#83 +Net::IMAP::StringPrep::Tables::BIDI_DESC_REQ3 = T.let(T.unsafe(nil), String) + +# Bidirectional Characters [StringPrep, §6], Requirement 2 +# >>> +# If a string contains any RandALCat character, the string MUST NOT +# contain any LCat character. +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#81 +Net::IMAP::StringPrep::Tables::BIDI_FAILS_REQ2 = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6], Requirement 3 +# >>> +# If a string contains any RandALCat character, a RandALCat +# character MUST be the first character of the string, and a +# RandALCat character MUST be the last character of the string. +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#90 +Net::IMAP::StringPrep::Tables::BIDI_FAILS_REQ3 = T.let(T.unsafe(nil), Regexp) + +# Bidirectional Characters [StringPrep, §6] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#93 +Net::IMAP::StringPrep::Tables::BIDI_FAILURE = T.let(T.unsafe(nil), Regexp) + +# Unassigned code points in Unicode 3.2 \StringPrep\[\"A.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#12 +Net::IMAP::StringPrep::Tables::IN_A_1 = T.let(T.unsafe(nil), Regexp) + +# Commonly mapped to nothing \StringPrep\[\"B.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#15 +Net::IMAP::StringPrep::Tables::IN_B_1 = T.let(T.unsafe(nil), Regexp) + +# Mapping for case-folding used with NFKC \StringPrep\[\"B.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#18 +Net::IMAP::StringPrep::Tables::IN_B_2 = T.let(T.unsafe(nil), Regexp) + +# Mapping for case-folding used with no normalization \StringPrep\[\"B.3\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#21 +Net::IMAP::StringPrep::Tables::IN_B_3 = T.let(T.unsafe(nil), Regexp) + +# ASCII space characters \StringPrep\[\"C.1.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#33 +Net::IMAP::StringPrep::Tables::IN_C_1_1 = T.let(T.unsafe(nil), Regexp) + +# Non-ASCII space characters \StringPrep\[\"C.1.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#36 +Net::IMAP::StringPrep::Tables::IN_C_1_2 = T.let(T.unsafe(nil), Regexp) + +# ASCII control characters \StringPrep\[\"C.2.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#39 +Net::IMAP::StringPrep::Tables::IN_C_2_1 = T.let(T.unsafe(nil), Regexp) + +# Non-ASCII control characters \StringPrep\[\"C.2.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#42 +Net::IMAP::StringPrep::Tables::IN_C_2_2 = T.let(T.unsafe(nil), Regexp) + +# Private use \StringPrep\[\"C.3\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#45 +Net::IMAP::StringPrep::Tables::IN_C_3 = T.let(T.unsafe(nil), Regexp) + +# Non-character code points \StringPrep\[\"C.4\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#48 +Net::IMAP::StringPrep::Tables::IN_C_4 = T.let(T.unsafe(nil), Regexp) + +# Surrogate codes \StringPrep\[\"C.5\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#51 +Net::IMAP::StringPrep::Tables::IN_C_5 = T.let(T.unsafe(nil), Regexp) + +# Inappropriate for plain text \StringPrep\[\"C.6\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#54 +Net::IMAP::StringPrep::Tables::IN_C_6 = T.let(T.unsafe(nil), Regexp) + +# Inappropriate for canonical representation \StringPrep\[\"C.7\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#57 +Net::IMAP::StringPrep::Tables::IN_C_7 = T.let(T.unsafe(nil), Regexp) + +# Change display properties or are deprecated \StringPrep\[\"C.8\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#60 +Net::IMAP::StringPrep::Tables::IN_C_8 = T.let(T.unsafe(nil), Regexp) + +# Tagging characters \StringPrep\[\"C.9\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#63 +Net::IMAP::StringPrep::Tables::IN_C_9 = T.let(T.unsafe(nil), Regexp) + +# Characters with bidirectional property "R" or "AL" \StringPrep\[\"D.1\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#66 +Net::IMAP::StringPrep::Tables::IN_D_1 = T.let(T.unsafe(nil), Regexp) + +# Used to check req3 of bidirectional checks +# Matches the negation of the D.1 table +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#70 +Net::IMAP::StringPrep::Tables::IN_D_1_NEGATED = T.let(T.unsafe(nil), Regexp) + +# Characters with bidirectional property "L" \StringPrep\[\"D.2\"] +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#73 +Net::IMAP::StringPrep::Tables::IN_D_2 = T.let(T.unsafe(nil), Regexp) + +# source://net-imap//lib/net/imap/stringprep/tables.rb#139 +Net::IMAP::StringPrep::Tables::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Replacements for IN_B.1 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#24 +Net::IMAP::StringPrep::Tables::MAP_B_1 = T.let(T.unsafe(nil), String) + +# Replacements for IN_B.2 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#27 +Net::IMAP::StringPrep::Tables::MAP_B_2 = T.let(T.unsafe(nil), Hash) + +# Replacements for IN_B.3 +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#30 +Net::IMAP::StringPrep::Tables::MAP_B_3 = T.let(T.unsafe(nil), Hash) + +# Regexps matching each codepoint table in the RFC-3454 appendices +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#119 +Net::IMAP::StringPrep::Tables::REGEXPS = T.let(T.unsafe(nil), Hash) + +# Names of each codepoint table in the RFC-3454 appendices +# +# source://net-imap//lib/net/imap/stringprep/tables.rb#96 +Net::IMAP::StringPrep::Tables::TITLES = T.let(T.unsafe(nil), Hash) + +# Defined in RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The +trace+ +# profile of \StringPrep is used by the +ANONYMOUS+ \SASL mechanism. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#9 +module Net::IMAP::StringPrep::Trace + private + + # From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" + # Profile of "Stringprep": + # >>> + # The character repertoire of this profile is Unicode 3.2 [Unicode]. + # + # No mapping is required by this profile. + # + # No Unicode normalization is required by this profile. + # + # The list of unassigned code points for this profile is that provided + # in Appendix A of [StringPrep]. Unassigned code points are not + # prohibited. + # + # Characters from the following tables of [StringPrep] are prohibited: + # (documented on PROHIBITED_TABLES) + # + # This profile requires bidirectional character checking per Section 6 + # of [StringPrep]. + # + # source://net-imap//lib/net/imap/stringprep/trace.rb#68 + def stringprep_trace(string, **opts); end + + class << self + # From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" + # Profile of "Stringprep": + # >>> + # The character repertoire of this profile is Unicode 3.2 [Unicode]. + # + # No mapping is required by this profile. + # + # No Unicode normalization is required by this profile. + # + # The list of unassigned code points for this profile is that provided + # in Appendix A of [StringPrep]. Unassigned code points are not + # prohibited. + # + # Characters from the following tables of [StringPrep] are prohibited: + # (documented on PROHIBITED_TABLES) + # + # This profile requires bidirectional character checking per Section 6 + # of [StringPrep]. + # + # source://net-imap//lib/net/imap/stringprep/trace.rb#68 + def stringprep_trace(string, **opts); end + end +end + +# >>> +# This profile requires bidirectional character checking per Section 6 +# of [StringPrep]. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#46 +Net::IMAP::StringPrep::Trace::CHECK_BIDI = T.let(T.unsafe(nil), TrueClass) + +# >>> +# No mapping is required by this profile. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#20 +Net::IMAP::StringPrep::Trace::MAPPING_TABLES = T.let(T.unsafe(nil), T.untyped) + +# >>> +# No Unicode normalization is required by this profile. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#24 +Net::IMAP::StringPrep::Trace::NORMALIZATION = T.let(T.unsafe(nil), T.untyped) + +# From RFC-4505[https://tools.ietf.org/html/rfc4505] §3, The "trace" +# Profile of "Stringprep": +# >>> +# Characters from the following tables of [StringPrep] are prohibited: +# +# - C.2.1 (ASCII control characters) +# - C.2.2 (Non-ASCII control characters) +# - C.3 (Private use characters) +# - C.4 (Non-character code points) +# - C.5 (Surrogate codes) +# - C.6 (Inappropriate for plain text) +# - C.8 (Change display properties are deprecated) +# - C.9 (Tagging characters) +# +# No additional characters are prohibited. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#41 +Net::IMAP::StringPrep::Trace::PROHIBITED_TABLES = T.let(T.unsafe(nil), Array) + +# Defined in RFC-4505[https://tools.ietf.org/html/rfc4505] §3. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#12 +Net::IMAP::StringPrep::Trace::STRINGPREP_PROFILE = T.let(T.unsafe(nil), String) + +# >>> +# The character repertoire of this profile is Unicode 3.2 [Unicode]. +# +# source://net-imap//lib/net/imap/stringprep/trace.rb#16 +Net::IMAP::StringPrep::Trace::UNASSIGNED_TABLE = T.let(T.unsafe(nil), String) + +# Mailbox attribute indicating that this mailbox is used to hold messages +# that have been deleted or marked for deletion. In some server +# implementations, this might be a virtual mailbox, containing messages from +# other mailboxes that are marked with the +\Deleted+ message flag. +# Alternatively, this might just be advice that a client that chooses not to +# use the \IMAP +\Deleted+ model should use as its trash location. In server +# implementations that strictly expect the \IMAP +\Deleted+ model, this +# special use is likely not to be supported. +# +# source://net-imap//lib/net/imap/flags.rb#258 +Net::IMAP::TRASH = T.let(T.unsafe(nil), Symbol) + +# Net::IMAP::ThreadMember represents a thread-node returned +# by Net::IMAP#thread. +# +# source://net-imap//lib/net/imap/response_data.rb#764 +class Net::IMAP::ThreadMember < ::Struct + # Returns a SequenceSet containing #seqno and all #children's seqno, + # recursively. + # + # source://net-imap//lib/net/imap/response_data.rb#780 + def to_sequence_set; end + + protected + + # source://net-imap//lib/net/imap/response_data.rb#786 + def all_seqnos(node = T.unsafe(nil)); end +end + +# Net::IMAP::UIDPlusData represents the ResponseCode#data that accompanies +# the +APPENDUID+ and +COPYUID+ response codes. +# +# See [[UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]]. +# +# ==== Capability requirement +# +# The +UIDPLUS+ capability[rdoc-ref:Net::IMAP#capability] must be supported. +# A server that supports +UIDPLUS+ should send a UIDPlusData object inside +# every TaggedResponse returned by the append[rdoc-ref:Net::IMAP#append], +# copy[rdoc-ref:Net::IMAP#copy], move[rdoc-ref:Net::IMAP#move], {uid +# copy}[rdoc-ref:Net::IMAP#uid_copy], and {uid +# move}[rdoc-ref:Net::IMAP#uid_move] commands---unless the destination +# mailbox reports +UIDNOTSTICKY+. +# +# -- +# TODO: support MULTIAPPEND +# ++ +# +# source://net-imap//lib/net/imap/response_data.rb#346 +class Net::IMAP::UIDPlusData < ::Struct + # :call-seq: uid_mapping -> nil or a hash + # + # Returns a hash mapping each source UID to the newly assigned destination + # UID. + # + # Note:: Returns +nil+ for Net::IMAP#append. + # + # source://net-imap//lib/net/imap/response_data.rb#376 + def uid_mapping; end +end + +# Error raised upon an unknown response from the server. +# +# This is different from InvalidResponseError: the response may be a +# valid extension response and the server may be allowed to send it in +# this context, but Net::IMAP either does not know how to parse it or +# how to handle it. This could result from enabling unknown or +# unhandled extensions. The connection may still be usable, +# but—depending on context—it may be prudent to disconnect. +# +# source://net-imap//lib/net/imap/errors.rb#71 +class Net::IMAP::UnknownResponseError < ::Net::IMAP::ResponseError; end + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::UnparsedData represents data for unknown response types or +# unknown extensions to response types without a well-defined extension +# grammar. +# +# See also: UnparsedNumericResponseData, ExtensionData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#77 +class Net::IMAP::UnparsedData < ::Struct; end + +# **Note:** This represents an intentionally _unstable_ API. Where +# instances of this class are returned, future releases may return a +# different (incompatible) object without deprecation or warning. +# +# Net::IMAP::UnparsedNumericResponseData represents data for unhandled +# response types with a numeric prefix. See the documentation for #number. +# +# See also: UnparsedData, ExtensionData, IgnoredResponse +# +# source://net-imap//lib/net/imap/response_data.rb#93 +class Net::IMAP::UnparsedNumericResponseData < ::Struct; end + +# source://net-imap//lib/net/imap.rb#720 +Net::IMAP::VERSION = T.let(T.unsafe(nil), String) + +# source://net-imap//lib/net/imap/authenticators.rb#35 +Net::IMAP::XOauth2Authenticator = Net::IMAP::SASL::XOAuth2Authenticator diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-pop@0.1.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-pop@0.1.2.rbi new file mode 100644 index 0000000..0157b1a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-pop@0.1.2.rbi @@ -0,0 +1,927 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-pop` gem. +# Please instead update this file by running `bin/tapioca gem net-pop`. + + +# This class is equivalent to POP3, except that it uses APOP authentication. +# +# source://net-pop//lib/net/pop.rb#729 +class Net::APOP < ::Net::POP3 + # Always returns true. + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#731 + def apop?; end +end + +# class aliases +# +# source://net-pop//lib/net/pop.rb#737 +Net::APOPSession = Net::APOP + +# class aliases +# +# source://net-pop//lib/net/pop.rb#722 +Net::POP = Net::POP3 + +# == What is This Library? +# +# This library provides functionality for retrieving +# email via POP3, the Post Office Protocol version 3. For details +# of POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt). +# +# == Examples +# +# === Retrieving Messages +# +# This example retrieves messages from the server and deletes them +# on the server. +# +# Messages are written to files named 'inbox/1', 'inbox/2', .... +# Replace 'pop.example.com' with your POP3 server address, and +# 'YourAccount' and 'YourPassword' with the appropriate account +# details. +# +# require 'net/pop' +# +# pop = Net::POP3.new('pop.example.com') +# pop.start('YourAccount', 'YourPassword') # (1) +# if pop.mails.empty? +# puts 'No mail.' +# else +# i = 0 +# pop.each_mail do |m| # or "pop.mails.each ..." # (2) +# File.open("inbox/#{i}", 'w') do |f| +# f.write m.pop +# end +# m.delete +# i += 1 +# end +# puts "#{pop.mails.size} mails popped." +# end +# pop.finish # (3) +# +# 1. Call Net::POP3#start and start POP session. +# 2. Access messages by using POP3#each_mail and/or POP3#mails. +# 3. Close POP session by calling POP3#finish or use the block form of #start. +# +# === Shortened Code +# +# The example above is very verbose. You can shorten the code by using +# some utility methods. First, the block form of Net::POP3.start can +# be used instead of POP3.new, POP3#start and POP3#finish. +# +# require 'net/pop' +# +# Net::POP3.start('pop.example.com', 110, +# 'YourAccount', 'YourPassword') do |pop| +# if pop.mails.empty? +# puts 'No mail.' +# else +# i = 0 +# pop.each_mail do |m| # or "pop.mails.each ..." +# File.open("inbox/#{i}", 'w') do |f| +# f.write m.pop +# end +# m.delete +# i += 1 +# end +# puts "#{pop.mails.size} mails popped." +# end +# end +# +# POP3#delete_all is an alternative for #each_mail and #delete. +# +# require 'net/pop' +# +# Net::POP3.start('pop.example.com', 110, +# 'YourAccount', 'YourPassword') do |pop| +# if pop.mails.empty? +# puts 'No mail.' +# else +# i = 1 +# pop.delete_all do |m| +# File.open("inbox/#{i}", 'w') do |f| +# f.write m.pop +# end +# i += 1 +# end +# end +# end +# +# And here is an even shorter example. +# +# require 'net/pop' +# +# i = 0 +# Net::POP3.delete_all('pop.example.com', 110, +# 'YourAccount', 'YourPassword') do |m| +# File.open("inbox/#{i}", 'w') do |f| +# f.write m.pop +# end +# i += 1 +# end +# +# === Memory Space Issues +# +# All the examples above get each message as one big string. +# This example avoids this. +# +# require 'net/pop' +# +# i = 1 +# Net::POP3.delete_all('pop.example.com', 110, +# 'YourAccount', 'YourPassword') do |m| +# File.open("inbox/#{i}", 'w') do |f| +# m.pop do |chunk| # get a message little by little. +# f.write chunk +# end +# i += 1 +# end +# end +# +# === Using APOP +# +# The net/pop library supports APOP authentication. +# To use APOP, use the Net::APOP class instead of the Net::POP3 class. +# You can use the utility method, Net::POP3.APOP(). For example: +# +# require 'net/pop' +# +# # Use APOP authentication if $isapop == true +# pop = Net::POP3.APOP($isapop).new('apop.example.com', 110) +# pop.start('YourAccount', 'YourPassword') do |pop| +# # Rest of the code is the same. +# end +# +# === Fetch Only Selected Mail Using 'UIDL' POP Command +# +# If your POP server provides UIDL functionality, +# you can grab only selected mails from the POP server. +# e.g. +# +# def need_pop?( id ) +# # determine if we need pop this mail... +# end +# +# Net::POP3.start('pop.example.com', 110, +# 'Your account', 'Your password') do |pop| +# pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m| +# do_something(m.pop) +# end +# end +# +# The POPMail#unique_id() method returns the unique-id of the message as a +# String. Normally the unique-id is a hash of the message. +# +# source://net-pop//lib/net/pop.rb#196 +class Net::POP3 < ::Net::Protocol + # Creates a new POP3 object. + # + # +address+ is the hostname or ip address of your POP3 server. + # + # The optional +port+ is the port to connect to. + # + # The optional +isapop+ specifies whether this connection is going + # to use APOP authentication; it defaults to +false+. + # + # This method does *not* open the TCP connection. + # + # @return [POP3] a new instance of POP3 + # + # source://net-pop//lib/net/pop.rb#417 + def initialize(addr, port = T.unsafe(nil), isapop = T.unsafe(nil)); end + + # +true+ if the POP3 session has started. + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#514 + def active?; end + + # The address to connect to. + # + # source://net-pop//lib/net/pop.rb#490 + def address; end + + # Does this instance use APOP authentication? + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#436 + def apop?; end + + # Starts a pop3 session, attempts authentication, and quits. + # This method must not be called while POP3 session is opened. + # This method raises POPAuthenticationError if authentication fails. + # + # @raise [IOError] + # + # source://net-pop//lib/net/pop.rb#314 + def auth_only(account, password); end + + # Deletes all messages on the server. + # + # If called with a block, yields each message in turn before deleting it. + # + # === Example + # + # n = 1 + # pop.delete_all do |m| + # File.open("inbox/#{n}") do |f| + # f.write m.pop + # end + # n += 1 + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#690 + def delete_all; end + + # Disable SSL for all new instances. + # + # source://net-pop//lib/net/pop.rb#463 + def disable_ssl; end + + # Yields each message to the passed-in block in turn. + # Equivalent to: + # + # pop3.mails.each do |popmail| + # .... + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#668 + def each(&block); end + + # Yields each message to the passed-in block in turn. + # Equivalent to: + # + # pop3.mails.each do |popmail| + # .... + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#668 + def each_mail(&block); end + + # :call-seq: + # Net::POP#enable_ssl(params = {}) + # + # Enables SSL for this instance. Must be called before the connection is + # established to have any effect. + # +params[:port]+ is port to establish the SSL connection on; Defaults to 995. + # +params+ (except :port) is passed to OpenSSL::SSLContext#set_params. + # + # source://net-pop//lib/net/pop.rb#452 + def enable_ssl(verify_or_params = T.unsafe(nil), certs = T.unsafe(nil), port = T.unsafe(nil)); end + + # Finishes a POP3 session and closes TCP connection. + # + # @raise [IOError] + # + # source://net-pop//lib/net/pop.rb#589 + def finish; end + + # Provide human-readable stringification of class state. + # + # source://net-pop//lib/net/pop.rb#468 + def inspect; end + + # debugging output for +msg+ + # + # source://net-pop//lib/net/pop.rb#715 + def logging(msg); end + + # Returns an array of Net::POPMail objects, representing all the + # messages on the server. This array is renewed when the session + # restarts; otherwise, it is fetched from the server the first time + # this method is called (directly or indirectly) and cached. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#646 + def mails; end + + # Returns the total size in bytes of all the messages on the POP server. + # + # source://net-pop//lib/net/pop.rb#634 + def n_bytes; end + + # Returns the number of messages on the POP server. + # + # source://net-pop//lib/net/pop.rb#627 + def n_mails; end + + # Seconds to wait until a connection is opened. + # If the POP3 object cannot open a connection within this time, + # it raises a Net::OpenTimeout exception. The default value is 30 seconds. + # + # source://net-pop//lib/net/pop.rb#500 + def open_timeout; end + + # Seconds to wait until a connection is opened. + # If the POP3 object cannot open a connection within this time, + # it raises a Net::OpenTimeout exception. The default value is 30 seconds. + # + # source://net-pop//lib/net/pop.rb#500 + def open_timeout=(_arg0); end + + # The port number to connect to. + # + # source://net-pop//lib/net/pop.rb#493 + def port; end + + # Seconds to wait until reading one block (by one read(1) call). + # If the POP3 object cannot complete a read() within this time, + # it raises a Net::ReadTimeout exception. The default value is 60 seconds. + # + # source://net-pop//lib/net/pop.rb#505 + def read_timeout; end + + # Set the read timeout. + # + # source://net-pop//lib/net/pop.rb#508 + def read_timeout=(sec); end + + # Resets the session. This clears all "deleted" marks from messages. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#700 + def reset; end + + # source://net-pop//lib/net/pop.rb#709 + def set_all_uids; end + + # *WARNING*: This method causes a serious security hole. + # Use this method only for debugging. + # + # Set an output stream for debugging. + # + # === Example + # + # pop = Net::POP.new(addr, port) + # pop.set_debug_output $stderr + # pop.start(account, passwd) do |pop| + # .... + # end + # + # source://net-pop//lib/net/pop.rb#485 + def set_debug_output(arg); end + + # Starts a POP3 session. + # + # When called with block, gives a POP3 object to the block and + # closes the session after block call finishes. + # + # This method raises a POPAuthenticationError if authentication fails. + # + # @raise [IOError] + # + # source://net-pop//lib/net/pop.rb#526 + def start(account, password); end + + # +true+ if the POP3 session has started. + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#514 + def started?; end + + # does this instance use SSL? + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#441 + def use_ssl?; end + + private + + # Returns the current command. + # + # Raises IOError if there is no active socket + # + # @raise [IOError] + # + # source://net-pop//lib/net/pop.rb#615 + def command; end + + # nil's out the: + # - mails + # - number counter for mails + # - number counter for bytes + # - quits the current command, if any + # + # source://net-pop//lib/net/pop.rb#599 + def do_finish; end + + # internal method for Net::POP3.start + # + # source://net-pop//lib/net/pop.rb#542 + def do_start(account, password); end + + # Does nothing + # + # source://net-pop//lib/net/pop.rb#584 + def on_connect; end + + class << self + # Returns the APOP class if +isapop+ is true; otherwise, returns + # the POP class. For example: + # + # # Example 1 + # pop = Net::POP3::APOP($is_apop).new(addr, port) + # + # # Example 2 + # Net::POP3::APOP($is_apop).start(addr, port) do |pop| + # .... + # end + # + # source://net-pop//lib/net/pop.rb#238 + def APOP(isapop); end + + # Opens a POP3 session, attempts authentication, and quits. + # + # This method raises POPAuthenticationError if authentication fails. + # + # === Example: normal POP3 + # + # Net::POP3.auth_only('pop.example.com', 110, + # 'YourAccount', 'YourPassword') + # + # === Example: APOP + # + # Net::POP3.auth_only('pop.example.com', 110, + # 'YourAccount', 'YourPassword', true) + # + # source://net-pop//lib/net/pop.rb#305 + def auth_only(address, port = T.unsafe(nil), account = T.unsafe(nil), password = T.unsafe(nil), isapop = T.unsafe(nil)); end + + # returns the :ca_file or :ca_path from POP3.ssl_params + # + # source://net-pop//lib/net/pop.rb#377 + def certs; end + + # Constructs proper parameters from arguments + # + # source://net-pop//lib/net/pop.rb#337 + def create_ssl_params(verify_or_params = T.unsafe(nil), certs = T.unsafe(nil)); end + + # The default port for POP3 connections, port 110 + # + # source://net-pop//lib/net/pop.rb#210 + def default_pop3_port; end + + # The default port for POP3S connections, port 995 + # + # source://net-pop//lib/net/pop.rb#215 + def default_pop3s_port; end + + # returns the port for POP3 + # + # source://net-pop//lib/net/pop.rb#205 + def default_port; end + + # Starts a POP3 session and deletes all messages on the server. + # If a block is given, each POPMail object is yielded to it before + # being deleted. + # + # This method raises a POPAuthenticationError if authentication fails. + # + # === Example + # + # Net::POP3.delete_all('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |m| + # file.write m.pop + # end + # + # source://net-pop//lib/net/pop.rb#283 + def delete_all(address, port = T.unsafe(nil), account = T.unsafe(nil), password = T.unsafe(nil), isapop = T.unsafe(nil), &block); end + + # Disable SSL for all new instances. + # + # source://net-pop//lib/net/pop.rb#355 + def disable_ssl; end + + # :call-seq: + # Net::POP.enable_ssl(params = {}) + # + # Enable SSL for all new instances. + # +params+ is passed to OpenSSL::SSLContext#set_params. + # + # source://net-pop//lib/net/pop.rb#332 + def enable_ssl(*args); end + + # Starts a POP3 session and iterates over each POPMail object, + # yielding it to the +block+. + # This method is equivalent to: + # + # Net::POP3.start(address, port, account, password) do |pop| + # pop.each_mail do |m| + # yield m + # end + # end + # + # This method raises a POPAuthenticationError if authentication fails. + # + # === Example + # + # Net::POP3.foreach('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |m| + # file.write m.pop + # m.delete if $DELETE + # end + # + # source://net-pop//lib/net/pop.rb#262 + def foreach(address, port = T.unsafe(nil), account = T.unsafe(nil), password = T.unsafe(nil), isapop = T.unsafe(nil), &block); end + + # source://net-pop//lib/net/pop.rb#219 + def socket_type; end + + # returns the SSL Parameters + # + # see also POP3.enable_ssl + # + # source://net-pop//lib/net/pop.rb#362 + def ssl_params; end + + # Creates a new POP3 object and open the connection. Equivalent to + # + # Net::POP3.new(address, port, isapop).start(account, password) + # + # If +block+ is provided, yields the newly-opened POP3 object to it, + # and automatically closes it at the end of the session. + # + # === Example + # + # Net::POP3.start(addr, port, account, password) do |pop| + # pop.each_mail do |m| + # file.write m.pop + # m.delete + # end + # end + # + # source://net-pop//lib/net/pop.rb#401 + def start(address, port = T.unsafe(nil), account = T.unsafe(nil), password = T.unsafe(nil), isapop = T.unsafe(nil), &block); end + + # returns +true+ if POP3.ssl_params is set + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#367 + def use_ssl?; end + + # returns whether verify_mode is enable from POP3.ssl_params + # + # source://net-pop//lib/net/pop.rb#372 + def verify; end + end +end + +# version of this library +# +# source://net-pop//lib/net/pop.rb#198 +Net::POP3::VERSION = T.let(T.unsafe(nil), String) + +# source://net-pop//lib/net/pop.rb#892 +class Net::POP3Command + # @return [POP3Command] a new instance of POP3Command + # + # source://net-pop//lib/net/pop.rb#894 + def initialize(sock); end + + # @raise [POPAuthenticationError] + # + # source://net-pop//lib/net/pop.rb#914 + def apop(account, password); end + + # source://net-pop//lib/net/pop.rb#907 + def auth(account, password); end + + # source://net-pop//lib/net/pop.rb#962 + def dele(num); end + + # source://net-pop//lib/net/pop.rb#903 + def inspect; end + + # source://net-pop//lib/net/pop.rb#924 + def list; end + + # source://net-pop//lib/net/pop.rb#983 + def quit; end + + # source://net-pop//lib/net/pop.rb#955 + def retr(num, &block); end + + # source://net-pop//lib/net/pop.rb#944 + def rset; end + + # Returns the value of attribute socket. + # + # source://net-pop//lib/net/pop.rb#901 + def socket; end + + # source://net-pop//lib/net/pop.rb#937 + def stat; end + + # source://net-pop//lib/net/pop.rb#948 + def top(num, lines = T.unsafe(nil), &block); end + + # source://net-pop//lib/net/pop.rb#966 + def uidl(num = T.unsafe(nil)); end + + private + + # @raise [POPError] + # + # source://net-pop//lib/net/pop.rb#1003 + def check_response(res); end + + # @raise [POPAuthenticationError] + # + # source://net-pop//lib/net/pop.rb#1008 + def check_response_auth(res); end + + # source://net-pop//lib/net/pop.rb#1013 + def critical; end + + # source://net-pop//lib/net/pop.rb#994 + def get_response(fmt, *fargs); end + + # source://net-pop//lib/net/pop.rb#989 + def getok(fmt, *fargs); end + + # source://net-pop//lib/net/pop.rb#999 + def recv_response; end +end + +# source://net-pop//lib/net/pop.rb#724 +Net::POP3Session = Net::POP3 + +# POP3 authentication error. +# +# source://net-pop//lib/net/pop.rb#40 +class Net::POPAuthenticationError < ::Net::ProtoAuthError; end + +# Unexpected response from the server. +# +# source://net-pop//lib/net/pop.rb#43 +class Net::POPBadResponse < ::Net::POPError; end + +# Non-authentication POP3 protocol error +# (reply code "-ERR", except authentication). +# +# source://net-pop//lib/net/pop.rb#37 +class Net::POPError < ::Net::ProtocolError; end + +# This class represents a message which exists on the POP server. +# Instances of this class are created by the POP3 class; they should +# not be directly created by the user. +# +# source://net-pop//lib/net/pop.rb#744 +class Net::POPMail + # @return [POPMail] a new instance of POPMail + # + # source://net-pop//lib/net/pop.rb#746 + def initialize(num, len, pop, cmd); end + + # This method fetches the message. If called with a block, the + # message is yielded to the block one chunk at a time. If called + # without a block, the message is returned as a String. The optional + # +dest+ argument will be prepended to the returned String; this + # argument is essentially obsolete. + # + # === Example without block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # f.write popmail.pop + # end + # popmail.delete + # n += 1 + # end + # end + # + # === Example with block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # popmail.pop do |chunk| #### + # f.write chunk + # end + # end + # n += 1 + # end + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#805 + def all(dest = T.unsafe(nil), &block); end + + # Marks a message for deletion on the server. Deletion does not + # actually occur until the end of the session; deletion may be + # cancelled for _all_ marked messages by calling POP3#reset(). + # + # This method raises a POPError if an error occurs. + # + # === Example + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # f.write popmail.pop + # end + # popmail.delete #### + # n += 1 + # end + # end + # + # source://net-pop//lib/net/pop.rb#861 + def delete; end + + # Marks a message for deletion on the server. Deletion does not + # actually occur until the end of the session; deletion may be + # cancelled for _all_ marked messages by calling POP3#reset(). + # + # This method raises a POPError if an error occurs. + # + # === Example + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # f.write popmail.pop + # end + # popmail.delete #### + # n += 1 + # end + # end + # + # source://net-pop//lib/net/pop.rb#861 + def delete!; end + + # True if the mail has been deleted. + # + # @return [Boolean] + # + # source://net-pop//lib/net/pop.rb#869 + def deleted?; end + + # Fetches the message header. + # + # The optional +dest+ argument is obsolete. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#837 + def header(dest = T.unsafe(nil)); end + + # Provide human-readable stringification of class state. + # + # source://net-pop//lib/net/pop.rb#763 + def inspect; end + + # The length of the message in octets. + # + # source://net-pop//lib/net/pop.rb#759 + def length; end + + # This method fetches the message. If called with a block, the + # message is yielded to the block one chunk at a time. If called + # without a block, the message is returned as a String. The optional + # +dest+ argument will be prepended to the returned String; this + # argument is essentially obsolete. + # + # === Example without block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # f.write popmail.pop + # end + # popmail.delete + # n += 1 + # end + # end + # + # === Example with block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # popmail.pop do |chunk| #### + # f.write chunk + # end + # end + # n += 1 + # end + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#805 + def mail(dest = T.unsafe(nil), &block); end + + # The sequence number of the message on the server. + # + # source://net-pop//lib/net/pop.rb#756 + def number; end + + # This method fetches the message. If called with a block, the + # message is yielded to the block one chunk at a time. If called + # without a block, the message is returned as a String. The optional + # +dest+ argument will be prepended to the returned String; this + # argument is essentially obsolete. + # + # === Example without block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # f.write popmail.pop + # end + # popmail.delete + # n += 1 + # end + # end + # + # === Example with block + # + # POP3.start('pop.example.com', 110, + # 'YourAccount', 'YourPassword') do |pop| + # n = 1 + # pop.mails.each do |popmail| + # File.open("inbox/#{n}", 'w') do |f| + # popmail.pop do |chunk| #### + # f.write chunk + # end + # end + # n += 1 + # end + # end + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#805 + def pop(dest = T.unsafe(nil), &block); end + + # The length of the message in octets. + # + # source://net-pop//lib/net/pop.rb#759 + def size; end + + # Fetches the message header and +lines+ lines of body. + # + # The optional +dest+ argument is obsolete. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#825 + def top(lines, dest = T.unsafe(nil)); end + + # source://net-pop//lib/net/pop.rb#885 + def uid=(uid); end + + # Returns the unique-id of the message. + # Normally the unique-id is a hash string of the message. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#877 + def uidl; end + + # Returns the unique-id of the message. + # Normally the unique-id is a hash string of the message. + # + # This method raises a POPError if an error occurs. + # + # source://net-pop//lib/net/pop.rb#877 + def unique_id; end +end + +# source://net-pop//lib/net/pop.rb#723 +Net::POPSession = Net::POP3 diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-protocol@0.2.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-protocol@0.2.2.rbi new file mode 100644 index 0000000..7014c6f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-protocol@0.2.2.rbi @@ -0,0 +1,292 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-protocol` gem. +# Please instead update this file by running `bin/tapioca gem net-protocol`. + + +# source://net-protocol//lib/net/protocol.rb#115 +class Net::BufferedIO + # @return [BufferedIO] a new instance of BufferedIO + # + # source://net-protocol//lib/net/protocol.rb#116 + def initialize(io, read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), continue_timeout: T.unsafe(nil), debug_output: T.unsafe(nil)); end + + # source://net-protocol//lib/net/protocol.rb#285 + def <<(*strs); end + + # source://net-protocol//lib/net/protocol.rb#145 + def close; end + + # @return [Boolean] + # + # source://net-protocol//lib/net/protocol.rb#141 + def closed?; end + + # Returns the value of attribute continue_timeout. + # + # source://net-protocol//lib/net/protocol.rb#130 + def continue_timeout; end + + # Sets the attribute continue_timeout + # + # @param value the value to set the attribute continue_timeout to. + # + # source://net-protocol//lib/net/protocol.rb#130 + def continue_timeout=(_arg0); end + + # Returns the value of attribute debug_output. + # + # source://net-protocol//lib/net/protocol.rb#131 + def debug_output; end + + # Sets the attribute debug_output + # + # @param value the value to set the attribute debug_output to. + # + # source://net-protocol//lib/net/protocol.rb#131 + def debug_output=(_arg0); end + + # @return [Boolean] + # + # source://net-protocol//lib/net/protocol.rb#137 + def eof?; end + + # source://net-protocol//lib/net/protocol.rb#133 + def inspect; end + + # Returns the value of attribute io. + # + # source://net-protocol//lib/net/protocol.rb#127 + def io; end + + # source://net-protocol//lib/net/protocol.rb#155 + def read(len, dest = T.unsafe(nil), ignore_eof = T.unsafe(nil)); end + + # source://net-protocol//lib/net/protocol.rb#176 + def read_all(dest = T.unsafe(nil)); end + + # Returns the value of attribute read_timeout. + # + # source://net-protocol//lib/net/protocol.rb#128 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://net-protocol//lib/net/protocol.rb#128 + def read_timeout=(_arg0); end + + # source://net-protocol//lib/net/protocol.rb#208 + def readline; end + + # source://net-protocol//lib/net/protocol.rb#194 + def readuntil(terminator, ignore_eof = T.unsafe(nil)); end + + # source://net-protocol//lib/net/protocol.rb#285 + def write(*strs); end + + # Returns the value of attribute write_timeout. + # + # source://net-protocol//lib/net/protocol.rb#129 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://net-protocol//lib/net/protocol.rb#129 + def write_timeout=(_arg0); end + + # source://net-protocol//lib/net/protocol.rb#293 + def writeline(str); end + + private + + # source://net-protocol//lib/net/protocol.rb#356 + def LOG(msg); end + + # source://net-protocol//lib/net/protocol.rb#347 + def LOG_off; end + + # source://net-protocol//lib/net/protocol.rb#352 + def LOG_on; end + + # source://net-protocol//lib/net/protocol.rb#257 + def rbuf_consume(len = T.unsafe(nil)); end + + # source://net-protocol//lib/net/protocol.rb#253 + def rbuf_consume_all; end + + # source://net-protocol//lib/net/protocol.rb#216 + def rbuf_fill; end + + # source://net-protocol//lib/net/protocol.rb#241 + def rbuf_flush; end + + # source://net-protocol//lib/net/protocol.rb#249 + def rbuf_size; end + + # source://net-protocol//lib/net/protocol.rb#311 + def write0(*strs); end + + # source://net-protocol//lib/net/protocol.rb#301 + def writing; end +end + +# source://net-protocol//lib/net/protocol.rb#363 +class Net::InternetMessageIO < ::Net::BufferedIO + # @return [InternetMessageIO] a new instance of InternetMessageIO + # + # source://net-protocol//lib/net/protocol.rb#364 + def initialize(*_arg0, **_arg1); end + + # *library private* (cannot handle 'break') + # + # source://net-protocol//lib/net/protocol.rb#386 + def each_list_item; end + + # Read + # + # source://net-protocol//lib/net/protocol.rb#373 + def each_message_chunk; end + + # Write + # + # source://net-protocol//lib/net/protocol.rb#404 + def write_message(src); end + + # source://net-protocol//lib/net/protocol.rb#392 + def write_message_0(src); end + + # source://net-protocol//lib/net/protocol.rb#417 + def write_message_by_block(&block); end + + private + + # source://net-protocol//lib/net/protocol.rb#460 + def buffer_filling(buf, src); end + + # source://net-protocol//lib/net/protocol.rb#436 + def dot_stuff(s); end + + # source://net-protocol//lib/net/protocol.rb#452 + def each_crlf_line(src); end + + # source://net-protocol//lib/net/protocol.rb#440 + def using_each_crlf_line; end +end + +# source://net-protocol//lib/net/protocol.rb#541 +Net::NetPrivate::Socket = Net::InternetMessageIO + +# source://net-protocol//lib/net/protocol.rb#68 +Net::ProtocRetryError = Net::ProtoRetriableError + +# source://net-protocol//lib/net/protocol.rb#28 +class Net::Protocol + private + + # source://net-protocol//lib/net/protocol.rb#40 + def ssl_socket_connect(s, timeout); end + + class << self + # source://net-protocol//lib/net/protocol.rb#32 + def protocol_param(name, val); end + end +end + +# source://net-protocol//lib/net/protocol.rb#29 +Net::Protocol::VERSION = T.let(T.unsafe(nil), String) + +# source://net-protocol//lib/net/protocol.rb#516 +class Net::ReadAdapter + # @return [ReadAdapter] a new instance of ReadAdapter + # + # source://net-protocol//lib/net/protocol.rb#517 + def initialize(block); end + + # source://net-protocol//lib/net/protocol.rb#525 + def <<(str); end + + # source://net-protocol//lib/net/protocol.rb#521 + def inspect; end + + private + + # This method is needed because @block must be called by yield, + # not Proc#call. You can see difference when using `break' in + # the block. + # + # @yield [str] + # + # source://net-protocol//lib/net/protocol.rb#534 + def call_block(str); end +end + +# ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the +# response cannot be read within the read_timeout. +# +# source://net-protocol//lib/net/protocol.rb#80 +class Net::ReadTimeout < ::Timeout::Error + # @return [ReadTimeout] a new instance of ReadTimeout + # + # source://net-protocol//lib/net/protocol.rb#81 + def initialize(io = T.unsafe(nil)); end + + # Returns the value of attribute io. + # + # source://net-protocol//lib/net/protocol.rb#84 + def io; end + + # source://net-protocol//lib/net/protocol.rb#86 + def message; end +end + +# The writer adapter class +# +# source://net-protocol//lib/net/protocol.rb#486 +class Net::WriteAdapter + # @return [WriteAdapter] a new instance of WriteAdapter + # + # source://net-protocol//lib/net/protocol.rb#487 + def initialize(writer); end + + # source://net-protocol//lib/net/protocol.rb#501 + def <<(str); end + + # source://net-protocol//lib/net/protocol.rb#491 + def inspect; end + + # source://net-protocol//lib/net/protocol.rb#495 + def print(str); end + + # source://net-protocol//lib/net/protocol.rb#510 + def printf(*args); end + + # source://net-protocol//lib/net/protocol.rb#506 + def puts(str = T.unsafe(nil)); end + + # source://net-protocol//lib/net/protocol.rb#495 + def write(str); end +end + +# WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the +# response cannot be written within the write_timeout. Not raised on Windows. +# +# source://net-protocol//lib/net/protocol.rb#99 +class Net::WriteTimeout < ::Timeout::Error + # @return [WriteTimeout] a new instance of WriteTimeout + # + # source://net-protocol//lib/net/protocol.rb#100 + def initialize(io = T.unsafe(nil)); end + + # Returns the value of attribute io. + # + # source://net-protocol//lib/net/protocol.rb#103 + def io; end + + # source://net-protocol//lib/net/protocol.rb#105 + def message; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-scp@4.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-scp@4.0.0.rbi new file mode 100644 index 0000000..067bb40 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-scp@4.0.0.rbi @@ -0,0 +1,676 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-scp` gem. +# Please instead update this file by running `bin/tapioca gem net-scp`. + + +# Net::SCP implements the SCP (Secure CoPy) client protocol, allowing Ruby +# programs to securely and programmatically transfer individual files or +# entire directory trees to and from remote servers. It provides support for +# multiple simultaneous SCP copies working in parallel over the same +# connection, as well as for synchronous, serial copies. +# +# Basic usage: +# +# require 'net/scp' +# +# Net::SCP.start("remote.host", "username", :password => "passwd") do |scp| +# # synchronous (blocking) upload; call blocks until upload completes +# scp.upload! "/local/path", "/remote/path" +# +# # asynchronous upload; call returns immediately and requires SSH +# # event loop to run +# channel = scp.upload("/local/path", "/remote/path") +# channel.wait +# end +# +# Net::SCP also provides an open-uri tie-in, so you can use the Kernel#open +# method to open and read a remote file: +# +# # if you just want to parse SCP URL's: +# require 'uri/scp' +# url = URI.parse("scp://user@remote.host/path/to/file") +# +# # if you want to read from a URL voa SCP: +# require 'uri/open-scp' +# puts open("scp://user@remote.host/path/to/file").read +# +# Lastly, Net::SCP adds a method to the Net::SSH::Connection::Session class, +# allowing you to easily grab a Net::SCP reference from an existing Net::SSH +# session: +# +# require 'net/ssh' +# require 'net/scp' +# +# Net::SSH.start("remote.host", "username", :password => "passwd") do |ssh| +# ssh.scp.download! "/remote/path", "/local/path" +# end +# +# == Progress Reporting +# +# By default, uploading and downloading proceed silently, without any +# outward indication of their progress. For long running uploads or downloads +# (and especially in interactive environments) it is desirable to report +# to the user the progress of the current operation. +# +# To receive progress reports for the current operation, just pass a block +# to #upload or #download (or one of their variants): +# +# scp.upload!("/path/to/local", "/path/to/remote") do |ch, name, sent, total| +# puts "#{name}: #{sent}/#{total}" +# end +# +# Whenever a new chunk of data is recieved for or sent to a file, the callback +# will be invoked, indicating the name of the file (local for downloads, +# remote for uploads), the number of bytes that have been sent or received +# so far for the file, and the size of the file. +# +# -- +# = Protocol Description +# +# Although this information has zero relevance to consumers of the Net::SCP +# library, I'm documenting it here so that anyone else looking for documentation +# of the SCP protocol won't be left high-and-dry like I was. The following is +# reversed engineered from the OpenSSH SCP implementation, and so may +# contain errors. You have been warned! +# +# The first step is to invoke the "scp" command on the server. It accepts +# the following parameters, which must be set correctly to avoid errors: +# +# * "-t" -- tells the remote scp process that data will be sent "to" it, +# e.g., that data will be uploaded and it should initialize itself +# accordingly. +# * "-f" -- tells the remote scp process that data should come "from" it, +# e.g., that data will be downloaded and it should initialize itself +# accordingly. +# * "-v" -- verbose mode; the remote scp process should chatter about what +# it is doing via stderr. +# * "-p" -- preserve timestamps. 'T' directives (see below) should be/will +# be sent to indicate the modification and access times of each file. +# * "-r" -- recursive transfers should be allowed. Without this, it is an +# error to upload or download a directory. +# +# After those flags, the name of the remote file/directory should be passed +# as the sole non-switch argument to scp. +# +# Then the fun begins. If you're doing a download, enter the download_start_state. +# Otherwise, look for upload_start_state. +# +# == Net::SCP::Download#download_start_state +# +# This is the start state for downloads. It simply sends a 0-byte to the +# server. The next state is Net::SCP::Download#read_directive_state. +# +# == Net::SCP::Upload#upload_start_state +# +# Sets up the initial upload scaffolding and waits for a 0-byte from the +# server, and then switches to Net::SCP::Upload#upload_current_state. +# +# == Net::SCP::Download#read_directive_state +# +# Reads a directive line from the input. The following directives are +# recognized: +# +# * T%d %d %d %d -- a "times" packet. Indicates that the next file to be +# downloaded must have mtime/usec/atime/usec attributes preserved. +# * D%o %d %s -- a directory change. The process is changing to a directory +# with the given permissions/size/name, and the recipient should create +# a directory with the same name and permissions. Subsequent files and +# directories will be children of this directory, until a matching 'E' +# directive. +# * C%o %d %s -- a file is being sent next. The file will have the given +# permissions/size/name. Immediately following this line, +size+ bytes +# will be sent, raw. +# * E -- terminator directive. Indicates the end of a directory, and subsequent +# files and directories should be received by the parent of the current +# directory. +# * \0 -- indicates a successful response from the other end. +# * \1 -- warning directive. Indicates a warning from the other end. Text from +# this warning will be reported if the SCP results in an error. +# * \2 -- error directive. Indicates an error from the other end. Text from +# this error will be reported if the SCP results in an error. +# +# If a 'C' directive is received, we switch over to +# Net::SCP::Download#read_data_state. If an 'E' directive is received, and +# there is no parent directory, we switch over to Net::SCP#finish_state. +# +# Regardless of what the next state is, we send a 0-byte to the server +# before moving to the next state. +# +# == Net::SCP::Download#read_data_state +# +# Bytes are read to satisfy the size of the incoming file. When all pending +# data has been read, we wait for the server to send a 0-byte, and then we +# switch to the Net::SCP::Download#finish_read_state. +# +# == Net::SCP::Download#finish_read_state +# +# We sent a 0-byte to the server to indicate that the file was successfully +# received. If there is no parent directory, then we're downloading a single +# file and we switch to Net::SCP#finish_state. Otherwise we jump back to the +# Net::SCP::Download#read_directive state to see what we get to download next. +# +# == Net::SCP::Upload#upload_current_state +# +# If the current item is a file, send a file. Sending a file starts with a +# 'T' directive (if :preserve is true), then a wait for the server to respond, +# and then a 'C' directive, and then a wait for the server to respond, and +# then a jump to Net::SCP::Upload#send_data_state. +# +# If current item is a directory, send a 'D' directive, and wait for the +# server to respond with a 0-byte. Then jump to Net::SCP::Upload#next_item_state. +# +# == Net::SCP::Upload#send_data_state +# +# Reads and sends the next chunk of data to the server. The state machine +# remains in this state until all data has been sent, at which point we +# send a 0-byte to the server, and wait for the server to respond with a +# 0-byte of its own. Then we jump back to Net::SCP::Upload#next_item_state. +# +# == Net::SCP::Upload#next_item_state +# +# If there is nothing left to upload, and there is no parent directory, +# jump to Net::SCP#finish_state. +# +# If there is nothing left to upload from the current directory, send an +# 'E' directive and wait for the server to respond with a 0-byte. Then go +# to Net::SCP::Upload#next_item_state. +# +# Otherwise, set the current upload source and go to +# Net::SCP::Upload#upload_current_state. +# +# == Net::SCP#finish_state +# +# Tells the server that no more data is forthcoming from this end of the +# pipe (via Net::SSH::Connection::Channel#eof!) and leaves the pipe to drain. +# It will be terminated when the remote process closes with an exit status +# of zero. +# ++ +# +# source://net-scp//lib/net/scp/errors.rb#1 +class Net::SCP + include ::Net::SSH::Loggable + include ::Net::SCP::Download + include ::Net::SCP::Upload + + # Creates a new Net::SCP session on top of the given Net::SSH +session+ + # object. + # + # @return [SCP] a new instance of SCP + # + # source://net-scp//lib/net/scp.rb#251 + def initialize(session); end + + # Inititiate a synchronous (non-blocking) download from +remote+ to +local+. + # The following options are recognized: + # + # * :recursive - the +remote+ parameter refers to a remote directory, which + # should be downloaded to a new directory named +local+ on the local + # machine. + # * :preserve - the atime and mtime of the file should be preserved. + # * :verbose - the process should result in verbose output on the server + # end (useful for debugging). + # + # This method will return immediately, returning the Net::SSH::Connection::Channel + # object that will support the download. To wait for the download to finish, + # you can either call the #wait method on the channel, or otherwise run + # the Net::SSH event loop until the channel's #active? method returns false. + # + # channel = scp.download("/remote/path", "/local/path") + # channel.wait + # + # source://net-scp//lib/net/scp.rb#304 + def download(remote, local, options = T.unsafe(nil), &progress); end + + # Same as #download, but blocks until the download finishes. Identical to + # calling #download and then calling the #wait method on the channel + # object that is returned. + # + # scp.download!("/remote/path", "/local/path") + # + # If +local+ is nil, and the download is not recursive (e.g., it is downloading + # only a single file), the file will be downloaded to an in-memory buffer + # and the resulting string returned. + # + # data = download!("/remote/path") + # + # source://net-scp//lib/net/scp.rb#319 + def download!(remote, local = T.unsafe(nil), options = T.unsafe(nil), &progress); end + + # The underlying Net::SSH session that acts as transport for the SCP + # packets. + # + # source://net-scp//lib/net/scp.rb#247 + def session; end + + # Inititiate a synchronous (non-blocking) upload from +local+ to +remote+. + # The following options are recognized: + # + # * :recursive - the +local+ parameter refers to a local directory, which + # should be uploaded to a new directory named +remote+ on the remote + # server. + # * :preserve - the atime and mtime of the file should be preserved. + # * :verbose - the process should result in verbose output on the server + # end (useful for debugging). + # * :chunk_size - the size of each "chunk" that should be sent. Defaults + # to 2048. Changing this value may improve throughput at the expense + # of decreasing interactivity. + # + # This method will return immediately, returning the Net::SSH::Connection::Channel + # object that will support the upload. To wait for the upload to finish, + # you can either call the #wait method on the channel, or otherwise run + # the Net::SSH event loop until the channel's #active? method returns false. + # + # channel = scp.upload("/local/path", "/remote/path") + # channel.wait + # + # source://net-scp//lib/net/scp.rb#276 + def upload(local, remote, options = T.unsafe(nil), &progress); end + + # Same as #upload, but blocks until the upload finishes. Identical to + # calling #upload and then calling the #wait method on the channel object + # that is returned. The return value is not defined. + # + # source://net-scp//lib/net/scp.rb#283 + def upload!(local, remote, options = T.unsafe(nil), &progress); end + + private + + # Causes the state machine to enter the "await response" state, where + # things just pause until the server replies with a 0 (see + # #await_response_state), at which point the state machine will pick up + # at +next_state+ and continue processing. + # + # source://net-scp//lib/net/scp.rb#382 + def await_response(channel, next_state); end + + # The action invoked while the state machine remains in the "await + # response" state. As long as there is no data ready to process, the + # machine will remain in this state. As soon as the server replies with + # an integer 0 as the only byte, the state machine is kicked into the + # next state (see +await_response+). If the response is not a 0, an + # exception is raised. + # + # @raise [Net::SCP::Error] + # + # source://net-scp//lib/net/scp.rb#395 + def await_response_state(channel); end + + # The action invoked when the state machine is in the "finish" state. + # It just tells the server not to expect any more data from this end + # of the pipe, and allows the pipe to drain until the server closes it. + # + # source://net-scp//lib/net/scp.rb#406 + def finish_state(channel); end + + # Invoked to report progress back to the client. If a callback was not + # set, this does nothing. + # + # source://net-scp//lib/net/scp.rb#412 + def progress_callback(channel, name, sent, total); end + + # Constructs the scp command line needed to initiate and SCP session + # for the given +mode+ (:upload or :download) and with the given options + # (:verbose, :recursive, :preserve). Returns the command-line as a + # string, ready to execute. + # + # source://net-scp//lib/net/scp.rb#331 + def scp_command(mode, options); end + + # Imported from ruby 1.9.2 shellwords.rb + # + # source://net-scp//lib/net/scp.rb#417 + def shellescape(path); end + + # Opens a new SSH channel and executes the necessary SCP command over + # it (see #scp_command). It then sets up the necessary callbacks, and + # sets up a state machine to use to process the upload or download. + # (See Net::SCP::Upload and Net::SCP::Download). + # + # source://net-scp//lib/net/scp.rb#344 + def start_command(mode, local, remote, options = T.unsafe(nil), &callback); end + + class << self + # Starts up a new SSH connection using the +host+ and +username+ parameters, + # instantiates a new SCP session on top of it, and then begins a + # download from +remote+ to +local+. If the +options+ hash includes an + # :ssh key, the value for that will be passed to the SSH connection as + # options (e.g., to set the password, etc.). All other options are passed + # to the #download! method. If a block is given, it will be used to report + # progress (see "Progress Reporting", under Net::SCP). + # + # source://net-scp//lib/net/scp.rb#238 + def download!(host, username, remote, local = T.unsafe(nil), options = T.unsafe(nil), &progress); end + + # Starts up a new SSH connection and instantiates a new SCP session on + # top of it. If a block is given, the SCP session is yielded, and the + # SSH session is closed automatically when the block terminates. If no + # block is given, the SCP session is returned. + # + # source://net-scp//lib/net/scp.rb#201 + def start(host, username, options = T.unsafe(nil)); end + + # Starts up a new SSH connection using the +host+ and +username+ parameters, + # instantiates a new SCP session on top of it, and then begins an + # upload from +local+ to +remote+. If the +options+ hash includes an + # :ssh key, the value for that will be passed to the SSH connection as + # options (e.g., to set the password, etc.). All other options are passed + # to the #upload! method. If a block is given, it will be used to report + # progress (see "Progress Reporting", under Net::SCP). + # + # source://net-scp//lib/net/scp.rb#224 + def upload!(host, username, local, remote, options = T.unsafe(nil), &progress); end + end +end + +# This module implements the state machine for downloading information from +# a remote server. It exposes no public methods. See Net::SCP#download for +# a discussion of how to use Net::SCP to download data. +# +# source://net-scp//lib/net/scp/download.rb#8 +module Net::SCP::Download + private + + # This is the starting state for the download state machine. The + # #start_command method puts the state machine into this state the first + # time the channel is processed. This state does some basic error checking + # and scaffolding and then sends a 0-byte to the remote server, indicating + # readiness to proceed. Then, the state machine is placed into the + # "read directive" state (see #read_directive_state). + # + # source://net-scp//lib/net/scp/download.rb#17 + def download_start_state(channel); end + + # Finishes off the read, sets the times for the file (if any), and then + # jumps to either #finish_state (for single-file downloads) or + # #read_directive_state (for recursive downloads). A 0-byte is sent to the + # server to indicate that the file was recieved successfully. + # + # source://net-scp//lib/net/scp/download.rb#77 + def finish_read_state(channel); end + + # Parses the given +text+ to extract which SCP directive it contains. It + # then returns a hash with at least one key, :type, which describes what + # type of directive it is. The hash may also contain other, directive-specific + # data. + # + # source://net-scp//lib/net/scp/download.rb#94 + def parse_directive(text); end + + # Reads data from the channel for as long as there is data remaining to + # be read. As soon as there is no more data to read for the current file, + # the state machine switches to #finish_read_state. + # + # source://net-scp//lib/net/scp/download.rb#64 + def read_data_state(channel); end + + # This state parses the next full line (up to a new-line) for the next + # directive. (See the SCP protocol documentation in Net::SCP for the + # possible directives). + # + # source://net-scp//lib/net/scp/download.rb#34 + def read_directive_state(channel); end + + # Sets the new directory as the current directory, creates the directory + # if it does not exist, and then falls back into #read_directive_state. + # + # source://net-scp//lib/net/scp/download.rb#124 + def read_directory(channel, directive); end + + # Opens the given file locally, and switches to #read_data_state to do the + # actual read. + # + # source://net-scp//lib/net/scp/download.rb#147 + def read_file(channel, directive); end +end + +# source://net-scp//lib/net/scp/errors.rb#3 +class Net::SCP::Error < ::RuntimeError; end + +# This module implements the state machine for uploading information to +# a remote server. It exposes no public methods. See Net::SCP#upload for +# a discussion of how to use Net::SCP to upload data. +# +# source://net-scp//lib/net/scp/upload.rb#8 +module Net::SCP::Upload + private + + # Checks the work queue to see what needs to be done next. If there is + # nothing to do, calls Net::SCP#finish_state. If we're at the end of a + # directory, sends an 'E' directive and waits for the server to respond + # before moving to #next_item_state. Otherwise, sets the next thing to + # upload and moves to #upload_current_state. + # + # source://net-scp//lib/net/scp/upload.rb#92 + def next_item_state(channel); end + + # If the :preserve option is set, send a 'T' directive and wait for the + # server to respond before proceeding to either #upload_file_state or + # #upload_directory_state, depending on what is being uploaded. + # + # source://net-scp//lib/net/scp/upload.rb#126 + def preserve_attributes_if_requested(channel); end + + # If any data remains to be transferred from the current file, sends it. + # Otherwise, sends a 0-byte and transfers to #next_item_state. + # + # source://net-scp//lib/net/scp/upload.rb#74 + def send_data_state(channel); end + + # Sets the given +path+ as the new current item to upload. + # + # source://net-scp//lib/net/scp/upload.rb#110 + def set_current(channel, path); end + + # Determines what the next thing to upload is, and branches. If the next + # item is a file, goes to #upload_file_state. If it is a directory, goes + # to #upload_directory_state. + # + # source://net-scp//lib/net/scp/upload.rb#31 + def upload_current_state(channel); end + + # After transferring attributes (if requested), sends a 'D' directive and + # awaites the server's 0-byte response. Then goes to #next_item_state. + # + # source://net-scp//lib/net/scp/upload.rb#46 + def upload_directory_state(channel); end + + # After transferring attributes (if requested), sends a 'C' directive and + # awaits the server's 0-byte response. Then goes to #send_data_state. + # + # source://net-scp//lib/net/scp/upload.rb#59 + def upload_file_state(channel); end + + # The start state for uploads. Simply sets up the upload scaffolding, + # sets the current item to upload, and jumps to #upload_current_state. + # + # source://net-scp//lib/net/scp/upload.rb#17 + def upload_start_state(channel); end +end + +# The default read chunk size, if an explicit chunk-size is not specified +# by the client. +# +# source://net-scp//lib/net/scp/upload.rb#13 +Net::SCP::Upload::DEFAULT_CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +module Net::SSH::Connection; end + +# source://net-scp//lib/net/scp.rb#442 +class Net::SSH::Connection::Session + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#68 + def initialize(transport, options = T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#94 + def [](key); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#99 + def []=(key, value); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#152 + def busy?(include_invisible = T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#51 + def channel_open_handlers; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#44 + def channels; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#522 + def cleanup_channel(channel); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#121 + def close; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#114 + def closed?; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#255 + def ev_do_calculate_rw_wait(wait); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#270 + def ev_do_handle_events(readers, writers); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#289 + def ev_do_postprocess(was_events); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#248 + def ev_preprocess(&block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#379 + def exec(command, status: T.unsafe(nil), &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#420 + def exec!(command, status: T.unsafe(nil), &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#493 + def forward; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#105 + def host; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#481 + def listen_to(io, &callback); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#47 + def listeners; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#177 + def loop(wait = T.unsafe(nil), &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#532 + def max_select_wait_time; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#517 + def on_global_request(type, &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#507 + def on_open_channel(type, &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#338 + def open_channel(type = T.unsafe(nil), *extra, &on_confirm); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#38 + def options; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#54 + def pending_requests; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#262 + def postprocess(readers, writers); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#237 + def preprocess(&block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#225 + def process(wait = T.unsafe(nil), &block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#41 + def properties; end + + # Provides a convenient way to initialize a SCP session given a Net::SSH + # session. Returns the Net::SCP instance, ready to use. + # + # source://net-scp//lib/net/scp.rb#445 + def scp; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#311 + def send_global_request(type, *extra, &callback); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#443 + def send_message(message); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#136 + def shutdown!; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#487 + def stop_listening_to(io); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#35 + def transport; end + + private + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#682 + def channel_close(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#568 + def channel_closed(channel); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#667 + def channel_data(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#677 + def channel_eof(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#672 + def channel_extended_data(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#694 + def channel_failure(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#612 + def channel_open(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#645 + def channel_open_confirmation(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#651 + def channel_open_failure(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#662 + def channel_request(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#689 + def channel_success(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#657 + def channel_window_adjust(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#545 + def dispatch_incoming_packets(raise_disconnect_errors: T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#539 + def each_channel(&block); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#562 + def force_channel_cleanup_on_close; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#558 + def get_next_channel_id; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#579 + def global_request(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#699 + def io_select_wait(wait); end + + def loop_forever; end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#602 + def request_failure(packet); end + + # source://net-ssh/7.2.3/lib/net/ssh/connection/session.rb#595 + def request_success(packet); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-sftp@4.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-sftp@4.0.0.rbi new file mode 100644 index 0000000..deaafe8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-sftp@4.0.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-sftp` gem. +# Please instead update this file by running `bin/tapioca gem net-sftp`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-smtp@0.5.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-smtp@0.5.0.rbi new file mode 100644 index 0000000..94d8eab --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-smtp@0.5.0.rbi @@ -0,0 +1,1228 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-smtp` gem. +# Please instead update this file by running `bin/tapioca gem net-smtp`. + + +# == What is This Library? +# +# This library provides functionality to send internet +# mail via \SMTP, the Simple Mail Transfer Protocol. For details of +# \SMTP itself, see [RFC5321[https://www.rfc-editor.org/rfc/rfc5321.txt]]. +# This library also implements \SMTP authentication, which is often +# necessary for message composers to submit messages to their +# outgoing \SMTP server, see +# [RFC6409[https://www.rfc-editor.org/rfc/rfc6409.html]], +# and [SMTPUTF8[https://www.rfc-editor.org/rfc/rfc6531.txt]], which is +# necessary to send messages to/from addresses containing characters +# outside the ASCII range. +# +# == What is This Library NOT? +# +# This library does NOT provide functions to compose internet mails. +# You must create them by yourself. If you want better mail support, +# try the mail[https://rubygems.org/gems/mail] or +# rmail[https://rubygems.org/gems/rmail] gems, or search for alternatives in +# {RubyGems.org}[https://rubygems.org/] or {The Ruby +# Toolbox}[https://www.ruby-toolbox.com/]. +# +# FYI: the official specification on internet mail is: +# [RFC5322[https://www.rfc-editor.org/rfc/rfc5322.txt]]. +# +# == Examples +# +# === Sending Messages +# +# You must open a connection to an \SMTP server before sending messages. +# The first argument is the address of your \SMTP server, and the second +# argument is the port number. Using SMTP.start with a block is the simplest +# way to do this. This way, the SMTP connection is closed automatically +# after the block is executed. +# +# require 'net/smtp' +# Net::SMTP.start('your.smtp.server', 25) do |smtp| +# # Use the SMTP object smtp only in this block. +# end +# +# Replace 'your.smtp.server' with your \SMTP server. Normally +# your system manager or internet provider supplies a server +# for you. +# +# Then you can send messages. +# +# msgstr = < +# To: Destination Address +# Subject: test message +# Date: Sat, 23 Jun 2001 16:26:43 +0900 +# Message-Id: +# +# This is a test message. +# END_OF_MESSAGE +# +# require 'net/smtp' +# Net::SMTP.start('your.smtp.server', 25) do |smtp| +# smtp.send_message msgstr, +# 'your@mail.address', +# 'his_address@example.com' +# end +# +# === Closing the Session +# +# You MUST close the SMTP session after sending messages, by calling +# the #finish method: +# +# # using SMTP#finish +# smtp = Net::SMTP.start('your.smtp.server', 25) +# smtp.send_message msgstr, 'from@address', 'to@address' +# smtp.finish +# +# You can also use the block form of SMTP.start or SMTP#start. This closes +# the SMTP session automatically: +# +# # using block form of SMTP.start +# Net::SMTP.start('your.smtp.server', 25) do |smtp| +# smtp.send_message msgstr, 'from@address', 'to@address' +# end +# +# I strongly recommend this scheme. This form is simpler and more robust. +# +# === HELO domain +# +# In almost all situations, you must provide a third argument +# to SMTP.start or SMTP#start. This is the domain name which you are on +# (the host to send mail from). It is called the "HELO domain". +# The \SMTP server will judge whether it should send or reject +# the SMTP session by inspecting the HELO domain. +# +# Net::SMTP.start('your.smtp.server', 25, helo: 'mail.from.domain') do |smtp| +# smtp.send_message msgstr, 'from@address', 'to@address' +# end +# +# === \SMTP Authentication +# +# The Net::SMTP class supports the \SMTP extension for SASL Authentication +# [RFC4954[https://www.rfc-editor.org/rfc/rfc4954.html]] and the following +# SASL mechanisms: +PLAIN+, +LOGIN+ _(deprecated)_, and +CRAM-MD5+ +# _(deprecated)_. +# +# To use \SMTP authentication, pass extra arguments to +# SMTP.start or SMTP#start. +# +# # PLAIN +# Net::SMTP.start('your.smtp.server', 25, +# user: 'Your Account', secret: 'Your Password', authtype: :plain) +# +# Support for other SASL mechanisms-such as +EXTERNAL+, +OAUTHBEARER+, +# +SCRAM-SHA-256+, and +XOAUTH2+-will be added in a future release. +# +# The +LOGIN+ and +CRAM-MD5+ mechanisms are still available for backwards +# compatibility, but are deprecated and should be avoided. +# +# source://net-smtp//lib/net/smtp.rb#194 +class Net::SMTP < ::Net::Protocol + # Creates a new Net::SMTP object. + # + # +address+ is the hostname or ip address of your SMTP + # server. +port+ is the port to connect to; it defaults to + # port 25. + # + # If +tls+ is true, enable TLS. The default is false. + # If +starttls+ is :always, enable STARTTLS, if +:auto+, use STARTTLS when the server supports it, + # if false, disable STARTTLS. + # + # If +tls_verify+ is true, verify the server's certificate. The default is true. + # If the hostname in the server certificate is different from +address+, + # it can be specified with +tls_hostname+. + # + # Additional SSLContext[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html] + # params can be added to the +ssl_context_params+ hash argument and are + # passed to {OpenSSL::SSL::SSLContext#set_params}[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html#method-i-set_params]. + # + # tls_verify: true is equivalent to ssl_context_params: { + # verify_mode: OpenSSL::SSL::VERIFY_PEER }. + # + # This method does not open the TCP connection. You can use + # SMTP.start instead of SMTP.new if you want to do everything + # at once. Otherwise, follow SMTP.new with SMTP#start. + # + # @return [SMTP] a new instance of SMTP + # + # source://net-smtp//lib/net/smtp.rb#248 + def initialize(address, port = T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil)); end + + # The address of the SMTP server to connect to. + # + # source://net-smtp//lib/net/smtp.rb#414 + def address; end + + # Returns whether the server advertises support for the authentication type. + # You cannot get valid result before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#329 + def auth_capable?(type); end + + # Authenticates with the server, using the "AUTH" command. + # + # +authtype+ is the name of a SASL authentication mechanism. + # + # All arguments-other than +authtype+-are forwarded to the authenticator. + # Different authenticators may interpret the +user+ and +secret+ + # arguments differently. + # + # source://net-smtp//lib/net/smtp.rb#872 + def authenticate(user, secret, authtype = T.unsafe(nil)); end + + # The server capabilities by EHLO response + # + # source://net-smtp//lib/net/smtp.rb#307 + def capabilities; end + + # true if the EHLO response contains +key+. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#301 + def capable?(key); end + + # Returns supported authentication methods on this server. + # You cannot get valid value before opening SMTP session. + # + # source://net-smtp//lib/net/smtp.rb#337 + def capable_auth_types; end + + # true if server advertises AUTH CRAM-MD5. + # You cannot get valid value before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#323 + def capable_cram_md5_auth?; end + + # true if server advertises AUTH LOGIN. + # You cannot get valid value before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#317 + def capable_login_auth?; end + + # true if server advertises AUTH PLAIN. + # You cannot get valid value before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#311 + def capable_plain_auth?; end + + # true if server advertises STARTTLS. + # You cannot get valid value before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#296 + def capable_starttls?; end + + # This method sends a message. + # If +msgstr+ is given, sends it as a message. + # If block is given, yield a message writer stream. + # You must write message before the block is closed. + # + # # Example 1 (by string) + # smtp.data(<tls_verify: true is equivalent to ssl_context_params: { + # verify_mode: OpenSSL::SSL::VERIFY_PEER }. + # + # The remaining arguments are used for \SMTP authentication, if required or + # desired. + # + # +authtype+ is the SASL authentication mechanism. + # + # +user+ is the authentication or authorization identity. + # + # +secret+ or +password+ is your password or other authentication token. + # + # These will be sent to #authenticate as positional arguments-the exact + # semantics are dependent on the +authtype+. + # + # See the discussion of Net::SMTP@SMTP+Authentication in the overview notes. + # + # === Errors + # + # This method may raise: + # + # * Net::SMTPAuthenticationError + # * Net::SMTPServerBusy + # * Net::SMTPSyntaxError + # * Net::SMTPFatalError + # * Net::SMTPUnknownError + # * Net::OpenTimeout + # * Net::ReadTimeout + # * IOError + # + # @raise [ArgumentError] + # + # source://net-smtp//lib/net/smtp.rb#539 + def start(address, port = T.unsafe(nil), *args, helo: T.unsafe(nil), user: T.unsafe(nil), secret: T.unsafe(nil), password: T.unsafe(nil), authtype: T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil), &block); end + end +end + +# Address with parametres for MAIL or RCPT command +# +# source://net-smtp//lib/net/smtp.rb#1130 +class Net::SMTP::Address + # :call-seq: + # initialize(address, parameter, ...) + # + # address +String+ or +Net::SMTP::Address+ + # parameter +String+ or +Hash+ + # + # @return [Address] a new instance of Address + # + # source://net-smtp//lib/net/smtp.rb#1141 + def initialize(address, *args, **kw_args); end + + # mail address [String] + # + # source://net-smtp//lib/net/smtp.rb#1132 + def address; end + + # parameters [Array] + # + # source://net-smtp//lib/net/smtp.rb#1134 + def parameters; end + + # source://net-smtp//lib/net/smtp.rb#1152 + def to_s; end +end + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#9 +class Net::SMTP::AuthCramMD5 < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#12 + def auth(user, secret); end + + # CRAM-MD5: [RFC2195] + # + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#22 + def cram_md5_response(secret, challenge); end + + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#29 + def cram_secret(secret, mask); end + + # source://net-smtp//lib/net/smtp/auth_cram_md5.rb#38 + def digest_class; end +end + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#27 +Net::SMTP::AuthCramMD5::CRAM_BUFSIZE = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#18 +Net::SMTP::AuthCramMD5::IMASK = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_cram_md5.rb#19 +Net::SMTP::AuthCramMD5::OMASK = T.let(T.unsafe(nil), Integer) + +# source://net-smtp//lib/net/smtp/auth_login.rb#2 +class Net::SMTP::AuthLogin < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_login.rb#5 + def auth(user, secret); end +end + +# source://net-smtp//lib/net/smtp/auth_plain.rb#2 +class Net::SMTP::AuthPlain < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_plain.rb#5 + def auth(user, secret); end +end + +# source://net-smtp//lib/net/smtp/auth_xoauth2.rb#2 +class Net::SMTP::AuthXoauth2 < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_xoauth2.rb#5 + def auth(user, secret); end + + private + + # source://net-smtp//lib/net/smtp/auth_xoauth2.rb#13 + def xoauth2_string(user, secret); end +end + +# source://net-smtp//lib/net/smtp/authenticator.rb#3 +class Net::SMTP::Authenticator + # @return [Authenticator] a new instance of Authenticator + # + # source://net-smtp//lib/net/smtp/authenticator.rb#29 + def initialize(smtp); end + + # @param str [String] + # @return [String] Base64 encoded string + # + # source://net-smtp//lib/net/smtp/authenticator.rb#51 + def base64_encode(str); end + + # @param arg [String] message to server + # @raise [res.exception_class] + # @return [String] message from server + # + # source://net-smtp//lib/net/smtp/authenticator.rb#35 + def continue(arg); end + + # @param arg [String] message to server + # @raise [SMTPAuthenticationError] + # @return [Net::SMTP::Response] response from server + # + # source://net-smtp//lib/net/smtp/authenticator.rb#43 + def finish(arg); end + + # Returns the value of attribute smtp. + # + # source://net-smtp//lib/net/smtp/authenticator.rb#27 + def smtp; end + + class << self + # source://net-smtp//lib/net/smtp/authenticator.rb#13 + def auth_class(type); end + + # source://net-smtp//lib/net/smtp/authenticator.rb#4 + def auth_classes; end + + # source://net-smtp//lib/net/smtp/authenticator.rb#8 + def auth_type(type); end + + # source://net-smtp//lib/net/smtp/authenticator.rb#18 + def check_args(user_arg = T.unsafe(nil), secret_arg = T.unsafe(nil), *_arg2, **_arg3); end + end +end + +# This class represents a response received by the SMTP server. Instances +# of this class are created by the SMTP class; they should not be directly +# created by the user. For more information on SMTP responses, view +# {Section 4.2 of RFC 5321}[http://tools.ietf.org/html/rfc5321#section-4.2] +# +# source://net-smtp//lib/net/smtp.rb#1050 +class Net::SMTP::Response + # Creates a new instance of the Response class and sets the status and + # string attributes + # + # @return [Response] a new instance of Response + # + # source://net-smtp//lib/net/smtp.rb#1059 + def initialize(status, string); end + + # Returns a hash of the human readable reply text in the response if it + # is multiple lines. It does not return the first line. The key of the + # hash is the first word the value of the hash is an array with each word + # thereafter being a value in the array + # + # source://net-smtp//lib/net/smtp.rb#1102 + def capabilities; end + + # Determines whether the response received was a Positive Intermediate + # reply (3xx reply code) + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#1083 + def continue?; end + + # Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5 + # on Wikipedia: https://en.wikipedia.org/wiki/CRAM-MD5 + # + # source://net-smtp//lib/net/smtp.rb#1094 + def cram_md5_challenge; end + + # Determines whether there was an error and raises the appropriate error + # based on the reply code of the response + # + # source://net-smtp//lib/net/smtp.rb#1114 + def exception_class; end + + # The first line of the human readable reply text + # + # source://net-smtp//lib/net/smtp.rb#1088 + def message; end + + # The three digit reply code of the SMTP response + # + # source://net-smtp//lib/net/smtp.rb#1065 + def status; end + + # Takes the first digit of the reply code to determine the status type + # + # source://net-smtp//lib/net/smtp.rb#1071 + def status_type_char; end + + # The human readable reply text of the SMTP response + # + # source://net-smtp//lib/net/smtp.rb#1068 + def string; end + + # Determines whether the response received was a Positive Completion + # reply (2xx reply code) + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#1077 + def success?; end + + class << self + # Parses the received response and separates the reply code and the human + # readable reply text + # + # source://net-smtp//lib/net/smtp.rb#1053 + def parse(str); end + end +end + +# source://net-smtp//lib/net/smtp.rb#195 +Net::SMTP::VERSION = T.let(T.unsafe(nil), String) + +# source://net-smtp//lib/net/smtp.rb#49 +class Net::SMTPAuthenticationError < ::Net::ProtoAuthError + include ::Net::SMTPError +end + +# Module mixed in to all SMTP error classes +# +# source://net-smtp//lib/net/smtp.rb#27 +module Net::SMTPError + # source://net-smtp//lib/net/smtp.rb#33 + def initialize(response, message: T.unsafe(nil)); end + + # source://net-smtp//lib/net/smtp.rb#43 + def message; end + + # This *class* is a module for backward compatibility. + # In later release, this module becomes a class. + # + # source://net-smtp//lib/net/smtp.rb#31 + def response; end +end + +# source://net-smtp//lib/net/smtp.rb#64 +class Net::SMTPFatalError < ::Net::ProtoFatalError + include ::Net::SMTPError +end + +# source://net-smtp//lib/net/smtp.rb#54 +class Net::SMTPServerBusy < ::Net::ProtoServerError + include ::Net::SMTPError +end + +# class SMTP +# +# source://net-smtp//lib/net/smtp.rb#1158 +Net::SMTPSession = Net::SMTP + +# source://net-smtp//lib/net/smtp.rb#59 +class Net::SMTPSyntaxError < ::Net::ProtoSyntaxError + include ::Net::SMTPError +end + +# source://net-smtp//lib/net/smtp.rb#69 +class Net::SMTPUnknownError < ::Net::ProtoUnknownError + include ::Net::SMTPError +end + +# source://net-smtp//lib/net/smtp.rb#74 +class Net::SMTPUnsupportedCommand < ::Net::ProtocolError + include ::Net::SMTPError +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/net-ssh@7.2.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-ssh@7.2.3.rbi new file mode 100644 index 0000000..f441d89 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/net-ssh@7.2.3.rbi @@ -0,0 +1,6403 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-ssh` gem. +# Please instead update this file by running `bin/tapioca gem net-ssh`. + + +# Net::SSH is a library for interacting, programmatically, with remote +# processes via the SSH2 protocol. Sessions are always initiated via +# Net::SSH.start. From there, a program interacts with the new SSH session +# via the convenience methods on Net::SSH::Connection::Session, by opening +# and interacting with new channels (Net::SSH::Connection:Session#open_channel +# and Net::SSH::Connection::Channel), or by forwarding local and/or +# remote ports through the connection (Net::SSH::Service::Forward). +# +# The SSH protocol is very event-oriented. Requests are sent from the client +# to the server, and are answered asynchronously. This gives great flexibility +# (since clients can have multiple requests pending at a time), but it also +# adds complexity. Net::SSH tries to manage this complexity by providing +# some simpler methods of synchronous communication (see Net::SSH::Connection::Session#exec!). +# +# In general, though, and if you want to do anything more complicated than +# simply executing commands and capturing their output, you'll need to use +# channels (Net::SSH::Connection::Channel) to build state machines that are +# executed while the event loop runs (Net::SSH::Connection::Session#loop). +# +# Net::SSH::Connection::Session and Net::SSH::Connection::Channel have more +# information about this technique. +# +# = "Um, all I want to do is X, just show me how!" +# +# == X == "execute a command and capture the output" +# +# Net::SSH.start("host", "user", password: "password") do |ssh| +# result = ssh.exec!("ls -l") +# puts result +# end +# +# == X == "forward connections on a local port to a remote host" +# +# Net::SSH.start("host", "user", password: "password") do |ssh| +# ssh.forward.local(1234, "www.google.com", 80) +# ssh.loop { true } +# end +# +# == X == "forward connections on a remote port to the local host" +# +# Net::SSH.start("host", "user", password: "password") do |ssh| +# ssh.forward.remote(80, "www.google.com", 1234) +# ssh.loop { true } +# end +# +# source://net-ssh//lib/net/ssh/errors.rb#2 +module Net::SSH + class << self + # source://net-ssh//lib/net/ssh.rb#298 + def assign_defaults(options); end + + # Returns a hash of the configuration options for the given host, as read + # from the SSH configuration file(s). If +use_ssh_config+ is true (the + # default), this will load configuration from both ~/.ssh/config and + # /etc/ssh_config. If +use_ssh_config+ is nil or false, nothing will be + # loaded (and an empty hash returned). Otherwise, +use_ssh_config+ may + # be a file name (or array of file names) of SSH configuration file(s) + # to read. + # + # See Net::SSH::Config for the full description of all supported options. + # + # source://net-ssh//lib/net/ssh.rb#288 + def configuration_for(host, use_ssh_config); end + + # The standard means of starting a new SSH connection. When used with a + # block, the connection will be closed when the block terminates, otherwise + # the connection will just be returned. The yielded (or returned) value + # will be an instance of Net::SSH::Connection::Session (q.v.). (See also + # Net::SSH::Connection::Channel and Net::SSH::Service::Forward.) + # + # Net::SSH.start("host", "user") do |ssh| + # ssh.exec! "cp /some/file /another/location" + # hostname = ssh.exec!("hostname") + # + # ssh.open_channel do |ch| + # ch.exec "sudo -p 'sudo password: ' ls" do |ch, success| + # abort "could not execute sudo ls" unless success + # + # ch.on_data do |ch, data| + # print data + # if data =~ /sudo password: / + # ch.send_data("password\n") + # end + # end + # end + # end + # + # ssh.loop + # end + # + # This method accepts the following options (all are optional): + # + # * :auth_methods => an array of authentication methods to try + # * :bind_address => the IP address on the connecting machine to use in + # establishing connection. (:bind_address is discarded if :proxy + # is set.) + # * :check_host_ip => Also ckeck IP address when connecting to remote host. + # Defaults to +true+. + # * :compression => the compression algorithm to use, or +true+ to use + # whatever is supported. + # * :compression_level => the compression level to use when sending data + # * :config => set to +true+ to load the default OpenSSH config files + # (~/.ssh/config, /etc/ssh_config), or to +false+ to not load them, or to + # a file-name (or array of file-names) to load those specific configuration + # files. Defaults to +true+. + # * :encryption => the encryption cipher (or ciphers) to use + # * :forward_agent => set to true if you want the SSH agent connection to + # be forwarded + # * :known_hosts => a custom object holding known hosts records. + # It must implement #search_for and `add` in a similiar manner as KnownHosts. + # * :global_known_hosts_file => the location of the global known hosts + # file. Set to an array if you want to specify multiple global known + # hosts files. Defaults to %w(/etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2). + # * :hmac => the hmac algorithm (or algorithms) to use + # * :host_key => the host key algorithm (or algorithms) to use + # * :host_key_alias => the host name to use when looking up or adding a + # host to a known_hosts dictionary file + # * :host_name => the real host name or IP to log into. This is used + # instead of the +host+ parameter, and is primarily only useful when + # specified in an SSH configuration file. It lets you specify an + # "alias", similarly to adding an entry in /etc/hosts but without needing + # to modify /etc/hosts. + # * :keepalive => set to +true+ to send a keepalive packet to the SSH server + # when there's no traffic between the SSH server and Net::SSH client for + # the keepalive_interval seconds. Defaults to +false+. + # * :keepalive_interval => the interval seconds for keepalive. + # Defaults to +300+ seconds. + # * :keepalive_maxcount => the maximun number of keepalive packet miss allowed. + # Defaults to 3 + # * :kex => the key exchange algorithm (or algorithms) to use + # * :keys => an array of file names of private keys to use for publickey + # and hostbased authentication + # * :keycerts => an array of file names of key certificates to use + # with publickey authentication + # * :keycert_data => an array of strings, which each element of the array + # being a key certificate to use with publickey authentication + # * :key_data => an array of strings, with each element of the array being + # a raw private key in PEM format. + # * :keys_only => set to +true+ to use only private keys from +keys+ and + # +key_data+ parameters, even if ssh-agent offers more identities. This + # option is intended for situations where ssh-agent offers many different + # identites. + # * :logger => the logger instance to use when logging + # * :max_pkt_size => maximum size we tell the other side that is supported per + # packet. Default is 0x8000 (32768 bytes). Increase to 0x10000 (65536 bytes) + # for better performance if your SSH server supports it (most do). + # * :max_win_size => maximum size we tell the other side that is supported for + # the window. + # * :non_interactive => set to true if your app is non interactive and prefers + # authentication failure vs password prompt. Non-interactive applications + # should set it to true to prefer failing a password/etc auth methods vs. + # asking for password. + # * :paranoid => deprecated alias for :verify_host_key + # * :passphrase => the passphrase to use when loading a private key (default + # is +nil+, for no passphrase) + # * :password => the password to use to login + # * :port => the port to use when connecting to the remote host + # * :properties => a hash of key/value pairs to add to the new connection's + # properties (see Net::SSH::Connection::Session#properties) + # * :proxy => a proxy instance (see Proxy) to use when connecting + # * :pubkey_algorithms => the public key authentication algorithms to use for + # this connection. Valid values are 'rsa-sha2-256-cert-v01@openssh.com', + # 'ssh-rsa-cert-v01@openssh.com', 'rsa-sha2-256', 'ssh-rsa'. Currently, this + # option is only used for RSA public key authentication and ignored for other + # types. + # * :rekey_blocks_limit => the max number of blocks to process before rekeying + # * :rekey_limit => the max number of bytes to process before rekeying + # * :rekey_packet_limit => the max number of packets to process before rekeying + # * :send_env => an array of local environment variable names to export to the + # remote environment. Names may be given as String or Regexp. + # * :set_env => a hash of environment variable names and values to set to the + # remote environment. Override the ones if specified in +send_env+. + # * :timeout => how long to wait for the initial connection to be made + # * :user => the user name to log in as; this overrides the +user+ + # parameter, and is primarily only useful when provided via an SSH + # configuration file. + # * :remote_user => used for substitution into the '%r' part of a ProxyCommand + # * :user_known_hosts_file => the location of the user known hosts file. + # Set to an array to specify multiple user known hosts files. + # Defaults to %w(~/.ssh/known_hosts ~/.ssh/known_hosts2). + # * :use_agent => Set false to disable the use of ssh-agent. Defaults to + # true + # * :identity_agent => the path to the ssh-agent's UNIX socket + # * :verbose => how verbose to be (Logger verbosity constants, Logger::DEBUG + # is very verbose, Logger::FATAL is all but silent). Logger::FATAL is the + # default. The symbols :debug, :info, :warn, :error, and :fatal are also + # supported and are translated to the corresponding Logger constant. + # * :append_all_supported_algorithms => set to +true+ to append all supported + # algorithms by net-ssh. Was the default behaviour until 2.10 + # * :number_of_password_prompts => Number of prompts for the password + # authentication method defaults to 3 set to 0 to disable prompt for + # password auth method + # * :password_prompt => a custom prompt object with ask method. See Net::SSH::Prompt + # + # * :agent_socket_factory => enables the user to pass a lambda/block that will serve as the socket factory + # Net::SSH.start(host,user,agent_socket_factory: ->{ UNIXSocket.open('/foo/bar') }) + # example: ->{ UNIXSocket.open('/foo/bar')} + # * :verify_host_key => specify how strict host-key verification should be. + # In order of increasing strictness: + # * :never (very insecure) ::Net::SSH::Verifiers::Never + # * :accept_new_or_local_tunnel (insecure) ::Net::SSH::Verifiers::AcceptNewOrLocalTunnel + # * :accept_new (insecure) ::Net::SSH::Verifiers::AcceptNew + # * :always (secure) ::Net::SSH::Verifiers::Always + # You can also provide an own Object which responds to +verify+. The argument + # given to +verify+ is a hash consisting of the +:key+, the +:key_blob+, + # the +:fingerprint+ and the +:session+. Returning true accepts the host key, + # returning false declines it and closes the connection. + # * :fingerprint_hash => 'MD5' or 'SHA256', defaults to 'SHA256' + # If +user+ parameter is nil it defaults to USER from ssh_config, or + # local username + # + # source://net-ssh//lib/net/ssh.rb#225 + def start(host, user = T.unsafe(nil), options = T.unsafe(nil), &block); end + + private + + # source://net-ssh//lib/net/ssh.rb#311 + def _sanitize_options(options); end + + # source://net-ssh//lib/net/ssh.rb#320 + def _support_deprecated_option_paranoid(options); end + end +end + +# source://net-ssh//lib/net/ssh/authentication/pub_key_fingerprint.rb#5 +module Net::SSH::Authentication; end + +# This class implements a simple client for the ssh-agent protocol. It +# does not implement any specific protocol, but instead copies the +# behavior of the ssh-agent functions in the OpenSSH library (3.8). +# +# This means that although it behaves like a SSH1 client, it also has +# some SSH2 functionality (like signing data). +# +# source://net-ssh//lib/net/ssh/authentication/agent.rb#26 +class Net::SSH::Authentication::Agent + include ::Net::SSH::Loggable + + # Creates a new Agent object, using the optional logger instance to + # report status. + # + # @return [Agent] a new instance of Agent + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#77 + def initialize(logger = T.unsafe(nil)); end + + # Adds the private key with comment to the agent. + # If lifetime is given, the key will automatically be removed after lifetime + # seconds. + # If confirm is true, confirmation will be required for each agent signing + # operation. + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#170 + def add_identity(priv_key, comment, lifetime: T.unsafe(nil), confirm: T.unsafe(nil)); end + + # Closes this socket. This agent reference is no longer able to + # query the agent. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#150 + def close; end + + # Connect to the agent process using the socket factory and socket name + # given by the attribute writers. If the agent on the other end of the + # socket reports that it is an SSH2-compatible agent, this will fail + # (it only supports the ssh-agent distributed by OpenSSH). + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#85 + def connect!(agent_socket_factory = T.unsafe(nil), identity_agent = T.unsafe(nil)); end + + # Return an array of all identities (public keys) known to the agent. + # Each key returned is augmented with a +comment+ property which is set + # to the comment returned by the agent for that key. + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#122 + def identities; end + + # lock the ssh agent with password + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#197 + def lock(password); end + + # Attempts to negotiate the SSH agent protocol version. Raises an error + # if the version could not be negotiated successfully. + # + # @raise [AgentNotAvailable] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#106 + def negotiate!; end + + # Removes all identities from the agent. + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#191 + def remove_all_identities; end + + # Removes key from the agent. + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#185 + def remove_identity(key); end + + # Using the agent and the given public key, sign the given data. The + # signature is returned in SSH2 format. + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#156 + def sign(key, data, flags = T.unsafe(nil)); end + + # The underlying socket being used to communicate with the SSH agent. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#64 + def socket; end + + # unlock the ssh agent with password + # + # @raise [AgentError] + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#203 + def unlock(password); end + + private + + # Returns +true+ if the parameter indicates a "failure" response from + # the agent, and +false+ otherwise. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#242 + def agent_failed(type); end + + # source://net-ssh//lib/net/ssh/authentication/agent.rb#248 + def blob_for_add(priv_key); end + + # Read the next packet from the agent. This will return a two-part + # tuple consisting of the packet type, and the packet's body (which + # is returned as a Net::SSH::Buffer). + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#225 + def read_packet; end + + # Send the given packet and return the subsequent reply from the agent. + # (See #send_packet and #read_packet). + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#235 + def send_and_wait(type, *args); end + + # Send a new packet of the given type, with the associated data. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#215 + def send_packet(type, *args); end + + # source://net-ssh//lib/net/ssh/authentication/agent.rb#210 + def unix_socket_class; end + + class << self + # Instantiates a new agent object, connects to a running SSH agent, + # negotiates the agent protocol version, and returns the agent object. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#68 + def connect(logger = T.unsafe(nil), agent_socket_factory = T.unsafe(nil), identity_agent = T.unsafe(nil)); end + end +end + +# A simple module for extending keys, to allow comments to be specified +# for them. +# +# source://net-ssh//lib/net/ssh/authentication/agent.rb#31 +module Net::SSH::Authentication::Agent::Comment + # Returns the value of attribute comment. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#32 + def comment; end + + # Sets the attribute comment + # + # @param value the value to set the attribute comment to. + # + # source://net-ssh//lib/net/ssh/authentication/agent.rb#32 + def comment=(_arg0); end +end + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#40 +Net::SSH::Authentication::Agent::SSH2_AGENT_ADD_IDENTITY = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#45 +Net::SSH::Authentication::Agent::SSH2_AGENT_ADD_ID_CONSTRAINED = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#46 +Net::SSH::Authentication::Agent::SSH2_AGENT_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#37 +Net::SSH::Authentication::Agent::SSH2_AGENT_IDENTITIES_ANSWER = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#43 +Net::SSH::Authentication::Agent::SSH2_AGENT_LOCK = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#42 +Net::SSH::Authentication::Agent::SSH2_AGENT_REMOVE_ALL_IDENTITIES = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#41 +Net::SSH::Authentication::Agent::SSH2_AGENT_REMOVE_IDENTITY = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#36 +Net::SSH::Authentication::Agent::SSH2_AGENT_REQUEST_IDENTITIES = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#35 +Net::SSH::Authentication::Agent::SSH2_AGENT_REQUEST_VERSION = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#38 +Net::SSH::Authentication::Agent::SSH2_AGENT_SIGN_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#39 +Net::SSH::Authentication::Agent::SSH2_AGENT_SIGN_RESPONSE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#44 +Net::SSH::Authentication::Agent::SSH2_AGENT_UNLOCK = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#47 +Net::SSH::Authentication::Agent::SSH2_AGENT_VERSION_RESPONSE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#58 +Net::SSH::Authentication::Agent::SSH_AGENT_CONSTRAIN_CONFIRM = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#57 +Net::SSH::Authentication::Agent::SSH_AGENT_CONSTRAIN_LIFETIME = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#54 +Net::SSH::Authentication::Agent::SSH_AGENT_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#51 +Net::SSH::Authentication::Agent::SSH_AGENT_REQUEST_RSA_IDENTITIES = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#52 +Net::SSH::Authentication::Agent::SSH_AGENT_RSA_IDENTITIES_ANSWER1 = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#53 +Net::SSH::Authentication::Agent::SSH_AGENT_RSA_IDENTITIES_ANSWER2 = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#60 +Net::SSH::Authentication::Agent::SSH_AGENT_RSA_SHA2_256 = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#61 +Net::SSH::Authentication::Agent::SSH_AGENT_RSA_SHA2_512 = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#55 +Net::SSH::Authentication::Agent::SSH_AGENT_SUCCESS = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/agent.rb#49 +Net::SSH::Authentication::Agent::SSH_COM_AGENT2_FAILURE = T.let(T.unsafe(nil), Integer) + +# Class for representing agent-specific errors. +# +# source://net-ssh//lib/net/ssh/authentication/agent.rb#15 +class Net::SSH::Authentication::AgentError < ::Net::SSH::Exception; end + +# An exception for indicating that the SSH agent is not available. +# +# source://net-ssh//lib/net/ssh/authentication/agent.rb#18 +class Net::SSH::Authentication::AgentNotAvailable < ::Net::SSH::Authentication::AgentError; end + +# Class for representing an SSH certificate. +# +# http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/PROTOCOL.certkeys?rev=1.10&content-type=text/plain +# +# source://net-ssh//lib/net/ssh/authentication/certificate.rb#9 +class Net::SSH::Authentication::Certificate + # Returns the value of attribute critical_options. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#18 + def critical_options; end + + # Sets the attribute critical_options + # + # @param value the value to set the attribute critical_options to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#18 + def critical_options=(_arg0); end + + # Returns the value of attribute extensions. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#19 + def extensions; end + + # Sets the attribute extensions + # + # @param value the value to set the attribute extensions to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#19 + def extensions=(_arg0); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#81 + def fingerprint; end + + # Returns the value of attribute key. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#11 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#11 + def key=(_arg0); end + + # Returns the value of attribute key_id. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#14 + def key_id; end + + # Sets the attribute key_id + # + # @param value the value to set the attribute key_id to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#14 + def key_id=(_arg0); end + + # Returns the value of attribute nonce. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#10 + def nonce; end + + # Sets the attribute nonce + # + # @param value the value to set the attribute nonce to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#10 + def nonce=(_arg0); end + + # Returns the value of attribute reserved. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#20 + def reserved; end + + # Sets the attribute reserved + # + # @param value the value to set the attribute reserved to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#20 + def reserved=(_arg0); end + + # Returns the value of attribute serial. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#12 + def serial; end + + # Sets the attribute serial + # + # @param value the value to set the attribute serial to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#12 + def serial=(_arg0); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#97 + def sign(key, sign_nonce = T.unsafe(nil)); end + + # Signs the certificate with key. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#86 + def sign!(key, sign_nonce = T.unsafe(nil)); end + + # Returns the value of attribute signature. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#22 + def signature; end + + # Sets the attribute signature + # + # @param value the value to set the attribute signature to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#22 + def signature=(_arg0); end + + # Returns the value of attribute signature_key. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#21 + def signature_key; end + + # Sets the attribute signature_key + # + # @param value the value to set the attribute signature_key to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#21 + def signature_key=(_arg0); end + + # Checks whether the certificate's signature was signed by signature key. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#103 + def signature_valid?; end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#69 + def ssh_do_sign(data, sig_alg = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#73 + def ssh_do_verify(sig, data, options = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#57 + def ssh_signature_type; end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#53 + def ssh_type; end + + # Serializes the certificate (and key). + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#62 + def to_blob; end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#77 + def to_pem; end + + # Returns the value of attribute type. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#13 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#13 + def type=(_arg0); end + + # Returns the value of attribute valid_after. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#16 + def valid_after; end + + # Sets the attribute valid_after + # + # @param value the value to set the attribute valid_after to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#16 + def valid_after=(_arg0); end + + # Returns the value of attribute valid_before. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#17 + def valid_before; end + + # Sets the attribute valid_before + # + # @param value the value to set the attribute valid_before to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#17 + def valid_before=(_arg0); end + + # Returns the value of attribute valid_principals. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#15 + def valid_principals; end + + # Sets the attribute valid_principals + # + # @param value the value to set the attribute valid_principals to. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#15 + def valid_principals=(_arg0); end + + private + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#165 + def key_without_type; end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#172 + def options_to_blob(options); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#142 + def ssh_time(t); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#147 + def to_blob_without_signature; end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#135 + def type_value(type); end + + class << self + # Read a certificate blob associated with a key of the given type. + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#25 + def read_certblob(buffer, type); end + + private + + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#109 + def read_options(buffer); end + + # source://net-ssh//lib/net/ssh/authentication/certificate.rb#125 + def type_symbol(type); end + end +end + +# Describes the constants used by the Net::SSH::Authentication components +# of the Net::SSH library. Individual authentication method implemenations +# may define yet more constants that are specific to their implementation. +# +# source://net-ssh//lib/net/ssh/authentication/constants.rb#7 +module Net::SSH::Authentication::Constants; end + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#11 +Net::SSH::Authentication::Constants::USERAUTH_BANNER = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#9 +Net::SSH::Authentication::Constants::USERAUTH_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#16 +Net::SSH::Authentication::Constants::USERAUTH_METHOD_RANGE = T.let(T.unsafe(nil), Range) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#13 +Net::SSH::Authentication::Constants::USERAUTH_PASSWD_CHANGEREQ = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#14 +Net::SSH::Authentication::Constants::USERAUTH_PK_OK = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#8 +Net::SSH::Authentication::Constants::USERAUTH_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/constants.rb#10 +Net::SSH::Authentication::Constants::USERAUTH_SUCCESS = T.let(T.unsafe(nil), Integer) + +# Raised if the current authentication method is not allowed +# +# source://net-ssh//lib/net/ssh/authentication/session.rb#15 +class Net::SSH::Authentication::DisallowedMethod < ::Net::SSH::Exception; end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#13 +module Net::SSH::Authentication::ED25519; end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#23 +class Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader + class << self + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#41 + def read(datafull, password); end + end +end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#24 +Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::CipherFactory = Net::SSH::Transport::CipherFactory + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#30 +class Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::DecryptError < ::ArgumentError + # @return [DecryptError] a new instance of DecryptError + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#31 + def initialize(message, encrypted_key: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#36 + def encrypted_key?; end +end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#28 +Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::MAGIC = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#26 +Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::MBEGIN = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#27 +Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::MEND = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#139 +class Net::SSH::Authentication::ED25519::PrivKey + # @return [PrivKey] a new instance of PrivKey + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#148 + def initialize(buffer); end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#169 + def public_key; end + + # Returns the value of attribute sign_key. + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#146 + def sign_key; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#173 + def ssh_do_sign(data, sig_alg = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#165 + def ssh_signature_type; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#161 + def ssh_type; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#157 + def to_blob; end + + class << self + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#177 + def read(data, password); end + end +end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#140 +Net::SSH::Authentication::ED25519::PrivKey::CipherFactory = Net::SSH::Transport::CipherFactory + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#144 +Net::SSH::Authentication::ED25519::PrivKey::MAGIC = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#142 +Net::SSH::Authentication::ED25519::PrivKey::MBEGIN = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#143 +Net::SSH::Authentication::ED25519::PrivKey::MEND = T.let(T.unsafe(nil), String) + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#104 +class Net::SSH::Authentication::ED25519::PubKey + include ::Net::SSH::Authentication::PubKeyFingerprint + + # @return [PubKey] a new instance of PubKey + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#109 + def initialize(data); end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#129 + def ssh_do_verify(sig, data, options = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#125 + def ssh_signature_type; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#121 + def ssh_type; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#117 + def to_blob; end + + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#133 + def to_pem; end + + # Returns the value of attribute verify_key. + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#107 + def verify_key; end + + class << self + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#113 + def read_keyblob(buffer); end + end +end + +# source://net-ssh//lib/net/ssh/authentication/ed25519.rb#14 +class Net::SSH::Authentication::ED25519::SigningKeyFromFile < ::SimpleDelegator + # @raise [ArgumentError] + # @return [SigningKeyFromFile] a new instance of SigningKeyFromFile + # + # source://net-ssh//lib/net/ssh/authentication/ed25519.rb#15 + def initialize(pk, sk); end +end + +# Loads ED25519 support which requires optinal dependecies like +# ed25519, bcrypt_pbkdf +# +# source://net-ssh//lib/net/ssh/authentication/ed25519_loader.rb#6 +module Net::SSH::Authentication::ED25519Loader + class << self + # source://net-ssh//lib/net/ssh/authentication/ed25519_loader.rb#22 + def dependenciesRequiredForED25519; end + + # @raise [NotImplementedError] + # + # source://net-ssh//lib/net/ssh/authentication/ed25519_loader.rb#16 + def raiseUnlessLoaded(message); end + end +end + +# source://net-ssh//lib/net/ssh/authentication/ed25519_loader.rb#10 +Net::SSH::Authentication::ED25519Loader::ERROR = T.let(T.unsafe(nil), T.untyped) + +# source://net-ssh//lib/net/ssh/authentication/ed25519_loader.rb#9 +Net::SSH::Authentication::ED25519Loader::LOADED = T.let(T.unsafe(nil), TrueClass) + +# This class encapsulates all operations done by clients on a user's +# private keys. In practice, the client should never need a reference +# to a private key; instead, they grab a list of "identities" (public +# keys) that are available from the KeyManager, and then use +# the KeyManager to do various private key operations using those +# identities. +# +# The KeyManager also uses the Agent class to encapsulate the +# ssh-agent. Thus, from a client's perspective it is completely +# hidden whether an identity comes from the ssh-agent or from a file +# on disk. +# +# source://net-ssh//lib/net/ssh/authentication/key_manager.rb#23 +class Net::SSH::Authentication::KeyManager + include ::Net::SSH::Loggable + + # Create a new KeyManager. By default, the manager will + # use the ssh-agent if it is running and the `:use_agent` option + # is not false. + # + # @return [KeyManager] a new instance of KeyManager + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#47 + def initialize(logger, options = T.unsafe(nil)); end + + # Add the given key_file to the list of key files that will be used. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#72 + def add(key_file); end + + # Add the given key_file to the list of keys that will be used. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#90 + def add_key_data(key_data_); end + + # Add the given keycert_file to the list of keycert files that will be used. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#78 + def add_keycert(keycert_file); end + + # Add the given keycert_data to the list of keycerts that will be used. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#84 + def add_keycert_data(keycert_data_); end + + # Returns an Agent instance to use for communicating with an SSH + # agent process. Returns nil if use of an SSH agent has been disabled, + # or if the agent is otherwise not available. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#226 + def agent; end + + # Clear all knowledge of any loaded user keys. This also clears the list + # of default identity files that are to be loaded, thus making it + # appropriate to use if a client wishes to NOT use the default identity + # files. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#63 + def clear!; end + + # Iterates over all available identities (public keys) known to this + # manager. As it finds one, it will then yield it to the caller. + # The origin of the identities may be from files on disk or from an + # ssh-agent. Note that identities from an ssh-agent are always listed + # first in the array, with other identities coming after. + # + # If key manager was created with :keys_only option, any identity + # from ssh-agent will be ignored unless it present in key_files or + # key_data. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#118 + def each_identity; end + + # This is used as a hint to the KeyManager indicating that the agent + # connection is no longer needed. Any other open resources may be closed + # at this time. + # + # Calling this does NOT indicate that the KeyManager will no longer + # be used. Identities may still be requested and operations done on + # loaded identities, in which case, the agent will be automatically + # reconnected. This method simply allows the client connection to be + # closed when it will not be used in the immediate future. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#104 + def finish; end + + # The list of user key data that will be examined + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#30 + def key_data; end + + # The list of user key files that will be examined + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#27 + def key_files; end + + # The list of user key certificate data that will be examined + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#36 + def keycert_data; end + + # The list of user key certificate files that will be examined + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#33 + def keycert_files; end + + # The map of loaded identities + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#39 + def known_identities; end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#235 + def no_keys?; end + + # The map of options that were passed to the key-manager + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#42 + def options; end + + # Sign the given data, using the corresponding private key of the given + # identity. If the identity was originally obtained from an ssh-agent, + # then the ssh-agent will be used to sign the data, otherwise the + # private key for the identity will be loaded from disk (if it hasn't + # been loaded already) and will then be used to sign the data. + # + # Regardless of the identity's origin or who does the signing, this + # will always return the signature in an SSH2-specified "signature + # blob" format. + # + # @raise [KeyManagerError] + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#172 + def sign(identity, data, sig_alg = T.unsafe(nil)); end + + # Toggles whether the ssh-agent will be used or not. If true, an + # attempt will be made to use the ssh-agent. If false, any existing + # connection to an agent is closed and the agent will not be used. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#218 + def use_agent=(use_agent); end + + # Identifies whether the ssh-agent will be used or not. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#211 + def use_agent?; end + + private + + # Load keycerts from files and data. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#242 + def keycerts; end + + # Load prepared identities. Private key decryption errors ignored if ignore_decryption_errors + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#280 + def load_identities(identities, ask_passphrase, ignore_decryption_errors); end + + # Prepared identities from user key_data, preserving their order and sources. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#273 + def prepare_identities_from_data; end + + # Prepares identities from user key_files for loading, preserving their order and sources. + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#248 + def prepare_identities_from_files; end + + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#314 + def process_identity_loading_error(identity, e); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/key_manager.rb#268 + def readable_file?(path); end +end + +# A trivial exception class used to report errors in the key manager. +# +# source://net-ssh//lib/net/ssh/authentication/key_manager.rb#10 +class Net::SSH::Authentication::KeyManagerError < ::Net::SSH::Exception; end + +# source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#9 +module Net::SSH::Authentication::Methods; end + +# The base class of all user authentication methods. It provides a few +# bits of common functionality. +# +# source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#12 +class Net::SSH::Authentication::Methods::Abstract + include ::Net::SSH::Loggable + include ::Net::SSH::Authentication::Constants + + # Instantiates a new authentication method. + # + # @return [Abstract] a new instance of Abstract + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#29 + def initialize(session, options = T.unsafe(nil)); end + + # The key manager object. Not all authentication methods will require + # this. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#21 + def key_manager; end + + # So far only affects algorithms used for rsa keys, but can be + # extended to other keys, e.g after reading of + # PubkeyAcceptedAlgorithms option from ssh_config file is implemented. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#26 + def pubkey_algorithms; end + + # Sends a message via the underlying transport layer abstraction. This + # will block until the message is completely sent. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#50 + def send_message(msg); end + + # The authentication session object + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#17 + def session; end + + # Returns the session-id, as generated during the first key exchange of + # an SSH connection. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#44 + def session_id; end + + # Creates a new USERAUTH_REQUEST packet. The extra arguments on the end + # must be either boolean values or strings, and are tacked onto the end + # of the packet. The new packet is returned, ready for sending. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#57 + def userauth_request(username, next_service, auth_method, *others); end + + private + + # Returns the value of attribute prompt. + # + # source://net-ssh//lib/net/ssh/authentication/methods/abstract.rb#74 + def prompt; end +end + +# Implements the host-based SSH authentication method. +# +# source://net-ssh//lib/net/ssh/authentication/methods/hostbased.rb#8 +class Net::SSH::Authentication::Methods::Hostbased < ::Net::SSH::Authentication::Methods::Abstract + # Attempts to perform host-based authorization of the user by trying + # all known keys. + # + # source://net-ssh//lib/net/ssh/authentication/methods/hostbased.rb#13 + def authenticate(next_service, username, password = T.unsafe(nil)); end + + private + + # Attempts to perform host-based authentication of the user, using + # the given host identity (key). + # + # source://net-ssh//lib/net/ssh/authentication/methods/hostbased.rb#33 + def authenticate_with(identity, next_service, username, key_manager); end + + # Build the "core" hostbased request string. + # + # source://net-ssh//lib/net/ssh/authentication/methods/hostbased.rb#64 + def build_request(identity, next_service, username, hostname, client_username); end + + # Returns the hostname as reported by the underlying socket. + # + # source://net-ssh//lib/net/ssh/authentication/methods/hostbased.rb#27 + def hostname; end +end + +# Implements the "keyboard-interactive" SSH authentication method. +# +# source://net-ssh//lib/net/ssh/authentication/methods/keyboard_interactive.rb#9 +class Net::SSH::Authentication::Methods::KeyboardInteractive < ::Net::SSH::Authentication::Methods::Abstract + # Attempt to authenticate the given user for the given service. + # + # source://net-ssh//lib/net/ssh/authentication/methods/keyboard_interactive.rb#14 + def authenticate(next_service, username, password = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/authentication/methods/keyboard_interactive.rb#69 + def interactive?; end +end + +# source://net-ssh//lib/net/ssh/authentication/methods/keyboard_interactive.rb#10 +Net::SSH::Authentication::Methods::KeyboardInteractive::USERAUTH_INFO_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/authentication/methods/keyboard_interactive.rb#11 +Net::SSH::Authentication::Methods::KeyboardInteractive::USERAUTH_INFO_RESPONSE = T.let(T.unsafe(nil), Integer) + +# Implements the "none" SSH authentication method. +# +# source://net-ssh//lib/net/ssh/authentication/methods/none.rb#9 +class Net::SSH::Authentication::Methods::None < ::Net::SSH::Authentication::Methods::Abstract + # Attempt to authenticate as "none" + # + # source://net-ssh//lib/net/ssh/authentication/methods/none.rb#11 + def authenticate(next_service, user = T.unsafe(nil), password = T.unsafe(nil)); end +end + +# Implements the "password" SSH authentication method. +# +# source://net-ssh//lib/net/ssh/authentication/methods/password.rb#10 +class Net::SSH::Authentication::Methods::Password < ::Net::SSH::Authentication::Methods::Abstract + # Attempt to authenticate the given user for the given service. If + # the password parameter is nil, this will ask for password + # + # source://net-ssh//lib/net/ssh/authentication/methods/password.rb#13 + def authenticate(next_service, username, password = T.unsafe(nil)); end + + private + + # source://net-ssh//lib/net/ssh/authentication/methods/password.rb#60 + def ask_password(username); end + + # source://net-ssh//lib/net/ssh/authentication/methods/password.rb#55 + def clear_prompter!; end + + # source://net-ssh//lib/net/ssh/authentication/methods/password.rb#71 + def get_max_retries; end +end + +# source://net-ssh//lib/net/ssh/authentication/methods/password.rb#53 +Net::SSH::Authentication::Methods::Password::NUMBER_OF_PASSWORD_PROMPTS = T.let(T.unsafe(nil), Integer) + +# Implements the "publickey" SSH authentication method. +# +# source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#10 +class Net::SSH::Authentication::Methods::Publickey < ::Net::SSH::Authentication::Methods::Abstract + # Attempts to perform public-key authentication for the given + # username, trying each identity known to the key manager. If any of + # them succeed, returns +true+, otherwise returns +false+. This + # requires the presence of a key manager. + # + # source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#15 + def authenticate(next_service, username, password = T.unsafe(nil)); end + + private + + # Attempts to perform public-key authentication for the given + # username, with the given identity (public key). Returns +true+ if + # successful, or +false+ otherwise. + # + # source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#94 + def authenticate_with(identity, next_service, username); end + + # source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#46 + def authenticate_with_alg(identity, next_service, username, alg, sig_alg = T.unsafe(nil)); end + + # Builds a packet that contains the request formatted for sending + # a public-key request to the server. + # + # source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#29 + def build_request(pub_key, username, next_service, alg, has_sig); end + + # Builds and sends a request formatted for a public-key + # authentication request. + # + # source://net-ssh//lib/net/ssh/authentication/methods/publickey.rb#39 + def send_request(pub_key, username, next_service, alg, signature = T.unsafe(nil)); end +end + +# Public key fingerprinting utility module - internal not part of API. +# This is included in pubkey classes and called from there. All RSA, DSA, and ECC keys +# are supported. +# +# require 'net/ssh' +# my_pubkey_text = File.read('/path/to/id_ed25519.pub') +# #=> "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDB2NBh4GJPPUN1kXPMu8b633Xcv55WoKC3OkBjFAbzJ alice@example.com" +# my_pubkey = Net::SSH::KeyFactory.load_data_public_key(my_pubkey_text) +# #=> # "2f:7f:97:21:76:a4:0f:38:c4:fe:d8:b4:6a:39:72:30" +# my_pubkey.fingerprint('SHA256') +# #=> "SHA256:u6mXnY8P1b0FODGp8mckqOB33u8+jvkSCtJbD5Q9klg" +# +# source://net-ssh//lib/net/ssh/authentication/pub_key_fingerprint.rb#19 +module Net::SSH::Authentication::PubKeyFingerprint + # Return the key's fingerprint. Algorithm may be either +MD5+ (default), + # or +SHA256+. For +SHA256+, fingerprints are in the same format + # returned by OpenSSH's `ssh-add -l -E SHA256`, i.e., + # trailing base64 padding '=' characters are stripped and the + # literal string +SHA256:+ is prepended. + # + # source://net-ssh//lib/net/ssh/authentication/pub_key_fingerprint.rb#25 + def fingerprint(algorithm = T.unsafe(nil)); end + + class << self + # source://net-ssh//lib/net/ssh/authentication/pub_key_fingerprint.rb#30 + def fingerprint(blob, algorithm = T.unsafe(nil)); end + end +end + +# Represents an authentication session. It manages the authentication of +# a user over an established connection (the "transport" object, see +# Net::SSH::Transport::Session). +# +# The use of an authentication session to manage user authentication is +# internal to Net::SSH (specifically Net::SSH.start). Consumers of the +# Net::SSH library will never need to access this class directly. +# +# source://net-ssh//lib/net/ssh/authentication/session.rb#25 +class Net::SSH::Authentication::Session + include ::Net::SSH::Loggable + include ::Net::SSH::Authentication::Constants + include ::Net::SSH::Transport::Constants + + # Instantiates a new Authentication::Session object over the given + # transport layer abstraction. + # + # @return [Session] a new instance of Session + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#44 + def initialize(transport, options = T.unsafe(nil)); end + + # the list of authentication methods that are allowed + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#37 + def allowed_auth_methods; end + + # the list of authentication methods to try + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#34 + def auth_methods; end + + # Attempts to authenticate the given user, in preparation for the next + # service request. Returns true if an authentication method succeeds in + # authenticating the user, and false otherwise. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#57 + def authenticate(next_service, username, password = T.unsafe(nil)); end + + # Blocks until a packet is received, and returns it if it is of the given + # type. If it is not, an exception is raised. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#130 + def expect_message(type); end + + # Blocks until a packet is received. It silently handles USERAUTH_BANNER + # packets, and will raise an error if any packet is received that is not + # valid during user authentication. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#101 + def next_message; end + + # a hash of options, given at construction time + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#40 + def options; end + + # transport layer abstraction + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#31 + def transport; end + + private + + # Returns an array of paths to the key files usually defined + # by system default. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#141 + def default_keys; end + + # Returns an array of the key data that should be used when + # attempting any key-based authentication mechanism. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#166 + def key_data; end + + # Returns an array of the keycert data that should be used when + # attempting any key-based authentication mechanism. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#160 + def keycert_data; end + + # Returns an array of paths to the keycert files that should be used when + # attempting any key-based authentication mechanism. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#154 + def keycerts; end + + # Returns an array of paths to the key files that should be used when + # attempting any key-based authentication mechanism. + # + # source://net-ssh//lib/net/ssh/authentication/session.rb#148 + def keys; end +end + +# This exception is raised when authentication fails (whether it be +# public key authentication, password authentication, or whatever). +# +# source://net-ssh//lib/net/ssh/errors.rb#9 +class Net::SSH::AuthenticationFailed < ::Net::SSH::Exception; end + +# Net::SSH::Buffer is a flexible class for building and parsing binary +# data packets. It provides a stream-like interface for sequentially +# reading data items from the buffer, as well as a useful helper method +# for building binary packets given a signature. +# +# Writing to a buffer always appends to the end, regardless of where the +# read cursor is. Reading, on the other hand, always begins at the first +# byte of the buffer and increments the read cursor, with subsequent reads +# taking up where the last left off. +# +# As a consumer of the Net::SSH library, you will rarely come into contact +# with these buffer objects directly, but it could happen. Also, if you +# are ever implementing a protocol on top of SSH (e.g. SFTP), this buffer +# class can be quite handy. +# +# source://net-ssh//lib/net/ssh/buffer.rb#22 +class Net::SSH::Buffer + # Creates a new buffer, initialized to the given content. The position + # is initialized to the beginning of the buffer. + # + # @return [Buffer] a new instance of Buffer + # + # source://net-ssh//lib/net/ssh/buffer.rb#73 + def initialize(content = T.unsafe(nil)); end + + # Compares the contents of the two buffers, returning +true+ only if they + # are identical in size and content. + # + # source://net-ssh//lib/net/ssh/buffer.rb#96 + def ==(buffer); end + + # Appends the given text to the end of the buffer. Does not alter the + # read position. Returns the buffer object itself. + # + # source://net-ssh//lib/net/ssh/buffer.rb#145 + def append(text); end + + # Returns the number of bytes available to be read (e.g., how many bytes + # remain between the current position and the end of the buffer). + # + # source://net-ssh//lib/net/ssh/buffer.rb#85 + def available; end + + # Resets the buffer, making it empty. Also, resets the read position to + # 0. + # + # source://net-ssh//lib/net/ssh/buffer.rb#119 + def clear!; end + + # Consumes n bytes from the buffer, where n is the current position + # unless otherwise specified. This is useful for removing data from the + # buffer that has previously been read, when you are expecting more data + # to be appended. It helps to keep the size of buffers down when they + # would otherwise tend to grow without bound. + # + # Returns the buffer object itself. + # + # source://net-ssh//lib/net/ssh/buffer.rb#131 + def consume!(n = T.unsafe(nil)); end + + # exposes the raw content of the buffer + # + # source://net-ssh//lib/net/ssh/buffer.rb#66 + def content; end + + # Returns +true+ if the buffer contains no data (e.g., it is of zero length). + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/buffer.rb#101 + def empty?; end + + # Returns true if the pointer is at the end of the buffer. Subsequent + # reads will return nil, in this case. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/buffer.rb#113 + def eof?; end + + # Returns the length of the buffer's content. + # + # source://net-ssh//lib/net/ssh/buffer.rb#79 + def length; end + + # the current position of the pointer in the buffer + # + # source://net-ssh//lib/net/ssh/buffer.rb#69 + def position; end + + # the current position of the pointer in the buffer + # + # source://net-ssh//lib/net/ssh/buffer.rb#69 + def position=(_arg0); end + + # Reads and returns the next +count+ bytes from the buffer, starting from + # the read position. If +count+ is +nil+, this will return all remaining + # text in the buffer. This method will increment the pointer. + # + # source://net-ssh//lib/net/ssh/buffer.rb#174 + def read(count = T.unsafe(nil)); end + + # Reads (as #read) and returns the given number of bytes from the buffer, + # and then consumes (as #consume!) all data up to the new read position. + # + # source://net-ssh//lib/net/ssh/buffer.rb#183 + def read!(count = T.unsafe(nil)); end + + # Calls block(self) until the buffer is empty, and returns all results. + # + # source://net-ssh//lib/net/ssh/buffer.rb#190 + def read_all(&block); end + + # Read a bignum (OpenSSL::BN) from the buffer, in SSH2 format. It is + # essentially just a string, which is reinterpreted to be a bignum in + # binary format. + # + # source://net-ssh//lib/net/ssh/buffer.rb#236 + def read_bignum; end + + # Read a single byte and convert it into a boolean, using 'C' rules + # (i.e., zero is false, non-zero is true). + # + # source://net-ssh//lib/net/ssh/buffer.rb#228 + def read_bool; end + + # Reads the next string from the buffer, and returns a new Buffer + # object that wraps it. + # + # source://net-ssh//lib/net/ssh/buffer.rb#350 + def read_buffer; end + + # Read and return the next byte in the buffer. Returns nil if called at + # the end of the buffer. + # + # source://net-ssh//lib/net/ssh/buffer.rb#213 + def read_byte; end + + # Return the next 8 bytes as a 64-bit integer (in network byte order). + # Returns nil if there are less than 8 bytes remaining to be read in the + # buffer. + # + # source://net-ssh//lib/net/ssh/buffer.rb#197 + def read_int64; end + + # Read a key from the buffer. The key will start with a string + # describing its type. The remainder of the key is defined by the + # type that was read. + # + # source://net-ssh//lib/net/ssh/buffer.rb#246 + def read_key; end + + # Read a keyblob of the given type from the buffer, and return it as + # a key. Only RSA, DSA, and ECDSA keys are supported. + # + # source://net-ssh//lib/net/ssh/buffer.rb#295 + def read_keyblob(type); end + + # Return the next four bytes as a long integer (in network byte order). + # Returns nil if there are less than 4 bytes remaining to be read in the + # buffer. + # + # source://net-ssh//lib/net/ssh/buffer.rb#206 + def read_long; end + + # source://net-ssh//lib/net/ssh/buffer.rb#251 + def read_private_keyblob(type); end + + # Read and return an SSH2-encoded string. The string starts with a long + # integer that describes the number of bytes remaining in the string. + # Returns nil if there are not enough bytes to satisfy the request. + # + # source://net-ssh//lib/net/ssh/buffer.rb#221 + def read_string; end + + # Reads all data up to and including the given pattern, which may be a + # String, Fixnum, or Regexp and is interpreted exactly as String#index + # does. Returns nil if nothing matches. Increments the position to point + # immediately after the pattern, if it does match. Returns all data up to + # and including the text that matched the pattern. + # + # source://net-ssh//lib/net/ssh/buffer.rb#161 + def read_to(pattern); end + + # Returns all text from the current pointer to the end of the buffer as + # a new Net::SSH::Buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#152 + def remainder_as_buffer; end + + # Resets the pointer to the start of the buffer. Subsequent reads will + # begin at position 0. + # + # source://net-ssh//lib/net/ssh/buffer.rb#107 + def reset!; end + + # Returns a copy of the buffer's content. + # + # source://net-ssh//lib/net/ssh/buffer.rb#90 + def to_s; end + + # Writes the given data literally into the string. Does not alter the + # read position. Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#356 + def write(*data); end + + # Writes each argument to the buffer as a bignum (SSH2-style). No + # checking is done to ensure that the arguments are, in fact, bignums. + # Does not alter the read position. Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#436 + def write_bignum(*n); end + + # Writes each argument to the buffer as a (C-style) boolean, with 1 + # meaning true, and 0 meaning false. Does not alter the read position. + # Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#428 + def write_bool(*b); end + + # Writes each argument to the buffer as a byte. Does not alter the read + # position. Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#395 + def write_byte(*n); end + + # Writes each argument to the buffer as a network-byte-order-encoded + # 64-bit integer (8 bytes). Does not alter the read position. Returns the + # buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#376 + def write_int64(*n); end + + # Writes the given arguments to the buffer as SSH2-encoded keys. Does not + # alter the read position. Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#443 + def write_key(*key); end + + # Writes each argument to the buffer as a network-byte-order-encoded + # long (4-byte) integer. Does not alter the read position. Returns the + # buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#388 + def write_long(*n); end + + # Optimized version of write where the caller gives up ownership of string + # to the method. This way we can mutate the string. + # + # source://net-ssh//lib/net/ssh/buffer.rb#363 + def write_moved(string); end + + # Writes each argument to the buffer as an SSH2-encoded string. Each + # string is prefixed by its length, encoded as a 4-byte long integer. + # Does not alter the read position. Returns the buffer object. + # Might alter arguments see write_moved + # + # source://net-ssh//lib/net/ssh/buffer.rb#416 + def write_mstring(*text); end + + # Writes each argument to the buffer as an SSH2-encoded string. Each + # string is prefixed by its length, encoded as a 4-byte long integer. + # Does not alter the read position. Returns the buffer object. + # + # source://net-ssh//lib/net/ssh/buffer.rb#403 + def write_string(*text); end + + class << self + # This is a convenience method for creating and populating a new buffer + # from a single command. The arguments must be even in length, with the + # first of each pair of arguments being a symbol naming the type of the + # data that follows. If the type is :raw, the value is written directly + # to the hash. + # + # b = Buffer.from(:byte, 1, :string, "hello", :raw, "\1\2\3\4") + # #-> "\1\0\0\0\5hello\1\2\3\4" + # + # The supported data types are: + # + # * :raw => write the next value verbatim (#write) + # * :int64 => write an 8-byte integer (#write_int64) + # * :long => write a 4-byte integer (#write_long) + # * :byte => write a single byte (#write_byte) + # * :string => write a 4-byte length followed by character data (#write_string) + # * :mstring => same as string, but caller cannot resuse the string, avoids potential duplication (#write_moved) + # * :bool => write a single byte, interpreted as a boolean (#write_bool) + # * :bignum => write an SSH-encoded bignum (#write_bignum) + # * :key => write an SSH-encoded key value (#write_key) + # + # Any of these, except for :raw, accepts an Array argument, to make it + # easier to write multiple values of the same type in a briefer manner. + # + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/buffer.rb#46 + def from(*args); end + end +end + +# This module is used to extend sockets and other IO objects, to allow +# them to be buffered for both read and write. This abstraction makes it +# quite easy to write a select-based event loop +# (see Net::SSH::Connection::Session#listen_to). +# +# The general idea is that instead of calling #read directly on an IO that +# has been extended with this module, you call #fill (to add pending input +# to the internal read buffer), and then #read_available (to read from that +# buffer). Likewise, you don't call #write directly, you call #enqueue to +# add data to the write buffer, and then #send_pending or #wait_for_pending_sends +# to actually send the data across the wire. +# +# In this way you can easily use the object as an argument to IO.select, +# calling #fill when it is available for read, or #send_pending when it is +# available for write, and then call #enqueue and #read_available during +# the idle times. +# +# socket = TCPSocket.new(address, port) +# socket.extend(Net::SSH::BufferedIo) +# +# ssh.listen_to(socket) +# +# ssh.loop do +# if socket.available > 0 +# puts socket.read_available +# socket.enqueue("response\n") +# end +# end +# +# Note that this module must be used to extend an instance, and should not +# be included in a class. If you do want to use it via an include, then you +# must make sure to invoke the private #initialize_buffered_io method in +# your class' #initialize method: +# +# class Foo < IO +# include Net::SSH::BufferedIo +# +# def initialize +# initialize_buffered_io +# # ... +# end +# end +# +# source://net-ssh//lib/net/ssh/buffered_io.rb#48 +module Net::SSH::BufferedIo + include ::Net::SSH::Loggable + + # Returns the number of bytes available to be read from the input buffer. + # (See #read_available.) + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#81 + def available; end + + # Enqueues data in the output buffer, to be written when #send_pending + # is called. Note that the data is _not_ sent immediately by this method! + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#87 + def enqueue(data); end + + # Tries to read up to +n+ bytes of data from the remote end, and appends + # the data to the input buffer. It returns the number of bytes read, or 0 + # if no data was available to be read. + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#62 + def fill(n = T.unsafe(nil)); end + + # Returns +true+ if there is data waiting in the output buffer, and + # +false+ otherwise. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#93 + def pending_write?; end + + # Read up to +length+ bytes from the input buffer. If +length+ is nil, + # all available data is read from the buffer. (See #available.) + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#75 + def read_available(length = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/buffered_io.rb#128 + def read_buffer; end + + # Sends as much of the pending output as possible. Returns +true+ if any + # data was sent, and +false+ otherwise. + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#99 + def send_pending; end + + # Calls #send_pending repeatedly, if necessary, blocking until the output + # buffer is empty. + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#112 + def wait_for_pending_sends; end + + # source://net-ssh//lib/net/ssh/buffered_io.rb#124 + def write_buffer; end + + private + + # Initializes the intput and output buffers for this object. This method + # is called automatically when the module is mixed into an object via + # Object#extend (see Net::SSH::BufferedIo.extended), but must be called + # explicitly in the +initialize+ method of any class that uses + # Module#include to add this module. + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#148 + def initialize_buffered_io; end + + # -- + # Can't use attr_reader here (after +private+) without incurring the + # wrath of "ruby -w". We hates it. + # ++ + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#139 + def input; end + + # source://net-ssh//lib/net/ssh/buffered_io.rb#141 + def output; end + + class << self + # Called when the #extend is called on an object, with this module as the + # argument. It ensures that the modules instance variables are all properly + # initialized. + # + # source://net-ssh//lib/net/ssh/buffered_io.rb#54 + def extended(object); end + end +end + +# This is exception is primarily used internally, but if you have a channel +# open handler (see Net::SSH::Connection::Session#on_open_channel) and you +# want to fail in such a way that the server knows it failed, you can +# raise this exception in the handler and Net::SSH will translate that into +# a "channel open failed" message. +# +# source://net-ssh//lib/net/ssh/errors.rb#34 +class Net::SSH::ChannelOpenFailed < ::Net::SSH::Exception + # @return [ChannelOpenFailed] a new instance of ChannelOpenFailed + # + # source://net-ssh//lib/net/ssh/errors.rb#37 + def initialize(code, reason); end + + # Returns the value of attribute code. + # + # source://net-ssh//lib/net/ssh/errors.rb#35 + def code; end + + # Returns the value of attribute reason. + # + # source://net-ssh//lib/net/ssh/errors.rb#35 + def reason; end +end + +# This exception is primarily used internally, but if you have a channel +# request handler (see Net::SSH::Connection::Channel#on_request) that you +# want to fail in such a way that the server knows it failed, you can +# raise this exception in the handler and Net::SSH will translate that into +# a "channel failure" message. +# +# source://net-ssh//lib/net/ssh/errors.rb#27 +class Net::SSH::ChannelRequestFailed < ::Net::SSH::Exception; end + +# The Net::SSH::Config class is used to parse OpenSSH configuration files, +# and translates that syntax into the configuration syntax that Net::SSH +# understands. This lets Net::SSH scripts read their configuration (to +# some extent) from OpenSSH configuration files (~/.ssh/config, /etc/ssh_config, +# and so forth). +# +# Only a subset of OpenSSH configuration options are understood: +# +# * ChallengeResponseAuthentication => maps to the :auth_methods option challenge-response (then coleasced into keyboard-interactive) +# * KbdInteractiveAuthentication => maps to the :auth_methods keyboard-interactive +# * CertificateFile => maps to the :keycerts option +# * Ciphers => maps to the :encryption option +# * Compression => :compression +# * CompressionLevel => :compression_level +# * ConnectTimeout => maps to the :timeout option +# * ForwardAgent => :forward_agent +# * GlobalKnownHostsFile => :global_known_hosts_file +# * HostBasedAuthentication => maps to the :auth_methods option +# * HostKeyAlgorithms => maps to :host_key option +# * HostKeyAlias => :host_key_alias +# * HostName => :host_name +# * IdentityFile => maps to the :keys option +# * IdentityAgent => :identity_agent +# * IdentitiesOnly => :keys_only +# * CheckHostIP => :check_host_ip +# * Macs => maps to the :hmac option +# * PasswordAuthentication => maps to the :auth_methods option password +# * Port => :port +# * PreferredAuthentications => maps to the :auth_methods option +# * ProxyCommand => maps to the :proxy option +# * ProxyJump => maps to the :proxy option +# * PubKeyAuthentication => maps to the :auth_methods option +# * RekeyLimit => :rekey_limit +# * StrictHostKeyChecking => :verify_host_key +# * User => :user +# * UserKnownHostsFile => :user_known_hosts_file +# * NumberOfPasswordPrompts => :number_of_password_prompts +# * FingerprintHash => :fingerprint_hash +# +# Note that you will never need to use this class directly--you can control +# whether the OpenSSH configuration files are read by passing the :config +# option to Net::SSH.start. (They are, by default.) +# +# source://net-ssh//lib/net/ssh/config.rb#45 +class Net::SSH::Config + class << self + # source://net-ssh//lib/net/ssh/config.rb#60 + def default_auth_methods; end + + # Returns an array of locations of OpenSSH configuration files + # to parse by default. + # + # source://sshkit/1.23.1/lib/sshkit/backends/netssh.rb#11 + def default_files; end + + # Filters default_files down to the files that are expandable. + # + # source://net-ssh//lib/net/ssh/config.rb#186 + def expandable_default_files; end + + # Loads the configuration data for the given +host+ from all of the + # given +files+ (defaulting to the list of files returned by + # #default_files), translates the resulting hash into the options + # recognized by Net::SSH, and returns them. + # + # source://net-ssh//lib/net/ssh/config.rb#68 + def for(host, files = T.unsafe(nil)); end + + # Load the OpenSSH configuration settings in the given +file+ for the + # given +host+. If +settings+ is given, the options are merged into + # that hash, with existing values taking precedence over newly parsed + # ones. Returns a hash containing the OpenSSH options. (See + # #translate for how to convert the OpenSSH options into Net::SSH + # options.) + # + # source://net-ssh//lib/net/ssh/config.rb#80 + def load(path, host, settings = T.unsafe(nil), base_dir = T.unsafe(nil)); end + + # Given a hash of OpenSSH configuration options, converts them into + # a hash of Net::SSH options. Unrecognized options are ignored. The + # +settings+ hash must have Strings for keys, all downcased, and + # the returned hash will have Symbols for keys. + # + # source://net-ssh//lib/net/ssh/config.rb#176 + def translate(settings); end + + private + + # source://net-ssh//lib/net/ssh/config.rb#365 + def eval_match_conditions(condition, host, settings); end + + # source://net-ssh//lib/net/ssh/config.rb#353 + def included_file_paths(base_dir, config_paths); end + + # Converts the given size into an integer number of bytes. + # + # source://net-ssh//lib/net/ssh/config.rb#336 + def interpret_size(size); end + + # source://net-ssh//lib/net/ssh/config.rb#345 + def merge_challenge_response_with_keyboard_interactive(hash); end + + # Converts an ssh_config pattern into a regex for matching against + # host names. + # + # source://net-ssh//lib/net/ssh/config.rb#316 + def pattern2regex(pattern); end + + # source://net-ssh//lib/net/ssh/config.rb#301 + def setup_proxy(type, value); end + + # Tokenize string into tokens. + # A token is a word or a quoted sequence of words, separated by whitespaces. + # + # source://net-ssh//lib/net/ssh/config.rb#361 + def tokenize_config_value(str); end + + # source://net-ssh//lib/net/ssh/config.rb#235 + def translate_config_key(hash, key, value, settings); end + + # source://net-ssh//lib/net/ssh/config.rb#208 + def translate_keepalive(hash, value); end + + # source://net-ssh//lib/net/ssh/config.rb#197 + def translate_verify_host_key(value); end + + # source://net-ssh//lib/net/ssh/config.rb#400 + def unquote(string); end + end +end + +# source://net-ssh//lib/net/ssh/connection/constants.rb#3 +module Net::SSH::Connection; end + +# The channel abstraction. Multiple "channels" can be multiplexed onto a +# single SSH channel, each operating independently and seemingly in parallel. +# This class represents a single such channel. Most operations performed +# with the Net::SSH library will involve using one or more channels. +# +# Channels are intended to be used asynchronously. You request that one be +# opened (via Connection::Session#open_channel), and when it is opened, your +# callback is invoked. Then, you set various other callbacks on the newly +# opened channel, which are called in response to the corresponding events. +# Programming with Net::SSH works best if you think of your programs as +# state machines. Complex programs are best implemented as objects that +# wrap a channel. See Net::SCP and Net::SFTP for examples of how complex +# state machines can be built on top of the SSH protocol. +# +# ssh.open_channel do |channel| +# channel.exec("/invoke/some/command") do |ch, success| +# abort "could not execute command" unless success +# +# channel.on_data do |ch, data| +# puts "got stdout: #{data}" +# channel.send_data "something for stdin\n" +# end +# +# channel.on_extended_data do |ch, type, data| +# puts "got stderr: #{data}" +# end +# +# channel.on_close do |ch| +# puts "channel is closing!" +# end +# end +# end +# +# ssh.loop +# +# Channels also have a basic hash-like interface, that allows programs to +# store arbitrary state information on a channel object. This helps simplify +# the writing of state machines, especially when you may be juggling +# multiple open channels at the same time. +# +# Note that data sent across SSH channels are governed by maximum packet +# sizes and maximum window sizes. These details are managed internally +# by Net::SSH::Connection::Channel, so you may remain blissfully ignorant +# if you so desire, but you can always inspect the current maximums, as +# well as the remaining window size, using the reader attributes for those +# values. +# +# source://net-ssh//lib/net/ssh/connection/channel.rb#54 +class Net::SSH::Connection::Channel + include ::Net::SSH::Loggable + include ::Net::SSH::Connection::Constants + + # Instantiates a new channel on the given connection, of the given type, + # and with the given id. If a block is given, it will be remembered until + # the channel is confirmed open by the server, and will be invoked at + # that time (see #do_open_confirmation). + # + # This also sets the default maximum packet size and maximum window size. + # + # @return [Channel] a new instance of Channel + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#112 + def initialize(connection, type, local_id, max_pkt_size = T.unsafe(nil), max_win_size = T.unsafe(nil), &on_confirm_open); end + + # A shortcut for accessing properties of the channel (see #properties). + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#135 + def [](name); end + + # A shortcut for setting properties of the channel (see #properties). + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#140 + def []=(name, value); end + + # Returns true if the channel exists in the channel list of the session, + # and false otherwise. This can be used to determine whether a channel has + # been closed or not. + # + # ssh.loop { channel.active? } + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#262 + def active?; end + + # Requests that the channel be closed. It only marks the channel to be closed + # the CHANNEL_CLOSE message will be sent from event loop + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#299 + def close; end + + # True if close() has been called; NOTE: if the channel has data waiting to + # be sent then the channel will close after all the data is sent. See + # closed?() to determine if we have actually sent CHANNEL_CLOSE to server. + # This may be true for awhile before closed? returns true if we are still + # sending buffered output to server. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#280 + def closing?; end + + # The underlying Net::SSH::Connection::Session instance that supports this channel. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#68 + def connection; end + + # Invokes the #on_close callback when the server closes a channel. + # The channel is the only argument. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#613 + def do_close; end + + # Invokes the #on_data callback when the server sends data to the + # channel. This will reduce the available window size on the local end, + # but does not actually throttle requests that come in illegally when + # the window size is too small. The callback is invoked with the channel + # as the first argument, and the data as the second. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#590 + def do_data(data); end + + # Invokes the #on_eof callback when the server indicates that no + # further data is forthcoming. The callback is invoked with the channel + # as the argument. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#607 + def do_eof; end + + # Invokes the #on_extended_data callback when the server sends + # extended data to the channel. This will reduce the available window + # size on the local end. The callback is invoked with the channel, + # type, and data. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#599 + def do_extended_data(type, data); end + + # Invokes the next pending request callback with +false+ as the second + # argument. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#619 + def do_failure; end + + # Invoked when the server confirms that a channel has been opened. + # The remote_id is the id of the channel as assigned by the remote host, + # and max_window and max_packet are the maximum window and maximum + # packet sizes, respectively. If an open-confirmation callback was + # given when the channel was created, it is invoked at this time with + # the channel itself as the sole argument. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#530 + def do_open_confirmation(remote_id, max_window, max_packet); end + + # Invoked when the server failed to open the channel. If an #on_open_failed + # callback was specified, it will be invoked with the channel, reason code, + # and description as arguments. Otherwise, a ChannelOpenFailed exception + # will be raised. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#544 + def do_open_failed(reason_code, description); end + + # Invoked when the server sends a channel request. If any #on_request + # callback has been registered for the specific type of this request, + # it is invoked. If +want_reply+ is true, a packet will be sent of + # either CHANNEL_SUCCESS or CHANNEL_FAILURE type. If there was no callback + # to handle the request, CHANNEL_FAILURE will be sent. Otherwise, + # CHANNEL_SUCCESS, unless the callback raised ChannelRequestFailed. The + # callback should accept the channel as the first argument, and the + # request-specific data as the second. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#569 + def do_request(request, want_reply, data); end + + # Invokes the next pending request callback with +true+ as the second + # argument. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#629 + def do_success; end + + # Invoked when the server sends a CHANNEL_WINDOW_ADJUST packet, and + # causes the remote window size to be adjusted upwards by the given + # number of bytes. This has the effect of allowing more data to be sent + # from the local end to the remote end of the channel. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#556 + def do_window_adjust(bytes); end + + # Enqueues pending output at the connection as CHANNEL_DATA packets. This + # does nothing if the channel has not yet been confirmed open (see + # #do_open_confirmation). This is called automatically by #process, which + # is called from the event loop (Connection::Session#process). You will + # generally not need to invoke it directly. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#506 + def enqueue_pending_output; end + + # Syntactic sugar for setting an environment variable in the remote + # process' environment. Note that for security reasons, the server may + # refuse to set certain environment variables, or all, at the server's + # discretion. If you are connecting to an OpenSSH server, you will + # need to update the AcceptEnv setting in the sshd_config to include the + # environment variables you want to send. + # + # channel.env "PATH", "/usr/local/bin" + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#189 + def env(variable_name, variable_value, &block); end + + # Tells the remote end of the channel that no more data is forthcoming + # from this end of the channel. The remote end may still send data. + # The CHANNEL_EOF packet will be sent once the output buffer is empty. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#315 + def eof!; end + + # Returns true if the local end of the channel has declared that no more + # data is forthcoming (see #eof!). Trying to send data via #send_data when + # this is true will result in an exception being raised. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#308 + def eof?; end + + # Syntactic sugar for executing a command. Sends a channel request asking + # that the given command be invoked. If the block is given, it will be + # called when the server responds. The first parameter will be the + # channel, and the second will be true or false, indicating whether the + # request succeeded or not. In this case, success means that the command + # is being executed, not that it has completed, and failure means that the + # command altogether failed to be executed. + # + # channel.exec "ls -l /home" do |ch, success| + # if success + # puts "command has begun executing..." + # # this is a good place to hang callbacks like #on_data... + # else + # puts "alas! the command could not be invoked!" + # end + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#160 + def exec(command, &block); end + + # True if we have sent CHANNEL_CLOSE to the remote server. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#285 + def local_closed?; end + + # The local id for this channel, assigned by the Net::SSH::Connection::Session instance. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#59 + def local_id; end + + # The maximum packet size that the local host can receive. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#71 + def local_maximum_packet_size; end + + # The maximum amount of data that the local end of this channel can + # receive. This is a total, not per-packet. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#75 + def local_maximum_window_size; end + + # This is the remaining window size on the local end of this channel. When + # this reaches zero, no more data can be received. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#86 + def local_window_size; end + + # Registers a callback to be invoked when the server acknowledges that a + # channel is closed. This is invoked with the channel as the sole argument. + # + # channel.on_close do |ch| + # puts "remote end is closing!" + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#403 + def on_close(&block); end + + # Registers a callback to be invoked when data packets are received by the + # channel. The callback is called with the channel as the first argument, + # and the data as the second. + # + # channel.on_data do |ch, data| + # puts "got data: #{data.inspect}" + # end + # + # Data received this way is typically the data written by the remote + # process to its +stdout+ stream. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#350 + def on_data(&block); end + + # Registers a callback to be invoked when the server indicates that no more + # data will be sent to the channel (although the channel can still send + # data to the server). The channel is the sole argument to the callback. + # + # channel.on_eof do |ch| + # puts "remote end is done sending data" + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#415 + def on_eof(&block); end + + # Registers a callback to be invoked when extended data packets are received + # by the channel. The callback is called with the channel as the first + # argument, the data type (as an integer) as the second, and the data as + # the third. Extended data is almost exclusively used to send +stderr+ data + # (+type+ == 1). Other extended data types are not defined by the SSH + # protocol. + # + # channel.on_extended_data do |ch, type, data| + # puts "got stderr: #{data.inspect}" + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#365 + def on_extended_data(&block); end + + # Registers a callback to be invoked when the server was unable to open + # the requested channel. The channel itself will be passed to the block, + # along with the integer "reason code" for the failure, and a textual + # description of the failure from the server. + # + # channel = session.open_channel do |ch| + # # .. + # end + # + # channel.on_open_failed { |ch, code, desc| ... } + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#430 + def on_open_failed(&block); end + + # Registers a callback to be invoked for each pass of the event loop for + # this channel. There are no guarantees on timeliness in the event loop, + # but it will be called roughly once for each packet received by the + # connection (not the channel). This callback is invoked with the channel + # as the sole argument. + # + # Here's an example that accumulates the channel data into a variable on + # the channel itself, and displays individual lines in the input one + # at a time when the channel is processed: + # + # channel[:data] = "" + # + # channel.on_data do |ch, data| + # channel[:data] << data + # end + # + # channel.on_process do |ch| + # if channel[:data] =~ /^.*?\n/ + # puts $& + # channel[:data] = $' + # end + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#392 + def on_process(&block); end + + # Registers a callback to be invoked when a channel request of the given + # type is received. The callback will receive the channel as the first + # argument, and the associated (unparsed) data as the second. The data + # will be a Net::SSH::Buffer that you will need to parse, yourself, + # according to the kind of request you are watching. + # + # By default, if the request wants a reply, Net::SSH will send a + # CHANNEL_SUCCESS response for any request that was handled by a registered + # callback, and CHANNEL_FAILURE for any that wasn't, but if you want your + # registered callback to result in a CHANNEL_FAILURE response, just raise + # Net::SSH::ChannelRequestFailed. + # + # Some common channel requests that your programs might want to listen + # for are: + # + # * "exit-status" : the exit status of the remote process will be reported + # as a long integer in the data buffer, which you can grab via + # data.read_long. + # * "exit-signal" : if the remote process died as a result of a signal + # being sent to it, the signal will be reported as a string in the + # data, via data.read_string. (Not all SSH servers support this channel + # request type.) + # + # channel.on_request "exit-status" do |ch, data| + # puts "process terminated with exit status: #{data.read_long}" + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#461 + def on_request(type, &block); end + + # The output buffer for this channel. Data written to the channel is + # enqueued here, to be written as CHANNEL_DATA packets during each pass of + # the event loop. See Connection::Session#process and #enqueue_pending_output. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#99 + def output; end + + # The list of pending requests. Each time a request is sent which requires + # a reply, the corresponding callback is pushed onto this queue. As responses + # arrive, they are shifted off the front and handled. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#104 + def pending_requests; end + + # If an #on_process handler has been set up, this will cause it to be + # invoked (passing the channel itself as an argument). It also causes all + # pending output to be enqueued as CHANNEL_DATA packets (see #enqueue_pending_output). + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#324 + def process; end + + # A hash of properties for this channel. These can be used to store state + # information about this channel. See also #[] and #[]=. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#94 + def properties; end + + # source://net-ssh//lib/net/ssh/connection/channel.rb#293 + def remote_closed!; end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#289 + def remote_closed?; end + + # The remote id for this channel, assigned by the remote host. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#62 + def remote_id; end + + # The maximum packet size that the remote host can receive. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#78 + def remote_maximum_packet_size; end + + # The maximum amount of data that the remote end of this channel can + # receive. This is a total, not per-packet. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#82 + def remote_maximum_window_size; end + + # This is the remaining window size on the remote end of this channel. When + # this reaches zero, no more data can be sent. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#90 + def remote_window_size; end + + # Requests that a pseudo-tty (or "pty") be made available for this channel. + # This is useful when you want to invoke and interact with some kind of + # screen-based program (e.g., vim, or some menuing system). + # + # Note, that without a pty some programs (e.g. sudo, or subversion) on + # some systems, will not be able to run interactively, and will error + # instead of prompt if they ever need some user interaction. + # + # Note, too, that when a pty is requested, user's shell configuration + # scripts (.bashrc and such) are not run by default, whereas they are + # run when a pty is not present. + # + # channel.request_pty do |ch, success| + # if success + # puts "pty successfully obtained" + # else + # puts "could not obtain pty" + # end + # end + # + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#220 + def request_pty(opts = T.unsafe(nil), &block); end + + # Sends a new channel request with the given name. The extra +data+ + # parameter must either be empty, or consist of an even number of + # arguments. See Net::SSH::Buffer.from for a description of their format. + # If a block is given, it is registered as a callback for a pending + # request, and the packet will be flagged so that the server knows a + # reply is required. If no block is given, the server will send no + # response to this request. Responses, where required, will cause the + # callback to be invoked with the channel as the first argument, and + # either true or false as the second, depending on whether the request + # succeeded or not. The meaning of "success" and "failure" in this context + # is dependent on the specific request that was sent. + # + # channel.send_channel_request "shell" do |ch, success| + # if success + # puts "user shell started successfully" + # else + # puts "could not start user shell" + # end + # end + # + # Most channel requests you'll want to send are already wrapped in more + # convenient helper methods (see #exec and #subsystem). + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#488 + def send_channel_request(request_name, *data, &callback); end + + # Sends data to the channel's remote endpoint. This usually has the + # effect of sending the given string to the remote process' stdin stream. + # Note that it does not immediately send the data across the channel, + # but instead merely appends the given data to the channel's output buffer, + # preparatory to being packaged up and sent out the next time the connection + # is accepting data. (A connection might not be accepting data if, for + # instance, it has filled its data window and has not yet been resized by + # the remote end-point.) + # + # This will raise an exception if the channel has previously declared + # that no more data will be sent (see #eof!). + # + # channel.send_data("the password\n") + # + # @raise [EOFError] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#251 + def send_data(data); end + + # Syntactic sugar for requesting that a subsystem be started. Subsystems + # are a way for other protocols (like SFTP) to be run, using SSH as + # the transport. Generally, you'll never need to call this directly unless + # you are the implementor of something that consumes an SSH subsystem, like + # SFTP. + # + # channel.subsystem("sftp") do |ch, success| + # if success + # puts "subsystem successfully started" + # else + # puts "subsystem could not be started" + # end + # end + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#177 + def subsystem(subsystem, &block); end + + # The type of this channel, usually "session". + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#65 + def type; end + + # Runs the SSH event loop until the channel is no longer active. This is + # handy for blocking while you wait for some channel to finish. + # + # channel.exec("grep ...") { ... } + # channel.wait + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#271 + def wait; end + + private + + # Gets an +Array+ of local environment variables in the remote process' + # environment. + # A variable name can either be described by a +Regexp+ or +String+. + # + # channel.forward_local_env [/^GIT_.*$/, "LANG"] + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#671 + def forward_local_env(env_variable_patterns); end + + # Set a +Hash+ of environment variables in the remote process' environment. + # + # channel.set_remote_env foo: 'bar', baz: 'whale' + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#688 + def set_remote_env(env); end + + # Updates the local window size by the given amount. If the window + # size drops to less than half of the local maximum (an arbitrary + # threshold), a CHANNEL_WINDOW_ADJUST message will be sent to the + # server telling it that the window size has grown. + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#652 + def update_local_window_size(size); end + + # Runs the SSH event loop until the remote confirmed channel open + # experimental api + # + # source://net-ssh//lib/net/ssh/connection/channel.rb#641 + def wait_until_open_confirmed; end +end + +# source://net-ssh//lib/net/ssh/connection/channel.rb#646 +Net::SSH::Connection::Channel::GOOD_LOCAL_MAXIUMUM_WINDOW_SIZE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/channel.rb#645 +Net::SSH::Connection::Channel::LOCAL_WINDOW_SIZE_INCREMENT = T.let(T.unsafe(nil), Integer) + +# A hash of the valid PTY options (see #request_pty). +# +# source://net-ssh//lib/net/ssh/connection/channel.rb#194 +Net::SSH::Connection::Channel::VALID_PTY_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Definitions of constants that are specific to the connection layer of the +# SSH protocol. +# +# source://net-ssh//lib/net/ssh/connection/constants.rb#6 +module Net::SSH::Connection::Constants; end + +# source://net-ssh//lib/net/ssh/connection/constants.rb#26 +Net::SSH::Connection::Constants::CHANNEL_CLOSE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#23 +Net::SSH::Connection::Constants::CHANNEL_DATA = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#25 +Net::SSH::Connection::Constants::CHANNEL_EOF = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#24 +Net::SSH::Connection::Constants::CHANNEL_EXTENDED_DATA = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#29 +Net::SSH::Connection::Constants::CHANNEL_FAILURE = T.let(T.unsafe(nil), Integer) + +# -- +# Channel related messages +# ++ +# +# source://net-ssh//lib/net/ssh/connection/constants.rb#19 +Net::SSH::Connection::Constants::CHANNEL_OPEN = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#20 +Net::SSH::Connection::Constants::CHANNEL_OPEN_CONFIRMATION = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#21 +Net::SSH::Connection::Constants::CHANNEL_OPEN_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#27 +Net::SSH::Connection::Constants::CHANNEL_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#28 +Net::SSH::Connection::Constants::CHANNEL_SUCCESS = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#22 +Net::SSH::Connection::Constants::CHANNEL_WINDOW_ADJUST = T.let(T.unsafe(nil), Integer) + +# -- +# Connection protocol generic messages +# ++ +# +# source://net-ssh//lib/net/ssh/connection/constants.rb#11 +Net::SSH::Connection::Constants::GLOBAL_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#13 +Net::SSH::Connection::Constants::REQUEST_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/constants.rb#12 +Net::SSH::Connection::Constants::REQUEST_SUCCESS = T.let(T.unsafe(nil), Integer) + +# EventLoop can be shared across multiple sessions +# +# one issue is with blocks passed to loop, etc. +# they should get current session as parameter, but in +# case you're using multiple sessions in an event loop it doesnt makes sense +# and we don't pass session. +# +# source://net-ssh//lib/net/ssh/connection/event_loop.rb#12 +class Net::SSH::Connection::EventLoop + include ::Net::SSH::Loggable + + # @return [EventLoop] a new instance of EventLoop + # + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#15 + def initialize(logger = T.unsafe(nil)); end + + # Call preprocess on each session. If block given and that + # block retuns false then we exit the processing + # + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#48 + def ev_preprocess(&block); end + + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#57 + def ev_select_and_postprocess(wait); end + + # process until timeout + # if a block is given a session will be removed from loop + # if block returns false for that session + # + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#27 + def process(wait = T.unsafe(nil), &block); end + + # process the event loop but only for the sepcified session + # + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#34 + def process_only(session, wait = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#20 + def register(session); end +end + +# source://net-ssh//lib/net/ssh/connection/keepalive.rb#5 +class Net::SSH::Connection::Keepalive + include ::Net::SSH::Loggable + + # @return [Keepalive] a new instance of Keepalive + # + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#8 + def initialize(session); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#19 + def enabled?; end + + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#23 + def interval; end + + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#34 + def keepalive_maxcount; end + + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#15 + def options; end + + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#38 + def send_as_needed(was_events); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/keepalive.rb#27 + def should_send?; end +end + +# A session class representing the connection service running on top of +# the SSH transport layer. It manages the creation of channels (see +# #open_channel), and the dispatching of messages to the various channels. +# It also encapsulates the SSH event loop (via #loop and #process), +# and serves as a central point-of-reference for all SSH-related services (e.g. +# port forwarding, SFTP, SCP, etc.). +# +# You will rarely (if ever) need to instantiate this class directly; rather, +# you'll almost always use Net::SSH.start to initialize a new network +# connection, authenticate a user, and return a new connection session, +# all in one call. +# +# Net::SSH.start("localhost", "user") do |ssh| +# # 'ssh' is an instance of Net::SSH::Connection::Session +# ssh.exec! "/etc/init.d/some_process start" +# end +# +# source://net-ssh//lib/net/ssh/connection/session.rb#27 +class Net::SSH::Connection::Session + include ::Net::SSH::Loggable + include ::Net::SSH::Connection::Constants + + # Create a new connection service instance atop the given transport + # layer. Initializes the listeners to be only the underlying socket object. + # + # @return [Session] a new instance of Session + # + # source://net-ssh//lib/net/ssh/connection/session.rb#68 + def initialize(transport, options = T.unsafe(nil)); end + + # Retrieves a custom property from this instance. This can be used to + # store additional state in applications that must manage multiple + # SSH connections. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#94 + def [](key); end + + # Sets a custom property for this instance. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#99 + def []=(key, value); end + + # Returns +true+ if there are any channels currently active on this + # session. By default, this will not include "invisible" channels + # (such as those created by forwarding ports and such), but if you pass + # a +true+ value for +include_invisible+, then those will be counted. + # + # This can be useful for determining whether the event loop should continue + # to be run. + # + # ssh.loop { ssh.busy? } + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/session.rb#152 + def busy?(include_invisible = T.unsafe(nil)); end + + # The map of specialized handlers for opening specific channel types. See + # #on_open_channel. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#51 + def channel_open_handlers; end + + # The map of channels, each key being the local-id for the channel. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#44 + def channels; end + + # source://net-ssh//lib/net/ssh/connection/session.rb#522 + def cleanup_channel(channel); end + + # Closes the session gracefully, blocking until all channels have + # successfully closed, and then closes the underlying transport layer + # connection. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#121 + def close; end + + # Returns true if the underlying transport has been closed. Note that + # this can be a little misleading, since if the remote server has + # closed the connection, the local end will still think it is open + # until the next operation on the socket. Nevertheless, this method can + # be useful if you just want to know if _you_ have closed the connection. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/connection/session.rb#114 + def closed?; end + + # Returns the file descriptors the event loop should wait for read/write events, + # we also return the max wait + # + # source://net-ssh//lib/net/ssh/connection/session.rb#255 + def ev_do_calculate_rw_wait(wait); end + + # It loops over the given arrays of reader IO's and writer IO's, + # processing them as needed, and + # then calls Net::SSH::Transport::Session#rekey_as_needed to allow the + # transport layer to rekey. Then returns true. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#270 + def ev_do_handle_events(readers, writers); end + + # calls Net::SSH::Transport::Session#rekey_as_needed to allow the + # transport layer to rekey + # + # source://net-ssh//lib/net/ssh/connection/session.rb#289 + def ev_do_postprocess(was_events); end + + # Called by event loop to process available data before going to + # event multiplexing + # + # source://net-ssh//lib/net/ssh/connection/session.rb#248 + def ev_preprocess(&block); end + + # A convenience method for executing a command and interacting with it. If + # no block is given, all output is printed via $stdout and $stderr. Otherwise, + # the block is called for each data and extended data packet, with three + # arguments: the channel object, a symbol indicating the data type + # (:stdout or :stderr), and the data (as a string). + # + # Note that this method returns immediately, and requires an event loop + # (see Session#loop) in order for the command to actually execute. + # + # This is effectively identical to calling #open_channel, and then + # Net::SSH::Connection::Channel#exec, and then setting up the channel + # callbacks. However, for most uses, this will be sufficient. + # + # ssh.exec "grep something /some/files" do |ch, stream, data| + # if stream == :stderr + # puts "ERROR: #{data}" + # else + # puts data + # end + # end + # + # source://net-ssh//lib/net/ssh/connection/session.rb#379 + def exec(command, status: T.unsafe(nil), &block); end + + # Same as #exec, except this will block until the command finishes. Also, + # if no block is given, this will return all output (stdout and stderr) + # as a single string. + # + # matches = ssh.exec!("grep something /some/files") + # + # the returned string has an exitstatus method to query its exit status + # + # source://net-ssh//lib/net/ssh/connection/session.rb#420 + def exec!(command, status: T.unsafe(nil), &block); end + + # Returns a reference to the Net::SSH::Service::Forward service, which can + # be used for forwarding ports over SSH. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#493 + def forward; end + + # Returns the name of the host that was given to the transport layer to + # connect to. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#105 + def host; end + + # Adds an IO object for the event loop to listen to. If a callback + # is given, it will be invoked when the io is ready to be read, otherwise, + # the io will merely have its #fill method invoked. + # + # Any +io+ value passed to this method _must_ have mixed into it the + # Net::SSH::BufferedIo functionality, typically by calling #extend on the + # object. + # + # The following example executes a process on the remote server, opens + # a socket to somewhere, and then pipes data from that socket to the + # remote process' stdin stream: + # + # channel = ssh.open_channel do |ch| + # ch.exec "/some/process/that/wants/input" do |ch, success| + # abort "can't execute!" unless success + # + # io = TCPSocket.new(somewhere, port) + # io.extend(Net::SSH::BufferedIo) + # ssh.listen_to(io) + # + # ch.on_process do + # if io.available > 0 + # ch.send_data(io.read_available) + # end + # end + # + # ch.on_close do + # ssh.stop_listening_to(io) + # io.close + # end + # end + # end + # + # channel.wait + # + # source://net-ssh//lib/net/ssh/connection/session.rb#481 + def listen_to(io, &callback); end + + # The map of listeners that the event loop knows about. See #listen_to. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#47 + def listeners; end + + # The main event loop. Calls #process until #process returns false. If a + # block is given, it is passed to #process, otherwise a default proc is + # used that just returns true if there are any channels active (see #busy?). + # The # +wait+ parameter is also passed through to #process (where it is + # interpreted as the maximum number of seconds to wait for IO.select to return). + # + # # loop for as long as there are any channels active + # ssh.loop + # + # # loop for as long as there are any channels active, but make sure + # # the event loop runs at least once per 0.1 second + # ssh.loop(0.1) + # + # # loop until ctrl-C is pressed + # int_pressed = false + # trap("INT") { int_pressed = true } + # ssh.loop(0.1) { not int_pressed } + # + # source://net-ssh//lib/net/ssh/connection/session.rb#177 + def loop(wait = T.unsafe(nil), &block); end + + # If the #preprocess and #postprocess callbacks for this session need to run + # periodically, this method returns the maximum number of seconds which may + # pass between callbacks. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#532 + def max_select_wait_time; end + + # Registers a handler to be invoked when the server sends a global request + # of the given type. The callback receives the request data as the first + # parameter, and true/false as the second (indicating whether a response + # is required). If the callback sends the response, it should return + # :sent. Otherwise, if it returns true, REQUEST_SUCCESS will be sent, and + # if it returns false, REQUEST_FAILURE will be sent. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#517 + def on_global_request(type, &block); end + + # Registers a handler to be invoked when the server wants to open a + # channel on the client. The callback receives the connection object, + # the new channel object, and the packet itself as arguments, and should + # raise ChannelOpenFailed if it is unable to open the channel for some + # reason. Otherwise, the channel will be opened and a confirmation message + # sent to the server. + # + # This is used by the Net::SSH::Service::Forward service to open a channel + # when a remote forwarded port receives a connection. However, you are + # welcome to register handlers for other channel types, as needed. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#507 + def on_open_channel(type, &block); end + + # Requests that a new channel be opened. By default, the channel will be + # of type "session", but if you know what you're doing you can select any + # of the channel types supported by the SSH protocol. The +extra+ parameters + # must be even in number and conform to the same format as described for + # Net::SSH::Buffer.from. If a callback is given, it will be invoked when + # the server confirms that the channel opened successfully. The sole parameter + # for the callback is the channel object itself. + # + # In general, you'll use #open_channel without any arguments; the only + # time you'd want to set the channel type or pass additional initialization + # data is if you were implementing an SSH extension. + # + # channel = ssh.open_channel do |ch| + # ch.exec "grep something /some/files" do |ch, success| + # ... + # end + # end + # + # channel.wait + # + # source://net-ssh//lib/net/ssh/connection/session.rb#338 + def open_channel(type = T.unsafe(nil), *extra, &on_confirm); end + + # The map of options that were used to initialize this instance. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#38 + def options; end + + # The list of callbacks for pending requests. See #send_global_request. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#54 + def pending_requests; end + + # This is called internally as part of #process. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#262 + def postprocess(readers, writers); end + + # This is called internally as part of #process. It dispatches any + # available incoming packets, and then runs Net::SSH::Connection::Channel#process + # for any active channels. If a block is given, it is invoked at the + # start of the method and again at the end, and if the block ever returns + # false, this method returns false. Otherwise, it returns true. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#237 + def preprocess(&block); end + + # The core of the event loop. It processes a single iteration of the event + # loop. If a block is given, it should return false when the processing + # should abort, which causes #process to return false. Otherwise, + # #process returns true. The session itself is yielded to the block as its + # only argument. + # + # If +wait+ is nil (the default), this method will block until any of the + # monitored IO objects are ready to be read from or written to. If you want + # it to not block, you can pass 0, or you can pass any other numeric value + # to indicate that it should block for no more than that many seconds. + # Passing 0 is a good way to poll the connection, but if you do it too + # frequently it can make your CPU quite busy! + # + # This will also cause all active channels to be processed once each (see + # Net::SSH::Connection::Channel#on_process). + # + # TODO revise example + # + # # process multiple Net::SSH connections in parallel + # connections = [ + # Net::SSH.start("host1", ...), + # Net::SSH.start("host2", ...) + # ] + # + # connections.each do |ssh| + # ssh.exec "grep something /in/some/files" + # end + # + # condition = Proc.new { |s| s.busy? } + # + # loop do + # connections.delete_if { |ssh| !ssh.process(0.1, &condition) } + # break if connections.empty? + # end + # + # source://net-ssh//lib/net/ssh/connection/session.rb#225 + def process(wait = T.unsafe(nil), &block); end + + # The collection of custom properties for this instance. (See #[] and #[]=). + # + # source://net-ssh//lib/net/ssh/connection/session.rb#41 + def properties; end + + # source://net-scp/4.0.0/lib/net/scp.rb#445 + def scp; end + + # Send a global request of the given type. The +extra+ parameters must + # be even in number, and conform to the same format as described for + # Net::SSH::Buffer.from. If a callback is not specified, the request will + # not require a response from the server, otherwise the server is required + # to respond and indicate whether the request was successful or not. This + # success or failure is indicated by the callback being invoked, with the + # first parameter being true or false (success, or failure), and the second + # being the packet itself. + # + # Generally, Net::SSH will manage global requests that need to be sent + # (e.g. port forward requests and such are handled in the Net::SSH::Service::Forward + # class, for instance). However, there may be times when you need to + # send a global request that isn't explicitly handled by Net::SSH, and so + # this method is available to you. + # + # ssh.send_global_request("keep-alive@openssh.com") + # + # source://net-ssh//lib/net/ssh/connection/session.rb#311 + def send_global_request(type, *extra, &callback); end + + # Enqueues a message to be sent to the server as soon as the socket is + # available for writing. Most programs will never need to call this, but + # if you are implementing an extension to the SSH protocol, or if you + # need to send a packet that Net::SSH does not directly support, you can + # use this to send it. + # + # ssh.send_message(Buffer.from(:byte, REQUEST_SUCCESS).to_s) + # + # source://net-ssh//lib/net/ssh/connection/session.rb#443 + def send_message(message); end + + # Performs a "hard" shutdown of the connection. In general, this should + # never be done, but it might be necessary (in a rescue clause, for instance, + # when the connection needs to close but you don't know the status of the + # underlying protocol's state). + # + # source://net-ssh//lib/net/ssh/connection/session.rb#136 + def shutdown!; end + + # Removes the given io object from the listeners collection, so that the + # event loop will no longer monitor it. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#487 + def stop_listening_to(io); end + + # The underlying transport layer abstraction (see Net::SSH::Transport::Session). + # + # source://net-ssh//lib/net/ssh/connection/session.rb#35 + def transport; end + + private + + # source://net-ssh//lib/net/ssh/connection/session.rb#682 + def channel_close(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#568 + def channel_closed(channel); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#667 + def channel_data(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#677 + def channel_eof(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#672 + def channel_extended_data(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#694 + def channel_failure(packet); end + + # Called when the server wants to open a channel. If no registered + # channel handler exists for the given channel type, CHANNEL_OPEN_FAILURE + # is returned, otherwise the callback is invoked and everything proceeds + # accordingly. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#612 + def channel_open(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#645 + def channel_open_confirmation(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#651 + def channel_open_failure(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#662 + def channel_request(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#689 + def channel_success(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#657 + def channel_window_adjust(packet); end + + # Read all pending packets from the connection and dispatch them as + # appropriate. Returns as soon as there are no more pending packets. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#545 + def dispatch_incoming_packets(raise_disconnect_errors: T.unsafe(nil)); end + + # iterate channels with the posibility of callbacks opening new channels during the iteration + # + # source://net-ssh//lib/net/ssh/connection/session.rb#539 + def each_channel(&block); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#562 + def force_channel_cleanup_on_close; end + + # Returns the next available channel id to be assigned, and increments + # the counter. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#558 + def get_next_channel_id; end + + # Invoked when a global request is received. The registered global + # request callback will be invoked, if one exists, and the necessary + # reply returned. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#579 + def global_request(packet); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#699 + def io_select_wait(wait); end + + # preserve a reference to Kernel#loop + def loop_forever; end + + # Invokes the next pending request callback with +false+. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#602 + def request_failure(packet); end + + # Invokes the next pending request callback with +true+. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#595 + def request_success(packet); end +end + +# Default IO.select timeout threshold +# +# source://net-ssh//lib/net/ssh/connection/session.rb#32 +Net::SSH::Connection::Session::DEFAULT_IO_SELECT_TIMEOUT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/connection/session.rb#703 +Net::SSH::Connection::Session::MAP = T.let(T.unsafe(nil), Hash) + +# source://net-ssh//lib/net/ssh/connection/session.rb#56 +class Net::SSH::Connection::Session::NilChannel + # @return [NilChannel] a new instance of NilChannel + # + # source://net-ssh//lib/net/ssh/connection/session.rb#57 + def initialize(session); end + + # source://net-ssh//lib/net/ssh/connection/session.rb#61 + def method_missing(sym, *args); end +end + +# source://net-ssh//lib/net/ssh/connection/session.rb#350 +class Net::SSH::Connection::Session::StringWithExitstatus < ::String + # @return [StringWithExitstatus] a new instance of StringWithExitstatus + # + # source://net-ssh//lib/net/ssh/connection/session.rb#351 + def initialize(str, exitstatus); end + + # Returns the value of attribute exitstatus. + # + # source://net-ssh//lib/net/ssh/connection/session.rb#356 + def exitstatus; end +end + +# optimized version for a single session +# +# source://net-ssh//lib/net/ssh/connection/event_loop.rb#98 +class Net::SSH::Connection::SingleSessionEventLoop < ::Net::SSH::Connection::EventLoop + # Compatibility for original single session event loops: + # we call block with session as argument + # + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#101 + def ev_preprocess(&block); end + + # source://net-ssh//lib/net/ssh/connection/event_loop.rb#110 + def ev_select_and_postprocess(wait); end +end + +# These constants are used when requesting a pseudo-terminal (via +# Net::SSH::Connection::Channel#request_pty). The descriptions for each are +# taken directly from RFC 4254 ("The Secure Shell (SSH) Connection Protocol"), +# http://tools.ietf.org/html/rfc4254. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#8 +module Net::SSH::Connection::Term; end + +# 7 bit mode. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#161 +Net::SSH::Connection::Term::CS7 = T.let(T.unsafe(nil), Integer) + +# 8 bit mode. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#164 +Net::SSH::Connection::Term::CS8 = T.let(T.unsafe(nil), Integer) + +# Enable echoing. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#113 +Net::SSH::Connection::Term::ECHO = T.let(T.unsafe(nil), Integer) + +# Echo control characters as ^(Char). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#134 +Net::SSH::Connection::Term::ECHOCTL = T.let(T.unsafe(nil), Integer) + +# Visually erase chars. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#116 +Net::SSH::Connection::Term::ECHOE = T.let(T.unsafe(nil), Integer) + +# Kill character discards current line. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#119 +Net::SSH::Connection::Term::ECHOK = T.let(T.unsafe(nil), Integer) + +# Visual erase for line kill. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#137 +Net::SSH::Connection::Term::ECHOKE = T.let(T.unsafe(nil), Integer) + +# Echo NL even if ECHO is off. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#122 +Net::SSH::Connection::Term::ECHONL = T.let(T.unsafe(nil), Integer) + +# Canonicalize input lines. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#106 +Net::SSH::Connection::Term::ICANON = T.let(T.unsafe(nil), Integer) + +# Map CR to NL on input. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#85 +Net::SSH::Connection::Term::ICRNL = T.let(T.unsafe(nil), Integer) + +# Enable extensions. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#131 +Net::SSH::Connection::Term::IEXTEN = T.let(T.unsafe(nil), Integer) + +# Ignore CR on input. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#82 +Net::SSH::Connection::Term::IGNCR = T.let(T.unsafe(nil), Integer) + +# The ignore parity flag. The parameter SHOULD be 0 if this flag is FALSE, +# and 1 if it is TRUE. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#67 +Net::SSH::Connection::Term::IGNPAR = T.let(T.unsafe(nil), Integer) + +# Ring bell on input queue full. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#100 +Net::SSH::Connection::Term::IMAXBEL = T.let(T.unsafe(nil), Integer) + +# Map NL into CR on input. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#79 +Net::SSH::Connection::Term::INCLR = T.let(T.unsafe(nil), Integer) + +# Enable checking of parity errors. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#73 +Net::SSH::Connection::Term::INPCK = T.let(T.unsafe(nil), Integer) + +# Enable signals INTR, QUIT, [D]SUSP. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#103 +Net::SSH::Connection::Term::ISIG = T.let(T.unsafe(nil), Integer) + +# Strip 8th bit off characters. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#76 +Net::SSH::Connection::Term::ISTRIP = T.let(T.unsafe(nil), Integer) + +# Translate uppercase characters to lowercase. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#88 +Net::SSH::Connection::Term::IUCLC = T.let(T.unsafe(nil), Integer) + +# Any char will restart after stop. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#94 +Net::SSH::Connection::Term::IXANY = T.let(T.unsafe(nil), Integer) + +# Enable input flow control. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#97 +Net::SSH::Connection::Term::IXOFF = T.let(T.unsafe(nil), Integer) + +# Enable output flow control. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#91 +Net::SSH::Connection::Term::IXON = T.let(T.unsafe(nil), Integer) + +# Don't flush after interrupt. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#125 +Net::SSH::Connection::Term::NOFLSH = T.let(T.unsafe(nil), Integer) + +# Translate carriage return to newline (output). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#152 +Net::SSH::Connection::Term::OCRNL = T.let(T.unsafe(nil), Integer) + +# Convert lowercase to uppercase. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#146 +Net::SSH::Connection::Term::OLCUC = T.let(T.unsafe(nil), Integer) + +# Map NL to CR-NL. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#149 +Net::SSH::Connection::Term::ONLCR = T.let(T.unsafe(nil), Integer) + +# Newline performs a carriage return (output). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#158 +Net::SSH::Connection::Term::ONLRET = T.let(T.unsafe(nil), Integer) + +# Translate newline to carriage return-newline (output). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#155 +Net::SSH::Connection::Term::ONOCR = T.let(T.unsafe(nil), Integer) + +# Enable output processing. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#143 +Net::SSH::Connection::Term::OPOST = T.let(T.unsafe(nil), Integer) + +# Parity enable. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#167 +Net::SSH::Connection::Term::PARENB = T.let(T.unsafe(nil), Integer) + +# Mark parity and framing errors. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#70 +Net::SSH::Connection::Term::PARMRK = T.let(T.unsafe(nil), Integer) + +# Odd parity, else even. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#170 +Net::SSH::Connection::Term::PARODD = T.let(T.unsafe(nil), Integer) + +# Retype pending input. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#140 +Net::SSH::Connection::Term::PENDIN = T.let(T.unsafe(nil), Integer) + +# Stop background jobs from output. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#128 +Net::SSH::Connection::Term::TOSTOP = T.let(T.unsafe(nil), Integer) + +# Specifies the input baud rate in bits per second. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#173 +Net::SSH::Connection::Term::TTY_OP_ISPEED = T.let(T.unsafe(nil), Integer) + +# Specifies the output baud rate in bits per second. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#176 +Net::SSH::Connection::Term::TTY_OP_OSPEED = T.let(T.unsafe(nil), Integer) + +# Toggles the flushing of terminal output. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#63 +Net::SSH::Connection::Term::VDISCARD = T.let(T.unsafe(nil), Integer) + +# Another suspend character. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#41 +Net::SSH::Connection::Term::VDSUSP = T.let(T.unsafe(nil), Integer) + +# End-of-file character (sends EOF from the terminal). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#23 +Net::SSH::Connection::Term::VEOF = T.let(T.unsafe(nil), Integer) + +# End-of-line character in addition to carriage return and/or linefeed. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#26 +Net::SSH::Connection::Term::VEOL = T.let(T.unsafe(nil), Integer) + +# Additional end-of-line character. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#29 +Net::SSH::Connection::Term::VEOL2 = T.let(T.unsafe(nil), Integer) + +# Erase the character to left of the cursor. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#17 +Net::SSH::Connection::Term::VERASE = T.let(T.unsafe(nil), Integer) + +# Character to flush output. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#54 +Net::SSH::Connection::Term::VFLUSH = T.let(T.unsafe(nil), Integer) + +# Interrupt character; 255 if none. Similarly for the other characters. +# Not all of these characters are supported on all systems. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#11 +Net::SSH::Connection::Term::VINTR = T.let(T.unsafe(nil), Integer) + +# Kill the current input line. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#20 +Net::SSH::Connection::Term::VKILL = T.let(T.unsafe(nil), Integer) + +# Enter the next character typed literally, even if it is a special +# character. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#51 +Net::SSH::Connection::Term::VLNEXT = T.let(T.unsafe(nil), Integer) + +# The quit character (sends SIGQUIT signal on POSIX systems). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#14 +Net::SSH::Connection::Term::VQUIT = T.let(T.unsafe(nil), Integer) + +# Reprints the current input line. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#44 +Net::SSH::Connection::Term::VREPRINT = T.let(T.unsafe(nil), Integer) + +# Continues paused output (normally control-Q). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#32 +Net::SSH::Connection::Term::VSTART = T.let(T.unsafe(nil), Integer) + +# Prints system status line (load, command, pid, etc). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#60 +Net::SSH::Connection::Term::VSTATUS = T.let(T.unsafe(nil), Integer) + +# Pauses output (normally control-S). +# +# source://net-ssh//lib/net/ssh/connection/term.rb#35 +Net::SSH::Connection::Term::VSTOP = T.let(T.unsafe(nil), Integer) + +# Suspends the current program. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#38 +Net::SSH::Connection::Term::VSUSP = T.let(T.unsafe(nil), Integer) + +# Switch to a different shell layer. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#57 +Net::SSH::Connection::Term::VSWITCH = T.let(T.unsafe(nil), Integer) + +# Erases a word left of cursor. +# +# source://net-ssh//lib/net/ssh/connection/term.rb#47 +Net::SSH::Connection::Term::VWERASE = T.let(T.unsafe(nil), Integer) + +# Enable input and output of uppercase characters by preceding their +# lowercase equivalents with "\". +# +# source://net-ssh//lib/net/ssh/connection/term.rb#110 +Net::SSH::Connection::Term::XCASE = T.let(T.unsafe(nil), Integer) + +# This exception is raised when a connection attempt times out. +# +# source://net-ssh//lib/net/ssh/errors.rb#12 +class Net::SSH::ConnectionTimeout < ::Net::SSH::Exception; end + +# This exception is raised when the remote host has disconnected +# unexpectedly. +# +# source://net-ssh//lib/net/ssh/errors.rb#16 +class Net::SSH::Disconnect < ::Net::SSH::Exception; end + +# A general exception class, to act as the ancestor of all other Net::SSH +# exception classes. +# +# source://net-ssh//lib/net/ssh/errors.rb#5 +class Net::SSH::Exception < ::RuntimeError; end + +# Fixes for two issues by Miklós Fazekas: +# +# * if client closes a forwarded connection, but the server is +# reading, net-ssh terminates with IOError socket closed. +# * if client force closes (RST) a forwarded connection, but +# server is reading, net-ssh terminates with [an exception] +# +# See: +# +# http://net-ssh.lighthouseapp.com/projects/36253/tickets/7 +# http://github.com/net-ssh/net-ssh/tree/portfwfix +# +# source://net-ssh//lib/net/ssh/buffered_io.rb#168 +module Net::SSH::ForwardedBufferedIo + # source://net-ssh//lib/net/ssh/buffered_io.rb#169 + def fill(n = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/buffered_io.rb#185 + def send_pending; end +end + +# source://net-ssh//lib/net/ssh/known_hosts.rb#9 +module Net::SSH::HostKeyEntries; end + +# @cert-authority entry +# +# source://net-ssh//lib/net/ssh/known_hosts.rb#40 +class Net::SSH::HostKeyEntries::CertAuthority + # @return [CertAuthority] a new instance of CertAuthority + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#52 + def initialize(key, comment: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#57 + def matches_key?(server_key); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#41 + def ssh_types; end +end + +# regular public key entry +# +# source://net-ssh//lib/net/ssh/known_hosts.rb#11 +class Net::SSH::HostKeyEntries::PubKey + # @return [PubKey] a new instance of PubKey + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#12 + def initialize(key, comment: T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#29 + def __getobj__; end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#34 + def matches_key?(server_key); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#17 + def ssh_type; end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#21 + def ssh_types; end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#25 + def to_blob; end +end + +# Base class for host key exceptions. When rescuing this exception, you can +# inspect the key fingerprint and, if you want to proceed anyway, simply call +# the remember_host! method on the exception, and then retry. +# +# source://net-ssh//lib/net/ssh/errors.rb#46 +class Net::SSH::HostKeyError < ::Net::SSH::Exception + # An accessor for getting at the data that was used to look up the host + # (see also #fingerprint, #host, #port, #ip, and #key). + # + # source://net-ssh//lib/net/ssh/errors.rb#55 + def [](key); end + + # the callback to use when #remember_host! is called + # + # source://net-ssh//lib/net/ssh/errors.rb#48 + def callback=(_arg0); end + + # situation-specific data describing the host (see #host, #port, etc.) + # + # source://net-ssh//lib/net/ssh/errors.rb#51 + def data=(_arg0); end + + # Returns the fingerprint of the key for the host, which either was not + # found or did not match. + # + # source://net-ssh//lib/net/ssh/errors.rb#61 + def fingerprint; end + + # Returns the host name for the remote host, as reported by the socket. + # + # source://net-ssh//lib/net/ssh/errors.rb#66 + def host; end + + # Returns the IP address of the remote host, as reported by the socket. + # + # source://net-ssh//lib/net/ssh/errors.rb#76 + def ip; end + + # Returns the key itself, as reported by the remote host. + # + # source://net-ssh//lib/net/ssh/errors.rb#81 + def key; end + + # Returns the port number for the remote host, as reported by the socket. + # + # source://net-ssh//lib/net/ssh/errors.rb#71 + def port; end + + # Tell Net::SSH to record this host and key in the known hosts file, so + # that subsequent connections will remember them. + # + # source://net-ssh//lib/net/ssh/errors.rb#87 + def remember_host!; end +end + +# Raised when the cached key for a particular host does not match the +# key given by the host, which can be indicative of a man-in-the-middle +# attack. When rescuing this exception, you can inspect the key fingerprint +# and, if you want to proceed anyway, simply call the remember_host! +# method on the exception, and then retry. +# +# source://net-ssh//lib/net/ssh/errors.rb#97 +class Net::SSH::HostKeyMismatch < ::Net::SSH::HostKeyError; end + +# Raised when there is no cached key for a particular host, which probably +# means that the host has simply not been seen before. +# When rescuing this exception, you can inspect the key fingerprint and, if +# you want to proceed anyway, simply call the remember_host! method on the +# exception, and then retry. +# +# source://net-ssh//lib/net/ssh/errors.rb#104 +class Net::SSH::HostKeyUnknown < ::Net::SSH::HostKeyError; end + +# Represents the result of a search in known hosts +# see search_for +# +# source://net-ssh//lib/net/ssh/known_hosts.rb#69 +class Net::SSH::HostKeys + include ::Enumerable + + # @return [HostKeys] a new instance of HostKeys + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#73 + def initialize(host_keys, host, known_hosts, options = T.unsafe(nil)); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#80 + def add_host_key(key); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#85 + def each(&block); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#89 + def empty?; end + + # Returns the value of attribute host. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#71 + def host; end +end + +# A factory class for returning new Key classes. It is used for obtaining +# OpenSSL key instances via their SSH names, and for loading both public and +# private keys. It used used primarily by Net::SSH itself, internally, and +# will rarely (if ever) be directly used by consumers of the library. +# +# klass = Net::SSH::KeyFactory.get("rsa") +# assert klass.is_a?(OpenSSL::PKey::RSA) +# +# key = Net::SSH::KeyFactory.load_public_key("~/.ssh/id_dsa.pub") +# +# source://net-ssh//lib/net/ssh/key_factory.rb#17 +class Net::SSH::KeyFactory + class << self + # Fetch an OpenSSL key instance by its SSH name. It will be a new, + # empty key of the given type. + # + # source://net-ssh//lib/net/ssh/key_factory.rb#30 + def get(name); end + + # Loads a private key. It will correctly determine + # whether the file describes an RSA or DSA key, and will load it + # appropriately. The new key is returned. If the key itself is + # encrypted (requiring a passphrase to use), the user will be + # prompted to enter their password unless passphrase works. + # + # source://net-ssh//lib/net/ssh/key_factory.rb#49 + def load_data_private_key(data, passphrase = T.unsafe(nil), ask_passphrase = T.unsafe(nil), filename = T.unsafe(nil), prompt = T.unsafe(nil)); end + + # Loads a public key. It will correctly determine whether + # the file describes an RSA or DSA key, and will load it + # appropriately. The new public key is returned. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/key_factory.rb#89 + def load_data_public_key(data, filename = T.unsafe(nil)); end + + # Loads a private key from a file. It will correctly determine + # whether the file describes an RSA or DSA key, and will load it + # appropriately. The new key is returned. If the key itself is + # encrypted (requiring a passphrase to use), the user will be + # prompted to enter their password unless passphrase works. + # + # source://net-ssh//lib/net/ssh/key_factory.rb#39 + def load_private_key(filename, passphrase = T.unsafe(nil), ask_passphrase = T.unsafe(nil), prompt = T.unsafe(nil)); end + + # Loads a public key from a file. It will correctly determine whether + # the file describes an RSA or DSA key, and will load it + # appropriately. The new public key is returned. + # + # source://net-ssh//lib/net/ssh/key_factory.rb#81 + def load_public_key(filename); end + + private + + # Determine whether the file describes an RSA or DSA key, and return how load it + # appropriately. + # + # source://net-ssh//lib/net/ssh/key_factory.rb#197 + def classify_key(data, filename); end + end +end + +# Specifies the mapping of SSH names to OpenSSL key classes. +# +# source://net-ssh//lib/net/ssh/key_factory.rb#19 +Net::SSH::KeyFactory::MAP = T.let(T.unsafe(nil), Hash) + +# Searches an OpenSSH-style known-host file for a given host, and returns all +# matching keys. This is used to implement host-key verification, as well as +# to determine what key a user prefers to use for a given host. +# +# This is used internally by Net::SSH, and will never need to be used directly +# by consumers of the library. +# +# source://net-ssh//lib/net/ssh/known_hosts.rb#100 +class Net::SSH::KnownHosts + # Instantiate a new KnownHosts instance that will search the given known-hosts + # file. The path is expanded file File.expand_path. + # + # @return [KnownHosts] a new instance of KnownHosts + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#161 + def initialize(source); end + + # Tries to append an entry to the current source file for the given host + # and key. If it is unable to (because the file is not writable, for + # instance), an exception will be raised. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#256 + def add(host, key); end + + # Returns an array of all keys that are known to be associatd with the + # given host. The +host+ parameter is either the domain name or ip address + # of the host, or both (comma-separated). Additionally, if a non-standard + # port is being used, it may be specified by putting the host (or ip, or + # both) in square brackets, and appending the port outside the brackets + # after a colon. Possible formats for +host+, then, are; + # + # "net.ssh.test" + # "1.2.3.4" + # "net.ssh.test,1.2.3.4" + # "[net.ssh.test]:5555" + # "[1,2,3,4]:5555" + # "[net.ssh.test]:5555,[1.2.3.4]:5555 + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#178 + def keys_for(host, options = T.unsafe(nil)); end + + # Indicates whether one of the entries matches an hostname that has been + # stored as a HMAC-SHA1 hash in the known hosts. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#240 + def known_host_hash?(hostlist, entries); end + + # source://net-ssh//lib/net/ssh/known_hosts.rb#223 + def match(host, pattern); end + + # The host-key file name that this KnownHosts instance will use to search + # for keys. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#157 + def source; end + + class << self + # Looks in all user known host files (see KnownHosts.hostfiles) and tries to + # add an entry for the given host and key to the first file it is able + # to. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#145 + def add(host, key, options = T.unsafe(nil)); end + + # Looks in the given +options+ hash for the :user_known_hosts_file and + # :global_known_hosts_file keys, and returns an array of all known + # hosts files. If the :user_known_hosts_file key is not set, the + # default is returned (~/.ssh/known_hosts and ~/.ssh/known_hosts2). If + # :global_known_hosts_file is not set, the default is used + # (/etc/ssh/ssh_known_hosts and /etc/ssh/ssh_known_hosts2). + # + # If you only want the user known host files, you can pass :user as + # the second option. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#130 + def hostfiles(options, which = T.unsafe(nil)); end + + # Searches all known host files (see KnownHosts.hostfiles) for all keys + # of the given host. Returns an enumerable of keys found. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#111 + def search_for(host, options = T.unsafe(nil)); end + + # Search for all known keys for the given host, in every file given in + # the +files+ array. Returns the list of keys. + # + # source://net-ssh//lib/net/ssh/known_hosts.rb#117 + def search_in(files, host, options = T.unsafe(nil)); end + end +end + +# source://net-ssh//lib/net/ssh/known_hosts.rb#101 +Net::SSH::KnownHosts::SUPPORTED_TYPE = T.let(T.unsafe(nil), Array) + +# A simple module to make logging easier to deal with. It assumes that the +# logger instance (if not nil) quacks like a Logger object (in Ruby's +# standard library). Although used primarily internally by Net::SSH, it +# can easily be used to add Net::SSH-like logging to your own programs. +# +# class MyClass +# include Net::SSH::Loggable +# end +# +# Net::SSH.start(...) do |ssh| +# obj = MyClass.new +# obj.logger = ssh.logger +# ... +# end +# +# source://net-ssh//lib/net/ssh/loggable.rb#17 +module Net::SSH::Loggable + # Displays the result of yielding if the log level is Logger::DEBUG or + # greater. + # + # source://net-ssh//lib/net/ssh/loggable.rb#24 + def debug; end + + # Displays the result of yielding if the log level is Logger:ERROR or + # greater. + # + # source://net-ssh//lib/net/ssh/loggable.rb#42 + def error; end + + # Displays the result of yielding if the log level is Logger::FATAL or + # greater. + # + # source://net-ssh//lib/net/ssh/loggable.rb#48 + def fatal; end + + # Displays the result of yielding if the log level is Logger::INFO or + # greater. + # + # source://net-ssh//lib/net/ssh/loggable.rb#30 + def info; end + + # The logger instance that will be used to log messages. If nil, nothing + # will be logged. + # + # source://net-ssh//lib/net/ssh/loggable.rb#20 + def logger; end + + # The logger instance that will be used to log messages. If nil, nothing + # will be logged. + # + # source://net-ssh//lib/net/ssh/loggable.rb#20 + def logger=(_arg0); end + + # Displays the result of yielding if the log level is Logger::WARN or + # greater. (Called lwarn to avoid shadowing with Kernel#warn.) + # + # source://net-ssh//lib/net/ssh/loggable.rb#36 + def lwarn; end + + private + + # Sets the "facility" value, used for reporting where a log message + # originates. It defaults to the name of class with the object_id + # appended. + # + # source://net-ssh//lib/net/ssh/loggable.rb#57 + def facility; end +end + +# A specialization of Buffer that knows the format of certain common +# packet types. It auto-parses those packet types, and allows them to +# be accessed via the #[] accessor. +# +# data = some_channel_request_packet +# packet = Net::SSH::Packet.new(data) +# +# p packet.type #-> 98 (CHANNEL_REQUEST) +# p packet[:request] +# p packet[:want_reply] +# +# This is used exclusively internally by Net::SSH, and unless you're doing +# protocol-level manipulation or are extending Net::SSH in some way, you'll +# never need to use this class directly. +# +# source://net-ssh//lib/net/ssh/packet.rb#22 +class Net::SSH::Packet < ::Net::SSH::Buffer + include ::Net::SSH::Connection::Constants + include ::Net::SSH::Authentication::Constants + include ::Net::SSH::Transport::Constants + + # Create a new packet from the given payload. This will automatically + # parse the packet if it is one that has been previously registered with + # Packet.register; otherwise, the packet will need to be manually parsed + # using the methods provided in the Net::SSH::Buffer superclass. + # + # @return [Packet] a new instance of Packet + # + # source://net-ssh//lib/net/ssh/packet.rb#75 + def initialize(payload); end + + # Access one of the auto-parsed fields by name. Raises an error if no + # element by the given name exists. + # + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/packet.rb#84 + def [](name); end + + # The (integer) type of this packet. + # + # source://net-ssh//lib/net/ssh/packet.rb#69 + def type; end + + private + + # Parse the packet's contents and assign the named elements, as described + # by the registered format for the packet. + # + # source://net-ssh//lib/net/ssh/packet.rb#95 + def instantiate!; end + + class << self + # Register a new packet type that should be recognized and auto-parsed by + # Net::SSH::Packet. Note that any packet type that is not preregistered + # will not be autoparsed. + # + # The +pairs+ parameter must be either empty, or an array of two-element + # tuples, where the first element of each tuple is the name of the field, + # and the second is the type. + # + # register DISCONNECT, [:reason_code, :long], [:description, :string], [:language, :string] + # + # source://net-ssh//lib/net/ssh/packet.rb#34 + def register(type, *pairs); end + end +end + +# Default prompt implementation, called for asking password from user. +# It will never be instantiated directly, but will instead be created for +# you automatically. +# +# A custom prompt objects can implement caching, or different UI. The prompt +# object should implemnted a start method, which should return something implementing +# ask and success. Net::SSH uses it like: +# +# prompter = options[:password_prompt].start({type:'password'}) +# while !ok && max_retries < 3 +# user = prompter.ask("user: ", true) +# password = prompter.ask("password: ", false) +# ok = send(user, password) +# prompter.sucess if ok +# end +# +# source://net-ssh//lib/net/ssh/prompt.rb#21 +class Net::SSH::Prompt + # @return [Prompt] a new instance of Prompt + # + # source://net-ssh//lib/net/ssh/prompt.rb#27 + def initialize(options = T.unsafe(nil)); end + + # start password session. Multiple questions might be asked multiple times + # on the returned object. Info hash tries to uniquely identify the password + # session, so caching implementations can save passwords properly. + # + # source://net-ssh//lib/net/ssh/prompt.rb#57 + def start(info); end + + class << self + # factory + # + # source://net-ssh//lib/net/ssh/prompt.rb#23 + def default(options = T.unsafe(nil)); end + end +end + +# default prompt object implementation. More sophisticated implemenetations +# might implement caching. +# +# source://net-ssh//lib/net/ssh/prompt.rb#31 +class Net::SSH::Prompt::Prompter + # @return [Prompter] a new instance of Prompter + # + # source://net-ssh//lib/net/ssh/prompt.rb#32 + def initialize(info); end + + # ask input from user, a prompter might ask for multiple inputs + # (like user and password) in a single session. + # + # source://net-ssh//lib/net/ssh/prompt.rb#41 + def ask(prompt, echo = T.unsafe(nil)); end + + # success method will be called when the password was accepted + # It's a good time to save password asked to a cache. + # + # source://net-ssh//lib/net/ssh/prompt.rb#51 + def success; end +end + +# source://net-ssh//lib/net/ssh/proxy/errors.rb#5 +module Net::SSH::Proxy; end + +# An implementation of a command proxy. To use it, instantiate it, +# then pass the instantiated object via the :proxy key to +# Net::SSH.start: +# +# require 'net/ssh/proxy/command' +# +# proxy = Net::SSH::Proxy::Command.new('ssh relay nc %h %p') +# Net::SSH.start('host', 'user', :proxy => proxy) do |ssh| +# ... +# end +# +# source://net-ssh//lib/net/ssh/proxy/command.rb#18 +class Net::SSH::Proxy::Command + # Create a new socket factory that tunnels via a command executed + # with the user's shell, which is composed from the given command + # template. In the command template, `%h' will be substituted by + # the host name to connect and `%p' by the port. + # + # @return [Command] a new instance of Command + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#32 + def initialize(command_line_template); end + + # source://net-ssh//lib/net/ssh/proxy/command.rb#116 + def close_on_error(io); end + + # The command line for the session + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#23 + def command_line; end + + # The command line template + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#20 + def command_line_template; end + + # source://sshkit/1.23.1/lib/sshkit/backends/connection_pool.rb#17 + def inspect; end + + # Return a new socket connected to the given host and port via the + # proxy that was requested when the socket factory was instantiated. + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#40 + def open(host, port, connection_options = T.unsafe(nil)); end + + # Timeout in seconds in open, defaults to 60 + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#26 + def timeout; end + + # Timeout in seconds in open, defaults to 60 + # + # source://net-ssh//lib/net/ssh/proxy/command.rb#26 + def timeout=(_arg0); end +end + +# Used for reporting proxy connection errors. +# +# source://net-ssh//lib/net/ssh/proxy/errors.rb#10 +class Net::SSH::Proxy::ConnectError < ::Net::SSH::Proxy::Error; end + +# A general exception class for all Proxy errors. +# +# source://net-ssh//lib/net/ssh/proxy/errors.rb#7 +class Net::SSH::Proxy::Error < ::Net::SSH::Exception; end + +# An implementation of a jump proxy. To use it, instantiate it, +# then pass the instantiated object via the :proxy key to +# Net::SSH.start: +# +# require 'net/ssh/proxy/jump' +# +# proxy = Net::SSH::Proxy::Jump.new('user@proxy') +# Net::SSH.start('host', 'user', :proxy => proxy) do |ssh| +# ... +# end +# +# source://net-ssh//lib/net/ssh/proxy/jump.rb#17 +class Net::SSH::Proxy::Jump < ::Net::SSH::Proxy::Command + # Create a new socket factory that tunnels via multiple jump proxes as + # [user@]host[:port]. + # + # @return [Jump] a new instance of Jump + # + # source://net-ssh//lib/net/ssh/proxy/jump.rb#23 + def initialize(jump_proxies); end + + # We cannot build the ProxyCommand template until we know if the :config + # option was specified during `Net::SSH.start`. + # + # source://net-ssh//lib/net/ssh/proxy/jump.rb#36 + def build_proxy_command_equivalent(connection_options = T.unsafe(nil)); end + + # The jump proxies + # + # source://net-ssh//lib/net/ssh/proxy/jump.rb#19 + def jump_proxies; end + + # Return a new socket connected to the given host and port via the jump + # proxy that was requested when the socket factory was instantiated. + # + # source://net-ssh//lib/net/ssh/proxy/jump.rb#29 + def open(host, port, connection_options = T.unsafe(nil)); end +end + +# Used when the server doesn't recognize the user's credentials. +# +# source://net-ssh//lib/net/ssh/proxy/errors.rb#13 +class Net::SSH::Proxy::UnauthorizedError < ::Net::SSH::Proxy::Error; end + +# source://net-ssh//lib/net/ssh/service/forward.rb#5 +module Net::SSH::Service; end + +# This class implements various port forwarding services for use by +# Net::SSH clients. The Forward class should never need to be instantiated +# directly; instead, it should be accessed via the singleton instance +# returned by Connection::Session#forward: +# +# ssh.forward.local(1234, "www.capify.org", 80) +# +# source://net-ssh//lib/net/ssh/service/forward.rb#12 +class Net::SSH::Service::Forward + include ::Net::SSH::Loggable + + # Instantiates a new Forward service instance atop the given connection + # service session. This will register new channel open handlers to handle + # the specialized channels that the SSH port forwarding protocols employ. + # + # @return [Forward] a new instance of Forward + # + # source://net-ssh//lib/net/ssh/service/forward.rb#25 + def initialize(session); end + + # Returns a list of all active locally forwarded sockets. The returned value + # is an array of Unix domain socket file paths. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#170 + def active_local_sockets; end + + # Returns a list of all active locally forwarded ports. The returned value + # is an array of arrays, where each element is a two-element tuple + # consisting of the local port and bind address corresponding to the + # forwarding port. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#119 + def active_locals; end + + # Returns all active remote forwarded ports and where they forward to. The + # returned value is a hash from [, ] + # to [, ]. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#271 + def active_remote_destinations; end + + # Returns all active forwarded remote ports. The returned value is an + # array of two-element tuples, where the first element is the port on the + # remote host and the second is the bind address. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#264 + def active_remotes; end + + # Enables SSH agent forwarding on the given channel. The forwarded agent + # will remain active even after the channel closes--the channel is only + # used as the transport for enabling the forwarded connection. You should + # never need to call this directly--it is called automatically the first + # time a session channel is opened, when the connection was created with + # :forward_agent set to true: + # + # Net::SSH.start("remote.host", "me", :forward_agent => true) do |ssh| + # ssh.open_channel do |ch| + # # agent will be automatically forwarded by this point + # end + # ssh.loop + # end + # + # source://net-ssh//lib/net/ssh/service/forward.rb#290 + def agent(channel); end + + # Terminates an active local forwarded port. + # + # ssh.forward.cancel_local(1234) + # ssh.forward.cancel_local(1234, "0.0.0.0") + # + # source://net-ssh//lib/net/ssh/service/forward.rb#108 + def cancel_local(port, bind_address = T.unsafe(nil)); end + + # Terminates an active local forwarded socket. + # + # ssh.forward.cancel_local_socket('/tmp/foo.sock') + # + # source://net-ssh//lib/net/ssh/service/forward.rb#161 + def cancel_local_socket(local_socket_path); end + + # Requests that a remote forwarded port be cancelled. The remote forwarded + # port on the remote host, bound to the given address on the remote host, + # will be terminated, but not immediately. This method returns immediately + # after queueing the request to be sent to the server. If for some reason + # the port cannot be cancelled, an exception will be raised (asynchronously). + # + # If you want to know when the connection has been cancelled, it will no + # longer be present in the #active_remotes list. If you want to block until + # the port is no longer active, you could do something like this: + # + # ssh.forward.cancel_remote(1234, "0.0.0.0") + # ssh.loop { ssh.forward.active_remotes.include?([1234, "0.0.0.0"]) } + # + # source://net-ssh//lib/net/ssh/service/forward.rb#251 + def cancel_remote(port, host = T.unsafe(nil)); end + + # Starts listening for connections on the local host, and forwards them + # to the specified remote host/port via the SSH connection. This method + # accepts either three or four arguments. When four arguments are given, + # they are: + # + # * the local address to bind to + # * the local port to listen on + # * the remote host to forward connections to + # * the port on the remote host to connect to + # + # If three arguments are given, it is as if the local bind address is + # "127.0.0.1", and the rest are applied as above. + # + # To request an ephemeral port on the remote server, provide 0 (zero) for + # the port number. In all cases, this method will return the port that + # has been assigned. + # + # ssh.forward.local(1234, "www.capify.org", 80) + # assigned_port = ssh.forward.local("0.0.0.0", 0, "www.capify.org", 80) + # + # source://net-ssh//lib/net/ssh/service/forward.rb#57 + def local(*args); end + + # Starts listening for connections on the local host, and forwards them + # to the specified remote socket via the SSH connection. This will + # (re)create the local socket file. The remote server needs to have the + # socket file already available. + # + # ssh.forward.local_socket('/tmp/local.sock', '/tmp/remote.sock') + # + # source://net-ssh//lib/net/ssh/service/forward.rb#129 + def local_socket(local_socket_path, remote_socket_path); end + + # Requests that all connections on the given remote-port be forwarded via + # the local host to the given port/host. The last argument describes the + # bind address on the remote host, and defaults to 127.0.0.1. + # + # This method will return immediately, but the port will not actually be + # forwarded immediately. If the remote server is not able to begin the + # listener for this request, an exception will be raised asynchronously. + # + # To request an ephemeral port on the remote server, provide 0 (zero) for + # the port number. The assigned port will show up in the # #active_remotes + # list. + # + # remote_host is interpreted by the server per RFC 4254, which has these + # special values: + # + # - "" means that connections are to be accepted on all protocol + # families supported by the SSH implementation. + # - "0.0.0.0" means to listen on all IPv4 addresses. + # - "::" means to listen on all IPv6 addresses. + # - "localhost" means to listen on all protocol families supported by + # the SSH implementation on loopback addresses only ([RFC3330] and + # [RFC3513]). + # - "127.0.0.1" and "::1" indicate listening on the loopback + # interfaces for IPv4 and IPv6, respectively. + # + # You may pass a block that will be called when the the port forward + # request receives a response. This block will be passed the remote_port + # that was actually bound to, or nil if the binding failed. If the block + # returns :no_exception, the "failed binding" exception will not be thrown. + # + # If you want to block until the port is active, you could do something + # like this: + # + # got_remote_port = nil + # remote(port, host, remote_port, remote_host) do |actual_remote_port| + # got_remote_port = actual_remote_port || :error + # :no_exception # will yield the exception on my own thread + # end + # session.loop { !got_remote_port } + # if got_remote_port == :error + # raise Net::SSH::Exception, "remote forwarding request failed" + # end + # + # source://net-ssh//lib/net/ssh/service/forward.rb#217 + def remote(port, host, remote_port, remote_host = T.unsafe(nil)); end + + # Requests that all connections on the given remote-port be forwarded via + # the local host to the given port/host. The last argument describes the + # bind address on the remote host, and defaults to 127.0.0.1. + # + # This method will return immediately, but the port will not actually be + # forwarded immediately. If the remote server is not able to begin the + # listener for this request, an exception will be raised asynchronously. + # + # To request an ephemeral port on the remote server, provide 0 (zero) for + # the port number. The assigned port will show up in the # #active_remotes + # list. + # + # remote_host is interpreted by the server per RFC 4254, which has these + # special values: + # + # - "" means that connections are to be accepted on all protocol + # families supported by the SSH implementation. + # - "0.0.0.0" means to listen on all IPv4 addresses. + # - "::" means to listen on all IPv6 addresses. + # - "localhost" means to listen on all protocol families supported by + # the SSH implementation on loopback addresses only ([RFC3330] and + # [RFC3513]). + # - "127.0.0.1" and "::1" indicate listening on the loopback + # interfaces for IPv4 and IPv6, respectively. + # + # You may pass a block that will be called when the the port forward + # request receives a response. This block will be passed the remote_port + # that was actually bound to, or nil if the binding failed. If the block + # returns :no_exception, the "failed binding" exception will not be thrown. + # + # If you want to block until the port is active, you could do something + # like this: + # + # got_remote_port = nil + # remote(port, host, remote_port, remote_host) do |actual_remote_port| + # got_remote_port = actual_remote_port || :error + # :no_exception # will yield the exception on my own thread + # end + # session.loop { !got_remote_port } + # if got_remote_port == :error + # raise Net::SSH::Exception, "remote forwarding request failed" + # end + # an alias, for token backwards compatibility with the 1.x API + # + # source://net-ssh//lib/net/ssh/service/forward.rb#217 + def remote_to(port, host, remote_port, remote_host = T.unsafe(nil)); end + + # The underlying connection service instance that the port-forwarding + # services employ. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#17 + def session; end + + private + + # The callback used when an auth-agent channel is requested by the server. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#407 + def auth_agent_channel(session, channel, packet); end + + # The callback used when a new "forwarded-tcpip" channel is requested + # by the server. This will open a new socket to the host/port specified + # when the forwarded connection was first requested. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#385 + def forwarded_tcpip(session, channel, packet); end + + # Perform setup operations that are common to all forwarded channels. + # +client+ is a socket, +channel+ is the channel that was just created, + # and +type+ is an arbitrary string describing the type of the channel. + # + # source://net-ssh//lib/net/ssh/service/forward.rb#315 + def prepare_client(client, channel, type); end + + # not a real socket, so use a simpler behaviour + # + # source://net-ssh//lib/net/ssh/service/forward.rb#365 + def prepare_simple_client(client, channel, type); end +end + +# A simple class for representing a requested remote forwarded port. +# +# source://net-ssh//lib/net/ssh/service/forward.rb#20 +class Net::SSH::Service::Forward::Remote < ::Struct + # Returns the value of attribute host + # + # @return [Object] the current value of host + def host; end + + # Sets the attribute host + # + # @param value [Object] the value to set the attribute host to. + # @return [Object] the newly set value + def host=(_); end + + # Returns the value of attribute port + # + # @return [Object] the current value of port + def port; end + + # Sets the attribute port + # + # @param value [Object] the value to set the attribute port to. + # @return [Object] the newly set value + def port=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This exception is raised when the remote host has disconnected/ +# timeouted unexpectedly. +# +# source://net-ssh//lib/net/ssh/errors.rb#20 +class Net::SSH::Timeout < ::Net::SSH::Disconnect; end + +# source://net-ssh//lib/net/ssh/transport/ctr.rb#4 +module Net::SSH::Transport; end + +# Implements the higher-level logic behind an SSH key-exchange. It handles +# both the initial exchange, as well as subsequent re-exchanges (as needed). +# It also encapsulates the negotiation of the algorithms, and provides a +# single point of access to the negotiated algorithms. +# +# You will never instantiate or reference this directly. It is used +# internally by the transport layer. +# +# source://net-ssh//lib/net/ssh/transport/algorithms.rb#22 +class Net::SSH::Transport::Algorithms + include ::Net::SSH::Loggable + include ::Net::SSH::Transport::Constants + + # Instantiates a new Algorithms object, and prepares the hash of preferred + # algorithms based on the options parameter and the ALGORITHMS constant. + # + # @return [Algorithms] a new instance of Algorithms + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#154 + def initialize(session, options = T.unsafe(nil)); end + + # A convenience method for accessing the list of preferred types for a + # specific algorithm (see #algorithms). + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#198 + def [](key); end + + # Called by the transport layer when a KEXINIT packet is received, indicating + # that the server wants to exchange keys. This can be spontaneous, or it + # can be in response to a client-initiated rekey request (see #rekey!). Either + # way, this will block until the key exchange completes. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#185 + def accept_kexinit(packet); end + + # The hash of algorithms preferred by the client, which will be told to + # the server during algorithm negotiation. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#140 + def algorithms; end + + # Returns true if no exchange is pending, and otherwise returns true or + # false depending on whether the given packet is of a type that is allowed + # during a key exchange. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#214 + def allow?(packet); end + + # The type of compression to use to compress packets being sent by the client. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#127 + def compression_client; end + + # The type of compression to use to decompress packets arriving from the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#130 + def compression_server; end + + # The type of the cipher to use to encrypt packets sent from the client to + # the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#115 + def encryption_client; end + + # The type of the cipher to use to decrypt packets arriving from the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#118 + def encryption_server; end + + # The type of HMAC to use to sign packets sent by the client. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#121 + def hmac_client; end + + # The type of HMAC to use to validate packets arriving from the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#124 + def hmac_server; end + + # The type of host key that will be used for this session. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#111 + def host_key; end + + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#223 + def host_key_format; end + + # Returns true if the algorithms have been negotiated at all. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#219 + def initialized?; end + + # The kex algorithm to use settled on between the client and server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#108 + def kex; end + + # The language that will be used in messages sent by the client. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#133 + def language_client; end + + # The language that will be used in messages sent from the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#136 + def language_server; end + + # The hash of options used to initialize this object + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#105 + def options; end + + # Returns +true+ if a key-exchange is pending. This will be true from the + # moment either the client or server requests the key exchange, until the + # exchange completes. While an exchange is pending, only a limited number + # of packets are allowed, so event processing essentially stops during this + # period. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#207 + def pending?; end + + # Request a rekey operation. This will return immediately, and does not + # actually perform the rekey operation. It does cause the session to change + # state, however--until the key exchange finishes, no new packets will be + # processed. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#175 + def rekey!; end + + # The underlying transport layer session that supports this object + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#102 + def session; end + + # The session-id for this session, as decided during the initial key exchange. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#143 + def session_id; end + + # Start the algorithm negotation + # + # @raise [ArgumentError] + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#165 + def start; end + + private + + # Given the #algorithms map of preferred algorithm types, this constructs + # a KEXINIT packet to send to the server. It does not actually send it, + # it simply builds the packet and returns it. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#368 + def build_client_algorithm_packet; end + + # Composes the list of algorithms by taking supported algorithms and matching with supplied options. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#295 + def compose_algorithm_list(supported, option, append_all_supported_algorithms = T.unsafe(nil)); end + + # Instantiates one of the Transport::Kex classes (based on the negotiated + # kex algorithm), and uses it to exchange keys. Then, the ciphers and + # HMACs are initialized and fed to the transport layer, to be used in + # further communication with the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#442 + def exchange_keys; end + + # Considers the sizes of the keys and block-sizes for the selected ciphers, + # and the lengths of the hmacs, and returns the largest as the byte requirement + # for the key-exchange algorithm. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#426 + def kex_byte_requirement; end + + # Negotiates a single algorithm based on the preferences reported by the + # server and those set by the client. This is called by + # #negotiate_algorithms. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#411 + def negotiate(algorithm); end + + # Given the parsed server KEX packet, and the client's preferred algorithm + # lists in #algorithms, determine which preferred algorithms each has + # in common and set those as the selected algorithms. If, for any algorithm, + # no type can be settled on, an exception is raised. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#387 + def negotiate_algorithms; end + + # Given the SSH name for some compression algorithm, return a normalized + # name as a symbol. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#513 + def normalize_compression_name(name); end + + # Parses a KEXINIT packet from the server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#341 + def parse_server_algorithm_packet(packet); end + + # Prepares the list of preferred algorithms, based on the options hash + # that was given when the object was constructed, and the ALGORITHMS + # constant. Also, when determining the host_key type to use, the known + # hosts files are examined to see if the host has ever sent a host_key + # before, and if so, that key type is used as the preferred type for + # communicating with this server. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#263 + def prepare_preferred_algorithms!; end + + # After both client and server have sent their KEXINIT packets, this + # will do the algorithm negotiation and key exchange. Once both finish, + # the object leaves the pending state and the method returns. + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#250 + def proceed!; end + + # Sends a KEXINIT packet to the server. If a server KEXINIT has already + # been received, this will then invoke #proceed! to proceed with the key + # exchange, otherwise it returns immediately (but sets the object to the + # pending state). + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#238 + def send_kexinit; end + + class << self + # Returns true if the given packet can be processed during a key-exchange. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/algorithms.rb#146 + def allowed_packet?(packet); end + end +end + +# Define all algorithms, with the deprecated, supported by Net::SSH. +# +# source://net-ssh//lib/net/ssh/transport/algorithms.rb#74 +Net::SSH::Transport::Algorithms::ALGORITHMS = T.let(T.unsafe(nil), Hash) + +# Define the default algorithms, in order of preference, supported by Net::SSH. +# +# source://net-ssh//lib/net/ssh/transport/algorithms.rb#27 +Net::SSH::Transport::Algorithms::DEFAULT_ALGORITHMS = T.let(T.unsafe(nil), Hash) + +# Pure-Ruby implementation of Stateful Decryption Counter(SDCTR) Mode +# for Block Ciphers. See RFC4344 for detail. +# +# source://net-ssh//lib/net/ssh/transport/ctr.rb#32 +module Net::SSH::Transport::CTR + class << self + # @private + # + # source://net-ssh//lib/net/ssh/transport/ctr.rb#33 + def extended(orig); end + end +end + +# Loads chacha20 poly1305 support which requires optinal dependency rbnacl +# +# source://net-ssh//lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb#5 +module Net::SSH::Transport::ChaCha20Poly1305CipherLoader; end + +# source://net-ssh//lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb#11 +Net::SSH::Transport::ChaCha20Poly1305CipherLoader::ERROR = T.let(T.unsafe(nil), LoadError) + +# source://net-ssh//lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb#12 +Net::SSH::Transport::ChaCha20Poly1305CipherLoader::LOADED = T.let(T.unsafe(nil), FalseClass) + +# Implements a factory of OpenSSL cipher algorithms. +# +# source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#12 +class Net::SSH::Transport::CipherFactory + class << self + # Retrieves a new instance of the named algorithm. The new instance + # will be initialized using an iv and key generated from the given + # iv, key, shared, hash and digester values. Additionally, the + # cipher will be put into encryption or decryption mode, based on the + # value of the +encrypt+ parameter. + # + # source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#60 + def get(name, options = T.unsafe(nil)); end + + # Returns a two-element array containing the [ key-length, + # block-size ] for the named cipher algorithm. If the cipher + # algorithm is unknown, or is "none", 0 is returned for both elements + # of the tuple. + # if :iv_len option is supplied the third return value will be ivlen + # + # source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#99 + def get_lengths(name, options = T.unsafe(nil)); end + + # Returns true if the underlying OpenSSL library supports the given cipher, + # and false otherwise. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#46 + def supported?(name); end + end +end + +# source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#34 +Net::SSH::Transport::CipherFactory::SSH_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# Maps the SSH name of a cipher to it's corresponding OpenSSL name +# +# source://net-ssh//lib/net/ssh/transport/cipher_factory.rb#14 +Net::SSH::Transport::CipherFactory::SSH_TO_OSSL = T.let(T.unsafe(nil), Hash) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#4 +module Net::SSH::Transport::Constants; end + +# source://net-ssh//lib/net/ssh/transport/constants.rb#12 +Net::SSH::Transport::Constants::DEBUG = T.let(T.unsafe(nil), Integer) + +# -- +# Transport layer generic messages +# ++ +# +# source://net-ssh//lib/net/ssh/transport/constants.rb#9 +Net::SSH::Transport::Constants::DISCONNECT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#10 +Net::SSH::Transport::Constants::IGNORE = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#33 +Net::SSH::Transport::Constants::KEXDH_GEX_GROUP = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#34 +Net::SSH::Transport::Constants::KEXDH_GEX_INIT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#35 +Net::SSH::Transport::Constants::KEXDH_GEX_REPLY = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#36 +Net::SSH::Transport::Constants::KEXDH_GEX_REQUEST = T.let(T.unsafe(nil), Integer) + +# -- +# Key exchange method specific messages +# ++ +# +# source://net-ssh//lib/net/ssh/transport/constants.rb#27 +Net::SSH::Transport::Constants::KEXDH_INIT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#28 +Net::SSH::Transport::Constants::KEXDH_REPLY = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#30 +Net::SSH::Transport::Constants::KEXECDH_INIT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#31 +Net::SSH::Transport::Constants::KEXECDH_REPLY = T.let(T.unsafe(nil), Integer) + +# -- +# Algorithm negotiation messages +# ++ +# +# source://net-ssh//lib/net/ssh/transport/constants.rb#20 +Net::SSH::Transport::Constants::KEXINIT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#21 +Net::SSH::Transport::Constants::NEWKEYS = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#14 +Net::SSH::Transport::Constants::SERVICE_ACCEPT = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#13 +Net::SSH::Transport::Constants::SERVICE_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/constants.rb#11 +Net::SSH::Transport::Constants::UNIMPLEMENTED = T.let(T.unsafe(nil), Integer) + +# Implements a simple factory interface for fetching hmac implementations, or +# for finding the key lengths for hmac implementations.s +# +# source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#7 +module Net::SSH::Transport::HMAC + class << self + # Retrieves a new hmac instance of the given SSH type (+name+). If +key+ is + # given, the new instance will be initialized with that key. + # + # source://net-ssh//lib/net/ssh/transport/hmac.rb#37 + def get(name, key = T.unsafe(nil), parameters = T.unsafe(nil)); end + + # Retrieves the key length for the hmac of the given SSH type (+name+). + # + # source://net-ssh//lib/net/ssh/transport/hmac.rb#43 + def key_length(name); end + end +end + +# The base class of all OpenSSL-based HMAC algorithm wrappers. +# +# source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#9 +class Net::SSH::Transport::HMAC::Abstract + # @return [Abstract] a new instance of Abstract + # + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#79 + def initialize(key = T.unsafe(nil)); end + + # Compute the HMAC digest for the given data string. + # + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#90 + def digest(data); end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#72 + def digest_class; end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#60 + def etm; end + + # The key in use for this instance. + # + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#77 + def key; end + + # Sets the key to the given value, truncating it so that it is the correct + # length. + # + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#85 + def key=(value); end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#64 + def key_length; end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#68 + def mac_length; end + + class << self + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#47 + def digest_class(*v); end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#11 + def etm(*v); end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#23 + def key_length(*v); end + + # source://net-ssh//lib/net/ssh/transport/hmac/abstract.rb#35 + def mac_length(*v); end + end +end + +# The mapping of SSH hmac algorithms to their implementations +# +# source://net-ssh//lib/net/ssh/transport/hmac.rb#19 +Net::SSH::Transport::HMAC::MAP = T.let(T.unsafe(nil), Hash) + +# The MD5 HMAC algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/md5.rb#5 +class Net::SSH::Transport::HMAC::MD5 < ::Net::SSH::Transport::HMAC::Abstract; end + +# The MD5-96 HMAC algorithm. This returns only the first 12 bytes of +# the digest. +# +# source://net-ssh//lib/net/ssh/transport/hmac/md5_96.rb#6 +class Net::SSH::Transport::HMAC::MD5_96 < ::Net::SSH::Transport::HMAC::MD5; end + +# The "none" algorithm. This has a key and mac length of 0. +# +# source://net-ssh//lib/net/ssh/transport/hmac/none.rb#5 +class Net::SSH::Transport::HMAC::None < ::Net::SSH::Transport::HMAC::Abstract + # source://net-ssh//lib/net/ssh/transport/hmac/none.rb#9 + def digest(data); end +end + +# The RIPEMD-160 HMAC algorithm. This has a mac and key length of 20, and +# uses the RIPEMD-160 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/ripemd160.rb#6 +class Net::SSH::Transport::HMAC::RIPEMD160 < ::Net::SSH::Transport::HMAC::Abstract; end + +# The SHA1 HMAC algorithm. This has a mac and key length of 20, and +# uses the SHA1 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha1.rb#6 +class Net::SSH::Transport::HMAC::SHA1 < ::Net::SSH::Transport::HMAC::Abstract; end + +# The SHA1-96 HMAC algorithm. This returns only the first 12 bytes of +# the digest. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha1_96.rb#6 +class Net::SSH::Transport::HMAC::SHA1_96 < ::Net::SSH::Transport::HMAC::SHA1; end + +# The SHA-256 HMAC algorithm. This has a mac and key length of 32, and +# uses the SHA-256 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_256.rb#6 +class Net::SSH::Transport::HMAC::SHA2_256 < ::Net::SSH::Transport::HMAC::Abstract; end + +# The SHA256-96 HMAC algorithm. This returns only the first 12 bytes of +# the digest. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_256_96.rb#6 +class Net::SSH::Transport::HMAC::SHA2_256_96 < ::Net::SSH::Transport::HMAC::SHA2_256; end + +# The SHA-256 Encrypt-Then-Mac HMAC algorithm. This has a mac and +# key length of 32, and uses the SHA-256 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_256_etm.rb#6 +class Net::SSH::Transport::HMAC::SHA2_256_Etm < ::Net::SSH::Transport::HMAC::Abstract; end + +# The SHA-512 HMAC algorithm. This has a mac and key length of 64, and +# uses the SHA-512 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_512.rb#6 +class Net::SSH::Transport::HMAC::SHA2_512 < ::Net::SSH::Transport::HMAC::Abstract; end + +# The SHA2-512-96 HMAC algorithm. This returns only the first 12 bytes of +# the digest. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_512_96.rb#6 +class Net::SSH::Transport::HMAC::SHA2_512_96 < ::Net::SSH::Transport::HMAC::SHA2_512; end + +# The SHA-512 Encrypt-Then-Mac HMAC algorithm. This has a mac and +# key length of 64, and uses the SHA-512 digest algorithm. +# +# source://net-ssh//lib/net/ssh/transport/hmac/sha2_512_etm.rb#6 +class Net::SSH::Transport::HMAC::SHA2_512_Etm < ::Net::SSH::Transport::HMAC::Abstract; end + +# A cipher that does nothing but pass the data through, unchanged. This +# keeps things in the code nice and clean when a cipher has not yet been +# determined (i.e., during key exchange). +# +# source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#7 +class Net::SSH::Transport::IdentityCipher + class << self + # A default block size of 8 is required by the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#10 + def block_size; end + + # Does nothing. Returns self. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#29 + def decrypt; end + + # Does nothing. Returns self. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#24 + def encrypt; end + + # Returns the empty string. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#39 + def final; end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#58 + def implicit_mac?; end + + # Does nothing. Returns nil. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#49 + def iv=(v); end + + # Returns an arbitrary integer. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#19 + def iv_len; end + + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#14 + def key_length; end + + # The name of this cipher, which is "identity". + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#44 + def name; end + + # Does nothing. Returns self. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#54 + def reset; end + + # Passes its single argument through unchanged. + # + # source://net-ssh//lib/net/ssh/transport/identity_cipher.rb#34 + def update(text); end + end +end + +# source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#10 +module Net::SSH::Transport::Kex; end + +# Abstract class that implement Diffie-Hellman Key Exchange +# See https://tools.ietf.org/html/rfc4253#page-21 +# +# source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#13 +class Net::SSH::Transport::Kex::Abstract + include ::Net::SSH::Loggable + include ::Net::SSH::Transport::Constants + + # Create a new instance of the Diffie-Hellman Key Exchange algorithm. + # The Diffie-Hellman (DH) key exchange provides a shared secret that + # cannot be determined by either party alone. The key exchange is + # combined with a signature with the host key to provide host + # authentication. + # + # @return [Abstract] a new instance of Abstract + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#27 + def initialize(algorithms, connection, data); end + + # Returns the value of attribute algorithms. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#17 + def algorithms; end + + # Returns the value of attribute connection. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#18 + def connection; end + + # Returns the value of attribute data. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#19 + def data; end + + # Returns the value of attribute dh. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#20 + def dh; end + + # @raise [NotImplementedError] + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#61 + def digester; end + + # Perform the key-exchange for the given session, with the given + # data. This method will return a hash consisting of the + # following keys: + # + # * :session_id + # * :server_key + # * :shared_secret + # * :hashing_algorithm + # + # The caller is expected to be able to understand how to use these + # deliverables. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#47 + def exchange_keys; end + + private + + # Send the NEWKEYS message, and expect the NEWKEYS message in + # reply. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#116 + def confirm_newkeys; end + + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#87 + def generate_key_fingerprint(key); end + + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#67 + def matching?(key_ssh_type, host_key_alg); end + + # Verify that the given key is of the expected type, and that it + # really is the key for the session's host. Raise Net::SSH::Exception + # if it is not. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#75 + def verify_server_key(key); end + + # Verify the signature that was received. Raise Net::SSH::Exception + # if the signature could not be verified. Otherwise, return the new + # session-id. + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#100 + def verify_signature(result); end +end + +# Implement key-exchange algorithm from Elliptic Curve Algorithm Integration +# in the Secure Shell Transport Layer (RFC 5656) +# +# source://net-ssh//lib/net/ssh/transport/kex/abstract5656.rb#9 +class Net::SSH::Transport::Kex::Abstract5656 < ::Net::SSH::Transport::Kex::Abstract + # @raise [NotImplementedError] + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract5656.rb#12 + def curve_name; end + + # source://net-ssh//lib/net/ssh/transport/kex/abstract.rb#20 + def ecdh; end + + private + + # source://net-ssh//lib/net/ssh/transport/kex/abstract5656.rb#22 + def build_signature_buffer(result); end + + # source://net-ssh//lib/net/ssh/transport/kex/abstract5656.rb#18 + def get_message_types; end + + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/transport/kex/abstract5656.rb#35 + def send_kexinit; end +end + +# Loads Curve25519Sha256 support which requires optinal dependencies +# +# source://net-ssh//lib/net/ssh/transport/kex/curve25519_sha256_loader.rb#6 +module Net::SSH::Transport::Kex::Curve25519Sha256Loader + class << self + # source://net-ssh//lib/net/ssh/transport/kex/curve25519_sha256_loader.rb#22 + def dependenciesRequiredForX25519; end + + # @raise [NotImplementedError] + # + # source://net-ssh//lib/net/ssh/transport/kex/curve25519_sha256_loader.rb#16 + def raiseUnlessLoaded(message); end + end +end + +# source://net-ssh//lib/net/ssh/transport/kex/curve25519_sha256_loader.rb#12 +Net::SSH::Transport::Kex::Curve25519Sha256Loader::ERROR = T.let(T.unsafe(nil), Gem::LoadError) + +# source://net-ssh//lib/net/ssh/transport/kex/curve25519_sha256_loader.rb#13 +Net::SSH::Transport::Kex::Curve25519Sha256Loader::LOADED = T.let(T.unsafe(nil), FalseClass) + +# A key-exchange service implementing the "diffie-hellman-group14-sha1" +# key-exchange algorithm. (defined in RFC 4253) +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb#9 +class Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA1 < ::Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1; end + +# The group constant +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb#32 +Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA1::G = T.let(T.unsafe(nil), Integer) + +# The radix in which P_s represents the value of P +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb#29 +Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA1::P_r = T.let(T.unsafe(nil), Integer) + +# The value of 'P', as a string, in hexadecimal +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb#11 +Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA1::P_s = T.let(T.unsafe(nil), String) + +# A key-exchange service implementing the "diffie-hellman-group14-sha256" +# key-exchange algorithm. +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb#6 +class Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA256 < ::Net::SSH::Transport::Kex::DiffieHellmanGroup14SHA1 + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb#7 + def digester; end +end + +# A key-exchange service implementing the "diffie-hellman-group1-sha1" +# key-exchange algorithm. +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#9 +class Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1 < ::Net::SSH::Transport::Kex::Abstract + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#26 + def digester; end + + private + + # Build the signature buffer to use when verifying a signature from + # the server. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#47 + def build_signature_buffer(result); end + + # Generate a DH key with a private key consisting of the given + # number of bytes. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#62 + def generate_key; end + + # Returns the INIT/REPLY constants used by this algorithm. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#41 + def get_message_types; end + + # Returns the DH key parameters for the current connection. [p, q] + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#33 + def get_parameters; end + + # Send the KEXDH_INIT message, and expect the KEXDH_REPLY. Return the + # resulting buffer. + # + # Parse the buffer from a KEXDH_REPLY message, returning a hash of + # the extracted values. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#89 + def send_kexinit; end +end + +# The group constant +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#24 +Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1::G = T.let(T.unsafe(nil), Integer) + +# The radix in which P_s represents the value of P +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#21 +Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1::P_r = T.let(T.unsafe(nil), Integer) + +# The value of 'P', as a string, in hexadecimal +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb#11 +Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1::P_s = T.let(T.unsafe(nil), String) + +# A key-exchange service implementing the +# "diffie-hellman-group-exchange-sha1" key-exchange algorithm. +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#8 +class Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1 < ::Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1 + private + + # Build the signature buffer to use when verifying a signature from + # the server. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#56 + def build_signature_buffer(result); end + + # Compute the number of bits needed for the given number of bytes. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#15 + def compute_need_bits; end + + # Returns the INIT/REPLY constants used by this algorithm. + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#50 + def get_message_types; end + + # Returns the DH key parameters for the given session. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#32 + def get_parameters; end +end + +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#10 +Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1::MAXIMUM_BITS = T.let(T.unsafe(nil), Integer) + +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb#9 +Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1::MINIMUM_BITS = T.let(T.unsafe(nil), Integer) + +# A key-exchange service implementing the +# "diffie-hellman-group-exchange-sha256" key-exchange algorithm. +# +# source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb#6 +class Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA256 < ::Net::SSH::Transport::Kex::DiffieHellmanGroupExchangeSHA1 + # source://net-ssh//lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb#7 + def digester; end +end + +# A key-exchange service implementing the "ecdh-sha2-nistp256" +# key-exchange algorithm. (defined in RFC 5656) +# +# source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#9 +class Net::SSH::Transport::Kex::EcdhSHA2NistP256 < ::Net::SSH::Transport::Kex::Abstract5656 + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#14 + def curve_name; end + + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#10 + def digester; end + + private + + # compute shared secret from server's public key and client's private key + # + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#25 + def compute_shared_secret(server_ecdh_pubkey); end + + # string Q_C, client's ephemeral public key octet string + # + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#32 + def ecdh_public_key_bytes; end + + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb#20 + def generate_key; end +end + +# A key-exchange service implementing the "ecdh-sha2-nistp256" +# key-exchange algorithm. (defined in RFC 5656) +# +# source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb#9 +class Net::SSH::Transport::Kex::EcdhSHA2NistP384 < ::Net::SSH::Transport::Kex::EcdhSHA2NistP256 + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb#14 + def curve_name; end + + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb#10 + def digester; end +end + +# A key-exchange service implementing the "ecdh-sha2-nistp521" +# key-exchange algorithm. (defined in RFC 5656) +# +# source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb#9 +class Net::SSH::Transport::Kex::EcdhSHA2NistP521 < ::Net::SSH::Transport::Kex::EcdhSHA2NistP256 + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb#14 + def curve_name; end + + # source://net-ssh//lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb#10 + def digester; end +end + +# Maps the supported key-exchange algorithms as named by the SSH protocol +# to their corresponding implementors. +# +# source://net-ssh//lib/net/ssh/transport/kex.rb#15 +Net::SSH::Transport::Kex::MAP = T.let(T.unsafe(nil), Hash) + +# source://net-ssh//lib/net/ssh/transport/key_expander.rb#4 +module Net::SSH::Transport::KeyExpander + class << self + # Generate a key value in accordance with the SSH2 specification. + # (RFC4253 7.2. "Output from Key Exchange") + # + # source://net-ssh//lib/net/ssh/transport/key_expander.rb#7 + def expand_key(bytes, start, options = T.unsafe(nil)); end + end +end + +# source://net-ssh//lib/net/ssh/transport/ctr.rb#6 +class Net::SSH::Transport::OpenSSLAESCTR < ::SimpleDelegator + # @return [OpenSSLAESCTR] a new instance of OpenSSLAESCTR + # + # source://net-ssh//lib/net/ssh/transport/ctr.rb#7 + def initialize(original); end + + # source://net-ssh//lib/net/ssh/transport/ctr.rb#12 + def block_size; end + + # source://net-ssh//lib/net/ssh/transport/ctr.rb#24 + def iv=(iv_s); end + + # source://net-ssh//lib/net/ssh/transport/ctr.rb#20 + def reset; end + + class << self + # source://net-ssh//lib/net/ssh/transport/ctr.rb#16 + def block_size; end + end +end + +# we add those mehtods to OpenSSL::Chipher instances +# +# source://net-ssh//lib/net/ssh/transport/openssl_cipher_extensions.rb#3 +module Net::SSH::Transport::OpenSSLCipherExtensions + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/openssl_cipher_extensions.rb#4 + def implicit_mac?; end +end + +# A module that builds additional functionality onto the Net::SSH::BufferedIo +# module. It adds SSH encryption, compression, and packet validation, as +# per the SSH2 protocol. It also adds an abstraction for polling packets, +# to allow for both blocking and non-blocking reads. +# +# source://net-ssh//lib/net/ssh/transport/packet_stream.rb#15 +module Net::SSH::Transport::PacketStream + include ::Net::SSH::Loggable + include ::Net::SSH::BufferedIo + + # Returns true if the IO is available for reading, and false otherwise. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#73 + def available_for_read?; end + + # Performs any pending cleanup necessary on the IO and its associated + # state objects. (See State#cleanup). + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#187 + def cleanup; end + + # The client state object, which encapsulates the algorithms used to build + # packets to send to the server. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#36 + def client; end + + # The name of the client (local) end of the socket, as reported by the + # socket. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#40 + def client_name; end + + # Enqueues a packet to be sent, but does not immediately send the packet. + # The given payload is pre-processed according to the algorithms specified + # in the client state (compression, cipher, and hmac). + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#126 + def enqueue_packet(payload); end + + # The map of "hints" that can be used to modify the behavior of the packet + # stream. For instance, when authentication succeeds, an "authenticated" + # hint is set, which is used to determine whether or not to compress the + # data when using the "delayed" compression algorithm. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#28 + def hints; end + + # If the IO object requires a rekey operation (as indicated by either its + # client or server state objects, see State#needs_rekey?), this will + # yield. Otherwise, this does nothing. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#195 + def if_needs_rekey?; end + + # Returns the next full packet. If the mode parameter is :nonblock (the + # default), then this will return immediately, whether a packet is + # available or not, and will return nil if there is no packet ready to be + # returned. If the mode parameter is :block, then this method will block + # until a packet is available or timeout seconds have passed. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#83 + def next_packet(mode = T.unsafe(nil), timeout = T.unsafe(nil)); end + + # The IP address of the peer (remote) end of the socket, as reported by + # the socket. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#62 + def peer_ip; end + + # Enqueues a packet to be sent, and blocks until the entire packet is + # sent. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#118 + def send_packet(payload); end + + # The server state object, which encapsulates the algorithms used to interpret + # packets coming from the server. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#32 + def server; end + + protected + + # Called when this module is used to extend an object. It initializes + # the states and generally prepares the object for use as a packet stream. + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#207 + def initialize_ssh; end + + # Tries to read the next packet. If there is insufficient data to read + # an entire packet, this returns immediately, otherwise the packet is + # read, post-processed according to the cipher, hmac, and compression + # algorithms specified in the server state object, and returned as a + # new Packet object. + # + # @raise [Net::SSH::Exception] + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#221 + def poll_next_packet; end + + class << self + # @private + # + # source://net-ssh//lib/net/ssh/transport/packet_stream.rb#20 + def extended(object); end + end +end + +# source://net-ssh//lib/net/ssh/transport/packet_stream.rb#16 +Net::SSH::Transport::PacketStream::PROXY_COMMAND_HOST_IP = T.let(T.unsafe(nil), String) + +# Negotiates the SSH protocol version and trades information about server +# and client. This is never used directly--it is always called by the +# transport layer as part of the initialization process of the transport +# layer. +# +# Note that this class also encapsulates the negotiated version, and acts as +# the authoritative reference for any queries regarding the version in effect. +# +# source://net-ssh//lib/net/ssh/transport/server_version.rb#15 +class Net::SSH::Transport::ServerVersion + include ::Net::SSH::Loggable + + # Instantiates a new ServerVersion and immediately (and synchronously) + # negotiates the SSH protocol in effect, using the given socket. + # + # @return [ServerVersion] a new instance of ServerVersion + # + # source://net-ssh//lib/net/ssh/transport/server_version.rb#29 + def initialize(socket, logger, timeout = T.unsafe(nil)); end + + # Any header text sent by the server prior to sending the version. + # + # source://net-ssh//lib/net/ssh/transport/server_version.rb#22 + def header; end + + # The version string reported by the server. + # + # source://net-ssh//lib/net/ssh/transport/server_version.rb#25 + def version; end + + private + + # Negotiates the SSH protocol to use, via the given socket. If the server + # reports an incompatible SSH version (e.g., SSH1), this will raise an + # exception. + # + # @raise [Net::SSH::ConnectionTimeout] + # + # source://net-ssh//lib/net/ssh/transport/server_version.rb#41 + def negotiate!(socket, timeout); end +end + +# The SSH version string as reported by Net::SSH +# +# source://net-ssh//lib/net/ssh/transport/server_version.rb#19 +Net::SSH::Transport::ServerVersion::PROTO_VERSION = T.let(T.unsafe(nil), String) + +# The transport layer represents the lowest level of the SSH protocol, and +# implements basic message exchanging and protocol initialization. It will +# never be instantiated directly (unless you really know what you're about), +# but will instead be created for you automatically when you create a new +# SSH session via Net::SSH.start. +# +# source://net-ssh//lib/net/ssh/transport/session.rb#23 +class Net::SSH::Transport::Session + include ::Net::SSH::Loggable + include ::Net::SSH::Transport::Constants + + # Instantiates a new transport layer abstraction. This will block until + # the initial key exchange completes, leaving you with a ready-to-use + # transport session. + # + # @return [Session] a new instance of Session + # + # source://net-ssh//lib/net/ssh/transport/session.rb#58 + def initialize(host, options = T.unsafe(nil)); end + + # The Algorithms instance used to perform key exchanges. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#46 + def algorithms; end + + # Cleans up (see PacketStream#cleanup) and closes the underlying socket. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#127 + def close; end + + # Returns true if the underlying socket has been closed. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/session.rb#122 + def closed?; end + + # Configure's the packet stream's client state with the given set of + # options. This is typically used to define the cipher, compression, and + # hmac algorithms to use when sending packets to the server. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#255 + def configure_client(options = T.unsafe(nil)); end + + # Configure's the packet stream's server state with the given set of + # options. This is typically used to define the cipher, compression, and + # hmac algorithms to use when reading packets from the server. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#262 + def configure_server(options = T.unsafe(nil)); end + + # Enqueues the given message, such that it will be sent at the earliest + # opportunity. This does not block, but returns immediately. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#248 + def enqueue_message(message); end + + # Sets a new hint for the packet stream, which the packet stream may use + # to change its behavior. (See PacketStream#hints). + # + # source://net-ssh//lib/net/ssh/transport/session.rb#268 + def hint(which, value = T.unsafe(nil)); end + + # The host to connect to, as given to the constructor. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#31 + def host; end + + # Returns the host (and possibly IP address) in a format compatible with + # SSH known-host files. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#103 + def host_as_string; end + + # The host-key verifier object used to verify host keys, to ensure that + # the connection is not being spoofed. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#50 + def host_key_verifier; end + + # source://net-ssh//lib/net/ssh/transport/session.rb#94 + def host_keys; end + + # Blocks until a new packet is available to be read, and returns that + # packet. See #poll_message. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#174 + def next_message; end + + # The hash of options that were given to the object at initialization. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#53 + def options; end + + # Returns a hash of information about the peer (remote) side of the socket, + # including :ip, :port, :host, and :canonized (see #host_as_string). + # + # source://net-ssh//lib/net/ssh/transport/session.rb#168 + def peer; end + + # Tries to read the next packet from the socket. If mode is :nonblock (the + # default), this will not block and will return nil if there are no packets + # waiting to be read. Otherwise, this will block until a packet is + # available. Note that some packet types (DISCONNECT, IGNORE, UNIMPLEMENTED, + # DEBUG, and KEXINIT) are handled silently by this method, and will never + # be returned. + # + # If a key-exchange is in process and a disallowed packet type is + # received, it will be enqueued and otherwise ignored. When a key-exchange + # is not in process, and consume_queue is true, packets will be first + # read from the queue before the socket is queried. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#189 + def poll_message(mode = T.unsafe(nil), consume_queue = T.unsafe(nil)); end + + # The port number to connect to, as given in the options to the constructor. + # If no port number was given, this will default to DEFAULT_PORT. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#35 + def port; end + + # Adds the given packet to the packet queue. If the queue is non-empty, + # #poll_message will return packets from the queue in the order they + # were received. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#236 + def push(packet); end + + # this method is primarily for use in tests + # + # source://net-ssh//lib/net/ssh/transport/session.rb#275 + def queue; end + + # Requests a rekey operation, and blocks until the operation completes. + # If a rekey is already pending, this returns immediately, having no + # effect. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#150 + def rekey!; end + + # Returns immediately if a rekey is already in process. Otherwise, if a + # rekey is needed (as indicated by the socket, see PacketStream#if_needs_rekey?) + # one is performed, causing this method to block until it completes. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#160 + def rekey_as_needed; end + + # Sends the given message via the packet stream, blocking until the + # entire message has been sent. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#242 + def send_message(message); end + + # The ServerVersion instance that encapsulates the negotiated protocol + # version. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#43 + def server_version; end + + # Returns a new service_request packet for the given service name, ready + # for sending to the server. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#143 + def service_request(service); end + + # Performs a "hard" shutdown of the connection. In general, this should + # never be done, but it might be necessary (in a rescue clause, for instance, + # when the connection needs to close but you don't know the status of the + # underlying protocol's state). + # + # source://net-ssh//lib/net/ssh/transport/session.rb#136 + def shutdown!; end + + # The underlying socket object being used to communicate with the remote + # host. + # + # source://net-ssh//lib/net/ssh/transport/session.rb#39 + def socket; end + + # Waits (blocks) until the given block returns true. If no block is given, + # this just waits long enough to see if there are any pending packets. Any + # packets read are enqueued (see #push). + # + # source://net-ssh//lib/net/ssh/transport/session.rb#223 + def wait; end + + private + + # Instantiates a new host-key verification class, based on the value of + # the parameter. + # + # Usually, the argument is a symbol like `:never` which corresponds to + # a verifier, like `::Net::SSH::Verifiers::Never`. + # + # - :never (very insecure) + # - :accept_new_or_local_tunnel (insecure) + # - :accept_new (insecure) + # - :always (secure) + # + # If the argument happens to respond to :verify and :verify_signature, + # it is returned directly. Otherwise, an exception is raised. + # + # Values false, true, and :very were deprecated in + # [#595](https://github.com/net-ssh/net-ssh/pull/595) + # + # source://net-ssh//lib/net/ssh/transport/session.rb#312 + def select_host_key_verifier(verifier); end +end + +# Compatibility verifier which allows users to keep using +# custom verifier code without adding new :verify_signature +# method. +# +# source://net-ssh//lib/net/ssh/transport/session.rb#282 +class Net::SSH::Transport::Session::CompatibleVerifier + # @return [CompatibleVerifier] a new instance of CompatibleVerifier + # + # source://net-ssh//lib/net/ssh/transport/session.rb#283 + def initialize(verifier); end + + # source://net-ssh//lib/net/ssh/transport/session.rb#287 + def verify(arguments); end + + # source://net-ssh//lib/net/ssh/transport/session.rb#291 + def verify_signature(&block); end +end + +# The standard port for the SSH protocol. +# +# source://net-ssh//lib/net/ssh/transport/session.rb#28 +Net::SSH::Transport::Session::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) + +# Encapsulates state information about one end of an SSH connection. Such +# state includes the packet sequence number, the algorithms in use, how +# many packets and blocks have been processed since the last reset, and so +# forth. This class will never be instantiated directly, but is used as +# part of the internal state of the PacketStream module. +# +# source://net-ssh//lib/net/ssh/transport/state.rb#13 +class Net::SSH::Transport::State + # Creates a new state object, belonging to the given socket. Initializes + # the algorithms to "none". + # + # @return [State] a new instance of State + # + # source://net-ssh//lib/net/ssh/transport/state.rb#58 + def initialize(socket, role); end + + # The block size for the cipher + # + # source://net-ssh//lib/net/ssh/transport/state.rb#39 + def block_size; end + + # The number of data blocks processed since the last call to #reset! + # + # source://net-ssh//lib/net/ssh/transport/state.rb#33 + def blocks; end + + # The cipher algorithm in use for this socket endpoint. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#36 + def cipher; end + + # Closes any the compressor and/or decompressor objects that have been + # instantiated. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#168 + def cleanup; end + + # Compresses the data. If no compression is in effect, this will just return + # the data unmodified, otherwise it uses #compressor to compress the data. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#121 + def compress(data); end + + # The compression algorithm in use for this endpoint. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#24 + def compression; end + + # Returns true if data compression/decompression is enabled. This will + # return true if :standard compression is selected, or if :delayed + # compression is selected and the :authenticated hint has been received + # by the socket. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/state.rb#115 + def compression?; end + + # The compression level to use when compressing data (or nil, for the default). + # + # source://net-ssh//lib/net/ssh/transport/state.rb#27 + def compression_level; end + + # The compressor object to use when compressing data. This takes into account + # the desired compression level. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#102 + def compressor; end + + # Deompresses the data. If no compression is in effect, this will just return + # the data unmodified, otherwise it uses #decompressor to decompress the data. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#130 + def decompress(data); end + + # The decompressor object to use when decompressing data. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#107 + def decompressor; end + + # source://net-ssh//lib/net/ssh/transport/state.rb#85 + def final_cipher; end + + # The hmac algorithm in use for this endpoint. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#21 + def hmac; end + + # Increments the counters. The sequence number is incremented (and remapped + # so it always fits in a 32-bit integer). The number of packets and blocks + # are also incremented. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#94 + def increment(packet_length); end + + # The maximum number of blocks that this endpoint wants to process before + # needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#50 + def max_blocks; end + + # The maximum number of blocks that this endpoint wants to process before + # needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#50 + def max_blocks=(_arg0); end + + # The maximum number of packets that this endpoint wants to process before + # needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#46 + def max_packets; end + + # The maximum number of packets that this endpoint wants to process before + # needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#46 + def max_packets=(_arg0); end + + # Returns true if the number of packets processed exceeds the maximum + # number of packets, or if the number of blocks processed exceeds the + # maximum number of blocks. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/state.rb#187 + def needs_rekey?; end + + # The number of packets processed since the last call to #reset! + # + # source://net-ssh//lib/net/ssh/transport/state.rb#30 + def packets; end + + # The user-specified maximum number of bytes that this endpoint ought to + # process before needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#54 + def rekey_limit; end + + # The user-specified maximum number of bytes that this endpoint ought to + # process before needing a rekey. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#54 + def rekey_limit=(_arg0); end + + # Resets the counters on the state object, but leaves the sequence_number + # unchanged. It also sets defaults for and recomputes the max_packets and + # max_blocks values. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#140 + def reset!; end + + # The role that this state plays (either :client or :server) + # + # source://net-ssh//lib/net/ssh/transport/state.rb#42 + def role; end + + # The next packet sequence number for this socket endpoint. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#18 + def sequence_number; end + + # A convenience method for quickly setting multiple values in a single + # command. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#72 + def set(values); end + + # The socket object that owns this state object. + # + # source://net-ssh//lib/net/ssh/transport/state.rb#15 + def socket; end + + # source://net-ssh//lib/net/ssh/transport/state.rb#79 + def update_cipher(data); end + + private + + # source://net-ssh//lib/net/ssh/transport/state.rb#194 + def update_next_iv(data, reset = T.unsafe(nil)); end +end + +# This is the set of options that Net::SSH.start recognizes. See +# Net::SSH.start for a description of each option. +# +# source://net-ssh//lib/net/ssh.rb#65 +Net::SSH::VALID_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://net-ssh//lib/net/ssh/verifiers/always.rb#6 +module Net::SSH::Verifiers; end + +# Does a strict host verification, looking the server up in the known +# host files to see if a key has already been seen for this server. If this +# server does not appear in any host file, this will silently add the +# server. If the server does appear at least once, but the key given does +# not match any known for the server, an exception will be raised (HostKeyMismatch). +# Otherwise, this returns true. +# +# source://net-ssh//lib/net/ssh/verifiers/accept_new.rb#14 +class Net::SSH::Verifiers::AcceptNew < ::Net::SSH::Verifiers::Always + # source://net-ssh//lib/net/ssh/verifiers/accept_new.rb#15 + def verify(arguments); end + + # source://net-ssh//lib/net/ssh/verifiers/accept_new.rb#24 + def verify_signature(&block); end +end + +# Basically the same as the AcceptNew verifier, but does not try to actually +# verify a connection if the server is the localhost and the port is a +# nonstandard port number. Those two conditions will typically mean the +# connection is being tunnelled through a forwarded port, so the known-hosts +# file will not be helpful (in general). +# +# source://net-ssh//lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb#11 +class Net::SSH::Verifiers::AcceptNewOrLocalTunnel < ::Net::SSH::Verifiers::AcceptNew + # Tries to determine if the connection is being tunnelled, and if so, + # returns true. Otherwise, performs the standard strict verification. + # + # source://net-ssh//lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb#14 + def verify(arguments); end + + private + + # A connection is potentially being tunnelled if the port is not 22, + # and the ip refers to the localhost. + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb#24 + def tunnelled?(args); end +end + +# Does a strict host verification, looking the server up in the known +# host files to see if a key has already been seen for this server. If this +# server does not appear in any host file, an exception will be raised +# (HostKeyUnknown). This is in contrast to the "Strict" class, which will +# silently add the key to your known_hosts file. If the server does appear at +# least once, but the key given does not match any known for the server, an +# exception will be raised (HostKeyMismatch). +# Otherwise, this returns true. +# +# source://net-ssh//lib/net/ssh/verifiers/always.rb#15 +class Net::SSH::Verifiers::Always + # source://net-ssh//lib/net/ssh/verifiers/always.rb#16 + def verify(arguments); end + + # source://net-ssh//lib/net/ssh/verifiers/always.rb#40 + def verify_signature(&block); end + + private + + # source://net-ssh//lib/net/ssh/verifiers/always.rb#46 + def process_cache_miss(host_keys, args, exc_class, message); end +end + +# This host key verifier simply allows every key it sees, without +# any verification. This is simple, but very insecure because it +# exposes you to MiTM attacks. +# +# source://net-ssh//lib/net/ssh/verifiers/never.rb#7 +class Net::SSH::Verifiers::Never + # Returns true. + # + # source://net-ssh//lib/net/ssh/verifiers/never.rb#9 + def verify(arguments); end + + # source://net-ssh//lib/net/ssh/verifiers/never.rb#13 + def verify_signature(&block); end +end + +# A class for describing the current version of a library. The version +# consists of three parts: the +major+ number, the +minor+ number, and the +# +tiny+ (or +patch+) number. +# +# Two Version instances may be compared, so that you can test that a version +# of a library is what you require: +# +# require 'net/ssh/version' +# +# if Net::SSH::Version::CURRENT < Net::SSH::Version[2,1,0] +# abort "your software is too old!" +# end +# +# source://net-ssh//lib/net/ssh/version.rb#15 +class Net::SSH::Version + include ::Comparable + + # Create a new Version object with the given components. + # + # @return [Version] a new instance of Version + # + # source://net-ssh//lib/net/ssh/version.rb#27 + def initialize(major, minor, tiny, pre = T.unsafe(nil)); end + + # Compare this version to the given +version+ object. + # + # source://net-ssh//lib/net/ssh/version.rb#32 + def <=>(version); end + + # Returns the value of attribute major. + # + # source://net-ssh//lib/net/ssh/version.rb#24 + def major; end + + # Returns the value of attribute minor. + # + # source://net-ssh//lib/net/ssh/version.rb#24 + def minor; end + + # Returns the value of attribute tiny. + # + # source://net-ssh//lib/net/ssh/version.rb#24 + def tiny; end + + # Converts this version to a canonical integer that may be compared + # against other version objects. + # + # source://net-ssh//lib/net/ssh/version.rb#44 + def to_i; end + + # Converts this version object to a string, where each of the three + # version components are joined by the '.' character. E.g., 2.0.0. + # + # source://net-ssh//lib/net/ssh/version.rb#38 + def to_s; end + + class << self + # A convenience method for instantiating a new Version instance with the + # given +major+, +minor+, and +tiny+ components. + # + # source://net-ssh//lib/net/ssh/version.rb#20 + def [](major, minor, tiny, pre = T.unsafe(nil)); end + end +end + +# The current version of the Net::SSH library as a Version instance +# +# source://net-ssh//lib/net/ssh/version.rb#62 +Net::SSH::Version::CURRENT = T.let(T.unsafe(nil), Net::SSH::Version) + +# The major component of this version of the Net::SSH library +# +# source://net-ssh//lib/net/ssh/version.rb#49 +Net::SSH::Version::MAJOR = T.let(T.unsafe(nil), Integer) + +# The minor component of this version of the Net::SSH library +# +# source://net-ssh//lib/net/ssh/version.rb#52 +Net::SSH::Version::MINOR = T.let(T.unsafe(nil), Integer) + +# The prerelease component of this version of the Net::SSH library +# nil allowed +# +# source://net-ssh//lib/net/ssh/version.rb#59 +Net::SSH::Version::PRE = T.let(T.unsafe(nil), T.untyped) + +# The current version of the Net::SSH library as a String +# +# source://net-ssh//lib/net/ssh/version.rb#65 +Net::SSH::Version::STRING = T.let(T.unsafe(nil), String) + +# The tiny component of this version of the Net::SSH library +# +# source://net-ssh//lib/net/ssh/version.rb#55 +Net::SSH::Version::TINY = T.let(T.unsafe(nil), Integer) + +# This class is originally defined in the OpenSSL module. As needed, methods +# have been added to it by the Net::SSH module for convenience in dealing with +# SSH functionality. +# +# source://net-ssh//lib/net/ssh/transport/openssl.rb#8 +class OpenSSL::BN + # Converts a BN object to a string. The format used is that which is + # required by the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#11 + def to_ssh; end +end + +# This class is originally defined in the OpenSSL module. As needed, methods +# have been added to it by the Net::SSH module for convenience in dealing +# with SSH functionality. +# +# source://net-ssh//lib/net/ssh/transport/openssl.rb#33 +class OpenSSL::PKey::DH < ::OpenSSL::PKey::PKey + # Determines whether the pub_key for this key is valid. (This algorithm + # lifted more-or-less directly from OpenSSH, dh.c, dh_pub_is_valid.) + # + # @return [Boolean] + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#36 + def valid?; end +end + +# This class is originally defined in the OpenSSL module. As needed, methods +# have been added to it by the Net::SSH module for convenience in dealing +# with SSH functionality. +# +# source://net-ssh//lib/net/ssh/transport/openssl.rb#93 +class OpenSSL::PKey::DSA < ::OpenSSL::PKey::PKey + # Signs the given data. + # + # @raise [OpenSSL::PKey::DSAError] + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#120 + def ssh_do_sign(data, sig_alg = T.unsafe(nil)); end + + # Verifies the given signature matches the given data. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#109 + def ssh_do_verify(sig, data, options = T.unsafe(nil)); end + + # Returns "ssh-dss", which is the description of this key type used by the + # SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#96 + def ssh_signature_type; end + + # Returns "ssh-dss", which is the description of this key type used by the + # SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#96 + def ssh_type; end + + # Converts the key to a blob, according to the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#103 + def to_blob; end +end + +# This class is originally defined in the OpenSSL module. As needed, methods +# have been added to it by the Net::SSH module for convenience in dealing +# with SSH functionality. +# +# source://net-ssh//lib/net/ssh/transport/openssl.rb#140 +class OpenSSL::PKey::EC < ::OpenSSL::PKey::PKey + # Returns the signature for the given data. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#244 + def ssh_do_sign(data, sig_alg = T.unsafe(nil)); end + + # Verifies the given signature matches the given data. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#218 + def ssh_do_verify(sig, data, options = T.unsafe(nil)); end + + # Returns the description of this key type used by the + # SSH2 protocol, like "ecdsa-sha2-nistp256" + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#187 + def ssh_signature_type; end + + # Returns the description of this key type used by the + # SSH2 protocol, like "ecdsa-sha2-nistp256" + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#187 + def ssh_type; end + + # Converts the key to a blob, according to the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#210 + def to_blob; end + + private + + # source://net-ssh//lib/net/ssh/transport/openssl.rb#193 + def digester; end + + class << self + # source://net-ssh//lib/net/ssh/transport/openssl.rb#153 + def read_keyblob(curve_name_in_type, buffer); end + end +end + +# source://net-ssh//lib/net/ssh/transport/openssl.rb#141 +OpenSSL::PKey::EC::CurveNameAlias = T.let(T.unsafe(nil), Hash) + +# source://net-ssh//lib/net/ssh/transport/openssl.rb#147 +OpenSSL::PKey::EC::CurveNameAliasInv = T.let(T.unsafe(nil), Hash) + +# source://net-ssh//lib/net/ssh/transport/openssl.rb#255 +class OpenSSL::PKey::EC::Point + # Returns the description of this key type used by the + # SSH2 protocol, like "ecdsa-sha2-nistp256" + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#258 + def ssh_signature_type; end + + # Returns the description of this key type used by the + # SSH2 protocol, like "ecdsa-sha2-nistp256" + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#258 + def ssh_type; end + + # Converts the key to a blob, according to the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#265 + def to_blob; end +end + +# source://net-ssh//lib/net/ssh/transport/openssl.rb#26 +class OpenSSL::PKey::PKey + include ::Net::SSH::Authentication::PubKeyFingerprint +end + +# This class is originally defined in the OpenSSL module. As needed, methods +# have been added to it by the Net::SSH module for convenience in dealing +# with SSH functionality. +# +# source://net-ssh//lib/net/ssh/transport/openssl.rb#48 +class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey + # Returns the signature for the given data. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#77 + def ssh_do_sign(data, sig_alg = T.unsafe(nil)); end + + # Verifies the given signature matches the given data. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#63 + def ssh_do_verify(sig, data, options = T.unsafe(nil)); end + + # Returns "ssh-rsa", which is the description of this key type used by the + # SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#51 + def ssh_signature_type; end + + # Returns "ssh-rsa", which is the description of this key type used by the + # SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#51 + def ssh_type; end + + # Converts the key to a blob, according to the SSH2 protocol. + # + # source://net-ssh//lib/net/ssh/transport/openssl.rb#58 + def to_blob; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/netrc@0.11.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/netrc@0.11.0.rbi new file mode 100644 index 0000000..4ae989b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -0,0 +1,159 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `netrc` gem. +# Please instead update this file by running `bin/tapioca gem netrc`. + + +# source://netrc//lib/netrc.rb#3 +class Netrc + # @return [Netrc] a new instance of Netrc + # + # source://netrc//lib/netrc.rb#166 + def initialize(path, data); end + + # source://netrc//lib/netrc.rb#180 + def [](k); end + + # source://netrc//lib/netrc.rb#188 + def []=(k, info); end + + # source://netrc//lib/netrc.rb#200 + def delete(key); end + + # source://netrc//lib/netrc.rb#211 + def each(&block); end + + # source://netrc//lib/netrc.rb#196 + def length; end + + # source://netrc//lib/netrc.rb#215 + def new_item(m, l, p); end + + # Returns the value of attribute new_item_prefix. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix; end + + # Sets the attribute new_item_prefix + # + # @param value the value to set the attribute new_item_prefix to. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix=(_arg0); end + + # source://netrc//lib/netrc.rb#219 + def save; end + + # source://netrc//lib/netrc.rb#233 + def unparse; end + + class << self + # source://netrc//lib/netrc.rb#42 + def check_permissions(path); end + + # source://netrc//lib/netrc.rb#33 + def config; end + + # @yield [self.config] + # + # source://netrc//lib/netrc.rb#37 + def configure; end + + # source://netrc//lib/netrc.rb#10 + def default_path; end + + # source://netrc//lib/netrc.rb#14 + def home_path; end + + # source://netrc//lib/netrc.rb#85 + def lex(lines); end + + # source://netrc//lib/netrc.rb#29 + def netrc_filename; end + + # Returns two values, a header and a list of items. + # Each item is a tuple, containing some or all of: + # - machine keyword (including trailing whitespace+comments) + # - machine name + # - login keyword (including surrounding whitespace+comments) + # - login + # - password keyword (including surrounding whitespace+comments) + # - password + # - trailing chars + # This lets us change individual fields, then write out the file + # with all its original formatting. + # + # source://netrc//lib/netrc.rb#129 + def parse(ts); end + + # Reads path and parses it as a .netrc file. If path doesn't + # exist, returns an empty object. Decrypt paths ending in .gpg. + # + # source://netrc//lib/netrc.rb#51 + def read(path = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://netrc//lib/netrc.rb#112 + def skip?(s); end + end +end + +# source://netrc//lib/netrc.rb#8 +Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) + +# source://netrc//lib/netrc.rb#244 +class Netrc::Entry < ::Struct + # Returns the value of attribute login + # + # @return [Object] the current value of login + def login; end + + # Sets the attribute login + # + # @param value [Object] the value to set the attribute login to. + # @return [Object] the newly set value + def login=(_); end + + # Returns the value of attribute password + # + # @return [Object] the current value of password + def password; end + + # Sets the attribute password + # + # @param value [Object] the value to set the attribute password to. + # @return [Object] the newly set value + def password=(_); end + + def to_ary; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://netrc//lib/netrc.rb#250 +class Netrc::Error < ::StandardError; end + +# source://netrc//lib/netrc.rb#68 +class Netrc::TokenArray < ::Array + # source://netrc//lib/netrc.rb#76 + def readto; end + + # source://netrc//lib/netrc.rb#69 + def take; end +end + +# source://netrc//lib/netrc.rb#4 +Netrc::VERSION = T.let(T.unsafe(nil), String) + +# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows +# +# source://netrc//lib/netrc.rb#7 +Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/nio4r@2.7.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/nio4r@2.7.3.rbi new file mode 100644 index 0000000..158dcda --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/nio4r@2.7.3.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `nio4r` gem. +# Please instead update this file by running `bin/tapioca gem nio4r`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/nokogiri@1.16.7.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/nokogiri@1.16.7.rbi new file mode 100644 index 0000000..b1e6ba2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/nokogiri@1.16.7.rbi @@ -0,0 +1,7311 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `nokogiri` gem. +# Please instead update this file by running `bin/tapioca gem nokogiri`. + + +# Nokogiri parses and searches XML/HTML very quickly, and also has +# correctly implemented CSS3 selector support as well as XPath 1.0 +# support. +# +# Parsing a document returns either a Nokogiri::XML::Document, or a +# Nokogiri::HTML4::Document depending on the kind of document you parse. +# +# Here is an example: +# +# require 'nokogiri' +# require 'open-uri' +# +# # Get a Nokogiri::HTML4::Document for the page we’re interested in... +# +# doc = Nokogiri::HTML4(URI.open('http://www.google.com/search?q=tenderlove')) +# +# # Do funky things with it using Nokogiri::XML::Node methods... +# +# #### +# # Search for nodes by css +# doc.css('h3.r a.l').each do |link| +# puts link.content +# end +# +# See also: +# +# - Nokogiri::XML::Searchable#css for more information about CSS searching +# - Nokogiri::XML::Searchable#xpath for more information about XPath searching +# +# source://nokogiri//lib/nokogiri.rb#38 +module Nokogiri + class << self + # source://nokogiri//lib/nokogiri/html4.rb#10 + def HTML(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # :call-seq: + # HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document + # + # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#10 + def HTML4(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Since v1.12.0 + # + # ⚠ HTML5 functionality is not available when running JRuby. + # + # Parse an HTML5 document. Convenience method for {Nokogiri::HTML5::Document.parse} + # + # source://nokogiri//lib/nokogiri/html5.rb#30 + def HTML5(input, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # Parse a document and add the Slop decorator. The Slop decorator + # implements method_missing such that methods may be used instead of CSS + # or XPath. For example: + # + # doc = Nokogiri::Slop(<<-eohtml) + # + # + #

    first

    + #

    second

    + # + # + # eohtml + # assert_equal('second', doc.html.body.p[1].text) + # + # source://nokogiri//lib/nokogiri.rb#91 + def Slop(*args, &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#7 + def XML(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+. + # + # Example: + # + # xslt = Nokogiri::XSLT(File.read(ARGV[0])) + # + # source://nokogiri//lib/nokogiri/xslt.rb#13 + def XSLT(stylesheet, modules = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri.rb#96 + def install_default_aliases; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#206 + def jruby?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#211 + def libxml2_patches; end + + # Create a new Nokogiri::XML::DocumentFragment + # + # source://nokogiri//lib/nokogiri.rb#68 + def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + + # Parse an HTML or XML document. +string+ contains the document. + # + # source://nokogiri//lib/nokogiri.rb#42 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#201 + def uses_gumbo?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#193 + def uses_libxml?(requirement = T.unsafe(nil)); end + end +end + +# Translate a CSS selector into an XPath 1.0 query +# +# source://nokogiri//lib/nokogiri/css.rb#6 +module Nokogiri::CSS + class << self + # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0. + # It is not used by Nokogiri and shouldn't be part of the public API. + # + # source://nokogiri//lib/nokogiri/css.rb#10 + def parse(selector); end + + # :call-seq: + # xpath_for(selector) → String + # xpath_for(selector [, prefix:] [, visitor:] [, ns:]) → String + # + # Translate a CSS selector to the equivalent XPath query. + # + # [Parameters] + # - +selector+ (String) The CSS selector to be translated into XPath + # + # - +prefix:+ (String) + # + # The XPath prefix for the query, see Nokogiri::XML::XPath for some options. Default is + # +XML::XPath::GLOBAL_SEARCH_PREFIX+. + # + # - +visitor:+ (Nokogiri::CSS::XPathVisitor) + # + # The visitor class to use to transform the AST into XPath. Default is + # +Nokogiri::CSS::XPathVisitor.new+. + # + # - +ns:+ (Hash) + # + # The namespaces that are referenced in the query, if any. This is a hash where the keys are + # the namespace prefix and the values are the namespace URIs. Default is an empty Hash. + # + # [Returns] (String) The equivalent XPath query for +selector+ + # + # 💡 Note that translated queries are cached for performance concerns. + # + # @raise [TypeError] + # + # source://nokogiri//lib/nokogiri/css.rb#42 + def xpath_for(selector, options = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#5 +class Nokogiri::CSS::Node + # Create a new Node with +type+ and +value+ + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/css/node.rb#14 + def initialize(type, value); end + + # Accept +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#20 + def accept(visitor); end + + # Find a node by type using +types+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#32 + def find_by_type(types); end + + # Convert to array + # + # source://nokogiri//lib/nokogiri/css/node.rb#49 + def to_a; end + + # Convert to_type + # + # source://nokogiri//lib/nokogiri/css/node.rb#42 + def to_type; end + + # Convert this CSS node to xpath with +prefix+ using +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#26 + def to_xpath(prefix, visitor); end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type; end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type=(_arg0); end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value; end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#6 +Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7 +class Nokogiri::CSS::Parser < ::Racc::Parser + # Create a new CSS parser with respect to +namespaces+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#60 + def initialize(namespaces = T.unsafe(nil)); end + + # reduce 0 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#361 + def _reduce_1(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#407 + def _reduce_10(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#412 + def _reduce_11(val, _values, result); end + + # reduce 12 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#424 + def _reduce_13(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#429 + def _reduce_14(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#434 + def _reduce_15(val, _values, result); end + + # reduce 16 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#441 + def _reduce_17(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#446 + def _reduce_18(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#451 + def _reduce_19(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#367 + def _reduce_2(val, _values, result); end + + # reduce 20 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#458 + def _reduce_21(val, _values, result); end + + # reduce 22 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#465 + def _reduce_23(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#470 + def _reduce_24(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#475 + def _reduce_25(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#482 + def _reduce_26(val, _values, result); end + + # reduce 27 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#489 + def _reduce_28(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#495 + def _reduce_29(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#372 + def _reduce_3(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#501 + def _reduce_30(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#507 + def _reduce_31(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#512 + def _reduce_32(val, _values, result); end + + # reduce 33 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#519 + def _reduce_34(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#525 + def _reduce_35(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#531 + def _reduce_36(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#537 + def _reduce_37(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#543 + def _reduce_38(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#549 + def _reduce_39(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#377 + def _reduce_4(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#554 + def _reduce_40(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#559 + def _reduce_41(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#564 + def _reduce_42(val, _values, result); end + + # reduce 44 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#573 + def _reduce_45(val, _values, result); end + + # reduce 46 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#590 + def _reduce_47(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#600 + def _reduce_48(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#616 + def _reduce_49(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#382 + def _reduce_5(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#636 + def _reduce_50(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#642 + def _reduce_51(val, _values, result); end + + # reduce 53 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#651 + def _reduce_54(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#657 + def _reduce_55(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#663 + def _reduce_56(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#669 + def _reduce_57(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#675 + def _reduce_58(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#387 + def _reduce_6(val, _values, result); end + + # reduce 63 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#691 + def _reduce_64(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#696 + def _reduce_65(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#701 + def _reduce_66(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#706 + def _reduce_67(val, _values, result); end + + # reduce 68 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#713 + def _reduce_69(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#392 + def _reduce_7(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#718 + def _reduce_70(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#723 + def _reduce_71(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#728 + def _reduce_72(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#733 + def _reduce_73(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#738 + def _reduce_74(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#743 + def _reduce_75(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#748 + def _reduce_76(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#397 + def _reduce_8(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#402 + def _reduce_9(val, _values, result); end + + # reduce 81 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#764 + def _reduce_none(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#89 + def cache_key(query, prefix, visitor); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#71 + def next_token; end + + # On CSS parser error, raise an exception + # + # @raise [SyntaxError] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#84 + def on_error(error_token_id, error_value, value_stack); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#66 + def parse(string); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#26 + def unescape_css_identifier(identifier); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#30 + def unescape_css_string(str); end + + # Get the xpath for +string+ using +options+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#76 + def xpath_for(string, prefix, visitor); end + + class << self + # Get the css selector in +string+ from the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#25 + def [](string); end + + # Set the css selector in +string+ in the cache to +value+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#32 + def []=(string, value); end + + # Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.) + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#15 + def cache_on?; end + + # Clear the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#39 + def clear_cache(create_new_object = T.unsafe(nil)); end + + # Set a thread-local boolean to turn cacheing on and off. Truthy values turn the cache on, falsey values turn the cache off. + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#20 + def set_cache(value); end + + # Execute +block+ without cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#50 + def without_cache(&block); end + end +end + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#8 +Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/parser.rb#279 +Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser.rb#355 +Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://nokogiri//lib/nokogiri/css/parser.rb#295 +Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6 +class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11 +class Nokogiri::CSS::Tokenizer + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57 + def _next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26 + def action; end + + # Returns the value of attribute filename. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17 + def filename; end + + # Returns the value of attribute lineno. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16 + def lineno; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36 + def load_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49 + def next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43 + def scan_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20 + def scan_setup(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan_str(str); end + + # Returns the value of attribute state. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14 +class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end + +# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor +# class allows for changing some of the behaviors related to builtin xpath functions and quirks +# of HTML5. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9 +class Nokogiri::CSS::XPathVisitor + # :call-seq: + # new() → XPathVisitor + # new(builtins:, doctype:) → XPathVisitor + # + # [Parameters] + # - +builtins:+ (BuiltinsConfig) Determine when to use Nokogiri's built-in xpath functions for performance improvements. + # - +doctype:+ (DoctypeConfig) Make document-type-specific accommodations for CSS queries. + # + # [Returns] XPathVisitor + # + # @return [XPathVisitor] a new instance of XPathVisitor + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57 + def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267 + def accept(node); end + + # :call-seq: config() → Hash + # + # [Returns] + # a Hash representing the configuration of the XPathVisitor, suitable for use as + # part of the CSS cache key. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#74 + def config; end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#263 + def visit_attrib_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#154 + def visit_attribute_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_child_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#215 + def visit_class_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#219 + def visit_combinator(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#240 + def visit_conditional_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_descendant_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_direct_adjacent_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#245 + def visit_element_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_following_selector(node); end + + # :stopdoc: + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#79 + def visit_function(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#149 + def visit_id(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#140 + def visit_not(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#190 + def visit_pseudo_class(node); end + + private + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#328 + def css_class(hay, needle); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#273 + def html5_element_name_needs_namespace_handling(node); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#318 + def is_of_type_pseudo_class?(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#280 + def nth(node, options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304 + def read_a_and_positive_b(values); end +end + +# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13 +module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end + +# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol) + +# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is +# the default when calling Nokogiri::CSS.xpath_for directly. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol) + +# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is +# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or +# node. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array) + +# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document +# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or +# node will choose the correct option automatically. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33 +module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end + +# The document being searched is an HTML4 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol) + +# The document being searched is an HTML5 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array) + +# The document being searched is an XML document. This is the default. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 +Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) + +# Some classes in Nokogiri are namespaced as a group, for example +# Document, DocumentFragment, and Builder. +# +# It's sometimes necessary to look up the related class, e.g.: +# +# XML::Builder → XML::Document +# HTML4::Builder → HTML4::Document +# HTML5::Document → HTML5::DocumentFragment +# +# This module is included into those key classes who need to do this. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#19 +module Nokogiri::ClassResolver + # :call-seq: + # related_class(class_name) → Class + # + # Find a class constant within the + # + # Some examples: + # + # Nokogiri::XML::Document.new.related_class("DocumentFragment") + # # => Nokogiri::XML::DocumentFragment + # Nokogiri::HTML4::Document.new.related_class("DocumentFragment") + # # => Nokogiri::HTML4::DocumentFragment + # + # Note this will also work for subclasses that follow the same convention, e.g.: + # + # Loofah::HTML::Document.new.related_class("DocumentFragment") + # # => Loofah::HTML::DocumentFragment + # + # And even if it's a subclass, this will iterate through the superclasses: + # + # class ThisIsATopLevelClass < Nokogiri::HTML4::Builder ; end + # ThisIsATopLevelClass.new.related_class("Document") + # # => Nokogiri::HTML4::Document + # + # source://nokogiri//lib/nokogiri/class_resolver.rb#46 + def related_class(class_name); end +end + +# #related_class restricts matching namespaces to those matching this set. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#21 +Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set) + +# source://nokogiri//lib/nokogiri/decorators/slop.rb#4 +module Nokogiri::Decorators; end + +# The Slop decorator implements method missing such that a methods may be +# used instead of XPath or CSS. See Nokogiri.Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#8 +module Nokogiri::Decorators::Slop + # look for node with +name+. See Nokogiri.Slop + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#14 + def method_missing(name, *args, &block); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#37 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# The default XPath search context for Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#10 +Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/encoding_handler.rb#5 +class Nokogiri::EncodingHandler + # Returns the value of attribute name. + def name; end + + class << self + def [](_arg0); end + def alias(_arg0, _arg1); end + def clear_aliases!; end + def delete(_arg0); end + + # source://nokogiri//lib/nokogiri/encoding_handler.rb#15 + def install_default_aliases; end + end +end + +# Popular encoding aliases not known by all iconv implementations that Nokogiri should support. +# +# source://nokogiri//lib/nokogiri/encoding_handler.rb#7 +Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/gumbo.rb#4 +module Nokogiri::Gumbo + class << self + def fragment(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + def parse(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + end +end + +# The default maximum number of attributes per element. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#6 +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# The default maximum number of errors for parsing a document or a fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#9 +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) + +# The default maximum depth of the DOM tree produced by parsing a document +# or fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#13 +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer) + +# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0, +# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related +# classes. +# +# source://nokogiri//lib/nokogiri/html.rb#8 +Nokogiri::HTML = Nokogiri::HTML4 + +# Since v1.12.0 +# +# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace +# for parsing HTML. +# +# source://nokogiri//lib/nokogiri/html4.rb#19 +module Nokogiri::HTML4 + class << self + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/html4.rb#29 + def fragment(string, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#23 + def parse(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# Nokogiri HTML builder is used for building HTML documents. It is very +# similar to the Nokogiri::XML::Builder. In fact, you should go read the +# documentation for Nokogiri::XML::Builder before reading this +# documentation. +# +# == Synopsis: +# +# Create an HTML document with a body that has an onload attribute, and a +# span tag with a class of "bold" that has content of "Hello world". +# +# builder = Nokogiri::HTML4::Builder.new do |doc| +# doc.html { +# doc.body(:onload => 'some_func();') { +# doc.span.bold { +# doc.text "Hello world" +# } +# } +# } +# end +# puts builder.to_html +# +# The HTML builder inherits from the XML builder, so make sure to read the +# Nokogiri::XML::Builder documentation. +# +# source://nokogiri//lib/nokogiri/html.rb#31 +class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder + # Convert the builder to HTML + # + # source://nokogiri//lib/nokogiri/html4/builder.rb#32 + def to_html; end +end + +# source://nokogiri//lib/nokogiri/html4/document.rb#8 +class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/html4/document.rb#149 + def fragment(tags = T.unsafe(nil)); end + + # Get the meta tag encoding for this document. If there is no meta tag, + # then nil is returned. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#12 + def meta_encoding; end + + # Set the meta tag encoding for this document. + # + # If an meta encoding tag is already present, its content is + # replaced with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, and before any text node or + # content element (typically ) if any. + # + # The result when trying to set an encoding that is different + # from the document encoding is undefined. + # + # Beware in CRuby, that libxml2 automatically inserts a meta tag + # into a head element. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#36 + def meta_encoding=(encoding); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) + # + # or + # + # node.serialize(:encoding => 'UTF-8') do |config| + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/html4/document.rb#142 + def serialize(options = T.unsafe(nil)); end + + # Get the title string of this document. Return nil if there is + # no title tag. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#70 + def title; end + + # Set the title string of this document. + # + # If a title element is already present, its content is replaced + # with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, right after a meta + # encoding/charset tag if any, and before any text node or + # content element (typically ) if any. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#85 + def title=(text); end + + def type; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#159 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/html4/document.rb#60 + def meta_content_type; end + + # source://nokogiri//lib/nokogiri/html4/document.rb#103 + def set_metadata_element(element); end + + class << self + def new(*_arg0); end + + # Parse HTML. +string_or_io+ may be a String, or any object that + # responds to _read_ and _close_ such as an IO, or StringIO. + # +url+ is resource where this document is located. +encoding+ is the + # encoding that should be used when processing the document. +options+ + # is a number that sets options in the parser, such as + # Nokogiri::XML::ParseOptions::RECOVER. See the constants in + # Nokogiri::XML::ParseOptions. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document.rb#172 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + end +end + +# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5 +class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#27 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + class << self + # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+ + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#8 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description.rb#5 +class Nokogiri::HTML4::ElementDescription + # Is this element a block element? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#8 + def block?; end + + def default_sub_element; end + + # @return [Boolean] + def deprecated?; end + + def deprecated_attributes; end + def description; end + def empty?; end + + # @return [Boolean] + def implied_end_tag?; end + + # @return [Boolean] + def implied_start_tag?; end + + def inline?; end + + # Inspection information + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#20 + def inspect; end + + def name; end + def optional_attributes; end + def required_attributes; end + + # @return [Boolean] + def save_end_tag?; end + + def sub_elements; end + + # Convert this description to a string + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#14 + def to_s; end + + private + + # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#32 + def default_desc; end + + class << self + def [](_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#436 +Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#423 +Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239 +Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246 +Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258 +Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212 +Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221 +Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268 +Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#546 +Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171 +Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#437 +Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271 +Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#270 +Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272 +Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#280 +Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#213 +Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#214 +Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#242 +Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#292 +Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#293 +Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#297 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#295 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#439 +Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#199 +Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#218 +Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217 +Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#549 +Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#296 +Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) + +# This is filled in down below. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#30 +Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) + +# Methods are defined protected by method_defined? because at +# this point the C-library or Java library is already loaded, +# and we don't want to clobber any methods that have been +# defined there. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11 +Nokogiri::HTML4::ElementDescription::Desc = Struct + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#294 +Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#377 +Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192 +Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#201 +Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#299 +Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190 +Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245 +Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) + +# Attributes defined and categorized +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#136 +Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#300 +Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170 +Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#318 +Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#301 +Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#339 +Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#340 +Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#328 +Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168 +Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#341 +Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#342 +Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#241 +Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#352 +Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#216 +Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197 +Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#354 +Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194 +Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195 +Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196 +Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200 +Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#219 +Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#355 +Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#368 +Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189 +Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243 +Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#398 +Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#298 +Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#421 +Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#484 +Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#422 +Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#424 +Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169 +Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#547 +Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#434 +Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#438 +Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191 +Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#435 +Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#441 +Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#443 +Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#442 +Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#459 +Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#460 +Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#462 +Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#463 +Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#461 +Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#464 +Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167 +Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#137 +Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#466 +Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#420 +Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#269 +Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238 +Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#483 +Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#486 +Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#485 +Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149 +Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240 +Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#497 +Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#498 +Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#510 +Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#509 +Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#520 +Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237 +Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#533 +Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#522 +Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#521 +Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#545 +Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#519 +Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#440 +Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#548 +Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#353 +Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#465 +Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14 +class Nokogiri::HTML4::EncodingReader + # @return [EncodingReader] a new instance of EncodingReader + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82 + def initialize(io); end + + # This method is used by the C extension so that + # Nokogiri::HTML4::Document#read_io() does not leak memory when + # EncodingFound is raised. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91 + def encoding_found; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93 + def read(len); end + + class << self + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59 + def detect_encoding(chunk); end + end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15 +class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError + # @return [EncodingFound] a new instance of EncodingFound + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18 + def initialize(encoding); end + + # Returns the value of attribute found_encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16 + def found_encoding; end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46 +class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler + # @return [JumpSAXHandler] a new instance of JumpSAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47 + def initialize(jumptag); end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24 +class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document + # @return [SAXHandler] a new instance of SAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27 + def initialize; end + + # Returns the value of attribute encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25 + def encoding; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5 +class Nokogiri::HTML4::EntityDescription < ::Struct; end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7 +class Nokogiri::HTML4::EntityLookup + # Look up entity with +name+ + # + # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10 + def [](name); end + + def get(_arg0); end +end + +# Instance of Nokogiri::HTML4::EntityLookup +# +# source://nokogiri//lib/nokogiri/html4.rb#35 +Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup) + +# Nokogiri lets you write a SAX parser to process HTML but get HTML correction features. +# +# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML. +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5 +module Nokogiri::HTML4::SAX; end + +# This class lets you perform SAX style parsing on HTML with HTML error correction. +# +# Here is a basic usage example: +# +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attributes = [] +# puts "found a #{name}" +# end +# end +# +# parser = Nokogiri::HTML4::SAX::Parser.new(MyDoc.new) +# parser.parse(File.read(ARGV[0], mode: 'rb')) +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#27 +class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#51 + def parse_file(filename, encoding = T.unsafe(nil)); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41 + def parse_io(io, encoding = T.unsafe(nil)); end + + # Parse html stored in +data+ using +encoding+ + # + # @raise [TypeError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#30 + def parse_memory(data, encoding = T.unsafe(nil)); end +end + +# Context for HTML SAX parsers. This class is usually not instantiated by the user. Instead, +# you should be looking at Nokogiri::HTML4::SAX::Parser +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#9 +class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext + def parse_with(_arg0); end + + class << self + def file(_arg0, _arg1); end + def memory(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#10 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6 +class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document; end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::HTML4::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31 + def finish; end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1, _arg2); end + def native_write(_arg0, _arg1); end +end + +# == Usage +# +# ⚠ HTML5 functionality is not available when running JRuby. +# +# Parse an HTML5 document: +# +# doc = Nokogiri.HTML5(string) +# +# Parse an HTML5 fragment: +# +# fragment = Nokogiri::HTML5.fragment(string) +# +# == Parsing options +# +# The document and fragment parsing methods support options that are different from Nokogiri's. +# +# - Nokogiri.HTML5(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5::Document.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.fragment(html, encoding = nil, options = {}) +# - Nokogiri::HTML5::DocumentFragment.parse(html, encoding = nil, options = {}) +# +# The three currently supported options are +:max_errors+, +:max_tree_depth+ and +# +:max_attributes+, described below. +# +# === Error reporting +# +# Nokogiri contains an experimental HTML5 parse error reporting facility. By default, no parse +# errors are reported but this can be configured by passing the +:max_errors+ option to +# {HTML5.parse} or {HTML5.fragment}. +# +# For example, this script: +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts(err) +# end +# +# Emits: +# +# 1:1: ERROR: Expected a doctype token +# Hi there! +# ^ +# 1:1: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag contains attributes. +# Hi there! +# ^ +# +# Using max_errors: -1 results in an unlimited number of errors being returned. +# +# The errors returned by {HTML5::Document#errors} are instances of {Nokogiri::XML::SyntaxError}. +# +# The {https://html.spec.whatwg.org/multipage/parsing.html#parse-errors HTML standard} defines a +# number of standard parse error codes. These error codes only cover the "tokenization" stage of +# parsing HTML. The parse errors in the "tree construction" stage do not have standardized error +# codes (yet). +# +# As a convenience to Nokogiri users, the defined error codes are available via +# {Nokogiri::XML::SyntaxError#str1} method. +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts("#{err.line}:#{err.column}: #{err.str1}") +# end +# # => 1:1: generic-parser +# # 1:1: non-void-html-element-start-tag-with-trailing-solidus +# # 1:17: end-tag-with-trailing-solidus +# # 1:17: end-tag-with-attributes +# +# Note that the first error is +generic-parser+ because it's an error from the tree construction +# stage and doesn't have a standardized error code. +# +# For the purposes of semantic versioning, the error messages, error locations, and error codes +# are not part of Nokogiri's public API. That is, these are subject to change without Nokogiri's +# major version number changing. These may be stabilized in the future. +# +# === Maximum tree depth +# +# The maximum depth of the DOM tree parsed by the various parsing methods is configurable by the +# +:max_tree_depth+ option. If the depth of the tree would exceed this limit, then an +# {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = 400) can be +# removed by giving the option max_tree_depth: -1. +# +# html = '' + '
    ' * 1000 +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Document tree depth limit exceeded +# doc = Nokogiri.HTML5(html, max_tree_depth: -1) +# +# === Attribute limit per element +# +# The maximum number of attributes per DOM element is configurable by the +:max_attributes+ +# option. If a given element would exceed this limit, then an {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = 400) can be +# removed by giving the option max_attributes: -1. +# +# html = '
    ' +# # "
    " +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Attributes per element limit exceeded +# doc = Nokogiri.HTML5(html, max_attributes: -1) +# +# == HTML Serialization +# +# After parsing HTML, it may be serialized using any of the {Nokogiri::XML::Node} serialization +# methods. In particular, {XML::Node#serialize}, {XML::Node#to_html}, and {XML::Node#to_s} will +# serialize a given node and its children. (This is the equivalent of JavaScript's +# +Element.outerHTML+.) Similarly, {XML::Node#inner_html} will serialize the children of a given +# node. (This is the equivalent of JavaScript's +Element.innerHTML+.) +# +# doc = Nokogiri::HTML5("Hello world!") +# puts doc.serialize +# # => Hello world! +# +# Due to quirks in how HTML is parsed and serialized, it's possible for a DOM tree to be +# serialized and then re-parsed, resulting in a different DOM. Mostly, this happens with DOMs +# produced from invalid HTML. Unfortunately, even valid HTML may not survive serialization and +# re-parsing. +# +# In particular, a newline at the start of +pre+, +listing+, and +textarea+ elements is ignored by +# the parser. +# +# doc = Nokogiri::HTML5(<<-EOF) +# +#
    +#   Content
    +# EOF +# puts doc.at('/html/body/pre').serialize +# # =>
    Content
    +# +# In this case, the original HTML is semantically equivalent to the serialized version. If the +# +pre+, +listing+, or +textarea+ content starts with two newlines, the first newline will be +# stripped on the first parse and the second newline will be stripped on the second, leading to +# semantically different DOMs. Passing the parameter preserve_newline: true will cause +# two or more newlines to be preserved. (A single leading newline will still be removed.) +# +# doc = Nokogiri::HTML5(<<-EOF) +# +# +# +# Content +# EOF +# puts doc.at('/html/body/listing').serialize(preserve_newline: true) +# # => +# # +# # Content +# +# == Encodings +# +# Nokogiri always parses HTML5 using {https://en.wikipedia.org/wiki/UTF-8 UTF-8}; however, the +# encoding of the input can be explicitly selected via the optional +encoding+ parameter. This is +# most useful when the input comes not from a string but from an IO object. +# +# When serializing a document or node, the encoding of the output string can be specified via the +# +:encoding+ options. Characters that cannot be encoded in the selected encoding will be encoded +# as {https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references HTML numeric +# entities}. +# +# frag = Nokogiri::HTML5.fragment('아는 길도 물어가라') +# puts html +# # => 아는 길도 물어가라 +# frag = Nokogiri::HTML5.fragment(html) +# puts frag.serialize +# # => 아는 길도 물어가라 +# +# (There's a {https://bugs.ruby-lang.org/issues/15033 bug} in all current versions of Ruby that +# can cause the entity encoding to fail. Of the mandated supported encodings for HTML, the only +# encoding I'm aware of that has this bug is 'ISO-2022-JP'. We recommend avoiding this +# encoding.) +# +# == Notes +# +# * The {Nokogiri::HTML5.fragment} function takes a string and parses it +# as a HTML5 document. The ++, ++, and ++ elements are +# removed from this document, and any children of these elements that remain +# are returned as a {Nokogiri::HTML5::DocumentFragment}. +# +# * The {Nokogiri::HTML5.parse} function takes a string and passes it to the +# gumbo_parse_with_options method, using the default options. +# The resulting Gumbo parse tree is then walked. +# +# * Instead of uppercase element names, lowercase element names are produced. +# +# * Instead of returning +unknown+ as the element name for unknown tags, the +# original tag name is returned verbatim. +# +# Since v1.12.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#23 +module Nokogiri::HTML5 + class << self + # Parse a fragment from +string+. Convenience method for + # {Nokogiri::HTML5::DocumentFragment.parse}. + # + # source://nokogiri//lib/nokogiri/html5.rb#238 + def fragment(string, encoding = T.unsafe(nil), **options); end + + # Parse an HTML 5 document. Convenience method for {Nokogiri::HTML5::Document.parse} + # + # source://nokogiri//lib/nokogiri/html5.rb#232 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # source://nokogiri//lib/nokogiri/html5.rb#243 + def read_and_encode(string, encoding); end + + private + + # Charset sniffing is a complex and controversial topic that understandably isn't done _by + # default_ by the Ruby Net::HTTP library. This being said, it is a very real problem for + # consumers of HTML as the default for HTML is iso-8859-1, most "good" producers use utf-8, and + # the Gumbo parser *only* supports utf-8. + # + # Accordingly, Nokogiri::HTML4::Document.parse provides limited encoding detection. Following + # this lead, Nokogiri::HTML5 attempts to do likewise, while attempting to more closely follow + # the HTML5 standard. + # + # http://bugs.ruby-lang.org/issues/2567 + # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding + # + # source://nokogiri//lib/nokogiri/html5.rb#281 + def reencode(body, content_type = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document.rb#39 +class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/html5/document.rb#129 + def initialize(*args); end + + # :call-seq: + # fragment() → Nokogiri::HTML5::DocumentFragment + # fragment(markup) → Nokogiri::HTML5::DocumentFragment + # + # Parse a HTML5 document fragment from +markup+, returning a Nokogiri::HTML5::DocumentFragment. + # + # [Properties] + # - +markup+ (String) The HTML5 markup fragment to be parsed + # + # [Returns] + # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if `markup` is not passed, is empty, or is `nil`. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#147 + def fragment(markup = T.unsafe(nil)); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::Document.new`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document.rb#49 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document.rb#151 + def to_xml(options = T.unsafe(nil), &block); end + + # Get the url name for this document, as passed into Document.parse, Document.read_io, or + # Document.read_memory + # + # source://nokogiri//lib/nokogiri/html5/document.rb#42 + def url; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See CSS::XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#163 + def xpath_doctype; end + + class << self + # :call-seq: + # parse(input) + # parse(input, url=nil, encoding=nil, **options) + # parse(input, url=nil, encoding=nil) { |options| ... } + # + # Parse HTML5 input. + # + # [Parameters] + # - +input+ may be a String, or any object that responds to _read_ and _close_ such as an + # IO, or StringIO. + # + # - +url+ (optional) is a String indicating the canonical URI where this document is located. + # + # - +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # - +options+ (optional) is a configuration Hash (or keyword arguments) to set options + # during parsing. The three currently supported options are +:max_errors+, + # +:max_tree_depth+ and +:max_attributes+, described at Nokogiri::HTML5. + # + # ⚠ Note that these options are different than those made available by + # Nokogiri::XML::Document and Nokogiri::HTML4::Document. + # + # - +block+ (optional) is passed a configuration Hash on which parse options may be set. See + # Nokogiri::HTML5 for more information and usage. + # + # [Returns] Nokogiri::HTML5::Document + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#80 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # Create a new document from an IO object. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#101 + def read_io(io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + # Create a new document from a String. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#110 + def read_memory(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + private + + # source://nokogiri//lib/nokogiri/html5/document.rb#118 + def do_parse(string_or_io, url, encoding, options); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27 +class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + # Create a document fragment. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#39 + def initialize(doc, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document; end + + # Sets the attribute document + # + # @param value the value to set the attribute document to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document=(_arg0); end + + # Returns the value of attribute errors. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors; end + + # Sets the attribute errors + # + # @param value the value to set the attribute errors to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors=(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#65 + def extract_params(params); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::DocumentFragment.new(doc)`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#36 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#51 + def serialize(options = T.unsafe(nil), &block); end + + class << self + # Parse a document fragment from +tags+, returning a Nodeset. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#58 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/node.rb#30 +module Nokogiri::HTML5::Node + # source://nokogiri//lib/nokogiri/html5/node.rb#70 + def fragment(tags); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#31 + def inner_html(options = T.unsafe(nil)); end + + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#39 + def write_to(io, *options); end + + private + + # HTML elements can have attributes that contain colons. + # Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName + # and tries to create an attribute in a namespace. This is especially + # annoying with attribute names like xml:lang since libxml2 will + # actually create the xml namespace if it doesn't exist already. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#83 + def add_child_node_and_reparent_attrs(node); end +end + +# Enum for the HTML5 parser quirks mode values. Values returned by HTML5::Document#quirks_mode +# +# See https://dom.spec.whatwg.org/#concept-document-quirks for more information on HTML5 quirks +# mode. +# +# Since v1.14.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#30 +module Nokogiri::HTML5::QuirksMode; end + +# The document was parsed in "limited-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#33 +Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "no-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#31 +Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#32 +Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer) + +Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_DATETIME_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) +Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) +Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/syntax_error.rb#4 +class Nokogiri::SyntaxError < ::StandardError; end + +module Nokogiri::Test + class << self + def __foreign_error_handler; end + end +end + +# The version of Nokogiri you are using +# +# source://nokogiri//lib/nokogiri/version/constant.rb#5 +Nokogiri::VERSION = T.let(T.unsafe(nil), String) + +# Detailed version info about Nokogiri and the installed extension dependencies. +# +# source://nokogiri//lib/nokogiri/version/info.rb#223 +Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/version/info.rb#7 +class Nokogiri::VersionInfo + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://nokogiri//lib/nokogiri/version/info.rb#33 + def compiled_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#44 + def compiled_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#22 + def engine; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#10 + def jruby?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#48 + def libxml2?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#52 + def libxml2_has_iconv?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#68 + def libxml2_precompiled?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#60 + def libxml2_using_packaged?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#64 + def libxml2_using_system?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#56 + def libxslt_has_datetime?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#26 + def loaded_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#37 + def loaded_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#18 + def ruby_minor; end + + # source://nokogiri//lib/nokogiri/version/info.rb#88 + def to_hash; end + + # source://nokogiri//lib/nokogiri/version/info.rb#181 + def to_markdown; end + + # source://nokogiri//lib/nokogiri/version/info.rb#72 + def warnings; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#14 + def windows?; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml.rb#12 +module Nokogiri::XML + class << self + # Parse an XML document using the Nokogiri::XML::Reader API. See + # Nokogiri::XML::Reader for mor information + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml.rb#23 + def Reader(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+. + # See Nokogiri::XML::RelaxNG for an example. + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#9 + def RelaxNG(string_or_io, options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#9 + def Schema(string_or_io, options = T.unsafe(nil)); end + + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/xml.rb#42 + def fragment(string, options = T.unsafe(nil), &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#36 + def parse(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/attr.rb#6 +class Nokogiri::XML::Attr < ::Nokogiri::XML::Node + def content=(_arg0); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Attr, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of the attribute. + # - +value+ → (String) The value of the attribute. + # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # attributes = doc.root.elements.first.attribute_nodes + # # => [#(Attr:0x35c { name = "foo", value = "abc" }), + # # #(Attr:0x370 { + # # name = "bar", + # # namespace = #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })] + # + # attributes.first.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"foo", :value=>"abc", :namespace=>nil} + # + # attributes.last.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"bar", + # # :value=>"def", + # # :namespace=> + # # #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # })} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/attr.rb#55 + def deconstruct_keys(keys); end + + def to_s; end + def value; end + def value=(_arg0); end + + private + + # source://nokogiri//lib/nokogiri/xml/attr.rb#61 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# Represents an attribute declaration in a DTD +# +# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7 +class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node + def attribute_type; end + def default; end + def enumeration; end + + private + + # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#17 + def inspect_attributes; end +end + +# Nokogiri builder can be used for building XML and HTML documents. +# +# == Synopsis: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.products { +# xml.widget { +# xml.id_ "10" +# xml.name "Awesome widget" +# } +# } +# } +# end +# puts builder.to_xml +# +# Will output: +# +# +# +# +# +# 10 +# Awesome widget +# +# +# +# +# +# === Builder scope +# +# The builder allows two forms. When the builder is supplied with a block +# that has a parameter, the outside scope is maintained. This means you +# can access variables that are outside your builder. If you don't need +# outside scope, you can use the builder without the "xml" prefix like +# this: +# +# builder = Nokogiri::XML::Builder.new do +# root { +# products { +# widget { +# id_ "10" +# name "Awesome widget" +# } +# } +# } +# end +# +# == Special Tags +# +# The builder works by taking advantage of method_missing. Unfortunately +# some methods are defined in ruby that are difficult or dangerous to +# remove. You may want to create tags with the name "type", "class", and +# "id" for example. In that case, you can use an underscore to +# disambiguate your tag name from the method call. +# +# Here is an example of using the underscore to disambiguate tag names from +# ruby methods: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object { +# xml.type_ o.type +# xml.class_ o.class.name +# xml.id_ o.id +# } +# end +# } +# } +# end +# puts builder.to_xml +# +# The underscore may be used with any tag name, and the last underscore +# will just be removed. This code will output the following XML: +# +# +# +# +# +# Object +# Object +# 48390 +# +# +# Object +# Object +# 48380 +# +# +# Object +# Object +# 48370 +# +# +# +# +# == Tag Attributes +# +# Tag attributes may be supplied as method arguments. Here is our +# previous example, but using attributes rather than tags: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object(:type => o.type, :class => o.class, :id => o.id) +# end +# } +# } +# end +# puts builder.to_xml +# +# === Tag Attribute Short Cuts +# +# A couple attribute short cuts are available when building tags. The +# short cuts are available by special method calls when building a tag. +# +# This example builds an "object" tag with the class attribute "classy" +# and the id of "thing": +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# xml.object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Which will output: +# +# +# +# +# +# +# +# +# All other options are still supported with this syntax, including +# blocks and extra tag attributes. +# +# == Namespaces +# +# Namespaces are added similarly to attributes. Nokogiri::XML::Builder +# assumes that when an attribute starts with "xmlns", it is meant to be +# a namespace: +# +# builder = Nokogiri::XML::Builder.new { |xml| +# xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do +# xml.tenderlove +# end +# } +# puts builder.to_xml +# +# Will output XML like this: +# +# +# +# +# +# +# === Referencing declared namespaces +# +# Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be +# built by using the Nokogiri::XML::Builder#[] method. +# +# For example: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root('xmlns:foo' => 'bar') { +# xml.objects { +# xml['foo'].object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Will output this XML: +# +# +# +# +# +# +# +# +# Note the "foo:object" tag. +# +# === Namespace inheritance +# +# In the Builder context, children will inherit their parent's namespace. This is the same +# behavior as if the underlying {XML::Document} set +namespace_inheritance+ to +true+: +# +# result = Nokogiri::XML::Builder.new do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# end +# end +# result.doc.to_xml +# # => +# # +# # +# # +# +# Users may turn this behavior off by passing a keyword argument +namespace_inheritance:false+ +# to the initializer: +# +# result = Nokogiri::XML::Builder.new(namespace_inheritance: false) do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# xml["soapenv"].Body # users may explicitly opt into the namespace +# end +# end +# result.doc.to_xml +# # => +# # +# #
    +# # +# # +# +# For more information on namespace inheritance, please see {XML::Document#namespace_inheritance} +# +# +# == Document Types +# +# To create a document type (DTD), use the Builder#doc method to get +# the current context document. Then call Node#create_internal_subset to +# create the DTD node. +# +# For example, this Ruby: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.doc.create_internal_subset( +# 'html', +# "-//W3C//DTD HTML 4.01 Transitional//EN", +# "http://www.w3.org/TR/html4/loose.dtd" +# ) +# xml.root do +# xml.foo +# end +# end +# +# puts builder.to_xml +# +# Will output this xml: +# +# +# +# +# +# +# +# source://nokogiri//lib/nokogiri/xml/builder.rb#264 +class Nokogiri::XML::Builder + include ::Nokogiri::ClassResolver + + # Create a new Builder object. +options+ are sent to the top level + # Document that is being built. + # + # Building a document with a particular encoding for example: + # + # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| + # ... + # end + # + # @return [Builder] a new instance of Builder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#307 + def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end + + # Append the given raw XML +string+ to the document + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#390 + def <<(string); end + + # Build a tag that is associated with namespace +ns+. Raises an + # ArgumentError if +ns+ has not been defined higher in the tree. + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#358 + def [](ns); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity; end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity=(_arg0); end + + # Create a CDATA Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#345 + def cdata(string); end + + # Create a Comment Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#351 + def comment(string); end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context; end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context=(_arg0); end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc; end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#394 + def method_missing(method, *args, &block); end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent; end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent=(_arg0); end + + # Create a Text Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#339 + def text(string); end + + # Convert this Builder object to XML + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#377 + def to_xml(*args); end + + private + + # Insert +node+ as a child of the current Node + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#423 + def insert(node, &block); end + + class << self + # Create a builder with an existing root object. This is for use when + # you have an existing document that you would like to augment with + # builder methods. The builder context created will start with the + # given +root+ node. + # + # For example: + # + # doc = Nokogiri::XML(File.read('somedoc.xml')) + # Nokogiri::XML::Builder.with(doc.at_css('some_tag')) do |xml| + # # ... Use normal builder methods here ... + # xml.awesome # add the "awesome" tag below "some_tag" + # end + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#294 + def with(root, &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/builder.rb#267 +Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/xml/builder.rb#442 +class Nokogiri::XML::Builder::NodeBuilder + # @return [NodeBuilder] a new instance of NodeBuilder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#443 + def initialize(node, doc_builder); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#452 + def [](k); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#448 + def []=(k, v); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#456 + def method_missing(method, *args, &block); end +end + +# source://nokogiri//lib/nokogiri/xml/cdata.rb#5 +class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text + # Get the name of this CDATA node + # + # source://nokogiri//lib/nokogiri/xml/cdata.rb#8 + def name; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/character_data.rb#5 +class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node + include ::Nokogiri::XML::PP::CharacterData +end + +class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/dtd.rb#5 +class Nokogiri::XML::DTD < ::Nokogiri::XML::Node + def attributes; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#17 + def each; end + + def elements; end + def entities; end + def external_id; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#27 + def html5_dtd?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#23 + def html_dtd?; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#13 + def keys; end + + def notations; end + def system_id; end + def validate(_arg0); end +end + +# Nokogiri::XML::Document is the main entry point for dealing with XML documents. The Document +# is created by parsing an XML document. See Nokogiri::XML::Document.parse for more information +# on parsing. +# +# For searching a Document, see Nokogiri::XML::Searchable#css and +# Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/document.rb#14 +class Nokogiri::XML::Document < ::Nokogiri::XML::Node + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#177 + def initialize(*args); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#393 + def <<(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#393 + def add_child(node_or_tags); end + + def canonicalize(*_arg0); end + def clone(*_arg0); end + + # :call-seq: + # collect_namespaces() → Hash + # + # Recursively get all namespaces from this node and its subtree and return them as a + # hash. + # + # ⚠ This method will not handle duplicate namespace prefixes, since the return value is a hash. + # + # Note that this method does an xpath lookup for nodes with namespaces, and as a result the + # order (and which duplicate prefix "wins") may be dependent on the implementation of the + # underlying XML library. + # + # *Example:* Basic usage + # + # Given this document: + # + # + # + # + # + # This method will return: + # + # {"xmlns:foo"=>"bar", "xmlns"=>"default", "xmlns:hello"=>"world"} + # + # *Example:* Duplicate prefixes + # + # Given this document: + # + # + # + # + # + # The hash returned will be something like: + # + # {"xmlns:foo" => "baz"} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#316 + def collect_namespaces; end + + # Create a CDATA Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#261 + def create_cdata(string, &block); end + + # Create a Comment Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#266 + def create_comment(string, &block); end + + # :call-seq: + # create_element(name, *contents_or_attrs, &block) → Nokogiri::XML::Element + # + # Create a new Element with `name` belonging to this document, optionally setting contents or + # attributes. + # + # This method is _not_ the most user-friendly option if your intention is to add a node to the + # document tree. Prefer one of the Nokogiri::XML::Node methods like Node#add_child, + # Node#add_next_sibling, Node#replace, etc. which will both create an element (or subtree) and + # place it in the document tree. + # + # Arguments may be passed to initialize the element: + # + # - a Hash argument will be used to set attributes + # - a non-Hash object that responds to \#to_s will be used to set the new node's contents + # + # A block may be passed to mutate the node. + # + # [Parameters] + # - `name` (String) + # - `contents_or_attrs` (\#to_s, Hash) + # [Yields] `node` (Nokogiri::XML::Element) + # [Returns] Nokogiri::XML::Element + # + # *Example:* An empty element without attributes + # + # doc.create_element("div") + # # =>
    + # + # *Example:* An element with contents + # + # doc.create_element("div", "contents") + # # =>
    contents
    + # + # *Example:* An element with attributes + # + # doc.create_element("div", {"class" => "container"}) + # # =>
    + # + # *Example:* An element with contents and attributes + # + # doc.create_element("div", "contents", {"class" => "container"}) + # # =>
    contents
    + # + # *Example:* Passing a block to mutate the element + # + # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? } + # + # source://nokogiri//lib/nokogiri/xml/document.rb#231 + def create_element(name, *contents_or_attrs, &block); end + + def create_entity(*_arg0); end + + # Create a Text Node with +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#256 + def create_text_node(string, &block); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Document, to use in pattern matching. + # + # Valid keys and their values: + # - +root+ → (Node, nil) The root node of the Document, or +nil+ if the document is empty. + # + # In the future, other keys may allow accessing things like doctype and processing + # instructions. If you have a use case and would like this functionality, please let us know + # by opening an issue or a discussion on the github project. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # doc.deconstruct_keys([:root]) + # # => {:root=> + # # #(Element:0x35c { + # # name = "root", + # # children = [ + # # #(Text "\n" + " "), + # # #(Element:0x370 { name = "child", children = [ #(Text "\n")] }), + # # #(Text "\n")] + # # })} + # + # *Example* of an empty document + # + # doc = Nokogiri::XML::Document.new + # + # doc.deconstruct_keys([:root]) + # # => {:root=>nil} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#457 + def deconstruct_keys(keys); end + + # Apply any decorators to +node+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#364 + def decorate(node); end + + # Get the list of decorators given +key+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#323 + def decorators(key); end + + # A reference to +self+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#276 + def document; end + + def dup(*_arg0); end + def encoding; end + def encoding=(_arg0); end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors; end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors=(_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # Returns an empty fragment if +tags+ is nil. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#385 + def fragment(tags = T.unsafe(nil)); end + + # The name of this document. Always returns "document" + # + # source://nokogiri//lib/nokogiri/xml/document.rb#271 + def name; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance=(_arg0); end + + # Get the hash of namespaces on the root Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/document.rb#378 + def namespaces; end + + def remove_namespaces!; end + def root; end + def root=(_arg0); end + + # Explore a document with shortcut methods. See Nokogiri::Slop for details. + # + # Note that any nodes that have been instantiated before #slop! + # is called will not be decorated with sloppy behavior. So, if you're in + # irb, the preferred idiom is: + # + # irb> doc = Nokogiri::Slop my_markup + # + # and not + # + # irb> doc = Nokogiri::HTML my_markup + # ... followed by irb's implicit inspect (and therefore instantiation of every node) ... + # irb> doc.slop! + # ... which does absolutely nothing. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#353 + def slop!; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1286 + def to_xml(*args, &block); end + + def url; end + + # Validate this Document against it's DTD. Returns a list of errors on + # the document or +nil+ when there is no DTD. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#331 + def validate; end + + def version; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#413 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/xml/document.rb#465 + def inspect_attributes; end + + class << self + def new(*_arg0); end + + # Parse an XML file. + # + # +string_or_io+ may be a String, or any object that responds to + # _read_ and _close_ such as an IO, or StringIO. + # + # +url+ (optional) is the URI where this document is located. + # + # +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # +options+ (optional) is a configuration object that sets options during + # parsing, such as Nokogiri::XML::ParseOptions::RECOVER. See the + # Nokogiri::XML::ParseOptions for more information. + # + # +block+ (optional) is passed a configuration object on which + # parse options may be set. + # + # By default, Nokogiri treats documents as untrusted, and so + # does not attempt to load DTDs or access the network. See + # Nokogiri::XML::ParseOptions for a complete list of options; + # and that module's DEFAULT_XML constant for what's set (and not + # set) by default. + # + # Nokogiri.XML() is a convenience method which will call this method. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#48 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#83 + def empty_doc?(string_or_io); end + end +end + +# source://nokogiri//lib/nokogiri/xml/document.rb#463 +Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/document.rb#19 +Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document.rb#20 +Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) + +# See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not +# attempting to handle unicode characters partly because libxml2 doesn't handle unicode +# characters in NCNAMEs. +# +# source://nokogiri//lib/nokogiri/xml/document.rb#18 +Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#6 +class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node + # Create a new DocumentFragment from +tags+. + # + # If +ctx+ is present, it is used as a context node for the + # subtree created, e.g., namespaces will be resolved relative + # to +ctx+. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#19 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this fragment for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#102 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the root nodes of this document fragment as an array, to use in pattern matching. + # + # 💡 Note that text nodes are returned as well as elements. If you wish to operate only on + # root elements, you should deconstruct the array returned by + # DocumentFragment#elements. + # + # *Example* + # + # frag = Nokogiri::HTML5.fragment(<<~HTML) + #
    Start
    + # This is a shortcut for you. + #
    End
    + # HTML + # + # frag.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Text "\n" + "This is a "), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Text " for you.\n"), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] }), + # # #(Text "\n")] + # + # *Example* only the elements, not the text nodes. + # + # frag.elements.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] })] + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#190 + def deconstruct; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42 + def dup; end + + # A list of Nokogiri::XML::SyntaxError found when parsing a document + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#136 + def errors; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#140 + def errors=(things); end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#144 + def fragment(data); end + + # return the name for DocumentFragment + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#54 + def name; end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries. + # + # For more information see Nokogiri::XML::Searchable#search + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#121 + def search(*rules); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def serialize; end + + # Convert this DocumentFragment to html + # See Nokogiri::XML::NodeSet#to_html + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#67 + def to_html(*args); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def to_s; end + + # Convert this DocumentFragment to xhtml + # See Nokogiri::XML::NodeSet#to_xhtml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#79 + def to_xhtml(*args); end + + # Convert this DocumentFragment to xml + # See Nokogiri::XML::NodeSet#to_xml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#91 + def to_xml(*args); end + + private + + # fix for issue 770 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#197 + def namespace_declarations(ctx); end + + class << self + def new(*_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#9 + def parse(tags, options = T.unsafe(nil), &block); end + end +end + +class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end + +# Represents the allowed content in an Element Declaration inside a DTD: +# +# +# +# ]> +# +# +# ElementContent represents the binary tree inside the tag shown above that lists the +# possible content for the div1 tag. +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#16 +class Nokogiri::XML::ElementContent + include ::Nokogiri::XML::PP::Node + + # Get the children of this ElementContent node + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#35 + def children; end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#31 + def document; end + + def name; end + def occur; end + def prefix; end + def type; end + + private + + def c1; end + def c2; end + + # source://nokogiri//lib/nokogiri/xml/element_content.rb#41 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#21 +Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#28 +Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) + +# Possible content occurrences +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#26 +Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#27 +Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#23 +Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) + +# Possible definitions of type +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#20 +Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#29 +Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#22 +Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5 +class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node + def content; end + def element_type; end + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/element_decl.rb#12 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5 +class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node + def content; end + def entity_type; end + def external_id; end + def original_content; end + def system_id; end + + private + + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#18 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12 + def new(name, doc, *args); end + end +end + +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5 +class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6 + def children; end + + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/namespace.rb#6 +class Nokogiri::XML::Namespace + include ::Nokogiri::XML::PP::Node + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Namespace, to use in pattern matching. + # + # Valid keys and their values: + # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace). + # - +href+ → (String) The namespace's URI + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # + # XML + # + # doc.root.elements.first.namespace + # # => #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" }) + # + # doc.root.elements.first.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>nil, :href=>"http://nokogiri.org/ns/default"} + # + # doc.root.elements.last.namespace + # # => #(Namespace:0x370 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }) + # + # doc.root.elements.last.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>"noko", :href=>"http://nokogiri.org/ns/noko"} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#46 + def deconstruct_keys(keys); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#8 + def document; end + + def href; end + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/namespace.rb#52 + def inspect_attributes; end +end + +# Nokogiri::XML::Node is the primary API you'll use to interact with your Document. +# +# == Attributes +# +# A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes. For +# example: +# +# node = Nokogiri::XML::DocumentFragment.parse("link").at_css("a") +# node.to_html # => "link" +# node['href'] # => "#foo" +# node.keys # => ["href", "id"] +# node.values # => ["#foo", "link"] +# node['class'] = 'green' # => "green" +# node.to_html # => "link" +# +# See the method group entitled Node@Working+With+Node+Attributes for the full set of methods. +# +# == Navigation +# +# Nokogiri::XML::Node also has methods that let you move around your tree: +# +# [#parent, #children, #next, #previous] +# Navigate up, down, or through siblings. +# +# See the method group entitled Node@Traversing+Document+Structure for the full set of methods. +# +# == Serialization +# +# When printing or otherwise emitting a document or a node (and its subtree), there are a few +# methods you might want to use: +# +# [#content, #text, #inner_text, #to_str] +# These methods will all **emit plaintext**, +# meaning that entities will be replaced (e.g., +<+ will be replaced with +<+), meaning +# that any sanitizing will likely be un-done in the output. +# +# [#to_s, #to_xml, #to_html, #inner_html] +# These methods will all **emit properly-escaped markup**, meaning that it's suitable for +# consumption by browsers, parsers, etc. +# +# See the method group entitled Node@Serialization+and+Generating+Output for the full set of methods. +# +# == Searching +# +# You may search this node's subtree using methods like #xpath and #css. +# +# See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods. +# +# source://nokogiri//lib/nokogiri/xml/node.rb#56 +class Nokogiri::XML::Node + include ::Nokogiri::HTML5::Node + include ::Nokogiri::XML::PP::Node + include ::Nokogiri::XML::Searchable + include ::Nokogiri::ClassResolver + include ::Enumerable + + # :call-seq: + # new(name, document) -> Nokogiri::XML::Node + # new(name, document) { |node| ... } -> Nokogiri::XML::Node + # + # Create a new node with +name+ that belongs to +document+. + # + # If you intend to add a node to a document tree, it's likely that you will prefer one of the + # Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will + # both create an element (or subtree) and place it in the document tree. + # + # Another alternative, if you are concerned about performance, is + # Nokogiri::XML::Document#create_element which accepts additional arguments for contents or + # attributes but (like this method) avoids parsing markup. + # + # [Parameters] + # - +name+ (String) + # - +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong. + # [Yields] Nokogiri::XML::Node + # [Returns] Nokogiri::XML::Node + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#126 + def initialize(name, document); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls (e.g., root << child1 << child2) + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#256 + def <<(node_or_tags); end + + # Compare two Node objects with respect to their Document. Nodes from + # different documents cannot be compared. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1262 + def <=>(other); end + + # Test to see if this Node is equal to +other+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1252 + def ==(other); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def [](name); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def []=(name, value); end + + # Accept a visitor. This method calls "visit" on +visitor+ with self. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1246 + def accept(visitor); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +<<+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#148 + def add_child(node_or_tags); end + + # :call-seq: add_class(names) → self + # + # Ensure HTML CSS classes are present on +self+. Any CSS classes in +names+ that already exist + # in the "class" attribute are _not_ added. Note that any existing duplicates in the + # "class" attribute are not removed. Compare with #append_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_add("class", names) + # + # See related: #kwattr_add, #classes, #append_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be added to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. Any class names already present + # will not be added. Any class names not present will be added. If no "class" attribute + # exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Ensure that the node has CSS class "section" + # + # node # =>
    + # node.add_class("section") # =>
    + # node.add_class("section") # =>
    # duplicate not added + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via a String argument + # + # Note that the CSS class "section" is not added because it is already present. + # Note also that the pre-existing duplicate CSS class "section" is not removed. + # + # node # =>
    + # node.add_class("section header") # =>
    + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via an Array argument + # + # node # =>
    + # node.add_class(["section", "header"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#715 + def add_class(names); end + + def add_namespace(_arg0, _arg1); end + def add_namespace_definition(_arg0, _arg1); end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def add_next_sibling(node_or_tags); end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def add_previous_sibling(node_or_tags); end + + # Insert +node_or_tags+ after this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_next_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#318 + def after(node_or_tags); end + + # Get a list of ancestor Node for this Node. If +selector+ is given, + # the ancestors must match +selector+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1215 + def ancestors(selector = T.unsafe(nil)); end + + # :call-seq: append_class(names) → self + # + # Add HTML CSS classes to +self+, regardless of duplication. Compare with #add_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_append("class", names) + # + # See related: #kwattr_append, #classes, #add_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be appended to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. All class names passed in will be + # appended to the "class" attribute even if they are already present in the attribute + # value. If no "class" attribute exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "section" to the node's CSS "class" attribute + # + # node # =>
    + # node.append_class("section") # =>
    + # node.append_class("section") # =>
    # duplicate added! + # + # *Example:* Append "section" and "header" to the noded's CSS "class" attribute, via a String argument + # + # Note that the CSS class "section" is appended even though it is already present + # + # node # =>
    + # node.append_class("section header") # =>
    + # + # *Example:* Append "section" and "header" to the node's CSS "class" attribute, via an Array argument + # + # node # =>
    + # node.append_class(["section", "header"]) # =>
    + # node.append_class(["section", "header"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#759 + def append_class(names); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def attr(name); end + + def attribute(_arg0); end + def attribute_nodes; end + def attribute_with_ns(_arg0, _arg1); end + + # :call-seq: attributes() → Hash + # + # Fetch this node's attributes. + # + # ⚠ Because the keys do not include any namespace information for the attribute, in case of a + # simple name collision, not all attributes will be returned. In this case, you will need to + # use #attribute_nodes. + # + # [Returns] + # Hash containing attributes belonging to +self+. The hash keys are String attribute + # names (without the namespace), and the hash values are Nokogiri::XML::Attr. + # + # *Example* with no namespaces: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=>#(Attr:0x550 { name = "size", value = "large" }), + # # "class"=>#(Attr:0x564 { name = "class", value = "big wide tall" })} + # + # *Example* with a namespace: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "desc", + # # href = "http://example.com/sizes" + # # }), + # # value = "large" + # # })} + # + # *Example* with an attribute name collision: + # + # ⚠ Note that only one of the attributes is returned in the Hash. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "height", + # # href = "http://example.com/heights" + # # }), + # # value = "tall" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#609 + def attributes; end + + # Insert +node_or_tags+ before this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_previous_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#304 + def before(node_or_tags); end + + def blank?; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1414 + def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end + + # Returns true if this is a CDATA + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1136 + def cdata?; end + + def child; end + def children; end + + # Set the content for this Node +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Also see related method +inner_html=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#349 + def children=(node_or_tags); end + + # :call-seq: classes() → Array + # + # Fetch CSS class names of a Node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_values("class") + # + # See related: #kwattr_values, #add_class, #append_class, #remove_class + # + # [Returns] + # The CSS classes (Array of String) present in the Node's "class" attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example* + # + # node # =>
    + # node.classes # => ["section", "title", "header"] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#669 + def classes; end + + def clone(*_arg0); end + + # Returns true if this is a Comment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1131 + def comment?; end + + def content; end + + # Set the Node's content to a Text node containing +string+. The string gets XML escaped, not + # interpreted as markup. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#411 + def content=(string); end + + def create_external_subset(_arg0, _arg1, _arg2); end + def create_internal_subset(_arg0, _arg1, _arg2); end + + # Get the path to this node as a CSS expression + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1206 + def css_path; end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Node, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of this node, or "text" if it is a Text node. + # - +namespace+ → (Namespace, nil) The namespace of this node, or nil if there is no namespace. + # - +attributes+ → (Array) The attributes of this node. + # - +children+ → (Array) The children of this node. 💡 Note this includes text nodes. + # - +elements+ → (Array) The child elements of this node. 💡 Note this does not include text nodes. + # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content. + # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # First + # Second + # + # XML + # + # doc.root.deconstruct_keys([:name, :namespace]) + # # => {:name=>"parent", + # # :namespace=> + # # #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" })} + # + # doc.root.deconstruct_keys([:inner_html, :content]) + # # => {:content=>"\n" + " First\n" + " Second\n", + # # :inner_html=> + # # "\n" + + # # " First\n" + + # # " Second\n"} + # + # doc.root.elements.first.deconstruct_keys([:attributes]) + # # => {:attributes=> + # # [#(Attr:0x370 { name = "foo", value = "abc" }), + # # #(Attr:0x384 { + # # name = "bar", + # # namespace = #(Namespace:0x398 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })]} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1475 + def deconstruct_keys(keys); end + + # Decorate this node with the decorators set up in this node's Document + # + # source://nokogiri//lib/nokogiri/xml/node.rb#132 + def decorate!; end + + # Adds a default namespace supplied as a string +url+ href, to self. + # The consequence is as an xmlns attribute with supplied argument were + # present in parsed XML. A default namespace set with this method will + # now show up in #attributes, but when this node is serialized to XML an + # "xmlns" attribute will appear. See also #namespace and #namespace= + # + # source://nokogiri//lib/nokogiri/xml/node.rb#427 + def default_namespace=(url); end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def delete(name); end + + # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns + # nil on XML documents and on unknown tags. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1173 + def description; end + + # Do xinclude substitution on the subtree below node. If given a block, a + # Nokogiri::XML::ParseOptions object initialized from +options+, will be + # passed to it, allowing more convenient modification of the parser options. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#454 + def do_xinclude(options = T.unsafe(nil)); end + + def document; end + + # Returns true if this is a Document + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1151 + def document?; end + + def dup(*_arg0); end + + # Iterate over each attribute name and value pair for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#635 + def each; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1187 + def elem?; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1187 + def element?; end + + def element_children; end + def elements; end + def encode_special_chars(_arg0); end + def external_subset; end + def first_element_child; end + + # Create a DocumentFragment containing +tags+ that is relative to _this_ + # context node. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#70 + def fragment(tags); end + + # Returns true if this is a DocumentFragment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1166 + def fragment?; end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def get_attribute(name); end + + def has_attribute?(_arg0); end + + # Returns true if this is an HTML4::Document or HTML5::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1146 + def html?; end + + # Get the inner_html for this node's Node#children + # + # source://nokogiri//lib/nokogiri/html5/node.rb#31 + def inner_html(options = T.unsafe(nil)); end + + # Set the content for this Node to +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # ⚠ Please note that despite the name, this method will *not* always parse a String argument + # as HTML. A String argument will be parsed with the +DocumentFragment+ parser related to this + # node's document. + # + # For example, if the document is an HTML4::Document then the string will be parsed as HTML4 + # using HTML4::DocumentFragment; but if the document is an XML::Document then it will + # parse the string as XML using XML::DocumentFragment. + # + # Also see related method +children=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#338 + def inner_html=(node_or_tags); end + + # :section: + def inner_text; end + + def internal_subset; end + def key?(_arg0); end + + # Get the attribute names for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#629 + def keys; end + + # :call-seq: + # kwattr_add(attribute_name, keywords) → self + # + # Ensure that values are present in a keyword attribute. + # + # Any values in +keywords+ that already exist in the Node's attribute values are _not_ + # added. Note that any existing duplicates in the attribute values are not removed. Compare + # with #kwattr_append. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #add_class, #kwattr_values, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. Any values already present will + # not be added. Any values not present will be added. If the named attribute does not exist, + # it is created. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example:* Ensure that a +Node+ has "nofollow" in its +rel+ attribute. + # + # Note that duplicates are not added. + # + # node # => + # node.kwattr_add("rel", "nofollow") # => + # node.kwattr_add("rel", "nofollow") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via a + # String argument. + # + # Note that "nofollow" is not added because it is already present. Note also that the + # pre-existing duplicate "nofollow" is not removed. + # + # node # => + # node.kwattr_add("rel", "nofollow noreferrer") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via + # an Array argument. + # + # node # => + # node.kwattr_add("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#892 + def kwattr_add(attribute_name, keywords); end + + # :call-seq: + # kwattr_append(attribute_name, keywords) → self + # + # Add keywords to a Node's keyword attribute, regardless of duplication. Compare with + # #kwattr_add. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #append_class, #kwattr_values, #kwattr_add, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. All values passed in will be + # appended to the named attribute even if they are already present in the attribute. If the + # named attribute does not exist, it is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "nofollow" to the +rel+ attribute. + # + # Note that duplicates are added. + # + # node # => + # node.kwattr_append("rel", "nofollow") # => + # node.kwattr_append("rel", "nofollow") # => + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via a String argument. + # + # Note that "nofollow" is appended even though it is already present. + # + # node # => + # node.kwattr_append("rel", "nofollow noreferrer") # => + # + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via an Array argument. + # + # node # => + # node.kwattr_append("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#945 + def kwattr_append(attribute_name, keywords); end + + # :call-seq: + # kwattr_remove(attribute_name, keywords) → self + # + # Remove keywords from a keyword attribute. Any matching keywords that exist in the named + # attribute are removed, including any multiple entries. + # + # If no keywords remain after this operation, or if +keywords+ is +nil+, the attribute is + # deleted from the node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #remove_class, #kwattr_values, #kwattr_add, #kwattr_append + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be removed from the attribute named +attribute_name+. May be a string + # containing whitespace-delimited values, or an Array of String values. Any keywords present + # in the named attribute will be removed. If no keywords remain, or if +keywords+ is nil, + # the attribute is deleted. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* + # + # Note that the +rel+ attribute is deleted when empty. + # + # node # => link + # node.kwattr_remove("rel", "nofollow") # => link + # node.kwattr_remove("rel", "noreferrer") # => link + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#988 + def kwattr_remove(attribute_name, keywords); end + + # :call-seq: + # kwattr_values(attribute_name) → Array + # + # Fetch values from a keyword attribute of a Node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #classes, #kwattr_add, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be inspected. + # + # [Returns] + # (Array) The values present in the Node's +attribute_name+ attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example:* + # + # node # => link + # node.kwattr_values("rel") # => ["nofollow", "noopener", "external"] + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#838 + def kwattr_values(attribute_name); end + + def lang; end + def lang=(_arg0); end + def last_element_child; end + def line; end + def line=(_arg0); end + + # Returns true if this Node matches +selector+ + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1015 + def matches?(selector); end + + def name; end + def name=(_arg0); end + def namespace; end + + # Set the default namespace on this node (as would be defined with an + # "xmlns=" attribute in XML source), as a Namespace object +ns+. Note that + # a Namespace added this way will NOT be serialized as an xmlns attribute + # for this node. You probably want #default_namespace= instead, or perhaps + # #add_namespace_definition with a nil prefix argument. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#437 + def namespace=(ns); end + + def namespace_definitions; end + def namespace_scopes; end + def namespaced_key?(_arg0, _arg1); end + + # :call-seq: + # namespaces() → Hash + # + # Fetch all the namespaces on this node and its ancestors. + # + # Note that the keys in this hash XML attributes that would be used to define this namespace, + # such as "xmlns:prefix", not just the prefix. + # + # The default namespace for this node will be included with key "xmlns". + # + # See also #namespace_scopes + # + # [Returns] + # Hash containing all the namespaces on this node and its ancestors. The hash keys are the + # namespace prefix, and the hash value for each key is the namespace URI. + # + # *Example:* + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # + # + # EOF + # doc.at_xpath("//root:first", "root" => "http://example.com/root").namespaces + # # => {"xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//child:second", "child" => "http://example.com/child").namespaces + # # => {"xmlns"=>"http://example.com/child", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//root:third", "root" => "http://example.com/root").namespaces + # # => {"xmlns:foo"=>"http://example.com/foo", + # # "xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1122 + def namespaces; end + + def native_content=(_arg0); end + def next; end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def next=(node_or_tags); end + + def next_element; end + def next_sibling; end + def node_name; end + def node_name=(_arg0); end + def node_type; end + def parent; end + + # Set the parent Node for this Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#417 + def parent=(parent_node); end + + # Parse +string_or_io+ as a document fragment within the context of + # *this* node. Returns a XML::NodeSet containing the nodes parsed from + # +string_or_io+. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1030 + def parse(string_or_io, options = T.unsafe(nil)); end + + def path; end + def pointer_id; end + + # Add +node_or_tags+ as the first child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#168 + def prepend_child(node_or_tags); end + + def previous; end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def previous=(node_or_tags); end + + def previous_element; end + def previous_sibling; end + + # Returns true if this is a ProcessingInstruction node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1156 + def processing_instruction?; end + + # Is this a read only node? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + def read_only?; end + + def remove; end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def remove_attribute(name); end + + # :call-seq: + # remove_class(css_classes) → self + # + # Remove HTML CSS classes from this node. Any CSS class names in +css_classes+ that exist in + # this node's "class" attribute are removed, including any multiple entries. + # + # If no CSS classes remain after this operation, or if +css_classes+ is +nil+, the "class" + # attribute is deleted from the node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_remove("class", css_classes) + # + # Also see #kwattr_remove, #classes, #add_class, #append_class + # + # [Parameters] + # - +css_classes+ (String, Array) + # + # CSS class names to be removed from the Node's + # "class" attribute. May be a string containing whitespace-delimited names, or an Array of + # String names. Any class names already present will be removed. If no CSS classes remain, + # the "class" attribute is deleted. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example*: Deleting a CSS class + # + # Note that all instances of the class "section" are removed from the "class" attribute. + # + # node # =>
    + # node.remove_class("section") # =>
    + # + # *Example*: Deleting the only remaining CSS class + # + # Note that the attribute is removed once there are no remaining classes. + # + # node # =>
    + # node.remove_class("section") # =>
    + # + # *Example*: Deleting multiple CSS classes + # + # Note that the "class" attribute is deleted once it's empty. + # + # node # =>
    + # node.remove_class(["section", "float"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#809 + def remove_class(names = T.unsafe(nil)); end + + # Replace this Node with +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +swap+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#369 + def replace(node_or_tags); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # + # or + # + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1286 + def serialize(*args, &block); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def set_attribute(name, value); end + + # Swap this Node for +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # Containing markup. + # + # Returns self, to support chaining of calls. + # + # Also see related method +replace+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#403 + def swap(node_or_tags); end + + def text; end + + # Returns true if this is a Text node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1161 + def text?; end + + # Serialize this Node to HTML + # + # doc.to_html + # + # See Node#write_to for a list of +options+. For formatted output, + # use Node#to_xhtml instead. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1313 + def to_html(options = T.unsafe(nil)); end + + # Turn this node in to a string. If the document is HTML, this method + # returns html. If the document is XML, this method returns XML. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1196 + def to_s; end + + def to_str; end + + # Serialize this Node to XHTML using +options+ + # + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1334 + def to_xhtml(options = T.unsafe(nil)); end + + # Serialize this Node to XML using +options+ + # + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1323 + def to_xml(options = T.unsafe(nil)); end + + # Yields self and all children to +block+ recursively. + # + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::Node] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1239 + def traverse(&block); end + + def type; end + def unlink; end + + # Does this Node's attributes include + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#623 + def value?(value); end + + # Get the attribute values for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#617 + def values; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap this Node with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed and used as the wrapper. This node's parent, if it exists, is used + # as the context node for parsing; otherwise the associated document is used. If the parsed + # fragment has multiple roots, the first root node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # Also see NodeSet#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap("
    ") + # doc.to_html + # # => + # # + # # + # + # *Example* with a +Node+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap(doc.create_element("div")) + # doc.to_html + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node.rb#223 + def wrap(node_or_tags); end + + # Write Node as HTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1391 + def write_html_to(io, options = T.unsafe(nil)); end + + # :call-seq: + # write_to(io, *options) + # + # Serialize this node or document to +io+. + # + # [Parameters] + # - +io+ (IO) An IO-like object to which the serialized content will be written. + # - +options+ (Hash) See below + # + # [Options] + # * +:encoding+ (String or Encoding) specify the encoding of the output (defaults to document encoding) + # * +:indent_text+ (String) the indentation text (defaults to " ") + # * +:indent+ (Integer) the number of +:indent_text+ to use (defaults to +2+) + # * +:save_with+ (Integer) a combination of SaveOptions constants + # + # To save with UTF-8 indented twice: + # + # + # To save indented with two dashes: + # + # node.write_to(io, indent_text: '-', indent: 2) + # + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#39 + def write_to(io, *options); end + + # Write Node as XHTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1399 + def write_xhtml_to(io, options = T.unsafe(nil)); end + + # Write Node as XML to +io+ with +options+ + # + # doc.write_xml_to io, :encoding => 'UTF-8' + # + # See Node#write_to for a list of options + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1409 + def write_xml_to(io, options = T.unsafe(nil)); end + + # Returns true if this is an XML::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1141 + def xml?; end + + protected + + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1489 + def coerce(data); end + + private + + def add_child_node(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#83 + def add_child_node_and_reparent_attrs(node); end + + def add_next_sibling_node(_arg0); end + def add_previous_sibling_node(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1523 + def add_sibling(next_or_previous, node_or_tags); end + + def compare(_arg0); end + def dump_html; end + def get(_arg0); end + def html_standard_serialize(_arg0); end + def in_context(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1562 + def inspect_attributes; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1511 + def keywordify(keywords); end + + def native_write_to(_arg0, _arg1, _arg2, _arg3); end + def prepend_newline?; end + def process_xincludes(_arg0); end + def replace_node(_arg0); end + def set(_arg0, _arg1); end + def set_namespace(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1548 + def to_format(save_option, options); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1555 + def write_format_to(save_option, io, options); end + + class << self + def new(*_arg0); end + end +end + +# Attribute declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#93 +Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#65 +Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) + +# CDATA node type, see Nokogiri::XML::Node#cdata? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#69 +Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) + +# Comment node type, see Nokogiri::XML::Node#comment? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#77 +Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1422 +Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1423 +Nokogiri::XML::Node::DECONSTRUCT_METHODS = T.let(T.unsafe(nil), Hash) + +# DOCB document node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#103 +Nokogiri::XML::Node::DOCB_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document fragment node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#83 +Nokogiri::XML::Node::DOCUMENT_FRAG_NODE = T.let(T.unsafe(nil), Integer) + +# Document node type, see Nokogiri::XML::Node#xml? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#79 +Nokogiri::XML::Node::DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document type node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#81 +Nokogiri::XML::Node::DOCUMENT_TYPE_NODE = T.let(T.unsafe(nil), Integer) + +# DTD node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#89 +Nokogiri::XML::Node::DTD_NODE = T.let(T.unsafe(nil), Integer) + +# Element declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#91 +Nokogiri::XML::Node::ELEMENT_DECL = T.let(T.unsafe(nil), Integer) + +# Element node type, see Nokogiri::XML::Node#element? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#63 +Nokogiri::XML::Node::ELEMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Entity declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#95 +Nokogiri::XML::Node::ENTITY_DECL = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#73 +Nokogiri::XML::Node::ENTITY_NODE = T.let(T.unsafe(nil), Integer) + +# Entity reference node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#71 +Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) + +# HTML document node type, see Nokogiri::XML::Node#html? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#87 +Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1566 +Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Namespace declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#97 +Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#85 +Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#75 +Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) + +# Save options for serializing nodes. +# See the method group entitled Node@Serialization+and+Generating+Output for usage. +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#9 +class Nokogiri::XML::Node::SaveOptions + # Create a new SaveOptions object with +options+ + # + # @return [SaveOptions] a new instance of SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#47 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def format; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def format?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#66 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_declaration; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_declaration?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_empty_tags; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_empty_tags?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_xhtml?; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def options; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def to_i; end +end + +# Save as HTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#23 +Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) + +# Save as XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#19 +Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) + +# Save as XML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#21 +Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) + +# the default for HTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#38 +Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# the default for XHTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#40 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) + +# the default for XML documents +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#36 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# Format serialized xml +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#11 +Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) + +# Do not include declarations +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#13 +Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Do not include empty tags +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#15 +Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) + +# Do not save XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#17 +Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) + +# Text node type, see Nokogiri::XML::Node#text? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#67 +Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1545 +Nokogiri::XML::Node::USING_LIBXML_WITH_BROKEN_SERIALIZATION = T.let(T.unsafe(nil), FalseClass) + +# XInclude end type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#101 +Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) + +# XInclude start type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#99 +Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) + +# A NodeSet contains a list of Nokogiri::XML::Node objects. Typically +# a NodeSet is return as a result of searching a Document via +# Nokogiri::XML::Searchable#css or Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/node_set.rb#10 +class Nokogiri::XML::NodeSet + include ::Nokogiri::XML::Searchable + include ::Enumerable + + # Create a NodeSet with +document+ defaulting to +list+ + # + # @return [NodeSet] a new instance of NodeSet + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::NodeSet] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#20 + def initialize(document, list = T.unsafe(nil)); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def %(*args); end + + def &(_arg0); end + def +(_arg0); end + def -(_arg0); end + def <<(_arg0); end + + # Equality -- Two NodeSets are equal if the contain the same number + # of elements and if each element is equal to the corresponding + # element in the other NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#393 + def ==(other); end + + def [](*_arg0); end + + # Add the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#add_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#139 + def add_class(name); end + + # Insert +datum+ after the last Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#69 + def after(datum); end + + # Append the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#append_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#151 + def append_class(name); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def at(*args); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attr(key, value = T.unsafe(nil), &block); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attribute(key, value = T.unsafe(nil), &block); end + + # Insert +datum+ before the first Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#63 + def before(datum); end + + # Returns a new NodeSet containing all the children of all the nodes in + # the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#406 + def children; end + + def clone; end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this node set for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#83 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the members of this NodeSet as an array, to use in pattern matching. + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#440 + def deconstruct; end + + def delete(_arg0); end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document; end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document=(_arg0); end + + def dup; end + + # Iterate over each node, yielding to +block+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#231 + def each; end + + # Is this NodeSet empty? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#45 + def empty?; end + + # Filter this list for nodes that match +expr+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#130 + def filter(expr); end + + # Get the first element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#29 + def first(n = T.unsafe(nil)); end + + def include?(_arg0); end + + # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#51 + def index(node = T.unsafe(nil)); end + + # Get the inner html of all contained Node objects + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#260 + def inner_html(*args); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def inner_text; end + + # Return a nicely formated string representation + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#427 + def inspect; end + + # Get the last element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#39 + def last; end + + def length; end + + # Removes the last element from set and returns it, or +nil+ if + # the set is empty + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#374 + def pop; end + + def push(_arg0); end + def remove; end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attr(name); end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attribute(name); end + + # Remove the class attribute +name+ from all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#remove_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#163 + def remove_class(name = T.unsafe(nil)); end + + # Returns a new NodeSet containing all the nodes in the NodeSet + # in reverse order + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#417 + def reverse; end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def set(key, value = T.unsafe(nil), &block); end + + # Returns the first element of the NodeSet and removes it. Returns + # +nil+ if the set is empty. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#383 + def shift; end + + def size; end + def slice(*_arg0); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def text; end + + def to_a; end + def to_ary; end + + # Convert this NodeSet to HTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#341 + def to_html(*args); end + + # Convert this NodeSet to a string. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#335 + def to_s; end + + # Convert this NodeSet to XHTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#358 + def to_xhtml(*args); end + + # Convert this NodeSet to XML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#364 + def to_xml(*args); end + + def unlink; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap each member of this NodeSet with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed, once per member of the NodeSet, and used as the wrapper. Each + # node's parent, if it exists, is used as the context node for parsing; otherwise the + # associated document is used. If the parsed fragment has multiple roots, the first root + # node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # ⚠ Note that if a +String+ is passed, the markup will be parsed once per node in the + # NodeSet. You can avoid this overhead in cases where you know exactly the wrapper you wish to + # use by passing a +Node+ instead. + # + # Also see Node#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap("
    ") + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # *Example* with a +Node+ argument + # + # 💡 Note that this is faster than the equivalent call passing a +String+ because it avoids + # having to reparse the wrapper markup for each node. + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap(doc.create_element("div")) + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#328 + def wrap(node_or_tags); end + + # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] + # + # Search this node set for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # For more information see Nokogiri::XML::Searchable#xpath + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#99 + def xpath(*args); end + + def |(_arg0); end +end + +# source://nokogiri//lib/nokogiri/xml/node_set.rb#444 +Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Struct representing an {XML Schema Notation}[https://www.w3.org/TR/xml/#Notations] +# +# source://nokogiri//lib/nokogiri/xml/notation.rb#6 +class Nokogiri::XML::Notation < ::Struct; end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#6 +module Nokogiri::XML::PP; end + +# source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#7 +module Nokogiri::XML::PP::CharacterData + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#15 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#8 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#7 +module Nokogiri::XML::PP::Node + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#10 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#27 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#8 +Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) + +# Options that control the parsing behavior for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# These options directly expose libxml2's parse options, which are all boolean in the sense that +# an option is "on" or "off". +# +# 💡 Note that HTML5 parsing has a separate, orthogonal set of options due to the nature of the +# HTML5 specification. See Nokogiri::HTML5. +# +# ⚠ Not all parse options are supported on JRuby. Nokogiri will attempt to invoke the equivalent +# behavior in Xerces/NekoHTML on JRuby when it's possible. +# +# == Setting and unsetting parse options +# +# You can build your own combinations of parse options by using any of the following methods: +# +# [ParseOptions method chaining] +# +# Every option has an equivalent method in lowercase. You can chain these methods together to +# set various combinations. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# Every option has an equivalent no{option} method in lowercase. You can call these +# methods on an instance of ParseOptions to unset the option. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# +# # later we want to modify the options +# po.nohuge # Unset the HUGE option +# po.nopedantic # Unset the PEDANTIC option +# +# 💡 Note that some options begin with "no" leading to the logical but perhaps unintuitive +# double negative: +# +# po.nocdata # Set the NOCDATA parse option +# po.nonocdata # Unset the NOCDATA parse option +# +# 💡 Note that negation is not available for STRICT, which is itself a negation of all other +# features. +# +# +# [Using Ruby Blocks] +# +# Most parsing methods will accept a block for configuration of parse options, and we +# recommend chaining the setter methods: +# +# doc = Nokogiri::XML::Document.parse(xml) { |config| config.huge.pedantic } +# +# +# [ParseOptions constants] +# +# You can also use the constants declared under Nokogiri::XML::ParseOptions to set various +# combinations. They are bits in a bitmask, and so can be combined with bitwise operators: +# +# po = Nokogiri::XML::ParseOptions.new(Nokogiri::XML::ParseOptions::HUGE | Nokogiri::XML::ParseOptions::PEDANTIC) +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#67 +class Nokogiri::XML::ParseOptions + # @return [ParseOptions] a new instance of ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#165 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#198 + def ==(other); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def big_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def big_lines?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def compact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def compact?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_schema?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xslt?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdattr?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdload?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdvalid?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def huge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def huge?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#204 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nobasefix?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nobig_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noblanks?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nocdata?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nocompact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nodict?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noent?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noerror?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nohuge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nonet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nonet?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nononet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noold10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nopedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def norecover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nosax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nowarning?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noxinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noxincnode?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nsclean?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def old10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def old10?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def pedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def pedantic?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def recover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def recover?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def sax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def sax1?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#189 + def strict; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#194 + def strict?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def to_i; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def xinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def xinclude?; end +end + +# Support line numbers up to long int (default is a short int). On +# by default for for XML::Document, XML::DocumentFragment, HTML4::Document, +# HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#149 +Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) + +# Compact small text nodes. Off by default. +# +# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to +# modify the tree. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#133 +Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#158 +Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XML::Schema +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#161 +Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) + +# The options mask used by default for parsing XML::Document and XML::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#152 +Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XSLT::Stylesheet +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#155 +Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) + +# Default DTD attributes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#88 +Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) + +# Load external subsets. On by default for XSLT::Stylesheet. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#85 +Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) + +# Validate with the DTD. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#91 +Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) + +# Relax any hardcoded limit from the parser. Off by default. +# +# ⚠ There may be a performance penalty when this option is set. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#144 +Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) + +# Do not fixup XInclude xml:base uris. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#139 +Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) + +# Remove blank nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#103 +Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) + +# Merge CDATA as text nodes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#124 +Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) + +# Do not reuse the context dictionary. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#118 +Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) + +# Substitute entities. Off by default. +# +# ⚠ This option enables entity substitution, contrary to what the name implies. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#80 +Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) + +# Suppress error reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#94 +Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) + +# Forbid network access. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#115 +Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) + +# Suppress warning reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#97 +Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) + +# Do not generate XInclude START/END nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#127 +Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) + +# Remove redundant namespaces declarations. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#121 +Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) + +# Parse using XML-1.0 before update 5. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#136 +Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) + +# Enable pedantic error reporting. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#100 +Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) + +# Recover from errors. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#73 +Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) + +# Use the SAX1 interface internally. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#106 +Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) + +# Strict parsing +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#69 +Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) + +# Implement XInclude substitution. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#109 +Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#5 +class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node + # @return [ProcessingInstruction] a new instance of ProcessingInstruction + # + # source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#6 + def initialize(document, name, content); end + + class << self + def new(*_arg0); end + end +end + +# Nokogiri::XML::Reader parses an XML document similar to the way a cursor would move. The +# Reader is given an XML document, and yields nodes to an each block. +# +# The Reader parser might be good for when you need the speed and low memory usage of the SAX +# parser, but do not want to write a Document handler. +# +# Here is an example of usage: +# +# reader = Nokogiri::XML::Reader(<<-eoxml) +# +# snuggles! +# +# eoxml +# +# reader.each do |node| +# +# # node is an instance of Nokogiri::XML::Reader +# puts node.name +# +# end +# +# ⚠ Nokogiri::XML::Reader#each can only be called once! Once the cursor moves through the entire +# document, you must parse the document again. It may be better to capture all information you +# need during a single iteration. +# +# ⚠ libxml2 does not support error recovery in the Reader parser. The `RECOVER` ParseOption is +# ignored. If a syntax error is encountered during parsing, an exception will be raised. +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#33 +class Nokogiri::XML::Reader + include ::Enumerable + + # @return [Reader] a new instance of Reader + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#80 + def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end + + def attribute(_arg0); end + def attribute_at(_arg0); end + def attribute_count; end + def attribute_hash; end + + # Get the attributes and namespaces of the current node as a Hash. + # + # This is the union of Reader#attribute_hash and Reader#namespaces + # + # [Returns] + # (Hash) Attribute names and values, and namespace prefixes and hrefs. + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#93 + def attributes; end + + def attributes?; end + def base_uri; end + def default?; end + def depth; end + + # Move the cursor through the document yielding the cursor to the block + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#99 + def each; end + + def empty_element?; end + def encoding; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#73 + def errors; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#73 + def errors=(_arg0); end + + def inner_xml; end + def lang; end + def local_name; end + def name; end + def namespace_uri; end + def namespaces; end + def node_type; end + def outer_xml; end + def prefix; end + def read; end + def self_closing?; end + + # The XML source + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#76 + def source; end + + def state; end + def value; end + def value?; end + def xml_version; end + + class << self + def from_io(*_arg0); end + def from_memory(*_arg0); end + end +end + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#40 +Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) + +# CDATA node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#44 +Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) + +# Comment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#52 +Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) + +# Document node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#54 +Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) + +# Document Fragment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#58 +Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) + +# Document Type node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#56 +Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) + +# Element node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#38 +Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Element end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#66 +Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Entity end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#68 +Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#48 +Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity Reference node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#46 +Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/reader.rb#36 +Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#60 +Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#50 +Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) + +# Significant Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#64 +Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# Text node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#42 +Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) + +# Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#62 +Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# XML Declaration node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#70 +Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Nokogiri::XML::RelaxNG is used for validating XML against a +# RelaxNG schema. +# +# == Synopsis +# +# Validate an XML document against a RelaxNG schema. Loop over the errors +# that are returned and print them out: +# +# schema = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.open(ADDRESS_XML_FILE)) +# +# schema.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the +# underlying parsing libraries to access network resources. This is counter to Nokogiri's +# "untrusted by default" security policy, but is a limitation of the underlying libraries. +# +# source://nokogiri//lib/nokogiri/xml/relax_ng.rb#35 +class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema + private + + def validate_document(_arg0); end + + class << self + def from_document(*_arg0); end + def read_memory(*_arg0); end + end +end + +# SAX Parsers are event driven parsers. Nokogiri provides two different event based parsers when +# dealing with XML. If you want to do SAX style parsing using HTML, check out +# Nokogiri::HTML4::SAX. +# +# The basic way a SAX style parser works is by creating a parser, telling the parser about the +# events we're interested in, then giving the parser some XML to process. The parser will notify +# you when it encounters events you said you would like to know about. +# +# To register for events, you simply subclass Nokogiri::XML::SAX::Document, and implement the +# methods for which you would like notification. +# +# For example, if I want to be notified when a document ends, and when an element starts, I +# would write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def end_document +# puts "the document has ended" +# end +# +# def start_element name, attributes = [] +# puts "#{name} started" +# end +# end +# +# Then I would instantiate a SAX parser with this document, and feed the parser some XML +# +# # Create a new parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDocument.new) +# +# # Feed the parser some XML +# parser.parse(File.open(ARGV[0])) +# +# Now my document handler will be called when each node starts, and when then document ends. To +# see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document. +# +# Two SAX parsers for XML are available, a parser that reads from a string or IO object as it +# feels necessary, and a parser that lets you spoon feed it XML. If you want to let Nokogiri +# deal with reading your XML, use the Nokogiri::XML::SAX::Parser. If you want to have fine grain +# control over the XML input, use the Nokogiri::XML::SAX::PushParser. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#45 +module Nokogiri::XML::SAX; end + +# This class is used for registering types of events you are interested in handling. All of +# the methods on this class are available as possible events while parsing an XML document. To +# register for any particular event, just subclass this class and implement the methods you +# are interested in knowing about. +# +# To only be notified about start and end element events, write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "#{name} started!" +# end +# +# def end_element name +# puts "#{name} ended" +# end +# end +# +# You can use this event handler for any SAX style parser included with Nokogiri. See +# Nokogiri::XML::SAX, and Nokogiri::HTML4::SAX. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#66 +class Nokogiri::XML::SAX::Document + # Called when cdata blocks are found + # +string+ contains the cdata content + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#155 + def cdata_block(string); end + + # Characters read between a tag. This method might be called multiple + # times given one contiguous string of characters. + # + # +string+ contains the character data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#131 + def characters(string); end + + # Called when comments are encountered + # +string+ contains the comment data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#137 + def comment(string); end + + # Called when document ends parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#79 + def end_document; end + + # Called at the end of an element + # +name+ is the tag name + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#93 + def end_element(name); end + + # Called at the end of an element + # +name+ is the element's name + # +prefix+ is the namespace prefix associated with the element + # +uri+ is the associated namespace URI + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#120 + def end_element_namespace(name, prefix = T.unsafe(nil), uri = T.unsafe(nil)); end + + # Called on document errors + # +string+ contains the error + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#149 + def error(string); end + + # Called when processing instructions are found + # +name+ is the target of the instruction + # +content+ is the value of the instruction + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#162 + def processing_instruction(name, content); end + + # Called when document starts parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#74 + def start_document; end + + # Called at the beginning of an element + # * +name+ is the name of the tag + # * +attrs+ are an assoc list of namespaces and attributes, e.g.: + # [ ["xmlns:foo", "http://sample.net"], ["size", "large"] ] + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#87 + def start_element(name, attrs = T.unsafe(nil)); end + + # Called at the beginning of an element + # +name+ is the element name + # +attrs+ is a list of attributes + # +prefix+ is the namespace prefix for the element + # +uri+ is the associated namespace URI + # +ns+ is a hash of namespace prefix:urls associated with the element + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#103 + def start_element_namespace(name, attrs = T.unsafe(nil), prefix = T.unsafe(nil), uri = T.unsafe(nil), ns = T.unsafe(nil)); end + + # Called on document warnings + # +string+ contains the warning + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#143 + def warning(string); end + + # Called when an XML declaration is parsed + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#69 + def xmldecl(version, encoding, standalone); end +end + +# This parser is a SAX style parser that reads it's input as it +# deems necessary. The parser takes a Nokogiri::XML::SAX::Document, +# an optional encoding, then given an XML input, sends messages to +# the Nokogiri::XML::SAX::Document. +# +# Here is an example of using this parser: +# +# # Create a subclass of Nokogiri::XML::SAX::Document and implement +# # the events we care about: +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "starting: #{name}" +# end +# +# def end_element name +# puts "ending: #{name}" +# end +# end +# +# # Create our parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDoc.new) +# +# # Send some XML to the parser +# parser.parse(File.open(ARGV[0])) +# +# For more information about SAX parsers, see Nokogiri::XML::SAX. Also +# see Nokogiri::XML::SAX::Document for the available events. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#34 +class Nokogiri::XML::SAX::Parser + # Create a new Parser with +doc+ and +encoding+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#72 + def initialize(doc = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document; end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document=(_arg0); end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding; end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding=(_arg0); end + + # Parse given +thing+ which may be a string containing xml, or an + # IO object. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#81 + def parse(thing, &block); end + + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#99 + def parse_file(filename); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#91 + def parse_io(io, encoding = T.unsafe(nil)); end + + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#109 + def parse_memory(data); end + + private + + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#117 + def check_encoding(encoding); end +end + +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#35 +class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end + +# Encodinds this parser supports +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#39 +Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) + +# Context for XML SAX parsers. This class is usually not instantiated +# by the user. Instead, you should be looking at +# Nokogiri::XML::SAX::Parser +# +# source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#10 +class Nokogiri::XML::SAX::ParserContext + def column; end + def line; end + def parse_with(_arg0); end + def recovery; end + def recovery=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + class << self + def file(_arg0); end + def io(_arg0, _arg1); end + def memory(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#11 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# PushParser can parse a document that is fed to it manually. It +# must be given a SAX::Document object which will be called with +# SAX events as the document is being parsed. +# +# Calling PushParser#<< writes XML to the parser, calling any SAX +# callbacks it can. +# +# PushParser#finish tells the parser that the document is finished +# and calls the end_document SAX method. +# +# Example: +# +# parser = PushParser.new(Class.new(XML::SAX::Document) { +# def start_document +# puts "start document called" +# end +# }.new) +# parser << "
    hello<" +# parser << "/div>" +# parser.finish +# +# source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#27 +class Nokogiri::XML::SAX::PushParser + # Create a new PushParser with +doc+ as the SAX Document, providing + # an optional +file_name+ and +encoding+ + # + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#35 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document; end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::XML::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#55 + def finish; end + + def options; end + def options=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1); end + def native_write(_arg0, _arg1); end +end + +# Nokogiri::XML::Schema is used for validating XML against a schema +# (usually from an xsd file). +# +# == Synopsis +# +# Validate an XML document against a Schema. Loop over the errors that +# are returned and print them out: +# +# xsd = Nokogiri::XML::Schema(File.read(PO_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.read(PO_XML_FILE)) +# +# xsd.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: As of v1.11.0, Schema treats inputs as UNTRUSTED by default, and so external entities +# are not resolved from the network (`http://` or `ftp://`). Previously, parsing treated +# documents as "trusted" by default which was counter to Nokogiri's "untrusted by default" +# security policy. If a document is trusted, then the caller may turn off the NONET option via +# the ParseOptions to re-enable external entity resolution over a network connection. +# +# source://nokogiri//lib/nokogiri/xml/schema.rb#37 +class Nokogiri::XML::Schema + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors; end + + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors=(_arg0); end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options; end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options=(_arg0); end + + # Returns true if +thing+ is a valid Nokogiri::XML::Document or + # file. + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#68 + def valid?(thing); end + + # Validate +thing+ against this schema. +thing+ can be a + # Nokogiri::XML::Document object, or a filename. An Array of + # Nokogiri::XML::SyntaxError objects found while validating the + # +thing+ is returned. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#55 + def validate(thing); end + + private + + def validate_document(_arg0); end + def validate_file(_arg0); end + + class << self + def from_document(*_arg0); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#46 + def new(string_or_io, options = T.unsafe(nil)); end + + def read_memory(*_arg0); end + end +end + +# The Searchable module declares the interface used for searching your DOM. +# +# It implements the public methods #search, #css, and #xpath, +# as well as allowing specific implementations to specialize some +# of the important behaviors. +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#13 +module Nokogiri::XML::Searchable + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + def %(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + def /(*args); end + + # :call-seq: + # >(selector) → NodeSet + # + # Search this node's immediate children using CSS selector +selector+ + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#201 + def >(selector); end + + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + def at(*args); end + + # call-seq: + # at_css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+, and return only the first + # match. +rules+ must be one or more CSS selectors. + # + # See Searchable#css for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#143 + def at_css(*args); end + + # call-seq: + # at_xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+, and return only the first + # match. +paths+ must be one or more XPath queries. + # + # See Searchable#xpath for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#193 + def at_xpath(*args); end + + # call-seq: + # css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # node.css('title') + # node.css('body h1.bold') + # node.css('div + p.green', 'div#one') + # + # A hash of namespace bindings may be appended. For example: + # + # node.css('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # 💡 Custom CSS pseudo classes may also be defined which are mapped to a custom XPath + # function. To define custom pseudo classes, create a class and implement the custom pseudo + # class you want defined. The first argument to the method will be the matching context + # NodeSet. Any other arguments are ones that you pass in. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.css('title:regex("\w+")', handler) + # + # 💡 Some XPath syntax is supported in CSS queries. For example, to query for an attribute: + # + # node.css('img > @href') # returns all +href+ attributes on an +img+ element + # node.css('img / @href') # same + # + # # ⚠ this returns +class+ attributes from all +div+ elements AND THEIR CHILDREN! + # node.css('div @class') + # + # node.css + # + # 💡 Array-like syntax is supported in CSS queries as an alternative to using +:nth-child()+. + # + # ⚠ NOTE that indices are 1-based like +:nth-child+ and not 0-based like Ruby Arrays. For + # example: + # + # # equivalent to 'li:nth-child(2)' + # node.css('li[2]') # retrieve the second li element in a list + # + # ⚠ NOTE that the CSS query string is case-sensitive with regards to your document type. HTML + # tags will match only lowercase CSS queries, so if you search for "H1" in an HTML document, + # you'll never find anything. However, "H1" might be found in an XML document, where tags + # names are case-sensitive (e.g., "H1" is distinct from "h1"). + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#129 + def css(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + def search(*args); end + + # call-seq: + # xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # node.xpath('.//title') + # + # A hash of namespace bindings may be appended. For example: + # + # node.xpath('.//foo:name', {'foo' => 'http://example.org/'}) + # node.xpath('.//xmlns:name', node.root.namespaces) + # + # A hash of variable bindings may also be appended to the namespace bindings. For example: + # + # node.xpath('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions may also be defined. To define custom functions create a class and + # implement the function you want to define, which will be in the `nokogiri` namespace. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.xpath('.//title[nokogiri:regex(., "\w+")]', handler) + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#179 + def xpath(*args); end + + private + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#210 + def css_internal(node, rules, handler, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#241 + def css_rules_to_xpath(rules, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#259 + def extract_params(params); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#229 + def xpath_impl(node, path, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#214 + def xpath_internal(node, paths, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#245 + def xpath_query_from_css_rule(rule, ns); end +end + +# Regular expression used by Searchable#search to determine if a query +# string is CSS or XPath +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#16 +Nokogiri::XML::Searchable::LOOKS_LIKE_XPATH = T.let(T.unsafe(nil), Regexp) + +# This class provides information about XML SyntaxErrors. These +# exceptions are typically stored on Nokogiri::XML::Document#errors. +# +# source://nokogiri//lib/nokogiri/xml/syntax_error.rb#8 +class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError + # Returns the value of attribute code. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#10 + def code; end + + # Returns the value of attribute column. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#18 + def column; end + + # Returns the value of attribute domain. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#9 + def domain; end + + # return true if this is an error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#34 + def error?; end + + # return true if this error is fatal + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#40 + def fatal?; end + + # Returns the value of attribute file. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#12 + def file; end + + # Returns the value of attribute int1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#17 + def int1; end + + # Returns the value of attribute level. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#11 + def level; end + + # Returns the value of attribute line. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#13 + def line; end + + # return true if this is a non error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#22 + def none?; end + + # Returns the value of attribute str1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#14 + def str1; end + + # Returns the value of attribute str2. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#15 + def str2; end + + # Returns the value of attribute str3. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#16 + def str3; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#44 + def to_s; end + + # return true if this is a warning + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#28 + def warning?; end + + private + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#53 + def level_to_s; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#65 + def location_to_s; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#61 + def nil_or_zero?(attribute); end +end + +# source://nokogiri//lib/nokogiri/xml/text.rb#5 +class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData + # source://nokogiri//lib/nokogiri/xml/text.rb#6 + def content=(string); end + + class << self + def new(*_arg0); end + end +end + +# Original C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#14 +Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) + +# C14N 1.1 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#18 +Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) + +# Exclusive C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#16 +Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/xpath.rb#5 +module Nokogiri::XML::XPath; end + +# The XPath search prefix to search direct descendants of the current element, +./+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#13 +Nokogiri::XML::XPath::CURRENT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search globally, +//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#7 +Nokogiri::XML::XPath::GLOBAL_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search direct descendants of the root element, +/+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#10 +Nokogiri::XML::XPath::ROOT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search anywhere in the current element's subtree, +.//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#16 +Nokogiri::XML::XPath::SUBTREE_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#6 +class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError + # source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#7 + def to_s; end +end + +# source://nokogiri//lib/nokogiri/xml/xpath_context.rb#5 +class Nokogiri::XML::XPathContext + def evaluate(*_arg0); end + + # Register namespaces in +namespaces+ + # + # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#8 + def register_namespaces(namespaces); end + + def register_ns(_arg0, _arg1); end + def register_variable(_arg0, _arg1); end + + class << self + def new(_arg0); end + end +end + +# See Nokogiri::XSLT::Stylesheet for creating and manipulating +# Stylesheet object. +# +# source://nokogiri//lib/nokogiri/xslt.rb#21 +module Nokogiri::XSLT + class << self + # :call-seq: + # parse(xsl) → Nokogiri::XSLT::Stylesheet + # parse(xsl, modules) → Nokogiri::XSLT::Stylesheet + # + # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers. + # + # [Parameters] + # - +xsl+ (String) XSL content to be parsed into a stylesheet + # - +modules+ (Hash) A hash of URI-to-handler relations for linking a + # namespace to a custom function handler. + # + # ⚠ The XSLT handler classes are registered *globally*. + # + # Also see Nokogiri::XSLT.register + # + # *Example* + # + # xml = Nokogiri.XML(<<~XML) + # + # Foo + # Bar + # + # XML + # + # handler = Class.new do + # def reverse(node) + # node.text.reverse + # end + # end + # + # xsl = <<~XSL + # + # + # + # + # + # + # + # + # + # XSL + # + # xsl = Nokogiri.XSLT(xsl, "http://nokogiri.org/xslt/myfuncs" => handler) + # xsl.transform(xml).to_xml + # # => "\n" + + # # "\n" + + # # " ooF\n" + + # # " raB\n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xslt.rb#76 + def parse(string, modules = T.unsafe(nil)); end + + # :call-seq: + # quote_params(params) → Array + # + # Quote parameters in +params+ for stylesheet safety. + # See Nokogiri::XSLT::Stylesheet.transform for example usage. + # + # [Parameters] + # - +params+ (Hash, Array) XSLT parameters (key->value, or tuples of [key, value]) + # + # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform + # + # source://nokogiri//lib/nokogiri/xslt.rb#100 + def quote_params(params); end + + def register(_arg0, _arg1); end + end +end + +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation +# is done through Nokogiri.XSLT. Here is an example of transforming +# an XML::Document with a Stylesheet: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# +# xslt.transform(doc) # => Nokogiri::XML::Document +# +# Many XSLT transformations include serialization behavior to emit a non-XML document. For these +# cases, please take care to invoke the #serialize method on the result of the transformation: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.serialize(xslt.transform(doc)) # => String +# +# or use the #apply_to method, which is a shortcut for `serialize(transform(document))`: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.apply_to(doc) # => String +# +# See Nokogiri::XSLT::Stylesheet#transform for more information and examples. +# +# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#29 +class Nokogiri::XSLT::Stylesheet + # :call-seq: + # apply_to(document, params = []) -> String + # + # Apply an XSLT stylesheet to an XML::Document and serialize it properly. This method is + # equivalent to calling #serialize on the result of #transform. + # + # [Parameters] + # - +document+ is an instance of XML::Document to transform + # - +params+ is an array of strings used as XSLT parameters, passed into #transform + # + # [Returns] + # A string containing the serialized result of the transformation. + # + # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. + # + # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#44 + def apply_to(document, params = T.unsafe(nil)); end + + def serialize(_arg0); end + def transform(*_arg0); end + + class << self + def parse_stylesheet_doc(_arg0); end + end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://nokogiri//lib/nokogiri.rb#108 + def Nokogiri(*args, &block); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ostruct@0.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ostruct@0.6.0.rbi new file mode 100644 index 0000000..54d3431 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ostruct@0.6.0.rbi @@ -0,0 +1,352 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ostruct` gem. +# Please instead update this file by running `bin/tapioca gem ostruct`. + + +# An OpenStruct is a data structure, similar to a Hash, that allows the +# definition of arbitrary attributes with their accompanying values. This is +# accomplished by using Ruby's metaprogramming to define methods on the class +# itself. +# +# == Examples +# +# require "ostruct" +# +# person = OpenStruct.new +# person.name = "John Smith" +# person.age = 70 +# +# person.name # => "John Smith" +# person.age # => 70 +# person.address # => nil +# +# An OpenStruct employs a Hash internally to store the attributes and values +# and can even be initialized with one: +# +# australia = OpenStruct.new(:country => "Australia", :capital => "Canberra") +# # => # +# +# Hash keys with spaces or characters that could normally not be used for +# method calls (e.g. ()[]*) will not be immediately available +# on the OpenStruct object as a method for retrieval or assignment, but can +# still be reached through the Object#send method or using []. +# +# measurements = OpenStruct.new("length (in inches)" => 24) +# measurements[:"length (in inches)"] # => 24 +# measurements.send("length (in inches)") # => 24 +# +# message = OpenStruct.new(:queued? => true) +# message.queued? # => true +# message.send("queued?=", false) +# message.queued? # => false +# +# Removing the presence of an attribute requires the execution of the +# delete_field method as setting the property value to +nil+ will not +# remove the attribute. +# +# first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith") +# second_pet = OpenStruct.new(:name => "Rowdy") +# +# first_pet.owner = nil +# first_pet # => # +# first_pet == second_pet # => false +# +# first_pet.delete_field(:owner) +# first_pet # => # +# first_pet == second_pet # => true +# +# Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable. +# +# == Caveats +# +# An OpenStruct utilizes Ruby's method lookup structure to find and define the +# necessary methods for properties. This is accomplished through the methods +# method_missing and define_singleton_method. +# +# This should be a consideration if there is a concern about the performance of +# the objects that are created, as there is much more overhead in the setting +# of these properties compared to using a Hash or a Struct. +# Creating an open struct from a small Hash and accessing a few of the +# entries can be 200 times slower than accessing the hash directly. +# +# This is a potential security issue; building OpenStruct from untrusted user data +# (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack +# since the keys create methods and names of methods are never garbage collected. +# +# This may also be the source of incompatibilities between Ruby versions: +# +# o = OpenStruct.new +# o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6 +# +# Builtin methods may be overwritten this way, which may be a source of bugs +# or security issues: +# +# o = OpenStruct.new +# o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ... +# o.methods = [:foo, :bar] +# o.methods # => [:foo, :bar] +# +# To help remedy clashes, OpenStruct uses only protected/private methods ending with ! +# and defines aliases for builtin public methods by adding a !: +# +# o = OpenStruct.new(make: 'Bentley', class: :luxury) +# o.class # => :luxury +# o.class! # => OpenStruct +# +# It is recommended (but not enforced) to not use fields ending in !; +# Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods +# ending with !. +# +# For all these reasons, consider not using OpenStruct at all. +class OpenStruct + # Creates a new OpenStruct object. By default, the resulting OpenStruct + # object will have no attributes. + # + # The optional +hash+, if given, will generate attributes and values + # (can be a Hash, an OpenStruct or a Struct). + # For example: + # + # require "ostruct" + # hash = { "country" => "Australia", :capital => "Canberra" } + # data = OpenStruct.new(hash) + # + # data # => # + # + # @return [OpenStruct] a new instance of OpenStruct + # + # source://ostruct//ostruct.rb#134 + def initialize(hash = T.unsafe(nil)); end + + # Compares this object and +other+ for equality. An OpenStruct is equal to + # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are + # equal. + # + # require "ostruct" + # first_pet = OpenStruct.new("name" => "Rowdy") + # second_pet = OpenStruct.new(:name => "Rowdy") + # third_pet = OpenStruct.new("name" => "Rowdy", :age => nil) + # + # first_pet == second_pet # => true + # first_pet == third_pet # => false + # + # source://ostruct//ostruct.rb#423 + def ==(other); end + + # :call-seq: + # ostruct[name] -> object + # + # Returns the value of an attribute, or +nil+ if there is no such attribute. + # + # require "ostruct" + # person = OpenStruct.new("name" => "John Smith", "age" => 70) + # person[:age] # => 70, same as person.age + # + # source://ostruct//ostruct.rb#303 + def [](name); end + + # :call-seq: + # ostruct[name] = obj -> obj + # + # Sets the value of an attribute. + # + # require "ostruct" + # person = OpenStruct.new("name" => "John Smith", "age" => 70) + # person[:age] = 42 # equivalent to person.age = 42 + # person.age # => 42 + # + # source://ostruct//ostruct.rb#318 + def []=(name, value); end + + # Removes the named field from the object and returns the value the field + # contained if it was defined. You may optionally provide a block. + # If the field is not defined, the result of the block is returned, + # or a NameError is raised if no block was given. + # + # require "ostruct" + # + # person = OpenStruct.new(name: "John", age: 70, pension: 300) + # + # person.delete_field!("age") # => 70 + # person # => # + # + # Setting the value to +nil+ will not remove the attribute: + # + # person.pension = nil + # person # => # + # + # person.delete_field('number') # => NameError + # + # person.delete_field('number') { 8675_309 } # => 8675309 + # + # source://ostruct//ostruct.rb#371 + def delete_field(name, &block); end + + # source://ostruct//ostruct.rb#371 + def delete_field!(name, &block); end + + # :call-seq: + # ostruct.dig(name, *identifiers) -> object + # + # Finds and returns the object in nested objects + # that is specified by +name+ and +identifiers+. + # The nested objects may be instances of various classes. + # See {Dig Methods}[rdoc-ref:dig_methods.rdoc]. + # + # Examples: + # require "ostruct" + # address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345) + # person = OpenStruct.new("name" => "John Smith", "address" => address) + # person.dig(:address, "zip") # => 12345 + # person.dig(:business_address, "zip") # => nil + # + # source://ostruct//ostruct.rb#340 + def dig(name, *names); end + + # source://ostruct//ostruct.rb#340 + def dig!(name, *names); end + + # :call-seq: + # ostruct.each_pair {|name, value| block } -> ostruct + # ostruct.each_pair -> Enumerator + # + # Yields all attributes (as symbols) along with the corresponding values + # or returns an enumerator if no block is given. + # + # require "ostruct" + # data = OpenStruct.new("country" => "Australia", :capital => "Canberra") + # data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]] + # + # source://ostruct//ostruct.rb#211 + def each_pair; end + + # source://ostruct//ostruct.rb#211 + def each_pair!; end + + # Provides marshalling support for use by the YAML library. + # + # source://ostruct//ostruct.rb#446 + def encode_with(coder); end + + # source://ostruct//ostruct.rb#446 + def encode_with!(coder); end + + # Compares this object and +other+ for equality. An OpenStruct is eql? to + # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are + # eql?. + # + # @return [Boolean] + # + # source://ostruct//ostruct.rb#433 + def eql?(other); end + + # source://ostruct//ostruct.rb#269 + def freeze; end + + # source://ostruct//ostruct.rb#269 + def freeze!; end + + # Computes a hash code for this OpenStruct. + # + # source://ostruct//ostruct.rb#439 + def hash; end + + # source://ostruct//ostruct.rb#439 + def hash!; end + + # Provides marshalling support for use by the YAML library. + # + # source://ostruct//ostruct.rb#459 + def init_with(coder); end + + # source://ostruct//ostruct.rb#459 + def init_with!(coder); end + + # Returns a string containing a detailed summary of the keys and values. + # + # source://ostruct//ostruct.rb#388 + def inspect; end + + # source://ostruct//ostruct.rb#388 + def inspect!; end + + # Provides marshalling support for use by the Marshal library. + # + # source://ostruct//ostruct.rb#220 + def marshal_dump; end + + # source://ostruct//ostruct.rb#220 + def marshal_dump!; end + + # source://ostruct//ostruct.rb#406 + def table; end + + # source://ostruct//ostruct.rb#182 + def to_h(&block); end + + # source://ostruct//ostruct.rb#182 + def to_h!(&block); end + + # Returns a string containing a detailed summary of the keys and values. + # + # source://ostruct//ostruct.rb#388 + def to_s; end + + # source://ostruct//ostruct.rb#388 + def to_s!; end + + protected + + # source://ostruct//ostruct.rb#406 + def table!; end + + private + + # source://ostruct//ostruct.rb#147 + def initialize_clone(orig); end + + # source://ostruct//ostruct.rb#152 + def initialize_dup(orig); end + + # source://ostruct//ostruct.rb#251 + def is_method_protected!(name); end + + # + # Provides marshalling support for use by the Marshal library. + # + # source://ostruct//ostruct.rb#157 + def marshal_load(hash); end + + # source://ostruct//ostruct.rb#274 + def method_missing(mid, *args); end + + # Used internally to defined properties on the + # OpenStruct. It does this by using the metaprogramming function + # define_singleton_method for both the getter method and the setter method. + # + # source://ostruct//ostruct.rb#234 + def new_ostruct_member!(name); end + + # :call-seq: + # ostruct[name] = obj -> obj + # + # Sets the value of an attribute. + # + # require "ostruct" + # person = OpenStruct.new("name" => "John Smith", "age" => 70) + # person[:age] = 42 # equivalent to person.age = 42 + # person.age # => 42 + # + # source://ostruct//ostruct.rb#318 + def set_ostruct_member_value!(name, value); end + + # source://ostruct//ostruct.rb#157 + def update_to_values!(hash); end +end + +# source://ostruct//ostruct.rb#112 +OpenStruct::HAS_PERFORMANCE_WARNINGS = T.let(T.unsafe(nil), TrueClass) + +# source://ostruct//ostruct.rb#110 +OpenStruct::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/parallel@1.26.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/parallel@1.26.3.rbi new file mode 100644 index 0000000..854c487 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/parallel@1.26.3.rbi @@ -0,0 +1,291 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel` gem. +# Please instead update this file by running `bin/tapioca gem parallel`. + + +# source://parallel//lib/parallel/version.rb#2 +module Parallel + class << self + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#243 + def all?(*args, &block); end + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#238 + def any?(*args, &block); end + + # source://parallel//lib/parallel.rb#234 + def each(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#248 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#307 + def filter_map(*_arg0, **_arg1, &_arg2); end + + # source://parallel//lib/parallel.rb#303 + def flat_map(*_arg0, **_arg1, &_arg2); end + + # source://parallel//lib/parallel.rb#228 + def in_processes(options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#212 + def in_threads(options = T.unsafe(nil)); end + + # source://parallel//lib/parallel.rb#252 + def map(source, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#299 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # source://parallel//lib/parallel.rb#312 + def physical_processor_count; end + + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling + # + # source://parallel//lib/parallel.rb#342 + def processor_count; end + + # source://parallel//lib/parallel.rb#346 + def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # source://parallel//lib/parallel.rb#351 + def worker_number=(worker_num); end + + private + + # source://parallel//lib/parallel.rb#384 + def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#699 + def available_processor_count; end + + # source://parallel//lib/parallel.rb#647 + def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#579 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#637 + def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#665 + def instrument_finish(item, index, result, options); end + + # yield results in the order of the input items + # needs to use `options` to store state between executions + # needs to use `done` index since a nil result would also be valid + # + # source://parallel//lib/parallel.rb#674 + def instrument_finish_in_order(item, index, result, options); end + + # source://parallel//lib/parallel.rb#694 + def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#357 + def physical_processor_count_windows; end + + # source://parallel//lib/parallel.rb#613 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#567 + def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#378 + def run(command); end + + # source://parallel//lib/parallel.rb#658 + def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#409 + def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#519 + def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#453 + def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#428 + def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#587 + def worker(job_factory, options, &block); end + end +end + +# source://parallel//lib/parallel.rb#11 +class Parallel::Break < ::StandardError + # @return [Break] a new instance of Break + # + # source://parallel//lib/parallel.rb#14 + def initialize(value = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://parallel//lib/parallel.rb#12 + def value; end +end + +# source://parallel//lib/parallel.rb#8 +class Parallel::DeadWorker < ::StandardError; end + +# source://parallel//lib/parallel.rb#32 +class Parallel::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://parallel//lib/parallel.rb#35 + def initialize(exception); end + + # Returns the value of attribute exception. + # + # source://parallel//lib/parallel.rb#33 + def exception; end +end + +# source://parallel//lib/parallel.rb#98 +class Parallel::JobFactory + # @return [JobFactory] a new instance of JobFactory + # + # source://parallel//lib/parallel.rb#99 + def initialize(source, mutex); end + + # source://parallel//lib/parallel.rb#107 + def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # source://parallel//lib/parallel.rb#136 + def pack(item, index); end + + # source://parallel//lib/parallel.rb#126 + def size; end + + # unpack item that is sent to workers + # + # source://parallel//lib/parallel.rb#141 + def unpack(data); end + + private + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#147 + def producer?; end + + # source://parallel//lib/parallel.rb#151 + def queue_wrapper(array); end +end + +# source://parallel//lib/parallel.rb#20 +class Parallel::Kill < ::Parallel::Break; end + +# source://parallel//lib/parallel.rb#6 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# source://parallel//lib/parallel.rb#23 +class Parallel::UndumpableException < ::StandardError + # @return [UndumpableException] a new instance of UndumpableException + # + # source://parallel//lib/parallel.rb#26 + def initialize(original); end + + # Returns the value of attribute backtrace. + # + # source://parallel//lib/parallel.rb#24 + def backtrace; end +end + +# source://parallel//lib/parallel.rb#156 +class Parallel::UserInterruptHandler + class << self + # source://parallel//lib/parallel.rb#181 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # source://parallel//lib/parallel.rb#161 + def kill_on_ctrl_c(pids, options); end + + private + + # source://parallel//lib/parallel.rb#205 + def restore_interrupt(old, signal); end + + # source://parallel//lib/parallel.rb#190 + def trap_interrupt(signal); end + end +end + +# source://parallel//lib/parallel.rb#157 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::Version = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel.rb#51 +class Parallel::Worker + # @return [Worker] a new instance of Worker + # + # source://parallel//lib/parallel.rb#55 + def initialize(read, write, pid); end + + # might be passed to started_processes and simultaneously closed by another thread + # when running in isolation mode, so we have to check if it is closed before closing + # + # source://parallel//lib/parallel.rb#68 + def close_pipes; end + + # Returns the value of attribute pid. + # + # source://parallel//lib/parallel.rb#52 + def pid; end + + # Returns the value of attribute read. + # + # source://parallel//lib/parallel.rb#52 + def read; end + + # source://parallel//lib/parallel.rb#61 + def stop; end + + # Returns the value of attribute thread. + # + # source://parallel//lib/parallel.rb#53 + def thread; end + + # Sets the attribute thread + # + # @param value the value to set the attribute thread to. + # + # source://parallel//lib/parallel.rb#53 + def thread=(_arg0); end + + # source://parallel//lib/parallel.rb#73 + def work(data); end + + # Returns the value of attribute write. + # + # source://parallel//lib/parallel.rb#52 + def write; end + + private + + # source://parallel//lib/parallel.rb#91 + def wait; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/parser@3.3.5.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/parser@3.3.5.0.rbi new file mode 100644 index 0000000..e5a2bb4 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/parser@3.3.5.0.rbi @@ -0,0 +1,5519 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parser` gem. +# Please instead update this file by running `bin/tapioca gem parser`. + + +# @api public +# +# source://parser//lib/parser.rb#19 +module Parser; end + +# @api public +# +# source://parser//lib/parser.rb#24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# source://parser//lib/parser/ast/node.rb#17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @api public + # @option properties + # @param properties [Hash] + # + # source://parser//lib/parser/ast/node.rb#30 + def assign_properties(properties); end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def loc; end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def location; end +end + +# @api public +# +# source://parser//lib/parser/ast/processor.rb#9 +class Parser::AST::Processor + include ::AST::Processor::Mixin + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_alias(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_and(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_and_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_arg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_args(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#105 + def on_argument(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_array(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_array_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_array_pattern_with_tail(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_back_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_begin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_block(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_block_pass(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_blockarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_blockarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_break(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_case(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_case_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#89 + def on_casgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_class(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#81 + def on_const(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_const_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#181 + def on_csend(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_cvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#58 + def on_cvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#160 + def on_def(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_defined?(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#169 + def on_defs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_dstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_dsym(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_eflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#288 + def on_empty_else(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_ensure(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_erange(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_find_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_for(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_forward_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_forwarded_restarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_gvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#58 + def on_gvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_hash(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_hash_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_if(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_if_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_iflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_in_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_in_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_index(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_indexasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_irange(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_ivar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#58 + def on_ivasgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_kwarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_kwargs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_kwbegin(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_kwoptarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_kwsplat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_lambda(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_lvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#58 + def on_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_masgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_alt(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_as(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_current_line(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_pattern_p(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_rest(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_match_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_match_with_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_mlhs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_module(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_next(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_not(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def on_nth_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#198 + def on_numblock(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#70 + def on_op_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_optarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_or(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_or_asgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_pair(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_pin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_postexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_preexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#132 + def on_procarg0(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_redo(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_regexp(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_resbody(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_rescue(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_restarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_restarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_retry(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_return(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_sclass(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#181 + def on_send(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def on_shadowarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_splat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_super(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_undef(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_unless_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_until(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_until_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#29 + def on_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#45 + def on_vasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_when(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_while(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_while_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_xstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def on_yield(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#281 + def process_argument_node(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def process_regular_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#273 + def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#265 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#16 +class Parser::Base < ::Racc::Parser + # @api public + # @param builder [Parser::Builders::Default] The AST builder to use. + # @return [Base] a new instance of Base + # + # source://parser//lib/parser/base.rb#126 + def initialize(builder = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#114 + def builder; end + + # @api public + # + # source://parser//lib/parser/base.rb#117 + def context; end + + # @api public + # + # source://parser//lib/parser/base.rb#119 + def current_arg_stack; end + + # @api public + # @return [Parser::Diagnostic::Engine] + # + # source://parser//lib/parser/base.rb#113 + def diagnostics; end + + # @api public + # + # source://parser//lib/parser/base.rb#112 + def lexer; end + + # @api public + # + # source://parser//lib/parser/base.rb#118 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # source://parser//lib/parser/base.rb#186 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @api public + # @return [Array] + # @see #parse + # @see Parser::Source::Comment#associate + # + # source://parser//lib/parser/base.rb#204 + def parse_with_comments(source_buffer); end + + # @api public + # + # source://parser//lib/parser/base.rb#121 + def pattern_hash_keys; end + + # @api public + # + # source://parser//lib/parser/base.rb#120 + def pattern_variables; end + + # Resets the state of the parser. + # + # @api public + # + # source://parser//lib/parser/base.rb#167 + def reset; end + + # @api public + # + # source://parser//lib/parser/base.rb#116 + def source_buffer; end + + # @api public + # @return [Parser::StaticEnvironment] + # + # source://parser//lib/parser/base.rb#115 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param recover [Boolean] If true, recover from syntax errors. False by default. + # @return [Array] + # + # source://parser//lib/parser/base.rb#233 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#257 + def check_kwarg_name(name_t); end + + # @api public + # + # source://parser//lib/parser/base.rb#266 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#251 + def next_token; end + + # @api public + # + # source://parser//lib/parser/base.rb#282 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @api public + # @return [Parser::Base] parser with the default options set. + # + # source://parser//lib/parser/base.rb#84 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/base.rb#30 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # source://parser//lib/parser/base.rb#64 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Array] + # @see #parse + # + # source://parser//lib/parser/base.rb#77 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Array] + # + # source://parser//lib/parser/base.rb#49 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#97 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# @api public +# +# source://parser//lib/parser.rb#78 +module Parser::Builders; end + +# source://parser//lib/parser/builders/default.rb#8 +class Parser::Builders::Default + # source://parser//lib/parser/builders/default.rb#243 + def initialize; end + + # source://parser//lib/parser/builders/default.rb#703 + def __ENCODING__(__ENCODING__t); end + + # source://parser//lib/parser/builders/default.rb#348 + def __FILE__(__FILE__t); end + + # source://parser//lib/parser/builders/default.rb#312 + def __LINE__(__LINE__t); end + + # source://parser//lib/parser/builders/default.rb#622 + def accessible(node); end + + # source://parser//lib/parser/builders/default.rb#878 + def alias(alias_t, to, from); end + + # source://parser//lib/parser/builders/default.rb#917 + def arg(name_t); end + + # source://parser//lib/parser/builders/default.rb#1007 + def arg_expr(expr); end + + # source://parser//lib/parser/builders/default.rb#887 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#440 + def array(begin_t, elements, end_t); end + + # source://parser//lib/parser/builders/default.rb#1590 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#767 + def assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#712 + def assignable(node); end + + # source://parser//lib/parser/builders/default.rb#540 + def associate(begin_t, pairs, end_t); end + + # source://parser//lib/parser/builders/default.rb#1171 + def attr_asgn(receiver, dot_t, selector_t); end + + # source://parser//lib/parser/builders/default.rb#612 + def back_ref(token); end + + # source://parser//lib/parser/builders/default.rb#1435 + def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1377 + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1453 + def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1205 + def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1122 + def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1157 + def block_pass(amper_t, arg); end + + # source://parser//lib/parser/builders/default.rb#982 + def blockarg(amper_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1027 + def blockarg_expr(amper_t, expr); end + + # source://parser//lib/parser/builders/default.rb#1113 + def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1096 + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1068 + def call_type_for_dot(dot_t); end + + # source://parser//lib/parser/builders/default.rb#1310 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1473 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#343 + def character(char_t); end + + # source://parser//lib/parser/builders/default.rb#284 + def complex(complex_t); end + + # source://parser//lib/parser/builders/default.rb#1423 + def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1286 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1292 + def condition_mod(if_true, if_false, cond_t, cond); end + + # source://parser//lib/parser/builders/default.rb#686 + def const(name_t); end + + # source://parser//lib/parser/builders/default.rb#698 + def const_fetch(scope, t_colon2, name_t); end + + # source://parser//lib/parser/builders/default.rb#691 + def const_global(t_colon3, name_t); end + + # source://parser//lib/parser/builders/default.rb#763 + def const_op_assignable(node); end + + # source://parser//lib/parser/builders/default.rb#1620 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # source://parser//lib/parser/builders/default.rb#607 + def cvar(token); end + + # source://parser//lib/parser/builders/default.rb#388 + def dedent_string(node, dedent_level); end + + # source://parser//lib/parser/builders/default.rb#814 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#845 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#863 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#837 + def def_method(def_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#827 + def def_module(module_t, name, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#821 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#853 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals; end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#265 + def false(false_t); end + + # source://parser//lib/parser/builders/default.rb#1611 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#276 + def float(float_t); end + + # source://parser//lib/parser/builders/default.rb#1331 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#913 + def forward_arg(dots_t); end + + # source://parser//lib/parser/builders/default.rb#903 + def forward_only_args(begin_t, dots_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1084 + def forwarded_args(dots_t); end + + # source://parser//lib/parser/builders/default.rb#1092 + def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1088 + def forwarded_restarg(star_t); end + + # source://parser//lib/parser/builders/default.rb#596 + def gvar(token); end + + # source://parser//lib/parser/builders/default.rb#1584 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#586 + def ident(token); end + + # source://parser//lib/parser/builders/default.rb#1500 + def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1479 + def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1494 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1180 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1194 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#272 + def integer(integer_t); end + + # source://parser//lib/parser/builders/default.rb#591 + def ivar(token); end + + # source://parser//lib/parser/builders/default.rb#1339 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#944 + def kwarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#970 + def kwnilarg(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#951 + def kwoptarg(name_t, value); end + + # source://parser//lib/parser/builders/default.rb#958 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#535 + def kwsplat(dstar_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1279 + def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1317 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1322 + def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1634 + def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1641 + def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1520 + def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1534 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1672 + def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1648 + def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1227 + def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1653 + def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1484 + def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1489 + def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1573 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1508 + def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1616 + def match_with_trailing_comma(match, comma_t); end + + # source://parser//lib/parser/builders/default.rb#805 + def multi_assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#800 + def multi_lhs(begin_t, items, end_t); end + + # source://parser//lib/parser/builders/default.rb#255 + def nil(nil_t); end + + # source://parser//lib/parser/builders/default.rb#1255 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#617 + def nth_ref(token); end + + # source://parser//lib/parser/builders/default.rb#899 + def numargs(max_numparam); end + + # source://parser//lib/parser/builders/default.rb#1038 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1052 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1162 + def objc_varargs(pair, rest_of_varargs); end + + # source://parser//lib/parser/builders/default.rb#774 + def op_assign(lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#924 + def optarg(name_t, eql_t, value); end + + # source://parser//lib/parser/builders/default.rb#488 + def pair(key, assoc_t, value); end + + # source://parser//lib/parser/builders/default.rb#505 + def pair_keyword(key_t, value); end + + # source://parser//lib/parser/builders/default.rb#521 + def pair_label(key_t); end + + # source://parser//lib/parser/builders/default.rb#493 + def pair_list_18(list); end + + # source://parser//lib/parser/builders/default.rb#513 + def pair_quoted(begin_t, parts, end_t, value); end + + # source://parser//lib/parser/builders/default.rb#225 + def parser; end + + # source://parser//lib/parser/builders/default.rb#225 + def parser=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#1629 + def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1362 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1357 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#992 + def procarg0(arg); end + + # source://parser//lib/parser/builders/default.rb#572 + def range_exclusive(lhs, dot3_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#567 + def range_inclusive(lhs, dot2_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#280 + def rational(rational_t); end + + # source://parser//lib/parser/builders/default.rb#426 + def regexp_compose(begin_t, parts, end_t, options); end + + # source://parser//lib/parser/builders/default.rb#417 + def regexp_options(regopt_t); end + + # source://parser//lib/parser/builders/default.rb#1369 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # source://parser//lib/parser/builders/default.rb#933 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1016 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#581 + def self(token); end + + # source://parser//lib/parser/builders/default.rb#975 + def shadowarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#445 + def splat(star_t, arg = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#319 + def string(string_t); end + + # source://parser//lib/parser/builders/default.rb#329 + def string_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#324 + def string_internal(string_t); end + + # source://parser//lib/parser/builders/default.rb#355 + def symbol(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#365 + def symbol_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#360 + def symbol_internal(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#469 + def symbols_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#1297 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # source://parser//lib/parser/builders/default.rb#260 + def true(true_t); end + + # source://parser//lib/parser/builders/default.rb#294 + def unary_num(unary_t, numeric); end + + # source://parser//lib/parser/builders/default.rb#1243 + def unary_op(op_t, receiver); end + + # source://parser//lib/parser/builders/default.rb#873 + def undef_method(undef_t, names); end + + # source://parser//lib/parser/builders/default.rb#1504 + def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1304 + def when(when_t, patterns, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#455 + def word(parts); end + + # source://parser//lib/parser/builders/default.rb#464 + def words_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # source://parser//lib/parser/builders/default.rb#1821 + def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#2017 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1991 + def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2119 + def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1796 + def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1688 + def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1767 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1742 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1854 + def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1844 + def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1836 + def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1811 + def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2280 + def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1942 + def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2146 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # source://parser//lib/parser/builders/default.rb#1977 + def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2050 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1883 + def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2302 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2190 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2056 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1938 + def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2171 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2218 + def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2108 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1874 + def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2124 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2141 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2027 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2333 + def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2297 + def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2040 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1866 + def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1870 + def n0(type, source_map); end + + # source://parser//lib/parser/builders/default.rb#288 + def numeric(kind, token); end + + # source://parser//lib/parser/builders/default.rb#1908 + def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1923 + def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1894 + def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#2005 + def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1972 + def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2177 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # source://parser//lib/parser/builders/default.rb#2323 + def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2090 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2113 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2064 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2096 + def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2249 + def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2269 + def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2232 + def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1958 + def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2289 + def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2166 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1879 + def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#1995 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1903 + def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2311 + def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1781 + def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2285 + def value(token); end + + # source://parser//lib/parser/builders/default.rb#2084 + def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1987 + def variable_map(name_t); end + + class << self + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0; end + + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding; end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg; end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index; end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs; end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda; end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern; end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0; end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#211 + def modernize; end + end +end + +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# source://parser//lib/parser/clobbering_error.rb#11 +class Parser::ClobberingError < ::RuntimeError; end + +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# source://parser//lib/parser/context.rb#18 +class Parser::Context + # @return [Context] a new instance of Context + # + # source://parser//lib/parser/context.rb#29 + def initialize; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_block; end + + # source://parser//lib/parser/context.rb#43 + def in_block=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_class; end + + # source://parser//lib/parser/context.rb#43 + def in_class=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_def; end + + # source://parser//lib/parser/context.rb#43 + def in_def=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_defined; end + + # source://parser//lib/parser/context.rb#43 + def in_defined=(_arg0); end + + # @return [Boolean] + # + # source://parser//lib/parser/context.rb#45 + def in_dynamic_block?; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_lambda; end + + # source://parser//lib/parser/context.rb#43 + def in_lambda=(_arg0); end + + # source://parser//lib/parser/context.rb#33 + def reset; end +end + +# source://parser//lib/parser/context.rb#19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# source://parser//lib/parser/current_arg_stack.rb#14 +class Parser::CurrentArgStack + # @api private + # @return [CurrentArgStack] a new instance of CurrentArgStack + # + # source://parser//lib/parser/current_arg_stack.rb#17 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/current_arg_stack.rb#22 + def empty?; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#34 + def pop; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#26 + def push(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#38 + def reset; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#30 + def set(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#15 + def stack; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#42 + def top; end +end + +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 +module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 + def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 +class Parser::Diagnostic + # @api public + # @param level [Symbol] + # @param reason [Symbol] + # @param arguments [Hash] + # @param location [Parser::Source::Range] + # @param highlights [Array] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 + def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 + def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 + def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 + def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# source://parser//lib/parser/diagnostic/engine.rb#36 +class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 + def initialize(consumer = T.unsafe(nil)); end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 + def process(diagnostic); end + + protected + + # source://parser//lib/parser/diagnostic/engine.rb#86 + def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14692 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14754 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14716 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14666 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14775 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14803 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14700 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14712 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14682 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14765 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14783 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14791 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14813 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14676 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14731 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14750 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14662 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14653 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14658 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14649 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg; end + + # Sets the attribute lex_en_expr_arg + # + # @param value the value to set the attribute lex_en_expr_arg to. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg; end + + # Sets the attribute lex_en_expr_beg + # + # @param value the value to set the attribute lex_en_expr_beg to. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg; end + + # Sets the attribute lex_en_expr_cmdarg + # + # @param value the value to set the attribute lex_en_expr_cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot; end + + # Sets the attribute lex_en_expr_dot + # + # @param value the value to set the attribute lex_en_expr_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end; end + + # Sets the attribute lex_en_expr_end + # + # @param value the value to set the attribute lex_en_expr_end to. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg; end + + # Sets the attribute lex_en_expr_endarg + # + # @param value the value to set the attribute lex_en_expr_endarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn; end + + # Sets the attribute lex_en_expr_endfn + # + # @param value the value to set the attribute lex_en_expr_endfn to. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname; end + + # Sets the attribute lex_en_expr_fname + # + # @param value the value to set the attribute lex_en_expr_fname to. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg; end + + # Sets the attribute lex_en_expr_labelarg + # + # @param value the value to set the attribute lex_en_expr_labelarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid; end + + # Sets the attribute lex_en_expr_mid + # + # @param value the value to set the attribute lex_en_expr_mid to. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value; end + + # Sets the attribute lex_en_expr_value + # + # @param value the value to set the attribute lex_en_expr_value to. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable; end + + # Sets the attribute lex_en_expr_variable + # + # @param value the value to set the attribute lex_en_expr_variable to. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot; end + + # Sets the attribute lex_en_leading_dot + # + # @param value the value to set the attribute lex_en_leading_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin; end + + # Sets the attribute lex_en_line_begin + # + # @param value the value to set the attribute lex_en_line_begin to. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment; end + + # Sets the attribute lex_en_line_comment + # + # @param value the value to set the attribute lex_en_line_comment to. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs=(_arg0); end + end +end + +# source://parser//lib/parser/lexer/dedenter.rb#5 +class Parser::Lexer::Dedenter + # source://parser//lib/parser/lexer/dedenter.rb#9 + def initialize(dedent_level); end + + # source://parser//lib/parser/lexer/dedenter.rb#36 + def dedent(string); end + + # source://parser//lib/parser/lexer/dedenter.rb#83 + def interrupt; end +end + +# source://parser//lib/parser/lexer/dedenter.rb#7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer-F1.rb#14860 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14846 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14853 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#6 +class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#42 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#116 + def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#191 + def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#218 + def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#222 + def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#197 + def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#204 + def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#104 + def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#168 + def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#91 + def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#124 + def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#108 + def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#100 + def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#112 + def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#187 + def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#232 + def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#120 + def type; end + + # source://parser//lib/parser/lexer/literal.rb#95 + def words?; end + + protected + + # source://parser//lib/parser/lexer/literal.rb#263 + def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#259 + def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#238 + def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#279 + def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#274 + def emit_start_tok; end +end + +# source://parser//lib/parser/lexer/literal.rb#7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14820 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14840 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/stack_state.rb#5 +class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 + def initialize(name); end + + # source://parser//lib/parser/lexer/stack_state.rb#34 + def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 + def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 + def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 + def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 + def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 + def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5397 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 +class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 + def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 + def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 + def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 + def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 + def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 + def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 + def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 + def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 + def top; end + + private + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 + def set(value); end +end + +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://parser//lib/parser/messages.rb#112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # source://parser//lib/parser/messages.rb#119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # @api public + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/rewriter.rb#98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/rewriter.rb#38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#67 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @return [String] + # + # source://parser//lib/parser/rewriter.rb#23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#57 + def wrap(range, before, after); end +end + +# @api public +# +# source://parser//lib/parser/rewriter.rb#91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end + +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer + # + # source://parser//lib/parser/source/buffer.rb#110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#222 + def decompose_position(position); end + + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#317 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#323 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#289 + def line_range(lineno); end + + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#136 + def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#257 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#303 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#353 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#330 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#344 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#52 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#95 + def reencode_string(input); end + end +end + +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @api public + # @param other [Object] + # @return [Boolean] + # + # source://parser//lib/parser/source/comment.rb#120 + def ==(other); end + + # @api public + # @return [Boolean] true if this is a block comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#109 + def document?; end + + # @api public + # @return [Boolean] true if this is an inline comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#101 + def inline?; end + + # @api public + # @return [String] a human-readable representation of this comment + # + # source://parser//lib/parser/source/comment.rb#128 + def inspect; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def loc; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def location; end + + # @api public + # @return [String] + # + # source://parser//lib/parser/source/comment.rb#18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @api public + # @return [Symbol] + # + # source://parser//lib/parser/source/comment.rb#89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @api public + # @deprecated Use {associate_locations}. + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # + # source://parser//lib/parser/source/comment.rb#32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # source://parser//lib/parser/source/comment.rb#59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # source://parser//lib/parser/source/comment.rb#46 + def associate_locations(ast, comments); end + end +end + +# source://parser//lib/parser/source/comment/associator.rb#45 +class Parser::Source::Comment::Associator + # source://parser//lib/parser/source/comment/associator.rb#51 + def initialize(ast, comments); end + + # source://parser//lib/parser/source/comment/associator.rb#92 + def associate; end + + # source://parser//lib/parser/source/comment/associator.rb#115 + def associate_by_identity; end + + # source://parser//lib/parser/source/comment/associator.rb#104 + def associate_locations; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives=(_arg0); end + + private + + # source://parser//lib/parser/source/comment/associator.rb#182 + def advance_comment; end + + # source://parser//lib/parser/source/comment/associator.rb#214 + def advance_through_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#206 + def associate_and_advance_comment(node); end + + # source://parser//lib/parser/source/comment/associator.rb#123 + def children_in_source_order(node); end + + # source://parser//lib/parser/source/comment/associator.rb#187 + def current_comment_before?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#194 + def current_comment_before_end?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#201 + def current_comment_decorates?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#135 + def do_associate; end + + # source://parser//lib/parser/source/comment/associator.rb#166 + def process_leading_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#173 + def process_trailing_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#148 + def visit(node); end +end + +# source://parser//lib/parser/source/comment/associator.rb#212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# source://parser//lib/parser/source/comment/associator.rb#122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @api public +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# source://parser//lib/parser/source/map.rb#70 +class Parser::Source::Map + # @api public + # @param expression [Range] + # @return [Map] a new instance of Map + # + # source://parser//lib/parser/source/map.rb#76 + def initialize(expression); end + + # Compares source maps. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/map.rb#140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#109 + def column; end + + # @api public + # @return [Range] + # + # source://parser//lib/parser/source/map.rb#72 + def expression; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#117 + def last_line; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def line; end + + # The node that is described by this map. Nodes and maps have 1:1 correspondence. + # + # @api public + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/source/map.rb#71 + def node; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @api public + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # @return [Hash] + # + # source://parser//lib/parser/source/map.rb#166 + def to_hash; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#132 + def with_expression(expression_l); end + + protected + + # @api public + # + # source://parser//lib/parser/source/map.rb#180 + def update_expression(expression_l); end + + # @api public + # + # source://parser//lib/parser/source/map.rb#176 + def with(&block); end + + private + + # @api private + # + # source://parser//lib/parser/source/map.rb#82 + def initialize_copy(other); end +end + +# source://parser//lib/parser/source/map/collection.rb#6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # source://parser//lib/parser/source/map/collection.rb#10 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/collection.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/collection.rb#8 + def end; end +end + +# source://parser//lib/parser/source/map/condition.rb#6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/condition.rb#12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/condition.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/condition.rb#9 + def else; end + + # source://parser//lib/parser/source/map/condition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/condition.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/constant.rb#6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # source://parser//lib/parser/source/map/constant.rb#11 + def initialize(double_colon, name, expression); end + + # source://parser//lib/parser/source/map/constant.rb#7 + def double_colon; end + + # source://parser//lib/parser/source/map/constant.rb#8 + def name; end + + # source://parser//lib/parser/source/map/constant.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/constant.rb#20 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/constant.rb#26 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/definition.rb#6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/definition.rb#12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # source://parser//lib/parser/source/map/definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/for.rb#6 +class Parser::Source::Map::For < ::Parser::Source::Map + # source://parser//lib/parser/source/map/for.rb#10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/for.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/for.rb#8 + def end; end + + # source://parser//lib/parser/source/map/for.rb#7 + def in; end + + # source://parser//lib/parser/source/map/for.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/heredoc.rb#6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # source://parser//lib/parser/source/map/heredoc.rb#10 + def initialize(begin_l, body_l, end_l); end + + # source://parser//lib/parser/source/map/heredoc.rb#7 + def heredoc_body; end + + # source://parser//lib/parser/source/map/heredoc.rb#8 + def heredoc_end; end +end + +# source://parser//lib/parser/source/map/index.rb#6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # source://parser//lib/parser/source/map/index.rb#11 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/index.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/index.rb#8 + def end; end + + # source://parser//lib/parser/source/map/index.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/index.rb#21 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/index.rb#27 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/keyword.rb#6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # source://parser//lib/parser/source/map/keyword.rb#11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/keyword.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/keyword.rb#9 + def end; end + + # source://parser//lib/parser/source/map/keyword.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/method_definition.rb#6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/method_definition.rb#13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # source://parser//lib/parser/source/map/method_definition.rb#11 + def assignment; end + + # source://parser//lib/parser/source/map/method_definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/method_definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/method_definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/method_definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/objc_kwarg.rb#6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # source://parser//lib/parser/source/map/objc_kwarg.rb#11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#9 + def argument; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/operator.rb#6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # source://parser//lib/parser/source/map/operator.rb#9 + def initialize(operator, expression); end + + # source://parser//lib/parser/source/map/operator.rb#7 + def operator; end +end + +# source://parser//lib/parser/source/map/rescue_body.rb#6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # source://parser//lib/parser/source/map/rescue_body.rb#11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # source://parser//lib/parser/source/map/rescue_body.rb#8 + def assoc; end + + # source://parser//lib/parser/source/map/rescue_body.rb#9 + def begin; end + + # source://parser//lib/parser/source/map/rescue_body.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/send.rb#6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # source://parser//lib/parser/source/map/send.rb#13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/send.rb#10 + def begin; end + + # source://parser//lib/parser/source/map/send.rb#7 + def dot; end + + # source://parser//lib/parser/source/map/send.rb#11 + def end; end + + # source://parser//lib/parser/source/map/send.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/send.rb#8 + def selector; end + + # source://parser//lib/parser/source/map/send.rb#24 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/send.rb#30 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/ternary.rb#6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # source://parser//lib/parser/source/map/ternary.rb#10 + def initialize(question_l, colon_l, expression_l); end + + # source://parser//lib/parser/source/map/ternary.rb#8 + def colon; end + + # source://parser//lib/parser/source/map/ternary.rb#7 + def question; end +end + +# source://parser//lib/parser/source/map/variable.rb#6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # source://parser//lib/parser/source/map/variable.rb#10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # source://parser//lib/parser/source/map/variable.rb#7 + def name; end + + # source://parser//lib/parser/source/map/variable.rb#8 + def operator; end + + # source://parser//lib/parser/source/map/variable.rb#19 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/variable.rb#25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @api public +# +# source://parser//lib/parser/source/range.rb#26 +class Parser::Source::Range + include ::Comparable + + # @api public + # @param source_buffer [Buffer] + # @param begin_pos [Integer] + # @param end_pos [Integer] + # @return [Range] a new instance of Range + # + # source://parser//lib/parser/source/range.rb#37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#301 + def <=>(other); end + + # by the given amount(s) + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # + # source://parser//lib/parser/source/range.rb#193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @api public + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # source://parser//lib/parser/source/range.rb#55 + def begin; end + + # @api public + # @return [Integer] index of the first character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def begin_pos; end + + # @api public + # @return [Integer] zero-based column number of the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#92 + def column; end + + # @api public + # @raise RangeError + # @return [::Range] a range of columns spanned by this range. + # + # source://parser//lib/parser/source/range.rb#114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#294 + def empty?; end + + # @api public + # @return [Range] a zero-length range located just after the end + # of this range. + # + # source://parser//lib/parser/source/range.rb#63 + def end; end + + # @api public + # @return [Integer] index of the character after the last character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def end_pos; end + + # @api public + def eql?(_arg0); end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#313 + def hash; end + + # @api public + # @return [String] a human-readable representation of this range. + # + # source://parser//lib/parser/source/range.rb#320 + def inspect; end + + # @api public + # @param other [Range] + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # source://parser//lib/parser/source/range.rb#220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#141 + def is?(*what); end + + # @api public + # @param other [Range] + # @return [Range] smallest possible range spanning both this range and `other`. + # + # source://parser//lib/parser/source/range.rb#209 + def join(other); end + + # @api public + # @return [Integer] zero-based column number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#106 + def last_column; end + + # @api public + # @return [Integer] line number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#99 + def last_line; end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @api public + # @param other [Range] + # @return [Boolean] `true` if this range and `other` overlap + # + # source://parser//lib/parser/source/range.rb#250 + def overlaps?(other); end + + # @api public + # @param new_size [Integer] + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # source://parser//lib/parser/source/range.rb#201 + def resize(new_size); end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def size; end + + # @api public + # @return [String] all source code covered by this range. + # + # source://parser//lib/parser/source/range.rb#132 + def source; end + + # @api public + # @return [Parser::Source::Buffer] + # + # source://parser//lib/parser/source/range.rb#29 + def source_buffer; end + + # @api public + # @return [String] a line of source code containing the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#125 + def source_line; end + + # @api public + # @return [Array] a set of character indexes contained in this range. + # + # source://parser//lib/parser/source/range.rb#148 + def to_a; end + + # @api public + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # source://parser//lib/parser/source/range.rb#155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/range.rb#173 + def to_s; end + + # to the given value(s). + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # + # source://parser//lib/parser/source/range.rb#184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @api public +# @deprecated Use {TreeRewriter} +# +# source://parser//lib/parser/source/rewriter.rb#31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @api public + # @deprecated Use {TreeRewriter} + # @param source_buffer [Source::Buffer] + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/source/rewriter.rb#39 + def initialize(source_buffer); end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/rewriter.rb#33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @deprecated Use {TreeRewriter#process} + # @return [String] + # + # source://parser//lib/parser/source/rewriter.rb#178 + def process; end + + # Removes the source range. + # + # @api public + # @deprecated Use {TreeRewriter#remove} + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @deprecated Use {TreeRewriter#replace} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#167 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/rewriter.rb#32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @api public + # @deprecated Use {TreeRewriter#transaction} + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # + # source://parser//lib/parser/source/rewriter.rb#216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#wrap} + # @param range [Range] + # @param before [String] + # @param after [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#94 + def wrap(range, before, after); end + + private + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#476 + def active_clobber; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#484 + def active_clobber=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#480 + def active_insertions; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#492 + def active_insertions=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#472 + def active_queue; end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#500 + def adjacent?(range1, range2); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#351 + def adjacent_insertion_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#366 + def adjacent_insertions?(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#347 + def adjacent_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#280 + def append(action); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#389 + def can_merge?(action, existing); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#355 + def clobbered_insertion?(insertion); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#343 + def clobbered_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#468 + def in_transaction?; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#410 + def merge_actions(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#419 + def merge_actions!(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#425 + def merge_replacements(actions); end + + # @api public + # @raise [ClobberingError] + # + # source://parser//lib/parser/source/rewriter.rb#450 + def raise_clobber_error(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#335 + def record_insertion(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#339 + def record_replace(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#445 + def replace_actions(old, updated); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# source://parser//lib/parser/source/rewriter/action.rb#9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # source://parser//lib/parser/source/rewriter/action.rb#15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # source://parser//lib/parser/source/rewriter/action.rb#24 + def <=>(other); end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions?; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def order; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def range; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def replacement; end + + # source://parser//lib/parser/source/rewriter/action.rb#30 + def to_s; end +end + +# @api public +# +# source://parser//lib/parser/source/rewriter.rb#504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @api public + # @param source_buffer [Source::Buffer] + # @return [TreeRewriter] a new instance of TreeRewriter + # + # source://parser//lib/parser/source/tree_rewriter.rb#98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @api public + # @return [Array<(Symbol, Range, String{, String})>] + # + # source://parser//lib/parser/source/tree_rewriter.rb#299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @api public + # @return [Array] an ordered list of pairs of range & replacement + # + # source://parser//lib/parser/source/tree_rewriter.rb#281 + def as_replacements; end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/tree_rewriter.rb#93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @api public + # @param rewriter [TreeRewriter] from different source_buffer + # @param offset [Integer] + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#342 + def insert_before_multi(range, text); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] merge of receiver and argument + # + # source://parser//lib/parser/source/tree_rewriter.rb#155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/tree_rewriter.rb#252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @api public + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#193 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/tree_rewriter.rb#92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @api public + # @raise [RuntimeError] when no block is passed + # + # source://parser//lib/parser/source/tree_rewriter.rb#310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @api public + # @param range [Range] + # @param insert_before [String, nil] + # @param insert_after [String, nil] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#206 + def wrap(range, insert_before, insert_after); end + + protected + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#365 + def action_root; end + + private + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#369 + def action_summary; end + + # @api public + # @raise [ArgumentError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#392 + def check_policy_validity; end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#404 + def check_range_validity(range); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#397 + def combine(range, attributes); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#411 + def enforce_policy(event); end + + # @api public + # @raise [Parser::ClobberingError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 +class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 + def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 + def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 + def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 + def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#81 + def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 + def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 + def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def replacement; end + + protected + + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 + def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#225 + def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#205 + def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 + def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#130 + def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 + def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#136 + def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 + def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#111 + def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 + def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/static_environment.rb#5 +class Parser::StaticEnvironment + # @return [StaticEnvironment] a new instance of StaticEnvironment + # + # source://parser//lib/parser/static_environment.rb#17 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#55 + def declare(name); end + + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 + def declare_anonymous_restarg; end + + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#61 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#81 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#117 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#99 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#103 + def declared_anonymous_restarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#71 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#129 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#33 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#26 + def extend_static; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#89 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#125 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#107 + def parent_has_anonymous_restarg?; end + + # source://parser//lib/parser/static_environment.rb#21 + def reset; end + + # source://parser//lib/parser/static_environment.rb#49 + def unextend; end +end + +# source://parser//lib/parser/static_environment.rb#15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# source://parser//lib/parser/syntax_error.rb#13 +class Parser::SyntaxError < ::StandardError + # @api public + # @return [SyntaxError] a new instance of SyntaxError + # + # source://parser//lib/parser/syntax_error.rb#16 + def initialize(diagnostic); end + + # @api public + # @return [Parser::Diagnostic] + # + # source://parser//lib/parser/syntax_error.rb#14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# source://parser//lib/parser/tree_rewriter.rb#51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/tree_rewriter.rb#79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#108 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # source://parser//lib/parser/tree_rewriter.rb#62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# source://parser//lib/parser/version.rb#4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://parser//lib/parser/variables_stack.rb#5 +class Parser::VariablesStack + # @return [VariablesStack] a new instance of VariablesStack + # + # source://parser//lib/parser/variables_stack.rb#6 + def initialize; end + + # source://parser//lib/parser/variables_stack.rb#27 + def declare(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#31 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#11 + def empty?; end + + # source://parser//lib/parser/variables_stack.rb#19 + def pop; end + + # source://parser//lib/parser/variables_stack.rb#15 + def push; end + + # source://parser//lib/parser/variables_stack.rb#23 + def reset; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/prism@0.30.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/prism@0.30.0.rbi new file mode 100644 index 0000000..9aec9c3 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/prism@0.30.0.rbi @@ -0,0 +1,39212 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +class Parser::Base; end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. The main difference is that the + # `:on_sp` token is not emitted. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#45 + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#55 + sig { params(source: String).returns(T::Array[T.untyped]) } + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#63 + sig { params(source: String, serialized: String).returns(Prism::ParseResult) } + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_failure?(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + + # Mirror the Prism.profile API by using the serialization API. + def profile(*_arg0); end + + # Mirror the Prism.profile_file API by using the serialization API. + def profile_file(*_arg0); end + end +end + +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. Sources that +# include multibyte characters are represented by the Prism::Source class. +# +# source://prism//lib/prism/parse_result.rb#126 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#133 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#128 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentialy the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#150 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#143 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#176 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#178 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, new_name, old_name, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#281 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#202 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#197 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#207 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#215 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#247 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#242 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#235 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#223 + sig { returns(Prism::Node) } + def new_name; end + + # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#229 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#265 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#275 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#293 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#295 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, new_name, old_name, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#389 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#304 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#319 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#314 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#324 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#332 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#355 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#350 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#343 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Prism::node + # + # source://prism//lib/prism/node.rb#337 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Prism::node + # + # source://prism//lib/prism/node.rb#340 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#373 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#383 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#401 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#403 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#497 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#412 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#417 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#427 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#422 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#432 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#417 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#440 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#463 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#445 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#458 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#451 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#448 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#481 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#491 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#509 +class Prism::AndNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#511 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#620 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#520 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#525 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#535 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#530 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode + # + # source://prism//lib/prism/node.rb#540 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AndNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#525 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#548 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#586 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#559 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#581 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#574 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#568 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#604 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#614 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#632 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#634 + sig do + params( + source: Prism::Source, + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).void + end + def initialize(source, flags, arguments, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#726 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#642 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#679 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#647 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#657 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#652 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#687 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#682 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#662 + sig do + params( + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).returns(Prism::ArgumentsNode) + end + def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#647 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } + # + # source://prism//lib/prism/node.rb#670 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#692 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#710 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#675 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#720 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#19127 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keywords +# +# source://prism//lib/prism/node.rb#19129 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#19132 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#738 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#740 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, flags, elements, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#875 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#750 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#755 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#836 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#813 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#765 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#760 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#826 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode + # + # source://prism//lib/prism/node.rb#770 + sig do + params( + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#755 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#778 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # source://prism//lib/prism/node.rb#787 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#841 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#831 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#795 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#859 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#783 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#869 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#19136 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#19138 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#901 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#903 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1035 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#915 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#920 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#996 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#978 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#935 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#925 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#953 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#940 + sig do + params( + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayPatternNode) + end + def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#920 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#948 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1001 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#991 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#965 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#962 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#956 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#959 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1019 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1029 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1052 +class Prism::AssocNode < ::Prism::Node + # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#1054 + sig do + params( + source: Prism::Source, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, key, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1172 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1063 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1068 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1078 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1073 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode + # + # source://prism//lib/prism/node.rb#1083 + sig do + params( + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::AssocNode) + end + def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1068 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#1091 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1138 + sig { override.returns(String) } + def inspect; end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1105 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1133 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1120 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1156 + sig { override.returns(Symbol) } + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1114 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1166 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1184 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1186 + sig do + params( + source: Prism::Source, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1284 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1194 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1199 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1211 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1204 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#1216 + sig do + params( + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1199 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1224 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1250 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1245 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1238 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1268 + sig { override.returns(Symbol) } + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1232 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1278 + def type; end + end +end + +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#81 +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1295 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1297 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1378 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1304 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1319 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1314 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1324 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#1332 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1344 + sig { override.returns(String) } + def inspect; end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1341 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1362 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1372 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#14 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#17 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#23 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1390 +class Prism::BeginNode < ::Prism::Node + # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1392 + sig do + params( + source: Prism::Source, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1524 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1480 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1442 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1424 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1414 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode + # + # source://prism//lib/prism/node.rb#1429 + sig do + params( + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BeginNode) + end + def copy(begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#1437 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1461 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1485 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1467 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1464 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1490 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#79 + def newline!(lines); end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1458 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1455 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1508 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1518 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1539 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1541 + sig do + params( + source: Prism::Source, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, expression, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1633 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1549 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1554 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1566 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1559 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1571 + sig do + params( + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1554 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1579 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#1584 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1599 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1594 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1587 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1617 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1627 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1644 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1646 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } + def initialize(source, flags, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1733 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1654 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1659 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1669 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1664 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1674 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1659 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#1682 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1699 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1691 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1694 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1717 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1687 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1727 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1744 +class Prism::BlockNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1746 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1860 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1757 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#1799 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1762 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1821 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1809 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1775 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1767 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode + # + # source://prism//lib/prism/node.rb#1780 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1762 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1788 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1826 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1793 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1816 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1802 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#1796 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1844 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1854 + def type; end + end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#1876 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1878 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1992 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1888 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1903 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1898 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1908 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1916 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1958 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1925 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1928 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1953 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1941 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1948 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1976 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1921 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1986 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#2009 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#2011 + sig do + params( + source: Prism::Source, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2133 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2021 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2026 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2094 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2076 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2039 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2031 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#2044 + sig do + params( + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BlockParametersNode) + end + def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2026 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#2052 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2099 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[BlockLocalVariableNode] + # + # source://prism//lib/prism/node.rb#2060 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2089 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2063 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#2057 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2117 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2127 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2147 +class Prism::BreakNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#2149 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, arguments, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2247 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2157 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2195 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2174 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2167 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode + # + # source://prism//lib/prism/node.rb#2179 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#2187 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2213 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2208 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2201 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2231 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2241 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2258 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2260 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2428 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2274 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2369 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2379 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2317 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2279 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2292 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2284 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2297 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2279 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2305 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2374 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2394 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2384 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2330 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2389 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2349 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2343 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2314 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2359 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2412 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2356 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2364 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2346 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2310 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2422 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2460 +class Prism::CallNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2462 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2665 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2477 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2572 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2601 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#2588 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2611 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2530 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2482 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2626 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2575 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2496 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2487 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode + # + # source://prism//lib/prism/node.rb#2501 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::CallNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2482 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#2509 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # source://prism//lib/prism/node_ext.rb#315 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2606 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2631 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2616 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2546 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2543 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2621 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2559 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2527 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2591 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2649 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2596 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2514 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2659 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#19142 +module Prism::CallNodeFlags; end + +# a call that is an attribute write, so the value being written should be returned +# +# source://prism//lib/prism/node.rb#19150 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#19153 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#19144 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://prism//lib/prism/node.rb#19147 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2683 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2685 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2852 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2700 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2798 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2775 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2778 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2808 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2743 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2705 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2718 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2710 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2723 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOperatorWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2705 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2731 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2803 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2818 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2813 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2756 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#323 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#330 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2769 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2740 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2788 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2836 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2785 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2793 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2772 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2736 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2846 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2870 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2872 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3040 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2886 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2981 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2991 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2929 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2904 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2896 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2909 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2917 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2986 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3006 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2996 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2942 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3001 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2961 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2955 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2926 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2971 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3024 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2968 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2976 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2958 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2922 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3034 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#3065 +class Prism::CallTargetNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#3067 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3199 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3078 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3145 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#3155 + sig { returns(String) } + def call_operator; end + + # attr_reader call_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3118 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3083 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3093 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3088 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode + # + # source://prism//lib/prism/node.rb#3098 + sig do + params( + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3083 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3106 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3150 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3165 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#3160 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # source://prism//lib/prism/node.rb#3128 + sig { returns(Prism::Location) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3125 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#3115 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3135 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3183 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3140 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#3111 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3193 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3213 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#3215 + sig do + params( + source: Prism::Source, + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, target, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3309 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3224 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3229 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3239 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3234 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#3244 + sig do + params( + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3229 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3252 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3275 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3270 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3263 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: Prism::node + # + # source://prism//lib/prism/node.rb#3260 + sig { returns(Prism::Node) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3293 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3257 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3303 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3323 +class Prism::CaseMatchNode < ::Prism::Node + # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3325 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3440 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3336 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3396 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3382 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3341 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3355 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3346 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#3376 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3379 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3360 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3341 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3368 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3401 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3389 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3406 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3373 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3424 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3434 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3457 +class Prism::CaseNode < ::Prism::Node + # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3459 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3574 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3470 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3530 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3516 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3489 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#3510 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3513 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode + # + # source://prism//lib/prism/node.rb#3494 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3502 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3535 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3523 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3540 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3507 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3558 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3568 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3589 +class Prism::ClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3591 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3733 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3605 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#3671 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3610 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3684 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3645 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3624 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3615 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#3652 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode + # + # source://prism//lib/prism/node.rb#3629 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3610 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#3637 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3694 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3674 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3689 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3655 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3699 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3642 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3681 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Prism::node? + # + # source://prism//lib/prism/node.rb#3668 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3717 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3727 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3751 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3753 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3855 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3763 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3778 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3773 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3783 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#3791 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#127 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3821 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3796 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3799 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3816 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3806 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3839 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3813 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3849 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3868 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3870 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3971 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3881 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3934 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3924 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3886 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3896 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3891 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3901 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3886 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#3909 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#139 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3937 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3914 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3917 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#339 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#346 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3955 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3931 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3965 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3985 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3987 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4089 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4012 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4007 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4017 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4025 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#133 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4055 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4030 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4033 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4050 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4040 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4073 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4047 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4083 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#4102 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4104 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4185 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4111 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4116 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4126 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4121 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4131 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4116 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4139 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4151 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#4148 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4169 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4179 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#4195 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4197 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4274 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4204 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4209 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4219 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4214 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4224 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4209 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4232 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4240 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4237 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4258 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4268 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4284 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4286 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4404 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4296 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4301 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4311 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4306 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4316 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4301 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#4324 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4370 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # source://prism//lib/prism/node.rb#4333 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4339 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4365 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#4358 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4388 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#4352 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4398 + def type; end + end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#366 +class Prism::Comment + abstract! + + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#371 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#376 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#368 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#381 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_rest_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItLocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_shareable_constant_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4417 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4419 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4521 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4429 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4434 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4444 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4439 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4449 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4434 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4457 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#145 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4487 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4462 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4465 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4482 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4472 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4505 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4479 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4515 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4534 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4536 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4637 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4547 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4600 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4590 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4562 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4557 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4567 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4575 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#157 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4603 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4580 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4583 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#355 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#362 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4621 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4597 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4631 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4651 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4653 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4755 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4663 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4668 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4678 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4673 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4683 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4668 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4691 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#151 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4721 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4696 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4699 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4716 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4706 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4739 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4713 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4749 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4768 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4770 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4864 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4779 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4784 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4794 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4799 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4784 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4830 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4825 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4815 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4812 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4848 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4822 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4858 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4876 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4878 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5003 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4888 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#196 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4905 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4898 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#4910 + sig do + params( + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#4918 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4964 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#4944 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#189 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#167 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4969 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # source://prism//lib/prism/node.rb#4935 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#4957 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#4932 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4987 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4997 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#158 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# An error class raised when missing nodes are found while computing a +# constant path's full name. For example: +# Foo:: -> raises because the constant path is missing the last part +# +# source://prism//lib/prism/node_ext.rb#163 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5016 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5018 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, target, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5111 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5028 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5074 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5064 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5033 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5043 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5038 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5048 + sig do + params( + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5033 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5056 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5077 + sig { override.returns(String) } + def inspect; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#371 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#378 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5061 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5095 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5071 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5105 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5124 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5126 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5220 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5135 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5140 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5150 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5145 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5155 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5140 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#5163 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5186 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5181 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5171 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5168 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5204 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5178 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5214 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5232 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5234 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5338 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5244 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#232 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5249 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5261 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5254 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5266 + sig do + params( + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5249 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5274 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5299 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#5285 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#225 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#205 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5304 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#5282 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5292 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#5279 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5322 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5332 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5357 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5359 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5465 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5368 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5373 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5383 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5378 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5388 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5373 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#5396 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5431 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5426 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#5413 + sig { returns(Prism::Location) } + def operator_loc; end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#5407 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5449 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#5423 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5459 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#5477 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#5479 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5560 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5486 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5501 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5496 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#5506 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5514 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#133 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#128 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5526 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#5523 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5544 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5554 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#5570 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5572 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5649 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5579 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5594 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5589 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5599 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5607 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#246 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#241 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5615 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5612 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5633 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5643 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5659 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5661 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5779 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5671 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5676 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5686 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5681 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5691 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5676 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5699 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#146 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#141 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5745 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#5708 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#5714 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5740 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#5733 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5763 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#5727 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5773 + def type; end + end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.for("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# 1, +# Prism::Location.new(source, 1, 1), +# source +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1), +# source +# ) +# +# you could instead write: +# +# source = Prism::Source.for("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), +# Location(source, 0, 1), +# Location(source, 2, 1), +# source +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://prism//lib/prism/dsl.rb#42 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://prism//lib/prism/dsl.rb#51 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://prism//lib/prism/dsl.rb#56 + def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://prism//lib/prism/dsl.rb#61 + def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://prism//lib/prism/dsl.rb#66 + def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#71 + def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://prism//lib/prism/dsl.rb#76 + def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://prism//lib/prism/dsl.rb#81 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://prism//lib/prism/dsl.rb#86 + def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://prism//lib/prism/dsl.rb#91 + def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#96 + def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://prism//lib/prism/dsl.rb#101 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://prism//lib/prism/dsl.rb#106 + def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://prism//lib/prism/dsl.rb#111 + def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://prism//lib/prism/dsl.rb#116 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://prism//lib/prism/dsl.rb#121 + def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://prism//lib/prism/dsl.rb#126 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://prism//lib/prism/dsl.rb#131 + def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#136 + def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://prism//lib/prism/dsl.rb#141 + def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#146 + def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#151 + def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallTargetNode node + # + # source://prism//lib/prism/dsl.rb#156 + def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://prism//lib/prism/dsl.rb#161 + def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseMatchNode node + # + # source://prism//lib/prism/dsl.rb#166 + def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://prism//lib/prism/dsl.rb#171 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://prism//lib/prism/dsl.rb#176 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#181 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#186 + def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#191 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#196 + def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#201 + def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#206 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#211 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#216 + def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#221 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#226 + def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://prism//lib/prism/dsl.rb#231 + def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#236 + def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#241 + def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://prism//lib/prism/dsl.rb#246 + def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://prism//lib/prism/dsl.rb#251 + def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://prism//lib/prism/dsl.rb#256 + def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://prism//lib/prism/dsl.rb#261 + def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://prism//lib/prism/dsl.rb#266 + def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://prism//lib/prism/dsl.rb#271 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://prism//lib/prism/dsl.rb#276 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://prism//lib/prism/dsl.rb#281 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://prism//lib/prism/dsl.rb#286 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://prism//lib/prism/dsl.rb#291 + def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://prism//lib/prism/dsl.rb#296 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://prism//lib/prism/dsl.rb#301 + def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://prism//lib/prism/dsl.rb#306 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://prism//lib/prism/dsl.rb#311 + def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://prism//lib/prism/dsl.rb#316 + def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://prism//lib/prism/dsl.rb#321 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#326 + def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://prism//lib/prism/dsl.rb#331 + def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://prism//lib/prism/dsl.rb#336 + def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#341 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#346 + def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#351 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#356 + def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#361 + def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#366 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://prism//lib/prism/dsl.rb#371 + def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://prism//lib/prism/dsl.rb#376 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://prism//lib/prism/dsl.rb#381 + def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://prism//lib/prism/dsl.rb#386 + def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://prism//lib/prism/dsl.rb#391 + def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitRestNode node + # + # source://prism//lib/prism/dsl.rb#396 + def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://prism//lib/prism/dsl.rb#401 + def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#406 + def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#411 + def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#416 + def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexTargetNode node + # + # source://prism//lib/prism/dsl.rb#421 + def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#426 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#431 + def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#436 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#441 + def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#446 + def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#451 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://prism//lib/prism/dsl.rb#456 + def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#461 + def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#466 + def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://prism//lib/prism/dsl.rb#471 + def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://prism//lib/prism/dsl.rb#476 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://prism//lib/prism/dsl.rb#481 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ItLocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#486 + def ItLocalVariableReadNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ItParametersNode node + # + # source://prism//lib/prism/dsl.rb#491 + def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://prism//lib/prism/dsl.rb#496 + def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://prism//lib/prism/dsl.rb#501 + def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://prism//lib/prism/dsl.rb#506 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#511 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#516 + def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#521 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#526 + def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#531 + def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#536 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://prism//lib/prism/dsl.rb#46 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#541 + def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://prism//lib/prism/dsl.rb#546 + def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://prism//lib/prism/dsl.rb#551 + def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://prism//lib/prism/dsl.rb#556 + def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://prism//lib/prism/dsl.rb#561 + def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://prism//lib/prism/dsl.rb#566 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://prism//lib/prism/dsl.rb#571 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://prism//lib/prism/dsl.rb#576 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://prism//lib/prism/dsl.rb#581 + def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://prism//lib/prism/dsl.rb#586 + def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://prism//lib/prism/dsl.rb#591 + def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedParametersNode node + # + # source://prism//lib/prism/dsl.rb#596 + def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#601 + def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#606 + def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://prism//lib/prism/dsl.rb#611 + def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://prism//lib/prism/dsl.rb#616 + def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://prism//lib/prism/dsl.rb#621 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://prism//lib/prism/dsl.rb#626 + def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://prism//lib/prism/dsl.rb#631 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://prism//lib/prism/dsl.rb#636 + def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://prism//lib/prism/dsl.rb#641 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://prism//lib/prism/dsl.rb#646 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://prism//lib/prism/dsl.rb#651 + def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://prism//lib/prism/dsl.rb#656 + def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://prism//lib/prism/dsl.rb#661 + def RationalNode(flags, numerator, denominator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://prism//lib/prism/dsl.rb#666 + def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#671 + def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#676 + def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://prism//lib/prism/dsl.rb#681 + def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://prism//lib/prism/dsl.rb#686 + def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://prism//lib/prism/dsl.rb#691 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://prism//lib/prism/dsl.rb#696 + def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://prism//lib/prism/dsl.rb#701 + def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://prism//lib/prism/dsl.rb#706 + def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://prism//lib/prism/dsl.rb#711 + def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ShareableConstantNode node + # + # source://prism//lib/prism/dsl.rb#716 + def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://prism//lib/prism/dsl.rb#721 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://prism//lib/prism/dsl.rb#726 + def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://prism//lib/prism/dsl.rb#731 + def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://prism//lib/prism/dsl.rb#736 + def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://prism//lib/prism/dsl.rb#741 + def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://prism//lib/prism/dsl.rb#746 + def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://prism//lib/prism/dsl.rb#751 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://prism//lib/prism/dsl.rb#756 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://prism//lib/prism/dsl.rb#761 + def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://prism//lib/prism/dsl.rb#766 + def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://prism//lib/prism/dsl.rb#771 + def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://prism//lib/prism/dsl.rb#776 + def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://prism//lib/prism/dsl.rb#781 + def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://prism//lib/prism/dsl.rb#786 + def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://prism//lib/prism/dsl.rb#791 + def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://prism//lib/prism/dsl.rb#796 + def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://prism//lib/prism/dsl.rb#801 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5793 +class Prism::DefNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5795 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6008 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5813 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#5866 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5818 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5832 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5823 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::node?, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?, ?location: Location) -> DefNode + # + # source://prism//lib/prism/node.rb#5837 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::DefNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5818 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#5845 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5944 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5872 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5969 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5931 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#5964 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#5918 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5974 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5869 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5954 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5892 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5850 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5853 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#5949 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5879 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5863 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#5860 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5959 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5905 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5992 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6002 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6030 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#6032 + sig do + params( + source: Prism::Source, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6160 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6042 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6057 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6052 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode + # + # source://prism//lib/prism/node.rb#6062 + sig do + params( + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6070 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6126 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#6121 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6104 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6111 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6075 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6116 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6091 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6144 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6088 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6154 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#4 +class Prism::DesugarAndWriteNode + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#16 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#218 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#224 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#242 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#233 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#251 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#269 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#260 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#278 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#296 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#287 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#305 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#323 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#314 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#332 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#350 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#341 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#63 +class Prism::DesugarOperatorWriteNode + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#66 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#27 +class Prism::DesugarOrWriteDefinedNode + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode + # + # source://prism//lib/prism/desugar_compiler.rb#30 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#101 +class Prism::DesugarOrWriteNode + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#104 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#113 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#41 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#46 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#17 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#65 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#43 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#53 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#71 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#79 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#87 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#95 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#103 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#111 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#119 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#127 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#135 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#143 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#151 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#159 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#167 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#175 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#183 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#191 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#199 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#207 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#215 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#223 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#231 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#239 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#247 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#255 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#263 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#271 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#279 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#287 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#295 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#303 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#311 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#319 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#327 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#335 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#343 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#351 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#359 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#367 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#375 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#383 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#391 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#399 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#407 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#415 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#423 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#431 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#439 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#447 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#455 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#463 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#471 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#479 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#487 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#495 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#503 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#511 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#519 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#527 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#535 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#543 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#551 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#559 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#567 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#575 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#583 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#591 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#599 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#607 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#615 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#623 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#631 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#639 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#647 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#655 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#663 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#671 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#679 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#687 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#695 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#703 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#711 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#719 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#727 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#735 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#743 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#751 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#759 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#767 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#775 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#783 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#791 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#799 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#807 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#815 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#823 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#831 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#839 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#847 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#855 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#863 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#871 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#879 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#887 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#895 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#903 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#911 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#919 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#927 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#935 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#943 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#951 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#959 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#967 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#975 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#983 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#991 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#999 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1007 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1015 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1023 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1031 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1039 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1047 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1055 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1063 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1071 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1079 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1087 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1095 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1103 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1111 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1119 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1127 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1135 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1143 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1151 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1159 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1167 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1175 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1183 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1191 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1199 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1207 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1215 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1223 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1231 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1239 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1247 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1255 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1263 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1271 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1277 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1280 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1278 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1285 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1291 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1297 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1303 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1309 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1315 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1321 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1327 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1333 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1339 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1345 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1351 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1357 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1363 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1369 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1375 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1381 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1387 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1393 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1399 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1405 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1411 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1417 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1423 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1429 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1435 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1441 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1447 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1453 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1459 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1465 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1471 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1477 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1483 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1489 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1495 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1501 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1507 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1513 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1519 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1525 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1531 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1537 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1543 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1549 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1555 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1561 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1567 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1573 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1579 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1585 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1591 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1597 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1603 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1609 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1615 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1621 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1627 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1633 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1639 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1645 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1651 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1657 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1663 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1669 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1675 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1681 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1687 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1693 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1699 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1705 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1711 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1717 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1723 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1729 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1735 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1741 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1747 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1753 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1759 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1765 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1771 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1777 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1783 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1789 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1795 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1801 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1807 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1813 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1819 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1825 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1831 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1837 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1843 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1849 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1855 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1861 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1867 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1873 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1879 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1885 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1891 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1897 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1903 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1909 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1915 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1921 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1927 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1933 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1939 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1945 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1951 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1957 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1963 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1969 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1975 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1981 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1987 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1993 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1999 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2005 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2011 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2017 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2023 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2029 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2035 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2041 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2047 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2053 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2059 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2065 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2071 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2077 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2083 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2089 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2095 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2101 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2107 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2113 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2119 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2125 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2131 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2137 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2143 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2149 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2155 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2161 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2167 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2173 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2179 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2185 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#14 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#106 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#103 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#111 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#116 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#141 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#166 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#191 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#216 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#246 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#286 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#348 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#375 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#398 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#415 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#463 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#486 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#506 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#541 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#569 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#612 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#635 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#681 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#739 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#788 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#834 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#864 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#889 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#934 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#979 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1026 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1053 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1083 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1110 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1127 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1144 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1171 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1198 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1228 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1255 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1280 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1309 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1337 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1362 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1391 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1416 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1433 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1450 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1477 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1546 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1577 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1605 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1631 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1652 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1678 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1692 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1743 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1775 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1792 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1834 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1848 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1862 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1882 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1909 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1939 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1966 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1983 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2000 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2027 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2060 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2109 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2154 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2172 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2190 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2204 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2236 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2289 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2345 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2398 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2437 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2464 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2494 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2521 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2538 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2555 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2582 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2602 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2638 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2674 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2714 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2751 + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2784 + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2798 + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2812 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2842 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2870 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2908 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2938 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2971 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3001 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3021 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3041 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3071 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3100 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3125 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3150 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3181 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3195 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3231 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3287 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3350 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3373 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3387 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3407 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3424 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3441 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3468 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3498 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3523 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3607 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3633 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3660 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3681 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3710 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3739 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3760 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3792 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3815 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3829 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3858 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3881 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3901 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3926 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3979 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4007 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4021 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4047 + def visit_self_node(node); end + + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4061 + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4082 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4118 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4132 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4152 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4166 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4189 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4216 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4249 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4288 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4323 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4337 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4367 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4410 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4445 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4486 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4521 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4550 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4596 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4605 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4613 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4624 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4633 + def integer_base_flags_inspect(node); end + + # Inspect a node that has interpolated_string_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4644 + def interpolated_string_node_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4653 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4590 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4661 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4585 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4669 + def parameter_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4677 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4685 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has return_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4703 + def return_node_flags_inspect(node); end + + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4711 + def shareable_constant_node_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4721 + def string_flags_inspect(node); end + + # Inspect a node that has symbol_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4732 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#59 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#62 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#76 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#68 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#80 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#72 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#15 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#18 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#24 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#33 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#36 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#41 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#45 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6173 +class Prism::ElseNode < ::Prism::Node + # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#6175 + sig do + params( + source: Prism::Source, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6286 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6184 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6189 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6201 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6194 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode + # + # source://prism//lib/prism/node.rb#6206 + sig do + params( + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ElseNode) + end + def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6189 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#6214 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6242 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6219 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6247 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6229 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6226 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6270 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6280 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#403 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#410 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#405 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#6298 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6300 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, statements, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6405 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6309 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6314 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#6366 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#6354 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6326 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6319 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6331 + sig do + params( + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6314 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6339 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6371 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#6361 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#6344 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6351 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6389 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6399 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6417 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6419 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, operator_loc, variable, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6509 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6427 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6442 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6437 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6447 + sig do + params( + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).returns(Prism::EmbeddedVariableNode) + end + def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#6455 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6475 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6470 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6460 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6493 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#6467 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6503 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#19157 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19162 +Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19159 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#6524 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#6526 + sig do + params( + source: Prism::Source, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6631 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6535 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6540 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6552 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6545 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode + # + # source://prism//lib/prism/node.rb#6557 + sig do + params( + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6540 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6565 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6592 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6580 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6587 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6570 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6597 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6577 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6615 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6625 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6643 +class Prism::FalseNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#6645 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6718 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6651 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6656 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6666 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6661 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> FalseNode + # + # source://prism//lib/prism/node.rb#6671 + sig { params(location: Prism::Location).returns(Prism::FalseNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6656 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#6679 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6684 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6702 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6712 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6733 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#6735 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6867 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6747 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6752 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#6828 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#6810 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6767 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6757 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#6785 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#6772 + sig do + params( + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::FindPatternNode) + end + def copy(constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6752 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#6780 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6833 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#6788 + sig { returns(Prism::Node) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#6823 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#6797 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#6791 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#6794 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6851 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6861 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6883 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#6885 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6992 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6895 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6900 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6913 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6905 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#6918 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6900 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#6948 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6958 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # source://prism//lib/prism/node.rb#6935 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6953 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6941 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#6938 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6976 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#6931 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6986 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#7005 +class Prism::FloatNode < ::Prism::Node + # def initialize: (Float value, Location location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#7007 + sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } + def initialize(source, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7084 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7014 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7019 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7029 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7024 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Float, ?location: Location) -> FloatNode + # + # source://prism//lib/prism/node.rb#7034 + sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7019 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } + # + # source://prism//lib/prism/node.rb#7042 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7050 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7068 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#7047 + sig { returns(Float) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7078 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7094 +class Prism::ForNode < ::Prism::Node + # def initialize: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#7096 + sig do + params( + source: Prism::Source, + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7266 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7109 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7114 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # The collection to iterate over. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#7155 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7128 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7119 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode + # + # source://prism//lib/prism/node.rb#7133 + sig do + params( + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ForNode) + end + def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7114 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#7141 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7222 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ + # + # source://prism//lib/prism/node.rb#7189 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7227 + sig { returns(String) } + def end_keyword; end + + # The location of the `end` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#7205 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7212 + sig { returns(String) } + def for_keyword; end + + # The location of the `for` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#7169 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7217 + sig { returns(String) } + def in_keyword; end + + # The location of the `in` keyword. + # + # for i in a end + # ^^ + # + # source://prism//lib/prism/node.rb#7179 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # The index expression for `for` loops. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#7149 + sig { returns(Prism::Node) } + def index; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7232 + sig { override.returns(String) } + def inspect; end + + # Represents the body of statements to execute for each iteration of the loop. + # + # for i in a + # foo(i) + # ^^^^^^ + # end + # + # source://prism//lib/prism/node.rb#7163 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7250 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7260 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7284 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7286 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7359 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7292 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7307 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7302 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7312 + sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7320 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7325 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7343 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7353 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7369 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7371 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7444 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7377 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7382 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7392 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7387 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7397 + sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7382 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7405 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7410 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7428 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7438 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#7453 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (BlockNode? block, Location location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7455 + sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } + def initialize(source, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7534 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7462 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#7497 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7467 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7479 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7472 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7484 + sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } + def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7467 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } + # + # source://prism//lib/prism/node.rb#7492 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7500 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7518 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7528 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7544 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7546 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7648 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7556 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7561 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7571 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7566 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7576 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7561 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#7584 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#163 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7614 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7589 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7592 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7609 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7599 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7632 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7606 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7642 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7661 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7663 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7764 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7674 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#7727 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#7717 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7679 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7684 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7694 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7679 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#7702 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#175 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7730 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7707 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7710 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#387 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#394 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7748 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7724 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7758 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7778 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7780 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7882 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7790 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7795 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7805 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7800 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7810 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7795 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#7818 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#169 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7848 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7823 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7826 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7843 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7833 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7866 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7840 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7876 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#7895 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#7897 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7978 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7904 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7919 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7914 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#7924 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#7932 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7944 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#7941 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7962 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7972 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#7988 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7990 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8067 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8012 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8007 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8017 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#8025 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8033 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8030 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8051 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8061 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8077 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8079 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8197 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8089 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8104 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8099 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8109 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8117 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8163 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8126 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#8132 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8158 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8151 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8181 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#8145 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8191 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8210 +class Prism::HashNode < ::Prism::Node + # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#8212 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, elements, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8327 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8221 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8226 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8288 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8276 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8236 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8231 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode + # + # source://prism//lib/prism/node.rb#8241 + sig do + params( + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::HashNode) + end + def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8226 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8249 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#8270 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8293 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8283 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8257 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8311 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8321 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8343 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#8345 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8472 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8356 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#8433 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#8415 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8375 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8366 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#8393 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#8380 + sig do + params( + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::HashPatternNode) + end + def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8388 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode] + # + # source://prism//lib/prism/node.rb#8396 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8438 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#8428 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#8402 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#8399 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8456 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8466 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#49 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # @return [Boolean] + # + # source://prism//lib/prism/node_ext.rb#51 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8493 +class Prism::IfNode < ::Prism::Node + # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#8495 + sig do + params( + source: Prism::Source, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8687 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8507 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8512 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8526 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8517 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#8617 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode + # + # source://prism//lib/prism/node.rb#8531 + sig do + params( + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::IfNode) + end + def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8512 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8539 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8648 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#8625 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8638 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#8549 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8653 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#91 + def newline!(lines); end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # source://prism//lib/prism/node.rb#8573 + sig { returns(Prism::Node) } + def predicate; end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#8602 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8643 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#8582 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8671 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8681 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#8702 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#8704 + sig do + params( + source: Prism::Source, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).void + end + def initialize(source, numeric, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8781 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8711 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8716 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8726 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8721 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#8731 + sig do + params( + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).returns(Prism::ImaginaryNode) + end + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8716 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } + # + # source://prism//lib/prism/node.rb#8739 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8747 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # source://prism//lib/prism/node.rb#8744 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8765 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#101 + sig { returns(Complex) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8775 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#8797 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (Prism::node value, Location location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#8799 + sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } + def initialize(source, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8876 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8806 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8811 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8821 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8816 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#8826 + sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8811 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#8834 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8842 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8860 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8839 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8870 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#8895 +class Prism::ImplicitRestNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#8897 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8970 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8903 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8908 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8918 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8913 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#8923 + sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8908 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#8931 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8936 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8954 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8964 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8979 +class Prism::InNode < ::Prism::Node + # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#8981 + sig do + params( + source: Prism::Source, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, pattern, statements, in_loc, then_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9097 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8991 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8996 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9009 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9001 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode + # + # source://prism//lib/prism/node.rb#9014 + sig do + params( + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InNode) + end + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8996 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#9022 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#9053 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#9033 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9063 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#9027 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#9030 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#9058 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#9040 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9081 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9091 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9110 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9112 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9289 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9127 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9192 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9225 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9202 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9235 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9172 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9132 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9245 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9195 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9147 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9137 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9152 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9132 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9160 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9230 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9255 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9240 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9185 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9250 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9205 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9169 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9215 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9273 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9212 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9220 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9165 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9283 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9307 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9309 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9485 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9325 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9390 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9426 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#9403 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#9406 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9400 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9436 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9370 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9446 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9393 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9345 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9335 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9350 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9358 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9431 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9451 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9441 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9383 + sig { returns(Prism::Location) } + def opening_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#403 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#410 + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9367 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9416 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9469 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9413 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9421 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9363 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9479 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9504 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9506 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9683 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9521 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9586 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9619 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9596 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9629 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9566 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9526 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9639 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9589 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9541 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9531 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9546 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9526 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9554 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9624 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9649 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9634 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9579 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9644 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9599 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9563 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9609 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9667 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9606 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9614 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9559 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9677 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9709 +class Prism::IndexTargetNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#9711 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9851 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9774 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9797 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9784 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9812 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9777 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9742 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9733 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#9747 + sig do + params( + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::IndexTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#9755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9802 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9817 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9807 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9767 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#9764 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9787 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9835 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9792 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9760 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9845 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#388 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#396 + sig { returns(String) } + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#391 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# source://prism//lib/prism/inspect_visitor.rb#12 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # @return [InspectVisitor] a new instance of InspectVisitor + # + # source://prism//lib/prism/inspect_visitor.rb#35 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # source://prism//lib/prism/inspect_visitor.rb#32 + def commands; end + + # Compose the final string. + # + # source://prism//lib/prism/inspect_visitor.rb#48 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # source://prism//lib/prism/inspect_visitor.rb#28 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#77 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#87 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#97 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#107 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#117 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#133 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#151 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#188 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#198 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#210 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#216 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#247 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#259 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#267 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#287 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#301 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#323 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#335 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#355 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#385 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#406 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#426 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#438 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#448 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#476 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#504 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#528 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#538 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#549 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#559 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#565 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#571 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#581 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#591 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#602 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#612 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#622 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#640 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#651 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#661 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#679 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#689 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#695 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#701 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#711 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#743 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#753 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#766 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#779 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#787 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#800 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#805 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#831 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#851 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#857 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#876 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#881 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#886 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#897 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#907 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#918 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#928 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#934 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#940 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#950 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#966 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#994 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1016 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1023 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1030 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1035 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1050 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1081 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1113 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1144 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1167 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1177 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1188 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1198 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1204 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1210 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1220 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1228 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1246 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1264 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1282 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1298 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1314 + def visit_it_local_variable_read_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1319 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1324 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1340 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1354 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1375 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1386 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1398 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1409 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1416 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1423 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1434 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1445 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1455 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1465 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1481 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1486 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1503 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1534 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1568 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1580 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1585 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1592 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1598 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1604 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1615 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1627 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1637 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1696 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1709 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1719 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1727 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1741 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1755 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1763 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1783 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1792 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1797 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1808 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1817 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1825 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1835 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1869 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1883 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1888 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1902 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1907 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1916 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1933 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1938 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1946 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1951 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1963 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1977 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1988 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2008 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2019 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2024 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2039 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2061 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2078 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2100 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2117 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2128 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2150 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2144 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#41 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# source://prism//lib/prism/inspect_visitor.rb#17 +class Prism::InspectVisitor::Replace + # @return [Replace] a new instance of Replace + # + # source://prism//lib/prism/inspect_visitor.rb#20 + def initialize(value); end + + # source://prism//lib/prism/inspect_visitor.rb#18 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9866 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#9868 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9970 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9878 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9883 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9893 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9888 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#9898 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9883 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9906 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#181 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9936 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9911 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#9914 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9931 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9921 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9954 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9928 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9964 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9983 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9985 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10086 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9996 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10049 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10039 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10001 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10011 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10006 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10016 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10001 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10024 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#193 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10052 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10029 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10032 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#419 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#426 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10070 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10046 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10080 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10100 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10102 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10204 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10112 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10117 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10127 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10122 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10132 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10117 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#10140 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#187 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10170 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10145 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10148 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10165 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10155 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10188 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10162 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10198 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#10217 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10219 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10300 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10226 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10231 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10241 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10236 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10246 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10231 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10254 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10266 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#10263 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10284 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10294 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#10310 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10312 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10389 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10319 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10334 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10329 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10339 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10347 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10355 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10352 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10373 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10383 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10399 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10401 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10411 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10416 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10426 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10421 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10431 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10416 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10439 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10485 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#10448 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#10454 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10480 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#10473 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10503 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#10467 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10513 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#19166 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#19168 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#19171 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#19177 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#19174 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#10532 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (Integer flags, Integer value, Location location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#10534 + sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } + def initialize(source, flags, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10636 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10542 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10582 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10547 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10557 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10552 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode + # + # source://prism//lib/prism/node.rb#10562 + sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } + def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10587 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10547 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10570 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10597 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10602 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10592 + sig { returns(T::Boolean) } + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10620 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#10579 + sig { returns(Integer) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10575 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10630 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10647 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10649 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10812 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10659 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10738 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10664 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10773 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10706 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10674 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10669 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10679 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10664 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10687 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10733 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10718 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10758 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10763 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10753 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10713 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10778 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10723 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#121 + def newline!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10728 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10768 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10696 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#10703 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10796 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10748 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10743 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10692 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10806 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10826 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#10828 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10991 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10838 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10917 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10843 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10952 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10885 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10853 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10848 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#10858 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10843 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10866 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10912 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10897 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10937 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10942 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10932 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10892 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10957 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10902 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#128 + def newline!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10907 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10947 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10875 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#10882 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10975 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10927 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10922 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10871 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10985 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11005 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11007 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11137 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11017 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11022 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11098 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11070 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11032 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11027 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11037 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11022 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11045 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11083 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11103 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11088 + sig { returns(T::Boolean) } + def mutable?; end + + # source://prism//lib/prism/parse_result/newlines.rb#135 + def newline!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11093 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11054 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] + # + # source://prism//lib/prism/node.rb#11067 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) + end + def parts; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11121 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11050 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11131 + def type; end + end +end + +# Flags for interpolated string nodes that indicated mutability if they are also marked as literals. +# +# source://prism//lib/prism/node.rb#19181 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#19183 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19186 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11151 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11153 + sig do + params( + source: Prism::Source, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11268 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11162 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11167 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11229 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11211 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11177 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11172 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11182 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11167 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11190 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11234 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#142 + def newline!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11224 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11195 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11208 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11252 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11262 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11281 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11283 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11386 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11292 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11347 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11335 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11307 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11302 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11312 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11320 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11352 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#149 + def newline!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11342 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11325 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11332 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11370 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11380 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# source://prism//lib/prism/node.rb#11399 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#11401 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11474 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11407 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11422 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11417 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#11427 + sig { params(location: Prism::Location).returns(Prism::ItLocalVariableReadNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#11435 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11440 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11458 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11468 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11483 +class Prism::ItParametersNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#11485 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11558 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11491 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11496 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11506 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11501 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#11511 + sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11496 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#11519 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11524 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11542 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11552 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#11567 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#11569 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).void + end + def initialize(source, flags, elements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11656 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11577 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11592 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11587 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#11597 + sig do + params( + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).returns(Prism::KeywordHashNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } + # + # source://prism//lib/prism/node.rb#11605 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode | AssocSplatNode] + # + # source://prism//lib/prism/node.rb#11614 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11622 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11617 + sig { returns(T::Boolean) } + def symbol_keys?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11640 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11610 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11650 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#19190 +module Prism::KeywordHashNodeFlags; end + +# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments +# +# source://prism//lib/prism/node.rb#19192 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#11669 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11671 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11785 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11681 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11686 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11696 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11691 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11701 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11686 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11709 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11751 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#11718 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#11721 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11746 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11734 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11741 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11769 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11714 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11779 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11798 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#11800 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11927 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11812 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#11875 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11817 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11888 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11865 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11830 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11822 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode + # + # source://prism//lib/prism/node.rb#11835 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::LambdaNode) + end + def copy(locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11817 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#11843 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11893 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11848 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11883 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11858 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11878 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11851 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#11872 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11911 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11921 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#619 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#617 + def options; end + + # source://prism//lib/prism/lex_compat.rb#624 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#617 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#230 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#231 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#291 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#603 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#315 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#318 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#323 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#316 + def split; end + + # source://prism//lib/prism/lex_compat.rb#327 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#316 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#374 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#379 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#390 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#377 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#427 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#377 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#375 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#296 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#299 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#303 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#307 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#297 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#248 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#249 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#238 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#239 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#259 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#260 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#279 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#280 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#33 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#14 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#19 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#25 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#16 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#204 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#213 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#208 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#223 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#218 + def value; end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#610 +class Prism::LexResult < ::Prism::Result + # Create a new lex result object with the given values. + # + # @return [LexResult] a new instance of LexResult + # + # source://prism//lib/prism/parse_result.rb#615 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # source://prism//lib/prism/parse_result.rb#621 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The list of tokens that were parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#612 + sig { returns(T::Array[T.untyped]) } + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://prism//lib/prism/lex_compat.rb#872 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#875 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#879 + def result; end + + # source://prism//lib/prism/lex_compat.rb#873 + def source; end + + private + + # source://prism//lib/prism/lex_compat.rb#913 + def lex(source); end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11943 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#11945 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11956 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11961 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11971 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11966 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#11976 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11961 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#11984 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12009 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#199 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12017 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12006 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#11989 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12012 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11996 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12035 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12003 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12045 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12065 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12067 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12172 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12079 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#12132 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#12119 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12084 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12094 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12089 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12099 + sig do + params( + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12084 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12107 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12135 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#211 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12138 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12129 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12112 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#435 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#442 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12156 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12126 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12166 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12187 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12189 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12200 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12205 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12215 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12210 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12220 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12205 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12228 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12253 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#205 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12261 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12250 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12233 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12256 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12240 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12279 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12247 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12289 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#12309 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12311 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(source, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12406 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12319 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12334 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12329 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12339 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12347 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#12369 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12372 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # source://prism//lib/prism/node.rb#12360 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12390 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12400 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#12417 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12419 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(source, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12500 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12427 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12442 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12437 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12447 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12455 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12463 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12466 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12460 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12484 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12494 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#12511 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12513 + sig do + params( + source: Prism::Source, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, depth, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12645 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12524 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12529 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12539 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12534 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12544 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12529 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12552 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#12570 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12611 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#12561 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#12576 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12606 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#12599 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12629 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#12593 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12639 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#156 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#171 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # source://prism//lib/prism/parse_result.rb#335 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # source://prism//lib/prism/parse_result.rb#354 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # Returns a new location that is the result of chopping off the last byte. + # + # source://prism//lib/prism/parse_result.rb#217 + sig { returns(Prism::Location) } + def chop; end + + # Returns all comments that are associated with this location (both leading + # and trailing comments). + # + # source://prism//lib/prism/parse_result.rb#207 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#325 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#314 + sig { returns(Integer) } + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # source://prism//lib/prism/parse_result.rb#263 + sig { returns(Integer) } + def end_character_offset; end + + # The column number in code units of the given encoding where this location + # ends from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#320 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#268 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#308 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#284 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://prism//lib/prism/parse_result.rb#257 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#222 + sig { returns(String) } + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://prism//lib/prism/parse_result.rb#344 + sig { params(other: Prism::Location).returns(Prism::Location) } + def join(other); end + + # Attach a comment to the leading comments of this location. + # + # source://prism//lib/prism/parse_result.rb#190 + sig { params(comment: Prism::Comment).void } + def leading_comment(comment); end + + # These are the comments that are associated with this location that exist + # before the start of this location. + # + # source://prism//lib/prism/parse_result.rb#185 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#167 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#330 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#232 + sig { returns(String) } + def slice; end + + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # source://prism//lib/prism/parse_result.rb#239 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#227 + sig { returns(T::Array[String]) } + def source_lines; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#296 + sig { returns(Integer) } + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#247 + sig { returns(Integer) } + def start_character_offset; end + + # The column number in code units of the given encoding where this location + # starts from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#302 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#252 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#290 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#273 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://prism//lib/prism/parse_result.rb#278 + sig { returns(String) } + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#164 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#201 + sig { params(comment: Prism::Comment).void } + def trailing_comment(comment); end + + # These are the comments that are associated with this location that exist + # after the end of this location. + # + # source://prism//lib/prism/parse_result.rb#196 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # source://prism//lib/prism/parse_result.rb#159 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#19196 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://prism//lib/prism/node.rb#19198 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#416 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#424 + sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#440 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#445 + sig { returns(String) } + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#430 + sig { returns(String) } + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#418 + sig { returns(Prism::Location) } + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#435 + sig { returns(String) } + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#421 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12659 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12661 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12837 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12672 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12758 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12798 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12723 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12687 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12682 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#12793 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#12716 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12692 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::MatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#12700 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12753 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12738 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12778 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12783 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12773 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12733 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12803 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12743 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12748 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12788 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12709 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12821 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#12730 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12768 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12763 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#12705 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12831 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12851 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12853 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, pattern, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12947 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12862 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12867 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12877 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12872 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12882 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12867 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12890 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12913 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12908 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12901 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#12898 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12931 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12895 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12941 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12959 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#12961 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, pattern, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13055 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12970 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12985 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12980 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#12990 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12998 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13021 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13016 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13009 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#13006 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13039 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13003 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13049 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13067 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#13069 + sig do + params( + source: Prism::Source, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).void + end + def initialize(source, call, targets, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13150 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13077 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#13110 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13082 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13092 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13087 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#13097 + sig do + params( + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).returns(Prism::MatchWriteNode) + end + def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13082 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } + # + # source://prism//lib/prism/node.rb#13105 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13116 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # source://prism//lib/prism/node.rb#13113 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13134 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13144 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax error. +# +# source://prism//lib/prism/node.rb#13159 +class Prism::MissingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#13161 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13234 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13167 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13172 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13182 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13177 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> MissingNode + # + # source://prism//lib/prism/node.rb#13187 + sig { params(location: Prism::Location).returns(Prism::MissingNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13172 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13195 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13200 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13218 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13228 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13243 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#13245 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13363 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13257 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#13306 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13262 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13275 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13267 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#13303 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode + # + # source://prism//lib/prism/node.rb#13280 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ModuleNode) + end + def copy(locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13262 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#13288 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13324 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13309 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13329 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13293 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13319 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13296 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13316 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13347 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13357 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13379 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#13381 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13508 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13392 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13397 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13411 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13402 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#13416 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::MultiTargetNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13397 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#13424 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13474 + sig { override.returns(String) } + def inspect; end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] + # + # source://prism//lib/prism/node.rb#13429 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13464 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13438 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#13432 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] + # + # source://prism//lib/prism/node.rb#13435 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13469 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13451 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13492 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13502 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13524 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#13526 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13671 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13539 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13559 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13549 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#13564 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::MultiWriteNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#13572 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13637 + sig { override.returns(String) } + def inspect; end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#13577 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13622 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13586 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13632 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13612 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#13580 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#13583 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13627 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13599 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13655 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13619 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13665 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#13 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#15 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#20 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#25 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#30 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#35 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#40 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#45 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#50 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#55 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#60 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#65 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#70 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#75 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#80 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#85 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#90 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#95 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#100 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#105 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#110 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#115 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#120 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#125 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#130 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#135 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#140 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#145 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#150 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#155 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#160 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#165 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#170 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#175 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#180 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#185 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#190 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#195 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#200 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#205 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#210 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#215 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#220 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#225 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#230 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#235 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#240 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#245 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#250 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#255 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#260 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#265 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#270 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#275 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#280 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#285 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#290 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#295 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#300 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#305 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#310 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#315 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#320 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#325 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#330 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#335 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#340 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#345 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#350 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#355 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#360 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#365 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#370 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#375 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#380 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#385 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#390 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#395 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#400 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#405 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#410 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#415 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#420 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#425 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#430 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#435 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#440 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#445 + def visit_interpolated_x_string_node(node); end + + # Copy a ItLocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#450 + def visit_it_local_variable_read_node(node); end + + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#455 + def visit_it_parameters_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#460 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#465 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#470 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#475 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#480 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#485 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#490 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#495 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#500 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#505 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#510 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#515 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#520 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#525 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#530 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#535 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#540 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#545 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#550 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#555 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#560 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#565 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#570 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#575 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#580 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#585 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#590 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#595 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#600 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#605 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#610 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#615 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#620 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#625 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#630 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#635 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#640 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#645 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#650 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#655 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#660 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#665 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#670 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#675 + def visit_self_node(node); end + + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#680 + def visit_shareable_constant_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#685 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#690 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#695 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#700 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#705 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#710 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#715 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#720 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#725 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#730 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#735 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#740 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#745 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#750 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#755 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#760 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#765 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13689 +class Prism::NextNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#13691 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, arguments, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13783 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13699 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#13734 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13704 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13716 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13709 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode + # + # source://prism//lib/prism/node.rb#13721 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NextNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13704 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13729 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13749 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13744 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13737 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13767 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13777 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#13794 +class Prism::NilNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#13796 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13869 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13802 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13807 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13817 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13812 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> NilNode + # + # source://prism//lib/prism/node.rb#13822 + sig { params(location: Prism::Location).returns(Prism::NilNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13807 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13830 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13835 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13853 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13863 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#13879 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#13881 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, operator_loc, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13980 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13889 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13904 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13899 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#13909 + sig do + params( + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13917 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13946 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13941 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13929 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13936 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13922 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13964 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13974 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#12 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#131 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#137 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#151 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#145 + sig { abstract.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#137 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # source://prism//lib/prism/node_ext.rb#7 + def deprecated(*replacements); end + + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#34 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns a string representation of the node. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#162 + sig { abstract.returns(String) } + def inspect; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#19 + sig { returns(Prism::Location) } + def location; end + + # source://prism//lib/prism/parse_result/newlines.rb#69 + def newline!(lines); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/newlines.rb#65 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#62 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # Returns all of the lines of the source code associated with this node. + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # source://prism//lib/prism/node.rb#40 + sig { returns(T::Array[String]) } + def script_lines; end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#49 + sig { returns(String) } + def slice; end + + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # source://prism//lib/prism/node.rb#56 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # source://prism//lib/prism/node.rb#40 + sig { returns(T::Array[String]) } + def source_lines; end + + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#27 + sig { returns(Integer) } + def start_offset; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#70 + sig { returns(String) } + def to_dot; end + + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # source://prism//lib/prism/node.rb#81 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + + # Returns a symbol symbolizing the type of node that this represents. This + # is particularly useful for case statements and array comparisons. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#157 + sig { abstract.returns(Symbol) } + def type; end + + private + + # A pointer to the source that this node was created from. + # + # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Source) } + def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#115 + def fields; end + + # Returns the type of the node as a symbol. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#167 + def type; end + end +end + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13991 +class Prism::NumberedParametersNode < ::Prism::Node + # def initialize: (Integer maximum, Location location) -> void + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#13993 + sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } + def initialize(source, maximum, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14070 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14000 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14010 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14020 + sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } + def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14036 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#14033 + sig { returns(Integer) } + def maximum; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14054 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14064 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#14080 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (Integer number, Location location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14082 + sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } + def initialize(source, number, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14165 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14089 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14104 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14099 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14109 + sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } + def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14117 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14131 + sig { override.returns(String) } + def inspect; end + + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # source://prism//lib/prism/node.rb#14128 + sig { returns(Integer) } + def number; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14149 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14159 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#14176 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14178 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14277 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14188 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14193 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14203 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14198 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14208 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14193 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#14216 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14243 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14225 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14228 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14238 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14261 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14235 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14221 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14271 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14291 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14293 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14405 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14304 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14319 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14314 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14324 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#14332 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14371 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14341 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14344 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14366 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14351 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14361 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14389 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14358 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14337 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14399 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14419 +class Prism::OrNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#14421 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14530 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14430 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14435 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14445 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14440 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode + # + # source://prism//lib/prism/node.rb#14450 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::OrNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14435 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14458 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14496 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#14469 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14491 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#14484 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#14478 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14514 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14524 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#6 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#60 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#89 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#131 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#77 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#86 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#83 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#74 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#80 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#68 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#71 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#65 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#62 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#102 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#111 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#118 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#198 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#206 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#212 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#200 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#203 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#19202 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#19204 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14543 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#14545 + sig do + params( + source: Prism::Source, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).void + end + def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14654 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14558 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#14617 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14563 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14581 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14568 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode + # + # source://prism//lib/prism/node.rb#14586 + sig do + params( + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).returns(Prism::ParametersNode) + end + def copy(requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14563 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location } + # + # source://prism//lib/prism/node.rb#14594 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14620 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#14614 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#14611 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#14602 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # source://prism//lib/prism/node.rb#14608 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#14599 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#14605 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#253 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } + def signature; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14638 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14648 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14674 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#14676 + sig do + params( + source: Prism::Source, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, body, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14781 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14685 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#14720 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14690 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#14742 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#14730 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14702 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14695 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#14707 + sig do + params( + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14690 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14715 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14747 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#85 + def newline!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#14737 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#14723 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14765 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14775 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#451 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#466 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#474 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#479 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#463 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#460 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#457 + sig { returns(String) } + def message; end + + # The type of error. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#454 + sig { returns(Symbol) } + def type; end +end + +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#627 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. + # + # @return [ParseLexResult] a new instance of ParseLexResult + # + # source://prism//lib/prism/parse_result.rb#633 + sig do + params( + value: [Prism::ProgramNode, T::Array[T.untyped]], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for ParseLexResult. + # + # source://prism//lib/prism/parse_result.rb#639 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A tuple of the syntax tree and the list of tokens that were parsed from + # the source code. + # + # source://prism//lib/prism/parse_result.rb#630 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#576 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#587 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result.rb#598 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#593 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Walk the tree and mark nodes that are on a new line, loosely emulating + # the behavior of CRuby's `:line` tracepoint event. + # + # source://prism//lib/prism/parse_result.rb#604 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#584 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#86 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#92 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#82 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#119 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#53 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#56 + def initialize(location); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#68 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#64 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#72 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#54 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#76 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#46 + def trailing_comment(comment); end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# This file is autoloaded only when `mark_newlines!` is called, so the +# re-opening of the various nodes in this file will only be performed in +# that case. We do that to avoid storing the extra `@newline` instance +# variable on every node if we don't need it. +# +# source://prism//lib/prism/parse_result/newlines.rb#25 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def initialize(lines); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#33 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#47 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#33 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#55 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#47 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#485 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#500 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#508 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#513 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#497 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#494 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#491 + sig { returns(String) } + def message; end + + # The type of warning. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#488 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#86 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#102 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#108 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#143 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#118 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # source://prism//lib/prism/pattern.rb#168 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#148 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#163 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#113 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#184 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#214 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#243 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#219 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#227 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#235 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#14793 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14795 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14911 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14820 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14815 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14825 + sig do + params( + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14838 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14877 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#14867 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#14848 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14862 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14841 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#14872 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#14855 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14895 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14905 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#14924 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#14926 + sig do + params( + source: Prism::Source, + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, variable, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15016 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14934 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14939 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14949 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14944 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#14954 + sig do + params( + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14939 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14962 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14982 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14977 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14970 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15000 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#14967 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15010 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15027 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#15029 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15147 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15039 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15044 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15108 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15091 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15056 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15049 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#15061 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15044 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15069 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15113 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15098 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15077 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15103 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15084 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15074 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15131 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15141 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15160 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#15162 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15280 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15172 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15177 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15241 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15224 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15189 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15182 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#15194 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15177 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15202 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15246 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15231 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15210 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15236 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15217 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15207 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15264 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15274 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#15290 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#15292 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).void + end + def initialize(source, locals, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15373 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15300 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15315 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15310 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode + # + # source://prism//lib/prism/node.rb#15320 + sig do + params( + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).returns(Prism::ProgramNode) + end + def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } + # + # source://prism//lib/prism/node.rb#15328 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15339 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#15333 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#15336 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15357 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15367 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#19208 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#19210 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15388 +class Prism::RangeNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#15390 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15510 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15400 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15405 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15418 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15410 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode + # + # source://prism//lib/prism/node.rb#15423 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15405 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15431 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15466 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15476 + sig { override.returns(String) } + def inspect; end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # source://prism//lib/prism/node.rb#15446 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15471 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#15459 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#15456 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15494 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15436 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15504 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#15523 +class Prism::RationalNode < ::Prism::Node + # def initialize: (Integer flags, Integer numerator, Integer denominator, Location location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#15525 + sig do + params( + source: Prism::Source, + flags: Integer, + numerator: Integer, + denominator: Integer, + location: Prism::Location + ).void + end + def initialize(source, flags, numerator, denominator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15635 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15534 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15581 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15539 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15549 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15544 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?numerator: Integer, ?denominator: Integer, ?location: Location) -> RationalNode + # + # source://prism//lib/prism/node.rb#15554 + sig do + params( + flags: Integer, + numerator: Integer, + denominator: Integer, + location: Prism::Location + ).returns(Prism::RationalNode) + end + def copy(flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15586 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15539 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, numerator: Integer, denominator: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15562 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The denominator of the rational number. + # + # 1.5r # denominator 2 + # + # source://prism//lib/prism/node.rb#15578 + sig { returns(Integer) } + def denominator; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15596 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15601 + sig { override.returns(String) } + def inspect; end + + # The numerator of the rational number. + # + # 1.5r # numerator 3 + # + # source://prism//lib/prism/node.rb#15573 + sig { returns(Integer) } + def numerator; end + + # Returns the value of the node as an IntegerNode or a FloatNode. This + # method is deprecated in favor of #value or #numerator/#denominator. + # + # source://prism//lib/prism/node_ext.rb#114 + def numeric; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15591 + sig { returns(T::Boolean) } + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15619 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#108 + sig { returns(Rational) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15567 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15629 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#15647 +class Prism::RedoNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#15649 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15722 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15655 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15660 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15670 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15665 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RedoNode + # + # source://prism//lib/prism/node.rb#15675 + sig { params(location: Prism::Location).returns(Prism::RedoNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15660 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#15683 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15688 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15706 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15716 + def type; end + end +end + +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# source://prism//lib/prism/reflection.rb#13 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # source://prism//lib/prism/reflection.rb#104 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#45 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# source://prism//lib/prism/reflection.rb#55 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# source://prism//lib/prism/reflection.rb#16 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/reflection.rb#21 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # source://prism//lib/prism/reflection.rb#18 + sig { returns(Symbol) } + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# source://prism//lib/prism/reflection.rb#92 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # @return [FlagsField] a new instance of FlagsField + # + # source://prism//lib/prism/reflection.rb#97 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # source://prism//lib/prism/reflection.rb#94 + sig { returns(T::Array[Symbol]) } + def flags; end +end + +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#85 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#79 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# source://prism//lib/prism/reflection.rb#67 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# source://prism//lib/prism/reflection.rb#28 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# source://prism//lib/prism/reflection.rb#39 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#50 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#73 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#34 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# source://prism//lib/prism/reflection.rb#61 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#19214 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#19231 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#19228 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://prism//lib/prism/node.rb#19219 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19243 +Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19246 +Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19240 +Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#19216 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://prism//lib/prism/node.rb#19222 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://prism//lib/prism/node.rb#19225 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#19237 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#19234 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#15731 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15733 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15909 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15744 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15830 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15870 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15795 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15759 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15754 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15865 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15788 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15764 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::RegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#15772 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15825 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15810 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15850 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15855 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15845 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15805 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15875 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15815 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15820 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15860 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15781 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15893 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15802 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15840 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15835 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15777 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15903 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#20 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#23 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#15924 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#15926 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16021 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15935 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15940 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15950 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15945 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#15955 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15940 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15963 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15987 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#15972 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#15975 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15982 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16005 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15968 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16015 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#16034 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16036 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } + def initialize(source, flags, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16044 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16049 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16059 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16054 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16064 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16049 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#16072 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16089 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16081 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16084 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16107 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16077 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16117 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16134 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#16136 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, expression, keyword_loc, rescue_expression, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16230 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16145 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16150 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16160 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16155 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#16165 + sig do + params( + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).returns(Prism::RescueModifierNode) + end + def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16150 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#16173 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#16178 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16196 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16191 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16181 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#115 + def newline!(lines); end + + # attr_reader rescue_expression: Prism::node + # + # source://prism//lib/prism/node.rb#16188 + sig { returns(Prism::Node) } + def rescue_expression; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16214 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16224 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# +# source://prism//lib/prism/node.rb#16247 +class Prism::RescueNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#16249 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16375 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16261 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16266 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16281 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16271 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#16328 + sig { returns(T.nilable(Prism::RescueNode)) } + def consequent; end + + # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode + # + # source://prism//lib/prism/node.rb#16286 + sig do + params( + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).returns(Prism::RescueNode) + end + def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16266 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16294 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#16306 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16341 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16331 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16299 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#16336 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#16309 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: Prism::node? + # + # source://prism//lib/prism/node.rb#16322 + sig { returns(T.nilable(Prism::Node)) } + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16325 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16359 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16369 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#16392 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#16394 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16508 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16419 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16414 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#16424 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#16432 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16474 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#16441 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#16444 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#16469 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#16457 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16464 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16492 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16437 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16502 + def type; end + end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# source://prism//lib/prism/parse_result.rb#521 +class Prism::Result + # Create a new result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/parse_result.rb#543 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#523 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # source://prism//lib/prism/parse_result.rb#531 + sig { returns(T.nilable(Prism::Location)) } + def data_loc; end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/parse_result.rb#553 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns the encoding of the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#558 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#534 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#570 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#526 + sig { returns(T::Array[Prism::MagicComment]) } + def magic_comments; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#540 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#564 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#537 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16521 +class Prism::RetryNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#16523 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16596 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16529 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16534 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16544 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16539 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RetryNode + # + # source://prism//lib/prism/node.rb#16549 + sig { params(location: Prism::Location).returns(Prism::RetryNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16534 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16557 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16562 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16580 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16590 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16605 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#16607 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, arguments, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16709 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16616 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16662 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16621 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16633 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16626 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # + # source://prism//lib/prism/node.rb#16638 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).returns(Prism::ReturnNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16621 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16646 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16675 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16670 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16655 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def redundant?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16665 + sig { returns(T::Boolean) } + def redundant?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16693 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16651 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16703 + def type; end + end +end + +# Flags for return nodes. +# +# source://prism//lib/prism/node.rb#19250 +module Prism::ReturnNodeFlags; end + +# a return statement that is redundant because it is the last statement in a method +# +# source://prism//lib/prism/node.rb#19252 +Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#16721 +class Prism::SelfNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#16723 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16796 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16729 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16734 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16744 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16739 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SelfNode + # + # source://prism//lib/prism/node.rb#16749 + sig { params(location: Prism::Location).returns(Prism::SelfNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16734 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16757 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16762 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16780 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16790 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#14 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#28 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#40 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#44 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#80 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#77 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#77 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#76 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#76 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#76 + def io; end + + # source://prism//lib/prism/serialize.rb#118 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#104 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#95 + def load_header; end + + # source://prism//lib/prism/serialize.rb#114 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#438 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#472 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#486 + def load_result; end + + # source://prism//lib/prism/serialize.rb#110 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#447 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#460 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#76 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#77 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#78 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#572 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#525 + def load_double; end + + # source://prism//lib/prism/serialize.rb#540 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#602 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#514 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#556 + def load_location; end + + # source://prism//lib/prism/serialize.rb#560 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#631 + def load_node; end + + # source://prism//lib/prism/serialize.rb#597 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#564 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#568 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#533 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#593 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#544 + def load_string; end + + # source://prism//lib/prism/serialize.rb#529 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#509 + def load_varsint; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://prism//lib/prism/serialize.rb#495 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#617 + def load_warning_level; end +end + +# source://prism//lib/prism/serialize.rb#127 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# source://prism//lib/prism/serialize.rb#72 +Prism::Serialize::Loader::FastStringIO = StringIO + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#17 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#21 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1863 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16806 +class Prism::ShareableConstantNode < ::Prism::Node + # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # source://prism//lib/prism/node.rb#16808 + sig do + params( + source: Prism::Source, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).void + end + def initialize(source, flags, write, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16905 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16816 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16821 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16831 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16826 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode + # + # source://prism//lib/prism/node.rb#16836 + sig do + params( + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).returns(Prism::ShareableConstantNode) + end + def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16821 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } + # + # source://prism//lib/prism/node.rb#16844 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def experimental_copy?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16866 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16861 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16871 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16856 + sig { returns(T::Boolean) } + def literal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16889 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#16853 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16849 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16899 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#19256 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#19264 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value experimental everything +# +# source://prism//lib/prism/node.rb#19261 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value literal +# +# source://prism//lib/prism/node.rb#19258 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16916 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#16918 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17045 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16930 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#16986 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16935 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#16996 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16969 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16948 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16940 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#16953 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16935 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#16961 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17006 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16989 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#16983 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17011 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#16966 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17001 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#16976 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17029 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17039 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#26 + sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#78 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#73 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#95 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#88 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#68 + sig { params(byte_offset: Integer).returns(Integer) } + def column(byte_offset); end + + # Returns the encoding of the source code, which is set by parameters to the + # parser or by the encoding magic comment. + # + # source://prism//lib/prism/parse_result.rb#34 + sig { returns(Encoding) } + def encoding; end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#51 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#63 + def line_end(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#57 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # Returns the lines of the source code as an array of strings. + # + # source://prism//lib/prism/parse_result.rb#39 + sig { returns(T::Array[String]) } + def lines; end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#23 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#45 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#17 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#20 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#103 + def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # source://prism//lib/prism/parse_result.rb#12 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17061 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17063 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17136 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17069 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17079 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17089 + sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17102 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17120 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17130 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17145 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (Integer flags, String filepath, Location location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#17147 + sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } + def initialize(source, flags, filepath, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17249 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17155 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17170 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17165 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#17175 + sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } + def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } + # + # source://prism//lib/prism/node.rb#17183 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # source://prism//lib/prism/node.rb#17192 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17200 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17195 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17205 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17215 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17210 + sig { returns(T::Boolean) } + def mutable?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17233 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17188 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17243 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17260 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#17262 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17335 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17268 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17283 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17278 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#17288 + sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17296 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17301 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17319 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17329 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#17344 +class Prism::SplatNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#17346 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, operator_loc, expression, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17438 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17354 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17359 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17371 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17364 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode + # + # source://prism//lib/prism/node.rb#17376 + sig do + params( + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SplatNode) + end + def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17359 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#17384 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#17396 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17404 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17399 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17389 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17422 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17432 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17449 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (Array[Prism::node] body, Location location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#17451 + sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } + def initialize(source, body, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17528 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17458 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#17491 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17473 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17468 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode + # + # source://prism//lib/prism/node.rb#17478 + sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } + def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } + # + # source://prism//lib/prism/node.rb#17486 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17494 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17512 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17522 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#19268 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19273 +Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19270 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19276 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19279 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#17545 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#17547 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17700 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17558 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17563 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#17661 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#17615 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17568 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#17656 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#17608 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode + # + # source://prism//lib/prism/node.rb#17578 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::StringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17563 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#17586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17636 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17631 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17641 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17666 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17646 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#17651 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#17595 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#69 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17684 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#17628 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17591 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17694 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17717 +class Prism::SuperNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#17719 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17854 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17730 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#17786 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#17802 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17735 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17748 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17740 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode + # + # source://prism//lib/prism/node.rb#17753 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SuperNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17735 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#17761 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17820 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17805 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17766 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#17810 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17773 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#17815 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17789 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17838 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17848 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#19283 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19288 +Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19291 +Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19285 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#17871 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#17873 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18027 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17884 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#17988 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#17947 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17899 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17894 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode + # + # source://prism//lib/prism/node.rb#17904 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::SymbolNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#17912 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17968 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17973 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17963 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17993 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#17978 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#17921 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18011 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#17960 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#17983 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#17934 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17917 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18021 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#645 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#657 + sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } + def initialize(source, type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#692 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#665 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#670 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#677 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#651 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#654 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#647 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#16 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#41 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#49 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#62 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#79 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#105 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#36 + sig { overridable.returns(Integer) } + def version; end + + # source://prism//lib/prism/translation/parser.rb#45 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#263 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#268 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#246 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#280 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#275 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#289 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#124 + def error_diagnostic(error, offset_cache); end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#224 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#113 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#119 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#197 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser33.rb#6 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser33.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser34.rb#6 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser34.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#8 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#105 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#111 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#160 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#172 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#178 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#216 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#222 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#227 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#233 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#238 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#247 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#352 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#259 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#333 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#371 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#390 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#402 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#421 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#408 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#434 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#473 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#463 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#483 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#447 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#493 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#453 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#524 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#514 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#534 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#590 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#550 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#580 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#600 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#610 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#570 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#499 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#544 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#508 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#619 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#666 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#678 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#684 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#694 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#700 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#706 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#712 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#724 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#730 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#748 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#754 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#763 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#801 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#791 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#811 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#775 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#821 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#781 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#827 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#837 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#855 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#897 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#903 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#909 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#915 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#959 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#941 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#977 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#995 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1032 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1022 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1042 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1006 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1052 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1012 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1058 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1079 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1113 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1123 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1137 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1143 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1149 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1158 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1167 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1219 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1209 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1229 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1193 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1239 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1199 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1249 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1259 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1269 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1280 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1297 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1307 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1330 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1342 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1348 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1358 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1364 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1370 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1376 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1382 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1388 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1427 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1437 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1444 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1449 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1459 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1469 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1497 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1503 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1535 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1541 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1547 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1565 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1574 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1580 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1589 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1601 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1606 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1612 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1624 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1630 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1636 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1648 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1661 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1667 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1709 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1732 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1764 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1770 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1779 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1809 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1831 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1849 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1871 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1902 + def visit_yield_node(node); end + + private + + # The parser gem automatically converts \r\n to \n, meaning our offsets + # need to be adjusted to always subtract 1 from the length. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2045 + def chomped_bytesize(line); end + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1916 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1923 + def find_forwarding(node); end + + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1936 + def multi_target_elements(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1948 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1962 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1979 + def srange(location); end + + # Constructs a new source range by finding the given tokens between the + # given start offset and end offset. If the needle is not found, it + # returns nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1994 + def srange_find(start_offset, end_offset, tokens); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1984 + def srange_offsets(start_offset, end_offset); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2004 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2009 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2051 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2123 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2135 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1976 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# source://prism//lib/prism/translation/parser.rb#17 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#204 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#197 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#200 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#193 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#214 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#387 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#380 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#373 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#402 + def parse_rational(value); end +end + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#210 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#23 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#28 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#25 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#34 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#441 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#438 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#432 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#561 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#551 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1002 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2229 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2234 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2246 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2260 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2352 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2338 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2366 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2320 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2380 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2327 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2387 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2402 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2411 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2420 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#2426 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2432 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2449 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2503 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2523 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2537 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2544 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2553 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2558 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2565 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2575 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2585 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2595 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2622 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2636 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2645 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2651 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2666 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ripper.rb#2680 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2691 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2705 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2711 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2718 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2740 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2747 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2754 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2764 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2822 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2834 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2844 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2858 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2864 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2870 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2880 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2887 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2894 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2907 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ripper.rb#2912 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2929 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3061 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3082 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3106 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3113 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3125 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3153 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3177 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3198 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3222 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3245 + def visit_yield_node(node); end + + private + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def _dispatch_1(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def _dispatch_2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def _dispatch_3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def _dispatch_4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3394 + def _dispatch_5(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3395 + def _dispatch_7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://prism//lib/prism/translation/ripper.rb#3379 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1163 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#3417 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # source://prism//lib/prism/translation/ripper.rb#3432 + def dedent_string(string, width); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#3394 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3395 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#3271 + def result; end + + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3284 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # source://prism//lib/prism/translation/ripper.rb#875 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1136 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # source://prism//lib/prism/translation/ripper.rb#2609 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # source://prism//lib/prism/translation/ripper.rb#2980 + def visit_heredoc_node(parts, base); end + + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. + # + # source://prism//lib/prism/translation/ripper.rb#2955 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3026 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3043 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2462 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # source://prism//lib/prism/translation/ripper.rb#3323 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # source://prism//lib/prism/translation/ripper.rb#2921 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#3296 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # source://prism//lib/prism/translation/ripper.rb#745 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # source://prism//lib/prism/translation/ripper.rb#3341 + def visit_write_value(node); end + + # Returns true if there is a semicolon between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3289 + def void_stmt?(left, right, allow_newline); end + + # This method is called when weak warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3408 + def warn(fmt, *args); end + + # This method is called when strong warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3413 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#72 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#46 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#381 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#416 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + end +end + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#10 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#17 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#24 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#74 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#79 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#109 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#105 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#101 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_xstring_new; end +end + +# This module is the entry-point for converting a prism syntax tree into the +# seattlerb/ruby_parser gem's syntax tree. +# +# source://prism//lib/prism/translation/ruby_parser.rb#14 +class Prism::Translation::RubyParser + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1556 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1562 + def parse_file(filepath); end + + private + + # Translate the given parse result and filepath into the + # seattlerb/ruby_parser gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1584 + def translate(result, filepath); end + + class << self + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1569 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1575 + def parse_file(filepath); end + end +end + +# A prism visitor that builds Sexp objects. +# +# source://prism//lib/prism/translation/ruby_parser.rb#16 +class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given file name. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/ruby_parser.rb#31 + def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # This is the name of the file that we are compiling. We set it on every + # Sexp object that is generated, and also use it to compile __FILE__ + # nodes. + # + # source://prism//lib/prism/translation/ruby_parser.rb#20 + def file; end + + # Class variables will change their type based on if they are inside of + # a method definition or not, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#24 + def in_def; end + + # Some nodes will change their representation if they are inside of a + # pattern, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#28 + def in_pattern; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#45 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#39 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#51 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#57 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#96 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#63 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#73 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#102 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#111 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#121 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#127 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#160 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#168 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # source://prism//lib/prism/translation/ruby_parser.rb#173 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#179 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ruby_parser.rb#184 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#224 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#287 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#242 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#277 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#297 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#320 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#326 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#338 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#332 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#344 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#385 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#379 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#391 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#364 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#397 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#373 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#430 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#424 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#473 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#448 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#467 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#479 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#485 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#461 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#409 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#442 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#418 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#501 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#532 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#538 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#544 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#552 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#558 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#564 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#570 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#576 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#586 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#592 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#598 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#604 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#613 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#640 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#634 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#646 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#619 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#652 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#628 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#658 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#664 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#685 + def visit_if_node(node); end + + # 1i + # + # source://prism//lib/prism/translation/ruby_parser.rb#690 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#696 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#701 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#706 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#732 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#719 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#745 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#758 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#788 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#782 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#794 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#767 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#800 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#776 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#806 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#812 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#829 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#844 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#851 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#858 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#923 + def visit_it_local_variable_read_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#929 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#938 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#943 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#986 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#980 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#992 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#961 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#998 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#974 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1004 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1010 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1016 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1022 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1029 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1035 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1055 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1065 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1089 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1102 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1108 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1114 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1120 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1126 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1132 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1138 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1144 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1182 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1192 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1198 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1207 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1212 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1217 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1223 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1245 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1251 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1257 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1263 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1269 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1275 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1281 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1301 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1307 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1316 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1329 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1334 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1340 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1348 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1355 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1361 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1373 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1382 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1394 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1400 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1414 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1420 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1426 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1436 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1445 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1451 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1460 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1466 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1482 + def visit_yield_node(node); end + + private + + # If a class variable is written within a method definition, it has a + # different type than everywhere else. + # + # source://prism//lib/prism/translation/ruby_parser.rb#403 + def class_variable_write_type; end + + # Create a new compiler with the given options. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1489 + def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # Call nodes with operators following them will either be op_asgn or + # op_asgn2 nodes. That is determined by their call operator and their + # right-hand side. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ruby_parser.rb#308 + def op_asgn?(node); end + + # Call nodes with operators following them can use &. as an operator, + # which changes their type by prefixing "safe_". + # + # source://prism//lib/prism/translation/ruby_parser.rb#314 + def op_asgn_type(node, type); end + + # Create a new Sexp object from the given prism node and arguments. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1494 + def s(node, *arguments); end + + # Visit a block node, which will modify the AST by wrapping the given + # visited node in an iter node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1504 + def visit_block(node, sexp, block); end + + # def foo((bar, baz)); end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1159 + def visit_destructured_parameter(node); end + + # Visit the interpolated content of the string-like node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#865 + def visit_interpolated_parts(parts); end + + # Pattern constants get wrapped in another layer of :const. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1525 + def visit_pattern_constant(node); end + + # If the bounds of a range node are empty parentheses, then they do not + # get replaced by their usual s(:nil), but instead are s(:begin). + # + # source://prism//lib/prism/translation/ruby_parser.rb#1235 + def visit_range_bounds_node(node); end + + # Visit the value of a write, which will be on the right-hand side of + # a write operator. Because implicit arrays can have splats, those could + # potentially be wrapped in an svalue node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1539 + def visit_write_value(node); end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#18041 +class Prism::TrueNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#18043 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18116 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18049 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18054 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18064 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18059 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> TrueNode + # + # source://prism//lib/prism/node.rb#18069 + sig { params(location: Prism::Location).returns(Prism::TrueNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18054 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#18077 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18082 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18100 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18110 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18125 +class Prism::UndefNode < ::Prism::Node + # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#18127 + sig do + params( + source: Prism::Source, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, names, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18217 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18135 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18140 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18150 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18145 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode + # + # source://prism//lib/prism/node.rb#18155 + sig do + params( + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18140 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#18163 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18183 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18178 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18171 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#18168 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18201 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18211 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18232 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#18234 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18399 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18246 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18251 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18265 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18256 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#18331 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode + # + # source://prism//lib/prism/node.rb#18270 + sig do + params( + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::UnlessNode) + end + def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18251 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#18278 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18360 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18337 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18365 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18350 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#18289 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#97 + def newline!(lines); end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#18302 + sig { returns(Prism::Node) } + def predicate; end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18325 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18355 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # + # unless cond then bar end + # ^^^^ + # + # source://prism//lib/prism/node.rb#18308 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18383 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18393 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18417 +class Prism::UntilNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#18419 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18545 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18430 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18496 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18435 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18506 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18477 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18448 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18440 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode + # + # source://prism//lib/prism/node.rb#18453 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::UntilNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18435 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18461 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18511 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18501 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18470 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#103 + def newline!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#18490 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18493 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18529 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18466 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18539 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#54 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItLocalVariableReadNode).void } + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#18561 +class Prism::WhenNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#18563 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18679 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18573 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18578 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18591 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18583 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#18616 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode + # + # source://prism//lib/prism/node.rb#18596 + sig do + params( + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhenNode) + end + def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18578 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18604 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18645 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18635 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18609 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18632 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18640 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#18619 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18663 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18673 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18696 +class Prism::WhileNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#18698 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18824 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18775 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18785 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18756 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18727 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18719 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode + # + # source://prism//lib/prism/node.rb#18732 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhileNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18740 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18790 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18780 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18749 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#109 + def newline!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#18769 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18772 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18808 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18745 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18818 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#18838 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#18840 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18971 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18851 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18856 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#18932 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#18902 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18866 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18861 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#18927 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#18895 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode + # + # source://prism//lib/prism/node.rb#18871 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::XStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18856 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#18879 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18917 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18912 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18937 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#18922 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#18888 + sig { returns(Prism::Location) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#86 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18955 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18909 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18884 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18965 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#18985 +class Prism::YieldNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#18987 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19117 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#19052 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19014 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19007 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode + # + # source://prism//lib/prism/node.rb#19019 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::YieldNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#19027 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19083 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19068 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19032 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#19073 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19039 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#19078 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19055 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19101 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19111 + def type; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-byebug@3.10.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-byebug@3.10.1.rbi new file mode 100644 index 0000000..855cf2c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-byebug@3.10.1.rbi @@ -0,0 +1,1151 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry-byebug` gem. +# Please instead update this file by running `bin/tapioca gem pry-byebug`. + + +# source://pry-byebug//lib/byebug/processors/pry_processor.rb#5 +module Byebug + extend ::Byebug::Helpers::ReflectionHelper + + # source://byebug/11.1.3/lib/byebug/core.rb#31 + def displays; end + + # source://byebug/11.1.3/lib/byebug/core.rb#31 + def displays=(_arg0); end + + # source://byebug/11.1.3/lib/byebug/core.rb#25 + def init_file; end + + # source://byebug/11.1.3/lib/byebug/core.rb#25 + def init_file=(_arg0); end + + # source://byebug/11.1.3/lib/byebug/core.rb#41 + def mode; end + + # source://byebug/11.1.3/lib/byebug/core.rb#41 + def mode=(_arg0); end + + # source://byebug/11.1.3/lib/byebug/core.rb#52 + def run_init_script; end + + private + + def add_catchpoint(_arg0); end + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + def lock; end + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # source://byebug/11.1.3/lib/byebug/core.rb#102 + def rc_dirs; end + + # source://byebug/11.1.3/lib/byebug/core.rb#91 + def run_rc_file(rc_file); end + + def start; end + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + class << self + # source://byebug/11.1.3/lib/byebug/remote.rb#25 + def actual_control_port; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#20 + def actual_port; end + + def add_catchpoint(_arg0); end + + # source://byebug/11.1.3/lib/byebug/attacher.rb#10 + def attach; end + + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + + # source://byebug/11.1.3/lib/byebug/core.rb#76 + def handle_post_mortem; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#32 + def interrupt; end + + # source://byebug/11.1.3/lib/byebug/core.rb#61 + def load_settings; end + + def lock; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#59 + def parse_host_and_port(host_port_spec); end + + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # source://byebug/11.1.3/lib/byebug/attacher.rb#21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def start; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#55 + def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # source://byebug/11.1.3/lib/byebug/remote.rb#48 + def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # source://byebug/11.1.3/lib/byebug/remote.rb#39 + def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#17 + def wait_connection; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#17 + def wait_connection=(_arg0); end + + private + + # source://byebug/11.1.3/lib/byebug/remote.rb#66 + def client; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#76 + def control; end + + # source://byebug/11.1.3/lib/byebug/remote.rb#70 + def server; end + end +end + +class Byebug::DebugThread < ::Thread + class << self + def inherited; end + end +end + +# Extends raw byebug's processor. +# +# source://pry-byebug//lib/byebug/processors/pry_processor.rb#9 +class Byebug::PryProcessor < ::Byebug::CommandProcessor + # Called when a breakpoint is hit. Note that `at_line`` is called + # inmediately after with the context's `stop_reason == :breakpoint`, so we + # must not resume the pry instance here + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#80 + def at_breakpoint(breakpoint); end + + # Called when the debugger wants to stop at a regular line + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#64 + def at_line; end + + # Called when the debugger wants to stop right before a method return + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#71 + def at_return(_return_value); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def bold(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output(*args, **_arg1, &block); end + + # Set up a number of navigational commands to be performed by Byebug. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#45 + def perform(action, options = T.unsafe(nil)); end + + # Returns the value of attribute pry. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 + def pry; end + + # Sets the attribute pry + # + # @param value the value to set the attribute pry to. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 + def pry=(_arg0); end + + # Wrap a Pry REPL to catch navigational commands and act on them. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#26 + def run(&_block); end + + private + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#93 + def n_hits(breakpoint); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#114 + def perform_backtrace(_options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#142 + def perform_down(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#130 + def perform_finish(*_arg0); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#150 + def perform_frame(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#120 + def perform_next(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#125 + def perform_step(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#134 + def perform_up(options); end + + # Resume an existing Pry REPL at the paused point. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#102 + def resume_pry; end + + class << self + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#16 + def start; end + end +end + +class Byebug::ThreadsTable; end + +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#3 +class Pry + extend ::Forwardable + + # source://pry/0.14.2/lib/pry/pry_instance.rb#81 + def initialize(options = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#212 + def add_sticky_local(name, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#35 + def backtrace; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#35 + def backtrace=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#32 + def binding_stack; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#32 + def binding_stack=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#145 + def complete(str); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#50 + def config; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#124 + def current_binding; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#124 + def current_context; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#33 + def custom_completions; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#33 + def custom_completions=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#255 + def eval(line, options = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#34 + def eval_string; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#34 + def eval_string=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#286 + def evaluate_ruby(code); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#394 + def exec_hook(name, *args, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#42 + def exit_value; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#173 + def inject_local(name, value, binding); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#201 + def inject_sticky_locals!; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#45 + def input_ring; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#39 + def last_dir; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#39 + def last_dir=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#41 + def last_exception; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#418 + def last_exception=(exception); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#38 + def last_file; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#38 + def last_file=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#37 + def last_result; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#37 + def last_result=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#440 + def last_result_is_exception?; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#190 + def memory_size; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#195 + def memory_size=(size); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#538 + def output; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#48 + def output_ring; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#530 + def pager; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#522 + def pop_prompt; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#325 + def process_command(val); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#360 + def process_command_safely(val); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#101 + def prompt; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#108 + def prompt=(new_prompt); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#131 + def push_binding(object); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#118 + def push_initial_binding(target = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#506 + def push_prompt(new_prompt); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#592 + def quiet?; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#582 + def raise_up(*args); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#586 + def raise_up!(*args); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#554 + def raise_up_common(force, *args); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#282 + def repl(target = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#231 + def reset_eval_string; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#375 + def run_command(val); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#453 + def select_prompt; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#409 + def set_last_result(result, code = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#447 + def should_print?; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#298 + def show_result(result); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#216 + def sticky_locals; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#36 + def suppress_output; end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#36 + def suppress_output=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#428 + def update_input_history(code); end + + private + + # source://pry/0.14.2/lib/pry/pry_instance.rb#680 + def ensure_correct_encoding!(val); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#688 + def generate_prompt(prompt_proc, conf); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#598 + def handle_line(line, options); end + + # source://pry/0.14.2/lib/pry/pry_instance.rb#697 + def prompt_stack; end + + class << self + # source://pry/0.14.2/lib/pry/code.rb#12 + def Code(obj); end + + # source://pry/0.14.2/lib/pry/method.rb#9 + def Method(obj); end + + # source://pry/0.14.2/lib/pry/wrapped_module.rb#7 + def WrappedModule(obj); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#294 + def auto_resize!; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#347 + def binding_for(target); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#22 + def cli; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#22 + def cli=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#25 + def config; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#25 + def config=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#46 + def configure; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#380 + def critical_section; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#63 + def current; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#19 + def current_line; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#19 + def current_line=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#18 + def custom_completions; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#18 + def custom_completions=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#21 + def eval_path; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#21 + def eval_path=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#139 + def final_session_setup; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def history(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def history=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#375 + def in_critical_section?; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#338 + def init; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#257 + def initial_session?; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#129 + def initial_session_setup; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#24 + def last_internal_error; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#24 + def last_internal_error=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#20 + def line_buffer; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#20 + def line_buffer=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#69 + def load_file_at_toplevel(file); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#202 + def load_file_through_repl(file_name); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#251 + def load_history; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#77 + def load_rc_files; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#101 + def load_requires; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#109 + def load_traps; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#113 + def load_win32console; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#55 + def main; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def memory_size(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def memory_size=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prompt(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prompt=(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#23 + def quiet; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#23 + def quiet=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#86 + def rc_files_to_load; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#94 + def real_path_to(file); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#326 + def reset_defaults; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#277 + def run_command(command_string, options = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#156 + def start(target = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#354 + def toplevel_binding; end + + # source://pry/0.14.2/lib/pry/pry_class.rb#372 + def toplevel_binding=(_arg0); end + + # source://pry/0.14.2/lib/pry/pry_class.rb#225 + def view_clip(obj, options = T.unsafe(nil)); end + + private + + # source://pry/0.14.2/lib/pry/pry_class.rb#388 + def mutex_available?; end + end +end + +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#4 +module Pry::Byebug; end + +# Wrapper for Byebug.breakpoints that respects our Processor and has better +# failure behavior. Acts as an Enumerable. +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#9 +module Pry::Byebug::Breakpoints + extend ::Enumerable + extend ::Pry::Byebug::Breakpoints + + # Adds a file breakpoint. + # + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#63 + def add_file(file, line, expression = T.unsafe(nil)); end + + # Adds a method breakpoint. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#51 + def add_method(method, expression = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#44 + def breakpoints; end + + # Changes the conditional expression for a breakpoint. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#78 + def change(id, expression = T.unsafe(nil)); end + + # Deletes an existing breakpoint with the given ID. + # + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#89 + def delete(id); end + + # Deletes all breakpoints. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#100 + def delete_all; end + + # Disables a breakpoint with the given ID. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#115 + def disable(id); end + + # Disables all breakpoints. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#122 + def disable_all; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#136 + def each(&block); end + + # Enables a disabled breakpoint with the given ID. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#108 + def enable(id); end + + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#144 + def find_by_id(id); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#140 + def last; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#132 + def size; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#128 + def to_a; end + + private + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#153 + def change_status(id, enabled = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#159 + def validate_expression(exp); end +end + +# Breakpoint in a file:line location +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#16 +class Pry::Byebug::Breakpoints::FileBreakpoint < ::SimpleDelegator + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#17 + def source_code; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#21 + def to_s; end +end + +# Breakpoint in a Class#method location +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#29 +class Pry::Byebug::Breakpoints::MethodBreakpoint < ::SimpleDelegator + # @return [MethodBreakpoint] a new instance of MethodBreakpoint + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#30 + def initialize(byebug_bp, method); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#35 + def source_code; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#39 + def to_s; end +end + +class Pry::REPL + extend ::Forwardable + + # source://pry/0.14.2/lib/pry/repl.rb#22 + def initialize(pry, options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output(*args, **_arg1, &block); end + + # source://pry/0.14.2/lib/pry/repl.rb#9 + def pry; end + + # source://pry/0.14.2/lib/pry/repl.rb#9 + def pry=(_arg0); end + + # source://pry/0.14.2/lib/pry/repl.rb#36 + def start; end + + private + + # source://pry/0.14.2/lib/pry/repl.rb#237 + def calculate_overhang(current_prompt, original_val, indented_val); end + + # source://pry/0.14.2/lib/pry/repl.rb#205 + def coolline_available?; end + + # source://pry/0.14.2/lib/pry/repl.rb#84 + def epilogue; end + + # source://pry/0.14.2/lib/pry/repl.rb#127 + def handle_read_errors; end + + # source://pry/0.14.2/lib/pry/repl.rb#195 + def input_readline(*args); end + + # source://pry/0.14.2/lib/pry/repl.rb#217 + def piping?; end + + # source://pry/0.14.2/lib/pry/repl.rb#47 + def prologue; end + + # source://pry/0.14.2/lib/pry/repl.rb#93 + def read; end + + # source://pry/0.14.2/lib/pry/repl.rb#169 + def read_line(current_prompt); end + + # source://pry/0.14.2/lib/pry/repl.rb#201 + def readline_available?; end + + # source://pry/0.14.2/lib/pry/repl.rb#66 + def repl; end + + # source://pry/0.14.2/lib/pry/repl.rb#224 + def set_readline_output; end + + class << self + # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 + def start(options = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 + def start_with_pry_byebug(options = T.unsafe(nil)); end + + # source://pry/0.14.2/lib/pry/repl.rb#14 + def start_without_pry_byebug(options); end + end +end + +# Main container module for Pry-Byebug functionality +# +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#3 +module PryByebug + # Reference to currently running pry-remote server. Used by the processor. + # + # source://pry-byebug//lib/pry-byebug/base.rb#10 + def current_remote_server; end + + # Reference to currently running pry-remote server. Used by the processor. + # + # source://pry-byebug//lib/pry-byebug/base.rb#10 + def current_remote_server=(_arg0); end + + private + + # Ensures that a command is executed in a local file context. + # + # source://pry-byebug//lib/pry-byebug/base.rb#25 + def check_file_context(target, msg = T.unsafe(nil)); end + + # Checks that a target binding is in a local file context. + # + # source://pry-byebug//lib/pry-byebug/base.rb#17 + def file_context?(target); end + + class << self + # Ensures that a command is executed in a local file context. + # + # @raise [Pry::CommandError] + # + # source://pry-byebug//lib/pry-byebug/base.rb#25 + def check_file_context(target, msg = T.unsafe(nil)); end + + # Checks that a target binding is in a local file context. + # + # @return [Boolean] + # + # source://pry-byebug//lib/pry-byebug/base.rb#17 + def file_context?(target); end + end +end + +# Display the current stack +# +# source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#9 +class PryByebug::BacktraceCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#23 + def process; end +end + +# Add, show and remove breakpoints +# +# source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#12 +class PryByebug::BreakCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Breakpoints + include ::PryByebug::Helpers::Location + include ::PryByebug::Helpers::Multiline + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#50 + def options(opt); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#62 + def process; end + + private + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#111 + def add_breakpoint(place, condition); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#93 + def new_breakpoint; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#102 + def option_to_method(option); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#106 + def print_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#88 + def process_condition; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_delete; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_delete_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_disable; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_disable_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_enable; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#84 + def process_show; end +end + +# Continue program execution until the next breakpoint +# +# source://pry-byebug//lib/pry-byebug/commands/continue.rb#11 +class PryByebug::ContinueCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + include ::PryByebug::Helpers::Breakpoints + include ::PryByebug::Helpers::Location + + # source://pry-byebug//lib/pry-byebug/commands/continue.rb#31 + def process; end +end + +# Travel down the frame stack +# +# source://pry-byebug//lib/pry-byebug/commands/down.rb#9 +class PryByebug::DownCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/down.rb#27 + def process; end +end + +# Exit pry REPL with Byebug.stop +# +# source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#9 +class PryByebug::ExitAllCommand < ::Pry::Command::ExitAll + # source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#10 + def process; end +end + +# Run until the end of current frame +# +# source://pry-byebug//lib/pry-byebug/commands/finish.rb#9 +class PryByebug::FinishCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/finish.rb#20 + def process; end +end + +# Move to a specific frame in the callstack +# +# source://pry-byebug//lib/pry-byebug/commands/frame.rb#9 +class PryByebug::FrameCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/frame.rb#27 + def process; end +end + +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#4 +module PryByebug::Helpers; end + +# Common helpers for breakpoint related commands +# +# source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#10 +module PryByebug::Helpers::Breakpoints + # Prints a message with bold font. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#21 + def bold_puts(msg); end + + # Byebug's array of breakpoints. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#14 + def breakpoints; end + + # Max width of breakpoints id column + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#77 + def max_width; end + + # Prints a header for the breakpoint list. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#63 + def print_breakpoints_header; end + + # Print out full information about a breakpoint. + # + # Includes surrounding code at that point. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#30 + def print_full_breakpoint(breakpoint); end + + # Print out concise information about a breakpoint. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#52 + def print_short_breakpoint(breakpoint); end +end + +# Compatibility helper to handle source location +# +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#8 +module PryByebug::Helpers::Location + private + + # Current file in the target binding. Used as the default breakpoint + # location. + # + # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 + def current_file(source = T.unsafe(nil)); end + + class << self + # Current file in the target binding. Used as the default breakpoint + # location. + # + # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 + def current_file(source = T.unsafe(nil)); end + end +end + +# Helpers to help handling multiline inputs +# +# source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#8 +module PryByebug::Helpers::Multiline + # Returns true if we are in a multiline context and, as a side effect, + # updates the partial evaluation string with the current input. + # + # Returns false otherwise + # + # source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#15 + def check_multiline_context; end +end + +# Helpers to aid breaking out of the REPL loop +# +# source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#8 +module PryByebug::Helpers::Navigation + # Breaks out of the REPL loop and signals tracer + # + # source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#12 + def breakout_navigation(action, options = T.unsafe(nil)); end +end + +# Run a number of lines and then stop again +# +# source://pry-byebug//lib/pry-byebug/commands/next.rb#10 +class PryByebug::NextCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + include ::PryByebug::Helpers::Multiline + + # source://pry-byebug//lib/pry-byebug/commands/next.rb#29 + def process; end +end + +# Run a number of Ruby statements and then stop again +# +# source://pry-byebug//lib/pry-byebug/commands/step.rb#9 +class PryByebug::StepCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/step.rb#26 + def process; end +end + +# Travel up the frame stack +# +# source://pry-byebug//lib/pry-byebug/commands/up.rb#9 +class PryByebug::UpCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/up.rb#27 + def process; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-meta@0.0.10.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-meta@0.0.10.rbi new file mode 100644 index 0000000..04d9272 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-meta@0.0.10.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry-meta` gem. +# Please instead update this file by running `bin/tapioca gem pry-meta`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-rails@0.3.11.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-rails@0.3.11.rbi new file mode 100644 index 0000000..0f0556a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-rails@0.3.11.rbi @@ -0,0 +1,178 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry-rails` gem. +# Please instead update this file by running `bin/tapioca gem pry-rails`. + + +# source://pry-rails//lib/pry-rails/version.rb#3 +module PryRails; end + +# source://pry-rails//lib/pry-rails/commands.rb#3 +PryRails::Commands = T.let(T.unsafe(nil), Pry::CommandSet) + +# source://pry-rails//lib/pry-rails/commands/find_route.rb#1 +class PryRails::FindRoute < ::Pry::ClassCommand + # source://pry-rails//lib/pry-rails/commands/find_route.rb#16 + def process(controller); end + + private + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#31 + def all_actions(controller); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#37 + def controller_and_action_from(controller_and_action); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#46 + def normalize_controller_name(controller); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#69 + def route_helper(name); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#42 + def routes; end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#50 + def show_routes(&block); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#27 + def single_action(controller); end + + # @return [Boolean] + # + # source://pry-rails//lib/pry-rails/commands/find_route.rb#77 + def single_action?(controller); end + + # source://pry-rails//lib/pry-rails/commands/find_route.rb#73 + def verb_for(route); end +end + +# source://pry-rails//lib/pry-rails/model_formatter.rb#4 +class PryRails::ModelFormatter + # source://pry-rails//lib/pry-rails/model_formatter.rb#5 + def format_active_record(model); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#75 + def format_association(type, other, options = T.unsafe(nil)); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#71 + def format_column(name, type); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#80 + def format_error(message); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#67 + def format_model_name(model); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#42 + def format_mongoid(model); end + + # source://pry-rails//lib/pry-rails/model_formatter.rb#84 + def kind_of_relation(relation); end + + private + + # source://pry-rails//lib/pry-rails/model_formatter.rb#107 + def text; end +end + +# source://pry-rails//lib/pry-rails/prompt.rb#2 +class PryRails::Prompt + class << self + # source://pry-rails//lib/pry-rails/prompt.rb#4 + def formatted_env; end + + # source://pry-rails//lib/pry-rails/prompt.rb#15 + def project_name; end + end +end + +# source://pry-rails//lib/pry-rails/railtie.rb#4 +class PryRails::Railtie < ::Rails::Railtie; end + +# source://pry-rails//lib/pry-rails/commands/recognize_path.rb#1 +class PryRails::RecognizePath < ::Pry::ClassCommand + # source://pry-rails//lib/pry-rails/commands/recognize_path.rb#15 + def options(opt); end + + # source://pry-rails//lib/pry-rails/commands/recognize_path.rb#19 + def process(path); end +end + +# source://pry-rails//lib/pry-rails/commands/show_middleware.rb#1 +class PryRails::ShowMiddleware < ::Pry::ClassCommand + # source://pry-rails//lib/pry-rails/commands/show_middleware.rb#15 + def options(opt); end + + # source://pry-rails//lib/pry-rails/commands/show_middleware.rb#59 + def print_middleware(middlewares); end + + # source://pry-rails//lib/pry-rails/commands/show_middleware.rb#19 + def process; end +end + +# source://pry-rails//lib/pry-rails/commands/show_model.rb#3 +class PryRails::ShowModel < ::Pry::ClassCommand + # source://pry-rails//lib/pry-rails/commands/show_model.rb#8 + def options(opt); end + + # source://pry-rails//lib/pry-rails/commands/show_model.rb#16 + def process; end +end + +# source://pry-rails//lib/pry-rails/commands/show_models.rb#3 +class PryRails::ShowModels < ::Pry::ClassCommand + # source://pry-rails//lib/pry-rails/commands/show_models.rb#71 + def colorize_matches(string); end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#27 + def display_activerecord_models; end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#37 + def display_mongoid_models; end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#79 + def grep_regex; end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#8 + def options(opt); end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#63 + def print_unless_filtered(str); end + + # source://pry-rails//lib/pry-rails/commands/show_models.rb#18 + def process; end +end + +# source://pry-rails//lib/pry-rails/commands/show_routes.rb#1 +class PryRails::ShowRoutes < ::Pry::ClassCommand + # Takes an array of lines. Returns a list filtered by the conditions in + # `opts[:G]`. + # + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#36 + def grep_routes(formatted); end + + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#10 + def options(opt); end + + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#16 + def process; end + + # Cribbed from https://github.com/rails/rails/blob/3-1-stable/railties/lib/rails/tasks/routes.rake + # + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#46 + def process_rails_3_0_and_3_1(all_routes); end + + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#67 + def process_rails_3_2(all_routes); end + + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#73 + def process_rails_4_and_5(all_routes); end + + # source://pry-rails//lib/pry-rails/commands/show_routes.rb#82 + def process_rails_6_and_higher(all_routes); end +end + +# source://pry-rails//lib/pry-rails/version.rb#4 +PryRails::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-remote@0.1.8.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-remote@0.1.8.rbi new file mode 100644 index 0000000..5022f5c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry-remote@0.1.8.rbi @@ -0,0 +1,320 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry-remote` gem. +# Please instead update this file by running `bin/tapioca gem pry-remote`. + + +# source://pry-remote//lib/pry-remote.rb#313 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # Starts a remote Pry session + # a handy alias as many people may think the method is named after the gem + # (pry-remote) + # + # @param host [String] Host of the server + # @param port [Integer] Port of the server + # @param options [Hash] Options to be passed to Pry.start + # + # source://pry-remote//lib/pry-remote.rb#319 + def pry_remote(host = T.unsafe(nil), port = T.unsafe(nil), options = T.unsafe(nil)); end + + # Starts a remote Pry session + # + # @param host [String] Host of the server + # @param port [Integer] Port of the server + # @param options [Hash] Options to be passed to Pry.start + # + # source://pry-remote//lib/pry-remote.rb#319 + def remote_pry(host = T.unsafe(nil), port = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# source://pry-remote//lib/pry-remote.rb#7 +module PryRemote; end + +# Parses arguments and allows to start the client. +# +# source://pry-remote//lib/pry-remote.rb#233 +class PryRemote::CLI + # @return [CLI] a new instance of CLI + # + # source://pry-remote//lib/pry-remote.rb#234 + def initialize(args = T.unsafe(nil)); end + + # Returns the value of attribute capture. + # + # source://pry-remote//lib/pry-remote.rb#272 + def capture; end + + # Returns the value of attribute capture. + # + # source://pry-remote//lib/pry-remote.rb#272 + def capture?; end + + # @return [String] Host of the server + # + # source://pry-remote//lib/pry-remote.rb#261 + def host; end + + # @return [Integer] Port of the server + # + # source://pry-remote//lib/pry-remote.rb#264 + def port; end + + # Connects to the server + # + # @param input [IO] Object holding input for pry-remote + # @param output [IO] Object pry-debug will send its output to + # + # source://pry-remote//lib/pry-remote.rb#280 + def run(input = T.unsafe(nil), output = T.unsafe(nil)); end + + # @return [String] URI for DRb + # + # source://pry-remote//lib/pry-remote.rb#267 + def uri; end + + # Returns the value of attribute wait. + # + # source://pry-remote//lib/pry-remote.rb#271 + def wait; end + + # Returns the value of attribute wait. + # + # source://pry-remote//lib/pry-remote.rb#271 + def wait?; end +end + +# A client is used to retrieve information from the client program. +# +# source://pry-remote//lib/pry-remote.rb#119 +class PryRemote::Client < ::Struct + # Returns the value of attribute input + # + # @return [Object] the current value of input + def input; end + + # Sets the attribute input + # + # @param value [Object] the value to set the attribute input to. + # @return [Object] the newly set value + def input=(_); end + + # @return [InputProxy] Proxy for the input + # + # source://pry-remote//lib/pry-remote.rb#131 + def input_proxy; end + + # Tells the client the session is terminated + # + # source://pry-remote//lib/pry-remote.rb#126 + def kill; end + + # Returns the value of attribute output + # + # @return [Object] the current value of output + def output; end + + # Sets the attribute output + # + # @param value [Object] the value to set the attribute output to. + # @return [Object] the newly set value + def output=(_); end + + # Returns the value of attribute stderr + # + # @return [Object] the current value of stderr + def stderr; end + + # Sets the attribute stderr + # + # @param value [Object] the value to set the attribute stderr to. + # @return [Object] the newly set value + def stderr=(_); end + + # Returns the value of attribute stdout + # + # @return [Object] the current value of stdout + def stdout; end + + # Sets the attribute stdout + # + # @param value [Object] the value to set the attribute stdout to. + # @return [Object] the newly set value + def stdout=(_); end + + # Returns the value of attribute thread + # + # @return [Object] the current value of thread + def thread; end + + # Sets the attribute thread + # + # @param value [Object] the value to set the attribute thread to. + # @return [Object] the newly set value + def thread=(_); end + + # Waits until both an input and output are set + # + # source://pry-remote//lib/pry-remote.rb#121 + def wait; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://pry-remote//lib/pry-remote.rb#8 +PryRemote::DefaultHost = T.let(T.unsafe(nil), String) + +# source://pry-remote//lib/pry-remote.rb#9 +PryRemote::DefaultPort = T.let(T.unsafe(nil), Integer) + +# Class used to wrap inputs so that they can be sent through DRb. +# +# This is to ensure the input is used locally and not reconstructed on the +# server by DRb. +# +# source://pry-remote//lib/pry-remote.rb#39 +class PryRemote::IOUndumpedProxy + include ::DRb::DRbUndumped + + # @return [IOUndumpedProxy] a new instance of IOUndumpedProxy + # + # source://pry-remote//lib/pry-remote.rb#42 + def initialize(obj); end + + # source://pry-remote//lib/pry-remote.rb#83 + def <<(data); end + + # source://pry-remote//lib/pry-remote.rb#52 + def completion_proc; end + + # source://pry-remote//lib/pry-remote.rb#46 + def completion_proc=(val); end + + # source://pry-remote//lib/pry-remote.rb#71 + def print(*objs); end + + # source://pry-remote//lib/pry-remote.rb#75 + def printf(*args); end + + # source://pry-remote//lib/pry-remote.rb#67 + def puts(*lines); end + + # source://pry-remote//lib/pry-remote.rb#56 + def readline(prompt); end + + # Some versions of Pry expect $stdout or its output objects to respond to + # this message. + # + # @return [Boolean] + # + # source://pry-remote//lib/pry-remote.rb#90 + def tty?; end + + # source://pry-remote//lib/pry-remote.rb#79 + def write(data); end +end + +# A class to represent an input object created from DRb. This is used because +# Pry checks for arity to know if a prompt should be passed to the object. +# +# @attr input [#readline] Object to proxy +# +# source://pry-remote//lib/pry-remote.rb#15 +class PryRemote::InputProxy < ::Struct + # source://pry-remote//lib/pry-remote.rb#24 + def completion_proc=(val); end + + # Object to proxy + # + # @return [#readline] the current value of input + def input; end + + # Object to proxy + # + # @param value [#readline] the value to set the attribute input to. + # @return [#readline] the newly set value + def input=(_); end + + # Reads a line from the input + # + # source://pry-remote//lib/pry-remote.rb#17 + def readline(prompt); end + + # source://pry-remote//lib/pry-remote.rb#28 + def readline_arity; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://pry-remote//lib/pry-remote.rb#136 +class PryRemote::Server + # @return [Server] a new instance of Server + # + # source://pry-remote//lib/pry-remote.rb#141 + def initialize(object, host = T.unsafe(nil), port = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [PryServer::Client] Client connecting to the pry-remote server + # + # source://pry-remote//lib/pry-remote.rb#218 + def client; end + + # @return [String] Host of the server + # + # source://pry-remote//lib/pry-remote.rb#221 + def host; end + + # @return Object to enter into + # + # source://pry-remote//lib/pry-remote.rb#215 + def object; end + + # @return [Integer] Port of the server + # + # source://pry-remote//lib/pry-remote.rb#224 + def port; end + + # Actually runs pry-remote + # + # source://pry-remote//lib/pry-remote.rb#206 + def run; end + + # Code that has to be called for Pry-remote to work properly + # + # source://pry-remote//lib/pry-remote.rb#158 + def setup; end + + # Code that has to be called after setup to return to the initial state + # + # source://pry-remote//lib/pry-remote.rb#182 + def teardown; end + + # @return [String] URI for DRb + # + # source://pry-remote//lib/pry-remote.rb#227 + def uri; end + + class << self + # source://pry-remote//lib/pry-remote.rb#137 + def run(object, host = T.unsafe(nil), port = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# Ensure that system (shell command) output is redirected for remote session. +# +# source://pry-remote//lib/pry-remote.rb#96 +PryRemote::System = T.let(T.unsafe(nil), Proc) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/pry@0.14.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry@0.14.2.rbi new file mode 100644 index 0000000..5700820 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/pry@0.14.2.rbi @@ -0,0 +1,10076 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry` gem. +# Please instead update this file by running `bin/tapioca gem pry`. + + +# source://pry//lib/pry/core_extensions.rb#115 +class BasicObject + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that new + # methods defined will be added to the singleton class of the BasicObject. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#125 + def __binding__; end +end + +# source://pry//lib/pry/core_extensions.rb#24 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that: + # + # * If `self` is a class or module, then new methods created in the binding + # will be defined in that class or module (as in `class Foo; end`). + # * If `self` is a normal object, then new methods created in the binding will + # be defined on its singleton class (as in `class << self; end`). + # * If `self` doesn't have a real singleton class (i.e. it is a Fixnum, Float, + # Symbol, nil, true, or false), then new methods will be created on the + # object's class (as in `self.class.class_eval{ }`) + # + # Newly created constants, including classes and modules, will also be added + # to the default definee. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#70 + def __binding__; end + + # Start a Pry REPL on self. + # + # If `self` is a Binding then that will be used to evaluate expressions; + # otherwise a new binding will be created. + # + # @example With a binding + # binding.pry + # @example On any object + # "dummy".pry + # @example With options + # def my_method + # binding.pry :quiet => true + # end + # my_method() + # @param object [Object] the object or binding to pry + # (__deprecated__, use `object.pry`) + # @param hash [Hash] the options hash + # @see Pry.start + # + # source://pry//lib/pry/core_extensions.rb#43 + def pry(object = T.unsafe(nil), hash = T.unsafe(nil)); end +end + +# source://pry//lib/pry/version.rb#3 +class Pry + extend ::Forwardable + extend ::Pry::Forwardable + + # Create a new {Pry} instance. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [Pry] a new instance of Pry + # + # source://pry//lib/pry/pry_instance.rb#81 + def initialize(options = T.unsafe(nil)); end + + # Add a sticky local to this Pry instance. + # A sticky local is a local that persists between all bindings in a session. + # + # @param name [Symbol] The name of the sticky local. + # @yield The block that defines the content of the local. The local + # will be refreshed at each tick of the repl loop. + # + # source://pry//lib/pry/pry_instance.rb#212 + def add_sticky_local(name, &block); end + + # Returns the value of attribute backtrace. + # + # source://pry//lib/pry/pry_instance.rb#35 + def backtrace; end + + # Sets the attribute backtrace + # + # @param value the value to set the attribute backtrace to. + # + # source://pry//lib/pry/pry_instance.rb#35 + def backtrace=(_arg0); end + + # Returns the value of attribute binding_stack. + # + # source://pry//lib/pry/pry_instance.rb#32 + def binding_stack; end + + # Sets the attribute binding_stack + # + # @param value the value to set the attribute binding_stack to. + # + # source://pry//lib/pry/pry_instance.rb#32 + def binding_stack=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands=(*args, **_arg1, &block); end + + # Generate completions. + # + # @param str [String] What the user has typed so far + # @return [Array] Possible completions + # + # source://pry//lib/pry/pry_instance.rb#145 + def complete(str); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_instance.rb#50 + def config; end + + # The currently active `Binding`. + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#124 + def current_binding; end + + # The currently active `Binding`. + # support previous API + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#124 + def current_context; end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_instance.rb#33 + def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_instance.rb#33 + def custom_completions=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor=(*args, **_arg1, &block); end + + # Pass a line of input to Pry. + # + # This is the equivalent of `Binding#eval` but with extra Pry! + # + # In particular: + # 1. Pry commands will be executed immediately if the line matches. + # 2. Partial lines of input will be queued up until a complete expression has + # been accepted. + # 3. Output is written to `#output` in pretty colours, not returned. + # + # Once this method has raised an exception or returned false, this instance + # is no longer usable. {#exit_value} will return the session's breakout + # value if applicable. + # + # @option options + # @param line [String?] The line of input; `nil` if the user types `` + # @param options [Hash] a customizable set of options + # @raise [Exception] If the user uses the `raise-up` command, this method + # will raise that exception. + # @return [Boolean] Is Pry ready to accept more input? + # + # source://pry//lib/pry/pry_instance.rb#255 + def eval(line, options = T.unsafe(nil)); end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/pry_instance.rb#34 + def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/pry_instance.rb#34 + def eval_string=(_arg0); end + + # source://pry//lib/pry/pry_instance.rb#286 + def evaluate_ruby(code); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler=(*args, **_arg1, &block); end + + # Execute the specified hook. + # If executing a hook raises an exception, we log that and then continue sucessfully. + # To debug such errors, use the global variable $pry_hook_error, which is set as a + # result. + # + # @param name [Symbol] The hook name to execute + # @param args [*Object] The arguments to pass to the hook + # @return [Object, Exception] The return value of the hook or the exception raised + # + # source://pry//lib/pry/pry_instance.rb#394 + def exec_hook(name, *args, &block); end + + # Returns the value of attribute exit_value. + # + # source://pry//lib/pry/pry_instance.rb#42 + def exit_value; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks=(*args, **_arg1, &block); end + + # Injects a local variable into the provided binding. + # + # @param name [String] The name of the local to inject. + # @param value [Object] The value to set the local to. + # @param binding [Binding] The binding to set the local on. + # @return [Object] The value the local was set to. + # + # source://pry//lib/pry/pry_instance.rb#173 + def inject_local(name, value, binding); end + + # Inject all the sticky locals into the current binding. + # + # source://pry//lib/pry/pry_instance.rb#201 + def inject_sticky_locals!; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#45 + def input_ring; end + + # Returns the value of attribute last_dir. + # + # source://pry//lib/pry/pry_instance.rb#39 + def last_dir; end + + # Sets the attribute last_dir + # + # @param value the value to set the attribute last_dir to. + # + # source://pry//lib/pry/pry_instance.rb#39 + def last_dir=(_arg0); end + + # Returns the value of attribute last_exception. + # + # source://pry//lib/pry/pry_instance.rb#41 + def last_exception; end + + # Set the last exception for a session. + # + # @param exception [Exception] The last exception. + # + # source://pry//lib/pry/pry_instance.rb#418 + def last_exception=(exception); end + + # Returns the value of attribute last_file. + # + # source://pry//lib/pry/pry_instance.rb#38 + def last_file; end + + # Sets the attribute last_file + # + # @param value the value to set the attribute last_file to. + # + # source://pry//lib/pry/pry_instance.rb#38 + def last_file=(_arg0); end + + # Returns the value of attribute last_result. + # + # source://pry//lib/pry/pry_instance.rb#37 + def last_result; end + + # Sets the attribute last_result + # + # @param value the value to set the attribute last_result to. + # + # source://pry//lib/pry/pry_instance.rb#37 + def last_result=(_arg0); end + + # @return [Boolean] True if the last result is an exception that was raised, + # as opposed to simply an instance of Exception (like the result of + # Exception.new) + # + # source://pry//lib/pry/pry_instance.rb#440 + def last_result_is_exception?; end + + # @return [Integer] The maximum amount of objects remembered by the inp and + # out arrays. Defaults to 100. + # + # source://pry//lib/pry/pry_instance.rb#190 + def memory_size; end + + # source://pry//lib/pry/pry_instance.rb#195 + def memory_size=(size); end + + # Returns an output device + # + # @example + # pry_instance.output.puts "ohai!" + # + # source://pry//lib/pry/pry_instance.rb#538 + def output; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#48 + def output_ring; end + + # Returns the currently configured pager + # + # @example + # pry_instance.pager.page text + # + # source://pry//lib/pry/pry_instance.rb#530 + def pager; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager=(*args, **_arg1, &block); end + + # Pops the current prompt off of the prompt stack. If the prompt you are + # popping is the last prompt, it will not be popped. Use this to restore the + # previous prompt. + # + # @example + # pry = Pry.new(prompt: Pry::Prompt[:my_prompt1]) + # pry.push_prompt(Pry::Prompt[:my_prompt2]) + # pry.pop_prompt # => prompt2 + # pry.pop_prompt # => prompt1 + # pry.pop_prompt # => prompt1 + # @return [Pry::Prompt] the prompt being popped + # + # source://pry//lib/pry/pry_instance.rb#522 + def pop_prompt; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print=(*args, **_arg1, &block); end + + # If the given line is a valid command, process it in the context of the + # current `eval_string` and binding. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#325 + def process_command(val); end + + # Same as process_command, but outputs exceptions to `#output` instead of + # raising. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#360 + def process_command_safely(val); end + + # This is the prompt at the top of the prompt stack. + # + # @return [Pry::Prompt] the current prompt + # + # source://pry//lib/pry/pry_instance.rb#101 + def prompt; end + + # Sets the Pry prompt. + # + # @param new_prompt [Pry::Prompt] + # @return [void] + # + # source://pry//lib/pry/pry_instance.rb#108 + def prompt=(new_prompt); end + + # Push a binding for the given object onto the stack. If this instance is + # currently stopped, mark it as usable again. + # + # source://pry//lib/pry/pry_instance.rb#131 + def push_binding(object); end + + # Initialize this instance by pushing its initial context into the binding + # stack. If no target is given, start at the top level. + # + # source://pry//lib/pry/pry_instance.rb#118 + def push_initial_binding(target = T.unsafe(nil)); end + + # Pushes the current prompt onto a stack that it can be restored from later. + # Use this if you wish to temporarily change the prompt. + # + # @example + # push_prompt(Pry::Prompt[:my_prompt]) + # @param new_prompt [Pry::Prompt] + # @return [Pry::Prompt] new_prompt + # + # source://pry//lib/pry/pry_instance.rb#506 + def push_prompt(new_prompt); end + + # Convenience accessor for the `quiet` config key. + # + # @return [Boolean] + # + # source://pry//lib/pry/pry_instance.rb#592 + def quiet?; end + + # source://pry//lib/pry/pry_instance.rb#582 + def raise_up(*args); end + + # source://pry//lib/pry/pry_instance.rb#586 + def raise_up!(*args); end + + # Raise an exception out of Pry. + # + # See Kernel#raise for documentation of parameters. + # See rb_make_exception for the inbuilt implementation. + # + # This is necessary so that the raise-up command can tell the + # difference between an exception the user has decided to raise, + # and a mistake in specifying that exception. + # + # (i.e. raise-up RunThymeError.new should not be the same as + # raise-up NameError, "unititialized constant RunThymeError") + # + # @raise [TypeError] + # + # source://pry//lib/pry/pry_instance.rb#554 + def raise_up_common(force, *args); end + + # Potentially deprecated. Use `Pry::REPL.new(pry, :target => target).start` + # (If nested sessions are going to exist, this method is fine, but a goal is + # to come up with an alternative to nested sessions altogether.) + # + # source://pry//lib/pry/pry_instance.rb#282 + def repl(target = T.unsafe(nil)); end + + # Reset the current eval string. If the user has entered part of a multiline + # expression, this discards that input. + # + # source://pry//lib/pry/pry_instance.rb#231 + def reset_eval_string; end + + # Run the specified command. + # + # @example + # pry_instance.run_command("ls -m") + # @param val [String] The command (and its params) to execute. + # @return [Pry::Command::VOID_VALUE] + # + # source://pry//lib/pry/pry_instance.rb#375 + def run_command(val); end + + # Returns the appropriate prompt to use. + # + # @return [String] The prompt. + # + # source://pry//lib/pry/pry_instance.rb#453 + def select_prompt; end + + # Set the last result of an eval. + # This method should not need to be invoked directly. + # + # @param result [Object] The result. + # @param code [String] The code that was run. + # + # source://pry//lib/pry/pry_instance.rb#409 + def set_last_result(result, code = T.unsafe(nil)); end + + # Whether the print proc should be invoked. + # Currently only invoked if the output is not suppressed. + # + # @return [Boolean] Whether the print proc should be invoked. + # + # source://pry//lib/pry/pry_instance.rb#447 + def should_print?; end + + # Output the result or pass to an exception handler (if result is an exception). + # + # source://pry//lib/pry/pry_instance.rb#298 + def show_result(result); end + + # source://pry//lib/pry/pry_instance.rb#216 + def sticky_locals; end + + # Returns the value of attribute suppress_output. + # + # source://pry//lib/pry/pry_instance.rb#36 + def suppress_output; end + + # Sets the attribute suppress_output + # + # @param value the value to set the attribute suppress_output to. + # + # source://pry//lib/pry/pry_instance.rb#36 + def suppress_output=(_arg0); end + + # Update Pry's internal state after evalling code. + # This method should not need to be invoked directly. + # + # @param code [String] The code we just eval'd + # + # source://pry//lib/pry/pry_instance.rb#428 + def update_input_history(code); end + + private + + # Force `eval_string` into the encoding of `val`. [Issue #284] + # + # source://pry//lib/pry/pry_instance.rb#680 + def ensure_correct_encoding!(val); end + + # source://pry//lib/pry/pry_instance.rb#688 + def generate_prompt(prompt_proc, conf); end + + # source://pry//lib/pry/pry_instance.rb#598 + def handle_line(line, options); end + + # the array that the prompt stack is stored in + # + # source://pry//lib/pry/pry_instance.rb#697 + def prompt_stack; end + + class << self + # Convert the given object into an instance of `Pry::Code`, if it isn't + # already one. + # + # @param obj [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, IO] + # + # source://pry//lib/pry/code.rb#12 + def Code(obj); end + + # If the given object is a `Pry::Method`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::Method` instance. + # + # source://pry//lib/pry/method.rb#9 + def Method(obj); end + + # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::WrappedModule` instance. + # + # source://pry//lib/pry/wrapped_module.rb#7 + def WrappedModule(obj); end + + # source://pry//lib/pry/pry_class.rb#294 + def auto_resize!; end + + # Return a `Binding` object for `target` or return `target` if it is + # already a `Binding`. + # In the case where `target` is top-level then return `TOPLEVEL_BINDING` + # + # @param target [Object] The object to get a `Binding` object for. + # @return [Binding] The `Binding` object. + # + # source://pry//lib/pry/pry_class.rb#347 + def binding_for(target); end + + # Returns the value of attribute cli. + # + # source://pry//lib/pry/pry_class.rb#22 + def cli; end + + # Sets the attribute cli + # + # @param value the value to set the attribute cli to. + # + # source://pry//lib/pry/pry_class.rb#22 + def cli=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def commands=(*args, **_arg1, &block); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_class.rb#25 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://pry//lib/pry/pry_class.rb#25 + def config=(_arg0); end + + # @example + # Pry.configure do |config| + # config.eager_load! # optional + # config.input = # .. + # config.foo = 2 + # end + # @yield [config] Yields a block with {Pry.config} as its argument. + # + # source://pry//lib/pry/pry_class.rb#46 + def configure; end + + # source://pry//lib/pry/pry_class.rb#380 + def critical_section; end + + # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. + # + # source://pry//lib/pry/pry_class.rb#63 + def current; end + + # Returns the value of attribute current_line. + # + # source://pry//lib/pry/pry_class.rb#19 + def current_line; end + + # Sets the attribute current_line + # + # @param value the value to set the attribute current_line to. + # + # source://pry//lib/pry/pry_class.rb#19 + def current_line=(_arg0); end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_class.rb#18 + def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_class.rb#18 + def custom_completions=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def editor=(*args, **_arg1, &block); end + + # Returns the value of attribute eval_path. + # + # source://pry//lib/pry/pry_class.rb#21 + def eval_path; end + + # Sets the attribute eval_path + # + # @param value the value to set the attribute eval_path to. + # + # source://pry//lib/pry/pry_class.rb#21 + def eval_path=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exception_handler=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#139 + def final_session_setup; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def history(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def history=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def hooks=(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#375 + def in_critical_section?; end + + # Basic initialization. + # + # source://pry//lib/pry/pry_class.rb#338 + def init; end + + # @return [Boolean] Whether this is the first time a Pry session has + # been started since loading the Pry class. + # + # source://pry//lib/pry/pry_class.rb#257 + def initial_session?; end + + # Do basic setup for initial session including: loading pryrc, plugins, + # requires, and history. + # + # source://pry//lib/pry/pry_class.rb#129 + def initial_session_setup; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input=(*args, **_arg1, &block); end + + # Returns the value of attribute last_internal_error. + # + # source://pry//lib/pry/pry_class.rb#24 + def last_internal_error; end + + # Sets the attribute last_internal_error + # + # @param value the value to set the attribute last_internal_error to. + # + # source://pry//lib/pry/pry_class.rb#24 + def last_internal_error=(_arg0); end + + # Returns the value of attribute line_buffer. + # + # source://pry//lib/pry/pry_class.rb#20 + def line_buffer; end + + # Sets the attribute line_buffer + # + # @param value the value to set the attribute line_buffer to. + # + # source://pry//lib/pry/pry_class.rb#20 + def line_buffer=(_arg0); end + + # Load the given file in the context of `Pry.toplevel_binding` + # + # @param file [String] The unexpanded file path. + # + # source://pry//lib/pry/pry_class.rb#69 + def load_file_at_toplevel(file); end + + # Execute the file through the REPL loop, non-interactively. + # + # @param file_name [String] File name to load through the REPL. + # + # source://pry//lib/pry/pry_class.rb#202 + def load_file_through_repl(file_name); end + + # Load Readline history if required. + # + # source://pry//lib/pry/pry_class.rb#251 + def load_history; end + + # Load RC files if appropriate This method can also be used to reload the + # files if they have changed. + # + # source://pry//lib/pry/pry_class.rb#77 + def load_rc_files; end + + # Load any Ruby files specified with the -r flag on the command line. + # + # source://pry//lib/pry/pry_class.rb#101 + def load_requires; end + + # Trap interrupts on jruby, and make them behave like MRI so we can + # catch them. + # + # source://pry//lib/pry/pry_class.rb#109 + def load_traps; end + + # source://pry//lib/pry/pry_class.rb#113 + def load_win32console; end + + # @return [main] returns the special instance of Object, "main". + # + # source://pry//lib/pry/pry_class.rb#55 + def main; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def memory_size(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def memory_size=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def pager=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def print=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prompt(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def prompt=(*args, **_arg1, &block); end + + # Returns the value of attribute quiet. + # + # source://pry//lib/pry/pry_class.rb#23 + def quiet; end + + # Sets the attribute quiet + # + # @param value the value to set the attribute quiet to. + # + # source://pry//lib/pry/pry_class.rb#23 + def quiet=(_arg0); end + + # Load the local RC file (./.pryrc) + # + # source://pry//lib/pry/pry_class.rb#86 + def rc_files_to_load; end + + # Expand a file to its canonical name (following symlinks as appropriate) + # + # source://pry//lib/pry/pry_class.rb#94 + def real_path_to(file); end + + # Set all the configurable options back to their default values + # + # source://pry//lib/pry/pry_class.rb#326 + def reset_defaults; end + + # Run a Pry command from outside a session. The commands available are + # those referenced by `Pry.config.commands` (the default command set). + # + # @example Run under Pry class, returning only public methods. + # Pry.run_command "ls -m", :target => Pry + # @example Run at top-level with no output. + # Pry.run_command "ls" + # @example Display command output. + # Pry.run_command "ls -av", :show_output => true + # @option options + # @option options + # @param command_string [String] The Pry command (including arguments, + # if any). + # @param options [Hash] Optional named parameters. + # @return [nil] + # + # source://pry//lib/pry/pry_class.rb#277 + def run_command(command_string, options = T.unsafe(nil)); end + + # Start a Pry REPL. + # This method also loads `pryrc` as necessary the first time it is invoked. + # + # @example + # Pry.start(Object.new, :input => MyInput.new) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param target [Object, Binding] The receiver of the Pry session + # @param options [Hash] + # + # source://pry//lib/pry/pry_class.rb#156 + def start(target = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://pry//lib/pry/pry_class.rb#354 + def toplevel_binding; end + + # Sets the attribute toplevel_binding + # + # @param value the value to set the attribute toplevel_binding to. + # + # source://pry//lib/pry/pry_class.rb#372 + def toplevel_binding=(_arg0); end + + # An inspector that clips the output to `max_length` chars. + # In case of > `max_length` chars the `# notation is used. + # + # @option options + # @option options + # @param obj [Object] The object to view. + # @param options [Hash] + # @return [String] The string representation of `obj`. + # + # source://pry//lib/pry/pry_class.rb#225 + def view_clip(obj, options = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#388 + def mutex_available?; end + end +end + +# @return [Array] Code of the method used when implementing Pry's +# __binding__, along with line indication to be used with instance_eval (and +# friends). +# @see Object#__binding__ +# +# source://pry//lib/pry/core_extensions.rb#9 +Pry::BINDING_METHOD_IMPL = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/basic_object.rb#4 +class Pry::BasicObject < ::BasicObject + include ::Kernel +end + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Dir = Dir + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::File = File + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Kernel = Kernel + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::LoadError = LoadError + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Pry = Pry + +# A super-class for Commands that are created with a single block. +# +# This class ensures that the block is called with the correct number of +# arguments and the right context. +# +# Create subclasses using {Pry::CommandSet#command}. +# +# source://pry//lib/pry/block_command.rb#10 +class Pry::BlockCommand < ::Pry::Command + # Call the block that was registered with this command. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of the block + # + # source://pry//lib/pry/block_command.rb#14 + def call(*args); end + + # source://pry//lib/pry/block_command.rb#18 + def help; end +end + +# Manage the processing of command line options +# +# source://pry//lib/pry/cli.rb#7 +class Pry::CLI + class << self + # Add a block responsible for processing parsed options. + # + # source://pry//lib/pry/cli.rb#39 + def add_option_processor(&block); end + + # Add another set of CLI options (a Pry::Slop block) + # + # source://pry//lib/pry/cli.rb#24 + def add_options(&block); end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 + def input_args; end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 + def input_args=(_arg0); end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 + def option_processors; end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 + def option_processors=(_arg0); end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 + def options; end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 + def options=(_arg0); end + + # source://pry//lib/pry/cli.rb#52 + def parse_options(args = T.unsafe(nil)); end + + # Clear `options` and `option_processors` + # + # source://pry//lib/pry/cli.rb#47 + def reset; end + + # source://pry//lib/pry/cli.rb#90 + def start(opts); end + end +end + +# source://pry//lib/pry/cli.rb#8 +class Pry::CLI::NoOptionsError < ::StandardError; end + +# A super-class of Commands with structure. +# +# This class implements the bare-minimum functionality that a command should +# have, namely a --help switch, and then delegates actual processing to its +# subclasses. +# +# Create subclasses using {Pry::CommandSet#create_command}, and override the +# `options(opt)` method to set up an instance of Pry::Slop, and the `process` +# method to actually run the command. If necessary, you can also override +# `setup` which will be called before `options`, for example to require any +# gems your command needs to run, or to set up state. +# +# source://pry//lib/pry/class_command.rb#15 +class Pry::ClassCommand < ::Pry::Command + # Returns the value of attribute args. + # + # source://pry//lib/pry/class_command.rb#64 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://pry//lib/pry/class_command.rb#64 + def args=(_arg0); end + + # Set up `opts` and `args`, and then call `process`. + # + # This method will display help if necessary. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of `process` or VOID_VALUE + # + # source://pry//lib/pry/class_command.rb#72 + def call(*args); end + + # Generate shell completions + # + # @param search [String] The line typed so far + # @return [Array] the words to complete + # + # source://pry//lib/pry/class_command.rb#105 + def complete(search); end + + # Return the help generated by Pry::Slop for this command. + # + # source://pry//lib/pry/class_command.rb#87 + def help; end + + # A method to setup Pry::Slop so it can parse the options your command expects. + # + # method, as it may be called by Pry at any time for introspection reasons. + # If you need to set up default values, use `setup` instead. + # + # @example + # def options(opt) + # opt.banner "Gists methods or classes" + # opt.on(:c, :class, "gist a class") do + # @action = :class + # end + # end + # @note Please don't do anything side-effecty in the main part of this + # + # source://pry//lib/pry/class_command.rb#171 + def options(opt); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/class_command.rb#63 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/class_command.rb#63 + def opts=(_arg0); end + + # The actual body of your command should go here. + # + # The `opts` mehod can be called to get the options that Pry::Slop has passed, + # and `args` gives the remaining, unparsed arguments. + # + # The return value of this method is discarded unless the command was + # created with `:keep_retval => true`, in which case it is returned to the + # repl. + # + # @example + # def process + # if opts.present?(:class) + # gist_class + # else + # gist_method + # end + # end + # @raise [CommandError] + # + # source://pry//lib/pry/class_command.rb#190 + def process; end + + # A method called just before `options(opt)` as part of `call`. + # + # This method can be used to set up any context your command needs to run, + # for example requiring gems, or setting default values for options. + # + # @example + # def setup + # require 'gist' + # @action = :method + # end + # + # source://pry//lib/pry/class_command.rb#121 + def setup; end + + # Return an instance of Pry::Slop that can parse either subcommands or the + # options that this command accepts. + # + # source://pry//lib/pry/class_command.rb#93 + def slop; end + + # A method to setup Pry::Slop commands so it can parse the subcommands your + # command expects. If you need to set up default values, use `setup` + # instead. + # + # @example A minimal example + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # + # run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # end + # end + # @example Define the invokation block anywhere you want + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # end + # end + # + # def process + # # Perform calculations... + # opts.fetch_command(:download).run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # # More calculations... + # end + # + # source://pry//lib/pry/class_command.rb#156 + def subcommands(cmd); end + + class << self + # source://pry//lib/pry/class_command.rb#29 + def doc; end + + # source://pry//lib/pry/class_command.rb#37 + def file; end + + # Ensure that subclasses inherit the options, description and + # match from a ClassCommand super class. + # + # source://pry//lib/pry/class_command.rb#19 + def inherited(klass); end + + # source://pry//lib/pry/class_command.rb#42 + def line; end + + # source://pry//lib/pry/class_command.rb#25 + def source; end + + # source://pry//lib/pry/class_command.rb#37 + def source_file; end + + # source://pry//lib/pry/class_command.rb#42 + def source_line; end + + # source://pry//lib/pry/class_command.rb#33 + def source_location; end + + private + + # The object used to extract the source for the command. + # + # This should be a `Pry::Method(block)` for a command made with `create_command` + # and a `Pry::WrappedModule(self)` for a command that's a standard class. + # + # @return [Pry::WrappedModule, Pry::Method] + # + # source://pry//lib/pry/class_command.rb#54 + def source_object; end + end +end + +# `Pry::Code` is a class that encapsulates lines of source code and their +# line numbers and formats them for terminal output. It can read from a file +# or method definition or be instantiated with a `String` or an `Array`. +# +# In general, the formatting methods in `Code` return a new `Code` object +# which will format the text as specified when `#to_s` is called. This allows +# arbitrary chaining of formatting methods without mutating the original +# object. +# +# source://pry//lib/pry/code.rb#32 +class Pry::Code + extend ::MethodSource::CodeHelpers + + # Instantiate a `Code` object containing code from the given `Array`, + # `String`, or `IO`. The first line will be line 1 unless specified + # otherwise. If you need non-contiguous line numbers, you can create an + # empty `Code` object and then use `#push` to insert the lines. + # + # @param lines [Array, String, IO] + # @param start_line [Integer?] + # @param code_type [Symbol?] + # @return [Code] a new instance of Code + # + # source://pry//lib/pry/code.rb#87 + def initialize(lines = T.unsafe(nil), start_line = T.unsafe(nil), code_type = T.unsafe(nil)); end + + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#102 + def <<(line); end + + # Two `Code` objects are equal if they contain the same lines with the same + # numbers. Otherwise, call `to_s` and `chomp` and compare as Strings. + # + # @param other [Code, Object] + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#325 + def ==(other); end + + # Remove all lines except for the +lines+ after and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#195 + def after(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ on either side of and including + # +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#182 + def around(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ up to and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#168 + def before(lineno, lines = T.unsafe(nil)); end + + # Remove all lines that aren't in the given range, expressed either as a + # `Range` object or a first and last line number (inclusive). Negative + # indices count from the end of the array of lines. + # + # @param start_line [Range, Integer] + # @param end_line [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#135 + def between(start_line, end_line = T.unsafe(nil)); end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 + def code_type; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 + def code_type=(_arg0); end + + # Get the comment that describes the expression on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#286 + def comment_describing(line_number); end + + # Get the multiline expression that starts on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#294 + def expression_at(line_number, consume = T.unsafe(nil)); end + + # Remove all lines that don't match the given `pattern`. + # + # @param pattern [Regexp] + # @return [Code] + # + # source://pry//lib/pry/code.rb#207 + def grep(pattern); end + + # @return [String] a (possibly highlighted) copy of the source code. + # + # source://pry//lib/pry/code.rb#263 + def highlighted; end + + # Return the number of lines stored. + # + # @return [Integer] + # + # source://pry//lib/pry/code.rb#316 + def length; end + + # @return [Integer] the number of digits in the last line. + # + # source://pry//lib/pry/code.rb#252 + def max_lineno_width; end + + # Forward any missing methods to the output of `#to_s`. + # + # source://pry//lib/pry/code.rb#335 + def method_missing(method_name, *args, &block); end + + # Get the (approximate) Module.nesting at the give line number. + # + # @param line_number [Integer] line number starting from 1 + # @return [Array] a list of open modules. + # + # source://pry//lib/pry/code.rb#302 + def nesting_at(line_number); end + + # Writes a formatted representation (based on the configuration of the + # object) to the given output, which must respond to `#<<`. + # + # source://pry//lib/pry/code.rb#269 + def print_to_output(output, color = T.unsafe(nil)); end + + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#102 + def push(line); end + + # Return an unformatted String of the code. + # + # @return [String] + # + # source://pry//lib/pry/code.rb#309 + def raw; end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#122 + def reject(&block); end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#112 + def select(&block); end + + # Take `num_lines` from `start_line`, forward or backwards. + # + # @param start_line [Integer] + # @param num_lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#150 + def take_lines(start_line, num_lines); end + + # @return [String] a formatted representation (based on the configuration of + # the object). + # + # source://pry//lib/pry/code.rb#258 + def to_s; end + + # Format output with the specified number of spaces in front of every line, + # unless `spaces` is falsy. + # + # @param spaces [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#244 + def with_indentation(spaces = T.unsafe(nil)); end + + # Format output with line numbers next to it, unless `y_n` is falsy. + # + # @param y_n [Boolean?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#221 + def with_line_numbers(y_n = T.unsafe(nil)); end + + # Format output with a marker next to the given +lineno+, unless +lineno+ is + # falsy. + # + # @param lineno [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#232 + def with_marker(lineno = T.unsafe(nil)); end + + protected + + # An abstraction of the `dup.instance_eval` pattern used throughout this + # class. + # + # source://pry//lib/pry/code.rb#353 + def alter(&block); end + + private + + # Check whether String responds to missing methods. + # + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#345 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Instantiate a `Code` object containing code loaded from a file or + # Pry's line buffer. + # + # @param filename [String] The name of a file, or "(pry)". + # @param code_type [Symbol] The type of code the file contains. + # @return [Code] + # + # source://pry//lib/pry/code.rb#42 + def from_file(filename, code_type = T.unsafe(nil)); end + + # Instantiate a `Code` object containing code extracted from a + # `::Method`, `UnboundMethod`, `Proc`, or `Pry::Method` object. + # + # @param meth [::Method, UnboundMethod, Proc, Pry::Method] The method + # object. + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#55 + def from_method(meth, start_line = T.unsafe(nil)); end + + # Attempt to extract the source code for module (or class) `mod`. + # + # @param mod [Module, Class] The module (or class) of interest. + # @param candidate_rank [Integer] The module candidate (by rank) + # to use (see `Pry::WrappedModule::Candidate` for more information). + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#69 + def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end + end +end + +# Represents a range of lines in a code listing. +# +# @api private +# +# source://pry//lib/pry/code/code_range.rb#8 +class Pry::Code::CodeRange + # @api private + # @param start_line [Integer] + # @param end_line [Integer?] + # @return [CodeRange] a new instance of CodeRange + # + # source://pry//lib/pry/code/code_range.rb#11 + def initialize(start_line, end_line = T.unsafe(nil)); end + + # @api private + # @param lines [Array] + # @return [Range] + # + # source://pry//lib/pry/code/code_range.rb#19 + def indices_range(lines); end + + private + + # @api private + # + # source://pry//lib/pry/code/code_range.rb#27 + def end_line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#57 + def find_end_index(lines); end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#50 + def find_start_index(lines); end + + # If `end_line` is equal to `nil`, then calculate it from the first + # parameter, `start_line`. Otherwise, leave it as it is. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#32 + def force_set_end_line; end + + # Finds indices of `start_line` and `end_line` in the given Array of + # +lines+. + # + # @api private + # @param lines [Array] + # @return [Array] + # + # source://pry//lib/pry/code/code_range.rb#45 + def indices(lines); end + + # For example, if the range is 4..10, then `start_line` would be equal to + # 4 and `end_line` to 10. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#66 + def set_end_line_from_range; end + + # @api private + # + # source://pry//lib/pry/code/code_range.rb#25 + def start_line; end +end + +# Represents a line of code (which may, in fact, contain multiple lines if +# the entirety was eval'd as a single unit following the `edit` command). +# +# A line of code is a tuple, which consists of a line and a line number. A +# `LOC` object's state (namely, the line parameter) can be changed via +# instance methods. `Pry::Code` heavily uses this class. +# +# @api private +# @example +# loc = LOC.new("def example\n :example\nend", 1) +# puts loc.line +# def example +# :example +# end +# #=> nil +# +# loc.indent(3) +# loc.line #=> " def example\n :example\nend" +# +# source://pry//lib/pry/code/loc.rb#23 +class Pry::Code::LOC + # @api private + # @param line [String] The line of code. + # @param lineno [Integer] The position of the +line+. + # @return [LOC] a new instance of LOC + # + # source://pry//lib/pry/code/loc.rb#29 + def initialize(line, lineno); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/code/loc.rb#34 + def ==(other); end + + # Prepends the line number `lineno` to the `line`. + # + # @api private + # @param max_width [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#64 + def add_line_number(max_width = T.unsafe(nil), color = T.unsafe(nil)); end + + # Prepends a marker "=>" or an empty marker to the +line+. + # + # @api private + # @param marker_lineno [Integer] If it is equal to the `lineno`, then + # prepend a hashrocket. Otherwise, an empty marker. + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#81 + def add_marker(marker_lineno); end + + # Paints the `line` of code. + # + # @api private + # @param code_type [Symbol] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#56 + def colorize(code_type); end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#38 + def dup; end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#98 + def handle_multiline_entries_from_edit_command(line, max_width); end + + # Indents the `line` with +distance+ spaces. + # + # @api private + # @param distance [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#94 + def indent(distance); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/code/loc.rb#43 + def line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/loc.rb#48 + def lineno; end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/code/loc.rb#25 + def tuple; end +end + +# source://pry//lib/pry/code/code_file.rb#6 +class Pry::CodeFile + # @param filename [String] The name of a file with code to be detected + # @param code_type [Symbol] The type of code the `filename` contains + # @return [CodeFile] a new instance of CodeFile + # + # source://pry//lib/pry/code/code_file.rb#41 + def initialize(filename, code_type = T.unsafe(nil)); end + + # @return [String] The code contained in the current `@filename`. + # + # source://pry//lib/pry/code/code_file.rb#47 + def code; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code/code_file.rb#37 + def code_type; end + + private + + # @raise [MethodSource::SourceNotFoundError] if the `filename` is not + # readable for some reason. + # @return [String] absolute path for the given `filename`. + # + # source://pry//lib/pry/code/code_file.rb#64 + def abs_path; end + + # @return [Array] All the paths that contain code that Pry can use for its + # API's. Skips directories. + # + # source://pry//lib/pry/code/code_file.rb#80 + def code_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#110 + def from_load_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#105 + def from_pry_init_pwd; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#100 + def from_pwd; end + + # @param path [String] + # @return [Boolean] if the path, with or without the default ext, + # is a readable file then `true`, otherwise `false`. + # + # source://pry//lib/pry/code/code_file.rb#73 + def readable?(path); end + + # @param filename [String] + # @param default [Symbol] (:unknown) the file type to assume if none could be + # detected. + # @return [Symbol, nil] The SyntaxHighlighter type of a file from its + # extension, or `nil` if `:unknown`. + # + # source://pry//lib/pry/code/code_file.rb#89 + def type_from_filename(filename, default = T.unsafe(nil)); end +end + +# source://pry//lib/pry/code/code_file.rb#7 +Pry::CodeFile::DEFAULT_EXT = T.let(T.unsafe(nil), String) + +# List of all supported languages. +# +# @return [Hash] +# +# source://pry//lib/pry/code/code_file.rb#11 +Pry::CodeFile::EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/code/code_file.rb#28 +Pry::CodeFile::FILES = T.let(T.unsafe(nil), Hash) + +# Store the current working directory. This allows show-source etc. to work if +# your process has changed directory since boot. [Issue #675] +# +# source://pry//lib/pry/code/code_file.rb#34 +Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) + +# This class is responsible for taking a string (identifying a +# command/class/method/etc) and returning the relevant type of object. +# For example, if the user looks up "show-source" then a +# `Pry::Command` will be returned. Alternatively, if the user passes in "Pry#repl" then +# a `Pry::Method` object will be returned. +# +# The `CodeObject.lookup` method is responsible for 1. figuring out what kind of +# object the user wants (applying precedence rules in doing so -- i.e methods +# get precedence over commands with the same name) and 2. Returning +# the appropriate object. If the user fails to provide a string +# identifer for the object (i.e they pass in `nil` or "") then the +# object looked up will be the 'current method' or 'current class' +# associated with the Binding. +# +# TODO: This class is a clusterfuck. We need a much more robust +# concept of what a "Code Object" really is. Currently +# commands/classes/candidates/methods and so on just share a very +# ill-defined interface. +# +# source://pry//lib/pry/code_object.rb#22 +class Pry::CodeObject + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [CodeObject] a new instance of CodeObject + # + # source://pry//lib/pry/code_object.rb#82 + def initialize(str, pry_instance, options = T.unsafe(nil)); end + + # TODO: just make it so find_command_by_match_or_listing doesn't raise? + # + # source://pry//lib/pry/code_object.rb#94 + def command_lookup; end + + # lookup variables and constants and `self` that are not modules + # + # source://pry//lib/pry/code_object.rb#118 + def default_lookup; end + + # when no paramter is given (i.e CodeObject.lookup(nil)), then we + # lookup the 'current object' from the binding. + # + # source://pry//lib/pry/code_object.rb#102 + def empty_lookup; end + + # source://pry//lib/pry/code_object.rb#136 + def method_or_class_lookup; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/code_object.rb#79 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/code_object.rb#79 + def pry_instance=(_arg0); end + + # Returns the value of attribute str. + # + # source://pry//lib/pry/code_object.rb#77 + def str; end + + # Sets the attribute str + # + # @param value the value to set the attribute str to. + # + # source://pry//lib/pry/code_object.rb#77 + def str=(_arg0); end + + # Returns the value of attribute super_level. + # + # source://pry//lib/pry/code_object.rb#80 + def super_level; end + + # Sets the attribute super_level + # + # @param value the value to set the attribute super_level to. + # + # source://pry//lib/pry/code_object.rb#80 + def super_level=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/code_object.rb#78 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/code_object.rb#78 + def target=(_arg0); end + + private + + # Returns true if `str` looks like a method, i.e Klass#method + # We need to consider this case because method lookups should fall + # through to the `method_or_class_lookup()` method but a + # defined?() on a "Klass#method` string will see the `#` as a + # comment and only evaluate the `Klass` part. + # + # @param str [String] + # @return [Boolean] Whether the string looks like an instance method. + # + # source://pry//lib/pry/code_object.rb#163 + def looks_like_an_instance_method?(str); end + + # grab the nth (`super_level`) super of `obj + # + # @param obj [Object] + # @param super_level [Fixnum] How far up the super chain to ascend. + # @raise [Pry::CommandError] + # + # source://pry//lib/pry/code_object.rb#188 + def lookup_super(obj, super_level); end + + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::WrappedModule + # + # @param str [String] The string to lookup + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#173 + def safe_to_evaluate?(str); end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#152 + def sourcable_object?(obj); end + + # source://pry//lib/pry/code_object.rb#181 + def target_self; end + + class << self + # source://pry//lib/pry/code_object.rb#69 + def lookup(str, pry_instance, options = T.unsafe(nil)); end + end +end + +# source://pry//lib/pry/code_object.rb#23 +module Pry::CodeObject::Helpers + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#30 + def c_method?; end + + # @note If a module defined by C was extended with a lot of methods written + # in Ruby, this method would fail. + # @return [Boolean] `true` if this module was defined by means of the C API, + # `false` if it's a Ruby module. + # + # source://pry//lib/pry/code_object.rb#46 + def c_module?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#38 + def command?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#34 + def module_with_yard_docs?; end + + # we need this helper as some Pry::Method objects can wrap Procs + # + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#26 + def real_method_object?; end +end + +# PP subclass for streaming inspect output in color. +# +# source://pry//lib/pry/color_printer.rb#8 +class Pry::ColorPrinter < ::PP + # source://pry//lib/pry/color_printer.rb#25 + def pp(object); end + + # source://pry//lib/pry/color_printer.rb#37 + def text(str, max_width = T.unsafe(nil)); end + + private + + # source://pry//lib/pry/color_printer.rb#49 + def highlight_object_literal(object_literal); end + + # source://pry//lib/pry/color_printer.rb#55 + def inspect_object(object); end + + class << self + # source://pry//lib/pry/color_printer.rb#11 + def default(_output, value, pry_instance); end + + # source://pry//lib/pry/color_printer.rb#18 + def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end + end +end + +# N.B. using a regular expresion here so that "raise-up 'foo'" does the right thing. +# +# source://pry//lib/pry/command.rb#11 +class Pry::Command + include ::Pry::Helpers::BaseHelpers + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + include ::Pry::Helpers::Text + extend ::Pry::Helpers::DocumentationHelpers + extend ::Pry::CodeObject::Helpers + + # Instantiate a command, in preparation for calling it. + # + # @param context [Hash] The runtime context to use with this command. + # @return [Command] a new instance of Command + # + # source://pry//lib/pry/command.rb#230 + def initialize(context = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#292 + def _pry_; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#217 + def _pry_=(_arg0); end + + # Returns the value of attribute arg_string. + # + # source://pry//lib/pry/command.rb#213 + def arg_string; end + + # Sets the attribute arg_string + # + # @param value the value to set the attribute arg_string to. + # + # source://pry//lib/pry/command.rb#213 + def arg_string=(_arg0); end + + # source://pry//lib/pry/command.rb#253 + def block; end + + # Returns the value of attribute captures. + # + # source://pry//lib/pry/command.rb#211 + def captures; end + + # Sets the attribute captures + # + # @param value the value to set the attribute captures to. + # + # source://pry//lib/pry/command.rb#211 + def captures=(_arg0); end + + # Display a warning if a command collides with a local/method in + # the current scope. + # + # source://pry//lib/pry/command.rb#329 + def check_for_command_collision(command_match, arg_string); end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 + def command_block; end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 + def command_block=(_arg0); end + + # source://pry//lib/pry/command.rb#261 + def command_name; end + + # source://pry//lib/pry/command.rb#257 + def command_options; end + + # Returns the value of attribute command_set. + # + # source://pry//lib/pry/command.rb#215 + def command_set; end + + # Sets the attribute command_set + # + # @param value the value to set the attribute command_set to. + # + # source://pry//lib/pry/command.rb#215 + def command_set=(_arg0); end + + # source://pry//lib/pry/command.rb#284 + def commands; end + + # Generate completions for this command + # + # @param _search [String] The line typed so far + # @return [Array] Completion words + # + # source://pry//lib/pry/command.rb#411 + def complete(_search); end + + # Returns the value of attribute context. + # + # source://pry//lib/pry/command.rb#214 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://pry//lib/pry/command.rb#214 + def context=(_arg0); end + + # source://pry//lib/pry/command.rb#249 + def description; end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/command.rb#212 + def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/command.rb#212 + def eval_string=(_arg0); end + + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/command.rb#216 + def hooks; end + + # Sets the attribute hooks + # + # @param value the value to set the attribute hooks to. + # + # source://pry//lib/pry/command.rb#216 + def hooks=(_arg0); end + + # Revaluate the string (str) and perform interpolation. + # + # @param str [String] The string to reevaluate with interpolation. + # @return [String] The reevaluated string with interpolations + # applied (if any). + # + # source://pry//lib/pry/command.rb#318 + def interpolate_string(str); end + + # source://pry//lib/pry/command.rb#245 + def match; end + + # Make those properties accessible to instances + # + # source://pry//lib/pry/command.rb#241 + def name; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 + def output; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 + def output=(_arg0); end + + # Process a line that Command.matches? this command. + # + # @param line [String] The line to process + # @return [Object, Command::VOID_VALUE] + # + # source://pry//lib/pry/command.rb#394 + def process_line(line); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/command.rb#217 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#217 + def pry_instance=(_arg0); end + + # Run a command from another command. + # + # @example + # run "show-input" + # @example + # run ".ls" + # @example + # run "amend-line", "5", 'puts "hello world"' + # @param command_string [String] The string that invokes the command + # @param args [Array] Further arguments to pass to the command + # + # source://pry//lib/pry/command.rb#278 + def run(command_string, *args); end + + # source://pry//lib/pry/command.rb#265 + def source; end + + # @example + # state.my_state = "my state" # this will not conflict with any + # # `state.my_state` used in another command. + # @return [Hash] Pry commands can store arbitrary state + # here. This state persists between subsequent command invocations. + # All state saved here is unique to the command, it does not + # need to be namespaced. + # + # source://pry//lib/pry/command.rb#309 + def state; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/command.rb#210 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/command.rb#210 + def target=(_arg0); end + + # @return [Object] The value of `self` inside the `target` binding. + # + # source://pry//lib/pry/command.rb#298 + def target_self; end + + # Extract necessary information from a line that Command.matches? this + # command. + # + # Returns an array of four elements: + # + # ``` + # [String] the portion of the line that matched with the Command match + # [String] a string of all the arguments (i.e. everything but the match) + # [Array] the captures caught by the command_regex + # [Array] the arguments obtained by splitting the arg_string + # ``` + # + # @param val [String] The line of input + # @return [Array] + # + # source://pry//lib/pry/command.rb#356 + def tokenize(val); end + + # source://pry//lib/pry/command.rb#288 + def void; end + + private + + # source://pry//lib/pry/command.rb#485 + def after_hooks; end + + # source://pry//lib/pry/command.rb#481 + def before_hooks; end + + # Run the command with the given `args`. + # + # This is a public wrapper around `#call` which ensures all preconditions + # are met. + # + # @param args [Array] The arguments to pass to this command. + # @return [Object] The return value of the `#call` method, or + # {Command::VOID_VALUE}. + # + # source://pry//lib/pry/command.rb#425 + def call_safely(*args); end + + # Run the `#call` method and all the registered hooks. + # + # @param args [Array] The arguments to `#call` + # @return [Object] The return value from `#call` + # + # source://pry//lib/pry/command.rb#492 + def call_with_hooks(*args); end + + # source://pry//lib/pry/command.rb#476 + def find_hooks(event); end + + # Normalize method arguments according to its arity. + # + # @param method [Integer] + # @param args [Array] + # @return [Array] a (possibly shorter) array of the arguments to pass + # + # source://pry//lib/pry/command.rb#509 + def normalize_method_args(method, args); end + + # Pass a block argument to a command. + # + # @param arg_string [String] The arguments (as a string) passed to the command. + # We inspect these for a '| do' or a '| {' and if we find it we use it + # to start a block input sequence. Once we have a complete + # block, we save it to an accessor that can be retrieved from the command context. + # Note that if we find the '| do' or '| {' we delete this and the + # elements following it from `arg_string`. + # + # source://pry//lib/pry/command.rb#451 + def pass_block(arg_string); end + + # source://pry//lib/pry/command.rb#436 + def use_unpatched_symbol; end + + class << self + # Define or get the command's banner + # + # source://pry//lib/pry/command.rb#61 + def banner(arg = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#66 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://pry//lib/pry/command.rb#30 + def block=(_arg0); end + + # source://pry//lib/pry/command.rb#109 + def command_name; end + + # Define or get the command's options + # + # source://pry//lib/pry/command.rb#51 + def command_options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#32 + def command_options=(_arg0); end + + # source://pry//lib/pry/command.rb#165 + def command_regex; end + + # source://pry//lib/pry/command.rb#172 + def convert_to_regex(obj); end + + # source://pry//lib/pry/command.rb#89 + def default_options(match); end + + # Define or get the command's description + # + # source://pry//lib/pry/command.rb#45 + def description(arg = T.unsafe(nil)); end + + # Sets the attribute description + # + # @param value the value to set the attribute description to. + # + # source://pry//lib/pry/command.rb#31 + def description=(_arg0); end + + # source://pry//lib/pry/command.rb#75 + def doc; end + + # source://pry//lib/pry/command.rb#79 + def file; end + + # The group in which the command should be displayed in "help" output. + # This is usually auto-generated from directory naming, but it can be + # manually overridden if necessary. + # Group should not be changed once it is initialized. + # + # source://pry//lib/pry/command.rb#185 + def group(name = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#105 + def inspect; end + + # source://pry//lib/pry/command.rb#84 + def line; end + + # source://pry//lib/pry/command.rb#35 + def match(arg = T.unsafe(nil)); end + + # Sets the attribute match + # + # @param value the value to set the attribute match to. + # + # source://pry//lib/pry/command.rb#33 + def match=(_arg0); end + + # How well does this command match the given line? + # + # Higher scores are better because they imply that this command matches + # the line more closely. + # + # The score is calculated by taking the number of characters at the start + # of the string that are used only to identify the command, not as part of + # the arguments. + # + # @example + # /\.(.*)/.match_score(".foo") #=> 1 + # /\.*(.*)/.match_score("...foo") #=> 3 + # 'hi'.match_score("hi there") #=> 2 + # @param val [String] A line input at the REPL + # @return [Fixnum] + # + # source://pry//lib/pry/command.rb#153 + def match_score(val); end + + # Should this command be called for the given line? + # + # @param val [String] A line input at the REPL + # @return [Boolean] + # + # source://pry//lib/pry/command.rb#133 + def matches?(val); end + + # source://pry//lib/pry/command.rb#101 + def name; end + + # Define or get the command's options + # backward compatibility + # + # source://pry//lib/pry/command.rb#51 + def options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#32 + def options=(_arg0); end + + # source://pry//lib/pry/command.rb#70 + def source; end + + # source://pry//lib/pry/command.rb#79 + def source_file; end + + # source://pry//lib/pry/command.rb#84 + def source_line; end + + # source://pry//lib/pry/command.rb#202 + def state; end + + # Create a new command with the given properties. + # + # @param match [String, Regex] The thing that triggers this command + # @param description [String] The description to appear in `help` + # @param options [Hash] Behavioral options (see {Pry::CommandSet#command}) + # @param helpers [Module] A module of helper functions to be included. + # @return [Class] (a subclass of {Pry::Command}) + # @yield optional, used for BlockCommands + # + # source://pry//lib/pry/command.rb#120 + def subclass(match, description, options, helpers, &block); end + end +end + +# source://pry//lib/pry/commands/amend_line.rb#5 +class Pry::Command::AmendLine < ::Pry::ClassCommand + # @raise [CommandError] + # + # source://pry//lib/pry/commands/amend_line.rb#22 + def process; end + + private + + # @return [String] A new string with the amendments applied to it. + # + # source://pry//lib/pry/commands/amend_line.rb#33 + def amend_input; end + + # source://pry//lib/pry/commands/amend_line.rb#47 + def delete_from_array(array, range); end + + # source://pry//lib/pry/commands/amend_line.rb#51 + def insert_into_array(array, range); end + + # @return [Fixnum] The number of lines currently in `eval_string` (the + # input buffer) + # + # source://pry//lib/pry/commands/amend_line.rb#62 + def line_count; end + + # The lines (or line) that will be modified by the `amend-line`. + # + # @return [Range, Fixnum] The lines or line. + # + # source://pry//lib/pry/commands/amend_line.rb#90 + def line_range; end + + # source://pry//lib/pry/commands/amend_line.rb#56 + def replace_in_array(array, range); end + + # Returns the (one-indexed) start and end lines given by the user. + # The lines in this range will be affected by the `amend-line`. + # Returns `nil` if no lines were specified by the user. + # + # @return [Array, nil] + # + # source://pry//lib/pry/commands/amend_line.rb#70 + def start_and_end_line_number; end + + # Takes two numbers that are 1-indexed, and returns a range (or + # number) that is 0-indexed. 1-indexed means the first element is + # indentified by 1 rather than by 0 (as is the case for Ruby arrays). + # + # @param start_line_number [Fixnum] One-indexed number. + # @param end_line_number [Fixnum] One-indexed number. + # @return [Range] The zero-indexed range. + # + # source://pry//lib/pry/commands/amend_line.rb#83 + def zero_indexed_range_from_one_indexed_numbers(start_line_number, end_line_number); end +end + +# source://pry//lib/pry/commands/bang.rb#5 +class Pry::Command::Bang < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang.rb#16 + def process; end +end + +# source://pry//lib/pry/commands/bang_pry.rb#5 +class Pry::Command::BangPry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang_pry.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/cat.rb#5 +class Pry::Command::Cat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cat.rb#53 + def complete(search); end + + # source://pry//lib/pry/commands/cat.rb#57 + def load_path_completions; end + + # source://pry//lib/pry/commands/cat.rb#23 + def options(opt); end + + # source://pry//lib/pry/commands/cat.rb#38 + def process; end +end + +# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 +class Pry::Command::Cat::AbstractFormatter + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + include ::Pry::Helpers::BaseHelpers + + private + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 + def between_lines; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 + def code_type; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 + def decorate(content); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#22 + def use_line_numbers?; end +end + +# source://pry//lib/pry/commands/cat/exception_formatter.rb#6 +class Pry::Command::Cat::ExceptionFormatter < ::Pry::Command::Cat::AbstractFormatter + include ::Pry::Helpers::Text + + # @return [ExceptionFormatter] a new instance of ExceptionFormatter + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#12 + def initialize(exception, pry_instance, opts); end + + # Returns the value of attribute ex. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#7 + def ex; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 + def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#8 + def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#9 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 + def backtrace_file; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 + def backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 + def backtrace_line; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#64 + def check_for_errors; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 + def code_window_size; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 + def header; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 + def increment_backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 + def start_and_end_line_for_code_window; end +end + +# source://pry//lib/pry/commands/cat/file_formatter.rb#6 +class Pry::Command::Cat::FileFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [FileFormatter] a new instance of FileFormatter + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#11 + def initialize(file_with_embedded_line, pry_instance, opts); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#27 + def file_and_line; end + + # Returns the value of attribute file_with_embedded_line. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#7 + def file_with_embedded_line; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#22 + def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#8 + def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#9 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/cat/file_formatter.rb#55 + def code_type; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#43 + def code_window_size; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#47 + def decorate(content); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#59 + def detect_code_type_from_file(file_name); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#35 + def file_name; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#39 + def line_number; end +end + +# source://pry//lib/pry/commands/cat/input_expression_formatter.rb#6 +class Pry::Command::Cat::InputExpressionFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [InputExpressionFormatter] a new instance of InputExpressionFormatter + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#10 + def initialize(input_expressions, opts); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#15 + def format; end + + # Returns the value of attribute input_expressions. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 + def input_expressions; end + + # Sets the attribute input_expressions + # + # @param value the value to set the attribute input_expressions to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 + def input_expressions=(_arg0); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 + def opts=(_arg0); end + + private + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#42 + def normalized_expression_range; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#37 + def numbered_input_items; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#33 + def selected_input_items; end +end + +# source://pry//lib/pry/commands/cd.rb#5 +class Pry::Command::Cd < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cd.rb#25 + def process; end +end + +# source://pry//lib/pry/commands/change_inspector.rb#5 +class Pry::Command::ChangeInspector < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_inspector.rb#17 + def process(inspector); end + + private + + # source://pry//lib/pry/commands/change_inspector.rb#28 + def inspector_map; end +end + +# source://pry//lib/pry/commands/change_prompt.rb#5 +class Pry::Command::ChangePrompt < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_prompt.rb#16 + def options(opt); end + + # source://pry//lib/pry/commands/change_prompt.rb#20 + def process(prompt); end + + private + + # source://pry//lib/pry/commands/change_prompt.rb#38 + def change_prompt(prompt); end + + # source://pry//lib/pry/commands/change_prompt.rb#30 + def list_prompts; end +end + +# source://pry//lib/pry/commands/clear_screen.rb#5 +class Pry::Command::ClearScreen < ::Pry::ClassCommand + # source://pry//lib/pry/commands/clear_screen.rb#10 + def process; end +end + +# source://pry//lib/pry/commands/code_collector.rb#5 +class Pry::Command::CodeCollector + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [CodeCollector] a new instance of CodeCollector + # + # source://pry//lib/pry/commands/code_collector.rb#23 + def initialize(args, opts, pry_instance); end + + # Returns the value of attribute args. + # + # source://pry//lib/pry/commands/code_collector.rb#8 + def args; end + + # The code object + # + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/code_collector.rb#86 + def code_object; end + + # The content (i.e code/docs) for the selected object. + # If the user provided a bare code object, it returns the source. + # If the user provided the `-i` or `-o` switches, it returns the + # selected input/output lines joined as a string. If the user used + # `-d CODE_OBJECT` it returns the docs for that code object. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#60 + def content; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 + def file; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 + def file=(_arg0); end + + # The line range passed to `--lines`, converted to a 0-indexed range. + # + # source://pry//lib/pry/commands/code_collector.rb#123 + def line_range; end + + # Name of the object argument + # + # source://pry//lib/pry/commands/code_collector.rb#128 + def obj_name; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/code_collector.rb#9 + def opts; end + + # The selected `pry_instance.input_ring` as a string, as specified by + # the `-i` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#116 + def pry_input_content; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/code_collector.rb#10 + def pry_instance; end + + # The selected `pry_instance.output_ring` as a string, as specified by + # the `-o` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#104 + def pry_output_content; end + + # Given a string and a range, return the `range` lines of that + # string. + # + # @param content [String] + # @param range [Range, Fixnum] + # @return [String] The string restricted to the given range + # + # source://pry//lib/pry/commands/code_collector.rb#96 + def restrict_to_lines(content, range); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/commands/code_collector.rb#134 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/code_collector.rb#153 + def code_object_doc; end + + # source://pry//lib/pry/commands/code_collector.rb#157 + def code_object_source_or_file; end + + # source://pry//lib/pry/commands/code_collector.rb#175 + def convert_to_range(range); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/code_collector.rb#171 + def could_not_locate(name); end + + # source://pry//lib/pry/commands/code_collector.rb#161 + def file_content; end + + # source://pry//lib/pry/commands/code_collector.rb#139 + def pry_array_content_as_string(array, ranges); end + + class << self + # Add the `--lines`, `-o`, `-i`, `-s`, `-d` options. + # + # source://pry//lib/pry/commands/code_collector.rb#30 + def inject_options(opt); end + + # Returns the value of attribute input_expression_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#16 + def input_expression_ranges; end + + # Sets the attribute input_expression_ranges + # + # @param value the value to set the attribute input_expression_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#16 + def input_expression_ranges=(_arg0); end + + # Returns the value of attribute output_result_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#17 + def output_result_ranges; end + + # Sets the attribute output_result_ranges + # + # @param value the value to set the attribute output_result_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#17 + def output_result_ranges=(_arg0); end + end +end + +# source://pry//lib/pry/commands/disable_pry.rb#5 +class Pry::Command::DisablePry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/disable_pry.rb#23 + def process; end +end + +# source://pry//lib/pry/commands/edit.rb#5 +class Pry::Command::Edit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/edit.rb#89 + def apply_runtime_patch; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#172 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/edit.rb#152 + def code_object; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit.rb#105 + def ensure_file_name_is_valid(file_name); end + + # source://pry//lib/pry/commands/edit.rb#119 + def file_and_line; end + + # source://pry//lib/pry/commands/edit.rb#115 + def file_and_line_for_current_exception; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#78 + def file_based_exception?; end + + # source://pry//lib/pry/commands/edit.rb#135 + def file_edit; end + + # source://pry//lib/pry/commands/edit.rb#148 + def filename_argument; end + + # source://pry//lib/pry/commands/edit.rb#203 + def initial_temp_file_content; end + + # source://pry//lib/pry/commands/edit.rb#180 + def input_expression; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#195 + def never_reload?; end + + # source://pry//lib/pry/commands/edit.rb#25 + def options(opt); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#168 + def patch_exception?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#163 + def previously_patched?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#215 + def probably_a_file?(str); end + + # source://pry//lib/pry/commands/edit.rb#46 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#158 + def pry_method?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#199 + def reload?(file_name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#191 + def reloadable?; end + + # source://pry//lib/pry/commands/edit.rb#69 + def repl_edit; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#64 + def repl_edit?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#82 + def runtime_patch?; end +end + +# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 +class Pry::Command::Edit::ExceptionPatcher + # @return [ExceptionPatcher] a new instance of ExceptionPatcher + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#11 + def initialize(pry_instance, state, exception_file_and_line); end + + # Returns the value of attribute file_and_line. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 + def file_and_line; end + + # Sets the attribute file_and_line + # + # @param value the value to set the attribute file_and_line to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 + def file_and_line=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#18 + def perform_patch; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 + def pry_instance=(_arg0); end + + # Returns the value of attribute state. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 + def state=(_arg0); end +end + +# source://pry//lib/pry/commands/edit/file_and_line_locator.rb#6 +module Pry::Command::Edit::FileAndLineLocator + class << self + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#8 + def from_binding(target); end + + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#16 + def from_code_object(code_object, filename_argument); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#24 + def from_exception(exception, backtrace_level); end + + # when file and line are passed as a single arg, e.g my_file.rb:30 + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#38 + def from_filename_argument(filename_argument); end + end +end + +# source://pry//lib/pry/commands/exit.rb#5 +class Pry::Command::Exit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit.rb#25 + def process; end + + # source://pry//lib/pry/commands/exit.rb#34 + def process_pop_and_return; end +end + +# source://pry//lib/pry/commands/exit_all.rb#5 +class Pry::Command::ExitAll < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_all.rb#18 + def process; end +end + +# source://pry//lib/pry/commands/exit_program.rb#5 +class Pry::Command::ExitProgram < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_program.rb#18 + def process; end +end + +# source://pry//lib/pry/commands/find_method.rb#5 +class Pry::Command::FindMethod < ::Pry::ClassCommand + extend ::Pry::Helpers::BaseHelpers + + # source://pry//lib/pry/commands/find_method.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/find_method.rb#36 + def process; end + + private + + # Return the matched lines of method source if `-c` is given or "" + # if `-c` was not given + # + # source://pry//lib/pry/commands/find_method.rb#100 + def additional_info(header, method); end + + # Search for all methods who's implementation matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#186 + def content_search(namespace); end + + # source://pry//lib/pry/commands/find_method.rb#108 + def matched_method_lines(header, method); end + + # Search for all methods with a name that matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#174 + def name_search(namespace); end + + # @return [Regexp] The pattern to search for. + # + # source://pry//lib/pry/commands/find_method.rb#48 + def pattern; end + + # pretty-print a list of matching methods. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#80 + def print_matches(matches); end + + # Print matched methods for a class + # + # source://pry//lib/pry/commands/find_method.rb#90 + def print_matches_for_class(klass, grouped); end + + # Run the given block against every constant in the provided namespace. + # + # @param klass [Module] The namespace in which to start the search. + # @param done [Hash] The namespaces we've already visited (private) + # @yieldparam klass Each class/module in the namespace. + # + # source://pry//lib/pry/commands/find_method.rb#120 + def recurse_namespace(klass, done = T.unsafe(nil), &block); end + + # Gather all the methods in a namespace that pass the given block. + # + # @param namespace [Module] The namespace in which to search. + # @return [Array] + # @yieldparam method [Method] The method to test + # @yieldreturn [Boolean] + # + # source://pry//lib/pry/commands/find_method.rb#150 + def search_all_methods(namespace); end + + # The class to search for methods. + # We only search classes, so if the search object is an + # instance, return its class. If no search object is given + # search `target_self`. + # + # source://pry//lib/pry/commands/find_method.rb#67 + def search_class; end + + # Output the result of the search. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#55 + def show_search_results(matches); end +end + +# source://pry//lib/pry/commands/fix_indent.rb#5 +class Pry::Command::FixIndent < ::Pry::ClassCommand + # source://pry//lib/pry/commands/fix_indent.rb#15 + def process; end +end + +# source://pry//lib/pry/commands/help.rb#5 +class Pry::Command::Help < ::Pry::ClassCommand + # Get a hash of available commands grouped by the "group" name. + # + # source://pry//lib/pry/commands/help.rb#29 + def command_groups; end + + # Display help for an individual command. + # + # @param command [Pry::Command] + # + # source://pry//lib/pry/commands/help.rb#125 + def display_command(command); end + + # Display help for a searched item, filtered by group + # + # @param search [String] The string to search for. + # @raise [CommandError] + # + # source://pry//lib/pry/commands/help.rb#111 + def display_filtered_commands(search); end + + # Display help for a searched item, filtered first by group + # and if that fails, filtered by command name. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#98 + def display_filtered_search_results(search); end + + # Display the index view, with headings and short descriptions per command. + # + # @param groups [Hash>] + # + # source://pry//lib/pry/commands/help.rb#44 + def display_index(groups); end + + # Display help for an individual command or group. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#86 + def display_search(search); end + + # source://pry//lib/pry/commands/help.rb#159 + def group_sort_key(group_name); end + + # Given a group name and an array of commands, + # return the help string for those commands. + # + # @param name [String] The group name. + # @param commands [Array] + # @return [String] The generated help string. + # + # source://pry//lib/pry/commands/help.rb#62 + def help_text_for_commands(name, commands); end + + # Clean search terms to make it easier to search group names + # + # @param key [String] + # @return [String] + # + # source://pry//lib/pry/commands/help.rb#155 + def normalize(key); end + + # source://pry//lib/pry/commands/help.rb#33 + def process; end + + # Find a subset of a hash that matches the user's search term. + # + # If there's an exact match a Hash of one element will be returned, + # otherwise a sub-Hash with every key that matches the search will + # be returned. + # + # @param search [String] the search term + # @param hash [Hash] the hash to search + # + # source://pry//lib/pry/commands/help.rb#137 + def search_hash(search, hash); end + + # Sort an array of commands by their `listing` name. + # + # @param commands [Array] The commands to sort + # @return [Array] commands sorted by listing name. + # + # source://pry//lib/pry/commands/help.rb#79 + def sorted_commands(commands); end + + # @param groups [Hash] + # @return [Array] An array of sorted group names. + # + # source://pry//lib/pry/commands/help.rb#71 + def sorted_group_names(groups); end + + # We only want to show commands that have descriptions, so that the + # easter eggs don't show up. + # + # source://pry//lib/pry/commands/help.rb#20 + def visible_commands; end +end + +# source://pry//lib/pry/commands/hist.rb#5 +class Pry::Command::Hist < ::Pry::ClassCommand + # source://pry//lib/pry/commands/hist.rb#25 + def options(opt); end + + # source://pry//lib/pry/commands/hist.rb#43 + def process; end + + private + + # Checks +replay_sequence+ for the presence of neighboring replay calls. + # + # @example + # [1] pry(main)> hist --show 46894 + # 46894: hist --replay 46675..46677 + # [2] pry(main)> hist --show 46675..46677 + # 46675: 1+1 + # 46676: a = 100 + # 46677: hist --tail + # [3] pry(main)> hist --replay 46894 + # Error: Replay index 46894 points out to another replay call: + # `hist -r 46675..46677` + # [4] pry(main)> + # @param replay_sequence [String] The sequence of commands to be replayed + # (per saltum) + # @raise [Pry::CommandError] If +replay_sequence+ contains another + # "hist --replay" call + # @return [Boolean] `false` if +replay_sequence+ does not contain another + # "hist --replay" call + # + # source://pry//lib/pry/commands/hist.rb#143 + def check_for_juxtaposed_replay(replay_sequence); end + + # Finds history depending on the given switch. + # + # @return [Pry::Code] if it finds `--all` (or `-a`) switch, returns all + # entries in history. Without the switch returns only the entries from the + # current Pry session. + # + # source://pry//lib/pry/commands/hist.rb#168 + def find_history; end + + # source://pry//lib/pry/commands/hist.rb#105 + def process_clear; end + + # source://pry//lib/pry/commands/hist.rb#78 + def process_display; end + + # source://pry//lib/pry/commands/hist.rb#110 + def process_replay; end + + # source://pry//lib/pry/commands/hist.rb#86 + def process_save; end +end + +# source://pry//lib/pry/commands/import_set.rb#5 +class Pry::Command::ImportSet < ::Pry::ClassCommand + # TODO: resolve unused parameter. + # + # @raise [CommandError] + # + # source://pry//lib/pry/commands/import_set.rb#17 + def process(_command_set_name); end +end + +# source://pry//lib/pry/commands/jump_to.rb#5 +class Pry::Command::JumpTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/jump_to.rb#14 + def process(break_level); end +end + +# source://pry//lib/pry/commands/list_inspectors.rb#5 +class Pry::Command::ListInspectors < ::Pry::ClassCommand + # source://pry//lib/pry/commands/list_inspectors.rb#16 + def process; end + + private + + # source://pry//lib/pry/commands/list_inspectors.rb#28 + def inspector_map; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/list_inspectors.rb#36 + def selected_inspector?(inspector); end + + # source://pry//lib/pry/commands/list_inspectors.rb#32 + def selected_text; end +end + +# source://pry//lib/pry/commands/ls/jruby_hacks.rb#5 +class Pry::Command::Ls < ::Pry::ClassCommand + # Exclude -q, -v and --grep because they, + # don't specify what the user wants to see. + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls.rb#85 + def no_user_opts?; end + + # source://pry//lib/pry/commands/ls.rb#52 + def options(opt); end + + # source://pry//lib/pry/commands/ls.rb#90 + def process; end + + private + + # source://pry//lib/pry/commands/ls.rb#106 + def error_list; end + + # source://pry//lib/pry/commands/ls.rb#126 + def raise_errors_if_arguments_are_weird; end +end + +# source://pry//lib/pry/commands/ls/constants.rb#6 +class Pry::Command::Ls::Constants < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + + # @return [Constants] a new instance of Constants + # + # source://pry//lib/pry/commands/ls/constants.rb#14 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#23 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/constants.rb#27 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/constants.rb#39 + def format(mod, constants); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#35 + def show_deprecated_constants?; end +end + +# source://pry//lib/pry/commands/ls/constants.rb#7 +Pry::Command::Ls::Constants::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/commands/ls.rb#6 +Pry::Command::Ls::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/commands/ls/formatter.rb#6 +class Pry::Command::Ls::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://pry//lib/pry/commands/ls/formatter.rb#10 + def initialize(pry_instance); end + + # Sets the attribute grep + # + # @param value the value to set the attribute grep to. + # + # source://pry//lib/pry/commands/ls/formatter.rb#7 + def grep=(_arg0); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/formatter.rb#8 + def pry_instance; end + + # source://pry//lib/pry/commands/ls/formatter.rb#16 + def write_out; end + + private + + # source://pry//lib/pry/commands/ls/formatter.rb#24 + def color(type, str); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/formatter.rb#41 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/formatter.rb#37 + def format_value(value); end + + # source://pry//lib/pry/commands/ls/formatter.rb#49 + def grep; end + + # Add a new section to the output. + # Outputs nothing if the section would be empty. + # + # source://pry//lib/pry/commands/ls/formatter.rb#30 + def output_section(heading, body); end + + # @raise [NotImplementedError] + # + # source://pry//lib/pry/commands/ls/formatter.rb#45 + def output_self; end +end + +# source://pry//lib/pry/commands/ls/globals.rb#6 +class Pry::Command::Ls::Globals < ::Pry::Command::Ls::Formatter + # @return [Globals] a new instance of Globals + # + # source://pry//lib/pry/commands/ls/globals.rb#24 + def initialize(opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/globals.rb#29 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/globals.rb#36 + def format(globals); end +end + +# Taken from "puts global_variables.inspect". +# +# source://pry//lib/pry/commands/ls/globals.rb#8 +Pry::Command::Ls::Globals::BUILTIN_GLOBALS = T.let(T.unsafe(nil), Array) + +# `$SAFE` and `$?` are thread-local, the exception stuff only works in a +# rescue clause, everything else is basically a local variable with a `$` +# in its name. +# +# source://pry//lib/pry/commands/ls/globals.rb#19 +Pry::Command::Ls::Globals::PSEUDO_GLOBALS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/commands/ls/grep.rb#6 +class Pry::Command::Ls::Grep + # @return [Grep] a new instance of Grep + # + # source://pry//lib/pry/commands/ls/grep.rb#7 + def initialize(grep_regexp); end + + # source://pry//lib/pry/commands/ls/grep.rb#11 + def regexp; end +end + +# source://pry//lib/pry/commands/ls/instance_vars.rb#6 +class Pry::Command::Ls::InstanceVars < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + + # @return [InstanceVars] a new instance of InstanceVars + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#9 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#16 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/instance_vars.rb#20 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/instance_vars.rb#34 + def format(type, vars); end +end + +# source://pry//lib/pry/commands/ls/interrogatable.rb#6 +module Pry::Command::Ls::Interrogatable + private + + # source://pry//lib/pry/commands/ls/interrogatable.rb#13 + def interrogatee_mod; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/interrogatable.rb#9 + def interrogating_a_module?; end +end + +# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 +module Pry::Command::Ls::JRubyHacks + private + + # When removing jruby aliases, we want to keep the alias that is + # "least rubbish" according to this metric. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#40 + def rubbishness(name); end + + # JRuby creates lots of aliases for methods imported from java in an attempt + # to make life easier for ruby programmers. (e.g. getFooBar becomes + # get_foo_bar and foo_bar, and maybe foo_bar? if it returns a Boolean). The + # full transformations are in the assignAliases method of: + # https://github.com/jruby/jruby/blob/master/src/org/jruby/javasupport/JavaClass.java + # + # This has the unfortunate side-effect of making the output of ls even more + # incredibly verbose than it normally would be for these objects; and so we + # filter out all but the nicest of these aliases here. + # + # TODO: This is a little bit vague, better heuristics could be used. + # JRuby also has a lot of scala-specific logic, which we don't copy. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#21 + def trim_jruby_aliases(methods); end +end + +# source://pry//lib/pry/commands/ls/local_names.rb#6 +class Pry::Command::Ls::LocalNames < ::Pry::Command::Ls::Formatter + # @return [LocalNames] a new instance of LocalNames + # + # source://pry//lib/pry/commands/ls/local_names.rb#7 + def initialize(no_user_opts, args, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/local_names.rb#14 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/local_names.rb#18 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/local_names.rb#25 + def format(locals); end +end + +# source://pry//lib/pry/commands/ls/local_vars.rb#6 +class Pry::Command::Ls::LocalVars < ::Pry::Command::Ls::Formatter + # @return [LocalVars] a new instance of LocalVars + # + # source://pry//lib/pry/commands/ls/local_vars.rb#7 + def initialize(opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/local_vars.rb#13 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/local_vars.rb#34 + def colorized_assignment_style(lhs, rhs, desired_width = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/local_vars.rb#25 + def format(name_value_pairs); end +end + +# source://pry//lib/pry/commands/ls/ls_entity.rb#6 +class Pry::Command::Ls::LsEntity + # @return [LsEntity] a new instance of LsEntity + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#9 + def initialize(opts); end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#18 + def entities_table; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#7 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/ls/ls_entity.rb#32 + def constants; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#56 + def entities; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#28 + def globals; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#24 + def grep(entity); end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#44 + def instance_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#48 + def local_names; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#52 + def local_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#36 + def methods; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#40 + def self_methods; end +end + +# source://pry//lib/pry/commands/ls/methods.rb#6 +class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + include ::Pry::Command::Ls::JRubyHacks + include ::Pry::Command::Ls::MethodsHelper + + # @return [Methods] a new instance of Methods + # + # source://pry//lib/pry/commands/ls/methods.rb#10 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/methods.rb#22 + def output_self; end + + private + + # Get a lambda that can be used with `take_while` to prevent over-eager + # traversal of the Object's ancestry graph. + # + # source://pry//lib/pry/commands/ls/methods.rb#41 + def below_ceiling; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/methods.rb#35 + def correct_opts?; end +end + +# source://pry//lib/pry/commands/ls/methods_helper.rb#6 +module Pry::Command::Ls::MethodsHelper + include ::Pry::Command::Ls::JRubyHacks + + private + + # Get all the methods that we'll want to output. + # + # source://pry//lib/pry/commands/ls/methods_helper.rb#12 + def all_methods(instance_methods = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#34 + def format(methods); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#26 + def resolution_order; end +end + +# source://pry//lib/pry/commands/ls/self_methods.rb#6 +class Pry::Command::Ls::SelfMethods < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + include ::Pry::Command::Ls::JRubyHacks + include ::Pry::Command::Ls::MethodsHelper + + # @return [SelfMethods] a new instance of SelfMethods + # + # source://pry//lib/pry/commands/ls/self_methods.rb#10 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/self_methods.rb#18 + def output_self; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/self_methods.rb#28 + def correct_opts?; end +end + +# source://pry//lib/pry/commands/nesting.rb#5 +class Pry::Command::Nesting < ::Pry::ClassCommand + # source://pry//lib/pry/commands/nesting.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/play.rb#5 +class Pry::Command::Play < ::Pry::ClassCommand + # source://pry//lib/pry/commands/play.rb#74 + def code_object; end + + # source://pry//lib/pry/commands/play.rb#82 + def content; end + + # source://pry//lib/pry/commands/play.rb#60 + def content_after_options; end + + # source://pry//lib/pry/commands/play.rb#70 + def content_at_expression; end + + # The file to play from when no code object is specified. + # e.g `play --lines 4..10` + # + # source://pry//lib/pry/commands/play.rb#92 + def default_file; end + + # source://pry//lib/pry/commands/play.rb#102 + def file_content; end + + # source://pry//lib/pry/commands/play.rb#29 + def options(opt); end + + # source://pry//lib/pry/commands/play.rb#48 + def perform_play; end + + # source://pry//lib/pry/commands/play.rb#41 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/play.rb#78 + def should_use_default_file?; end + + # source://pry//lib/pry/commands/play.rb#53 + def show_input; end +end + +# source://pry//lib/pry/commands/pry_backtrace.rb#5 +class Pry::Command::PryBacktrace < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_backtrace.rb#22 + def process; end +end + +# source://pry//lib/pry/commands/raise_up.rb#6 +class Pry::Command::RaiseUp < ::Pry::ClassCommand + # source://pry//lib/pry/commands/raise_up.rb#27 + def process; end +end + +# source://pry//lib/pry/commands/reload_code.rb#5 +class Pry::Command::ReloadCode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reload_code.rb#20 + def process; end + + private + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/reload_code.rb#58 + def check_for_reloadability(code_object, identifier); end + + # source://pry//lib/pry/commands/reload_code.rb#32 + def current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#42 + def reload_current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#51 + def reload_object(identifier); end +end + +# source://pry//lib/pry/commands/reset.rb#5 +class Pry::Command::Reset < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reset.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/ri.rb#7 +class Pry::Command::Ri < ::Pry::ClassCommand + # source://pry//lib/pry/commands/ri.rb#21 + def process(spec); end +end + +# source://pry//lib/pry/commands/save_file.rb#5 +class Pry::Command::SaveFile < ::Pry::ClassCommand + # source://pry//lib/pry/commands/save_file.rb#50 + def display_content; end + + # source://pry//lib/pry/commands/save_file.rb#39 + def file_name; end + + # source://pry//lib/pry/commands/save_file.rb#56 + def mode; end + + # source://pry//lib/pry/commands/save_file.rb#21 + def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/save_file.rb#28 + def process; end + + # source://pry//lib/pry/commands/save_file.rb#43 + def save_file; end +end + +# source://pry//lib/pry/commands/shell_command.rb#5 +class Pry::Command::ShellCommand < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_command.rb#21 + def process(cmd); end + + private + + # source://pry//lib/pry/commands/shell_command.rb#50 + def cd_path_env; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#54 + def cd_path_exists?; end + + # source://pry//lib/pry/commands/shell_command.rb#36 + def parse_destination(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#58 + def path_from_cd_path(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#43 + def process_cd(dest); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#68 + def special_case_path?(dest); end +end + +# source://pry//lib/pry/commands/shell_mode.rb#5 +class Pry::Command::ShellMode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_mode.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/show_doc.rb#5 +class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo + include ::Pry::Helpers::DocumentationHelpers + + # The docs for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_doc.rb#35 + def content_for(code_object); end + + # Return docs for the code_object, adjusting for whether the code_object + # has yard docs available, in which case it returns those. + # (note we only have to check yard docs for modules since they can + # have multiple docs, but methods can only be doc'd once so we + # dont need to check them) + # + # source://pry//lib/pry/commands/show_doc.rb#64 + def docs_for(code_object); end + + # Which sections to include in the 'header', can toggle: :owner, + # :signature and visibility. + # + # source://pry//lib/pry/commands/show_doc.rb#76 + def header_options; end + + # source://pry//lib/pry/commands/show_doc.rb#24 + def process; end + + # process the markup (if necessary) and apply colors + # + # source://pry//lib/pry/commands/show_doc.rb#44 + def render_doc_markup_for(code_object); end + + # figure out start line of docs by back-calculating based on + # number of lines in the comment and the start line of the code_object + # + # @return [Fixnum] start line of docs + # + # source://pry//lib/pry/commands/show_doc.rb#83 + def start_line_for(code_object); end +end + +# source://pry//lib/pry/commands/show_info.rb#5 +class Pry::Command::ShowInfo < ::Pry::ClassCommand + extend ::Pry::Helpers::BaseHelpers + + # @return [ShowInfo] a new instance of ShowInfo + # + # source://pry//lib/pry/commands/show_info.rb#10 + def initialize(*_arg0); end + + # source://pry//lib/pry/commands/show_info.rb#127 + def code_object_header(code_object, line_num); end + + # This method checks whether the `code_object` is a WrappedModule, if it + # is, then it returns the first candidate (monkeypatch) with accessible + # source (or docs). If `code_object` is not a WrappedModule (i.e a method + # or a command) then the `code_object` itself is just returned. + # + # @raise [CommandError] + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/show_info.rb#61 + def code_object_with_accessible_source(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#213 + def complete(input); end + + # source://pry//lib/pry/commands/show_info.rb#77 + def content_and_header_for_code_object(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#81 + def content_and_headers_for_all_module_candidates(mod); end + + # takes into account possible yard docs, and returns yard_file / yard_line + # Also adjusts for start line of comments (using start_line_for), which it + # has to infer by subtracting number of lines of comment from start line + # of code_object + # + # source://pry//lib/pry/commands/show_info.rb#205 + def file_and_line_for(code_object); end + + # Generate a header (meta-data information) for all the code + # object types: methods, modules, commands, procs... + # + # source://pry//lib/pry/commands/show_info.rb#106 + def header(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#173 + def header_options; end + + # source://pry//lib/pry/commands/show_info.rb#142 + def method_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#165 + def method_sections(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#151 + def module_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#100 + def no_definition_message; end + + # source://pry//lib/pry/commands/show_info.rb#185 + def obj_name; end + + # source://pry//lib/pry/commands/show_info.rb#16 + def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/show_info.rb#26 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#181 + def show_all_modules?(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#193 + def start_line_for(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#189 + def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#73 + def valid_superclass?(code_object); end +end + +# source://pry//lib/pry/commands/show_input.rb#5 +class Pry::Command::ShowInput < ::Pry::ClassCommand + # source://pry//lib/pry/commands/show_input.rb#15 + def process; end +end + +# source://pry//lib/pry/commands/show_source.rb#5 +class Pry::Command::ShowSource < ::Pry::Command::ShowInfo + include ::Pry::Helpers::DocumentationHelpers + + # The source for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_source.rb#48 + def content_for(code_object); end + + # Return docs for the code_object, adjusting for whether the code_object + # has yard docs available, in which case it returns those. + # (note we only have to check yard docs for modules since they can + # have multiple docs, but methods can only be doc'd once so we + # dont need to check them) + # + # source://pry//lib/pry/commands/show_source.rb#86 + def docs_for(code_object); end + + # Which sections to include in the 'header', can toggle: :owner, + # :signature and visibility. + # + # source://pry//lib/pry/commands/show_source.rb#98 + def header_options; end + + # source://pry//lib/pry/commands/show_source.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/show_source.rb#38 + def process; end + + # process the markup (if necessary) and apply colors + # + # source://pry//lib/pry/commands/show_source.rb#66 + def render_doc_markup_for(code_object); end + + # figure out start line of docs by back-calculating based on + # number of lines in the comment and the start line of the code_object + # + # @return [Fixnum] start line of docs + # + # source://pry//lib/pry/commands/show_source.rb#105 + def start_line_for(code_object); end +end + +# source://pry//lib/pry/commands/stat.rb#5 +class Pry::Command::Stat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/stat.rb#19 + def options(opt); end + + # source://pry//lib/pry/commands/stat.rb#23 + def process; end +end + +# source://pry//lib/pry/commands/switch_to.rb#5 +class Pry::Command::SwitchTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/switch_to.rb#14 + def process(selection); end +end + +# source://pry//lib/pry/commands/toggle_color.rb#5 +class Pry::Command::ToggleColor < ::Pry::ClassCommand + # source://pry//lib/pry/commands/toggle_color.rb#21 + def color_toggle; end + + # source://pry//lib/pry/commands/toggle_color.rb#16 + def process; end +end + +# represents a void return value for a command +# +# source://pry//lib/pry/command.rb#20 +Pry::Command::VOID_VALUE = T.let(T.unsafe(nil), Object) + +# source://pry//lib/pry/commands/pry_version.rb#5 +class Pry::Command::Version < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_version.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/watch_expression.rb#5 +class Pry::Command::WatchExpression < ::Pry::ClassCommand + # source://pry//lib/pry/commands/watch_expression.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/watch_expression.rb#42 + def process; end + + private + + # TODO: fix arguments. + # https://github.com/pry/pry/commit/b031df2f2f5850ee6e9018f33d35f3485a9b0423 + # + # source://pry//lib/pry/commands/watch_expression.rb#93 + def add_expression(_arguments); end + + # source://pry//lib/pry/commands/watch_expression.rb#98 + def add_hook; end + + # source://pry//lib/pry/commands/watch_expression.rb#59 + def delete(index); end + + # source://pry//lib/pry/commands/watch_expression.rb#84 + def eval_and_print_changed(output); end + + # source://pry//lib/pry/commands/watch_expression.rb#55 + def expressions; end + + # source://pry//lib/pry/commands/watch_expression.rb#69 + def list; end +end + +# source://pry//lib/pry/commands/watch_expression/expression.rb#6 +class Pry::Command::WatchExpression::Expression + # @return [Expression] a new instance of Expression + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#9 + def initialize(pry_instance, target, source); end + + # Has the value of the expression changed? + # + # We use the pretty-printed string represenation to detect differences + # as this avoids problems with dup (causes too many differences) and == + # (causes too few) + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#29 + def changed?; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#15 + def eval!; end + + # Returns the value of attribute previous_value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def previous_value; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def pry_instance; end + + # Returns the value of attribute source. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def source; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def target; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#20 + def to_s; end + + # Returns the value of attribute value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def value; end + + private + + # source://pry//lib/pry/commands/watch_expression/expression.rb#35 + def target_eval(target, source); end +end + +# source://pry//lib/pry/commands/whereami.rb#7 +class Pry::Command::Whereami < ::Pry::ClassCommand + # @return [Whereami] a new instance of Whereami + # + # source://pry//lib/pry/commands/whereami.rb#8 + def initialize(*_arg0); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#83 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/whereami.rb#63 + def code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#77 + def code?; end + + # source://pry//lib/pry/commands/whereami.rb#88 + def location; end + + # source://pry//lib/pry/commands/whereami.rb#55 + def options(opt); end + + # source://pry//lib/pry/commands/whereami.rb#92 + def process; end + + # source://pry//lib/pry/commands/whereami.rb#44 + def setup; end + + private + + # source://pry//lib/pry/commands/whereami.rb#171 + def class_code; end + + # source://pry//lib/pry/commands/whereami.rb#152 + def code_window; end + + # source://pry//lib/pry/commands/whereami.rb#144 + def default_code; end + + # source://pry//lib/pry/commands/whereami.rb#185 + def expand_path(filename); end + + # source://pry//lib/pry/commands/whereami.rb#132 + def handle_internal_binding; end + + # source://pry//lib/pry/commands/whereami.rb#124 + def marker; end + + # source://pry//lib/pry/commands/whereami.rb#156 + def method_code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#116 + def nothing_to_do?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#140 + def small_method?; end + + # This either returns the `target_self` + # or it returns the class of `target_self` if `target_self` is not a class. + # + # @return [Pry::WrappedModule] + # + # source://pry//lib/pry/commands/whereami.rb#165 + def target_class; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#128 + def top_level?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#120 + def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#180 + def valid_method?; end + + # source://pry//lib/pry/commands/whereami.rb#192 + def window_size; end + + class << self + # Returns the value of attribute method_size_cutoff. + # + # source://pry//lib/pry/commands/whereami.rb#15 + def method_size_cutoff; end + + # Sets the attribute method_size_cutoff + # + # @param value the value to set the attribute method_size_cutoff to. + # + # source://pry//lib/pry/commands/whereami.rb#15 + def method_size_cutoff=(_arg0); end + end +end + +# source://pry//lib/pry/commands/wtf.rb#5 +class Pry::Command::Wtf < ::Pry::ClassCommand + # source://pry//lib/pry/commands/wtf.rb#27 + def options(opt); end + + # source://pry//lib/pry/commands/wtf.rb#32 + def process; end + + private + + # source://pry//lib/pry/commands/wtf.rb#64 + def format_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#60 + def format_header(title, exception); end + + # source://pry//lib/pry/commands/wtf.rb#83 + def read_line(file, line); end + + # source://pry//lib/pry/commands/wtf.rb#76 + def trim_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#48 + def unwind_exceptions; end +end + +# source://pry//lib/pry/commands/wtf.rb#25 +Pry::Command::Wtf::RUBY_FRAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# CommandErrors are caught by the REPL loop and displayed to the user. They +# indicate an exceptional condition that's fatal to the current command. +# +# source://pry//lib/pry/exceptions.rb#68 +class Pry::CommandError < ::StandardError; end + +# This class is used to create sets of commands. Commands can be imported from +# different sets, aliased, removed, etc. +# +# source://pry//lib/pry/command_set.rb#12 +class Pry::CommandSet + include ::Enumerable + include ::Pry::Helpers::BaseHelpers + + # @param imported_sets [Array] Sets which will be imported automatically + # @return [CommandSet] a new instance of CommandSet + # @yield Optional block run to define commands + # + # source://pry//lib/pry/command_set.rb#20 + def initialize(*imported_sets, &block); end + + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#275 + def [](pattern); end + + # Re-assign the command found at _pattern_ with _command_. + # + # @example + # Pry.config.commands["help"] = MyHelpCommand + # @param pattern [Regexp, String] The command to add or replace(found at _pattern_). + # @param command [Pry::Command] The command to add. + # @return [Pry::Command] Returns the new command (matched with "pattern".) + # + # source://pry//lib/pry/command_set.rb#298 + def []=(pattern, command); end + + # Add a command to set. + # + # @param command [Command] a subclass of Pry::Command. + # + # source://pry//lib/pry/command_set.rb#324 + def add_command(command); end + + # Aliases a command + # + # @example Creating an alias for `ls -M` + # Pry.config.commands.alias_command "lM", "ls -M" + # @example Pass explicit description (overriding default). + # Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie" + # @param match [String, Regex] The match of the alias (can be a regex). + # @param action [String] The action to be performed (typically + # another command). + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too as `:desc` + # + # source://pry//lib/pry/command_set.rb#190 + def alias_command(match, action, options = T.unsafe(nil)); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#78 + def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#78 + def command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Generate completions for the user's search. + # + # @param search [String] The line to search for + # @param context [Hash] The context to create the command with + # @return [Array] + # + # source://pry//lib/pry/command_set.rb#365 + def complete(search, context = T.unsafe(nil)); end + + # Defines a new Pry command class. + # + # @example + # Pry::Commands.create_command "echo", "echo's the input", :shellwords => false do + # def options(opt) + # opt.banner "Usage: echo [-u | -d] " + # opt.on :u, :upcase, "ensure the output is all upper-case" + # opt.on :d, :downcase, "ensure the output is all lower-case" + # end + # + # def process + # if opts.present?(:u) && opts.present?(:d) + # raise Pry::CommandError, "-u and -d makes no sense" + # end + # result = args.join(" ") + # result.downcase! if opts.present?(:downcase) + # result.upcase! if opts.present?(:upcase) + # output.puts result + # end + # end + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters, see {#command} + # @yield The class body's definition. + # + # source://pry//lib/pry/command_set.rb#117 + def create_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Removes some commands from the set + # + # @param searches [Array] the matches or listings of the commands + # to remove + # + # source://pry//lib/pry/command_set.rb#138 + def delete(*searches); end + + # Sets or gets the description for a command (replacing the old + # description). Returns current description if no description + # parameter provided. + # + # @example Setting + # MyCommands = Pry::CommandSet.new do + # desc "help", "help description" + # end + # @example Getting + # Pry.config.commands.desc "amend-line" + # @param search [String, Regexp] The command match. + # @param description [String?] (nil) The command description. + # + # source://pry//lib/pry/command_set.rb#253 + def desc(search, description = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#131 + def each(&block); end + + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#275 + def find_command(pattern); end + + # @param match_or_listing [String, Regexp] The match or listing of a command. + # of the command to retrieve. + # @return [Command] The command object matched. + # + # source://pry//lib/pry/command_set.rb#173 + def find_command_by_match_or_listing(match_or_listing); end + + # Find the command that the user might be trying to refer to. + # + # @param search [String] The user's search. + # @return [Pry::Command?] + # + # source://pry//lib/pry/command_set.rb#331 + def find_command_for_help(search); end + + # Returns the value of attribute helper_module. + # + # source://pry//lib/pry/command_set.rb#15 + def helper_module; end + + # Imports all the commands from one or more sets. + # + # @param sets [Array] Command sets, all of the commands of which + # will be imported. + # @return [Pry::CommandSet] Returns the reciever (a command set). + # + # source://pry//lib/pry/command_set.rb#149 + def import(*sets); end + + # Imports some commands from a set + # + # @param set [CommandSet] Set to import commands from + # @param matches [Array] Commands to import + # @return [Pry::CommandSet] Returns the reciever (a command set). + # + # source://pry//lib/pry/command_set.rb#161 + def import_from(set, *matches); end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#262 + def keys; end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#262 + def list_commands; end + + # Process the given line to see whether it needs executing as a command. + # + # @param val [String] The line to execute + # @param context [Hash] The context to execute the commands with + # @return [CommandSet::Result] + # + # source://pry//lib/pry/command_set.rb#351 + def process_line(val, context = T.unsafe(nil)); end + + # Rename a command. Accepts either match or listing for the search. + # + # @example Renaming the `ls` command and changing its description. + # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" + # @param new_match [String, Regexp] The new match for the command. + # @param search [String, Regexp] The command's current match or listing. + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too. + # + # source://pry//lib/pry/command_set.rb#227 + def rename_command(new_match, search, options = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#267 + def to_h; end + + # source://pry//lib/pry/command_set.rb#267 + def to_hash; end + + # Is the given line a command invocation? + # + # @param val [String] + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#343 + def valid_command?(val); end + + private + + # Defines helpers methods for this command sets. + # Those helpers are only defined in this command set. + # + # @example + # helpers do + # def hello + # puts "Hello!" + # end + # + # include OtherModule + # end + # @yield A block defining helper methods + # + # source://pry//lib/pry/command_set.rb#390 + def helpers(&block); end +end + +# CommandState is a data structure to hold per-command state. +# +# Pry commands can store arbitrary state here. This state persists between +# subsequent command invocations. All state saved here is unique to the +# command. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/command_state.rb#14 +class Pry::CommandState + # @api private + # @return [CommandState] a new instance of CommandState + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#19 + def initialize; end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#27 + def reset(command_name); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#23 + def state_for(command_name); end + + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#15 + def default; end + end +end + +# source://pry//lib/pry.rb#35 +Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) + +# @api private +# +# source://pry//lib/pry/config/attributable.rb#4 +class Pry::Config + extend ::Pry::Config::Attributable + + # @api private + # @return [Config] a new instance of Config + # + # source://pry//lib/pry/config.rb#154 + def initialize; end + + # @api private + # + # source://pry//lib/pry/config.rb#234 + def [](attr); end + + # @api private + # + # source://pry//lib/pry/config.rb#230 + def []=(attr, value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def auto_indent; end + + # source://pry//lib/pry/config/attributable.rb#18 + def auto_indent=(_arg0); end + + # @api private + # @return [Boolean] whether or not display a warning when a command name + # collides with a method/local in the current context. + # + # source://pry//lib/pry/config/attributable.rb#13 + def collision_warning; end + + # source://pry//lib/pry/config/attributable.rb#18 + def collision_warning=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def color; end + + # source://pry//lib/pry/config/attributable.rb#18 + def color=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config/attributable.rb#13 + def command_completions; end + + # source://pry//lib/pry/config/attributable.rb#18 + def command_completions=(_arg0); end + + # A string that must precede all commands. For example, if is is + # set to "%", the "cd" command must be invoked as "%cd"). + # + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 + def command_prefix; end + + # source://pry//lib/pry/config/attributable.rb#18 + def command_prefix=(_arg0); end + + # @api private + # @return [Pry::CommandSet] + # + # source://pry//lib/pry/config/attributable.rb#13 + def commands; end + + # source://pry//lib/pry/config/attributable.rb#18 + def commands=(_arg0); end + + # @api private + # @return [#build_completion_proc] a completer to use + # + # source://pry//lib/pry/config/attributable.rb#13 + def completer; end + + # source://pry//lib/pry/config/attributable.rb#18 + def completer=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#259 + def control_d_handler; end + + # @api private + # + # source://pry//lib/pry/config.rb#260 + def control_d_handler=(value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def correct_indent; end + + # source://pry//lib/pry/config/attributable.rb#18 + def correct_indent=(_arg0); end + + # @api private + # @return [Integer] The number of lines of context to show before and after + # exceptions + # + # source://pry//lib/pry/config/attributable.rb#13 + def default_window_size; end + + # source://pry//lib/pry/config/attributable.rb#18 + def default_window_size=(_arg0); end + + # @api private + # @return [Boolean] whether to disable edit-method's auto-reloading behavior + # + # source://pry//lib/pry/config/attributable.rb#13 + def disable_auto_reload; end + + # source://pry//lib/pry/config/attributable.rb#18 + def disable_auto_reload=(_arg0); end + + # If it is a String, then that String is used as the shell + # command to invoke the editor. + # + # If it responds to #call is callable then `file`, `line`, and `reloading` + # are passed to it. `reloading` indicates whether Pry will be reloading code + # after the shell command returns. All parameters are optional. + # + # @api private + # @return [String, #call] + # + # source://pry//lib/pry/config/attributable.rb#13 + def editor; end + + # source://pry//lib/pry/config/attributable.rb#18 + def editor=(_arg0); end + + # @api private + # @return [Proc] the printer for exceptions + # + # source://pry//lib/pry/config/attributable.rb#13 + def exception_handler; end + + # source://pry//lib/pry/config/attributable.rb#18 + def exception_handler=(_arg0); end + + # @api private + # @deprecated + # @return [Array] Exception that Pry shouldn't rescue + # + # source://pry//lib/pry/config/attributable.rb#13 + def exception_whitelist; end + + # source://pry//lib/pry/config/attributable.rb#18 + def exception_whitelist=(_arg0); end + + # @api private + # @return [String] a line of code to execute in context before the session + # starts + # + # source://pry//lib/pry/config/attributable.rb#13 + def exec_string; end + + # source://pry//lib/pry/config/attributable.rb#18 + def exec_string=(_arg0); end + + # @api private + # @return [Hash{Symbol=>Proc}] + # + # source://pry//lib/pry/config/attributable.rb#13 + def extra_sticky_locals; end + + # source://pry//lib/pry/config/attributable.rb#18 + def extra_sticky_locals=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config/attributable.rb#13 + def file_completions; end + + # source://pry//lib/pry/config/attributable.rb#18 + def file_completions=(_arg0); end + + # @api private + # @return [Pry::History] + # + # source://pry//lib/pry/config/attributable.rb#13 + def history; end + + # source://pry//lib/pry/config/attributable.rb#18 + def history=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 + def history_file; end + + # source://pry//lib/pry/config/attributable.rb#18 + def history_file=(_arg0); end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/config/attributable.rb#13 + def history_ignorelist; end + + # source://pry//lib/pry/config/attributable.rb#18 + def history_ignorelist=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def history_load; end + + # source://pry//lib/pry/config/attributable.rb#18 + def history_load=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def history_save; end + + # source://pry//lib/pry/config/attributable.rb#18 + def history_save=(_arg0); end + + # @api private + # @return [Pry::Hooks] + # + # source://pry//lib/pry/config/attributable.rb#13 + def hooks; end + + # source://pry//lib/pry/config/attributable.rb#18 + def hooks=(_arg0); end + + # @api private + # @return [IO, #readline] he object from which Pry retrieves its lines of + # input + # + # source://pry//lib/pry/config/attributable.rb#13 + def input; end + + # source://pry//lib/pry/config/attributable.rb#18 + def input=(_arg0); end + + # @api private + # @return [Hash] + # + # source://pry//lib/pry/config/attributable.rb#13 + def ls; end + + # source://pry//lib/pry/config/attributable.rb#18 + def ls=(_arg0); end + + # @api private + # @return [Integer] how many input/output lines to keep in memory + # + # source://pry//lib/pry/config/attributable.rb#13 + def memory_size; end + + # source://pry//lib/pry/config/attributable.rb#18 + def memory_size=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#226 + def merge(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#221 + def merge!(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#239 + def method_missing(method_name, *args, &_block); end + + # @api private + # @return [IO, #puts] where Pry should output results provided by {input} + # + # source://pry//lib/pry/config/attributable.rb#13 + def output; end + + # source://pry//lib/pry/config/attributable.rb#18 + def output=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 + def output_prefix; end + + # source://pry//lib/pry/config/attributable.rb#18 + def output_prefix=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def pager; end + + # source://pry//lib/pry/config/attributable.rb#18 + def pager=(_arg0); end + + # @api private + # @return [Proc] the printer for Ruby expressions (not commands) + # + # source://pry//lib/pry/config/attributable.rb#13 + def print; end + + # source://pry//lib/pry/config/attributable.rb#18 + def print=(_arg0); end + + # @api private + # @return [Pry::Prompt] + # + # source://pry//lib/pry/config/attributable.rb#13 + def prompt; end + + # source://pry//lib/pry/config/attributable.rb#18 + def prompt=(_arg0); end + + # @api private + # @return [String] The display name that is part of the prompt + # + # source://pry//lib/pry/config/attributable.rb#13 + def prompt_name; end + + # source://pry//lib/pry/config/attributable.rb#18 + def prompt_name=(_arg0); end + + # @api private + # @return [Array] the list of objects that are known to have a + # 1-line #inspect output suitable for prompt + # + # source://pry//lib/pry/config/attributable.rb#13 + def prompt_safe_contexts; end + + # source://pry//lib/pry/config/attributable.rb#18 + def prompt_safe_contexts=(_arg0); end + + # @api private + # @return [Boolean] suppresses whereami output on `binding.pry` + # + # source://pry//lib/pry/config/attributable.rb#13 + def quiet; end + + # source://pry//lib/pry/config/attributable.rb#18 + def quiet=(_arg0); end + + # @api private + # @return [String] + # @since v0.13.0 + # + # source://pry//lib/pry/config/attributable.rb#13 + def rc_file; end + + # source://pry//lib/pry/config/attributable.rb#18 + def rc_file=(_arg0); end + + # @api private + # @return [Array] Ruby files to be required + # + # source://pry//lib/pry/config/attributable.rb#13 + def requires; end + + # source://pry//lib/pry/config/attributable.rb#18 + def requires=(_arg0); end + + # @api private + # @return [Boolean] whether the local ./.pryrc should be loaded + # + # source://pry//lib/pry/config/attributable.rb#13 + def should_load_local_rc; end + + # source://pry//lib/pry/config/attributable.rb#18 + def should_load_local_rc=(_arg0); end + + # @api private + # @return [Boolean] whether the global ~/.pryrc should be loaded + # + # source://pry//lib/pry/config/attributable.rb#13 + def should_load_rc; end + + # source://pry//lib/pry/config/attributable.rb#18 + def should_load_rc=(_arg0); end + + # @api private + # @return [Boolean] whether to load files specified with the -r flag + # + # source://pry//lib/pry/config/attributable.rb#13 + def should_load_requires; end + + # source://pry//lib/pry/config/attributable.rb#18 + def should_load_requires=(_arg0); end + + # Whether Pry should trap SIGINT and cause it to raise an Interrupt + # exception. This is only useful on JRuby, MRI does this for us. + # + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 + def should_trap_interrupts; end + + # source://pry//lib/pry/config/attributable.rb#18 + def should_trap_interrupts=(_arg0); end + + # @api private + # @return [Proc] The proc that runs system commands + # + # source://pry//lib/pry/config/attributable.rb#13 + def system; end + + # source://pry//lib/pry/config/attributable.rb#18 + def system=(_arg0); end + + # @api private + # @return [Array] Exception that Pry shouldn't rescue + # + # source://pry//lib/pry/config/attributable.rb#13 + def unrescued_exceptions; end + + # source://pry//lib/pry/config/attributable.rb#18 + def unrescued_exceptions=(_arg0); end + + # @api private + # @return [Boolean] displays a warning about experience improvement on + # Windows + # + # source://pry//lib/pry/config/attributable.rb#13 + def windows_console_warning; end + + # source://pry//lib/pry/config/attributable.rb#18 + def windows_console_warning=(_arg0); end + + private + + # @api private + # + # source://pry//lib/pry/config.rb#303 + def default_rc_file; end + + # @api private + # + # source://pry//lib/pry/config.rb#254 + def initialize_dup(other); end + + # @api private + # + # source://pry//lib/pry/config.rb#289 + def lazy_readline; end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#250 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# Attributable provides the ability to create "attribute" +# accessors. Attribute accessors create a standard "attr_writer" and a +# customised "attr_reader". This reader is Proc-aware (lazy). +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/attributable.rb#11 +module Pry::Config::Attributable + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/attributable.rb#12 + def attribute(attr_name); end +end + +# LazyValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls always evaluate the given +# block. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::LazyValue.new { num += 1 } +# value.foo # => 20 +# value.foo # => 21 +# value.foo # => 22 +# @see Pry::Config::MemoizedValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/lazy_value.rb#19 +class Pry::Config::LazyValue + # @api private + # @return [LazyValue] a new instance of LazyValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#20 + def initialize(&block); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#24 + def call; end +end + +# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls return the same memoized +# result. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::MemoizedValue.new { num += 1 } +# value.call # => 20 +# value.call # => 20 +# value.call # => 20 +# @see Pry::Config::LazyValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/memoized_value.rb#19 +class Pry::Config::MemoizedValue + # @api private + # @return [MemoizedValue] a new instance of MemoizedValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#20 + def initialize(&block); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#26 + def call; end +end + +# Value holds a value for the given attribute and decides how it should +# be read. Procs get called, other values are returned as is. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/value.rb#10 +class Pry::Config::Value + # @api private + # @return [Value] a new instance of Value + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#11 + def initialize(value); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#15 + def call; end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/control_d_handler.rb#6 +module Pry::ControlDHandler + class << self + # Deal with the ^D key being pressed. Different behaviour in different + # cases: + # 1. In an expression behave like `!` command. + # 2. At top-level session behave like `exit` command. + # 3. In a nested session behave like `cd ..`. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/control_d_handler.rb#12 + def default(pry_instance); end + end +end + +# source://pry//lib/pry/pry_instance.rb#59 +Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/editor.rb#6 +class Pry::Editor + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [Editor] a new instance of Editor + # + # source://pry//lib/pry/editor.rb#27 + def initialize(pry_instance); end + + # Generate the string that's used to start the editor. This includes + # all the flags we want as well as the file and line number we + # want to open at. + # + # source://pry//lib/pry/editor.rb#60 + def build_editor_invocation_string(file, line, blocking); end + + # source://pry//lib/pry/editor.rb#31 + def edit_tempfile_with_content(initial_content, line = T.unsafe(nil)); end + + # source://pry//lib/pry/editor.rb#41 + def invoke_editor(file, line, blocking = T.unsafe(nil)); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/editor.rb#25 + def pry_instance; end + + private + + # Some editors that run outside the terminal allow you to control whether or + # not to block the process from which they were launched (in this case, Pry). + # For those editors, return the flag that produces the desired behavior. + # + # source://pry//lib/pry/editor.rb#100 + def blocking_flag_for_editor(blocking); end + + # Get the name of the binary that Pry.config.editor points to. + # + # This is useful for deciding which flags we pass to the editor as + # we can just use the program's name and ignore any absolute paths. + # + # @example + # Pry.config.editor="/home/conrad/bin/textmate -w" + # editor_name + # # => textmate + # + # source://pry//lib/pry/editor.rb#153 + def editor_name; end + + # Start the editor running, using the calculated invocation string + # + # source://pry//lib/pry/editor.rb#76 + def open_editor(editor_invocation); end + + # We need JRuby specific code here cos just shelling out using + # system() appears to be pretty broken :/ + # + # source://pry//lib/pry/editor.rb#89 + def open_editor_on_jruby(editor_invocation); end + + # Return the syntax for a given editor for starting the editor + # and moving to a particular line within that file + # + # source://pry//lib/pry/editor.rb#115 + def start_line_syntax_for_editor(file_name, line_number); end + + class << self + # source://pry//lib/pry/editor.rb#7 + def default; end + end +end + +# Env is a helper module to work with environment variables. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/env.rb#8 +module Pry::Env + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/env.rb#9 + def [](key); end + end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/exception_handler.rb#6 +module Pry::ExceptionHandler + class << self + # Will only show the first line of the backtrace. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#9 + def handle_exception(output, exception, _pry_instance); end + + private + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#37 + def cause_text(cause); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#32 + def exception_text(exception); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#19 + def standard_error_text_for(exception); end + end +end + +# source://pry//lib/pry/forwardable.rb#4 +module Pry::Forwardable + include ::Forwardable + + # Since Ruby 2.4, Forwardable will print a warning when + # calling a method that is private on a delegate, and + # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3 + # + # That's why we revert to a custom implementation for delegating one + # private method to another. + # + # source://pry//lib/pry/forwardable.rb#16 + def def_private_delegators(target, *private_delegates); end +end + +# When we try to get a binding for an object, we try to define a method on +# that Object's singleton class. This doesn't work for "frozen" Object's, and +# the exception is just a vanilla RuntimeError. +# +# source://pry//lib/pry/exceptions.rb#56 +module Pry::FrozenObjectException + class << self + # source://pry//lib/pry/exceptions.rb#57 + def ===(exception); end + end +end + +# @return [Boolean] true if this Ruby supports safe levels and tainting, +# to guard against using deprecated or unsupported features +# +# source://pry//lib/pry/pry_class.rb#11 +Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), FalseClass) + +# source://pry//lib/pry/helpers/base_helpers.rb#4 +module Pry::Helpers + class << self + # source://pry//lib/pry/helpers/table.rb#27 + def tablify(things, line_length, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#5 + def tablify_or_one_line(heading, things, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#16 + def tablify_to_screen_width(things, options, pry_instance = T.unsafe(nil)); end + end +end + +# source://pry//lib/pry/helpers/base_helpers.rb#5 +module Pry::Helpers::BaseHelpers + extend ::Pry::Helpers::BaseHelpers + + # source://pry//lib/pry/helpers/base_helpers.rb#43 + def colorize_code(code); end + + # source://pry//lib/pry/helpers/base_helpers.rb#27 + def find_command(name, set = T.unsafe(nil)); end + + # formatting + # + # source://pry//lib/pry/helpers/base_helpers.rb#54 + def heading(text); end + + # source://pry//lib/pry/helpers/base_helpers.rb#47 + def highlight(string, regexp, highlight_color = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#34 + def not_a_real_file?(file); end + + # Acts like send but ignores any methods defined below Object or Class in the + # inheritance hierarchy. + # This is required to introspect methods on objects like Net::HTTP::Get that + # have overridden the `method` method. + # + # source://pry//lib/pry/helpers/base_helpers.rb#22 + def safe_send(obj, method, *args, &block); end + + # source://pry//lib/pry/helpers/base_helpers.rb#8 + def silence_warnings; end + + # Send the given text through the best available pager (if Pry.config.pager is + # enabled). Infers where to send the output if used as a mixin. + # DEPRECATED. + # + # source://pry//lib/pry/helpers/base_helpers.rb#62 + def stagger_output(text, _out = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#38 + def use_ansi_codes?; end +end + +# source://pry//lib/pry/helpers/command_helpers.rb#7 +module Pry::Helpers::CommandHelpers + include ::Pry::Helpers::OptionsHelpers + extend ::Pry::Helpers::OptionsHelpers + extend ::Pry::Helpers::CommandHelpers + + # source://pry//lib/pry/helpers/command_helpers.rb#115 + def absolute_index_number(line_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#123 + def absolute_index_range(range_or_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#31 + def get_method_or_raise(method_name, context, opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/command_helpers.rb#21 + def internal_binding?(context); end + + # source://pry//lib/pry/helpers/command_helpers.rb#97 + def one_index_number(line_number); end + + # convert a 1-index range to a 0-indexed one + # + # source://pry//lib/pry/helpers/command_helpers.rb#102 + def one_index_range(range); end + + # source://pry//lib/pry/helpers/command_helpers.rb#106 + def one_index_range_or_number(range_or_number); end + + # Restrict a string to the given range of lines (1-indexed) + # + # @param content [String] The string. + # @param lines [Range, Integer] The line(s) to restrict it to. + # @return [String] The resulting string. + # + # source://pry//lib/pry/helpers/command_helpers.rb#92 + def restrict_to_lines(content, lines); end + + # source://pry//lib/pry/helpers/command_helpers.rb#135 + def set_file_and_dir_locals(file_name, pry = T.unsafe(nil), ctx = T.unsafe(nil)); end + + # Open a temp file and yield it to the block, closing it after + # + # @return [String] The path of the temp file + # + # source://pry//lib/pry/helpers/command_helpers.rb#14 + def temp_file(ext = T.unsafe(nil)); end + + # Remove any common leading whitespace from every line in `text`. This + # can be used to make a HEREDOC line up with the left margin, without + # sacrificing the indentation level of the source code. + # + # @example + # opt.banner(unindent(<<-USAGE)) + # Lorem ipsum dolor sit amet, consectetur adipisicing elit, + # sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + # "Ut enim ad minim veniam." + # USAGE + # @param dirty_text [String] The text from which to remove indentation + # @return [String] the text with indentation stripped + # + # source://pry//lib/pry/helpers/command_helpers.rb#68 + def unindent(dirty_text, left_padding = T.unsafe(nil)); end +end + +# This class contains methods useful for extracting +# documentation from methods and classes. +# +# source://pry//lib/pry/helpers/documentation_helpers.rb#7 +module Pry::Helpers::DocumentationHelpers + private + + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + def strip_leading_whitespace(text); end + + class << self + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + def strip_leading_whitespace(text); end + end +end + +# source://pry//lib/pry/helpers/documentation_helpers.rb#8 +Pry::Helpers::DocumentationHelpers::YARD_TAGS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/helpers/options_helpers.rb#5 +module Pry::Helpers::OptionsHelpers + private + + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 + def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 + def method_options(opt); end + + class << self + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 + def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 + def method_options(opt); end + end +end + +# Contains methods for querying the platform that Pry is running on +# +# @api public +# @since v0.12.0 +# +# source://pry//lib/pry/helpers/platform.rb#10 +module Pry::Helpers::Platform + class << self + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#35 + def jruby?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#40 + def jruby_19?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#17 + def linux?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#12 + def mac_osx?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#45 + def mri?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#50 + def mri_2?; end + + # @api public + # @return [Boolean] true when Pry is running on Windows with ANSI support, + # false otherwise + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#23 + def windows?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#28 + def windows_ansi?; end + end +end + +# source://pry//lib/pry/helpers/table.rb#35 +class Pry::Helpers::Table + # @return [Table] a new instance of Table + # + # source://pry//lib/pry/helpers/table.rb#37 + def initialize(items, args, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#81 + def ==(other); end + + # Returns the value of attribute column_count. + # + # source://pry//lib/pry/helpers/table.rb#36 + def column_count; end + + # source://pry//lib/pry/helpers/table.rb#68 + def column_count=(count); end + + # source://pry//lib/pry/helpers/table.rb#77 + def columns; end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/table.rb#73 + def fits_on_line?(line_length); end + + # Returns the value of attribute items. + # + # source://pry//lib/pry/helpers/table.rb#36 + def items; end + + # source://pry//lib/pry/helpers/table.rb#62 + def items=(items); end + + # source://pry//lib/pry/helpers/table.rb#47 + def rows_to_s(style = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#85 + def to_a; end + + # source://pry//lib/pry/helpers/table.rb#43 + def to_s; end + + private + + # source://pry//lib/pry/helpers/table.rb#91 + def _max_width(things); end + + # source://pry//lib/pry/helpers/table.rb#95 + def _rebuild_colorless_cache; end + + # source://pry//lib/pry/helpers/table.rb#116 + def _recall_color_for(thing); end + + # source://pry//lib/pry/helpers/table.rb#105 + def _recolumn; end +end + +# The methods defined on {Text} are available to custom commands via +# {Pry::Command#text}. +# +# source://pry//lib/pry/helpers/text.rb#7 +module Pry::Helpers::Text + extend ::Pry::Helpers::Text + + # source://pry//lib/pry/helpers/text.rb#23 + def black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_yellow(text); end + + # Returns _text_ as bold text for use on a terminal. + # + # @param text [String, #to_s] + # @return [String] _text_ + # + # source://pry//lib/pry/helpers/text.rb#54 + def bold(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_yellow(text); end + + # Returns `text` in the default foreground colour. + # Use this instead of "black" or "white" when you mean absence of colour. + # + # @param text [String, #to_s] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#63 + def default(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_yellow(text); end + + # Returns _text_ indented by _chars_ spaces. + # + # @param text [String] + # @param chars [Fixnum] + # + # source://pry//lib/pry/helpers/text.rb#113 + def indent(text, chars); end + + # source://pry//lib/pry/helpers/text.rb#23 + def magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_yellow(text); end + + # @return [void] + # @yield Yields a block with color turned off. + # + # source://pry//lib/pry/helpers/text.rb#73 + def no_color; end + + # @return [void] + # @yield Yields a block with paging turned off. + # + # source://pry//lib/pry/helpers/text.rb#87 + def no_pager; end + + # source://pry//lib/pry/helpers/text.rb#23 + def purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_yellow(text); end + + # Remove any color codes from _text_. + # + # @param text [String, #to_s] + # @return [String] _text_ stripped of any color codes. + # + # source://pry//lib/pry/helpers/text.rb#46 + def strip_color(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_yellow(text); end + + # Returns _text_ in a numbered list, beginning at _offset_. + # + # @param text [#each_line] + # @param offset [Fixnum] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#100 + def with_line_numbers(text, offset, color = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/text.rb#23 + def yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_yellow(text); end +end + +# source://pry//lib/pry/helpers/text.rb#10 +Pry::Helpers::Text::COLORS = T.let(T.unsafe(nil), Hash) + +# The History class is responsible for maintaining the user's input history, +# both internally and within Readline. +# +# source://pry//lib/pry/history.rb#6 +class Pry::History + # @return [History] a new instance of History + # + # source://pry//lib/pry/history.rb#29 + def initialize(options = T.unsafe(nil)); end + + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#53 + def <<(line); end + + # Clear this session's history. This won't affect the contents of the + # history file. + # + # source://pry//lib/pry/history.rb#74 + def clear; end + + # Filter the history with the histignore options + # + # @return [Array] An array containing all the lines that are not + # included in the histignore. + # + # source://pry//lib/pry/history.rb#95 + def filter(history); end + + # @return [Integer] total number of lines, including original lines + # + # source://pry//lib/pry/history.rb#27 + def history_line_count; end + + # Load the input history using `History.loader`. + # + # @return [Integer] The number of lines loaded + # + # source://pry//lib/pry/history.rb#40 + def load; end + + # Returns the value of attribute loader. + # + # source://pry//lib/pry/history.rb#21 + def loader; end + + # Sets the attribute loader + # + # @param value the value to set the attribute loader to. + # + # source://pry//lib/pry/history.rb#21 + def loader=(_arg0); end + + # @return [Fixnum] Number of lines in history when Pry first loaded. + # + # source://pry//lib/pry/history.rb#24 + def original_lines; end + + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#53 + def push(line); end + + # Returns the value of attribute saver. + # + # source://pry//lib/pry/history.rb#21 + def saver; end + + # Sets the attribute saver + # + # @param value the value to set the attribute saver to. + # + # source://pry//lib/pry/history.rb#21 + def saver=(_arg0); end + + # @return [Fixnum] The number of lines in history from just this session. + # + # source://pry//lib/pry/history.rb#81 + def session_line_count; end + + # Return an Array containing all stored history. + # + # @return [Array] An Array containing all lines of history loaded + # or entered by the user in the current session. + # + # source://pry//lib/pry/history.rb#88 + def to_a; end + + private + + # The history file, opened for appending. + # + # source://pry//lib/pry/history.rb#127 + def history_file; end + + # source://pry//lib/pry/history.rb#143 + def history_file_path; end + + # @return [Boolean] + # + # source://pry//lib/pry/history.rb#147 + def invalid_readline_line?(line); end + + # The default loader. Yields lines from `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#113 + def read_from_file; end + + # The default saver. Appends the given line to `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#122 + def save_to_file(line); end + + # Check if the line match any option in the histignore + # [Pry.config.history_ignorelist] + # + # @return [Boolean] a boolean that notifies if the line was found in the + # histignore array. + # + # source://pry//lib/pry/history.rb#105 + def should_ignore?(line); end + + class << self + # source://pry//lib/pry/history.rb#7 + def default_file; end + end +end + +# Implements a hooks system for Pry. A hook is a callable that is associated +# with an event. A number of events are currently provided by Pry, these +# include: `:when_started`, `:before_session`, `:after_session`. A hook must +# have a name, and is connected with an event by the `Pry::Hooks#add_hook` +# method. +# +# @example Adding a hook for the `:before_session` event. +# Pry.config.hooks.add_hook(:before_session, :say_hi) do +# puts "hello" +# end +# +# source://pry//lib/pry/hooks.rb#14 +class Pry::Hooks + # @return [Hooks] a new instance of Hooks + # + # source://pry//lib/pry/hooks.rb#25 + def initialize; end + + # Add a new hook to be executed for the `event_name` event. + # + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # @param callable [#call] The callable. + # @raise [ArgumentError] + # @return [Pry:Hooks] The receiver. + # @yield The block to use as the callable (if no `callable` provided). + # + # source://pry//lib/pry/hooks.rb#81 + def add_hook(event_name, hook_name, callable = T.unsafe(nil), &block); end + + # Clear all hooks functions for a given event. + # + # @param event_name [String] The name of the event. + # @return [void] + # + # source://pry//lib/pry/hooks.rb#165 + def clear_event_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # to delete. + # @return [#call] The deleted hook. + # + # source://pry//lib/pry/hooks.rb#147 + def delete_hook(event_name, hook_name); end + + # source://pry//lib/pry/hooks.rb#39 + def errors; end + + # Execute the list of hooks for the `event_name` event. + # + # @param event_name [Symbol] The name of the event. + # @param args [Array] The arguments to pass to each hook function. + # @return [Object] The return value of the last executed hook. + # + # source://pry//lib/pry/hooks.rb#108 + def exec_hook(event_name, *args, &block); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook + # @return [#call] a specific hook for a given event. + # + # source://pry//lib/pry/hooks.rb#128 + def get_hook(event_name, hook_name); end + + # `add_hook`/`delete_hook` for that. + # + # @note Modifying the returned hash does not alter the hooks, use + # @param event_name [Symbol] The name of the event. + # @return [Hash] The hash of hook names / hook functions. + # + # source://pry//lib/pry/hooks.rb#139 + def get_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @return [Fixnum] The number of hook functions for `event_name`. + # + # source://pry//lib/pry/hooks.rb#121 + def hook_count(event_name); end + + # @param event_name [Symbol] Name of the event. + # @param hook_name [Symbol] Name of the hook. + # @return [Boolean] Whether the hook by the name `hook_name`. + # + # source://pry//lib/pry/hooks.rb#172 + def hook_exists?(event_name, hook_name); end + + # @example + # hooks = Pry::Hooks.new.add_hook(:before_session, :say_hi) { puts "hi!" } + # Pry::Hooks.new.merge(hooks) + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry::Hooks] a new `Pry::Hooks` instance containing a merge of the + # contents of two `Pry:Hooks` instances. + # + # source://pry//lib/pry/hooks.rb#69 + def merge(other); end + + # Destructively merge the contents of two `Pry:Hooks` instances. + # + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry:Hooks] The receiver. + # @see #merge + # + # source://pry//lib/pry/hooks.rb#48 + def merge!(other); end + + protected + + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/hooks.rb#178 + def hooks; end + + private + + # Ensure that duplicates have their @hooks object. + # + # source://pry//lib/pry/hooks.rb#30 + def initialize_copy(_orig); end + + class << self + # source://pry//lib/pry/hooks.rb#15 + def default; end + end +end + +# Pry::Indent is a class that can be used to indent a number of lines +# containing Ruby code similar as to how IRB does it (but better). The class +# works by tokenizing a string using CodeRay and then looping over those +# tokens. Based on the tokens in a line of code that line (or the next one) +# will be indented or un-indented by correctly. +# +# source://pry//lib/pry/indent.rb#11 +class Pry::Indent + include ::Pry::Helpers::BaseHelpers + + # @return [Indent] a new instance of Indent + # + # source://pry//lib/pry/indent.rb#104 + def initialize(pry_instance = T.unsafe(nil)); end + + # Return a string which, when printed, will rewrite the previous line with + # the correct indentation. Mostly useful for fixing 'end'. + # + # @param prompt [String] The user's prompt + # @param code [String] The code the user just typed in + # @param overhang [Integer] The number of characters to erase afterwards (the + # the difference in length between the old line and the new one) + # @return [String] correctly indented line + # + # source://pry//lib/pry/indent.rb#393 + def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end + + # Get the indentation for the start of the next line. + # + # This is what's used between the prompt and the cursor in pry. + # + # @return String The correct number of spaces + # + # source://pry//lib/pry/indent.rb#181 + def current_prefix; end + + # If the code just before an "if" or "while" token on a line looks like the + # end of a statement, then we want to treat that "if" as a singleline, not + # multiline statement. + # + # @return [Boolean] + # + # source://pry//lib/pry/indent.rb#264 + def end_of_statement?(last_token, last_kind); end + + # Are we currently in the middle of a string literal. + # + # This is used to determine whether to re-indent a given line, we mustn't + # re-indent within string literals because to do so would actually change + # the value of the String! + # + # @return [Boolean] Boolean + # + # source://pry//lib/pry/indent.rb#275 + def in_string?; end + + # Indents a string and returns it. This string can either be a single line + # or multiple ones. + # + # @example + # str = <] + # + # source://pry//lib/pry/indent.rb#376 + def module_nesting; end + + # All the open delimiters, in the order that they first appeared. + # + # @return [String] + # + # source://pry//lib/pry/indent.rb#312 + def open_delimiters; end + + # Return a string which restores the CodeRay string status to the correct value by + # opening HEREDOCs and strings. + # + # @return String + # + # source://pry//lib/pry/indent.rb#320 + def open_delimiters_line; end + + # reset internal state + # + # source://pry//lib/pry/indent.rb#110 + def reset; end + + # @return [Array] The stack of open tokens. + # + # source://pry//lib/pry/indent.rb#21 + def stack; end + + # Given a string of Ruby code, use CodeRay to export the tokens. + # + # @param string [String] The Ruby to lex + # @return [Array] An Array of pairs of [token_value, token_type] + # + # source://pry//lib/pry/indent.rb#283 + def tokenize(string); end + + # Update the internal state about what kind of strings are open. + # + # Most of the complication here comes from the fact that HEREDOCs can be + # nested. For normal strings (which can't be nested) we assume that CodeRay + # correctly pairs open-and-close delimiters so we don't bother checking what + # they are. + # + # @param token [String] The token (of type :delimiter) + # + # source://pry//lib/pry/indent.rb#297 + def track_delimiter(token); end + + # Update the internal state relating to module nesting. + # + # It's responsible for adding to the @module_nesting array, which looks + # something like: + # + # [ ["class", "Foo"], ["module", "Bar::Baz"], ["class <<", "self"] ] + # + # A nil value in the @module_nesting array happens in two places: either + # when @awaiting_class is true and we're still waiting for the string to + # fill that space, or when a parse was rejected. + # + # At the moment this function is quite restricted about what formats it will + # parse, for example we disallow expressions after the class keyword. This + # could maybe be improved in the future. + # + # @param token [String] a token from Coderay + # @param kind [Symbol] the kind of that token + # + # source://pry//lib/pry/indent.rb#341 + def track_module_nesting(token, kind); end + + # Update the internal state relating to module nesting on 'end'. + # + # If the current 'end' pairs up with a class or a module then we should + # pop an array off of @module_nesting + # + # @param token [String] a token from Coderay + # @param kind [Symbol] the kind of that token + # + # source://pry//lib/pry/indent.rb#366 + def track_module_nesting_end(token, kind = T.unsafe(nil)); end + + class << self + # Clean the indentation of a fragment of ruby. + # + # @param str [String] + # @return [String] + # + # source://pry//lib/pry/indent.rb#82 + def indent(str); end + + # Get the module nesting at the given point in the given string. + # + # NOTE If the line specified contains a method definition, then the nesting + # at the start of the method definition is used. Otherwise the nesting from + # the end of the line is used. + # + # @param str [String] The ruby code to analyze + # @param line_number [Fixnum] The line number (starting from 1) + # @return [Array] + # + # source://pry//lib/pry/indent.rb#95 + def nesting_at(str, line_number); end + end +end + +# Collection of token types that should be ignored. Without this list +# keywords such as "class" inside strings would cause the code to be +# indented incorrectly. +# +# :pre_constant and :preserved_constant are the CodeRay 0.9.8 and 1.0.0 +# classifications of "true", "false", and "nil". +# +# source://pry//lib/pry/indent.rb#60 +Pry::Indent::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) + +# Collection of tokens that should appear dedented even though they +# don't affect the surrounding code. +# +# source://pry//lib/pry/indent.rb#76 +Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) + +# Hash containing all the tokens that should increase the indentation +# level. The keys of this hash are open tokens, the values the matching +# tokens that should prevent a line from being indented if they appear on +# the same line. +# +# source://pry//lib/pry/indent.rb#30 +Pry::Indent::OPEN_TOKENS = T.let(T.unsafe(nil), Hash) + +# Which tokens can be followed by an optional "do" keyword. +# +# source://pry//lib/pry/indent.rb#52 +Pry::Indent::OPTIONAL_DO_TOKENS = T.let(T.unsafe(nil), Array) + +# Which tokens can either be open tokens, or appear as modifiers on +# a single-line. +# +# source://pry//lib/pry/indent.rb#49 +Pry::Indent::SINGLELINE_TOKENS = T.let(T.unsafe(nil), Array) + +# The amount of spaces to insert for each indent level. +# +# source://pry//lib/pry/indent.rb#24 +Pry::Indent::SPACES = T.let(T.unsafe(nil), String) + +# Tokens that indicate the end of a statement (i.e. that, if they appear +# directly before an "if" indicates that that if applies to the same line, +# not the next line) +# +# :reserved and :keywords are the CodeRay 0.9.8 and 1.0.0 respectively +# classifications of "super", "next", "return", etc. +# +# source://pry//lib/pry/indent.rb#69 +Pry::Indent::STATEMENT_END_TOKENS = T.let(T.unsafe(nil), Array) + +# Raised if {#module_nesting} would not work. +# +# source://pry//lib/pry/indent.rb#15 +class Pry::Indent::UnparseableNestingError < ::StandardError; end + +# source://pry//lib/pry/input_completer.rb#6 +class Pry::InputCompleter + # @return [InputCompleter] a new instance of InputCompleter + # + # source://pry//lib/pry/input_completer.rb#42 + def initialize(input, pry = T.unsafe(nil)); end + + # build_path seperates the input into two parts: path and input. + # input is the partial string that should be completed + # path is a proc that takes an input and builds a full path. + # + # source://pry//lib/pry/input_completer.rb#240 + def build_path(input); end + + # Return a new completion proc for use by Readline. + # + # source://pry//lib/pry/input_completer.rb#56 + def call(str, options = T.unsafe(nil)); end + + # source://pry//lib/pry/input_completer.rb#255 + def ignored_modules; end + + # source://pry//lib/pry/input_completer.rb#229 + def select_message(path, receiver, message, candidates); end +end + +# source://pry//lib/pry/input_completer.rb#8 +Pry::InputCompleter::ARRAY_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#15 +Pry::InputCompleter::CONSTANT_OR_METHOD_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#14 +Pry::InputCompleter::CONSTANT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#17 +Pry::InputCompleter::GLOBALVARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#16 +Pry::InputCompleter::HEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#7 +Pry::InputCompleter::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#12 +Pry::InputCompleter::PROC_OR_HASH_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#11 +Pry::InputCompleter::REGEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#20 +Pry::InputCompleter::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/input_completer.rb#10 +Pry::InputCompleter::SYMBOL_METHOD_CALL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#9 +Pry::InputCompleter::SYMBOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#13 +Pry::InputCompleter::TOPLEVEL_LOOKUP_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#18 +Pry::InputCompleter::VARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#40 +Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) + +# There is one InputLock per input (such as STDIN) as two REPLs on the same +# input makes things delirious. InputLock serializes accesses to the input so +# that threads to not conflict with each other. The latest thread to request +# ownership of the input wins. +# +# source://pry//lib/pry/input_lock.rb#8 +class Pry::InputLock + # @return [InputLock] a new instance of InputLock + # + # source://pry//lib/pry/input_lock.rb#29 + def initialize; end + + # Adds ourselves to the ownership list. The last one in the list may access + # the input through interruptible_region(). + # + # source://pry//lib/pry/input_lock.rb#38 + def __with_ownership; end + + # source://pry//lib/pry/input_lock.rb#81 + def enter_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#108 + def interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#95 + def leave_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#75 + def with_ownership(&block); end + + class << self + # source://pry//lib/pry/input_lock.rb#19 + def for(input); end + + # Returns the value of attribute global_lock. + # + # source://pry//lib/pry/input_lock.rb#13 + def global_lock; end + + # Sets the attribute global_lock + # + # @param value the value to set the attribute global_lock to. + # + # source://pry//lib/pry/input_lock.rb#13 + def global_lock=(_arg0); end + + # Returns the value of attribute input_locks. + # + # source://pry//lib/pry/input_lock.rb#12 + def input_locks; end + + # Sets the attribute input_locks + # + # @param value the value to set the attribute input_locks to. + # + # source://pry//lib/pry/input_lock.rb#12 + def input_locks=(_arg0); end + end +end + +# source://pry//lib/pry/input_lock.rb#9 +class Pry::InputLock::Interrupt < ::Exception; end + +# source://pry//lib/pry/inspector.rb#4 +class Pry::Inspector; end + +# source://pry//lib/pry/inspector.rb#5 +Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/pry_class.rb#7 +Pry::LOCAL_RC_FILE = T.let(T.unsafe(nil), String) + +# source://pry//lib/pry/last_exception.rb#12 +class Pry::LastException < ::BasicObject + # @return [LastException] a new instance of LastException + # + # source://pry//lib/pry/last_exception.rb#15 + def initialize(exception); end + + # Returns the value of attribute bt_index. + # + # source://pry//lib/pry/last_exception.rb#13 + def bt_index; end + + # Sets the attribute bt_index + # + # @param value the value to set the attribute bt_index to. + # + # source://pry//lib/pry/last_exception.rb#13 + def bt_index=(_arg0); end + + # source://pry//lib/pry/last_exception.rb#52 + def bt_source_location_for(index); end + + # @return [String] returns the path to a file for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#37 + def file; end + + # source://pry//lib/pry/last_exception.rb#57 + def inc_bt_index; end + + # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#43 + def line; end + + # source://pry//lib/pry/last_exception.rb#21 + def method_missing(name, *args, &block); end + + # @return [Exception] returns the wrapped exception + # + # source://pry//lib/pry/last_exception.rb#48 + def wrapped_exception; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/last_exception.rb#29 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# This class wraps the normal `Method` and `UnboundMethod` classes +# to provide extra functionality useful to Pry. +# +# source://pry//lib/pry/method.rb#20 +class Pry::Method + include ::Pry::Helpers::BaseHelpers + include ::Pry::Helpers::DocumentationHelpers + include ::Pry::CodeObject::Helpers + extend ::Pry::Helpers::BaseHelpers + extend ::Forwardable + extend ::Pry::Forwardable + + # A new instance of `Pry::Method` wrapping the given `::Method`, + # `UnboundMethod`, or `Proc`. + # + # @param method [::Method, UnboundMethod, Proc] + # @param known_info [Hash] Can be used to pre-cache expensive to compute stuff. + # @return [Pry::Method] + # + # source://pry//lib/pry/method.rb#263 + def initialize(method, known_info = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#483 + def ==(other); end + + # @return [Boolean] Is the method definitely an alias? + # + # source://pry//lib/pry/method.rb#478 + def alias?; end + + # @return [Array] All known aliases for the method. + # + # source://pry//lib/pry/method.rb#461 + def aliases; end + + # @return [Boolean] Whether the method is bound. + # + # source://pry//lib/pry/method.rb#446 + def bound_method?; end + + # source://pry//lib/pry/method.rb#515 + def comment; end + + # @return [String, nil] The documentation for the method, or `nil` if it's + # unavailable. + # + # source://pry//lib/pry/method.rb#329 + def doc; end + + # @return [Boolean] Was the method defined outside a source file? + # + # source://pry//lib/pry/method.rb#436 + def dynamically_defined?; end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#491 + def is_a?(klass); end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#491 + def kind_of?(klass); end + + # Delegate any unknown calls to the wrapped method. + # + # source://pry//lib/pry/method.rb#503 + def method_missing(method_name, *args, &block); end + + # Get the name of the method as a String, regardless of the underlying + # Method#name type. + # + # @return [String] + # + # source://pry//lib/pry/method.rb#272 + def name; end + + # Get the name of the method including the class on which it was defined. + # + # @example + # method(:puts).method_name + # => "Kernel.puts" + # @return [String] + # + # source://pry//lib/pry/method.rb#299 + def name_with_owner; end + + # @return [String, nil] The original name the method was defined under, + # before any aliasing, or `nil` if it can't be determined. + # + # source://pry//lib/pry/method.rb#429 + def original_name; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def owner(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def parameters(*args, **_arg1, &block); end + + # @return [Boolean] Was the method defined within the Pry REPL? + # + # source://pry//lib/pry/method.rb#456 + def pry_method?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def receiver(*args, **_arg1, &block); end + + # Update the live copy of the method's source. + # + # source://pry//lib/pry/method.rb#314 + def redefine(source); end + + # @param method_name [String, Symbol] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#498 + def respond_to?(method_name, include_all = T.unsafe(nil)); end + + # @return [String] A representation of the method's signature, including its + # name and parameters. Optional and "rest" parameters are marked with `*` + # and block parameters with `&`. Keyword arguments are shown with `:` + # If the parameter names are unavailable, they're given numbered names instead. + # Paraphrased from `awesome_print` gem. + # + # source://pry//lib/pry/method.rb#391 + def signature; end + + # @return [Boolean] Whether the method is a singleton method. + # + # source://pry//lib/pry/method.rb#451 + def singleton_method?; end + + # @return [String, nil] The source code of the method, or `nil` if it's unavailable. + # + # source://pry//lib/pry/method.rb#304 + def source; end + + # Can we get the source code for this method? + # + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#321 + def source?; end + + # @return [String, nil] The name of the file the method is defined in, or + # `nil` if the filename is unavailable. + # + # source://pry//lib/pry/method.rb#348 + def source_file; end + + # @return [Fixnum, nil] The line of code in `source_file` which begins + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#361 + def source_line; end + + # @return [Range, nil] The range of lines in `source_file` which contain + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#367 + def source_range; end + + # @return [Symbol] The source type of the method. The options are + # `:ruby` for Ruby methods or `:c` for methods written in C. + # + # source://pry//lib/pry/method.rb#342 + def source_type; end + + # @return [Pry::Method, nil] The wrapped method that is called when you + # use "super" in the body of this method. + # + # source://pry//lib/pry/method.rb#417 + def super(times = T.unsafe(nil)); end + + # @return [Boolean] Whether the method is unbound. + # + # source://pry//lib/pry/method.rb#441 + def unbound_method?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] false + # + # source://pry//lib/pry/method.rb#290 + def undefined?; end + + # @return [Symbol] The visibility of the method. May be `:public`, + # `:protected`, or `:private`. + # + # source://pry//lib/pry/method.rb#373 + def visibility; end + + # Get underlying object wrapped by this Pry::Method instance + # + # @return [Method, UnboundMethod, Proc] + # + # source://pry//lib/pry/method.rb#284 + def wrapped; end + + # Get the owner of the method as a Pry::Module + # + # @return [Pry::Module] + # + # source://pry//lib/pry/method.rb#278 + def wrapped_owner; end + + private + + # source://pry//lib/pry/method.rb#578 + def c_source; end + + # @param first_ln [String] The first line of a method definition. + # @return [String, nil] + # + # source://pry//lib/pry/method.rb#564 + def method_name_from_first_line(first_ln); end + + # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. + # @return [YARD::CodeObjects::MethodObject] + # + # source://pry//lib/pry/method.rb#523 + def pry_doc_info; end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#511 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + # source://pry//lib/pry/method.rb#583 + def ruby_source; end + + # @param ancestors [Class, Module] The ancestors to investigate + # @return [Method] The unwrapped super-method + # + # source://pry//lib/pry/method.rb#543 + def super_using_ancestors(ancestors, times = T.unsafe(nil)); end + + class << self + # Get all of the instance methods of a `Class` or `Module` + # + # @param klass [Class, Module] + # @param include_super [Boolean] Whether to include methods from ancestors. + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#161 + def all_from_class(klass, include_super = T.unsafe(nil)); end + + # Get all of the methods on an `Object` + # + # @param obj [Object] + # @param include_super [Boolean] indicates whether or not to include methods from ancestors. + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#184 + def all_from_obj(obj, include_super = T.unsafe(nil)); end + + # Given a `Binding`, try to extract the `::Method` it originated from and + # use it to instantiate a `Pry::Method`. Return `nil` if this isn't + # possible. + # + # @param binding [Binding] + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#77 + def from_binding(binding); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#136 + def from_class(klass, name, target = T.unsafe(nil)); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#136 + def from_module(klass, name, target = T.unsafe(nil)); end + + # Given an object and the name of a method, try to instantiate + # a `Pry::Method` containing the method of that name bound to + # that object. Return `nil` if no such method exists. + # + # @param obj [Object] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#151 + def from_obj(obj, name, target = T.unsafe(nil)); end + + # Given a string representing a method name and optionally a binding to + # search in, find and return the requested method wrapped in a + # `Pry::Method` instance. + # + # @option options + # @option options + # @param name [String] The name of the method to retrieve. + # @param target [Binding] The context in which to search for the method. + # @param options [Hash] + # @return [Pry::Method, nil] A `Pry::Method` instance containing the + # requested method, or `nil` if name is `nil` or no method could be + # located matching the parameters. + # + # source://pry//lib/pry/method.rb#43 + def from_str(name, target = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#227 + def instance_method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for methods on instances of the given `Class` or `Module`. + # This does not treat singleton classes of classes specially. + # + # @param klass [Class, Module] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#210 + def instance_resolution_order(klass); end + + # In order to support 2.0 Refinements we need to look up methods + # inside the relevant Binding. + # + # @param obj [Object] The owner/receiver of the method. + # @param method_name [Symbol] The name of the method. + # @param method_type [Symbol] The type of method: :method or :instance_method + # @param target [Binding] The binding where the method is looked up. + # @return [Method, UnboundMethod] The 'refined' method object. + # + # source://pry//lib/pry/method.rb#114 + def lookup_method_via_binding(obj, method_name, method_type, target = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#215 + def method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for an instance method to call on this object. + # + # @param obj [Object] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#192 + def resolution_order(obj); end + + # source://pry//lib/pry/method.rb#247 + def singleton_class_of(obj); end + + # Get the singleton classes of superclasses that could define methods on + # the given class object, and any modules they include. + # If a module is included at multiple points in the ancestry, only + # the lowest copy will be returned. + # + # source://pry//lib/pry/method.rb#238 + def singleton_class_resolution_order(klass); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#220 + def singleton_method_definition?(name, definition_line); end + end +end + +# A Disowned Method is one that's been removed from the class on which it was defined. +# +# e.g. +# class C +# def foo +# C.send(:undefine_method, :foo) +# Pry::Method.from_binding(binding) +# end +# end +# +# In this case we assume that the "owner" is the singleton class of the receiver. +# +# This occurs mainly in Sinatra applications. +# +# source://pry//lib/pry/method/disowned.rb#18 +class Pry::Method::Disowned < ::Pry::Method + # Create a new Disowned method. + # + # @param receiver [Object] + # @param method_name [String] + # @return [Disowned] a new instance of Disowned + # + # source://pry//lib/pry/method/disowned.rb#25 + def initialize(receiver, method_name); end + + # Raise a more useful error message instead of trying to forward to nil. + # + # source://pry//lib/pry/method/disowned.rb#52 + def method_missing(method_name, *args, &block); end + + # Returns the value of attribute name. + # + # source://pry//lib/pry/method/disowned.rb#19 + def name; end + + # Get the hypothesized owner of the method. + # + # @return [Object] + # + # source://pry//lib/pry/method/disowned.rb#46 + def owner; end + + # Returns the value of attribute receiver. + # + # source://pry//lib/pry/method/disowned.rb#19 + def receiver; end + + # Can we get the source for this method? + # + # @return [Boolean] false + # + # source://pry//lib/pry/method/disowned.rb#39 + def source?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] true + # + # source://pry//lib/pry/method/disowned.rb#33 + def undefined?; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/method/disowned.rb#62 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# source://pry//lib/pry/method/patcher.rb#5 +class Pry::Method::Patcher + # @return [Patcher] a new instance of Patcher + # + # source://pry//lib/pry/method/patcher.rb#12 + def initialize(method); end + + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/patcher.rb#6 + def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/patcher.rb#6 + def method=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/method/patcher.rb#21 + def patch_in_ram(source); end + + private + + # source://pry//lib/pry/method/patcher.rb#38 + def cache_key; end + + # Update the definition line so that it can be eval'd directly on the Method's + # owner instead of from the original context. + # + # In particular this takes `def self.foo` and turns it into `def foo` so that we + # don't end up creating the method on the singleton class of the singleton class + # by accident. + # + # This is necessarily done by String manipulation because we can't find out what + # syntax is needed for the argument list by ruby-level introspection. + # + # @param line [String] The original definition line. e.g. def self.foo(bar, baz=1) + # @return [String] The new definition line. e.g. def foo(bar, baz=1) + # + # source://pry//lib/pry/method/patcher.rb#78 + def definition_for_owner(line); end + + # source://pry//lib/pry/method/patcher.rb#33 + def redefine(source); end + + # Run some code ensuring that at the end target#meth_name will not have changed. + # + # When we're redefining aliased methods we will overwrite the method at the + # unaliased name (so that super continues to work). By wrapping that code in a + # transation we make that not happen, which means that alias_method_chains, etc. + # continue to work. + # + # source://pry//lib/pry/method/patcher.rb#49 + def with_method_transaction; end + + # Apply wrap_for_owner and wrap_for_nesting successively to `source` + # + # @param source [String] + # @return [String] The wrapped source. + # + # source://pry//lib/pry/method/patcher.rb#91 + def wrap(source); end + + # Update the new source code to have the correct Module.nesting. + # + # This method uses syntactic analysis of the original source file to determine + # the new nesting, so that we can tell the difference between: + # + # class A; def self.b; end; end + # class << A; def b; end; end + # + # The resulting code should be evaluated in the TOPLEVEL_BINDING. + # + # @param source [String] The source to wrap. + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#122 + def wrap_for_nesting(source); end + + # Update the source code so that when it has the right owner when eval'd. + # + # This (combined with definition_for_owner) is backup for the case that + # wrap_for_nesting fails, to ensure that the method will stil be defined in + # the correct place. + # + # @param source [String] The source to wrap + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#103 + def wrap_for_owner(source); end + + class << self + # source://pry//lib/pry/method/patcher.rb#16 + def code_for(filename); end + end +end + +# This class is responsible for locating the *real* `Pry::Method` +# object captured by a binding. +# +# Given a `Binding` from inside a method and a 'seed' Pry::Method object, +# there are primarily two situations where the seed method doesn't match +# the Binding: +# 1. The Pry::Method is from a subclass +# 2. The Pry::Method represents a method of the same name while the original +# was renamed to something else. For 1. we search vertically up the +# inheritance chain, and for 2. we search laterally along the object's +# method table. +# +# When we locate the method that matches the Binding we wrap it in +# Pry::Method and return it, or return nil if we fail. +# +# source://pry//lib/pry/method/weird_method_locator.rb#19 +class Pry::Method::WeirdMethodLocator + # @param method [Pry::Method] The seed method. + # @param target [Binding] The Binding that captures the method + # we want to locate. + # @return [WeirdMethodLocator] a new instance of WeirdMethodLocator + # + # source://pry//lib/pry/method/weird_method_locator.rb#55 + def initialize(method, target); end + + # @return [Pry::Method, nil] The Pry::Method that matches the + # given binding. + # + # source://pry//lib/pry/method/weird_method_locator.rb#62 + def find_method; end + + # @return [Boolean] Whether the Pry::Method is unrecoverable + # This usually happens when the method captured by the Binding + # has been subsequently deleted. + # + # source://pry//lib/pry/method/weird_method_locator.rb#69 + def lost_method?; end + + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 + def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 + def method=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 + def target=(_arg0); end + + private + + # source://pry//lib/pry/method/weird_method_locator.rb#215 + def all_methods_for(obj); end + + # source://pry//lib/pry/method/weird_method_locator.rb#167 + def expanded_source_location(source_location); end + + # it's possible in some cases that the method we find by this approach is + # a sub-method of the one we're currently in, consider: + # + # class A; def b; binding.pry; end; end + # class B < A; def b; super; end; end + # + # Given that we can normally find the source_range of methods, and that we + # know which __FILE__ and __LINE__ the binding is at, we can hope to + # disambiguate these cases. + # + # This obviously won't work if the source is unavaiable for some reason, + # or if both methods have the same __FILE__ and __LINE__. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # superclass method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#131 + def find_method_in_superclass; end + + # This is the case where the name of a method has changed + # (via alias_method) so we locate the Method object for the + # renamed method. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#156 + def find_renamed_method; end + + # source://pry//lib/pry/method/weird_method_locator.rb#197 + def index_to_line_number(index); end + + # source://pry//lib/pry/method/weird_method_locator.rb#206 + def lines_for_file(file); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#80 + def normal_method?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#106 + def pry_file?; end + + # Use static analysis to locate the start of the method definition. + # We have the `__FILE__` and `__LINE__` from the binding and the + # original name of the method so we search up until we find a + # def/define_method, etc defining a method of the appropriate name. + # + # @return [Array] The `source_location` of the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#184 + def renamed_method_source_location; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#75 + def skip_superclass_search?; end + + # source://pry//lib/pry/method/weird_method_locator.rb#88 + def target_file; end + + # source://pry//lib/pry/method/weird_method_locator.rb#98 + def target_line; end + + # source://pry//lib/pry/method/weird_method_locator.rb#84 + def target_self; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#202 + def valid_file?(file); end + + class << self + # Whether the given method object matches the associated binding. + # If the method object does not match the binding, then it's + # most likely not the method captured by the binding, and we + # must commence a search. + # + # @param method [Pry::Method] + # @param binding [Binding] + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#29 + def normal_method?(method, binding); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#44 + def weird_method?(method, binding); end + end +end + +# source://pry//lib/pry/exceptions.rb#69 +class Pry::MethodNotFound < ::Pry::CommandError; end + +# source://pry//lib/pry/command_set.rb#4 +class Pry::NoCommandError < ::StandardError + # @return [NoCommandError] a new instance of NoCommandError + # + # source://pry//lib/pry/command_set.rb#5 + def initialize(match, owner); end +end + +# `ObjectPath` implements the resolution of "object paths", which are strings +# that are similar to filesystem paths but meant for traversing Ruby objects. +# Examples of valid object paths include: +# +# x +# @foo/@bar +# "string"/upcase +# Pry/Method +# +# Object paths are mostly relevant in the context of the `cd` command. +# +# @see https://github.com/pry/pry/wiki/State-navigation +# +# source://pry//lib/pry/object_path.rb#17 +class Pry::ObjectPath + # @param path_string [String] The object path expressed as a string. + # @param current_stack [Array] The current state of the binding + # stack. + # @return [ObjectPath] a new instance of ObjectPath + # + # source://pry//lib/pry/object_path.rb#23 + def initialize(path_string, current_stack); end + + # @return [Array] a new stack resulting from applying the given + # path to the current stack. + # + # source://pry//lib/pry/object_path.rb#30 + def resolve; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/object_path.rb#74 + def complete?(segment); end + + # source://pry//lib/pry/object_path.rb#78 + def handle_failure(context, err); end +end + +# source://pry//lib/pry/object_path.rb#18 +Pry::ObjectPath::SPECIAL_TERMS = T.let(T.unsafe(nil), Array) + +# indicates obsolete API +# +# source://pry//lib/pry/exceptions.rb#72 +class Pry::ObsoleteError < ::StandardError; end + +# source://pry//lib/pry/output.rb#4 +class Pry::Output + # @return [Output] a new instance of Output + # + # source://pry//lib/pry/output.rb#10 + def initialize(pry_instance); end + + # source://pry//lib/pry/output.rb#28 + def <<(*objs); end + + # source://pry//lib/pry/output.rb#53 + def decolorize_maybe(str); end + + # Return a screen height or the default if that fails. + # + # source://pry//lib/pry/output.rb#74 + def height; end + + # source://pry//lib/pry/output.rb#41 + def method_missing(method_name, *args, &block); end + + # source://pry//lib/pry/output.rb#28 + def print(*objs); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/output.rb#8 + def pry_instance; end + + # source://pry//lib/pry/output.rb#15 + def puts(*objs); end + + # @return [Array] a pair of [rows, columns] which gives the size of + # the window. If the window size cannot be determined, the default value. + # + # source://pry//lib/pry/output.rb#61 + def size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#37 + def tty?; end + + # Return a screen width or the default if that fails. + # + # source://pry//lib/pry/output.rb#69 + def width; end + + # source://pry//lib/pry/output.rb#28 + def write(*objs); end + + private + + # source://pry//lib/pry/output.rb#80 + def actual_screen_size; end + + # source://pry//lib/pry/output.rb#125 + def ansicon_env_size; end + + # source://pry//lib/pry/output.rb#109 + def env_size; end + + # source://pry//lib/pry/output.rb#92 + def io_console_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#132 + def nonzero_column?(size); end + + # source://pry//lib/pry/output.rb#114 + def readline_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#49 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# @return [Array] default terminal screen size [rows, cols] +# +# source://pry//lib/pry/output.rb#6 +Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/pager.rb#7 +class Pry::Pager + # @return [Pager] a new instance of Pager + # + # source://pry//lib/pry/pager.rb#13 + def initialize(pry_instance); end + + # Yields a pager object (`NullPager`, `SimplePager`, or `SystemPager`). + # All pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. + # + # source://pry//lib/pry/pager.rb#33 + def open; end + + # Send the given text through the best available pager (if + # `Pry.config.pager` is enabled). If you want to send text through in + # chunks as you generate it, use `open` to get a writable object + # instead. + # + # @param text [String] Text to run through a pager. + # + # source://pry//lib/pry/pager.rb#25 + def page(text); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/pager.rb#11 + def pry_instance; end + + private + + # Return an instance of the "best" available pager class -- + # `SystemPager` if possible, `SimplePager` if `SystemPager` isn't + # available, and `NullPager` if the user has disabled paging. All + # pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. You + # must call `#close` when you're done writing output to a pager, and + # you must rescue `Pry::Pager::StopPaging`. These requirements can be + # avoided by using `.open` instead. + # + # source://pry//lib/pry/pager.rb#56 + def best_available; end + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#43 + def enabled?; end + + # Returns the value of attribute output. + # + # source://pry//lib/pry/pager.rb#47 + def output; end +end + +# `NullPager` is a "pager" that actually just prints all output as it +# comes in. Used when `Pry.config.pager` is false. +# +# source://pry//lib/pry/pager.rb#68 +class Pry::Pager::NullPager + # @return [NullPager] a new instance of NullPager + # + # source://pry//lib/pry/pager.rb#69 + def initialize(out); end + + # source://pry//lib/pry/pager.rb#77 + def <<(str); end + + # source://pry//lib/pry/pager.rb#86 + def close; end + + # source://pry//lib/pry/pager.rb#77 + def print(str); end + + # source://pry//lib/pry/pager.rb#73 + def puts(str); end + + # source://pry//lib/pry/pager.rb#82 + def write(str); end + + private + + # source://pry//lib/pry/pager.rb#90 + def height; end + + # source://pry//lib/pry/pager.rb#94 + def width; end +end + +# `PageTracker` tracks output to determine whether it's likely to take +# up a whole page. This doesn't need to be super precise, but we can +# use it for `SimplePager` and to avoid invoking the system pager +# unnecessarily. +# +# One simplifying assumption is that we don't need `#page?` to return +# `true` on the basis of an incomplete line. Long lines should be +# counted as multiple lines, but we don't have to transition from +# `false` to `true` until we see a newline. +# +# source://pry//lib/pry/pager.rb#213 +class Pry::Pager::PageTracker + # @return [PageTracker] a new instance of PageTracker + # + # source://pry//lib/pry/pager.rb#214 + def initialize(rows, cols); end + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#231 + def page?; end + + # source://pry//lib/pry/pager.rb#220 + def record(str); end + + # source://pry//lib/pry/pager.rb#235 + def reset; end + + private + + # Approximation of the printable length of a given line, without the + # newline and without ANSI color codes. + # + # source://pry//lib/pry/pager.rb#244 + def line_length(line); end +end + +# `SimplePager` is a straightforward pure-Ruby pager. We use it on +# JRuby and when we can't find a usable external pager. +# +# source://pry//lib/pry/pager.rb#101 +class Pry::Pager::SimplePager < ::Pry::Pager::NullPager + # @return [SimplePager] a new instance of SimplePager + # + # source://pry//lib/pry/pager.rb#102 + def initialize(*_arg0); end + + # source://pry//lib/pry/pager.rb#107 + def write(str); end +end + +# source://pry//lib/pry/pager.rb#8 +class Pry::Pager::StopPaging < ::StandardError; end + +# `SystemPager` buffers output until we're pretty sure it's at least a +# page long, then invokes an external pager and starts streaming output +# to it. If `#close` is called before then, it just prints out the +# buffered content. +# +# source://pry//lib/pry/pager.rb#129 +class Pry::Pager::SystemPager < ::Pry::Pager::NullPager + # @return [SystemPager] a new instance of SystemPager + # + # source://pry//lib/pry/pager.rb#161 + def initialize(*_arg0); end + + # source://pry//lib/pry/pager.rb#181 + def close; end + + # source://pry//lib/pry/pager.rb#168 + def write(str); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#195 + def invoked_pager?; end + + # source://pry//lib/pry/pager.rb#199 + def pager; end + + # source://pry//lib/pry/pager.rb#191 + def write_to_pager(text); end + + class << self + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#142 + def available?; end + + # source://pry//lib/pry/pager.rb#130 + def default_pager; end + end +end + +# Prompt represents the Pry prompt, which can be used with Readline-like +# libraries. It defines a few default prompts (default prompt, simple prompt, +# etc) and also provides an API for adding and implementing custom prompts. +# +# @api public +# @example Registering a new Pry prompt +# Pry::Prompt.add( +# :ipython, +# 'IPython-like prompt', [':', '...:'] +# ) do |_context, _nesting, pry_instance, sep| +# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' +# end +# +# # Produces: +# # In [3]: def foo +# # ...: puts 'foo' +# # ...: end +# # => :foo +# # In [4]: +# @example Manually instantiating the Prompt class +# prompt_procs = [ +# proc { '#{rand(1)}>" }, +# proc { "#{('a'..'z').to_a.sample}*" } +# ] +# prompt = Pry::Prompt.new( +# :random, +# 'Random number or letter prompt.', +# prompt_procs +# ) +# prompt.wait_proc.call(...) #=> +# prompt.incomplete_proc.call(...) +# @since v0.11.0 +# +# source://pry//lib/pry/prompt.rb#38 +class Pry::Prompt + # @api public + # @param name [String] + # @param description [String] + # @param prompt_procs [Array] + # @return [Prompt] a new instance of Prompt + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#117 + def initialize(name, description, prompt_procs); end + + # @api public + # @deprecated Use a `Pry::Prompt` instance directly + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#135 + def [](key); end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#108 + def description; end + + # @api public + # @return [Proc] the proc which builds the prompt when in the middle of an + # expression such as open method, etc. (`*`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#130 + def incomplete_proc; end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#105 + def name; end + + # @api public + # @return [Array] the array of procs that hold + # `[wait_proc, incomplete_proc]` + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#112 + def prompt_procs; end + + # @api public + # @return [Proc] the proc which builds the wait prompt (`>`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#124 + def wait_proc; end + + class << self + # Retrieves a prompt. + # + # @api public + # @example + # Prompt[:my_prompt] + # @param name [Symbol] The name of the prompt you want to access + # @return [Hash{Symbol=>Object}] + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#52 + def [](name); end + + # Adds a new prompt to the prompt hash. + # + # @api public + # @param name [Symbol] + # @param description [String] + # @param separators [Array] The separators to differentiate + # between prompt modes (default mode and class/method definition mode). + # The Array *must* have a size of 2. + # @raise [ArgumentError] if the size of `separators` is not 2 + # @raise [ArgumentError] if `prompt_name` is already occupied + # @return [nil] + # @since v0.12.0 + # @yield [context, nesting, pry_instance, sep] + # @yieldparam context [Object] the context where Pry is currently in + # @yieldparam nesting [Integer] whether the context is nested + # @yieldparam pry_instance [Pry] the Pry instance + # @yieldparam separator [String] separator string + # + # source://pry//lib/pry/prompt.rb#79 + def add(name, description = T.unsafe(nil), separators = T.unsafe(nil)); end + + # @api public + # @note Use this for read-only operations + # @return [Hash{Symbol=>Hash}] the duplicate of the internal prompts hash + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#59 + def all; end + end +end + +# source://pry//lib/pry/repl.rb#4 +class Pry::REPL + extend ::Forwardable + extend ::Pry::Forwardable + + # Create an instance of {REPL} wrapping the given {Pry}. + # + # @option options + # @param pry [Pry] The instance of {Pry} that this {REPL} will control. + # @param options [Hash] Options for this {REPL} instance. + # @return [REPL] a new instance of REPL + # + # source://pry//lib/pry/repl.rb#22 + def initialize(pry, options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def output(*args, **_arg1, &block); end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 + def pry; end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 + def pry=(_arg0); end + + # Start the read-eval-print loop. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#36 + def start; end + + private + + # Calculates correct overhang for current line. Supports vi Readline + # mode and its indicators such as "(ins)" or "(cmd)". + # + # @note This doesn't calculate overhang for Readline's emacs mode with an + # indicator because emacs is the default mode and it doesn't use + # indicators in 99% of cases. + # @return [Integer] + # + # source://pry//lib/pry/repl.rb#237 + def calculate_overhang(current_prompt, original_val, indented_val); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#205 + def coolline_available?; end + + # Clean up after the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#84 + def epilogue; end + + # Manage switching of input objects on encountering `EOFError`s. + # + # @return [Object] Whatever the given block returns. + # @return [:no_more_input] Indicates that no more input can be read. + # + # source://pry//lib/pry/repl.rb#127 + def handle_read_errors; end + + # source://pry//lib/pry/repl.rb#195 + def input_readline(*args); end + + # If `$stdout` is not a tty, it's probably a pipe. + # + # @example + # # `piping?` returns `false` + # % pry + # [1] pry(main) + # + # # `piping?` returns `true` + # % pry | tee log + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#217 + def piping?; end + + # Set up the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#47 + def prologue; end + + # Read a line of input from the user. + # + # @return [String] The line entered by the user. + # @return [nil] On ``. + # @return [:control_c] On ``. + # @return [:no_more_input] On EOF. + # + # source://pry//lib/pry/repl.rb#93 + def read; end + + # Returns the next line of input to be sent to the {Pry} instance. + # + # @param current_prompt [String] The prompt to use for input. + # @return [String?] The next line of input, or `nil` on . + # + # source://pry//lib/pry/repl.rb#169 + def read_line(current_prompt); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#201 + def readline_available?; end + + # The actual read-eval-print loop. + # + # The {REPL} instance is responsible for reading and looping, whereas the + # {Pry} instance is responsible for evaluating user input and printing + # return values and command output. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#66 + def repl; end + + # @return [void] + # + # source://pry//lib/pry/repl.rb#224 + def set_readline_output; end + + class << self + # Instantiate a new {Pry} instance with the given options, then start a + # {REPL} instance wrapping it. + # + # @option options + # @param options [Hash] a customizable set of options + # + # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 + def start(options = T.unsafe(nil)); end + + # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 + def start_with_pry_byebug(options = T.unsafe(nil)); end + + # source://pry//lib/pry/repl.rb#14 + def start_without_pry_byebug(options); end + end +end + +# A class to manage the loading of files through the REPL loop. +# This is an interesting trick as it processes your file as if it +# was user input in an interactive session. As a result, all Pry +# commands are available, and they are executed non-interactively. Furthermore +# the session becomes interactive when the repl loop processes a +# 'make-interactive' command in the file. The session also becomes +# interactive when an exception is encountered, enabling you to fix +# the error before returning to non-interactive processing with the +# 'make-non-interactive' command. +# +# source://pry//lib/pry/repl_file_loader.rb#14 +class Pry::REPLFileLoader + # @return [REPLFileLoader] a new instance of REPLFileLoader + # + # source://pry//lib/pry/repl_file_loader.rb#15 + def initialize(file_name); end + + # Define a few extra commands useful for flipping back & forth + # between interactive/non-interactive modes + # + # source://pry//lib/pry/repl_file_loader.rb#59 + def define_additional_commands; end + + # Switch to interactive mode, i.e take input from the user + # and use the regular print and exception handlers. + # + # @param pry_instance [Pry] the Pry instance to make interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#26 + def interactive_mode(pry_instance); end + + # Actually load the file through the REPL by setting file content + # as the REPL input stream. + # + # source://pry//lib/pry/repl_file_loader.rb#75 + def load; end + + # Switch to non-interactive mode. Essentially + # this means there is no result output + # and that the session becomes interactive when an exception is encountered. + # + # @param pry_instance [Pry] the Pry instance to make non-interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#37 + def non_interactive_mode(pry_instance, content); end +end + +# As a REPL, we often want to catch any unexpected exceptions that may have +# been raised; however we don't want to go overboard and prevent the user +# from exiting Pry when they want to. +# +# source://pry//lib/pry/exceptions.rb#7 +module Pry::RescuableException + class << self + # source://pry//lib/pry/exceptions.rb#8 + def ===(exception); end + end +end + +# Wraps the return result of process_commands, indicates if the +# result IS a command and what kind of command (e.g void) +# +# source://pry//lib/pry/command_set.rb#397 +class Pry::Result + # @return [Result] a new instance of Result + # + # source://pry//lib/pry/command_set.rb#400 + def initialize(is_command, retval = T.unsafe(nil)); end + + # Is the result a command? + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#407 + def command?; end + + # Returns the value of attribute retval. + # + # source://pry//lib/pry/command_set.rb#398 + def retval; end + + # Is the result a command and if it is, is it a void command? + # (one that does not return a value) + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#414 + def void_command?; end +end + +# A ring is a thread-safe fixed-capacity array to which you can only add +# elements. Older entries are overwritten as you add new elements, so that the +# ring can never contain more than `max_size` elemens. +# +# @api public +# @example +# ring = Pry::Ring.new(3) +# ring << 1 << 2 << 3 +# ring.to_a #=> [1, 2, 3] +# ring << 4 +# ring.to_a #=> [2, 3, 4] +# +# ring[0] #=> 2 +# ring[-1] #=> 4 +# ring.clear +# ring[0] #=> nil +# @since v0.12.0 +# +# source://pry//lib/pry/ring.rb#22 +class Pry::Ring + # @api public + # @param max_size [Integer] Maximum buffer size. The buffer will start + # overwriting elements once its reaches its maximum capacity + # @return [Ring] a new instance of Ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#33 + def initialize(max_size); end + + # Push `value` to the current index. + # + # @api public + # @param value [Object] + # @return [self] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#43 + def <<(value); end + + # Read the value stored at `index`. + # + # @api public + # @param index [Integer, Range] The element (if Integer) or elements + # (if Range) associated with `index` + # @return [Object, Array, nil] element(s) at `index`, `nil` if none + # exist + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#57 + def [](index); end + + # Clear the buffer and reset count. + # + # @api public + # @return [void] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#75 + def clear; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#28 + def count; end + + # @api public + # @return [Integer] maximum buffer size + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#24 + def max_size; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#28 + def size; end + + # @api public + # @return [Array] the buffer as unwinded array + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#67 + def to_a; end + + private + + # @api public + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#84 + def transpose_buffer_tail; end +end + +# source://pry//lib/pry/slop.rb#5 +class Pry::Slop + include ::Enumerable + + # Create a new instance of Slop and optionally build options via a block. + # + # config - A Hash of configuration options. + # block - An optional block used to specify options. + # + # @return [Slop] a new instance of Slop + # + # source://pry//lib/pry/slop.rb#127 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#278 + def [](key); end + + # Add a callback. + # + # label - The Symbol identifier to attach this callback. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#398 + def add_callback(label, &block); end + + # Get or set the banner. + # + # banner - The String to set the banner. + # + # Returns the banner String. + # + # source://pry//lib/pry/slop.rb#168 + def banner(banner = T.unsafe(nil)); end + + # Set the banner. + # + # banner - The String to set the banner. + # + # source://pry//lib/pry/slop.rb#159 + def banner=(banner); end + + # Add a new command. + # + # command - The Symbol or String used to identify this command. + # options - A Hash of configuration options (see Slop::new) + # + # Returns a new instance of Slop mapped to this command. + # + # source://pry//lib/pry/slop.rb#196 + def command(command, options = T.unsafe(nil), &block); end + + # The Hash of configuration options for this Slop instance. + # + # source://pry//lib/pry/slop.rb#118 + def config; end + + # Get or set the description (used for commands). + # + # desc - The String to set the description. + # + # Returns the description String. + # + # source://pry//lib/pry/slop.rb#185 + def description(desc = T.unsafe(nil)); end + + # Set the description (used for commands). + # + # desc - The String to set the description. + # + # source://pry//lib/pry/slop.rb#176 + def description=(desc); end + + # Enumerable interface. Yields each Slop::Option. + # + # source://pry//lib/pry/slop.rb#297 + def each(&block); end + + # Fetch a Slop object associated with this command. + # + # command - The String or Symbol name of the command. + # + # Examples: + # + # opts.command :foo do + # on :v, :verbose, 'Enable verbose mode' + # end + # + # # ruby run.rb foo -v + # opts.fetch_command(:foo).verbose? #=> true + # + # source://pry//lib/pry/slop.rb#389 + def fetch_command(command); end + + # Fetch a Slop::Option object. + # + # key - The Symbol or String option key. + # + # Examples: + # + # opts.on(:foo, 'Something fooey', :argument => :optional) + # opt = opts.fetch_option(:foo) + # opt.class #=> Slop::Option + # opt.accepts_optional_argument? #=> true + # + # Returns an Option or nil if none were found. + # + # source://pry//lib/pry/slop.rb#373 + def fetch_option(key); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#278 + def get(key); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#416 + def help; end + + # Fetch a list of options which were missing from the parsed list. + # + # Examples: + # + # opts = Slop.new do + # on :n, :name= + # on :p, :password= + # end + # + # opts.parse %w[ --name Lee ] + # opts.missing #=> ['password'] + # + # Returns an Array of Strings representing missing options. + # + # source://pry//lib/pry/slop.rb#357 + def missing; end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 + def on(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 + def opt(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 + def option(*objects, &block); end + + # The Array of Slop::Option objects tied to this Slop instance. + # + # source://pry//lib/pry/slop.rb#121 + def options; end + + # Parse a list of items, executing and gathering options along the way. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items. + # + # source://pry//lib/pry/slop.rb#206 + def parse(items = T.unsafe(nil), &block); end + + # Parse a list of items, executing and gathering options along the way. + # unlike parse() this method will remove any options and option arguments + # from the original Array. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items with options removed. + # + # source://pry//lib/pry/slop.rb#219 + def parse!(items = T.unsafe(nil), &block); end + + # Check for an options presence. + # + # Examples: + # + # opts.parse %w( --foo ) + # opts.present?(:foo) #=> true + # opts.present?(:bar) #=> false + # + # Returns true if all of the keys are present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#333 + def present?(*keys); end + + # Specify code to be executed when these options are parsed. + # + # callable - An object responding to a call method. + # + # yields - The instance of Slop parsing these options + # An Array of unparsed arguments + # + # Example: + # + # Slop.parse do + # on :v, :verbose + # + # run do |opts, args| + # puts "Arguments: #{args.inspect}" if opts.verbose? + # end + # end + # + # @raise [ArgumentError] + # + # source://pry//lib/pry/slop.rb#317 + def run(callable = T.unsafe(nil), &block); end + + # Add string separators between options. + # + # text - The String text to print. + # + # source://pry//lib/pry/slop.rb#405 + def separator(text); end + + # Is strict mode enabled? + # + # Returns true if strict mode is enabled, false otherwise. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#152 + def strict?; end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#287 + def to_h(include_commands = T.unsafe(nil)); end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#287 + def to_hash(include_commands = T.unsafe(nil)); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#416 + def to_s; end + + private + + # Autocreate an option on the fly. See the :autocreate Slop config option. + # + # items - The Array of items we're parsing. + # index - The current Integer index for the item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#590 + def autocreate(items, index); end + + # Build an option from a list of objects. + # + # objects - An Array of objects used to build this option. + # + # Returns a new instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#606 + def build_option(objects, &block); end + + # Remove any leading -- characters from a string. + # + # object - The Object we want to cast to a String and clean. + # + # Returns the newly cleaned String with leading -- characters removed. + # + # source://pry//lib/pry/slop.rb#659 + def clean(object); end + + # source://pry//lib/pry/slop.rb#663 + def commands_to_help; end + + # Execute a `-abc` type option where a, b and c are all options. This + # method is only executed if the multiple_switches argument is true. + # + # option - The first Option object. + # argument - The argument to this option. (Split into multiple Options). + # index - The index of the current item being processed. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#552 + def execute_multiple_switches(option, argument, index); end + + # Execute an option, firing off callbacks and assigning arguments. + # + # option - The Slop::Option object found by #process_item. + # argument - The argument Object to assign to this option. + # index - The current Integer index of the object we're processing. + # item - The optional String item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#519 + def execute_option(option, argument, index, item = T.unsafe(nil)); end + + # Extract the long flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#644 + def extract_long_flag(objects, config); end + + # Extract an option from a flag. + # + # flag - The flag key used to extract an option. + # + # Returns an Array of [option, argument]. + # + # source://pry//lib/pry/slop.rb#567 + def extract_option(flag); end + + # Extract the short flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#626 + def extract_short_flag(objects, config); end + + # Convenience method for present?(:option). + # + # Examples: + # + # opts.parse %( --verbose ) + # opts.verbose? #=> true + # opts.other? #=> false + # + # Returns true if this option is present. If this method does not end + # with a ? character it will instead call super(). + # + # source://pry//lib/pry/slop.rb#454 + def method_missing(method, *args, &block); end + + # Process a list item, figure out if it's an option, execute any + # callbacks, assign any option arguments, and do some sanity checks. + # + # items - The Array of items to process. + # index - The current Integer index of the item we want to process. + # block - An optional block which when passed will yield non options. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#472 + def process_item(items, index, &block); end + + # Override this method so we can check if an option? method exists. + # + # Returns true if this option key exists in our list of options. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#340 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end + + class << self + # Build a Slop object from a option specification. + # + # This allows you to design your options via a simple String rather + # than programatically. Do note though that with this method, you're + # unable to pass any advanced options to the on() method when creating + # options. + # + # string - The optspec String + # config - A Hash of configuration options to pass to Slop.new + # + # Examples: + # + # opts = Slop.optspec(<<-SPEC) + # ruby foo.rb [options] + # --- + # n,name= Your name + # a,age= Your age + # A,auth Sign in with auth + # p,passcode= Your secret pass code + # SPEC + # + # opts.fetch_option(:name).description #=> "Your name" + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#97 + def optspec(string, config = T.unsafe(nil)); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Examples: + # + # Slop.parse(ARGV, :help => true) do + # on '-n', '--name', 'Your username', :argument => true + # end + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#54 + def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#63 + def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + end +end + +# source://pry//lib/pry/slop/commands.rb#5 +class Pry::Slop::Commands + include ::Enumerable + + # Create a new instance of Slop::Commands and optionally build + # Slop instances via a block. Any configuration options used in + # this method will be the default configuration options sent to + # each Slop object created. + # + # config - An optional configuration Hash. + # block - Optional block used to define commands. + # + # Examples: + # + # commands = Slop::Commands.new do + # on :new do + # on '-o', '--outdir=', 'The output directory' + # on '-v', '--verbose', 'Enable verbose mode' + # end + # + # on :generate do + # on '--assets', 'Generate assets', :default => true + # end + # + # global do + # on '-D', '--debug', 'Enable debug mode', :default => false + # end + # end + # + # commands[:new].class #=> Slop + # commands.parse + # + # @return [Commands] a new instance of Commands + # + # source://pry//lib/pry/slop/commands.rb#39 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#100 + def [](key); end + + # Returns the value of attribute arguments. + # + # source://pry//lib/pry/slop/commands.rb#8 + def arguments; end + + # Optionally set the banner for this command help output. + # + # banner - The String text to set the banner. + # + # Returns the String banner if one is set. + # + # source://pry//lib/pry/slop/commands.rb#59 + def banner(banner = T.unsafe(nil)); end + + # Sets the attribute banner + # + # @param value the value to set the attribute banner to. + # + # source://pry//lib/pry/slop/commands.rb#9 + def banner=(_arg0); end + + # Returns the value of attribute commands. + # + # source://pry//lib/pry/slop/commands.rb#8 + def commands; end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/commands.rb#8 + def config; end + + # Add a Slop instance used when no other commands exist. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to default. + # + # source://pry//lib/pry/slop/commands.rb#81 + def default(config = T.unsafe(nil), &block); end + + # Enumerable interface. + # + # source://pry//lib/pry/slop/commands.rb#119 + def each(&block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#100 + def get(key); end + + # Add a global Slop instance. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to global. + # + # source://pry//lib/pry/slop/commands.rb#91 + def global(config = T.unsafe(nil), &block); end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#158 + def help; end + + # Returns the inspection String. + # + # source://pry//lib/pry/slop/commands.rb#170 + def inspect; end + + # Add a Slop instance for a specific command. + # + # command - A String or Symbol key used to identify this command. + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to command. + # + # source://pry//lib/pry/slop/commands.rb#71 + def on(command, config = T.unsafe(nil), &block); end + + # Parse a list of items. + # + # items - The Array of items to parse. + # + # Returns the original Array of items. + # + # source://pry//lib/pry/slop/commands.rb#128 + def parse(items = T.unsafe(nil)); end + + # Parse a list of items, removing any options or option arguments found. + # + # items - The Array of items to parse. + # + # Returns the original Array of items with options removed. + # + # source://pry//lib/pry/slop/commands.rb#138 + def parse!(items = T.unsafe(nil)); end + + # Check for a command presence. + # + # Examples: + # + # cmds.parse %w( foo ) + # cmds.present?(:foo) #=> true + # cmds.present?(:bar) #=> false + # + # Returns true if the given key is present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/commands.rb#114 + def present?(key); end + + # Returns a nested Hash with Slop options and values. See Slop#to_hash. + # + # source://pry//lib/pry/slop/commands.rb#153 + def to_hash; end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#158 + def to_s; end + + private + + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#177 + def execute_arguments!(items); end + + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#183 + def execute_global_opts!(items); end +end + +# Returns a default Hash of configuration options this Slop instance uses. +# +# source://pry//lib/pry/slop.rb#30 +Pry::Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The main Error class, all Exception classes inherit from this class. +# +# source://pry//lib/pry/slop.rb#12 +class Pry::Slop::Error < ::StandardError; end + +# Raised when an argument does not match its intended match constraint. +# +# source://pry//lib/pry/slop.rb#21 +class Pry::Slop::InvalidArgumentError < ::Pry::Slop::Error; end + +# Raised when an invalid command is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#27 +class Pry::Slop::InvalidCommandError < ::Pry::Slop::Error; end + +# Raised when an invalid option is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#24 +class Pry::Slop::InvalidOptionError < ::Pry::Slop::Error; end + +# Raised when an option argument is expected but none are given. +# +# source://pry//lib/pry/slop.rb#15 +class Pry::Slop::MissingArgumentError < ::Pry::Slop::Error; end + +# Raised when an option is expected/required but not present. +# +# source://pry//lib/pry/slop.rb#18 +class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end + +# source://pry//lib/pry/slop/option.rb#5 +class Pry::Slop::Option + # Incapsulate internal option information, mainly used to store + # option specific configuration data, most of the meat of this + # class is found in the #value method. + # + # slop - The instance of Slop tied to this Option. + # short - The String or Symbol short flag. + # long - The String or Symbol long flag. + # description - The String description text. + # config - A Hash of configuration options. + # block - An optional block used as a callback. + # + # @return [Option] a new instance of Option + # + # source://pry//lib/pry/slop/option.rb#35 + def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end + + # Returns true if this option accepts an optional argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#72 + def accepts_optional_argument?; end + + # Returns the value of attribute argument_in_value. + # + # source://pry//lib/pry/slop/option.rb#23 + def argument_in_value; end + + # Sets the attribute argument_in_value + # + # @param value the value to set the attribute argument_in_value to. + # + # source://pry//lib/pry/slop/option.rb#23 + def argument_in_value=(_arg0); end + + # Call this options callback if one exists, and it responds to call(). + # + # Returns nothing. + # + # source://pry//lib/pry/slop/option.rb#84 + def call(*objects); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/option.rb#22 + def config; end + + # Returns the value of attribute count. + # + # source://pry//lib/pry/slop/option.rb#23 + def count; end + + # Sets the attribute count + # + # @param value the value to set the attribute count to. + # + # source://pry//lib/pry/slop/option.rb#23 + def count=(_arg0); end + + # Returns the value of attribute description. + # + # source://pry//lib/pry/slop/option.rb#22 + def description; end + + # Returns true if this option expects an argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#67 + def expects_argument?; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#124 + def help; end + + # Returns the String inspection text. + # + # source://pry//lib/pry/slop/option.rb#143 + def inspect; end + + # Returns the String flag of this option. Preferring the long flag. + # + # source://pry//lib/pry/slop/option.rb#77 + def key; end + + # Returns the value of attribute long. + # + # source://pry//lib/pry/slop/option.rb#22 + def long; end + + # Returns the value of attribute short. + # + # source://pry//lib/pry/slop/option.rb#22 + def short; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#124 + def to_s; end + + # Returns the value of attribute types. + # + # source://pry//lib/pry/slop/option.rb#22 + def types; end + + # Fetch the argument value for this option. + # + # Returns the Object once any type conversions have taken place. + # + # source://pry//lib/pry/slop/option.rb#108 + def value; end + + # Set the new argument value for this option. + # + # We use this setter method to handle concatenating lists. That is, + # when an array type is specified and used more than once, values from + # both options will be grouped together and flattened into a single array. + # + # source://pry//lib/pry/slop/option.rb#93 + def value=(new_value); end + + private + + # Convert an object to a Float if possible. + # + # value - The Object we want to convert to a float. + # + # Returns the Float value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#173 + def value_to_float(value); end + + # Convert an object to an Integer if possible. + # + # value - The Object we want to convert to an integer. + # + # Returns the Integer value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#156 + def value_to_integer(value); end + + # Convert an object to a Range if possible. + # + # value - The Object we want to convert to a range. + # + # Returns the Range value if one could be found, else the original object. + # + # source://pry//lib/pry/slop/option.rb#190 + def value_to_range(value); end +end + +# The default Hash of configuration options this class uses. +# +# source://pry//lib/pry/slop/option.rb#7 +Pry::Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/slop.rb#9 +Pry::Slop::VERSION = T.let(T.unsafe(nil), String) + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/syntax_highlighter.rb#8 +class Pry::SyntaxHighlighter + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#9 + def highlight(code, language = T.unsafe(nil)); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#17 + def keyword_token_color; end + + # Sets comment token to blue (black by default), so it's more legible. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#22 + def overwrite_coderay_comment_token!; end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#13 + def tokenize(code, language = T.unsafe(nil)); end + end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/system_command_handler.rb#6 +module Pry::SystemCommandHandler + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/system_command_handler.rb#8 + def default(output, command, _pry_instance); end + end +end + +# Catches SecurityErrors if $SAFE is set +# +# source://pry//lib/pry/exceptions.rb#28 +module Pry::TooSafeException + class << self + # source://pry//lib/pry/exceptions.rb#29 + def ===(exception); end + end +end + +# An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error +# in a more user-friendly manner. This should be used when the exception +# happens within Pry itself as a direct consequence of the user typing +# something wrong. +# +# This allows us to distinguish between the user typing: +# +# pry(main)> def ) +# SyntaxError: unexpected ) +# +# pry(main)> method_that_evals("def )") +# SyntaxError: (eval):1: syntax error, unexpected ')' +# from ./a.rb:2 in `eval' +# +# source://pry//lib/pry/exceptions.rb#51 +module Pry::UserError; end + +# source://pry//lib/pry/version.rb#4 +Pry::VERSION = T.let(T.unsafe(nil), String) + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/warning.rb#6 +module Pry::Warning + class << self + # Prints a warning message with exact file and line location, similar to how + # Ruby's -W prints warnings. + # + # @api private + # @param message [String] + # @return [void] + # @since v0.13.0 + # + # source://pry//lib/pry/warning.rb#12 + def warn(message); end + end +end + +# source://pry//lib/pry/wrapped_module.rb#16 +class Pry::WrappedModule + include ::Pry::Helpers::BaseHelpers + include ::Pry::CodeObject::Helpers + + # @param mod [Module] + # @raise [ArgumentError] if the argument is not a `Module` + # @return [WrappedModule] a new instance of WrappedModule + # + # source://pry//lib/pry/wrapped_module.rb#56 + def initialize(mod); end + + # Return a candidate for this module of specified rank. A `rank` + # of 0 is equivalent to the 'primary candidate', which is the + # module definition with the highest number of methods. A `rank` + # of 1 is the module definition with the second highest number of + # methods, and so on. Module candidates are necessary as modules + # can be reopened multiple times and in multiple places in Ruby, + # the candidate API gives you access to the module definition + # representing each of those reopenings. + # + # @param rank [Fixnum] + # @raise [Pry::CommandError] If the `rank` is out of range. That + # is greater than `number_of_candidates - 1`. + # @return [Pry::WrappedModule::Candidate] + # + # source://pry//lib/pry/wrapped_module.rb#239 + def candidate(rank); end + + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#250 + def candidates; end + + # Is this strictly a class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#126 + def class?; end + + # Returns an array of the names of the constants accessible in the wrapped + # module. This avoids the problem of accidentally calling the singleton + # method `Module.constants`. + # + # @param inherit [Boolean] Include the names of constants from included + # modules? + # + # source://pry//lib/pry/wrapped_module.rb#76 + def constants(inherit = T.unsafe(nil)); end + + # Returns documentation for the module. + # This documentation is for the primary candidate, if + # you would like documentation for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the module. + # + # source://pry//lib/pry/wrapped_module.rb#195 + def doc; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#176 + def file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#183 + def line; end + + # Forward method invocations to the wrapped module + # + # source://pry//lib/pry/wrapped_module.rb#150 + def method_missing(method_name, *args, &block); end + + # The prefix that would appear before methods defined on this class. + # + # i.e. the "String." or "String#" in String.new and String#initialize. + # + # @return String + # + # source://pry//lib/pry/wrapped_module.rb#85 + def method_prefix; end + + # Is this strictly a module? (does not match classes) + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#120 + def module?; end + + # The name of the Module if it has one, otherwise #. + # + # @return [String] + # + # source://pry//lib/pry/wrapped_module.rb#100 + def nonblank_name; end + + # @return [Fixnum] The number of candidate definitions for the + # current module. + # + # source://pry//lib/pry/wrapped_module.rb#245 + def number_of_candidates; end + + # Is this a singleton class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#110 + def singleton_class?; end + + # Get the instance associated with this singleton class. + # + # @raise ArgumentError: tried to get instance of non singleton class + # @return [Object] + # + # source://pry//lib/pry/wrapped_module.rb#135 + def singleton_instance; end + + # Returns the source for the module. + # This source is for the primary candidate, if + # you would like source for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If source cannot be found. + # @return [String] The source for the module. + # + # source://pry//lib/pry/wrapped_module.rb#206 + def source; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#176 + def source_file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#183 + def source_line; end + + # Retrieve the source location of a module. Return value is in same + # format as Method#source_location. If the source location + # cannot be found this method returns `nil`. + # + # @return [Array, nil] The source location of the + # module (or class), or `nil` if no source location found. + # + # source://pry//lib/pry/wrapped_module.rb#168 + def source_location; end + + # @param times [Fixnum] How far to travel up the ancestor chain. + # @return [Pry::WrappedModule, nil] The wrapped module that is the + # superclass. + # When `self` is a `Module` then return the + # nth ancestor, otherwise (in the case of classes) return the + # nth ancestor that is a class. + # + # source://pry//lib/pry/wrapped_module.rb#270 + def super(times = T.unsafe(nil)); end + + # Returns the value of attribute wrapped. + # + # source://pry//lib/pry/wrapped_module.rb#20 + def wrapped; end + + # @return [String] Return the YARD docs for this module. + # + # source://pry//lib/pry/wrapped_module.rb#223 + def yard_doc; end + + # @return [Boolean] Whether YARD docs are available for this module. + # + # source://pry//lib/pry/wrapped_module.rb#260 + def yard_docs?; end + + # @return [String] Return the associated file for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#212 + def yard_file; end + + # @return [Fixnum] Return the associated line for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#218 + def yard_line; end + + private + + # Return all methods (instance methods and class methods) for a + # given module. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#347 + def all_methods_for(mod); end + + # We only want methods that have a non-nil `source_location`. We also + # skip some spooky internal methods. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#329 + def all_relevant_methods_for(mod); end + + # A helper method. + # + # source://pry//lib/pry/wrapped_module.rb#310 + def all_source_locations_by_popularity; end + + # memoized lines for file + # + # source://pry//lib/pry/wrapped_module.rb#371 + def lines_for_file(file); end + + # @return [Array>] The array of `Pry::Method` objects, + # there are two associated with each candidate. The first is the 'base + # method' for a candidate and it serves as the start point for + # the search in uncovering the module definition. The second is + # the last method defined for that candidate and it is used to + # speed up source code extraction. + # + # source://pry//lib/pry/wrapped_module.rb#302 + def method_candidates; end + + # Detect methods that are defined with `def_delegator` from the Forwardable + # module. We want to reject these methods as they screw up module + # extraction since the `source_location` for such methods points at forwardable.rb + # TODO: make this more robust as valid user-defined files called + # forwardable.rb are also skipped. + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#366 + def method_defined_by_forwardable_module?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#351 + def nested_module?(parent, name); end + + # @return [Pry::WrappedModule::Candidate] The candidate with the + # highest rank, that is the 'monkey patch' of this module with the + # highest number of methods, which contains a source code line that + # defines the module. It is considered the 'canonical' definition + # for the module. In the absense of a suitable candidate, the + # candidate of rank 0 will be returned, or a CommandError raised if + # there are no candidates at all. + # + # source://pry//lib/pry/wrapped_module.rb#292 + def primary_candidate; end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#158 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Convert a string to a module. + # + # @example + # Pry::WrappedModule.from_str("Pry::Code") + # @param mod_name [String] + # @param target [Binding] The binding where the lookup takes place. + # @return [Module, nil] The module or `nil` (if conversion failed). + # + # source://pry//lib/pry/wrapped_module.rb#29 + def from_str(mod_name, target = T.unsafe(nil)); end + + private + + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::CodeObject + # + # @param str [String] The string to lookup. + # @param target [Binding] Where the lookup takes place. + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#45 + def safe_to_evaluate?(str, target); end + end +end + +# This class represents a single candidate for a module/class definition. +# It provides access to the source, documentation, line and file +# for a monkeypatch (reopening) of a class/module. +# +# source://pry//lib/pry/wrapped_module/candidate.rb#8 +class Pry::WrappedModule::Candidate + include ::Pry::Helpers::DocumentationHelpers + include ::Pry::CodeObject::Helpers + extend ::Forwardable + extend ::Pry::Forwardable + + # @param wrapper [Pry::WrappedModule] The associated + # `Pry::WrappedModule` instance that owns the candidates. + # @param rank [Fixnum] The rank of the candidate to + # retrieve. Passing 0 returns 'primary candidate' (the candidate with largest + # number of methods), passing 1 retrieves candidate with + # second largest number of methods, and so on, up to + # `Pry::WrappedModule#number_of_candidates() - 1` + # @raise [Pry::CommandError] If `rank` is out of bounds. + # @return [Candidate] a new instance of Candidate + # + # source://pry//lib/pry/wrapped_module/candidate.rb#38 + def initialize(wrapper, rank); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def class?(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#70 + def doc; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#14 + def file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#18 + def line; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def module?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def nonblank_name(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def number_of_candidates(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If source code cannot be found. + # @return [String] The source for the candidate, i.e the + # complete module/class definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#59 + def source; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#14 + def source_file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#18 + def source_line; end + + # @return [Array, nil] A `[String, Fixnum]` pair representing the + # source location (file and line) for the candidate or `nil` + # if no source location found. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#79 + def source_location; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def wrapped(*args, **_arg1, &block); end + + private + + # Locate the first line of the module definition. + # + # @param file [String] The file that contains the module + # definition (somewhere). + # @param line [Fixnum] The module definition should appear + # before this line (if it exists). + # @return [Fixnum] The line where the module is defined. This + # line number is one-indexed. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#99 + def first_line_of_module_definition(file, line); end + + # This method is used by `Candidate#source_location` as a + # starting point for the search for the candidate's definition. + # + # @return [Array] The source location of the base method used to + # calculate the source location of the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#116 + def first_method_source_location; end + + # @return [Array] The source location of the last method in this + # candidate's module definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#122 + def last_method_source_location; end + + # source://pry//lib/pry/forwardable.rb#18 + def lines_for_file(*a, &b); end + + # source://pry//lib/pry/forwardable.rb#18 + def method_candidates(*a, &b); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module/candidate.rb#104 + def module_definition_first_line?(line); end + + # source://pry//lib/pry/forwardable.rb#18 + def name(*a, &b); end + + # Return the number of lines between the start of the class definition and + # the start of the last method. We use this value so we can quickly grab + # these lines from the file (without having to check each intervening line + # for validity, which is expensive) speeding up source extraction. + # + # @return [Integer] number of lines. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#132 + def number_of_lines_in_first_chunk; end + + # source://pry//lib/pry/forwardable.rb#18 + def yard_docs?(*a, &b); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/psych@5.1.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/psych@5.1.2.rbi new file mode 100644 index 0000000..e8de68e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/psych@5.1.2.rbi @@ -0,0 +1,1752 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + + +# source://psych//lib/psych/core_ext.rb#2 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # source://psych//lib/psych/core_ext.rb#12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/core_ext.rb#3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +# +# source://psych//lib/psych/versions.rb#3 +module Psych + extend ::Bootsnap::CompileCache::YAML::Psych4::Patch + + class << self + # source://psych//lib/psych.rb#682 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # source://psych//lib/psych.rb#676 + def add_domain_type(domain, type_tag, &block); end + + # source://psych//lib/psych.rb#692 + def add_tag(tag, klass); end + + # source://psych//lib/psych.rb#708 + def config; end + + # source://psych//lib/psych.rb#720 + def domain_types; end + + # source://psych//lib/psych.rb#732 + def domain_types=(value); end + + # call-seq: + # Psych.dump(o) -> string of yaml + # Psych.dump(o, options) -> string of yaml + # Psych.dump(o, io) -> io object passed in + # Psych.dump(o, io, options) -> io object passed in + # + # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#505 + def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dump a list of objects as separate documents to a document stream. + # + # Example: + # + # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" + # + # source://psych//lib/psych.rb#595 + def dump_stream(*objects); end + + # source://psych//lib/psych.rb#716 + def dump_tags; end + + # source://psych//lib/psych.rb#728 + def dump_tags=(value); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.load("--- a") # => 'a' + # Psych.load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass. This method is + # similar to `safe_load` except that `Symbol` objects are allowed by default. + # + # source://psych//lib/psych.rb#368 + def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. If a block is given, each document will be converted to Ruby + # and passed to the block during parsing + # + # Example: + # + # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # source://psych//lib/psych.rb#626 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # source://psych//lib/psych.rb#712 + def load_tags; end + + # source://psych//lib/psych.rb#724 + def load_tags=(value); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse("---\n - a\n - b") # => # + # + # begin + # Psych.parse("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#398 + def parse(yaml, filename: T.unsafe(nil)); end + + # Parse a file at +filename+. Returns the Psych::Nodes::Document. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # source://psych//lib/psych.rb#410 + def parse_file(filename, fallback: T.unsafe(nil)); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. + # This method can handle multiple YAML documents contained in +yaml+. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # If a block is given, a Psych::Nodes::Document node will be yielded to the + # block as it's being parsed. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse_stream("---\n - a\n - b") # => # + # + # Psych.parse_stream("--- a\n--- b") do |node| + # node # => # + # end + # + # begin + # Psych.parse_stream("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # Raises a TypeError when NilClass is passed. + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#452 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # source://psych//lib/psych.rb#419 + def parser; end + + # source://psych//lib/psych.rb#688 + def remove_type(type_tag); end + + # call-seq: + # Psych.safe_dump(o) -> string of yaml + # Psych.safe_dump(o, options) -> string of yaml + # Psych.safe_dump(o, io) -> io object passed in + # Psych.safe_dump(o, io, options) -> io object passed in + # + # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. By default, only the following + # classes are allowed to be serialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ + # keyword argument. They are additive. For example, to allow Date serialization: + # + # Psych.safe_dump(yaml, permitted_classes: [Date]) + # + # Now the Date class can be dumped in addition to the classes listed above. + # + # A Psych::DisallowedClass exception will be raised if the object contains a + # class that isn't in the +permitted_classes+ list. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.safe_dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#578 + def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Safely load the yaml string in +yaml+. By default, only the following + # classes are allowed to be deserialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Recursive data structures are not allowed by default. Arbitrary classes + # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are + # additive. For example, to allow Date deserialization: + # + # Psych.safe_load(yaml, permitted_classes: [Date]) + # + # Now the Date class can be loaded in addition to the classes listed above. + # + # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. + # For example: + # + # x = [] + # x << x + # yaml = Psych.dump x + # Psych.safe_load yaml # => raises an exception + # Psych.safe_load yaml, aliases: true # => loads the aliases + # + # A Psych::DisallowedClass exception will be raised if the yaml contains a + # class that isn't in the +permitted_classes+ list. + # + # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases + # but the +aliases+ keyword argument is set to false. + # + # +filename+ will be used in the exception message if any exception is raised + # while parsing. + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # source://psych//lib/psych.rb#322 + def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Safely loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See safe_load for options. + # + # source://psych//lib/psych.rb#658 + def safe_load_file(filename, **kwargs); end + + # Dump Ruby +object+ to a JSON string. + # + # source://psych//lib/psych.rb#605 + def to_json(object); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.unsafe_load("--- a") # => 'a' + # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.unsafe_load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # load method or the safe_load method. + # + # source://psych//lib/psych.rb#271 + def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#10 +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled + # + # source://psych//lib/psych/exception.rb#11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#17 +class Psych::AnchorNotDefined < ::Psych::BadAlias + # @return [AnchorNotDefined] a new instance of AnchorNotDefined + # + # source://psych//lib/psych/exception.rb#18 + def initialize(anchor_name); end +end + +# source://psych//lib/psych/class_loader.rb#6 +class Psych::ClassLoader + # @return [ClassLoader] a new instance of ClassLoader + # + # source://psych//lib/psych/class_loader.rb#21 + def initialize; end + + # source://psych//lib/psych/class_loader.rb#39 + def big_decimal; end + + # source://psych//lib/psych/class_loader.rb#39 + def complex; end + + # source://psych//lib/psych/class_loader.rb#39 + def date; end + + # source://psych//lib/psych/class_loader.rb#39 + def date_time; end + + # source://psych//lib/psych/class_loader.rb#39 + def exception; end + + # source://psych//lib/psych/class_loader.rb#25 + def load(klassname); end + + # source://psych//lib/psych/class_loader.rb#39 + def object; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_omap; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_set; end + + # source://psych//lib/psych/class_loader.rb#39 + def range; end + + # source://psych//lib/psych/class_loader.rb#39 + def rational; end + + # source://psych//lib/psych/class_loader.rb#39 + def regexp; end + + # source://psych//lib/psych/class_loader.rb#39 + def struct; end + + # source://psych//lib/psych/class_loader.rb#39 + def symbol; end + + # source://psych//lib/psych/class_loader.rb#31 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#47 + def find(klassname); end + + # source://psych//lib/psych/class_loader.rb#51 + def resolve(klassname); end +end + +# source://psych//lib/psych/class_loader.rb#76 +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # @return [Restricted] a new instance of Restricted + # + # source://psych//lib/psych/class_loader.rb#77 + def initialize(classes, symbols); end + + # source://psych//lib/psych/class_loader.rb#83 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#95 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +# +# source://psych//lib/psych/coder.rb#9 +class Psych::Coder + # @return [Coder] a new instance of Coder + # + # source://psych//lib/psych/coder.rb#13 + def initialize(tag); end + + # source://psych//lib/psych/coder.rb#84 + def [](k); end + + # source://psych//lib/psych/coder.rb#78 + def []=(k, v); end + + # source://psych//lib/psych/coder.rb#78 + def add(k, v); end + + # Returns the value of attribute implicit. + # + # source://psych//lib/psych/coder.rb#10 + def implicit; end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://psych//lib/psych/coder.rb#10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # @yield [_self] + # @yieldparam _self [Psych::Coder] the object that the method was called on + # + # source://psych//lib/psych/coder.rb#34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # source://psych//lib/psych/coder.rb#73 + def map=(map); end + + # Returns the value of attribute object. + # + # source://psych//lib/psych/coder.rb#10 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://psych//lib/psych/coder.rb#10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # source://psych//lib/psych/coder.rb#54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # source://psych//lib/psych/coder.rb#60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # source://psych//lib/psych/coder.rb#42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # source://psych//lib/psych/coder.rb#48 + def represent_seq(tag, list); end + + # source://psych//lib/psych/coder.rb#24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # source://psych//lib/psych/coder.rb#67 + def scalar=(value); end + + # Returns the value of attribute seq. + # + # source://psych//lib/psych/coder.rb#11 + def seq; end + + # Emit a sequence of +list+ + # + # source://psych//lib/psych/coder.rb#90 + def seq=(list); end + + # Returns the value of attribute style. + # + # source://psych//lib/psych/coder.rb#10 + def style; end + + # Sets the attribute style + # + # @param value the value to set the attribute style to. + # + # source://psych//lib/psych/coder.rb#10 + def style=(_arg0); end + + # Returns the value of attribute tag. + # + # source://psych//lib/psych/coder.rb#10 + def tag; end + + # Sets the attribute tag + # + # @param value the value to set the attribute tag to. + # + # source://psych//lib/psych/coder.rb#10 + def tag=(_arg0); end + + # Returns the value of attribute type. + # + # source://psych//lib/psych/coder.rb#11 + def type; end +end + +# source://psych//lib/psych/exception.rb#23 +class Psych::DisallowedClass < ::Psych::Exception + # @return [DisallowedClass] a new instance of DisallowedClass + # + # source://psych//lib/psych/exception.rb#24 + def initialize(action, klass_name); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +# +# source://psych//lib/psych/handler.rb#13 +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # source://psych//lib/psych/handler.rb#110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # source://psych//lib/psych/handler.rb#236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # source://psych//lib/psych/handler.rb#93 + def end_document(implicit); end + + # Called when a map ends + # + # source://psych//lib/psych/handler.rb#230 + def end_mapping; end + + # Called when a sequence ends. + # + # source://psych//lib/psych/handler.rb#191 + def end_sequence; end + + # Called when the YAML stream ends + # + # source://psych//lib/psych/handler.rb#241 + def end_stream; end + + # Called before each event with line/column information. + # + # source://psych//lib/psych/handler.rb#246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # source://psych//lib/psych/handler.rb#150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # source://psych//lib/psych/handler.rb#72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # source://psych//lib/psych/handler.rb#47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # @return [Boolean] + # + # source://psych//lib/psych/handler.rb#251 + def streaming?; end +end + +# Configuration options for dumping YAML. +# +# source://psych//lib/psych/handler.rb#16 +class Psych::Handler::DumperOptions + # @return [DumperOptions] a new instance of DumperOptions + # + # source://psych//lib/psych/handler.rb#19 + def initialize; end + + # Returns the value of attribute canonical. + # + # source://psych//lib/psych/handler.rb#17 + def canonical; end + + # Sets the attribute canonical + # + # @param value the value to set the attribute canonical to. + # + # source://psych//lib/psych/handler.rb#17 + def canonical=(_arg0); end + + # Returns the value of attribute indentation. + # + # source://psych//lib/psych/handler.rb#17 + def indentation; end + + # Sets the attribute indentation + # + # @param value the value to set the attribute indentation to. + # + # source://psych//lib/psych/handler.rb#17 + def indentation=(_arg0); end + + # Returns the value of attribute line_width. + # + # source://psych//lib/psych/handler.rb#17 + def line_width; end + + # Sets the attribute line_width + # + # @param value the value to set the attribute line_width to. + # + # source://psych//lib/psych/handler.rb#17 + def line_width=(_arg0); end +end + +# source://psych//lib/psych/json/stream.rb#7 +class Psych::JSON::Stream < ::Psych::Visitors::JSONTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# YAML event parser class. This class parses a YAML document and calls +# events on the handler that is passed to the constructor. The events can +# be used for things such as constructing a YAML AST or deserializing YAML +# documents. It can even be fed back to Psych::Emitter to emit the same +# document that was parsed. +# +# See Psych::Handler for documentation on the events that Psych::Parser emits. +# +# Here is an example that prints out ever scalar found in a YAML document: +# +# # Handler for detecting scalar values +# class ScalarHandler < Psych::Handler +# def scalar value, anchor, tag, plain, quoted, style +# puts value +# end +# end +# +# parser = Psych::Parser.new(ScalarHandler.new) +# parser.parse(yaml_document) +# +# Here is an example that feeds the parser back in to Psych::Emitter. The +# YAML document is read from STDIN and written back out to STDERR: +# +# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) +# parser.parse($stdin) +# +# Psych uses Psych::Parser in combination with Psych::TreeBuilder to +# construct an AST of the parsed YAML document. +# +# source://psych//lib/psych/parser.rb#33 +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # @return [Parser] a new instance of Parser + # + # source://psych//lib/psych/parser.rb#47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # source://psych//lib/psych/parser.rb#41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler; end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler=(_arg0); end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # source://psych//lib/psych/parser.rb#61 + def parse(yaml, path = T.unsafe(nil)); end +end + +# Scan scalars for built in types +# +# source://psych//lib/psych/scalar_scanner.rb#6 +class Psych::ScalarScanner + # Create a new scanner + # + # @return [ScalarScanner] a new instance of ScalarScanner + # + # source://psych//lib/psych/scalar_scanner.rb#30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/scalar_scanner.rb#27 + def class_loader; end + + # Parse and return an int from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#109 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#115 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # source://psych//lib/psych/scalar_scanner.rb#37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# source://psych//lib/psych/scalar_scanner.rb#22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html +# +# source://psych//lib/psych/scalar_scanner.rb#15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +# +# source://psych//lib/psych/stream.rb#24 +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# source://psych//lib/psych/stream.rb#25 +class Psych::Stream::Emitter < ::Psych::Emitter + # source://psych//lib/psych/stream.rb#26 + def end_document(implicit_end = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://psych//lib/psych/stream.rb#30 + def streaming?; end +end + +# source://psych//lib/psych/streaming.rb#3 +module Psych::Streaming + # Start streaming using +encoding+ + # + # source://psych//lib/psych/streaming.rb#18 + def start(encoding = T.unsafe(nil)); end + + private + + # source://psych//lib/psych/streaming.rb#25 + def register(target, obj); end +end + +# source://psych//lib/psych/streaming.rb#4 +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # source://psych//lib/psych/streaming.rb#8 + def new(io); end +end + +# source://psych//lib/psych/syntax_error.rb#5 +class Psych::SyntaxError < ::Psych::Exception + # @return [SyntaxError] a new instance of SyntaxError + # + # source://psych//lib/psych/syntax_error.rb#8 + def initialize(file, line, col, offset, problem, context); end + + # Returns the value of attribute column. + # + # source://psych//lib/psych/syntax_error.rb#6 + def column; end + + # Returns the value of attribute context. + # + # source://psych//lib/psych/syntax_error.rb#6 + def context; end + + # Returns the value of attribute file. + # + # source://psych//lib/psych/syntax_error.rb#6 + def file; end + + # Returns the value of attribute line. + # + # source://psych//lib/psych/syntax_error.rb#6 + def line; end + + # Returns the value of attribute offset. + # + # source://psych//lib/psych/syntax_error.rb#6 + def offset; end + + # Returns the value of attribute problem. + # + # source://psych//lib/psych/syntax_error.rb#6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +# +# source://psych//lib/psych/tree_builder.rb#17 +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://psych//lib/psych/tree_builder.rb#22 + def initialize; end + + # source://psych//lib/psych/tree_builder.rb#103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#77 + def end_document(implicit_end = T.unsafe(nil)); end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_mapping; end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_sequence; end + + # source://psych//lib/psych/tree_builder.rb#90 + def end_stream; end + + # source://psych//lib/psych/tree_builder.rb#33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # source://psych//lib/psych/tree_builder.rb#19 + def root; end + + # source://psych//lib/psych/tree_builder.rb#96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#65 + def start_document(version, tag_directives, implicit); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_mapping(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_sequence(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#84 + def start_stream(encoding); end + + private + + # source://psych//lib/psych/tree_builder.rb#116 + def pop; end + + # source://psych//lib/psych/tree_builder.rb#111 + def push(value); end + + # source://psych//lib/psych/tree_builder.rb#132 + def set_end_location(node); end + + # source://psych//lib/psych/tree_builder.rb#122 + def set_location(node); end + + # source://psych//lib/psych/tree_builder.rb#127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# source://psych//lib/psych/versions.rb#5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +# source://psych//lib/psych/visitors/depth_first.rb#4 +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # @return [DepthFirst] a new instance of DepthFirst + # + # source://psych//lib/psych/visitors/depth_first.rb#5 + def initialize(block); end + + private + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def nary(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def terminal(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Stream(o); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#540 +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree + # + # source://psych//lib/psych/visitors/yaml_tree.rb#552 + def initialize(emitter, ss, options); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#565 + def accept(target); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#577 + def visit_Symbol(sym); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#541 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +# +# source://psych//lib/psych/visitors/to_ruby.rb#14 +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # @return [ToRuby] a new instance of ToRuby + # + # source://psych//lib/psych/visitors/to_ruby.rb#23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # source://psych//lib/psych/visitors/to_ruby.rb#34 + def accept(target); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/visitors/to_ruby.rb#21 + def class_loader; end + + # source://psych//lib/psych/visitors/to_ruby.rb#327 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#319 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#165 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#129 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#133 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#323 + def visit_Psych_Nodes_Stream(o); end + + private + + # source://psych//lib/psych/visitors/to_ruby.rb#395 + def deduplicate(key); end + + # source://psych//lib/psych/visitors/to_ruby.rb#51 + def deserialize(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#412 + def init_with(o, h, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#404 + def merge_key(hash, key, val); end + + # source://psych//lib/psych/visitors/to_ruby.rb#333 + def register(node, object); end + + # source://psych//lib/psych/visitors/to_ruby.rb#338 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # source://psych//lib/psych/visitors/to_ruby.rb#425 + def resolve_class(klassname); end + + # source://psych//lib/psych/visitors/to_ruby.rb#407 + def revive(klass, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#344 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/visitors/to_ruby.rb#15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# source://psych//lib/psych/visitors/visitor.rb#4 +class Psych::Visitors::Visitor + # source://psych//lib/psych/visitors/visitor.rb#5 + def accept(target); end + + private + + # source://psych//lib/psych/visitors/visitor.rb#19 + def dispatch; end + + # source://psych//lib/psych/visitors/visitor.rb#29 + def visit(target); end + + class << self + # @api private + # + # source://psych//lib/psych/visitors/visitor.rb#12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => #] + # + # source://puma//lib/puma/cluster.rb#30 + def workers; end + + # source://puma//lib/puma/cluster.rb#122 + def workers_to_cull(diff); end + + private + + # source://puma//lib/puma/cluster.rb#604 + def idle_timed_out_worker_pids; end + + # source://puma//lib/puma/cluster.rb#532 + def single_worker_warning; end + + # @version 5.0.0 + # + # source://puma//lib/puma/cluster.rb#590 + def timeout_workers; end + + # loops thru @workers, removing workers that exited, and calling + # `#term` if needed + # + # source://puma//lib/puma/cluster.rb#543 + def wait_workers; end +end + +# This class is instantiated by the `Puma::Cluster` and represents a single +# worker process. +# +# At the core of this class is running an instance of `Puma::Server` which +# gets created via the `start_server` method from the `Puma::Runner` class +# that this inherits from. +# +# source://puma//lib/puma/cluster/worker.rb#14 +class Puma::Cluster::Worker < ::Puma::Runner + # @return [Worker] a new instance of Worker + # + # source://puma//lib/puma/cluster/worker.rb#17 + def initialize(index:, master:, launcher:, pipes:, server: T.unsafe(nil)); end + + # source://puma//lib/puma/cluster/worker.rb#15 + def index; end + + # source://puma//lib/puma/cluster/worker.rb#15 + def master; end + + # source://puma//lib/puma/cluster/worker.rb#30 + def run; end + + private + + # source://puma//lib/puma/cluster/worker.rb#156 + def spawn_worker(idx); end +end + +# This class represents a worker process from the perspective of the puma +# master process. It contains information about the process and its health +# and it exposes methods to control the process via IPC. It does not +# include the actual logic executed by the worker process itself. For that, +# see Puma::Cluster::Worker. +# +# source://puma//lib/puma/cluster/worker_handle.rb#13 +class Puma::Cluster::WorkerHandle + # @return [WorkerHandle] a new instance of WorkerHandle + # + # source://puma//lib/puma/cluster/worker_handle.rb#14 + def initialize(idx, pid, phase, options); end + + # source://puma//lib/puma/cluster/worker_handle.rb#41 + def boot!; end + + # @return [Boolean] + # + # source://puma//lib/puma/cluster/worker_handle.rb#33 + def booted?; end + + # source://puma//lib/puma/cluster/worker_handle.rb#91 + def hup; end + + # Returns the value of attribute index. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def index; end + + # source://puma//lib/puma/cluster/worker_handle.rb#86 + def kill; end + + # Returns the value of attribute last_checkin. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def last_checkin; end + + # Returns the value of attribute last_status. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def last_status; end + + # Returns the value of attribute phase. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def phase; end + + # @version 5.0.0 + # + # source://puma//lib/puma/cluster/worker_handle.rb#31 + def phase=(_arg0); end + + # Returns the value of attribute pid. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def pid; end + + # @version 5.0.0 + # + # source://puma//lib/puma/cluster/worker_handle.rb#31 + def pid=(_arg0); end + + # source://puma//lib/puma/cluster/worker_handle.rb#54 + def ping!(status); end + + # @see Puma::Cluster#check_workers + # @version 5.0.0 + # + # source://puma//lib/puma/cluster/worker_handle.rb#65 + def ping_timeout; end + + # Returns the value of attribute signal. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def signal; end + + # Returns the value of attribute started_at. + # + # source://puma//lib/puma/cluster/worker_handle.rb#28 + def started_at; end + + # source://puma//lib/puma/cluster/worker_handle.rb#73 + def term; end + + # source://puma//lib/puma/cluster/worker_handle.rb#46 + def term!; end + + # @return [Boolean] + # + # source://puma//lib/puma/cluster/worker_handle.rb#50 + def term?; end + + # source://puma//lib/puma/cluster/worker_handle.rb#37 + def uptime; end +end + +# The main configuration class of Puma. +# +# It can be initialized with a set of "user" options and "default" options. +# Defaults will be merged with `Configuration.puma_default_options`. +# +# This class works together with 2 main other classes the `UserFileDefaultOptions` +# which stores configuration options in order so the precedence is that user +# set configuration wins over "file" based configuration wins over "default" +# configuration. These configurations are set via the `DSL` class. This +# class powers the Puma config file syntax and does double duty as a configuration +# DSL used by the `Puma::CLI` and Puma rack handler. +# +# It also handles loading plugins. +# +# [Note:] +# `:port` and `:host` are not valid keys. By the time they make it to the +# configuration options they are expected to be incorporated into a `:binds` key. +# Under the hood the DSL maps `port` and `host` calls to `:binds` +# +# config = Configuration.new({}) do |user_config, file_config, default_config| +# user_config.port 3003 +# end +# config.load +# puts config.options[:port] +# # => 3003 +# +# It is expected that `load` is called on the configuration instance after setting +# config. This method expands any values in `config_file` and puts them into the +# correct configuration option hash. +# +# Once all configuration is complete it is expected that `clamp` will be called +# on the instance. This will expand any procs stored under "default" values. This +# is done because an environment variable may have been modified while loading +# configuration files. +# +# source://puma//lib/puma/configuration.rb#128 +class Puma::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://puma//lib/puma/configuration.rb#176 + def initialize(user_options = T.unsafe(nil), default_options = T.unsafe(nil), &block); end + + # Load the specified rackup file, pull options from + # the rackup file, and set @app. + # + # source://puma//lib/puma/configuration.rb#289 + def app; end + + # Indicate if there is a properly configured app + # + # @return [Boolean] + # + # source://puma//lib/puma/configuration.rb#278 + def app_configured?; end + + # Call once all configuration (included from rackup files) + # is loaded to flesh out any defaults + # + # source://puma//lib/puma/configuration.rb#259 + def clamp; end + + # source://puma//lib/puma/configuration.rb#244 + def config_files; end + + # source://puma//lib/puma/configuration.rb#196 + def configure; end + + # Return which environment we're running in + # + # source://puma//lib/puma/configuration.rb#302 + def environment; end + + # source://puma//lib/puma/configuration.rb#329 + def final_options; end + + # source://puma//lib/puma/configuration.rb#210 + def flatten; end + + # source://puma//lib/puma/configuration.rb#214 + def flatten!; end + + # source://puma//lib/puma/configuration.rb#238 + def load; end + + # source://puma//lib/puma/configuration.rb#306 + def load_plugin(name); end + + # Returns the value of attribute options. + # + # source://puma//lib/puma/configuration.rb#194 + def options; end + + # Returns the value of attribute plugins. + # + # source://puma//lib/puma/configuration.rb#194 + def plugins; end + + # source://puma//lib/puma/configuration.rb#219 + def puma_default_options; end + + # source://puma//lib/puma/configuration.rb#225 + def puma_options_from_env; end + + # source://puma//lib/puma/configuration.rb#282 + def rackup; end + + # @param key [:Symbol] hook to run + # @param arg [Launcher, Int] `:on_restart` passes Launcher + # + # source://puma//lib/puma/configuration.rb#313 + def run_hooks(key, arg, log_writer, hook_data = T.unsafe(nil)); end + + private + + # source://puma//lib/puma/configuration.rb#204 + def initialize_copy(other); end + + # source://puma//lib/puma/configuration.rb#365 + def load_rackup; end + + # Load and use the normal Rack builder if we can, otherwise + # fallback to our minimal version. + # + # source://puma//lib/puma/configuration.rb#344 + def rack_builder; end + + class << self + # source://puma//lib/puma/configuration.rb#383 + def random_token; end + + # source://puma//lib/puma/configuration.rb#333 + def temp_path; end + end +end + +# Injects the Configuration object into the env +# +# source://puma//lib/puma/configuration.rb#264 +class Puma::Configuration::ConfigMiddleware + # @return [ConfigMiddleware] a new instance of ConfigMiddleware + # + # source://puma//lib/puma/configuration.rb#265 + def initialize(config, app); end + + # source://puma//lib/puma/configuration.rb#270 + def call(env); end +end + +# source://puma//lib/puma/configuration.rb#129 +Puma::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://puma//lib/puma/client.rb#24 +class Puma::ConnectionError < ::RuntimeError; end + +# Frequently used constants when constructing requests or responses. Many times +# the constant just refers to a string with the same contents. Using these constants +# gave about a 3% to 10% performance improvement over using the strings directly. +# +# The constants are frozen because Hash#[]= when called with a String key dups +# the String UNLESS the String is frozen. This saves us therefore 2 object +# allocations when creating the env hash later. +# +# While Puma does try to emulate the CGI/1.2 protocol, it does not use the REMOTE_IDENT, +# REMOTE_USER, or REMOTE_HOST parameters since those are either a security problem or +# too taxing on performance. +# +# source://puma//lib/puma/const.rb#101 +module Puma::Const; end + +# Banned keys of response header +# +# source://puma//lib/puma/const.rb#293 +Puma::Const::BANNED_HEADER_KEY = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/const.rb#224 +Puma::Const::CGI_VER = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#265 +Puma::Const::CHUNKED = T.let(T.unsafe(nil), String) + +# The basic max request size we'll try to read. +# +# source://puma//lib/puma/const.rb#140 +Puma::Const::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/const.rb#251 +Puma::Const::CLOSE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#263 +Puma::Const::CLOSE_CHUNKED = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#104 +Puma::Const::CODE_NAME = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#267 +Puma::Const::COLON = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#259 +Puma::Const::CONNECTION_CLOSE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#260 +Puma::Const::CONNECTION_KEEP_ALIVE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#118 +Puma::Const::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#254 +Puma::Const::CONTENT_LENGTH2 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#255 +Puma::Const::CONTENT_LENGTH_S = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#245 +Puma::Const::CONTINUE = T.let(T.unsafe(nil), String) + +# Illegal character in the key or value of response header +# +# source://puma//lib/puma/const.rb#278 +Puma::Const::DQUOTE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#275 +Puma::Const::EARLY_HINTS = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#124 +Puma::Const::ERROR_RESPONSE = T.let(T.unsafe(nil), Hash) + +# source://puma//lib/puma/const.rb#108 +Puma::Const::FAST_TRACK_KA_TIMEOUT = T.let(T.unsafe(nil), Float) + +# source://puma//lib/puma/const.rb#223 +Puma::Const::GATEWAY_INTERFACE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#227 +Puma::Const::HALT_COMMAND = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#150 +Puma::Const::HEAD = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#272 +Puma::Const::HIJACK = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#273 +Puma::Const::HIJACK_IO = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#271 +Puma::Const::HIJACK_P = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#237 +Puma::Const::HTTP = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#238 +Puma::Const::HTTPS = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#240 +Puma::Const::HTTPS_KEY = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#249 +Puma::Const::HTTP_10_200 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#220 +Puma::Const::HTTP_11 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#247 +Puma::Const::HTTP_11_100 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#248 +Puma::Const::HTTP_11_200 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#243 +Puma::Const::HTTP_CONNECTION = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#244 +Puma::Const::HTTP_EXPECT = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#279 +Puma::Const::HTTP_HEADER_DELIMITER = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#210 +Puma::Const::HTTP_HOST = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#242 +Puma::Const::HTTP_VERSION = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#203 +Puma::Const::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#206 +Puma::Const::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#205 +Puma::Const::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#204 +Puma::Const::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) + +# list from https://www.iana.org/assignments/http-methods/http-methods.xhtml +# as of 04-May-23 +# +# source://puma//lib/puma/const.rb#158 +Puma::Const::IANA_HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://puma//lib/puma/const.rb#280 +Puma::Const::ILLEGAL_HEADER_KEY_REGEX = T.let(T.unsafe(nil), Regexp) + +# header values can contain HTAB? +# +# source://puma//lib/puma/const.rb#282 +Puma::Const::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/const.rb#252 +Puma::Const::KEEP_ALIVE = T.let(T.unsafe(nil), String) + +# ETag is based on the apache standard of hex mtime-size-inode (inode is 0 on win32) +# +# source://puma//lib/puma/const.rb#201 +Puma::Const::LINE_END = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#213 +Puma::Const::LOCALHOST = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#214 +Puma::Const::LOCALHOST_IPV4 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#215 +Puma::Const::LOCALHOST_IPV6 = T.let(T.unsafe(nil), String) + +# Maximum request body size before it is moved out of memory and into a tempfile for reading. +# +# source://puma//lib/puma/const.rb#147 +Puma::Const::MAX_BODY = T.let(T.unsafe(nil), Integer) + +# This is the maximum header that is allowed before a client is booted. The parser detects +# this, but we'd also like to do this as well. +# +# source://puma//lib/puma/const.rb#144 +Puma::Const::MAX_HEADER = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/const.rb#269 +Puma::Const::NEWLINE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#120 +Puma::Const::PATH_INFO = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#212 +Puma::Const::PORT_443 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#211 +Puma::Const::PORT_80 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#295 +Puma::Const::PROXY_PROTOCOL_V1_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/const.rb#234 +Puma::Const::PUMA_CONFIG = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#235 +Puma::Const::PUMA_PEERCERT = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#106 +Puma::Const::PUMA_SERVER_STRING = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#233 +Puma::Const::PUMA_SOCKET = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#122 +Puma::Const::PUMA_TMP_BASE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#103 +Puma::Const::PUMA_VERSION = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#117 +Puma::Const::QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#232 +Puma::Const::RACK_AFTER_REPLY = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#230 +Puma::Const::RACK_INPUT = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#231 +Puma::Const::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#202 +Puma::Const::REMOTE_ADDR = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#149 +Puma::Const::REQUEST_METHOD = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#116 +Puma::Const::REQUEST_PATH = T.let(T.unsafe(nil), String) + +# The original URI requested by the client. +# +# source://puma//lib/puma/const.rb#115 +Puma::Const::REQUEST_URI = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#228 +Puma::Const::RESTART_COMMAND = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#208 +Puma::Const::SERVER_NAME = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#209 +Puma::Const::SERVER_PORT = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#219 +Puma::Const::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#222 +Puma::Const::SERVER_SOFTWARE = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#226 +Puma::Const::STOP_COMMAND = T.let(T.unsafe(nil), String) + +# based on https://www.rfc-editor.org/rfc/rfc9110.html#name-overview, +# with CONNECT removed, and PATCH added +# +# source://puma//lib/puma/const.rb#154 +Puma::Const::SUPPORTED_HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://puma//lib/puma/const.rb#256 +Puma::Const::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#257 +Puma::Const::TRANSFER_ENCODING2 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#262 +Puma::Const::TRANSFER_ENCODING_CHUNKED = T.let(T.unsafe(nil), String) + +# The keys of headers that should not be convert to underscore +# normalized versions. These headers are ignored at the request reading layer, +# but if we normalize them after reading, it's just confusing for the application. +# +# source://puma//lib/puma/const.rb#287 +Puma::Const::UNMASKABLE_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://puma//lib/puma/const.rb#216 +Puma::Const::UNSPECIFIED_IPV4 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#217 +Puma::Const::UNSPECIFIED_IPV6 = T.let(T.unsafe(nil), String) + +# source://puma//lib/puma/const.rb#103 +Puma::Const::VERSION = T.let(T.unsafe(nil), String) + +# How long to wait when getting some write blocking on the socket when +# sending data back +# +# source://puma//lib/puma/const.rb#112 +Puma::Const::WRITE_TIMEOUT = T.let(T.unsafe(nil), Integer) + +# The methods that are available for use inside the configuration file. +# These same methods are used in Puma cli and the rack handler +# internally. +# +# Used manually (via CLI class): +# +# config = Configuration.new({}) do |user_config| +# user_config.port 3001 +# end +# config.load +# +# puts config.options[:binds] # => "tcp://127.0.0.1:3001" +# +# Used to load file: +# +# $ cat puma_config.rb +# port 3002 +# +# Resulting configuration: +# +# config = Configuration.new(config_file: "puma_config.rb") +# config.load +# +# puts config.options[:binds] # => "tcp://127.0.0.1:3002" +# +# You can also find many examples being used by the test suite in +# +test/config+. +# +# Puma v6 adds the option to specify a key name (String or Symbol) to the +# hooks that run inside the forked workers. All the hooks run inside the +# {Puma::Cluster::Worker#run} method. +# +# Previously, the worker index and the LogWriter instance were passed to the +# hook blocks/procs. If a key name is specified, a hash is passed as the last +# parameter. This allows storage of data, typically objects that are created +# before the worker that need to be passed to the hook when the worker is shutdown. +# +# The following hooks have been updated: +# +# | DSL Method | Options Key | Fork Block Location | +# | on_worker_boot | :before_worker_boot | inside, before | +# | on_worker_shutdown | :before_worker_shutdown | inside, after | +# | on_refork | :before_refork | inside | +# +# source://puma//lib/puma/dsl.rb#51 +class Puma::DSL + # @return [DSL] a new instance of DSL + # + # source://puma//lib/puma/dsl.rb#123 + def initialize(options, config); end + + # source://puma//lib/puma/dsl.rb#130 + def _load_from(path); end + + # source://puma//lib/puma/dsl.rb#139 + def _offer_plugins; end + + # Start the Puma control rack application on +url+. This application can + # be communicated with to control the main server. Additionally, you can + # provide an authentication token, so all requests to the control server + # will need to include that token as a query parameter. This allows for + # simple authentication. + # + # Check out {Puma::App::Status} to see what the app has available. + # + # @example + # activate_control_app 'unix:///var/run/pumactl.sock' + # @example + # activate_control_app 'unix:///var/run/pumactl.sock', { auth_token: '12345' } + # @example + # activate_control_app 'unix:///var/run/pumactl.sock', { no_token: true } + # + # source://puma//lib/puma/dsl.rb#213 + def activate_control_app(url = T.unsafe(nil), opts = T.unsafe(nil)); end + + # Code to run in the master after a worker has been started. The worker's + # index is passed as an argument. + # + # This is called everytime a worker is to be started. + # + # @example + # after_worker_fork do + # puts 'After worker fork...' + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#692 + def after_worker_boot(&block); end + + # Code to run in the master after a worker has been started. The worker's + # index is passed as an argument. + # + # This is called everytime a worker is to be started. + # + # @example + # after_worker_fork do + # puts 'After worker fork...' + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#692 + def after_worker_fork(&block); end + + # Use an object or block as the rack application. This allows the + # configuration file to be the application itself. + # + # @example + # app do |env| + # body = 'Hello, World!' + # + # [ + # 200, + # { + # 'Content-Type' => 'text/plain', + # 'Content-Length' => body.length.to_s + # }, + # [body] + # ] + # end + # @see Puma::Configuration#app + # + # source://puma//lib/puma/dsl.rb#191 + def app(obj = T.unsafe(nil), &block); end + + # Code to run immediately before master process + # forks workers (once on boot). These hooks can block if necessary + # to wait for background operations unknown to Puma to finish before + # the process terminates. + # This can be used to close any connections to remote servers (database, + # Redis, ...) that were opened when preloading the code. + # + # This can be called multiple times to add several hooks. + # + # @example + # before_fork do + # puts "Starting workers..." + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#625 + def before_fork(&block); end + + # Bind the server to +url+. "tcp://", "unix://" and "ssl://" are the only + # accepted protocols. Multiple urls can be bound to, calling +bind+ does + # not overwrite previous bindings. + # + # The default is "tcp://0.0.0.0:9292". + # + # You can use query parameters within the url to specify options: + # + # * Set the socket backlog depth with +backlog+, default is 1024. + # * Set up an SSL certificate with +key+ & +cert+. + # * Set up an SSL certificate for mTLS with +key+, +cert+, +ca+ and +verify_mode+. + # * Set whether to optimize for low latency instead of throughput with + # +low_latency+, default is to not optimize for low latency. This is done + # via +Socket::TCP_NODELAY+. + # * Set socket permissions with +umask+. + # + # @example Backlog depth + # bind 'unix:///var/run/puma.sock?backlog=512' + # @example SSL cert + # bind 'ssl://127.0.0.1:9292?key=key.key&cert=cert.pem' + # @example SSL cert for mutual TLS (mTLS) + # bind 'ssl://127.0.0.1:9292?key=key.key&cert=cert.pem&ca=ca.pem&verify_mode=force_peer' + # @example Disable optimization for low latency + # bind 'tcp://0.0.0.0:9292?low_latency=false' + # @example Socket permissions + # bind 'unix:///var/run/puma.sock?umask=0111' + # @see Puma::Runner#load_and_bind + # @see Puma::Cluster#run + # + # source://puma//lib/puma/dsl.rb#274 + def bind(url); end + + # Bind to (systemd) activated sockets, regardless of configured binds. + # + # Systemd can present sockets as file descriptors that are already opened. + # By default Puma will use these but only if it was explicitly told to bind + # to the socket. If not, it will close the activated sockets. This means + # all configuration is duplicated. + # + # Binds can contain additional configuration, but only SSL config is really + # relevant since the unix and TCP socket options are ignored. + # + # This means there is a lot of duplicated configuration for no additional + # value in most setups. This method tells the launcher to bind to all + # activated sockets, regardless of existing bind. + # + # To clear configured binds, the value only can be passed. This will clear + # out any binds that may have been configured. + # + # @example Use any systemd activated sockets as well as configured binds + # bind_to_activated_sockets + # @example Only bind to systemd activated sockets, ignoring other binds + # bind_to_activated_sockets 'only' + # + # source://puma//lib/puma/dsl.rb#305 + def bind_to_activated_sockets(bind = T.unsafe(nil)); end + + # Work around leaky apps that leave garbage in Thread locals + # across requests. + # + # source://puma//lib/puma/dsl.rb#338 + def clean_thread_locals(which = T.unsafe(nil)); end + + # source://puma//lib/puma/dsl.rb#279 + def clear_binds!; end + + # Pass in a custom logging class instance + # + # source://puma//lib/puma/dsl.rb#430 + def custom_logger(custom_logger); end + + # Show debugging info + # + # source://puma//lib/puma/dsl.rb#436 + def debug; end + + # source://puma//lib/puma/dsl.rb#154 + def default_host; end + + # The directory to operate out of. + # + # The default is the current directory. + # + # @example + # directory '/u/apps/lolcat' + # + # source://puma//lib/puma/dsl.rb#796 + def directory(dir); end + + # When shutting down, drain the accept socket of pending connections and + # process them. This loops over the accept socket until there are no more + # read events and then stops looking and waits for the requests to finish. + # + # @see Puma::Server#graceful_shutdown + # + # source://puma//lib/puma/dsl.rb#347 + def drain_on_shutdown(which = T.unsafe(nil)); end + + # source://puma//lib/puma/dsl.rb#457 + def early_hints(answer = T.unsafe(nil)); end + + # Set the environment in which the rack's app will run. The value must be + # a string. + # + # The default is "development". + # + # @example + # environment 'production' + # + # source://puma//lib/puma/dsl.rb#358 + def environment(environment); end + + # When using prune_bundler, if extra runtime dependencies need to be loaded to + # initialize your app, then this setting can be used. This includes any Puma plugins. + # + # Before bundler is pruned, the gem names supplied will be looked up in the bundler + # context and then loaded again after bundler is pruned. + # Only applies if prune_bundler is used. + # + # @example + # extra_runtime_dependencies ['gem_name_1', 'gem_name_2'] + # @example + # extra_runtime_dependencies ['puma_worker_killer', 'puma-heroku'] + # @see Puma::Launcher#extra_runtime_deps_directories + # + # source://puma//lib/puma/dsl.rb#873 + def extra_runtime_dependencies(answer = T.unsafe(nil)); end + + # Define how long the tcp socket stays open, if no data has been received. + # + # @see Puma::Server.new + # + # source://puma//lib/puma/dsl.rb#320 + def first_data_timeout(seconds); end + + # How long to wait for threads to stop when shutting them + # down. Defaults to :forever. Specifying :immediately will cause + # Puma to kill the threads immediately. Otherwise the value + # is the number of seconds to wait. + # + # Puma always waits a few seconds after killing a thread for it to try + # to finish up it's work, even in :immediately mode. + # + # @see Puma::Server#graceful_shutdown + # + # source://puma//lib/puma/dsl.rb#370 + def force_shutdown_after(val = T.unsafe(nil)); end + + # When enabled, workers will be forked from worker 0 instead of from the master process. + # This option is similar to `preload_app` because the app is preloaded before forking, + # but it is compatible with phased restart. + # + # This option also enables the `refork` command (SIGURG), which optimizes copy-on-write performance + # in a running app. + # + # A refork will automatically trigger once after the specified number of requests + # (default 1000), or pass 0 to disable auto refork. + # + # @note Cluster mode only. + # @version 5.0.0 + # + # source://puma//lib/puma/dsl.rb#1081 + def fork_worker(after_requests = T.unsafe(nil)); end + + # source://puma//lib/puma/dsl.rb#162 + def get(key, default = T.unsafe(nil)); end + + # The default value for http_content_length_limit is nil. + # + # source://puma//lib/puma/dsl.rb#1124 + def http_content_length_limit(limit); end + + # If a new request is not received within this number of seconds, begin shutting down. + # + # @see Puma::Server.new + # + # source://puma//lib/puma/dsl.rb#332 + def idle_timeout(seconds); end + + # source://puma//lib/puma/dsl.rb#158 + def inject(&blk); end + + # Specify the backend for the IO selector. + # + # Provided values will be passed directly to +NIO::Selector.new+, with the + # exception of +:auto+ which will let nio4r choose the backend. + # + # Check the documentation of +NIO::Selector.backends+ for the list of valid + # options. Note that the available options on your system will depend on the + # operating system. If you want to use the pure Ruby backend (not + # recommended due to its comparatively low performance), set environment + # variable +NIO4R_PURE+ to +true+. + # + # The default is +:auto+. + # + # @see https://github.com/socketry/nio4r/blob/master/lib/nio/selector.rb + # + # source://puma//lib/puma/dsl.rb#1107 + def io_selector_backend(backend); end + + # Load additional configuration from a file + # Files get loaded later via Configuration#load + # + # source://puma//lib/puma/dsl.rb#240 + def load(file); end + + # source://puma//lib/puma/dsl.rb#474 + def log_formatter(&block); end + + # Enable request logging + # + # source://puma//lib/puma/dsl.rb#425 + def log_requests(which = T.unsafe(nil)); end + + # Use +obj+ or +block+ as the low level error handler. This allows the + # configuration file to change the default error on the server. + # + # @example + # lowlevel_error_handler do |err| + # [200, {}, ["error page"]] + # end + # + # source://puma//lib/puma/dsl.rb#817 + def lowlevel_error_handler(obj = T.unsafe(nil), &block); end + + # The number of requests to attempt inline before sending a client back to + # the reactor to be subject to normal ordering. + # + # source://puma//lib/puma/dsl.rb#1088 + def max_fast_inline(num_of_requests); end + + # source://puma//lib/puma/dsl.rb#1111 + def mutate_stdout_and_stderr_to_sync_on_write(enabled = T.unsafe(nil)); end + + # Code to run after puma is booted (works for both: single and clustered) + # + # @example + # on_booted do + # puts 'After booting...' + # end + # + # source://puma//lib/puma/dsl.rb#706 + def on_booted(&block); end + + # When `fork_worker` is enabled, code to run in Worker 0 + # before all other workers are re-forked from this process, + # after the server has temporarily stopped serving requests + # (once per complete refork cycle). + # + # This can be used to trigger extra garbage-collection to maximize + # copy-on-write efficiency, or close any connections to remote servers + # (database, Redis, ...) that were opened while the server was running. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_refork do + # 3.times {GC.start} + # end + # @note Cluster mode with `fork_worker` enabled only. + # @version 5.0.0 + # + # source://puma//lib/puma/dsl.rb#728 + def on_refork(key = T.unsafe(nil), &block); end + + # Code to run before doing a restart. This code should + # close log files, database connections, etc. + # + # This can be called multiple times to add code each time. + # + # @example + # on_restart do + # puts 'On restart...' + # end + # + # source://puma//lib/puma/dsl.rb#392 + def on_restart(&block); end + + # Provide a block to be executed after a thread is trimmed from the thread + # pool. Be careful: while this block executes, Puma's main loop is + # blocked, so no new requests will be picked up. + # + # This hook only runs when a thread in the threadpool is trimmed by Puma. + # It does not run when a thread dies due to exceptions or any other cause. + # + # Return values are ignored. + # Raising an exception will log a warning. + # + # This hook is useful for cleaning up thread local resources when a thread + # is trimmed. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_thread_exit do + # puts 'On thread exit...' + # end + # + # source://puma//lib/puma/dsl.rb#772 + def on_thread_exit(&block); end + + # Provide a block to be executed just before a thread is added to the thread + # pool. Be careful: while the block executes, thread creation is delayed, and + # probably a request will have to wait too! The new thread will not be added to + # the threadpool until the provided block returns. + # + # Return values are ignored. + # Raising an exception will log a warning. + # + # This hook is useful for doing something when the thread pool grows. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_thread_start do + # puts 'On thread start...' + # end + # + # source://puma//lib/puma/dsl.rb#748 + def on_thread_start(&block); end + + # Code to run in a worker when it boots to setup + # the process before booting the app. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_worker_boot do + # puts 'Before worker boot...' + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#642 + def on_worker_boot(key = T.unsafe(nil), &block); end + + # Code to run in the master right before a worker is started. The worker's + # index is passed as an argument. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_worker_fork do + # puts 'Before worker fork...' + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#676 + def on_worker_fork(&block); end + + # Code to run immediately before a worker shuts + # down (after it has finished processing HTTP requests). These hooks + # can block if necessary to wait for background operations unknown + # to Puma to finish before the process terminates. + # + # This can be called multiple times to add several hooks. + # + # @example + # on_worker_shutdown do + # puts 'On worker shutdown...' + # end + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#660 + def on_worker_shutdown(key = T.unsafe(nil), &block); end + + # Code to run out-of-band when the worker is idle. + # These hooks run immediately after a request has finished + # processing and there are no busy threads on the worker. + # The worker doesn't accept new requests until this code finishes. + # + # This hook is useful for running out-of-band garbage collection + # or scheduling asynchronous tasks to execute after a response. + # + # This can be called multiple times to add several hooks. + # + # source://puma//lib/puma/dsl.rb#786 + def out_of_band(&block); end + + # Define how long persistent connections can be idle before Puma closes them. + # + # @see Puma::Server.new + # + # source://puma//lib/puma/dsl.rb#326 + def persistent_timeout(seconds); end + + # Store the pid of the server in the file at "path". + # + # @example + # pidfile '/u/apps/lolcat/tmp/pids/puma.pid' + # + # source://puma//lib/puma/dsl.rb#411 + def pidfile(path); end + + # Load the named plugin for use by this configuration + # + # source://puma//lib/puma/dsl.rb#168 + def plugin(name); end + + # Define the TCP port to bind to. Use +bind+ for more advanced options. + # + # @example + # port 9292 + # + # source://puma//lib/puma/dsl.rb#313 + def port(port, host = T.unsafe(nil)); end + + # Preload the application before starting the workers; this conflicts with + # phased restart feature. On by default if your app uses more than 1 worker. + # + # @example + # preload_app! + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#806 + def preload_app!(answer = T.unsafe(nil)); end + + # This option is used to allow your app and its gems to be + # properly reloaded when not using preload. + # + # When set, if Puma detects that it's been invoked in the + # context of Bundler, it will cleanup the environment and + # re-run itself outside the Bundler environment, but directly + # using the files that Bundler has setup. + # + # This means that Puma is now decoupled from your Bundler + # context and when each worker loads, it will be loading a + # new Bundler context and thus can float around as the release + # dictates. + # + # @note This is incompatible with +preload_app!+. + # @note This is only supported for RubyGems 2.2+ + # @see extra_runtime_dependencies + # + # source://puma//lib/puma/dsl.rb#840 + def prune_bundler(answer = T.unsafe(nil)); end + + # When set to true (the default), workers accept all requests + # and queue them before passing them to the handlers. + # When set to false, each worker process accepts exactly as + # many requests as it is configured to simultaneously handle. + # + # Queueing requests generally improves performance. In some + # cases, such as a single threaded application, it may be + # better to ensure requests get balanced across workers. + # + # Note that setting this to false disables HTTP keepalive and + # slow clients will occupy a handler thread while the request + # is being sent. A reverse proxy, such as nginx, can handle + # slow clients and queue requests before they reach Puma. + # + # @see Puma::Server + # + # source://puma//lib/puma/dsl.rb#988 + def queue_requests(answer = T.unsafe(nil)); end + + # Disable request logging, if this isn't used it'll be enabled by default. + # + # @example + # quiet + # + # source://puma//lib/puma/dsl.rb#419 + def quiet(which = T.unsafe(nil)); end + + # Allows setting `env['rack.url_scheme']`. + # Only necessary if X-Forwarded-Proto is not being set by your proxy + # Normal values are 'http' or 'https'. + # + # source://puma//lib/puma/dsl.rb#453 + def rack_url_scheme(scheme = T.unsafe(nil)); end + + # Load +path+ as a rackup file. + # + # The default is "config.ru". + # + # @example + # rackup '/u/apps/lolcat/config.ru' + # + # source://puma//lib/puma/dsl.rb#446 + def rackup(path); end + + # By default, Puma will raise SignalException when SIGTERM is received. In + # environments where SIGTERM is something expected, you can suppress these + # with this option. + # + # This can be useful for example in Kubernetes, where rolling restart is + # guaranteed usually on infrastructure level. + # + # @example + # raise_exception_on_sigterm false + # @see Puma::Launcher#setup_signals + # @see Puma::Cluster#setup_signals + # + # source://puma//lib/puma/dsl.rb#856 + def raise_exception_on_sigterm(answer = T.unsafe(nil)); end + + # Command to use to restart Puma. This should be just how to + # load Puma itself (ie. 'ruby -Ilib bin/puma'), not the arguments + # to Puma, as those are the same as the original process. + # + # @example + # restart_command '/u/app/lolcat/bin/restart_puma' + # + # source://puma//lib/puma/dsl.rb#403 + def restart_command(cmd); end + + # source://puma//lib/puma/dsl.rb#150 + def set_default_host(host); end + + # Control how the remote address of the connection is set. This + # is configurable because to calculate the true socket peer address + # a kernel syscall is required which for very fast rack handlers + # slows down the handling significantly. + # + # There are 5 possible values: + # + # 1. **:socket** (the default) - read the peername from the socket using the + # syscall. This is the normal behavior. If this fails for any reason (e.g., + # if the peer disconnects between the connection being accepted and the getpeername + # system call), Puma will return "0.0.0.0" + # 2. **:localhost** - set the remote address to "127.0.0.1" + # 3. **header: **- set the remote address to the value of the + # provided http header. For instance: + # `set_remote_address header: "X-Real-IP"`. + # Only the first word (as separated by spaces or comma) is used, allowing + # headers such as X-Forwarded-For to be used as well. If this header is absent, + # Puma will fall back to the behavior of :socket + # 4. **proxy_protocol: :v1**- set the remote address to the value read from the + # HAproxy PROXY protocol, version 1. If the request does not have the PROXY + # protocol attached to it, will fall back to :socket + # 5. **\** - this allows you to hardcode remote address to any value + # you wish. Because Puma never uses this field anyway, it's format is + # entirely in your hands. + # + # source://puma//lib/puma/dsl.rb#1039 + def set_remote_address(val = T.unsafe(nil)); end + + # When a shutdown is requested, the backtraces of all the + # threads will be written to $stdout. This can help figure + # out why shutdown is hanging. + # + # source://puma//lib/puma/dsl.rb#996 + def shutdown_debug(val = T.unsafe(nil)); end + + # Disable warning message when running single mode with callback hook defined. + # + # source://puma//lib/puma/dsl.rb#607 + def silence_fork_callback_warning; end + + # Disable warning message when running in cluster mode with a single worker. + # + # Cluster mode has some overhead of running an additional 'control' process + # in order to manage the cluster. If only running a single worker it is + # likely not worth paying that overhead vs running in single mode with + # additional threads instead. + # + # There are some scenarios where running cluster mode with a single worker + # may still be warranted and valid under certain deployment scenarios, see + # https://github.com/puma/puma/issues/2534 + # + # Moving from workers = 1 to workers = 0 will save 10-30% of memory use. + # + # @note Cluster mode only. + # + # source://puma//lib/puma/dsl.rb#602 + def silence_single_worker_warning; end + + # Instead of using +bind+ and manually constructing a URI like: + # + # bind 'ssl://127.0.0.1:9292?key=key_path&cert=cert_path' + # + # you can use the this method. + # + # When binding on localhost you don't need to specify +cert+ and +key+, + # Puma will assume you are using the +localhost+ gem and try to load the + # appropriate files. + # + # When using the options hash parameter, the `reuse:` value is either + # `true`, which sets reuse 'on' with default values, or a hash, with `:size` + # and/or `:timeout` keys, each with integer values. + # + # The `cert:` options hash parameter can be the path to a certificate + # file including all intermediate certificates in PEM format. + # + # The `cert_pem:` options hash parameter can be String containing the + # cerificate and all intermediate certificates in PEM format. + # + # @example + # ssl_bind '127.0.0.1', '9292', { + # cert: path_to_cert, + # key: path_to_key, + # ssl_cipher_filter: cipher_filter, # optional + # verify_mode: verify_mode, # default 'none' + # verification_flags: flags, # optional, not supported by JRuby + # reuse: true # optional + # } + # @example Using self-signed certificate with the +localhost+ gem: + # ssl_bind '127.0.0.1', '9292' + # @example Alternatively, you can provide +cert_pem+ and +key_pem+: + # ssl_bind '127.0.0.1', '9292', { + # cert_pem: File.read(path_to_cert), + # key_pem: File.read(path_to_key), + # reuse: {size: 2_000, timeout: 20} # optional + # } + # @example For JRuby, two keys are required: +keystore+ & +keystore_pass+ + # ssl_bind '127.0.0.1', '9292', { + # keystore: path_to_keystore, + # keystore_pass: password, + # ssl_cipher_list: cipher_list, # optional + # verify_mode: verify_mode # default 'none' + # } + # + # source://puma//lib/puma/dsl.rb#552 + def ssl_bind(host, port, opts = T.unsafe(nil)); end + + # Use +path+ as the file to store the server info state. This is + # used by +pumactl+ to query and control the server. + # + # @example + # state_path '/u/apps/lolcat/tmp/pids/puma.state' + # + # source://puma//lib/puma/dsl.rb#562 + def state_path(path); end + + # Use +permission+ to restrict permissions for the state file. + # + # @example + # state_permission 0600 + # @version 5.0.0 + # + # source://puma//lib/puma/dsl.rb#572 + def state_permission(permission); end + + # Redirect +STDOUT+ and +STDERR+ to files specified. The +append+ parameter + # specifies whether the output is appended, the default is +false+. + # + # @example + # stdout_redirect '/app/lolcat/log/stdout', '/app/lolcat/log/stderr' + # @example + # stdout_redirect '/app/lolcat/log/stdout', '/app/lolcat/log/stderr', true + # + # source://puma//lib/puma/dsl.rb#468 + def stdout_redirect(stdout = T.unsafe(nil), stderr = T.unsafe(nil), append = T.unsafe(nil)); end + + # Supported http methods, which will replace `Puma::Const::SUPPORTED_HTTP_METHODS`. + # The value of `:any` will allows all methods, otherwise, the value must be + # an array of strings. Note that methods are all uppercase. + # + # `Puma::Const::SUPPORTED_HTTP_METHODS` is conservative, if you want a + # complete set of methods, the methods defined by the + # [IANA Method Registry](https://www.iana.org/assignments/http-methods/http-methods.xhtml) + # are pre-defined as the constant `Puma::Const::IANA_HTTP_METHODS`. + # + # @example Adds 'PROPFIND' to existing supported methods + # supported_http_methods(Puma::Const::SUPPORTED_HTTP_METHODS + ['PROPFIND']) + # @example Restricts methods to the array elements + # supported_http_methods %w[HEAD GET POST PUT DELETE OPTIONS PROPFIND] + # @example Restricts methods to the methods in the IANA Registry + # supported_http_methods Puma::Const::IANA_HTTP_METHODS + # @example Allows any method + # supported_http_methods :any + # @note If the `methods` value is `:any`, no method check with be performed, + # similar to Puma v5 and earlier. + # + # source://puma//lib/puma/dsl.rb#1149 + def supported_http_methods(methods); end + + # Additional text to display in process listing. + # + # If you do not specify a tag, Puma will infer it. If you do not want Puma + # to add a tag, use an empty string. + # + # @example + # tag 'app name' + # @example + # tag '' + # + # source://puma//lib/puma/dsl.rb#886 + def tag(string); end + + # Configure +min+ to be the minimum number of threads to use to answer + # requests and +max+ the maximum. + # + # The default is the environment variables +PUMA_MIN_THREADS+ / +PUMA_MAX_THREADS+ + # (or +MIN_THREADS+ / +MAX_THREADS+ if the +PUMA_+ variables aren't set). + # + # If these environment variables aren't set, the default is "0, 5" in MRI or "0, 16" for other interpreters. + # + # @example + # threads 0, 16 + # @example + # threads 5, 5 + # + # source://puma//lib/puma/dsl.rb#490 + def threads(min, max); end + + # Attempts to route traffic to less-busy workers by causing them to delay + # listening on the socket, allowing workers which are not processing any + # requests to pick up new requests first. + # + # Only works on MRI. For all other interpreters, this setting does nothing. + # + # @see Puma::Server#handle_servers + # @see Puma::ThreadPool#wait_for_less_busy_worker + # @version 5.0.0 + # + # source://puma//lib/puma/dsl.rb#1010 + def wait_for_less_busy_worker(val = T.unsafe(nil)); end + + # Change the default worker timeout for booting. + # + # If unspecified, this defaults to the value of worker_timeout. + # + # @example + # worker_boot_timeout 60 + # @note Cluster mode only. + # @see Puma::Cluster::Worker#ping_timeout + # + # source://puma//lib/puma/dsl.rb#937 + def worker_boot_timeout(timeout); end + + # Change the default interval for checking workers. + # + # The default value is 5 seconds. + # + # @example + # worker_check_interval 5 + # @note Cluster mode only. + # @see Puma::Cluster#check_workers + # + # source://puma//lib/puma/dsl.rb#899 + def worker_check_interval(interval); end + + # Set the strategy for worker culling. + # + # There are two possible values: + # + # 1. **:youngest** - the youngest workers (i.e. the workers that were + # the most recently started) will be culled. + # 2. **:oldest** - the oldest workers (i.e. the workers that were started + # the longest time ago) will be culled. + # + # @example + # worker_culling_strategy :oldest + # @note Cluster mode only. + # @see Puma::Cluster#cull_workers + # + # source://puma//lib/puma/dsl.rb#964 + def worker_culling_strategy(strategy); end + + # Set the timeout for worker shutdown. + # + # @note Cluster mode only. + # @see Puma::Cluster::Worker#term + # + # source://puma//lib/puma/dsl.rb#946 + def worker_shutdown_timeout(timeout); end + + # Verifies that all workers have checked in to the master process within + # the given timeout. If not the worker process will be restarted. This is + # not a request timeout, it is to protect against a hung or dead process. + # Setting this value will not protect against slow requests. + # + # This value must be greater than worker_check_interval. + # The default value is 60 seconds. + # + # @example + # worker_timeout 60 + # @note Cluster mode only. + # @see Puma::Cluster::Worker#ping_timeout + # + # source://puma//lib/puma/dsl.rb#916 + def worker_timeout(timeout); end + + # How many worker processes to run. Typically this is set to + # the number of available cores. + # + # The default is the value of the environment variable +WEB_CONCURRENCY+ if + # set, otherwise 0. + # + # @note Cluster mode only. + # @see Puma::Cluster + # + # source://puma//lib/puma/dsl.rb#584 + def workers(count); end + + private + + # To avoid adding cert_pem and key_pem as URI params, we store them on the + # options[:store] from where Puma binder knows how to find and extract them. + # + # source://puma//lib/puma/dsl.rb#1164 + def add_pem_values_to_options_store(opts); end + + # source://puma//lib/puma/dsl.rb#1180 + def process_hook(options_key, key, block, meth); end + + # source://puma//lib/puma/dsl.rb#1191 + def warn_if_in_single_mode(hook_name); end + + class << self + # convenience method so logic can be used in CI + # + # @see ssl_bind + # + # source://puma//lib/puma/dsl.rb#57 + def ssl_bind_str(host, port, opts); end + end +end + +# source://puma//lib/puma/dsl.rb#52 +Puma::DSL::ON_WORKER_KEY = T.let(T.unsafe(nil), Array) + +# The implementation of a detailed error logging. +# +# @version 5.0.0 +# +# source://puma//lib/puma/error_logger.rb#9 +class Puma::ErrorLogger + include ::Puma::Const + + # @return [ErrorLogger] a new instance of ErrorLogger + # + # source://puma//lib/puma/error_logger.rb#18 + def initialize(ioerr); end + + # Print occurred error details only if + # environment variable PUMA_DEBUG is defined. + # +options+ hash with additional options: + # - +error+ is an exception object + # - +req+ the http request + # - +text+ (default nil) custom string to print in title + # and before all remaining info. + # + # source://puma//lib/puma/error_logger.rb#47 + def debug(options = T.unsafe(nil)); end + + # Print occurred error details. + # +options+ hash with additional options: + # - +error+ is an exception object + # - +req+ the http request + # - +text+ (default nil) custom string to print in title + # and before all remaining info. + # + # source://puma//lib/puma/error_logger.rb#35 + def info(options = T.unsafe(nil)); end + + # Returns the value of attribute ioerr. + # + # source://puma//lib/puma/error_logger.rb#12 + def ioerr; end + + # source://puma//lib/puma/error_logger.rb#73 + def request_dump(req); end + + # source://puma//lib/puma/error_logger.rb#89 + def request_headers(req); end + + # @return [Boolean] + # + # source://puma//lib/puma/error_logger.rb#94 + def request_parsed?(req); end + + # source://puma//lib/puma/error_logger.rb#78 + def request_title(req); end + + # source://puma//lib/puma/error_logger.rb#61 + def title(options = T.unsafe(nil)); end + + private + + # source://puma//lib/puma/error_logger.rb#98 + def internal_write(str); end + + class << self + # source://puma//lib/puma/error_logger.rb#24 + def stdio; end + end +end + +# source://puma//lib/puma/error_logger.rb#16 +Puma::ErrorLogger::LOG_QUEUE = T.let(T.unsafe(nil), Thread::Queue) + +# source://puma//lib/puma/error_logger.rb#14 +Puma::ErrorLogger::REQUEST_FORMAT = T.let(T.unsafe(nil), String) + +# This is an event sink used by `Puma::Server` to handle +# lifecycle events such as :on_booted, :on_restart, and :on_stopped. +# Using `Puma::DSL` it is possible to register callback hooks +# for each event type. +# +# source://puma//lib/puma/events.rb#9 +class Puma::Events + # @return [Events] a new instance of Events + # + # source://puma//lib/puma/events.rb#11 + def initialize; end + + # Fire callbacks for the named hook + # + # source://puma//lib/puma/events.rb#16 + def fire(hook, *args); end + + # source://puma//lib/puma/events.rb#45 + def fire_on_booted!; end + + # source://puma//lib/puma/events.rb#49 + def fire_on_restart!; end + + # source://puma//lib/puma/events.rb#53 + def fire_on_stopped!; end + + # source://puma//lib/puma/events.rb#33 + def on_booted(&block); end + + # source://puma//lib/puma/events.rb#37 + def on_restart(&block); end + + # source://puma//lib/puma/events.rb#41 + def on_stopped(&block); end + + # Register a callback for a given hook + # + # source://puma//lib/puma/events.rb#21 + def register(hook, obj = T.unsafe(nil), &blk); end +end + +# @version 5.2.1 +# +# source://puma//lib/puma/detect.rb#9 +Puma::HAS_FORK = T.let(T.unsafe(nil), TrueClass) + +# source://puma//lib/puma/detect.rb#11 +Puma::HAS_NATIVE_IO_WAIT = T.let(T.unsafe(nil), TrueClass) + +# at present, MiniSSL::Engine is only defined in extension code (puma_http11), +# not in minissl.rb +# +# source://puma//lib/puma.rb#27 +Puma::HAS_SSL = T.let(T.unsafe(nil), TrueClass) + +# source://puma//lib/puma.rb#29 +Puma::HAS_UNIX_SOCKET = T.let(T.unsafe(nil), TrueClass) + +# Every standard HTTP code mapped to the appropriate message. +# Generated with: +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \ +# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ +# puts "#{m[1]} => \x27#{m[2].strip}\x27,"' +# +# source://puma//lib/puma/const.rb#17 +Puma::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +class Puma::HttpParser + def initialize; end + + def body; end + def error?; end + def execute(_arg0, _arg1, _arg2); end + def finish; end + def finished?; end + def nread; end + def reset; end +end + +class Puma::HttpParserError < ::IOError; end + +# source://puma//lib/puma/client.rb#26 +class Puma::HttpParserError501 < ::IOError; end + +# source://puma//lib/puma/io_buffer.rb#6 +class Puma::IOBuffer < ::StringIO + # @return [IOBuffer] a new instance of IOBuffer + # + # source://puma//lib/puma/io_buffer.rb#7 + def initialize; end + + def append(*_arg0); end + + # source://puma//lib/puma/io_buffer.rb#15 + def clear; end + + # @return [Boolean] + # + # source://puma//lib/puma/io_buffer.rb#11 + def empty?; end + + # Read & Reset - returns contents and resets + # + # @return [String] StringIO contents + # + # source://puma//lib/puma/io_buffer.rb#27 + def read_and_reset; end + + # source://puma//lib/puma/io_buffer.rb#15 + def reset; end + + # source://puma//lib/puma/io_buffer.rb#20 + def to_s; end +end + +# source://puma//lib/puma/detect.rb#13 +Puma::IS_JRUBY = T.let(T.unsafe(nil), FalseClass) + +# source://puma//lib/puma/detect.rb#19 +Puma::IS_LINUX = T.let(T.unsafe(nil), FalseClass) + +# @version 5.2.0 +# +# source://puma//lib/puma/detect.rb#22 +Puma::IS_MRI = T.let(T.unsafe(nil), TrueClass) + +# source://puma//lib/puma/detect.rb#15 +Puma::IS_OSX = T.let(T.unsafe(nil), TrueClass) + +# source://puma//lib/puma/detect.rb#17 +Puma::IS_WINDOWS = T.let(T.unsafe(nil), FalseClass) + +# Puma deliberately avoids the use of the json gem and instead performs JSON +# serialization without any external dependencies. In a puma cluster, loading +# any gem into the puma master process means that operators cannot use a +# phased restart to upgrade their application if the new version of that +# application uses a different version of that gem. The json gem in +# particular is additionally problematic because it leverages native +# extensions. If the puma master process relies on a gem with native +# extensions and operators remove gems from disk related to old releases, +# subsequent phased restarts can fail. +# +# The implementation of JSON serialization in this module is not designed to +# be particularly full-featured or fast. It just has to handle the few places +# where Puma relies on JSON serialization internally. +# +# source://puma//lib/puma/json_serialization.rb#20 +module Puma::JSONSerialization + class << self + # source://puma//lib/puma/json_serialization.rb#29 + def generate(value); end + + private + + # source://puma//lib/puma/json_serialization.rb#86 + def serialize_object_key(output, value); end + + # source://puma//lib/puma/json_serialization.rb#71 + def serialize_string(output, value); end + + # source://puma//lib/puma/json_serialization.rb#38 + def serialize_value(output, value); end + end +end + +# source://puma//lib/puma/json_serialization.rb#22 +Puma::JSONSerialization::BACKSLASH = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/json_serialization.rb#24 +Puma::JSONSerialization::CHAR_TO_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# As required by ECMA-404 +# +# source://puma//lib/puma/json_serialization.rb#23 +Puma::JSONSerialization::CONTROL_CHAR_TO_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/json_serialization.rb#21 +Puma::JSONSerialization::QUOTE = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/json_serialization.rb#26 +class Puma::JSONSerialization::SerializationError < ::StandardError; end + +# Puma::Launcher is the single entry point for starting a Puma server based on user +# configuration. It is responsible for taking user supplied arguments and resolving them +# with configuration in `config/puma.rb` or `config/puma/.rb`. +# +# It is responsible for either launching a cluster of Puma workers or a single +# puma server. +# +# source://puma//lib/puma/launcher.rb#18 +class Puma::Launcher + # Returns an instance of Launcher + # + # +conf+ A Puma::Configuration object indicating how to run the server. + # + # +launcher_args+ A Hash that currently has one required key `:events`, + # this is expected to hold an object similar to an `Puma::LogWriter.stdio`, + # this object will be responsible for broadcasting Puma's internal state + # to a logging destination. An optional key `:argv` can be supplied, + # this should be an array of strings, these arguments are re-used when + # restarting the puma server. + # + # Examples: + # + # conf = Puma::Configuration.new do |user_config| + # user_config.threads 1, 10 + # user_config.app do |env| + # [200, {}, ["hello world"]] + # end + # end + # Puma::Launcher.new(conf, log_writer: Puma::LogWriter.stdio).run + # + # @return [Launcher] a new instance of Launcher + # + # source://puma//lib/puma/launcher.rb#41 + def initialize(conf, launcher_args = T.unsafe(nil)); end + + # Returns the value of attribute binder. + # + # source://puma//lib/puma/launcher.rb#111 + def binder; end + + # source://puma//lib/puma/launcher.rb#216 + def close_binder_listeners; end + + # Returns the value of attribute config. + # + # source://puma//lib/puma/launcher.rb#111 + def config; end + + # Return all tcp ports the launcher may be using, TCP or SSL + # + # @version 5.0.0 + # + # source://puma//lib/puma/launcher.rb#202 + def connected_ports; end + + # Delete the configured pidfile + # + # source://puma//lib/puma/launcher.rb#139 + def delete_pidfile; end + + # Returns the value of attribute events. + # + # source://puma//lib/puma/launcher.rb#111 + def events; end + + # Begin async shutdown of the server + # + # source://puma//lib/puma/launcher.rb#145 + def halt; end + + # Returns the value of attribute log_writer. + # + # source://puma//lib/puma/launcher.rb#111 + def log_writer; end + + # Returns the value of attribute options. + # + # source://puma//lib/puma/launcher.rb#111 + def options; end + + # Begin a phased restart if supported + # + # source://puma//lib/puma/launcher.rb#163 + def phased_restart; end + + # Begin a refork if supported + # + # source://puma//lib/puma/launcher.rb#172 + def refork; end + + # Begin async restart of the server + # + # source://puma//lib/puma/launcher.rb#157 + def restart; end + + # source://puma//lib/puma/launcher.rb#207 + def restart_args; end + + # Returns the value of attribute restart_dir. + # + # source://puma//lib/puma/launcher.rb#111 + def restart_dir; end + + # Run the server. This blocks until the server is stopped + # + # source://puma//lib/puma/launcher.rb#183 + def run; end + + # Return stats about the server + # + # source://puma//lib/puma/launcher.rb#114 + def stats; end + + # Begin async shutdown of the server gracefully + # + # source://puma//lib/puma/launcher.rb#151 + def stop; end + + # @version 5.0.0 + # + # source://puma//lib/puma/launcher.rb#227 + def thread_status; end + + # Write a state file that can be used by pumactl to control + # the server + # + # source://puma//lib/puma/launcher.rb#120 + def write_state; end + + private + + # @return [Boolean] + # + # source://puma//lib/puma/launcher.rb#326 + def clustered?; end + + # source://puma//lib/puma/launcher.rb#265 + def do_forceful_stop; end + + # source://puma//lib/puma/launcher.rb#270 + def do_graceful_stop; end + + # source://puma//lib/puma/launcher.rb#275 + def do_restart(previous_env); end + + # source://puma//lib/puma/launcher.rb#252 + def do_run_finished(previous_env); end + + # source://puma//lib/puma/launcher.rb#352 + def environment; end + + # source://puma//lib/puma/launcher.rb#365 + def generate_restart_data; end + + # source://puma//lib/puma/launcher.rb#240 + def get_env; end + + # source://puma//lib/puma/launcher.rb#322 + def log(str); end + + # source://puma//lib/puma/launcher.rb#475 + def log_config; end + + # source://puma//lib/puma/launcher.rb#360 + def prune_bundler!; end + + # @return [Boolean] + # + # source://puma//lib/puma/launcher.rb#356 + def prune_bundler?; end + + # source://puma//lib/puma/launcher.rb#318 + def reload_worker_directory; end + + # source://puma//lib/puma/launcher.rb#282 + def restart!; end + + # source://puma//lib/puma/launcher.rb#335 + def set_process_title; end + + # source://puma//lib/puma/launcher.rb#346 + def set_rack_environment; end + + # source://puma//lib/puma/launcher.rb#410 + def setup_signals; end + + # source://puma//lib/puma/launcher.rb#340 + def title; end + + # @raise [UnsupportedOption] + # + # source://puma//lib/puma/launcher.rb#330 + def unsupported(str); end + + # If configured, write the pid of the current process out + # to a file. + # + # source://puma//lib/puma/launcher.rb#308 + def write_pid; end +end + +# This class is used to pickup Gemfile changes during +# application restarts. +# +# source://puma//lib/puma/launcher/bundle_pruner.rb#8 +class Puma::Launcher::BundlePruner + # @return [BundlePruner] a new instance of BundlePruner + # + # source://puma//lib/puma/launcher/bundle_pruner.rb#10 + def initialize(original_argv, extra_runtime_dependencies, log_writer); end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#16 + def prune; end + + private + + # source://puma//lib/puma/launcher/bundle_pruner.rb#75 + def extra_runtime_deps_paths; end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#99 + def log(str); end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#71 + def paths_to_require_after_prune; end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#87 + def puma_require_paths; end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#57 + def puma_wild_path; end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#95 + def require_paths_for_gem(gem_spec); end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#48 + def require_rubygems_min_version!; end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#91 + def spec_for_gem(gem_name); end + + # source://puma//lib/puma/launcher/bundle_pruner.rb#62 + def with_unbundled_env; end +end + +# Handles logging concerns for both standard messages +# (+stdout+) and errors (+stderr+). +# +# source://puma//lib/puma/log_writer.rb#12 +class Puma::LogWriter + # Create a LogWriter that prints to +stdout+ and +stderr+. + # + # @return [LogWriter] a new instance of LogWriter + # + # source://puma//lib/puma/log_writer.rb#34 + def initialize(stdout, stderr); end + + # An HTTP connection error has occurred. + # +error+ a connection exception, +req+ the request, + # and +text+ additional info + # + # @version 5.0.0 + # + # source://puma//lib/puma/log_writer.rb#111 + def connection_error(error, req, text = T.unsafe(nil)); end + + # Returns the value of attribute custom_logger. + # + # source://puma//lib/puma/log_writer.rb#31 + def custom_logger; end + + # Sets the attribute custom_logger + # + # @param value the value to set the attribute custom_logger to. + # + # source://puma//lib/puma/log_writer.rb#31 + def custom_logger=(_arg0); end + + # source://puma//lib/puma/log_writer.rb#93 + def debug(str); end + + # @return [Boolean] + # + # source://puma//lib/puma/log_writer.rb#89 + def debug?; end + + # Log occurred error debug dump. + # +error+ an exception object, +req+ the request, + # and +text+ additional info + # + # @version 5.0.0 + # + # source://puma//lib/puma/log_writer.rb#143 + def debug_error(error, req = T.unsafe(nil), text = T.unsafe(nil)); end + + # Write +str+ to +@stderr+ + # + # source://puma//lib/puma/log_writer.rb#98 + def error(str); end + + # source://puma//lib/puma/log_writer.rb#103 + def format(str); end + + # Returns the value of attribute formatter. + # + # source://puma//lib/puma/log_writer.rb#31 + def formatter; end + + # Sets the attribute formatter + # + # @param value the value to set the attribute formatter to. + # + # source://puma//lib/puma/log_writer.rb#31 + def formatter=(_arg0); end + + # Write +str+ to +@stdout+ + # + # source://puma//lib/puma/log_writer.rb#62 + def log(str); end + + # An HTTP parse error has occurred. + # +error+ a parsing exception, + # and +req+ the request. + # + # source://puma//lib/puma/log_writer.rb#118 + def parse_error(error, req); end + + # An SSL error has occurred. + # + # @param error [Puma::MiniSSL::SSLError] + # @param ssl_socket [Puma::MiniSSL::Socket] + # + # source://puma//lib/puma/log_writer.rb#125 + def ssl_error(error, ssl_socket); end + + # Returns the value of attribute stderr. + # + # source://puma//lib/puma/log_writer.rb#28 + def stderr; end + + # Returns the value of attribute stdout. + # + # source://puma//lib/puma/log_writer.rb#28 + def stdout; end + + # An unknown error has occurred. + # +error+ an exception object, +req+ the request, + # and +text+ additional info + # + # source://puma//lib/puma/log_writer.rb#135 + def unknown_error(error, req = T.unsafe(nil), text = T.unsafe(nil)); end + + # source://puma//lib/puma/log_writer.rb#70 + def write(str); end + + private + + # source://puma//lib/puma/log_writer.rb#74 + def internal_write(str); end + + class << self + # source://puma//lib/puma/log_writer.rb#56 + def null; end + + # source://puma//lib/puma/log_writer.rb#52 + def stdio; end + + # Returns an LogWriter object which writes its status to + # two StringIO objects. + # + # source://puma//lib/puma/log_writer.rb#48 + def strings; end + end +end + +# source://puma//lib/puma/log_writer.rb#44 +Puma::LogWriter::DEFAULT = T.let(T.unsafe(nil), Puma::LogWriter) + +# source://puma//lib/puma/log_writer.rb#14 +class Puma::LogWriter::DefaultFormatter + # source://puma//lib/puma/log_writer.rb#15 + def call(str); end +end + +# source://puma//lib/puma/log_writer.rb#26 +Puma::LogWriter::LOG_QUEUE = T.let(T.unsafe(nil), Thread::Queue) + +# source://puma//lib/puma/log_writer.rb#20 +class Puma::LogWriter::PidFormatter + # source://puma//lib/puma/log_writer.rb#21 + def call(str); end +end + +# source://puma//lib/puma/minissl.rb#14 +module Puma::MiniSSL + class << self + def check; end + end +end + +# source://puma//lib/puma/minissl.rb#208 +class Puma::MiniSSL::Context + # @return [Context] a new instance of Context + # + # source://puma//lib/puma/minissl.rb#212 + def initialize; end + + # Returns the value of attribute ca. + # + # source://puma//lib/puma/minissl.rb#288 + def ca; end + + # source://puma//lib/puma/minissl.rb#310 + def ca=(ca); end + + # Returns the value of attribute cert. + # + # source://puma//lib/puma/minissl.rb#287 + def cert; end + + # source://puma//lib/puma/minissl.rb#305 + def cert=(cert); end + + # Returns the value of attribute cert_pem. + # + # source://puma//lib/puma/minissl.rb#289 + def cert_pem; end + + # @raise [ArgumentError] + # + # source://puma//lib/puma/minissl.rb#315 + def cert_pem=(cert_pem); end + + # source://puma//lib/puma/minissl.rb#325 + def check; end + + # @raise [ArgumentError] + # + # source://puma//lib/puma/minissl.rb#224 + def check_file(file, desc); end + + # non-jruby Context properties + # + # source://puma//lib/puma/minissl.rb#285 + def key; end + + # source://puma//lib/puma/minissl.rb#296 + def key=(key); end + + # Executes the command to return the password needed to decrypt the key. + # + # source://puma//lib/puma/minissl.rb#331 + def key_password; end + + # Returns the value of attribute key_password_command. + # + # source://puma//lib/puma/minissl.rb#286 + def key_password_command; end + + # source://puma//lib/puma/minissl.rb#301 + def key_password_command=(key_password_command); end + + # Returns the value of attribute key_pem. + # + # source://puma//lib/puma/minissl.rb#290 + def key_pem; end + + # @raise [ArgumentError] + # + # source://puma//lib/puma/minissl.rb#320 + def key_pem=(key_pem); end + + # Returns the value of attribute no_tlsv1. + # + # source://puma//lib/puma/minissl.rb#210 + def no_tlsv1; end + + # disables TLSv1 + # + # @raise [ArgumentError] + # + # source://puma//lib/puma/minissl.rb#373 + def no_tlsv1=(tlsv1); end + + # Returns the value of attribute no_tlsv1_1. + # + # source://puma//lib/puma/minissl.rb#210 + def no_tlsv1_1; end + + # disables TLSv1 and TLSv1.1. Overrides `#no_tlsv1=` + # + # @raise [ArgumentError] + # + # source://puma//lib/puma/minissl.rb#380 + def no_tlsv1_1=(tlsv1_1); end + + # Returns the value of attribute reuse. + # + # source://puma//lib/puma/minissl.rb#294 + def reuse; end + + # Controls session reuse. Allowed values are as follows: + # * 'off' - matches the behavior of Puma 5.6 and earlier. This is included + # in case reuse 'on' is made the default in future Puma versions. + # * 'dflt' - sets session reuse on, with OpenSSL default cache size of + # 20k and default timeout of 300 seconds. + # * 's,t' - where s and t are integer strings, for size and timeout. + # * 's' - where s is an integer strings for size. + # * ',t' - where t is an integer strings for timeout. + # + # source://puma//lib/puma/minissl.rb#350 + def reuse=(reuse_str); end + + # Returns the value of attribute reuse_cache_size. + # + # source://puma//lib/puma/minissl.rb#294 + def reuse_cache_size; end + + # Returns the value of attribute reuse_timeout. + # + # source://puma//lib/puma/minissl.rb#294 + def reuse_timeout; end + + # Returns the value of attribute ssl_cipher_filter. + # + # source://puma//lib/puma/minissl.rb#291 + def ssl_cipher_filter; end + + # Sets the attribute ssl_cipher_filter + # + # @param value the value to set the attribute ssl_cipher_filter to. + # + # source://puma//lib/puma/minissl.rb#291 + def ssl_cipher_filter=(_arg0); end + + # Returns the value of attribute verification_flags. + # + # source://puma//lib/puma/minissl.rb#292 + def verification_flags; end + + # Sets the attribute verification_flags + # + # @param value the value to set the attribute verification_flags to. + # + # source://puma//lib/puma/minissl.rb#292 + def verification_flags=(_arg0); end + + # Returns the value of attribute verify_mode. + # + # source://puma//lib/puma/minissl.rb#209 + def verify_mode; end + + # Sets the attribute verify_mode + # + # @param value the value to set the attribute verify_mode to. + # + # source://puma//lib/puma/minissl.rb#209 + def verify_mode=(_arg0); end +end + +# source://puma//lib/puma/minissl/context_builder.rb#3 +class Puma::MiniSSL::ContextBuilder + # @return [ContextBuilder] a new instance of ContextBuilder + # + # source://puma//lib/puma/minissl/context_builder.rb#4 + def initialize(params, log_writer); end + + # source://puma//lib/puma/minissl/context_builder.rb#9 + def context; end + + private + + # Returns the value of attribute log_writer. + # + # source://puma//lib/puma/minissl/context_builder.rb#92 + def log_writer; end + + # Returns the value of attribute params. + # + # source://puma//lib/puma/minissl/context_builder.rb#92 + def params; end +end + +class Puma::MiniSSL::Engine + def extract; end + def init?; end + def inject(_arg0); end + def peercert; end + def read; end + def shutdown; end + def ssl_vers_st; end + def write(_arg0); end + + class << self + def client; end + def server(_arg0); end + end +end + +# Define constant at runtime, as it's easy to determine at built time, +# but Puma could (it shouldn't) be loaded with an older OpenSSL version +# +# @version 5.0.0 +# +# source://puma//lib/puma/minissl.rb#18 +Puma::MiniSSL::HAS_TLS1_3 = T.let(T.unsafe(nil), TrueClass) + +Puma::MiniSSL::OPENSSL_LIBRARY_VERSION = T.let(T.unsafe(nil), String) +Puma::MiniSSL::OPENSSL_NO_SSL3 = T.let(T.unsafe(nil), TrueClass) +Puma::MiniSSL::OPENSSL_NO_TLS1 = T.let(T.unsafe(nil), FalseClass) +Puma::MiniSSL::OPENSSL_NO_TLS1_1 = T.let(T.unsafe(nil), FalseClass) +Puma::MiniSSL::OPENSSL_VERSION = T.let(T.unsafe(nil), String) + +class Puma::MiniSSL::SSLContext + def initialize(_arg0); end +end + +# this class is defined so that it exists when Puma is compiled +# without ssl support, as Server and Reactor use it in rescue statements. +class Puma::MiniSSL::SSLError < ::StandardError; end + +# source://puma//lib/puma/minissl.rb#417 +class Puma::MiniSSL::Server + # @return [Server] a new instance of Server + # + # source://puma//lib/puma/minissl.rb#418 + def initialize(socket, ctx); end + + # source://puma//lib/puma/minissl.rb#424 + def accept; end + + # source://puma//lib/puma/minissl.rb#431 + def accept_nonblock; end + + # @version 5.0.0 + # + # source://puma//lib/puma/minissl.rb#445 + def addr; end + + # source://puma//lib/puma/minissl.rb#449 + def close; end + + # @return [Boolean] + # + # source://puma//lib/puma/minissl.rb#453 + def closed?; end + + # source://puma//lib/puma/minissl.rb#439 + def to_io; end +end + +# source://puma//lib/puma/minissl.rb#22 +class Puma::MiniSSL::Socket + # @return [Socket] a new instance of Socket + # + # source://puma//lib/puma/minissl.rb#23 + def initialize(socket, engine); end + + # source://puma//lib/puma/minissl.rb#120 + def <<(data); end + + # source://puma//lib/puma/minissl.rb#167 + def close; end + + # @return [Boolean] + # + # source://puma//lib/puma/minissl.rb#35 + def closed?; end + + # source://puma//lib/puma/minissl.rb#77 + def engine_read_all; end + + # source://puma//lib/puma/minissl.rb#163 + def flush; end + + # source://puma//lib/puma/minissl.rb#183 + def peeraddr; end + + # OpenSSL is loaded in `MiniSSL::ContextBuilder` when + # `MiniSSL::Context#verify_mode` is not `VERIFY_NONE`. + # When `VERIFY_NONE`, `MiniSSL::Engine#peercert` is nil, regardless of + # whether the client sends a cert. + # + # @return [OpenSSL::X509::Certificate, nil] + # + # source://puma//lib/puma/minissl.rb#193 + def peercert; end + + # source://puma//lib/puma/minissl.rb#85 + def read_nonblock(size, *_); end + + # source://puma//lib/puma/minissl.rb#60 + def readpartial(size); end + + # Returns a two element array, + # first is protocol version (SSL_get_version), + # second is 'handshake' state (SSL_state_string) + # + # Used for dropping tcp connections to ssl. + # See OpenSSL ssl/ssl_stat.c SSL_state_string for info + # + # @version 5.0.0 + # + # source://puma//lib/puma/minissl.rb#48 + def ssl_version_state; end + + # source://puma//lib/puma/minissl.rb#120 + def syswrite(data); end + + # source://puma//lib/puma/minissl.rb#31 + def to_io; end + + # source://puma//lib/puma/minissl.rb#120 + def write(data); end + + # The problem with implementing it properly + # is that it means we'd have to have the ability to rewind + # an engine because after we write+extract, the socket + # write_nonblock call might raise an exception and later + # code would pass the same data in, but the engine would think + # it had already written the data in. + # + # So for the time being (and since write blocking is quite rare), + # go ahead and actually block in write_nonblock. + # + # source://puma//lib/puma/minissl.rb#159 + def write_nonblock(data, *_); end + + private + + # Used to check the handshake status, in particular when a TCP connection + # is made with TLSv1.3 as an available protocol + # + # @return [Boolean] + # @version 5.0.0 + # + # source://puma//lib/puma/minissl.rb#55 + def bad_tlsv1_3?; end +end + +# https://github.com/openssl/openssl/blob/master/include/openssl/x509_vfy.h.in +# /* Certificate verify flags */ +# +# source://puma//lib/puma/minissl.rb#393 +Puma::MiniSSL::VERIFICATION_FLAGS = T.let(T.unsafe(nil), Hash) + +# source://puma//lib/puma/minissl.rb#389 +Puma::MiniSSL::VERIFY_FAIL_IF_NO_PEER_CERT = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/minissl.rb#387 +Puma::MiniSSL::VERIFY_NONE = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/minissl.rb#388 +Puma::MiniSSL::VERIFY_PEER = T.let(T.unsafe(nil), Integer) + +# Provides an IO-like object that always appears to contain no data. +# Used as the value for rack.input when the request has no body. +# +# source://puma//lib/puma/null_io.rb#7 +class Puma::NullIO + # source://puma//lib/puma/null_io.rb#42 + def close; end + + # This is used as singleton class, so can't have state. + # + # @return [Boolean] + # + # source://puma//lib/puma/null_io.rb#71 + def closed?; end + + # source://puma//lib/puma/null_io.rb#16 + def each; end + + # @return [Boolean] + # + # source://puma//lib/puma/null_io.rb#49 + def eof?; end + + # source://puma//lib/puma/null_io.rb#66 + def flush; end + + # source://puma//lib/puma/null_io.rb#8 + def gets; end + + # source://puma//lib/puma/null_io.rb#60 + def puts(*ary); end + + # Mimics IO#read with no data. + # + # source://puma//lib/puma/null_io.rb#21 + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end + + # source://puma//lib/puma/null_io.rb#39 + def rewind; end + + # source://puma//lib/puma/null_io.rb#45 + def size; end + + # source://puma//lib/puma/null_io.rb#12 + def string; end + + # source://puma//lib/puma/null_io.rb#53 + def sync; end + + # source://puma//lib/puma/null_io.rb#57 + def sync=(v); end + + # source://puma//lib/puma/null_io.rb#63 + def write(*ary); end +end + +# source://puma//lib/puma/plugin.rb#76 +class Puma::Plugin + # source://puma//lib/puma/plugin.rb#107 + def in_background(&blk); end + + class << self + # source://puma//lib/puma/plugin.rb#97 + def create(&blk); end + + # source://puma//lib/puma/plugin.rb#90 + def extract_name(ary); end + end +end + +# Matches +# "C:/Ruby22/lib/ruby/gems/2.2.0/gems/puma-3.0.1/lib/puma/plugin/tmp_restart.rb:3:in `'" +# AS +# C:/Ruby22/lib/ruby/gems/2.2.0/gems/puma-3.0.1/lib/puma/plugin/tmp_restart.rb +# +# source://puma//lib/puma/plugin.rb#81 +Puma::Plugin::CALLER_FILE = T.let(T.unsafe(nil), Regexp) + +# source://puma//lib/puma/plugin.rb#6 +class Puma::PluginLoader + # @return [PluginLoader] a new instance of PluginLoader + # + # source://puma//lib/puma/plugin.rb#7 + def initialize; end + + # @raise [UnknownPlugin] + # + # source://puma//lib/puma/plugin.rb#11 + def create(name); end + + # source://puma//lib/puma/plugin.rb#21 + def fire_starts(launcher); end +end + +# source://puma//lib/puma/plugin.rb#30 +class Puma::PluginRegistry + # @return [PluginRegistry] a new instance of PluginRegistry + # + # source://puma//lib/puma/plugin.rb#31 + def initialize; end + + # source://puma//lib/puma/plugin.rb#60 + def add_background(blk); end + + # @raise [UnknownPlugin] + # + # source://puma//lib/puma/plugin.rb#40 + def find(name); end + + # source://puma//lib/puma/plugin.rb#64 + def fire_background; end + + # source://puma//lib/puma/plugin.rb#36 + def register(name, cls); end +end + +# source://puma//lib/puma/plugin.rb#74 +Puma::Plugins = T.let(T.unsafe(nil), Puma::PluginRegistry) + +# source://puma//lib/puma/rack/builder.rb#6 +module Puma::Rack; end + +# Rack::Builder implements a small DSL to iteratively construct Rack +# applications. +# +# Example: +# +# require 'rack/lobster' +# app = Rack::Builder.new do +# use Rack::CommonLogger +# use Rack::ShowExceptions +# map "/lobster" do +# use Rack::Lint +# run Rack::Lobster.new +# end +# end +# +# run app +# +# Or +# +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } +# end +# +# run app +# +# +use+ adds middleware to the stack, +run+ dispatches to an application. +# You can use +map+ to construct a Rack::URLMap in a convenient way. +# +# source://puma//lib/puma/rack/builder.rb#154 +class Puma::Rack::Builder + # @return [Builder] a new instance of Builder + # + # source://puma//lib/puma/rack/builder.rb#176 + def initialize(default_app = T.unsafe(nil), &block); end + + # source://puma//lib/puma/rack/builder.rb#283 + def call(env); end + + # Creates a route within the application. + # + # Rack::Builder.app do + # map '/' do + # run Heartbeat + # end + # end + # + # The +use+ method can also be used here to specify middleware to run under a specific path: + # + # Rack::Builder.app do + # map '/' do + # use Middleware + # run Heartbeat + # end + # end + # + # This example includes a piece of middleware which will run before requests hit +Heartbeat+. + # + # source://puma//lib/puma/rack/builder.rb#270 + def map(path, &block); end + + # Takes an argument that is an object that responds to #call and returns a Rack response. + # The simplest form of this is a lambda object: + # + # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } + # + # However this could also be a class: + # + # class Heartbeat + # def self.call(env) + # [200, { "Content-Type" => "text/plain" }, ["OK"]] + # end + # end + # + # run Heartbeat + # + # source://puma//lib/puma/rack/builder.rb#234 + def run(app); end + + # source://puma//lib/puma/rack/builder.rb#275 + def to_app; end + + # Specifies middleware to use in a stack. + # + # class Middleware + # def initialize(app) + # @app = app + # end + # + # def call(env) + # env["rack.some_header"] = "setting an example" + # @app.call(env) + # end + # end + # + # use Middleware + # run lambda { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } + # + # All requests through to this application will first be processed by the middleware class. + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + # + # source://puma//lib/puma/rack/builder.rb#212 + def use(middleware, *args, &block); end + + # Takes a lambda or block that is used to warm-up the application. + # + # warmup do |app| + # client = Rack::MockRequest.new(app) + # client.get('/') + # end + # + # use SomeMiddleware + # run MyApp + # + # source://puma//lib/puma/rack/builder.rb#247 + def warmup(prc = T.unsafe(nil), &block); end + + private + + # source://puma//lib/puma/rack/builder.rb#289 + def generate_map(default_app, mapping); end + + class << self + # source://puma//lib/puma/rack/builder.rb#189 + def app(default_app = T.unsafe(nil), &block); end + + # source://puma//lib/puma/rack/builder.rb#171 + def new_from_string(builder_script, file = T.unsafe(nil)); end + + # source://puma//lib/puma/rack/builder.rb#155 + def parse_file(config, opts = T.unsafe(nil)); end + end +end + +# source://puma//lib/puma/rack/builder.rb#7 +class Puma::Rack::Options + # source://puma//lib/puma/rack/builder.rb#101 + def handler_opts(options); end + + # source://puma//lib/puma/rack/builder.rb#8 + def parse!(args); end +end + +# Monitors a collection of IO objects, calling a block whenever +# any monitored object either receives data or times out, or when the Reactor shuts down. +# +# The waiting/wake up is performed with nio4r, which will use the appropriate backend (libev, +# Java NIO or just plain IO#select). The call to `NIO::Selector#select` will +# 'wakeup' any IO object that receives data. +# +# This class additionally tracks a timeout for every added object, +# and wakes up any object when its timeout elapses. +# +# The implementation uses a Queue to synchronize adding new objects from the internal select loop. +# +# source://puma//lib/puma/reactor.rb#17 +class Puma::Reactor + # Create a new Reactor to monitor IO objects added by #add. + # The provided block will be invoked when an IO has data available to read, + # its timeout elapses, or when the Reactor shuts down. + # + # @return [Reactor] a new instance of Reactor + # + # source://puma//lib/puma/reactor.rb#21 + def initialize(backend, &block); end + + # Add a new client to monitor. + # The object must respond to #timeout and #timeout_at. + # Returns false if the reactor is already shut down. + # + # source://puma//lib/puma/reactor.rb#49 + def add(client); end + + # Run the internal select loop, using a background thread by default. + # + # source://puma//lib/puma/reactor.rb#35 + def run(background = T.unsafe(nil)); end + + # Shutdown the reactor, blocking until the background thread is finished. + # + # source://puma//lib/puma/reactor.rb#58 + def shutdown; end + + private + + # Start monitoring the object. + # + # source://puma//lib/puma/reactor.rb#109 + def register(client); end + + # source://puma//lib/puma/reactor.rb#69 + def select_loop; end + + # 'Wake up' a monitored object by calling the provided block. + # Stop monitoring the object if the block returns `true`. + # + # source://puma//lib/puma/reactor.rb#118 + def wakeup!(client); end +end + +# The methods here are included in Server, but are separated into this file. +# All the methods here pertain to passing the request to the app, then +# writing the response back to the client. +# +# None of the methods here are called externally, with the exception of +# #handle_request, which is called in Server#process_client. +# +# @version 5.0.3 +# +# source://puma//lib/puma/request.rb#15 +module Puma::Request + include ::Puma::Const + + # @param env [Hash] see Puma::Client#env, from request + # @return [Puma::Const::PORT_443, Puma::Const::PORT_80] + # + # source://puma//lib/puma/request.rb#268 + def default_server_port(env); end + + # Takes the request contained in +client+, invokes the Rack application to construct + # the response and writes it back to +client.io+. + # + # It'll return +false+ when the connection is closed, this doesn't mean + # that the response wasn't successful. + # + # It'll return +:async+ if the connection remains open but will be handled + # elsewhere, i.e. the connection has been hijacked by the Rack application. + # + # Finally, it'll return +true+ on keep-alive connections. + # + # @param client [Puma::Client] + # @param requests [Integer] + # @return [Boolean, :async] + # + # source://puma//lib/puma/request.rb#50 + def handle_request(client, requests); end + + # Assembles the headers and prepares the body for actually sending the + # response via `#fast_write_response`. + # + # @param status [Integer] the status returned by the Rack application + # @param headers [Hash] the headers returned by the Rack application + # @param res_body [Array] the body returned by the Rack application or + # a call to `Server#lowlevel_error` + # @param requests [Integer] number of inline requests handled + # @param client [Puma::Client] + # @return [Boolean, :async] keep-alive status or `:async` + # + # source://puma//lib/puma/request.rb#157 + def prepare_response(status, headers, res_body, requests, client); end + + private + + # Used to write headers and body. + # Writes to a socket (normally `Client#io`) using `#fast_write_str`. + # Accumulates `body` items into `io_buffer`, then writes to socket. + # + # @param socket [#write] the response socket + # @param body [Enumerable, File] the body object + # @param io_buffer [Puma::IOBuffer] contains headers + # @param chunked [Boolean] + # @raise [ConnectionError] + # + # source://puma//lib/puma/request.rb#312 + def fast_write_response(socket, body, io_buffer, chunked, content_length); end + + # Used to write 'early hints', 'no body' responses, 'hijacked' responses, + # and body segments (called by `fast_write_response`). + # Writes a string to a socket (normally `Client#io`) using `write_nonblock`. + # Large strings may not be written in one pass, especially if `io` is a + # `MiniSSL::Socket`. + # + # @param socket [#write_nonblock] the request/response socket + # @param str [String] the string written to the io + # @raise [ConnectionError] + # + # source://puma//lib/puma/request.rb#285 + def fast_write_str(socket, str); end + + # @param status [Integer] status from the app + # @return [String] the text description from Puma::HTTP_STATUS_CODES + # + # source://puma//lib/puma/request.rb#567 + def fetch_status_code(status); end + + # @param header_key [#to_s] + # @return [Boolean] + # + # source://puma//lib/puma/request.rb#480 + def illegal_header_key?(header_key); end + + # @param header_value [#to_s] + # @return [Boolean] + # + # source://puma//lib/puma/request.rb#487 + def illegal_header_value?(header_value); end + + # Given a Hash +env+ for the request read from +client+, add + # and fixup keys to comply with Rack's env guidelines. + # + # @param env [Hash] see Puma::Client#env, from request + # @param client [Puma::Client] only needed for Client#peerip + # + # source://puma//lib/puma/request.rb#403 + def normalize_env(env, client); end + + # Fixup any headers with `,` in the name to have `_` now. We emit + # headers with `,` in them during the parse phase to avoid ambiguity + # with the `-` to `_` conversion for critical headers. But here for + # compatibility, we'll convert them back. This code is written to + # avoid allocation in the common case (ie there are no headers + # with `,` in their names), that's why it has the extra conditionals. + # + # @note If a normalized version of a `,` header already exists, we ignore + # the `,` version. This prevents clobbering headers managed by proxies + # but not by clients (Like X-Forwarded-For). + # @param env [Hash] see Puma::Client#env, from request, modifies in place + # @version 5.0.3 + # + # source://puma//lib/puma/request.rb#506 + def req_env_post_parse(env); end + + # Used in the lambda for env[ `Puma::Const::EARLY_HINTS` ] + # + # @param headers [Hash] the headers returned by the Rack application + # @return [String] + # @version 5.0.3 + # + # source://puma//lib/puma/request.rb#546 + def str_early_hints(headers); end + + # Processes and write headers to the IOBuffer. + # + # @param env [Hash] see Puma::Client#env, from request + # @param status [Integer] the status returned by the Rack application + # @param headers [Hash] the headers returned by the Rack application + # @param content_length [Integer, nil] content length if it can be determined from the + # response body + # @param io_buffer [Puma::IOBuffer] modified inn place + # @param force_keep_alive [Boolean] 'anded' with keep_alive, based on system + # status and `@max_fast_inline` + # @return [Hash] resp_info + # @version 5.0.3 + # + # source://puma//lib/puma/request.rb#584 + def str_headers(env, status, headers, res_body, io_buffer, force_keep_alive); end +end + +# Single element array body: smaller bodies are written to io_buffer first, +# then a single write from io_buffer. Larger sizes are written separately. +# Also fixes max size of chunked file body read. +# +# source://puma//lib/puma/request.rb#20 +Puma::Request::BODY_LEN_MAX = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/request.rb#32 +Puma::Request::CUSTOM_STAT = T.let(T.unsafe(nil), String) + +# File body: smaller bodies are combined with io_buffer, then written to +# socket. Larger bodies are written separately using `copy_stream` +# +# source://puma//lib/puma/request.rb#24 +Puma::Request::IO_BODY_MAX = T.let(T.unsafe(nil), Integer) + +# Array body: elements are collected in io_buffer. When io_buffer's size +# exceeds value, they are written to the socket. +# +# source://puma//lib/puma/request.rb#28 +Puma::Request::IO_BUFFER_LEN_MAX = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/request.rb#30 +Puma::Request::SOCKET_WRITE_ERR_MSG = T.let(T.unsafe(nil), String) + +# Generic class that is used by `Puma::Cluster` and `Puma::Single` to +# serve requests. This class spawns a new instance of `Puma::Server` via +# a call to `start_server`. +# +# source://puma//lib/puma/runner.rb#10 +class Puma::Runner + # @return [Runner] a new instance of Runner + # + # source://puma//lib/puma/runner.rb#11 + def initialize(launcher); end + + # source://puma//lib/puma/runner.rb#172 + def app; end + + # @version 5.0.0 + # + # source://puma//lib/puma/runner.rb#89 + def close_control_listeners; end + + # source://puma//lib/puma/runner.rb#57 + def debug(str); end + + # @return [Boolean] + # + # source://puma//lib/puma/runner.rb#36 + def development?; end + + # source://puma//lib/puma/runner.rb#53 + def error(str); end + + # source://puma//lib/puma/runner.rb#155 + def load_and_bind; end + + # source://puma//lib/puma/runner.rb#44 + def log(str); end + + # Returns the hash of configuration options. + # + # @return [Puma::UserFileDefaultOptions] + # + # source://puma//lib/puma/runner.rb#25 + def options; end + + # source://puma//lib/puma/runner.rb#106 + def output_header(mode); end + + # source://puma//lib/puma/runner.rb#128 + def redirect_io; end + + # @return [Boolean] + # + # source://puma//lib/puma/runner.rb#124 + def redirected_io?; end + + # source://puma//lib/puma/runner.rb#94 + def ruby_engine; end + + # source://puma//lib/puma/runner.rb#61 + def start_control; end + + # source://puma//lib/puma/runner.rb#176 + def start_server; end + + # @version 5.0.0 + # + # source://puma//lib/puma/runner.rb#49 + def stop_control; end + + # @return [Boolean] + # + # source://puma//lib/puma/runner.rb#40 + def test?; end + + # source://puma//lib/puma/runner.rb#27 + def wakeup!; end + + private + + # this method call should always be guarded by `@log_writer.debug?` + # + # source://puma//lib/puma/runner.rb#207 + def debug_loaded_extensions(str); end + + # source://puma//lib/puma/runner.rb#183 + def ensure_output_directory_exists(path, io_name); end + + # source://puma//lib/puma/runner.rb#193 + def stats; end + + # source://puma//lib/puma/runner.rb#189 + def utc_iso8601(val); end +end + +# For some HTTP status codes the client only expects headers. +# +# source://puma//lib/puma/const.rb#84 +Puma::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# The HTTP Server itself. Serves out a single Rack app. +# +# This class is used by the `Puma::Single` and `Puma::Cluster` classes +# to generate one or more `Puma::Server` instances capable of handling requests. +# Each Puma process will contain one `Puma::Server` instance. +# +# The `Puma::Server` instance pulls requests from the socket, adds them to a +# `Puma::Reactor` where they get eventually passed to a `Puma::ThreadPool`. +# +# Each `Puma::Server` will have one reactor and one thread pool. +# +# source://puma//lib/puma/server.rb#31 +class Puma::Server + include ::Puma::Const + include ::Puma::Request + + # Create a server for the rack app +app+. + # + # +log_writer+ is a Puma::LogWriter object used to log info and error messages. + # + # +events+ is a Puma::Events object used to notify application status events. + # + # Server#run returns a thread that you can join on to wait for the server + # to do its work. + # + # @note Several instance variables exist so they are available for testing, + # and have default values set via +fetch+. Normally the values are set via + # `::Puma::Configuration.puma_default_options`. + # @note The `events` parameter is set to nil, and set to `Events.new` in code. + # Often `options` needs to be passed, but `events` does not. Using nil allows + # calling code to not require events.rb. + # @return [Server] a new instance of Server + # + # source://puma//lib/puma/server.rb#68 + def initialize(app, events = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://puma//lib/puma/server.rb#663 + def add_ssl_listener(host, port, ctx, optimize_for_latency = T.unsafe(nil), backlog = T.unsafe(nil)); end + + # source://puma//lib/puma/server.rb#659 + def add_tcp_listener(host, port, optimize_for_latency = T.unsafe(nil), backlog = T.unsafe(nil)); end + + # source://puma//lib/puma/server.rb#668 + def add_unix_listener(path, umask = T.unsafe(nil), mode = T.unsafe(nil), backlog = T.unsafe(nil)); end + + # Returns the value of attribute app. + # + # source://puma//lib/puma/server.rb#46 + def app; end + + # Sets the attribute app + # + # @param value the value to set the attribute app to. + # + # source://puma//lib/puma/server.rb#46 + def app=(_arg0); end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def auto_trim_time; end + + # source://puma//lib/puma/server.rb#210 + def backlog; end + + # source://puma//lib/puma/server.rb#635 + def begin_restart(sync = T.unsafe(nil)); end + + # Returns the value of attribute binder. + # + # source://puma//lib/puma/server.rb#47 + def binder; end + + # Sets the attribute binder + # + # @param value the value to set the attribute binder to. + # + # source://puma//lib/puma/server.rb#47 + def binder=(_arg0); end + + # Handle various error types thrown by Client I/O operations. + # + # source://puma//lib/puma/server.rb#528 + def client_error(e, client, requests = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://puma//lib/puma/server.rb#204 + def closed_socket?(socket); end + + # source://puma//lib/puma/server.rb#673 + def connected_ports; end + + # 6 == Socket::IPPROTO_TCP + # 3 == TCP_CORK + # 1/0 == turn on/off + # + # source://puma//lib/puma/server.rb#177 + def cork_socket(socket); end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def early_hints; end + + # Returns the value of attribute events. + # + # source://puma//lib/puma/server.rb#37 + def events; end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def first_data_timeout; end + + # Wait for all outstanding requests to finish. + # + # source://puma//lib/puma/server.rb#578 + def graceful_shutdown; end + + # source://puma//lib/puma/server.rb#630 + def halt(sync = T.unsafe(nil)); end + + # source://puma//lib/puma/server.rb#410 + def handle_check; end + + # source://puma//lib/puma/server.rb#312 + def handle_servers; end + + # source://puma//lib/puma/server.rb#126 + def inherit_binder(bind); end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def leak_stack_on_error; end + + # Returns the value of attribute log_writer. + # + # source://puma//lib/puma/server.rb#36 + def log_writer; end + + # A fallback rack response if +@app+ raises as exception. + # + # source://puma//lib/puma/server.rb#550 + def lowlevel_error(e, env, status = T.unsafe(nil)); end + + # for #stats + # + # source://puma//lib/puma/server.rb#38 + def max_threads; end + + # for #stats + # + # source://puma//lib/puma/server.rb#38 + def min_threads; end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def persistent_timeout; end + + # This number represents the number of requests that + # the server is capable of taking right now. + # + # For example if the number is 5 then it means + # there are 5 threads sitting idle ready to take + # a request. If one request comes in, then the + # value would be 4 until it finishes processing. + # + # source://puma//lib/puma/server.rb#228 + def pool_capacity; end + + # Given a connection on +client+, handle the incoming requests, + # or queue the connection in the Reactor if no request is available. + # + # This method is called from a ThreadPool worker thread. + # + # This method supports HTTP Keep-Alive so it may, depending on if the client + # indicates that it supports keep alive, wait for another request before + # returning. + # + # Return true if one or more requests were processed. + # + # source://puma//lib/puma/server.rb#438 + def process_client(client); end + + # This method is called from the Reactor thread when a queued Client receives data, + # times out, or when the Reactor is shutting down. + # + # It is responsible for ensuring that a request has been completely received + # before it starts to be processed by the ThreadPool. This may be known as read buffering. + # If read buffering is not done, and no other read buffering is performed (such as by an application server + # such as nginx) then the application would be subject to a slow client attack. + # + # For a graphical representation of how the request buffer works see [architecture.md](https://github.com/puma/puma/blob/master/docs/architecture.md#connection-pipeline). + # + # The method checks to see if it has the full header and body with + # the `Puma::Client#try_to_finish` method. If the full request has been sent, + # then the request is passed to the ThreadPool (`@thread_pool << client`) + # so that a "worker thread" can pick up the request and begin to execute application logic. + # The Client is then removed from the reactor (return `true`). + # + # If a client object times out, a 408 response is written, its connection is closed, + # and the object is removed from the reactor (return `true`). + # + # If the Reactor is shutting down, all Clients are either timed out or passed to the + # ThreadPool, depending on their current state (#can_close?). + # + # Otherwise, if the full request is not ready then the client will remain in the reactor + # (return `false`). When the client sends more data to the socket the `Puma::Client` object + # will wake up and again be checked to see if it's ready to be passed to the thread pool. + # + # source://puma//lib/puma/server.rb#296 + def reactor_wakeup(client); end + + # @todo the following may be deprecated in the future + # + # source://puma//lib/puma/server.rb#42 + def reaping_time; end + + # @version 5.0.0 + # + # source://puma//lib/puma/server.rb#39 + def requests_count; end + + # Runs the server. + # + # If +background+ is true (the default) then a thread is spun + # up in the background to handle requests. Otherwise requests + # are handled synchronously. + # + # source://puma//lib/puma/server.rb#238 + def run(background = T.unsafe(nil), thread_name: T.unsafe(nil)); end + + # source://puma//lib/puma/server.rb#215 + def running; end + + # @return [Boolean] + # + # source://puma//lib/puma/server.rb#640 + def shutting_down?; end + + # Returns a hash of stats about the running server for reporting purposes. + # + # @version 5.0.0 + # + # source://puma//lib/puma/server.rb#651 + def stats; end + + # Stops the acceptor thread and then causes the worker threads to finish + # off the request queue before finally exiting. + # + # source://puma//lib/puma/server.rb#625 + def stop(sync = T.unsafe(nil)); end + + # Returns the value of attribute thread. + # + # source://puma//lib/puma/server.rb#35 + def thread; end + + # source://puma//lib/puma/server.rb#180 + def uncork_socket(socket); end + + # Triggers a client timeout if the thread-pool shuts down + # during execution of the provided block. + # + # source://puma//lib/puma/server.rb#519 + def with_force_shutdown(client, &block); end + + private + + # source://puma//lib/puma/server.rb#607 + def notify_safely(message); end + + # source://puma//lib/puma/server.rb#569 + def response_to_error(client, requests, err, status_code); end + + class << self + # source://puma//lib/puma/server.rb#132 + def current; end + + private + + # @return [Boolean] + # @version 5.0.0 + # + # source://puma//lib/puma/server.rb#144 + def closed_socket_supported?; end + + # @return [Boolean] + # @version 5.0.0 + # + # source://puma//lib/puma/server.rb#138 + def tcp_cork_supported?; end + end +end + +# List of methods invoked by #stats. +# +# @version 5.0.0 +# +# source://puma//lib/puma/server.rb#646 +Puma::Server::STAT_METHODS = T.let(T.unsafe(nil), Array) + +# source://puma//lib/puma/server.rb#49 +Puma::Server::THREAD_LOCAL_KEY = T.let(T.unsafe(nil), Symbol) + +# This class is instantiated by the `Puma::Launcher` and used +# to boot and serve a Ruby application when no puma "workers" are needed +# i.e. only using "threaded" mode. For example `$ puma -t 1:5` +# +# At the core of this class is running an instance of `Puma::Server` which +# gets created via the `start_server` method from the `Puma::Runner` class +# that this inherits from. +# +# source://puma//lib/puma/single.rb#15 +class Puma::Single < ::Puma::Runner + # source://puma//lib/puma/single.rb#31 + def halt; end + + # source://puma//lib/puma/single.rb#23 + def restart; end + + # source://puma//lib/puma/single.rb#41 + def run; end + + # source://puma//lib/puma/single.rb#17 + def stats; end + + # source://puma//lib/puma/single.rb#27 + def stop; end + + # source://puma//lib/puma/single.rb#35 + def stop_blocked; end +end + +# Internal Docs for A simple thread pool management object. +# +# Each Puma "worker" has a thread pool to process requests. +# +# First a connection to a client is made in `Puma::Server`. It is wrapped in a +# `Puma::Client` instance and then passed to the `Puma::Reactor` to ensure +# the whole request is buffered into memory. Once the request is ready, it is passed into +# a thread pool via the `Puma::ThreadPool#<<` operator where it is stored in a `@todo` array. +# +# Each thread in the pool has an internal loop where it pulls a request from the `@todo` array +# and processes it. +# +# source://puma//lib/puma/thread_pool.rb#19 +class Puma::ThreadPool + # Maintain a minimum of +min+ and maximum of +max+ threads + # in the pool. + # + # The block passed is the work that will be performed in each + # thread. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://puma//lib/puma/thread_pool.rb#34 + def initialize(name, options = T.unsafe(nil), &block); end + + # Add +work+ to the todo list for a Thread to pickup and process. + # + # source://puma//lib/puma/thread_pool.rb#223 + def <<(work); end + + # source://puma//lib/puma/thread_pool.rb#365 + def auto_reap!(timeout = T.unsafe(nil)); end + + # source://puma//lib/puma/thread_pool.rb#360 + def auto_trim!(timeout = T.unsafe(nil)); end + + # How many objects have yet to be processed by the pool? + # + # source://puma//lib/puma/thread_pool.rb#90 + def backlog; end + + # @version 5.0.0 + # + # source://puma//lib/puma/thread_pool.rb#101 + def busy_threads; end + + # source://puma//lib/puma/thread_pool.rb#95 + def pool_capacity; end + + # If there are dead threads in the pool make them go away while decreasing + # spawned counter so that new healthy threads could be created again. + # + # source://puma//lib/puma/thread_pool.rb#318 + def reap; end + + # Tell all threads in the pool to exit and wait for them to finish. + # Wait +timeout+ seconds then raise +ForceShutdown+ in remaining threads. + # Next, wait an extra +@shutdown_grace_time+ seconds then force-kill remaining + # threads. Finally, wait 1 second for remaining threads to exit. + # + # source://puma//lib/puma/thread_pool.rb#388 + def shutdown(timeout = T.unsafe(nil)); end + + # Returns the value of attribute spawned. + # + # source://puma//lib/puma/thread_pool.rb#80 + def spawned; end + + # If there are any free threads in the pool, tell one to go ahead + # and exit. If +force+ is true, then a trim request is requested + # even if all threads are being utilized. + # + # source://puma//lib/puma/thread_pool.rb#306 + def trim(force = T.unsafe(nil)); end + + # Returns the value of attribute trim_requested. + # + # source://puma//lib/puma/thread_pool.rb#80 + def trim_requested; end + + # @version 5.0.0 + # + # source://puma//lib/puma/thread_pool.rb#282 + def wait_for_less_busy_worker(delay_s); end + + # This method is used by `Puma::Server` to let the server know when + # the thread pool can pull more requests from the socket and + # pass to the reactor. + # + # The general idea is that the thread pool can only work on a fixed + # number of requests at the same time. If it is already processing that + # number of requests then it is at capacity. If another Puma process has + # spare capacity, then the request can be left on the socket so the other + # worker can pick it up and process it. + # + # For example: if there are 5 threads, but only 4 working on + # requests, this method will not wait and the `Puma::Server` + # can pull a request right away. + # + # If there are 5 threads and all 5 of them are busy, then it will + # pause here, and wait until the `not_full` condition variable is + # signaled, usually this indicates that a request has been processed. + # + # It's important to note that even though the server might accept another + # request, it might not be added to the `@todo` array right away. + # For example if a slow client has only sent a header, but not a body + # then the `@todo` array would stay the same size as the reactor works + # to try to buffer the request. In that scenario the next call to this + # method would not block and another request would be added into the reactor + # by the server. This would continue until a fully buffered request + # makes it through the reactor and can then be processed by the thread pool. + # + # source://puma//lib/puma/thread_pool.rb#265 + def wait_until_not_full; end + + # Returns the value of attribute waiting. + # + # source://puma//lib/puma/thread_pool.rb#80 + def waiting; end + + # Allows ThreadPool::ForceShutdown to be raised within the + # provided block if the thread is forced to shutdown during execution. + # + # source://puma//lib/puma/thread_pool.rb#372 + def with_force_shutdown; end + + # @version 5.0.0 + # + # source://puma//lib/puma/thread_pool.rb#216 + def with_mutex(&block); end + + private + + # + # Must be called with @mutex held! + # + # source://puma//lib/puma/thread_pool.rb#109 + def spawn_thread; end + + # source://puma//lib/puma/thread_pool.rb#184 + def trigger_before_thread_exit_hooks; end + + # source://puma//lib/puma/thread_pool.rb#169 + def trigger_before_thread_start_hooks; end + + # @version 5.0.0 + # + # source://puma//lib/puma/thread_pool.rb#200 + def trigger_out_of_band_hook; end + + class << self + # source://puma//lib/puma/thread_pool.rb#82 + def clean_thread_locals; end + end +end + +# source://puma//lib/puma/thread_pool.rb#333 +class Puma::ThreadPool::Automaton + # @return [Automaton] a new instance of Automaton + # + # source://puma//lib/puma/thread_pool.rb#334 + def initialize(pool, timeout, thread_name, message); end + + # source://puma//lib/puma/thread_pool.rb#342 + def start!; end + + # source://puma//lib/puma/thread_pool.rb#354 + def stop; end +end + +# source://puma//lib/puma/thread_pool.rb#20 +class Puma::ThreadPool::ForceShutdown < ::RuntimeError; end + +# How long, after raising the ForceShutdown of a thread during +# forced shutdown mode, to wait for the thread to try and finish +# up its work before leaving the thread to die on the vine. +# +# source://puma//lib/puma/thread_pool.rb#26 +Puma::ThreadPool::SHUTDOWN_GRACE_TIME = T.let(T.unsafe(nil), Integer) + +# source://puma//lib/puma/plugin.rb#4 +class Puma::UnknownPlugin < ::RuntimeError; end + +# source://puma//lib/puma/reactor.rb#4 +class Puma::UnsupportedBackend < ::StandardError; end + +# source://puma//lib/puma/const.rb#5 +class Puma::UnsupportedOption < ::RuntimeError; end + +# A class used for storing "leveled" configuration options. +# +# In this class any "user" specified options take precedence over any +# "file" specified options, take precedence over any "default" options. +# +# User input is preferred over "defaults": +# user_options = { foo: "bar" } +# default_options = { foo: "zoo" } +# options = UserFileDefaultOptions.new(user_options, default_options) +# puts options[:foo] +# # => "bar" +# +# All values can be accessed via `all_of` +# +# puts options.all_of(:foo) +# # => ["bar", "zoo"] +# +# A "file" option can be set. This config will be preferred over "default" options +# but will defer to any available "user" specified options. +# +# user_options = { foo: "bar" } +# default_options = { rackup: "zoo.rb" } +# options = UserFileDefaultOptions.new(user_options, default_options) +# options.file_options[:rackup] = "sup.rb" +# puts options[:rackup] +# # => "sup.rb" +# +# The "default" options can be set via procs. These are resolved during runtime +# via calls to `finalize_values` +# +# source://puma//lib/puma/configuration.rb#38 +class Puma::UserFileDefaultOptions + # @return [UserFileDefaultOptions] a new instance of UserFileDefaultOptions + # + # source://puma//lib/puma/configuration.rb#39 + def initialize(user_options, default_options); end + + # source://puma//lib/puma/configuration.rb#47 + def [](key); end + + # source://puma//lib/puma/configuration.rb#51 + def []=(key, value); end + + # source://puma//lib/puma/configuration.rb#63 + def all_of(key); end + + # Returns the value of attribute default_options. + # + # source://puma//lib/puma/configuration.rb#45 + def default_options; end + + # source://puma//lib/puma/configuration.rb#55 + def fetch(key, default_value = T.unsafe(nil)); end + + # Returns the value of attribute file_options. + # + # source://puma//lib/puma/configuration.rb#45 + def file_options; end + + # source://puma//lib/puma/configuration.rb#87 + def final_options; end + + # source://puma//lib/puma/configuration.rb#79 + def finalize_values; end + + # Returns the value of attribute user_options. + # + # source://puma//lib/puma/configuration.rb#45 + def user_options; end +end + +# source://puma//lib/puma/util.rb#6 +module Puma::Util + private + + # source://puma//lib/puma/util.rb#24 + def escape(s, encoding = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&' + # and ';' characters. You can also use this to parse + # cookies by changing the characters used in the second + # parameter (which defaults to '&;'). + # + # source://puma//lib/puma/util.rb#49 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://puma//lib/puma/util.rb#9 + def pipe; end + + # An instance method on Thread has been provided to address https://bugs.ruby-lang.org/issues/13632, + # which currently effects some older versions of Ruby: 2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1 + # Additional context: https://github.com/puma/puma/pull/1345 + # + # source://puma//lib/puma/util.rb#16 + def purge_interrupt_queue; end + + # source://puma//lib/puma/util.rb#28 + def unescape(s, encoding = T.unsafe(nil)); end + + class << self + # source://puma//lib/puma/util.rb#24 + def escape(s, encoding = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&' + # and ';' characters. You can also use this to parse + # cookies by changing the characters used in the second + # parameter (which defaults to '&;'). + # + # source://puma//lib/puma/util.rb#49 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://puma//lib/puma/util.rb#9 + def pipe; end + + # An instance method on Thread has been provided to address https://bugs.ruby-lang.org/issues/13632, + # which currently effects some older versions of Ruby: 2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1 + # Additional context: https://github.com/puma/puma/pull/1345 + # + # source://puma//lib/puma/util.rb#16 + def purge_interrupt_queue; end + + # source://puma//lib/puma/util.rb#28 + def unescape(s, encoding = T.unsafe(nil)); end + end +end + +# source://puma//lib/puma/util.rb#42 +Puma::Util::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# A case-insensitive Hash that preserves the original case of a +# header when set. +# +# source://puma//lib/puma/util.rb#74 +class Puma::Util::HeaderHash < ::Hash + # @return [HeaderHash] a new instance of HeaderHash + # + # source://puma//lib/puma/util.rb#79 + def initialize(hash = T.unsafe(nil)); end + + # source://puma//lib/puma/util.rb#98 + def [](k); end + + # source://puma//lib/puma/util.rb#102 + def []=(k, v); end + + # source://puma//lib/puma/util.rb#109 + def delete(k); end + + # source://puma//lib/puma/util.rb#85 + def each; end + + # @return [Boolean] + # + # source://puma//lib/puma/util.rb#116 + def has_key?(k); end + + # @return [Boolean] + # + # source://puma//lib/puma/util.rb#116 + def include?(k); end + + # @return [Boolean] + # + # source://puma//lib/puma/util.rb#116 + def key?(k); end + + # @return [Boolean] + # + # source://puma//lib/puma/util.rb#116 + def member?(k); end + + # source://puma//lib/puma/util.rb#129 + def merge(other); end + + # source://puma//lib/puma/util.rb#124 + def merge!(other); end + + # source://puma//lib/puma/util.rb#134 + def replace(other); end + + # source://puma//lib/puma/util.rb#92 + def to_hash; end + + class << self + # source://puma//lib/puma/util.rb#75 + def new(hash = T.unsafe(nil)); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/raabro@1.4.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/raabro@1.4.0.rbi new file mode 100644 index 0000000..cab9afd --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/raabro@1.4.0.rbi @@ -0,0 +1,353 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `raabro` gem. +# Please instead update this file by running `bin/tapioca gem raabro`. + + +# source://raabro//lib/raabro.rb#3 +module Raabro + extend ::Raabro::ModuleMethods + + class << self + # source://raabro//lib/raabro.rb#596 + def included(target); end + + # Black 0;30 Dark Gray 1;30 + # Blue 0;34 Light Blue 1;34 + # Green 0;32 Light Green 1;32 + # Cyan 0;36 Light Cyan 1;36 + # Red 0;31 Light Red 1;31 + # Purple 0;35 Light Purple 1;35 + # Brown 0;33 Yellow 1;33 + # Light Gray 0;37 White 1;37 + # + # source://raabro//lib/raabro.rb#618 + def pp(tree, depth = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# source://raabro//lib/raabro.rb#7 +class Raabro::Input + # @return [Input] a new instance of Input + # + # source://raabro//lib/raabro.rb#12 + def initialize(string, offset = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#36 + def at(i); end + + # source://raabro//lib/raabro.rb#19 + def match(str_or_regex); end + + # Returns the value of attribute offset. + # + # source://raabro//lib/raabro.rb#9 + def offset; end + + # Sets the attribute offset + # + # @param value the value to set the attribute offset to. + # + # source://raabro//lib/raabro.rb#9 + def offset=(_arg0); end + + # Returns the value of attribute options. + # + # source://raabro//lib/raabro.rb#10 + def options; end + + # Returns the value of attribute string. + # + # source://raabro//lib/raabro.rb#9 + def string; end + + # Sets the attribute string + # + # @param value the value to set the attribute string to. + # + # source://raabro//lib/raabro.rb#9 + def string=(_arg0); end + + # source://raabro//lib/raabro.rb#31 + def tring(l = T.unsafe(nil)); end +end + +# source://raabro//lib/raabro.rb#240 +module Raabro::ModuleMethods + # source://raabro//lib/raabro.rb#242 + def _match(name, input, parter, regex_or_string); end + + # source://raabro//lib/raabro.rb#279 + def _narrow(parser); end + + # source://raabro//lib/raabro.rb#286 + def _parse(parser, input); end + + # source://raabro//lib/raabro.rb#265 + def _quantify(parser); end + + # source://raabro//lib/raabro.rb#438 + def all(name, input, parser); end + + # source://raabro//lib/raabro.rb#333 + def alt(name, input, *parsers); end + + # source://raabro//lib/raabro.rb#378 + def altg(name, input, *parsers); end + + # source://raabro//lib/raabro.rb#457 + def eseq(name, input, startpa, eltpa, seppa = T.unsafe(nil), endpa = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#457 + def jseq(name, input, startpa, eltpa, seppa = T.unsafe(nil), endpa = T.unsafe(nil)); end + + # Returns the value of attribute last. + # + # source://raabro//lib/raabro.rb#529 + def last; end + + # Sets the attribute last + # + # @param value the value to set the attribute last to. + # + # source://raabro//lib/raabro.rb#529 + def last=(_arg0); end + + # source://raabro//lib/raabro.rb#594 + def make_includable; end + + # source://raabro//lib/raabro.rb#531 + def method_added(name); end + + # source://raabro//lib/raabro.rb#422 + def nott(name, input, parser); end + + # source://raabro//lib/raabro.rb#540 + def parse(input, opts = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#413 + def ren(name, input, parser); end + + # source://raabro//lib/raabro.rb#413 + def rename(name, input, parser); end + + # source://raabro//lib/raabro.rb#383 + def rep(name, input, parser, min, max = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#568 + def reparse_for_error(input, opts, t); end + + # source://raabro//lib/raabro.rb#586 + def rewrite(tree); end + + # source://raabro//lib/raabro.rb#579 + def rewrite_(tree); end + + # source://raabro//lib/raabro.rb#260 + def rex(name, input, regex_or_string); end + + # source://raabro//lib/raabro.rb#295 + def seq(name, input, *parsers); end + + # source://raabro//lib/raabro.rb#255 + def str(name, input, string); end +end + +# source://raabro//lib/raabro.rb#42 +class Raabro::Tree + # @return [Tree] a new instance of Tree + # + # source://raabro//lib/raabro.rb#49 + def initialize(name, parter, input); end + + # source://raabro//lib/raabro.rb#60 + def c0; end + + # source://raabro//lib/raabro.rb#61 + def c1; end + + # source://raabro//lib/raabro.rb#62 + def c2; end + + # source://raabro//lib/raabro.rb#63 + def c3; end + + # source://raabro//lib/raabro.rb#64 + def c4; end + + # Returns the value of attribute children. + # + # source://raabro//lib/raabro.rb#47 + def children; end + + # Sets the attribute children + # + # @param value the value to set the attribute children to. + # + # source://raabro//lib/raabro.rb#47 + def children=(_arg0); end + + # source://raabro//lib/raabro.rb#65 + def clast; end + + # @return [Boolean] + # + # source://raabro//lib/raabro.rb#67 + def empty?; end + + # source://raabro//lib/raabro.rb#166 + def even_children; end + + # source://raabro//lib/raabro.rb#171 + def extract_error; end + + # source://raabro//lib/raabro.rb#112 + def gather(name = T.unsafe(nil), acc = T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://raabro//lib/raabro.rb#44 + def input; end + + # Sets the attribute input + # + # @param value the value to set the attribute input to. + # + # source://raabro//lib/raabro.rb#44 + def input=(_arg0); end + + # Returns the value of attribute length. + # + # source://raabro//lib/raabro.rb#46 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://raabro//lib/raabro.rb#46 + def length=(_arg0); end + + # source://raabro//lib/raabro.rb#216 + def line_and_column(offset); end + + # source://raabro//lib/raabro.rb#96 + def lookup(name = T.unsafe(nil)); end + + # Not "lookup all errors" but "lookup all error", in other + # words lookup the point up until which the parser stopped (not + # consuming all the input) + # + # source://raabro//lib/raabro.rb#208 + def lookup_all_error; end + + # source://raabro//lib/raabro.rb#193 + def lookup_error(stack = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://raabro//lib/raabro.rb#44 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://raabro//lib/raabro.rb#44 + def name=(_arg0); end + + # source://raabro//lib/raabro.rb#85 + def nonstring(l = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#161 + def odd_children; end + + # Returns the value of attribute offset. + # + # source://raabro//lib/raabro.rb#46 + def offset; end + + # Sets the attribute offset + # + # @param value the value to set the attribute offset to. + # + # source://raabro//lib/raabro.rb#46 + def offset=(_arg0); end + + # Returns the value of attribute parter. + # + # source://raabro//lib/raabro.rb#47 + def parter; end + + # Sets the attribute parter + # + # @param value the value to set the attribute parter to. + # + # source://raabro//lib/raabro.rb#47 + def parter=(_arg0); end + + # source://raabro//lib/raabro.rb#77 + def prune!; end + + # ((-1 error,)) 0 nomatch, 1 success + # + # source://raabro//lib/raabro.rb#45 + def result; end + + # ((-1 error,)) 0 nomatch, 1 success + # + # source://raabro//lib/raabro.rb#45 + def result=(_arg0); end + + # source://raabro//lib/raabro.rb#83 + def strim; end + + # source://raabro//lib/raabro.rb#87 + def strind; end + + # source://raabro//lib/raabro.rb#82 + def string; end + + # source://raabro//lib/raabro.rb#87 + def stringd; end + + # source://raabro//lib/raabro.rb#89 + def stringpd; end + + # source://raabro//lib/raabro.rb#83 + def strinp; end + + # source://raabro//lib/raabro.rb#89 + def strinpd; end + + # source://raabro//lib/raabro.rb#125 + def subgather(name = T.unsafe(nil), acc = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#105 + def sublookup(name = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#72 + def successful_children; end + + # source://raabro//lib/raabro.rb#93 + def symbod; end + + # source://raabro//lib/raabro.rb#92 + def symbol; end + + # source://raabro//lib/raabro.rb#93 + def symbold; end + + # source://raabro//lib/raabro.rb#132 + def to_a(opts = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#149 + def to_s(depth = T.unsafe(nil), io = T.unsafe(nil)); end + + # source://raabro//lib/raabro.rb#233 + def visual(line, column); end +end + +# source://raabro//lib/raabro.rb#5 +Raabro::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/racc@1.8.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/racc@1.8.1.rbi new file mode 100644 index 0000000..5d4f161 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/racc@1.8.1.rbi @@ -0,0 +1,162 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `racc` gem. +# Please instead update this file by running `bin/tapioca gem racc`. + + +# source://racc//lib/racc/parser.rb#19 +ParseError = Racc::ParseError + +# source://racc//lib/racc/info.rb#17 +Racc::Copyright = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#184 +class Racc::Parser + # source://racc//lib/racc/parser.rb#279 + def _racc_do_parse_rb(arg, in_debug); end + + # source://racc//lib/racc/parser.rb#479 + def _racc_do_reduce(arg, act); end + + # common + # + # source://racc//lib/racc/parser.rb#382 + def _racc_evalact(act, arg); end + + # source://racc//lib/racc/parser.rb#232 + def _racc_init_sysvars; end + + # source://racc//lib/racc/parser.rb#220 + def _racc_setup; end + + # source://racc//lib/racc/parser.rb#329 + def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # source://racc//lib/racc/parser.rb#262 + def do_parse; end + + # The method to fetch next token. + # If you use #do_parse method, you must implement #next_token. + # + # The format of return value is [TOKEN_SYMBOL, VALUE]. + # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT + # for 'IDENT'. ";" (String) for ';'. + # + # The final symbol (End of file) must be false. + # + # @raise [NotImplementedError] + # + # source://racc//lib/racc/parser.rb#275 + def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # @raise [ParseError] + # + # source://racc//lib/racc/parser.rb#535 + def on_error(t, val, vstack); end + + # source://racc//lib/racc/parser.rb#584 + def racc_accept; end + + # source://racc//lib/racc/parser.rb#589 + def racc_e_pop(state, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#596 + def racc_next_state(curstate, state); end + + # source://racc//lib/racc/parser.rb#602 + def racc_print_stacks(t, v); end + + # source://racc//lib/racc/parser.rb#611 + def racc_print_states(s); end + + # For debugging output + # + # source://racc//lib/racc/parser.rb#558 + def racc_read_token(t, tok, val); end + + # source://racc//lib/racc/parser.rb#571 + def racc_reduce(toks, sim, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#565 + def racc_shift(tok, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#618 + def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # source://racc//lib/racc/parser.rb#624 + def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # source://racc//lib/racc/parser.rb#548 + def yyaccept; end + + # Leave error recovering mode. + # + # source://racc//lib/racc/parser.rb#553 + def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # source://racc//lib/racc/parser.rb#542 + def yyerror; end + + # source://racc//lib/racc/parser.rb#324 + def yyparse(recv, mid); end + + class << self + # source://racc//lib/racc/parser.rb#216 + def racc_runtime_type; end + end +end + +# source://racc//lib/racc/parser.rb#205 +Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#207 +Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#187 +Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#208 +Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#186 +Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#206 +Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) + +# source://racc//lib/racc/parser.rb#181 +Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) + +# source://racc//lib/racc/info.rb#15 +Racc::VERSION = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/info.rb#16 +Racc::Version = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-session@2.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-session@2.0.0.rbi new file mode 100644 index 0000000..47eedb1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-session@2.0.0.rbi @@ -0,0 +1,727 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rack-session` gem. +# Please instead update this file by running `bin/tapioca gem rack-session`. + + +# source://rack-session//lib/rack/session/constants.rb#7 +module Rack + class << self + # source://rack/3.1.7/lib/rack/version.rb#18 + def release; end + end +end + +# source://rack-session//lib/rack/session/constants.rb#8 +module Rack::Session; end + +# source://rack-session//lib/rack/session/abstract/id.rb#47 +module Rack::Session::Abstract; end + +# source://rack-session//lib/rack/session/abstract/id.rb#497 +class Rack::Session::Abstract::ID < ::Rack::Session::Abstract::Persisted + # All thread safety and session destroy procedures should occur here. + # Should return a new session id or nil if options[:drop] + # + # source://rack-session//lib/rack/session/abstract/id.rb#527 + def delete_session(req, sid, options); end + + # All thread safety and session retrieval procedures should occur here. + # Should return [session_id, session]. + # If nil is provided as the session id, generation of a new valid id + # should occur within. + # + # source://rack-session//lib/rack/session/abstract/id.rb#512 + def find_session(req, sid); end + + # All thread safety and session storage procedures should occur here. + # Must return the session id if the session was saved successfully, or + # false if the session could not be saved. + # + # source://rack-session//lib/rack/session/abstract/id.rb#520 + def write_session(req, sid, session, options); end + + class << self + # @private + # + # source://rack-session//lib/rack/session/abstract/id.rb#498 + def inherited(klass); end + end +end + +# ID sets up a basic framework for implementing an id based sessioning +# service. Cookies sent to the client for maintaining sessions will only +# contain an id reference. Only #find_session, #write_session and +# #delete_session are required to be overwritten. +# +# All parameters are optional. +# * :key determines the name of the cookie, by default it is +# 'rack.session' +# * :path, :domain, :expire_after, :secure, :httponly, and :same_site set +# the related cookie options as by Rack::Response#set_cookie +# * :skip will not a set a cookie in the response nor update the session state +# * :defer will not set a cookie in the response but still update the session +# state if it is used with a backend +# * :renew (implementation dependent) will prompt the generation of a new +# session id, and migration of data to be referenced at the new id. If +# :defer is set, it will be overridden and the cookie will be set. +# * :sidbits sets the number of bits in length that a generated session +# id will be. +# +# These options can be set on a per request basis, at the location of +# env['rack.session.options']. Additionally the id of the +# session can be found within the options hash at the key :id. It is +# highly not recommended to change its value. +# +# Is Rack::Utils::Context compatible. +# +# Not included by default; you must require 'rack/session/abstract/id' +# to use. +# +# source://rack-session//lib/rack/session/abstract/id.rb#239 +class Rack::Session::Abstract::Persisted + # @return [Persisted] a new instance of Persisted + # + # source://rack-session//lib/rack/session/abstract/id.rb#256 + def initialize(app, options = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/abstract/id.rb#265 + def call(env); end + + # Acquires the session from the environment and the session id from + # the session options and passes them to #write_session. If successful + # and the :defer option is not true, a cookie will be added to the + # response with the session's id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#379 + def commit_session(req, res); end + + # source://rack-session//lib/rack/session/abstract/id.rb#269 + def context(env, app = T.unsafe(nil)); end + + # Returns the value of attribute default_options. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def default_options; end + + # Returns the value of attribute key. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def key; end + + # Returns the value of attribute same_site. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def same_site; end + + # Returns the value of attribute sid_secure. + # + # source://rack-session//lib/rack/session/abstract/id.rb#254 + def sid_secure; end + + private + + # Session should be committed if it was loaded, any of specific options like :renew, :drop + # or :expire_after was given and the security permissions match. Skips if skip is given. + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#348 + def commit_session?(req, session, options); end + + # source://rack-session//lib/rack/session/abstract/id.rb#414 + def cookie_value(data); end + + # Returns the current session id from the SessionHash. + # + # source://rack-session//lib/rack/session/abstract/id.rb#334 + def current_session_id(req); end + + # All thread safety and session destroy procedures should occur here. + # Should return a new session id or nil if options[:drop] + # + # source://rack-session//lib/rack/session/abstract/id.rb#453 + def delete_session(req, sid, options); end + + # Extract session id from request object. + # + # source://rack-session//lib/rack/session/abstract/id.rb#326 + def extract_session_id(request); end + + # All thread safety and session retrieval procedures should occur here. + # Should return [session_id, session]. + # If nil is provided as the session id, generation of a new valid id + # should occur within. + # + # source://rack-session//lib/rack/session/abstract/id.rb#438 + def find_session(env, sid); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#365 + def force_options?(options); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#361 + def forced_session_update?(session, options); end + + # Generate a new session id using Ruby #rand. The size of the + # session id is controlled by the :sidbits option. + # Monkey patch this to use custom methods for session id generation. + # + # source://rack-session//lib/rack/session/abstract/id.rb#294 + def generate_sid(secure = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/abstract/id.rb#284 + def initialize_sid; end + + # Extracts the session id from provided cookies and passes it and the + # environment to #find_session. + # + # source://rack-session//lib/rack/session/abstract/id.rb#318 + def load_session(req); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#357 + def loaded_session?(session); end + + # source://rack-session//lib/rack/session/abstract/id.rb#280 + def make_request(env); end + + # Sets the lazy session at 'rack.session' and places options and session + # metadata into 'rack.session.options'. + # + # source://rack-session//lib/rack/session/abstract/id.rb#307 + def prepare_session(req); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#369 + def security_matches?(request, options); end + + # Allow subclasses to prepare_session for different Session classes + # + # source://rack-session//lib/rack/session/abstract/id.rb#429 + def session_class; end + + # Check if the session exists or not. + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#340 + def session_exists?(req); end + + # Sets the cookie back to the client with session id. We skip the cookie + # setting if the value didn't change (sid is the same) or expires was given. + # + # source://rack-session//lib/rack/session/abstract/id.rb#421 + def set_cookie(request, response, cookie); end + + # All thread safety and session storage procedures should occur here. + # Must return the session id if the session was saved successfully, or + # false if the session could not be saved. + # + # source://rack-session//lib/rack/session/abstract/id.rb#446 + def write_session(req, sid, session, options); end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#240 +Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://rack-session//lib/rack/session/abstract/id.rb#458 +class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted + # source://rack-session//lib/rack/session/abstract/id.rb#481 + def extract_session_id(*_arg0); end + + # source://rack-session//lib/rack/session/abstract/id.rb#475 + def generate_sid(*_arg0); end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#492 + def cookie_value(data); end + + # source://rack-session//lib/rack/session/abstract/id.rb#488 + def session_class; end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#459 +class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash + # source://rack-session//lib/rack/session/abstract/id.rb#460 + def [](key); end +end + +# SessionHash is responsible to lazily load the session from store. +# +# source://rack-session//lib/rack/session/abstract/id.rb#50 +class Rack::Session::Abstract::SessionHash + include ::Enumerable + + # @return [SessionHash] a new instance of SessionHash + # + # source://rack-session//lib/rack/session/abstract/id.rb#68 + def initialize(store, req); end + + # source://rack-session//lib/rack/session/abstract/id.rb#88 + def [](key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#114 + def []=(key, value); end + + # source://rack-session//lib/rack/session/abstract/id.rb#120 + def clear; end + + # source://rack-session//lib/rack/session/abstract/id.rb#146 + def delete(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#125 + def destroy; end + + # source://rack-session//lib/rack/session/abstract/id.rb#93 + def dig(key, *keys); end + + # source://rack-session//lib/rack/session/abstract/id.rb#83 + def each(&block); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#169 + def empty?; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#159 + def exists?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#98 + def fetch(key, default = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def has_key?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#74 + def id; end + + # Sets the attribute id + # + # @param value the value to set the attribute id to. + # + # source://rack-session//lib/rack/session/abstract/id.rb#52 + def id=(_arg0); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def include?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#151 + def inspect; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#107 + def key?(key); end + + # source://rack-session//lib/rack/session/abstract/id.rb#174 + def keys; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#165 + def loaded?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#135 + def merge!(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#79 + def options; end + + # source://rack-session//lib/rack/session/abstract/id.rb#141 + def replace(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#114 + def store(key, value); end + + # source://rack-session//lib/rack/session/abstract/id.rb#130 + def to_hash; end + + # source://rack-session//lib/rack/session/abstract/id.rb#135 + def update(hash); end + + # source://rack-session//lib/rack/session/abstract/id.rb#179 + def values; end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#194 + def load!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#186 + def load_for_read!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#190 + def load_for_write!; end + + # source://rack-session//lib/rack/session/abstract/id.rb#200 + def stringify_keys(other); end + + class << self + # source://rack-session//lib/rack/session/abstract/id.rb#56 + def find(req); end + + # source://rack-session//lib/rack/session/abstract/id.rb#60 + def set(req, session); end + + # source://rack-session//lib/rack/session/abstract/id.rb#64 + def set_options(req, options); end + end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#54 +Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object) + +# Rack::Session::Cookie provides simple cookie based session management. +# By default, the session is a Ruby Hash that is serialized and encoded as +# a cookie set to :key (default: rack.session). +# +# This middleware accepts a :secrets option which enables encryption of +# session cookies. This option should be one or more random "secret keys" +# that are each at least 64 bytes in length. Multiple secret keys can be +# supplied in an Array, which is useful when rotating secrets. +# +# Several options are also accepted that are passed to Rack::Session::Encryptor. +# These options include: +# * :serialize_json +# Use JSON for message serialization instead of Marshal. This can be +# viewed as a security enhancement. +# * :gzip_over +# For message data over this many bytes, compress it with the deflate +# algorithm. +# +# Refer to Rack::Session::Encryptor for more details on these options. +# +# Prior to version TODO, the session hash was stored as base64 encoded +# marshalled data. When a :secret option was supplied, the integrity of the +# encoded data was protected with HMAC-SHA1. This functionality is still +# supported using a set of a legacy options. +# +# Lastly, a :coder option is also accepted. When used, both encryption and +# the legacy HMAC will be skipped. This option could create security issues +# in your application! +# +# Example: +# +# use Rack::Session::Cookie, { +# key: 'rack.session', +# domain: 'foo.com', +# path: '/', +# expire_after: 2592000, +# secrets: 'a randomly generated, raw binary string 64 bytes in size', +# } +# +# Example using legacy HMAC options: +# +# Rack::Session:Cookie.new(application, { +# # The secret used for legacy HMAC cookies, this enables the functionality +# legacy_hmac_secret: 'legacy secret', +# # legacy_hmac_coder will default to Rack::Session::Cookie::Base64::Marshal +# legacy_hmac_coder: Rack::Session::Cookie::Identity.new, +# # legacy_hmac will default to OpenSSL::Digest::SHA1 +# legacy_hmac: OpenSSL::Digest::SHA256 +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Rack::Session::Cookie::Identity.new +# }) +# +# +# Rack::Session::Cookie.new(application, { +# :coder => Class.new { +# def encode(str); str.reverse; end +# def decode(str); str.reverse; end +# }.new +# }) +# +# source://rack-session//lib/rack/session/cookie.rb#91 +class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure + # @return [Cookie] a new instance of Cookie + # + # source://rack-session//lib/rack/session/cookie.rb#159 + def initialize(app, options = T.unsafe(nil)); end + + # Returns the value of attribute coder. + # + # source://rack-session//lib/rack/session/cookie.rb#157 + def coder; end + + # Returns the value of attribute encryptors. + # + # source://rack-session//lib/rack/session/cookie.rb#157 + def encryptors; end + + private + + # source://rack-session//lib/rack/session/cookie.rb#277 + def delete_session(req, session_id, options); end + + # source://rack-session//lib/rack/session/cookie.rb#292 + def encode_session_data(session); end + + # source://rack-session//lib/rack/session/cookie.rb#209 + def extract_session_id(request); end + + # source://rack-session//lib/rack/session/cookie.rb#203 + def find_session(req, sid); end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/cookie.rb#282 + def legacy_digest_match?(data, digest); end + + # source://rack-session//lib/rack/session/cookie.rb#288 + def legacy_generate_hmac(data); end + + # source://rack-session//lib/rack/session/cookie.rb#250 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # Were consider "secure" if: + # * Encrypted cookies are enabled and one or more encryptor is + # initialized + # * The legacy HMAC option is enabled + # * Customer :coder is used, with :let_coder_handle_secure_encoding + # set to true + # + # @return [Boolean] + # + # source://rack-session//lib/rack/session/cookie.rb#306 + def secure?(options); end + + # source://rack-session//lib/rack/session/cookie.rb#213 + def unpacked_cookie_data(request); end + + # source://rack-session//lib/rack/session/cookie.rb#265 + def write_session(req, session_id, session, options); end +end + +# Encode session cookies as Base64 +# +# source://rack-session//lib/rack/session/cookie.rb#93 +class Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#98 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#94 + def encode(str); end +end + +# N.B. Unlike other encoding methods, the contained objects must be a +# valid JSON composite type, either a Hash or an Array. +# +# source://rack-session//lib/rack/session/cookie.rb#116 +class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#121 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#117 + def encode(obj); end +end + +# Encode session cookies as Marshaled Base64 data +# +# source://rack-session//lib/rack/session/cookie.rb#103 +class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#108 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#104 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#127 +class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64 + # source://rack-session//lib/rack/session/cookie.rb#132 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#128 + def encode(obj); end +end + +# Use no encoding for session cookies +# +# source://rack-session//lib/rack/session/cookie.rb#142 +class Rack::Session::Cookie::Identity + # source://rack-session//lib/rack/session/cookie.rb#144 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#143 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#147 +class Rack::Session::Cookie::Marshal + # source://rack-session//lib/rack/session/cookie.rb#152 + def decode(str); end + + # source://rack-session//lib/rack/session/cookie.rb#148 + def encode(str); end +end + +# source://rack-session//lib/rack/session/cookie.rb#256 +class Rack::Session::Cookie::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://rack-session//lib/rack/session/cookie.rb#259 + def initialize(session_id, cookie_value); end + + # Returns the value of attribute cookie_value. + # + # source://rack-session//lib/rack/session/cookie.rb#257 + def cookie_value; end +end + +# source://rack-session//lib/rack/session/encryptor.rb#16 +class Rack::Session::Encryptor + # The secret String must be at least 64 bytes in size. The first 32 bytes + # will be used for the encryption cipher key. The remainder will be used + # for an HMAC key. + # + # Options may include: + # * :serialize_json + # Use JSON for message serialization instead of Marshal. This can be + # viewed as a security enhancement. + # * :pad_size + # Pad encrypted message data, to a multiple of this many bytes + # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable + # padding. + # * :purpose + # Limit messages to a specific purpose. This can be viewed as a + # security enhancement to prevent message reuse from different contexts + # if keys are reused. + # + # Cryptography and Output Format: + # + # urlsafe_encode64(version + random_data + IV + encrypted data + HMAC) + # + # Where: + # * version - 1 byte and is currently always 0x01 + # * random_data - 32 bytes used for generating the per-message secret + # * IV - 16 bytes random initialization vector + # * HMAC - 32 bytes HMAC-SHA-256 of all preceding data, plus the purpose + # value + # + # @raise [ArgumentError] + # @return [Encryptor] a new instance of Encryptor + # + # source://rack-session//lib/rack/session/encryptor.rb#53 + def initialize(secret, opts = T.unsafe(nil)); end + + # source://rack-session//lib/rack/session/encryptor.rb#77 + def decrypt(base64_data); end + + # source://rack-session//lib/rack/session/encryptor.rb#102 + def encrypt(message); end + + private + + # source://rack-session//lib/rack/session/encryptor.rb#139 + def cipher_secret_from_message_secret(message_secret); end + + # source://rack-session//lib/rack/session/encryptor.rb#151 + def compute_signature(data); end + + # Return the deserialized message. The first 2 bytes will be read as the + # amount of padding. + # + # source://rack-session//lib/rack/session/encryptor.rb#182 + def deserialized_message(data); end + + # source://rack-session//lib/rack/session/encryptor.rb#129 + def new_cipher; end + + # source://rack-session//lib/rack/session/encryptor.rb#133 + def new_message_and_cipher_secret; end + + # Returns a serialized payload of the message. If a :pad_size is supplied, + # the message will be padded. The first 2 bytes of the returned string will + # indicating the amount of padding. + # + # source://rack-session//lib/rack/session/encryptor.rb#169 + def serialize_payload(message); end + + # source://rack-session//lib/rack/session/encryptor.rb#147 + def serializer; end + + # source://rack-session//lib/rack/session/encryptor.rb#143 + def set_cipher_key(cipher, key); end + + # @raise [InvalidMessage] + # + # source://rack-session//lib/rack/session/encryptor.rb#158 + def verify_authenticity!(data, signature); end +end + +# source://rack-session//lib/rack/session/encryptor.rb#17 +class Rack::Session::Encryptor::Error < ::StandardError; end + +# source://rack-session//lib/rack/session/encryptor.rb#23 +class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end + +# source://rack-session//lib/rack/session/encryptor.rb#20 +class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end + +# source://rack-session//lib/rack/session/constants.rb#9 +Rack::Session::RACK_SESSION = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/constants.rb#10 +Rack::Session::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/constants.rb#11 +Rack::Session::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String) + +# source://rack-session//lib/rack/session/abstract/id.rb#21 +class Rack::Session::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://rack-session//lib/rack/session/abstract/id.rb#26 + def initialize(public_id); end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def cookie_value; end + + # @return [Boolean] + # + # source://rack-session//lib/rack/session/abstract/id.rb#37 + def empty?; end + + # source://rack-session//lib/rack/session/abstract/id.rb#38 + def inspect; end + + # source://rack-session//lib/rack/session/abstract/id.rb#30 + def private_id; end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def public_id; end + + # Returns the value of attribute public_id. + # + # source://rack-session//lib/rack/session/abstract/id.rb#24 + def to_s; end + + private + + # source://rack-session//lib/rack/session/abstract/id.rb#42 + def hash_sid(sid); end +end + +# source://rack-session//lib/rack/session/abstract/id.rb#22 +Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-test@2.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-test@2.1.0.rbi new file mode 100644 index 0000000..426807a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack-test@2.1.0.rbi @@ -0,0 +1,747 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rack-test` gem. +# Please instead update this file by running `bin/tapioca gem rack-test`. + + +# source://rack-test//lib/rack/test/cookie_jar.rb#6 +module Rack + class << self + # source://rack/3.1.7/lib/rack/version.rb#18 + def release; end + end +end + +# For backwards compatibility with 1.1.0 and below +# +# source://rack-test//lib/rack/test.rb#381 +Rack::MockSession = Rack::Test::Session + +# source://rack-test//lib/rack/test/cookie_jar.rb#7 +module Rack::Test + class << self + # Whether the version of rack in use handles encodings. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test.rb#375 + def encoding_aware_strings?; end + end +end + +# Represents individual cookies in the cookie jar. This is considered private +# API and behavior of this class can change at any time. +# +# source://rack-test//lib/rack/test/cookie_jar.rb#10 +class Rack::Test::Cookie + include ::Rack::Utils + + # @return [Cookie] a new instance of Cookie + # + # source://rack-test//lib/rack/test/cookie_jar.rb#23 + def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end + + # Order cookies by name, path, and domain. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#107 + def <=>(other); end + + # The explicit or implicit domain for the cookie. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#59 + def domain; end + + # Whether the cookie has a value. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#54 + def empty?; end + + # Whether the cookie is currently expired. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#86 + def expired?; end + + # A Time value for when the cookie expires, if the expires option is set. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#81 + def expires; end + + # Whether the cookie has the httponly flag, indicating it is not available via + # a javascript API. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#71 + def http_only?; end + + # Cookies that do not match the URI will not be sent in requests to the URI. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#102 + def matches?(uri); end + + # The name of the cookie, will be a string + # + # source://rack-test//lib/rack/test/cookie_jar.rb#14 + def name; end + + # The explicit or implicit path for the cookie. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#76 + def path; end + + # The raw string for the cookie, without options. Will generally be in + # name=value format is name and value are provided. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#21 + def raw; end + + # Wether the given cookie can replace the current cookie in the cookie jar. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#49 + def replaces?(other); end + + # Whether the cookie has the secure flag, indicating it can only be sent over + # an encrypted connection. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#65 + def secure?; end + + # A hash of cookie options, including the cookie value, but excluding the cookie name. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#112 + def to_h; end + + # A hash of cookie options, including the cookie value, but excluding the cookie name. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#112 + def to_hash; end + + # Whether the cookie is valid for the given URI. + # + # @return [Boolean] + # + # source://rack-test//lib/rack/test/cookie_jar.rb#91 + def valid?(uri); end + + # The value of the cookie, will be a string or nil if there is no value. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#17 + def value; end + + private + + # The default URI to use for the cookie, including just the host. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#124 + def default_uri; end +end + +# Represents all cookies for a session, handling adding and +# removing cookies, and finding which cookies apply to a given +# request. This is considered private API and behavior of this +# class can change at any time. +# +# source://rack-test//lib/rack/test/cookie_jar.rb#133 +class Rack::Test::CookieJar + # @return [CookieJar] a new instance of CookieJar + # + # source://rack-test//lib/rack/test/cookie_jar.rb#136 + def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end + + # Add a Cookie to the cookie jar. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#198 + def <<(new_cookie); end + + # Return the value for first cookie with the given name, or nil + # if no such cookie exists. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#149 + def [](name); end + + # Set a cookie with the given name and value in the + # cookie jar. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#159 + def []=(name, value); end + + # Delete all cookies with the given name from the cookie jar. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#173 + def delete(name); end + + # Return a raw cookie string for the cookie header to + # use for the given URI. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#209 + def for(uri); end + + # Return the first cookie with the given name, or nil if + # no such cookie exists. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#165 + def get_cookie(name); end + + # Add a string of raw cookie information to the cookie jar, + # if the cookie is valid for the given URI. + # Cookies should be separated with a newline. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#183 + def merge(raw_cookies, uri = T.unsafe(nil)); end + + # Return a hash cookie names and cookie values for cookies in the jar. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#226 + def to_hash; end + + private + + # Yield each cookie that matches for the URI. + # + # The cookies are sorted by most specific first. So, we loop through + # all the cookies in order and add it to a hash by cookie name if + # the cookie can be sent to the current URI. It's added to the hash + # so that when we are done, the cookies will be unique by name and + # we'll have grabbed the most specific to the URI. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#245 + def each_cookie_for(uri); end + + # Ensure the copy uses a distinct cookies array. + # + # source://rack-test//lib/rack/test/cookie_jar.rb#142 + def initialize_copy(other); end +end + +# source://rack-test//lib/rack/test/cookie_jar.rb#134 +Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String) + +# The default host to use for requests, when a full URI is not +# provided. +# +# source://rack-test//lib/rack/test.rb#33 +Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# The ending boundary in multipart requests +# +# source://rack-test//lib/rack/test.rb#42 +Rack::Test::END_BOUNDARY = T.let(T.unsafe(nil), String) + +# The common base class for exceptions raised by Rack::Test +# +# source://rack-test//lib/rack/test.rb#45 +class Rack::Test::Error < ::StandardError; end + +# The default multipart boundary to use for multipart request bodies +# +# source://rack-test//lib/rack/test.rb#36 +Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# This module serves as the primary integration point for using Rack::Test +# in a testing environment. It depends on an app method being defined in the +# same context, and provides the Rack::Test API methods (see Rack::Test::Session +# for their documentation). It defines the following methods that are delegated +# to the current session: :request, :get, :post, :put, :patch, :delete, :options, +# :head, :custom_request, :follow_redirect!, :header, :env, :set_cookie, +# :clear_cookies, :authorize, :basic_authorize, :last_response, and :last_request. +# +# Example: +# +# class HomepageTest < Test::Unit::TestCase +# include Rack::Test::Methods +# +# def app +# MyApp +# end +# end +# +# source://rack-test//lib/rack/test/methods.rb#24 +module Rack::Test::Methods + extend ::Forwardable + + # Private accessor to avoid uninitialized instance variable warning in Ruby 2.* + # + # source://rack-test//lib/rack/test/methods.rb#90 + def _rack_test_current_session=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def authorize(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def basic_authorize(*args, **_arg1, &block); end + + # Create a new Rack::Test::Session for #app. + # + # source://rack-test//lib/rack/test/methods.rb#40 + def build_rack_test_session(_name); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def clear_cookies(*args, **_arg1, &block); end + + # Return the currently actively session. This is the session to + # which the delegated methods are sent. + # + # source://rack-test//lib/rack/test/methods.rb#55 + def current_session; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def custom_request(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def delete(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def env(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def follow_redirect!(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def get(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def head(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def header(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def last_request(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def last_response(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def options(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def patch(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def post(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def put(*args, **_arg1, &block); end + + # Return the existing session with the given name, or a new + # rack session. Always use a new session if name is nil. + # For backwards compatibility with older rack-test versions. + # + # source://rack-test//lib/rack/test/methods.rb#29 + def rack_mock_session(name = T.unsafe(nil)); end + + # Return the existing session with the given name, or a new + # rack session. Always use a new session if name is nil. + # + # source://rack-test//lib/rack/test/methods.rb#29 + def rack_test_session(name = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def request(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def set_cookie(*args, **_arg1, &block); end + + # Create a new session (or reuse an existing session with the given name), + # and make it the current session for the given block. + # + # source://rack-test//lib/rack/test/methods.rb#61 + def with_session(name); end + + private + + # Private accessor to avoid uninitialized instance variable warning in Ruby 2.* + # + # source://rack-test//lib/rack/test/methods.rb#90 + def _rack_test_current_session; end +end + +# The starting boundary in multipart requests +# +# source://rack-test//lib/rack/test.rb#39 +Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String) + +# Rack::Test::Session handles a series of requests issued to a Rack app. +# It keeps track of the cookies for the session, and allows for setting headers +# and a default rack environment that is used for future requests. +# +# Rack::Test::Session's methods are most often called through Rack::Test::Methods, +# which will automatically build a session when it's first used. +# +# source://rack-test//lib/rack/test.rb#53 +class Rack::Test::Session + include ::Rack::Utils + include ::Rack::Test::Utils + extend ::Forwardable + + # Creates a Rack::Test::Session for a given Rack app or Rack::Test::BasicSession. + # + # Note: Generally, you won't need to initialize a Rack::Test::Session directly. + # Instead, you should include Rack::Test::Methods into your testing context. + # (See README.rdoc for an example) + # + # The following methods are defined via metaprogramming: get, post, put, patch, + # delete, options, and head. Each method submits a request with the given request + # method, with the given URI and optional parameters and rack environment. + # Examples: + # + # # URI only: + # get("/") # GET / + # get("/?foo=bar") # GET /?foo=bar + # + # # URI and parameters + # get("/foo", 'bar'=>'baz') # GET /foo?bar=baz + # post("/foo", 'bar'=>'baz') # POST /foo (bar=baz in request body) + # + # # URI, parameters, and rack environment + # get("/bar", {}, 'CONTENT_TYPE'=>'foo') + # get("/bar", {'foo'=>'baz'}, 'HTTP_ACCEPT'=>'*') + # + # The above methods as well as #request and #custom_request store the Rack::Request + # submitted in #last_request. The methods store a Rack::MockResponse based on the + # response in #last_response. #last_response is also returned by the methods. + # If a block is given, #last_response is also yielded to the block. + # + # @return [Session] a new instance of Session + # + # source://rack-test//lib/rack/test.rb#99 + def initialize(app, default_host = T.unsafe(nil)); end + + # Run a block after the each request completes. + # + # source://rack-test//lib/rack/test.rb#118 + def after_request(&block); end + + # Set the username and password for HTTP Basic authorization, to be + # included in subsequent requests in the HTTP_AUTHORIZATION header. + # + # Example: + # basic_authorize "bryan", "secret" + # + # source://rack-test//lib/rack/test.rb#198 + def authorize(username, password); end + + # Set the username and password for HTTP Basic authorization, to be + # included in subsequent requests in the HTTP_AUTHORIZATION header. + # + # Example: + # basic_authorize "bryan", "secret" + # + # source://rack-test//lib/rack/test.rb#198 + def basic_authorize(username, password); end + + # Replace the current cookie jar with an empty cookie jar. + # + # source://rack-test//lib/rack/test.rb#123 + def clear_cookies; end + + # The Rack::Test::CookieJar for the cookies for the current session. + # + # source://rack-test//lib/rack/test.rb#67 + def cookie_jar; end + + # The Rack::Test::CookieJar for the cookies for the current session. + # + # source://rack-test//lib/rack/test.rb#67 + def cookie_jar=(_arg0); end + + # Issue a request using the given HTTP verb for the given URI, with optional + # params and rack environment. Example: + # + # custom_request "LINK", "/" + # + # source://rack-test//lib/rack/test.rb#160 + def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # The default host used for the session for when using paths for URIs. + # + # source://rack-test//lib/rack/test.rb#70 + def default_host; end + + # source://rack-test//lib/rack/test.rb#111 + def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # Set an entry in the rack environment to be included on all subsequent + # requests through the session. Use a value of nil to remove a previously + # value. Example: + # + # env "rack.session", {:csrf => 'token'} + # + # source://rack-test//lib/rack/test.rb#185 + def env(name, value); end + + # Rack::Test will not follow any redirects automatically. This method + # will follow the redirect returned (including setting the Referer header + # on the new request) in the last response. If the last response was not + # a redirect, an error will be raised. + # + # source://rack-test//lib/rack/test.rb#209 + def follow_redirect!; end + + # source://rack-test//lib/rack/test.rb#111 + def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # source://rack-test//lib/rack/test.rb#111 + def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # Set a header to be included on all subsequent requests through the + # session. Use a value of nil to remove a previously configured header. + # + # In accordance with the Rack spec, headers will be included in the Rack + # environment hash in HTTP_USER_AGENT form. Example: + # + # header "user-agent", "Firefox" + # + # source://rack-test//lib/rack/test.rb#173 + def header(name, value); end + + # Return the last request issued in the session. Raises an error if no + # requests have been sent yet. + # + # @raise [Error] + # + # source://rack-test//lib/rack/test.rb#134 + def last_request; end + + # Return the last response received in the session. Raises an error if + # no requests have been sent yet. + # + # @raise [Error] + # + # source://rack-test//lib/rack/test.rb#141 + def last_response; end + + # source://rack-test//lib/rack/test.rb#111 + def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # source://rack-test//lib/rack/test.rb#111 + def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # source://rack-test//lib/rack/test.rb#111 + def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # source://rack-test//lib/rack/test.rb#111 + def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end + + # Issue a request to the Rack app for the given URI and optional Rack + # environment. Example: + # + # request "/" + # + # source://rack-test//lib/rack/test.rb#150 + def request(uri, env = T.unsafe(nil), &block); end + + # Yield to the block, and restore the last request, last response, and + # cookie jar to the state they were prior to block execution upon + # exiting the block. + # + # source://rack-test//lib/rack/test.rb#240 + def restore_state; end + + # Set a cookie in the current cookie jar. + # + # source://rack-test//lib/rack/test.rb#128 + def set_cookie(cookie, uri = T.unsafe(nil)); end + + private + + # Append a string version of the query params to the array of query params. + # + # source://rack-test//lib/rack/test.rb#340 + def append_query_params(query_array, query_params); end + + # close() gets called automatically in newer Rack versions. + # + # source://rack-test//lib/rack/test.rb#266 + def close_body(body); end + + # Update environment to use based on given URI. + # + # source://rack-test//lib/rack/test.rb#293 + def env_for(uri, env); end + + # Return the multipart content type to use based on the environment. + # + # source://rack-test//lib/rack/test.rb#346 + def multipart_content_type(env); end + + # Normalize URI based on given URI/path and environment. + # + # source://rack-test//lib/rack/test.rb#271 + def parse_uri(path, env); end + + # Submit the request with the given URI and rack environment to + # the mock session. Returns and potentially yields the last response. + # + # @yield [@last_response] + # + # source://rack-test//lib/rack/test.rb#357 + def process_request(uri, env); end + + class << self + # source://rack-test//lib/rack/test.rb#57 + def new(app, default_host = T.unsafe(nil)); end + end +end + +# source://rack-test//lib/rack/test.rb#279 +Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# Wraps a Tempfile with a content type. Including one or more UploadedFile's +# in the params causes Rack::Test to build and issue a multipart request. +# +# Example: +# post "/photos", "file" => Rack::Test::UploadedFile.new("me.jpg", "image/jpeg") +# +# source://rack-test//lib/rack/test/uploaded_file.rb#14 +class Rack::Test::UploadedFile + # Creates a new UploadedFile instance. + # + # Arguments: + # content :: is a path to a file, or an {IO} or {StringIO} object representing the content. + # content_type :: MIME type of the file + # binary :: Whether the file should be set to binmode (content treated as binary). + # original_filename :: The filename to use for the file. Required if content is StringIO, optional override if not + # + # @return [UploadedFile] a new instance of UploadedFile + # + # source://rack-test//lib/rack/test/uploaded_file.rb#31 + def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end + + # Append to given buffer in 64K chunks to avoid multiple large + # copies of file data in memory. Rewind tempfile before and + # after to make sure all data in tempfile is appended to the + # buffer. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#60 + def append_to(buffer); end + + # The content type of the "uploaded" file + # + # source://rack-test//lib/rack/test/uploaded_file.rb#22 + def content_type; end + + # The content type of the "uploaded" file + # + # source://rack-test//lib/rack/test/uploaded_file.rb#22 + def content_type=(_arg0); end + + # The path to the tempfile. Will not work if the receiver's content is from a StringIO. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#46 + def local_path; end + + # Delegate all methods not handled to the tempfile. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#52 + def method_missing(method_name, *args, &block); end + + # The filename, *not* including the path, of the "uploaded" file + # + # source://rack-test//lib/rack/test/uploaded_file.rb#16 + def original_filename; end + + # The path to the tempfile. Will not work if the receiver's content is from a StringIO. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#46 + def path; end + + # The tempfile + # + # source://rack-test//lib/rack/test/uploaded_file.rb#19 + def tempfile; end + + private + + # Create a tempfile and copy the content from the given path into the tempfile, optionally renaming if + # original_filename has been set. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#98 + def initialize_from_file_path(path); end + + # Use the StringIO as the tempfile. + # + # @raise [ArgumentError] + # + # source://rack-test//lib/rack/test/uploaded_file.rb#90 + def initialize_from_stringio(stringio); end + + # @return [Boolean] + # + # source://rack-test//lib/rack/test/uploaded_file.rb#71 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Close and unlink the given file, used as a finalizer for the tempfile, + # if the tempfile is backed by a file in the filesystem. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#82 + def actually_finalize(file); end + + # A proc that can be used as a finalizer to close and unlink the tempfile. + # + # source://rack-test//lib/rack/test/uploaded_file.rb#76 + def finalize(file); end + end +end + +# source://rack-test//lib/rack/test/utils.rb#5 +module Rack::Test::Utils + include ::Rack::Utils + extend ::Rack::Utils + extend ::Rack::Test::Utils + + # Build a multipart body for the given params. + # + # @raise [ArgumentError] + # + # source://rack-test//lib/rack/test/utils.rb#34 + def build_multipart(params, _first = T.unsafe(nil), multipart = T.unsafe(nil)); end + + # Build a query string for the given value and prefix. The value + # can be an array or hash of parameters. + # + # source://rack-test//lib/rack/test/utils.rb#11 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + private + + # Append each multipart parameter value to the buffer. + # + # source://rack-test//lib/rack/test/utils.rb#100 + def _build_parts(buffer, parameters); end + + # Append the multipart fragment for a parameter that is a file upload to the buffer. + # + # source://rack-test//lib/rack/test/utils.rb#133 + def build_file_part(buffer, parameter_name, uploaded_file); end + + # Build the multipart content for uploading. + # + # source://rack-test//lib/rack/test/utils.rb#94 + def build_parts(buffer, parameters); end + + # Append the multipart fragment for a parameter that isn't a file upload to the buffer. + # + # source://rack-test//lib/rack/test/utils.rb#121 + def build_primitive_part(buffer, parameter_name, value); end + + # Return a flattened hash of parameter values based on the given params. + # + # source://rack-test//lib/rack/test/utils.rb#62 + def normalize_multipart_params(params, first = T.unsafe(nil)); end +end + +# source://rack-test//lib/rack/test/version.rb#3 +Rack::Test::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rack@3.1.7.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack@3.1.7.rbi new file mode 100644 index 0000000..0c5d709 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rack@3.1.7.rbi @@ -0,0 +1,4902 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rack` gem. +# Please instead update this file by running `bin/tapioca gem rack`. + + +# The Rack main module, serving as a namespace for all core Rack +# modules and classes. +# +# All modules meant for use in your application are autoloaded here, +# so it should be enough just to require 'rack' in your code. +# +# source://rack//lib/rack/version.rb#14 +module Rack + class << self + # Return the Rack release as a dotted string. + # + # source://rack//lib/rack/version.rb#18 + def release; end + end +end + +# source://rack//lib/rack.rb#60 +module Rack::Auth; end + +# Rack::Auth::AbstractHandler implements common authentication functionality. +# +# +realm+ should be set for all handlers. +# +# source://rack//lib/rack/auth/abstract/handler.rb#11 +class Rack::Auth::AbstractHandler + # @return [AbstractHandler] a new instance of AbstractHandler + # + # source://rack//lib/rack/auth/abstract/handler.rb#15 + def initialize(app, realm = T.unsafe(nil), &authenticator); end + + # Returns the value of attribute realm. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 + def realm; end + + # Sets the attribute realm + # + # @param value the value to set the attribute realm to. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 + def realm=(_arg0); end + + private + + # source://rack//lib/rack/auth/abstract/handler.rb#31 + def bad_request; end + + # source://rack//lib/rack/auth/abstract/handler.rb#22 + def unauthorized(www_authenticate = T.unsafe(nil)); end +end + +# source://rack//lib/rack/auth/abstract/request.rb#7 +class Rack::Auth::AbstractRequest + # @return [AbstractRequest] a new instance of AbstractRequest + # + # source://rack//lib/rack/auth/abstract/request.rb#9 + def initialize(env); end + + # source://rack//lib/rack/auth/abstract/request.rb#33 + def params; end + + # source://rack//lib/rack/auth/abstract/request.rb#25 + def parts; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#17 + def provided?; end + + # source://rack//lib/rack/auth/abstract/request.rb#13 + def request; end + + # source://rack//lib/rack/auth/abstract/request.rb#29 + def scheme; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#21 + def valid?; end + + private + + # source://rack//lib/rack/auth/abstract/request.rb#42 + def authorization_key; end +end + +# source://rack//lib/rack/auth/abstract/request.rb#40 +Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) + +# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. +# +# Initialize with the Rack application that you want protecting, +# and a block that checks if a username and password pair are valid. +# +# source://rack//lib/rack/auth/basic.rb#13 +class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler + # source://rack//lib/rack/auth/basic.rb#15 + def call(env); end + + private + + # source://rack//lib/rack/auth/basic.rb#34 + def challenge; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#38 + def valid?(auth); end +end + +# source://rack//lib/rack/auth/basic.rb#42 +class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#43 + def basic?; end + + # source://rack//lib/rack/auth/basic.rb#47 + def credentials; end + + # source://rack//lib/rack/auth/basic.rb#51 + def username; end +end + +# source://rack//lib/rack/builder.rb#6 +Rack::BUILDER_TOPLEVEL_BINDING = T.let(T.unsafe(nil), Proc) + +# Represents a 400 Bad Request error when input data fails to meet the +# requirements. +# +# source://rack//lib/rack/bad_request.rb#6 +module Rack::BadRequest; end + +# Proxy for response bodies allowing calling a block when +# the response body is closed (after the response has been fully +# sent to the client). +# +# source://rack//lib/rack/body_proxy.rb#7 +class Rack::BodyProxy + # Set the response body to wrap, and the block to call when the + # response has been fully sent. + # + # @return [BodyProxy] a new instance of BodyProxy + # + # source://rack//lib/rack/body_proxy.rb#10 + def initialize(body, &block); end + + # If not already closed, close the wrapped body and + # then call the block the proxy was initialized with. + # + # source://rack//lib/rack/body_proxy.rb#28 + def close; end + + # Whether the proxy is closed. The proxy starts as not closed, + # and becomes closed on the first call to close. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#40 + def closed?; end + + # Delegate missing methods to the wrapped body. + # + # source://rack//lib/rack/body_proxy.rb#45 + def method_missing(method_name, *args, **_arg2, &block); end + + private + + # Return whether the wrapped body responds to the method. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#17 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# Rack::Builder provides a domain-specific language (DSL) to construct Rack +# applications. It is primarily used to parse +config.ru+ files which +# instantiate several middleware and a final application which are hosted +# by a Rack-compatible web server. +# +# Example: +# +# app = Rack::Builder.new do +# use Rack::CommonLogger +# map "/ok" do +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# end +# +# run app +# +# Or +# +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# +# run app +# +# +use+ adds middleware to the stack, +run+ dispatches to an application. +# You can use +map+ to construct a Rack::URLMap in a convenient way. +# +# source://rack//lib/rack/builder.rb#36 +class Rack::Builder + # Initialize a new Rack::Builder instance. +default_app+ specifies the + # default application if +run+ is not called later. If a block + # is given, it is evaluated in the context of the instance. + # + # @return [Builder] a new instance of Builder + # + # source://rack//lib/rack/builder.rb#116 + def initialize(default_app = T.unsafe(nil), **options, &block); end + + # Call the Rack application generated by this builder instance. Note that + # this rebuilds the Rack application and runs the warmup code (if any) + # every time it is called, so it should not be used if performance is important. + # + # source://rack//lib/rack/builder.rb#276 + def call(env); end + + # Freeze the app (set using run) and all middleware instances when building the application + # in to_app. + # + # source://rack//lib/rack/builder.rb#259 + def freeze_app; end + + # Creates a route within the application. Routes under the mapped path will be sent to + # the Rack application specified by run inside the block. Other requests will be sent to the + # default application specified by run outside the block. + # + # class App + # def call(env) + # [200, {'content-type' => 'text/plain'}, ["Hello World"]] + # end + # end + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # run Heartbeat.new + # end + # run App.new + # end + # + # run app + # + # The +use+ method can also be used inside the block to specify middleware to run under a specific path: + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # use Middleware + # run Heartbeat.new + # end + # run App.new + # end + # + # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. + # + # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement + # outside the block. + # + # source://rack//lib/rack/builder.rb#252 + def map(path, &block); end + + # Any options provided to the Rack::Builder instance at initialization. + # These options can be server-specific. Some general options are: + # + # * +:isolation+: One of +process+, +thread+ or +fiber+. The execution + # isolation model to use. + # + # source://rack//lib/rack/builder.rb#132 + def options; end + + # Takes a block or argument that is an object that responds to #call and + # returns a Rack response. + # + # You can use a block: + # + # run do |env| + # [200, { "content-type" => "text/plain" }, ["Hello World!"]] + # end + # + # You can also provide a lambda: + # + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # You can also provide a class instance: + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # run Heartbeat.new + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/builder.rb#193 + def run(app = T.unsafe(nil), &block); end + + # Return the Rack application generated by this instance. + # + # source://rack//lib/rack/builder.rb#264 + def to_app; end + + # Specifies middleware to use in a stack. + # + # class Middleware + # def initialize(app) + # @app = app + # end + # + # def call(env) + # env["rack.some_header"] = "setting an example" + # @app.call(env) + # end + # end + # + # use Middleware + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # All requests through to this application will first be processed by the middleware class. + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + # + # source://rack//lib/rack/builder.rb#159 + def use(middleware, *args, **_arg2, &block); end + + # Takes a lambda or block that is used to warm-up the application. This block is called + # before the Rack application is returned by to_app. + # + # warmup do |app| + # client = Rack::MockRequest.new(app) + # client.get('/') + # end + # + # use SomeMiddleware + # run MyApp + # + # source://rack//lib/rack/builder.rb#209 + def warmup(prc = T.unsafe(nil), &block); end + + private + + # Generate a URLMap instance by generating new Rack applications for each + # map block in this instance. + # + # source://rack//lib/rack/builder.rb#284 + def generate_map(default_app, mapping); end + + class << self + # Create a new Rack::Builder instance and return the Rack application + # generated from it. + # + # source://rack//lib/rack/builder.rb#136 + def app(default_app = T.unsafe(nil), &block); end + + # Load the given file as a rackup file, treating the + # contents as if specified inside a Rack::Builder block. + # + # Ignores content in the file after +__END__+, so that + # use of +__END__+ will not result in a syntax error. + # + # Example config.ru file: + # + # $ cat config.ru + # + # use Rack::ContentLength + # require './app.rb' + # run App + # + # source://rack//lib/rack/builder.rb#87 + def load_file(path, **options); end + + # Evaluate the given +builder_script+ string in the context of + # a Rack::Builder block, returning a Rack application. + # + # source://rack//lib/rack/builder.rb#102 + def new_from_string(builder_script, path = T.unsafe(nil), **options); end + + # Parse the given config file to get a Rack application. + # + # If the config file ends in +.ru+, it is treated as a + # rackup file and the contents will be treated as if + # specified inside a Rack::Builder block. + # + # If the config file does not end in +.ru+, it is + # required and Rack will use the basename of the file + # to guess which constant will be the Rack application to run. + # + # Examples: + # + # Rack::Builder.parse_file('config.ru') + # # Rack application built using Rack::Builder.new + # + # Rack::Builder.parse_file('app.rb') + # # requires app.rb, which can be anywhere in Ruby's + # # load path. After requiring, assumes App constant + # # is a Rack application + # + # Rack::Builder.parse_file('./my_app.rb') + # # requires ./my_app.rb, which should be in the + # # process's current directory. After requiring, + # # assumes MyApp constant is a Rack application + # + # source://rack//lib/rack/builder.rb#65 + def parse_file(path, **options); end + end +end + +# https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom +# +# source://rack//lib/rack/builder.rb#39 +Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) + +# Response Header Keys +# +# source://rack//lib/rack/constants.rb#19 +Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#35 +Rack::CONNECT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#20 +Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#21 +Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# Rack::Cascade tries a request on several apps, and returns the +# first response that is not 404 or 405 (or in a list of configured +# status codes). If all applications tried return one of the configured +# status codes, return the last response. +# +# source://rack//lib/rack/cascade.rb#11 +class Rack::Cascade + # Set the apps to send requests to, and what statuses result in + # cascading. Arguments: + # + # apps: An enumerable of rack applications. + # cascade_for: The statuses to use cascading for. If a response is received + # from an app, the next app is tried. + # + # @return [Cascade] a new instance of Cascade + # + # source://rack//lib/rack/cascade.rb#21 + def initialize(apps, cascade_for = T.unsafe(nil)); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#56 + def <<(app); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#56 + def add(app); end + + # An array of applications to try in order. + # + # source://rack//lib/rack/cascade.rb#13 + def apps; end + + # Call each app in order. If the responses uses a status that requires + # cascading, try the next app. If all responses require cascading, + # return the response from the last app. + # + # source://rack//lib/rack/cascade.rb#32 + def call(env); end + + # Whether the given app is one of the apps to cascade to. + # + # @return [Boolean] + # + # source://rack//lib/rack/cascade.rb#61 + def include?(app); end +end + +# Rack::CommonLogger forwards every request to the given +app+, and +# logs a line in the +# {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] +# to the configured logger. +# +# source://rack//lib/rack/common_logger.rb#13 +class Rack::CommonLogger + # +logger+ can be any object that supports the +write+ or +<<+ methods, + # which includes the standard library Logger. These methods are called + # with a single string argument, the log message. + # If +logger+ is nil, CommonLogger will fall back env['rack.errors']. + # + # @return [CommonLogger] a new instance of CommonLogger + # + # source://rack//lib/rack/common_logger.rb#29 + def initialize(app, logger = T.unsafe(nil)); end + + # Log all requests in common_log format after a response has been + # returned. Note that if the app raises an exception, the request + # will not be logged, so if exception handling middleware are used, + # they should be loaded after this middleware. Additionally, because + # the logging happens after the request body has been fully sent, any + # exceptions raised during the sending of the response body will + # cause the request not to be logged. + # + # source://rack//lib/rack/common_logger.rb#41 + def call(env); end + + private + + # Attempt to determine the content length for the response to + # include it in the logged data. + # + # source://rack//lib/rack/common_logger.rb#83 + def extract_content_length(headers); end + + # Log the request to the configured logger. + # + # source://rack//lib/rack/common_logger.rb#52 + def log(env, status, response_headers, began_at); end +end + +# Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common +# +# lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 - +# +# %{%s - %s [%s] "%s %s%s %s" %d %s\n} % +# +# The actual format is slightly different than the above due to the +# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed +# time in seconds is included at the end. +# +# source://rack//lib/rack/common_logger.rb#23 +Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) + +# Middleware that enables conditional GET using if-none-match and +# if-modified-since. The application should set either or both of the +# last-modified or etag response headers according to RFC 2616. When +# either of the conditions is met, the response body is set to be zero +# length and the response status is set to 304 Not Modified. +# +# Applications that defer response body generation until the body's each +# message is received will avoid response body generation completely when +# a conditional GET matches. +# +# Adapted from Michael Klishin's Merb implementation: +# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb +# +# source://rack//lib/rack/conditional_get.rb#21 +class Rack::ConditionalGet + # @return [ConditionalGet] a new instance of ConditionalGet + # + # source://rack//lib/rack/conditional_get.rb#22 + def initialize(app); end + + # Return empty 304 response if the response has not been + # modified since the last request. + # + # source://rack//lib/rack/conditional_get.rb#28 + def call(env); end + + private + + # Whether the etag response header matches the if-none-match request header. + # If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#62 + def etag_matches?(none_match, headers); end + + # Return whether the response has not been modified since the + # last request. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#51 + def fresh?(env, headers); end + + # Whether the last-modified response header matches the if-modified-since + # request header. If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#68 + def modified_since?(modified_since, headers); end + + # Return a Time object for the given string (which should be in RFC2822 + # format), or nil if the string cannot be parsed. + # + # source://rack//lib/rack/conditional_get.rb#75 + def to_rfc2822(since); end +end + +# Rack::Config modifies the environment using the block given during +# initialization. +# +# Example: +# use Rack::Config do |env| +# env['my-key'] = 'some-value' +# end +# +# source://rack//lib/rack/config.rb#11 +class Rack::Config + # @return [Config] a new instance of Config + # + # source://rack//lib/rack/config.rb#12 + def initialize(app, &block); end + + # source://rack//lib/rack/config.rb#17 + def call(env); end +end + +# Sets the content-length header on responses that do not specify +# a content-length or transfer-encoding header. Note that this +# does not fix responses that have an invalid content-length +# header specified. +# +# source://rack//lib/rack/content_length.rb#12 +class Rack::ContentLength + include ::Rack::Utils + + # @return [ContentLength] a new instance of ContentLength + # + # source://rack//lib/rack/content_length.rb#15 + def initialize(app); end + + # source://rack//lib/rack/content_length.rb#19 + def call(env); end +end + +# Sets the content-type header on responses which don't have one. +# +# Builder Usage: +# use Rack::ContentType, "text/plain" +# +# When no content type argument is provided, "text/html" is the +# default. +# +# source://rack//lib/rack/content_type.rb#15 +class Rack::ContentType + include ::Rack::Utils + + # @return [ContentType] a new instance of ContentType + # + # source://rack//lib/rack/content_type.rb#18 + def initialize(app, content_type = T.unsafe(nil)); end + + # source://rack//lib/rack/content_type.rb#23 + def call(env); end +end + +# source://rack//lib/rack/constants.rb#32 +Rack::DELETE = T.let(T.unsafe(nil), String) + +# This middleware enables content encoding of http responses, +# usually for purposes of compression. +# +# Currently supported encodings: +# +# * gzip +# * identity (no transformation) +# +# This middleware automatically detects when encoding is supported +# and allowed. For example no encoding is made when a cache +# directive of 'no-transform' is present, when the response status +# code is one that doesn't allow an entity body, or when the body +# is empty. +# +# Note that despite the name, Deflater does not support the +deflate+ +# encoding. +# +# source://rack//lib/rack/deflater.rb#28 +class Rack::Deflater + # Creates Rack::Deflater middleware. Options: + # + # :if :: a lambda enabling / disabling deflation based on returned boolean value + # (e.g use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }). + # However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent, + # such as when it is an +IO+ instance. + # :include :: a list of content types that should be compressed. By default, all content types are compressed. + # :sync :: determines if the stream is going to be flushed after every chunk. Flushing after every chunk reduces + # latency for time-sensitive streaming applications, but hurts compression and throughput. + # Defaults to +true+. + # + # @return [Deflater] a new instance of Deflater + # + # source://rack//lib/rack/deflater.rb#39 + def initialize(app, options = T.unsafe(nil)); end + + # source://rack//lib/rack/deflater.rb#46 + def call(env); end + + private + + # Whether the body should be compressed. + # + # @return [Boolean] + # + # source://rack//lib/rack/deflater.rb#136 + def should_deflate?(env, status, headers, body); end +end + +# Body class used for gzip encoded responses. +# +# source://rack//lib/rack/deflater.rb#83 +class Rack::Deflater::GzipStream + # Initialize the gzip stream. Arguments: + # body :: Response body to compress with gzip + # mtime :: The modification time of the body, used to set the + # modification time in the gzip header. + # sync :: Whether to flush each gzip chunk as soon as it is ready. + # + # @return [GzipStream] a new instance of GzipStream + # + # source://rack//lib/rack/deflater.rb#92 + def initialize(body, mtime, sync); end + + # Close the original body if possible. + # + # source://rack//lib/rack/deflater.rb#128 + def close; end + + # Yield gzip compressed strings to the given block. + # + # source://rack//lib/rack/deflater.rb#99 + def each(&block); end + + # Call the block passed to #each with the gzipped data. + # + # source://rack//lib/rack/deflater.rb#123 + def write(data); end +end + +# source://rack//lib/rack/deflater.rb#85 +Rack::Deflater::GzipStream::BUFFER_LENGTH = T.let(T.unsafe(nil), Integer) + +# Rack::Directory serves entries below the +root+ given, according to the +# path info of the Rack request. If a directory is found, the file's contents +# will be presented in an html based index. If a file is found, the env will +# be passed to the specified +app+. +# +# If +app+ is not specified, a Rack::Files of the same +root+ will be used. +# +# source://rack//lib/rack/directory.rb#19 +class Rack::Directory + # Set the root directory and application for serving files. + # + # @return [Directory] a new instance of Directory + # + # source://rack//lib/rack/directory.rb#83 + def initialize(root, app = T.unsafe(nil)); end + + # source://rack//lib/rack/directory.rb#89 + def call(env); end + + # Rack response to use for requests with invalid paths, or nil if path is valid. + # + # source://rack//lib/rack/directory.rb#109 + def check_bad_request(path_info); end + + # Rack response to use for requests with paths outside the root, or nil if path is inside the root. + # + # source://rack//lib/rack/directory.rb#119 + def check_forbidden(path_info); end + + # Rack response to use for unreadable and non-file, non-directory entries. + # + # source://rack//lib/rack/directory.rb#181 + def entity_not_found(path_info); end + + # Provide human readable file sizes + # + # source://rack//lib/rack/directory.rb#197 + def filesize_format(int); end + + # Internals of request handling. Similar to call but does + # not remove body for HEAD requests. + # + # source://rack//lib/rack/directory.rb#96 + def get(env); end + + # Rack response to use for directories under the root. + # + # source://rack//lib/rack/directory.rb#130 + def list_directory(path_info, path, script_name); end + + # Rack response to use for files and directories under the root. + # Unreadable and non-file, non-directory entries will get a 404 response. + # + # source://rack//lib/rack/directory.rb#171 + def list_path(env, path, path_info, script_name); end + + # The root of the directory hierarchy. Only requests for files and + # directories inside of the root directory are supported. + # + # source://rack//lib/rack/directory.rb#80 + def root; end + + # File::Stat for the given path, but return nil for missing/bad entries. + # + # source://rack//lib/rack/directory.rb#163 + def stat(path); end +end + +# source://rack//lib/rack/directory.rb#20 +Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#43 +Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#21 +Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) + +# Body class for directory entries, showing an index page with links +# to each file. +# +# source://rack//lib/rack/directory.rb#51 +class Rack::Directory::DirectoryBody < ::Struct + # Yield strings for each part of the directory entry + # + # @yield [DIR_PAGE_HEADER % [ show_path, show_path ]] + # + # source://rack//lib/rack/directory.rb#53 + def each; end + + private + + # Escape each element in the array of html strings. + # + # source://rack//lib/rack/directory.rb#73 + def DIR_FILE_escape(htmls); end +end + +# Stolen from Ramaze +# +# source://rack//lib/rack/directory.rb#189 +Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/constants.rb#22 +Rack::ETAG = T.let(T.unsafe(nil), String) + +# Automatically sets the etag header on all String bodies. +# +# The etag header is skipped if etag or last-modified headers are sent or if +# a sendfile body (body.responds_to :to_path) is given (since such cases +# should be handled by apache/nginx). +# +# On initialization, you can pass two parameters: a cache-control directive +# used when etag is absent and a directive when it is present. The first +# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" +# +# source://rack//lib/rack/etag.rb#18 +class Rack::ETag + # @return [ETag] a new instance of ETag + # + # source://rack//lib/rack/etag.rb#22 + def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end + + # source://rack//lib/rack/etag.rb#28 + def call(env); end + + private + + # source://rack//lib/rack/etag.rb#58 + def digest_body(body); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#50 + def etag_status?(status); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#54 + def skip_caching?(headers); end +end + +# source://rack//lib/rack/etag.rb#20 +Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/etag.rb#19 +Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#23 +Rack::EXPIRES = T.let(T.unsafe(nil), String) + +# This middleware provides hooks to certain places in the request / +# response lifecycle. This is so that middleware that don't need to filter +# the response data can safely leave it alone and not have to send messages +# down the traditional "rack stack". +# +# The events are: +# +# * on_start(request, response) +# +# This event is sent at the start of the request, before the next +# middleware in the chain is called. This method is called with a request +# object, and a response object. Right now, the response object is always +# nil, but in the future it may actually be a real response object. +# +# * on_commit(request, response) +# +# The response has been committed. The application has returned, but the +# response has not been sent to the webserver yet. This method is always +# called with a request object and the response object. The response +# object is constructed from the rack triple that the application returned. +# Changes may still be made to the response object at this point. +# +# * on_send(request, response) +# +# The webserver has started iterating over the response body and presumably +# has started sending data over the wire. This method is always called with +# a request object and the response object. The response object is +# constructed from the rack triple that the application returned. Changes +# SHOULD NOT be made to the response object as the webserver has already +# started sending data. Any mutations will likely result in an exception. +# +# * on_finish(request, response) +# +# The webserver has closed the response, and all data has been written to +# the response socket. The request and response object should both be +# read-only at this point. The body MAY NOT be available on the response +# object as it may have been flushed to the socket. +# +# * on_error(request, response, error) +# +# An exception has occurred in the application or an `on_commit` event. +# This method will get the request, the response (if available) and the +# exception that was raised. +# +# ## Order +# +# `on_start` is called on the handlers in the order that they were passed to +# the constructor. `on_commit`, on_send`, `on_finish`, and `on_error` are +# called in the reverse order. `on_finish` handlers are called inside an +# `ensure` block, so they are guaranteed to be called even if something +# raises an exception. If something raises an exception in a `on_finish` +# method, then nothing is guaranteed. +# +# source://rack//lib/rack/events.rb#61 +class Rack::Events + # @return [Events] a new instance of Events + # + # source://rack//lib/rack/events.rb#106 + def initialize(app, handlers); end + + # source://rack//lib/rack/events.rb#111 + def call(env); end + + private + + # source://rack//lib/rack/events.rb#149 + def make_request(env); end + + # source://rack//lib/rack/events.rb#153 + def make_response(status, headers, body); end + + # source://rack//lib/rack/events.rb#137 + def on_commit(request, response); end + + # source://rack//lib/rack/events.rb#133 + def on_error(request, response, e); end + + # source://rack//lib/rack/events.rb#145 + def on_finish(request, response); end + + # source://rack//lib/rack/events.rb#141 + def on_start(request, response); end +end + +# source://rack//lib/rack/events.rb#62 +module Rack::Events::Abstract + # source://rack//lib/rack/events.rb#66 + def on_commit(req, res); end + + # source://rack//lib/rack/events.rb#75 + def on_error(req, res, e); end + + # source://rack//lib/rack/events.rb#72 + def on_finish(req, res); end + + # source://rack//lib/rack/events.rb#69 + def on_send(req, res); end + + # source://rack//lib/rack/events.rb#63 + def on_start(req, res); end +end + +# source://rack//lib/rack/events.rb#95 +class Rack::Events::BufferedResponse < ::Rack::Response::Raw + # @return [BufferedResponse] a new instance of BufferedResponse + # + # source://rack//lib/rack/events.rb#98 + def initialize(status, headers, body); end + + # Returns the value of attribute body. + # + # source://rack//lib/rack/events.rb#96 + def body; end + + # source://rack//lib/rack/events.rb#103 + def to_a; end +end + +# source://rack//lib/rack/events.rb#79 +class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy + # @return [EventedBodyProxy] a new instance of EventedBodyProxy + # + # source://rack//lib/rack/events.rb#82 + def initialize(body, request, response, handlers, &block); end + + # source://rack//lib/rack/events.rb#89 + def each; end + + # Returns the value of attribute request. + # + # source://rack//lib/rack/events.rb#80 + def request; end + + # Returns the value of attribute response. + # + # source://rack//lib/rack/events.rb#80 + def response; end +end + +# Rack::Files serves files below the +root+ directory given, according to the +# path info of the Rack request. +# e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file +# as http://localhost:9292/passwd +# +# Handlers can detect if bodies are a Rack::Files, and use mechanisms +# like sendfile on the +path+. +# +# source://rack//lib/rack/files.rb#20 +class Rack::Files + # @return [Files] a new instance of Files + # + # source://rack//lib/rack/files.rb#27 + def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end + + # source://rack//lib/rack/files.rb#34 + def call(env); end + + # source://rack//lib/rack/files.rb#39 + def get(env); end + + # Returns the value of attribute root. + # + # source://rack//lib/rack/files.rb#25 + def root; end + + # source://rack//lib/rack/files.rb#68 + def serving(request, path); end + + private + + # source://rack//lib/rack/files.rb#190 + def fail(status, body, headers = T.unsafe(nil)); end + + # source://rack//lib/rack/files.rb#209 + def filesize(path); end + + # The MIME type for the contents of the file located at @path + # + # source://rack//lib/rack/files.rb#205 + def mime_type(path, default_mime); end +end + +# source://rack//lib/rack/files.rb#21 +Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/files.rb#22 +Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/files.rb#121 +class Rack::Files::BaseIterator + # @return [BaseIterator] a new instance of BaseIterator + # + # source://rack//lib/rack/files.rb#124 + def initialize(path, ranges, options); end + + # source://rack//lib/rack/files.rb#144 + def bytesize; end + + # source://rack//lib/rack/files.rb#153 + def close; end + + # source://rack//lib/rack/files.rb#130 + def each; end + + # Returns the value of attribute options. + # + # source://rack//lib/rack/files.rb#122 + def options; end + + # Returns the value of attribute path. + # + # source://rack//lib/rack/files.rb#122 + def path; end + + # Returns the value of attribute ranges. + # + # source://rack//lib/rack/files.rb#122 + def ranges; end + + private + + # source://rack//lib/rack/files.rb#171 + def each_range_part(file, range); end + + # @return [Boolean] + # + # source://rack//lib/rack/files.rb#157 + def multipart?; end + + # source://rack//lib/rack/files.rb#161 + def multipart_heading(range); end +end + +# source://rack//lib/rack/files.rb#184 +class Rack::Files::Iterator < ::Rack::Files::BaseIterator + # source://rack//lib/rack/files.rb#122 + def to_path; end +end + +# source://rack//lib/rack/files.rb#23 +Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# Rack::ForwardRequest gets caught by Rack::Recursive and redirects +# the current request to the app at +url+. +# +# raise ForwardRequest.new("/not-found") +# +# source://rack//lib/rack/recursive.rb#14 +class Rack::ForwardRequest < ::Exception + # @return [ForwardRequest] a new instance of ForwardRequest + # + # source://rack//lib/rack/recursive.rb#17 + def initialize(url, env = T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://rack//lib/rack/recursive.rb#15 + def env; end + + # Returns the value of attribute url. + # + # source://rack//lib/rack/recursive.rb#15 + def url; end +end + +# HTTP method verbs +# +# source://rack//lib/rack/constants.rb#28 +Rack::GET = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#33 +Rack::HEAD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#7 +Rack::HTTPS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#16 +Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) + +# Request env keys +# +# source://rack//lib/rack/constants.rb#5 +Rack::HTTP_HOST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#6 +Rack::HTTP_PORT = T.let(T.unsafe(nil), String) + +# Rack::Head returns an empty body for all HEAD requests. It leaves +# all other requests unchanged. +# +# source://rack//lib/rack/head.rb#9 +class Rack::Head + # @return [Head] a new instance of Head + # + # source://rack//lib/rack/head.rb#10 + def initialize(app); end + + # source://rack//lib/rack/head.rb#14 + def call(env); end +end + +# Rack::Headers is a Hash subclass that downcases all keys. It's designed +# to be used by rack applications that don't implement the Rack 3 SPEC +# (by using non-lowercase response header keys), automatically handling +# the downcasing of keys. +# +# source://rack//lib/rack/headers.rb#8 +class Rack::Headers < ::Hash + # source://rack//lib/rack/headers.rb#110 + def [](key); end + + # source://rack//lib/rack/headers.rb#114 + def []=(key, value); end + + # source://rack//lib/rack/headers.rb#119 + def assoc(key); end + + # @raise [TypeError] + # + # source://rack//lib/rack/headers.rb#123 + def compare_by_identity; end + + # source://rack//lib/rack/headers.rb#127 + def delete(key); end + + # source://rack//lib/rack/headers.rb#131 + def dig(key, *a); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#227 + def except(*a); end + + # source://rack//lib/rack/headers.rb#135 + def fetch(key, *default, &block); end + + # source://rack//lib/rack/headers.rb#140 + def fetch_values(*a); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#144 + def has_key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#144 + def include?(key); end + + # source://rack//lib/rack/headers.rb#151 + def invert; end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#144 + def key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#144 + def member?(key); end + + # source://rack//lib/rack/headers.rb#157 + def merge(hash, &block); end + + # source://rack//lib/rack/headers.rb#186 + def merge!(hash, &block); end + + # source://rack//lib/rack/headers.rb#161 + def reject(&block); end + + # source://rack//lib/rack/headers.rb#167 + def replace(hash); end + + # source://rack//lib/rack/headers.rb#172 + def select(&block); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#205 + def slice(*a); end + + # source://rack//lib/rack/headers.rb#114 + def store(key, value); end + + # source://rack//lib/rack/headers.rb#178 + def to_proc; end + + # source://rack//lib/rack/headers.rb#211 + def transform_keys(&block); end + + # source://rack//lib/rack/headers.rb#215 + def transform_keys!; end + + # source://rack//lib/rack/headers.rb#182 + def transform_values(&block); end + + # source://rack//lib/rack/headers.rb#186 + def update(hash, &block); end + + # source://rack//lib/rack/headers.rb#198 + def values_at(*keys); end + + private + + # source://rack//lib/rack/headers.rb#234 + def downcase_key(key); end + + class << self + # source://rack//lib/rack/headers.rb#91 + def [](*items); end + end +end + +# source://rack//lib/rack/headers.rb#9 +Rack::Headers::KNOWN_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/constants.rb#36 +Rack::LINK = T.let(T.unsafe(nil), String) + +# Rack::Lint validates your application and the requests and +# responses according to the Rack spec. +# +# source://rack//lib/rack/lint.rb#13 +class Rack::Lint + # @return [Lint] a new instance of Lint + # + # source://rack//lib/rack/lint.rb#19 + def initialize(app); end + + # AUTHORS: n.b. The trailing whitespace between paragraphs is important and + # should not be removed. The whitespace creates paragraphs in the RDoc + # output. + # + # This specification aims to formalize the Rack protocol. You + # can (and should) use Rack::Lint to enforce it. + # + # When you develop middleware, be sure to add a Lint before and + # after to catch all mistakes. + # + # = Rack applications + # + # A Rack application is a Ruby object (not a class) that + # responds to +call+. + # + # source://rack//lib/rack/lint.rb#40 + def call(env = T.unsafe(nil)); end +end + +# :stopdoc: +# +# source://rack//lib/rack/lint.rb#25 +class Rack::Lint::LintError < ::RuntimeError; end + +# source://rack//lib/rack/lint.rb#15 +Rack::Lint::REQUEST_PATH_ABSOLUTE_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/lint.rb#17 +Rack::Lint::REQUEST_PATH_ASTERISK_FORM = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/lint.rb#16 +Rack::Lint::REQUEST_PATH_AUTHORITY_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/lint.rb#14 +Rack::Lint::REQUEST_PATH_ORIGIN_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/lint.rb#44 +class Rack::Lint::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rack//lib/rack/lint.rb#45 + def initialize(app, env); end + + # ==== Streaming Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#939 + def call(stream); end + + # ==== The +content-length+ Header + # + # source://rack//lib/rack/lint.rb#757 + def check_content_length_header(status, headers); end + + # ==== The +content-type+ Header + # + # source://rack//lib/rack/lint.rb#741 + def check_content_type_header(status, headers); end + + # === Early Hints + # + # The application or any middleware may call the rack.early_hints + # with an object which would be valid as the headers of a Rack response. + # + # source://rack//lib/rack/lint.rb#657 + def check_early_hints(env); end + + # == The Environment + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#101 + def check_environment(env); end + + # === The Error Stream + # + # source://rack//lib/rack/lint.rb#531 + def check_error_stream(error); end + + # source://rack//lib/rack/lint.rb#731 + def check_header_value(key, value); end + + # === The Headers + # + # source://rack//lib/rack/lint.rb#691 + def check_headers(headers); end + + # === Hijacking + # + # The hijacking interfaces provides a means for an application to take + # control of the HTTP connection. There are two distinct hijack + # interfaces: full hijacking where the application takes over the raw + # connection, and partial hijacking where the application takes over + # just the response body stream. In both cases, the application is + # responsible for closing the hijacked stream. + # + # Full hijacking only works with HTTP/1. Partial hijacking is functionally + # equivalent to streaming bodies, and is still optionally supported for + # backwards compatibility with older Rack versions. + # + # ==== Full Hijack + # + # Full hijack is used to completely take over an HTTP/1 connection. It + # occurs before any headers are written and causes the request to + # ignores any response generated by the application. + # + # It is intended to be used when applications need access to raw HTTP/1 + # connection. + # + # source://rack//lib/rack/lint.rb#591 + def check_hijack(env); end + + # ==== Partial Hijack + # + # Partial hijack is used for bi-directional streaming of the request and + # response body. It occurs after the status and headers are written by + # the server and causes the server to ignore the Body of the response. + # + # It is intended to be used when applications need bi-directional + # streaming. + # + # source://rack//lib/rack/lint.rb#619 + def check_hijack_response(headers, env); end + + # === The Input Stream + # + # The input stream is an IO-like object which contains the raw HTTP + # POST data. + # + # source://rack//lib/rack/lint.rb#427 + def check_input_stream(input); end + + # ==== The +rack.protocol+ Header + # + # source://rack//lib/rack/lint.rb#785 + def check_rack_protocol_header(status, headers); end + + # == The Response + # + # === The Status + # + # source://rack//lib/rack/lint.rb#680 + def check_status(status); end + + # Setting this value informs the server that it should perform a + # connection upgrade. In HTTP/1, this is done using the +upgrade+ + # header. In HTTP/2, this is done by accepting the request. + # + # === The Body + # + # The Body is typically an +Array+ of +String+ instances, an enumerable + # that yields +String+ instances, a +Proc+ instance, or a File-like + # object. + # + # The Body must respond to +each+ or +call+. It may optionally respond + # to +to_path+ or +to_ary+. A Body that responds to +each+ is considered + # to be an Enumerable Body. A Body that responds to +call+ is considered + # to be a Streaming Body. + # + # A Body that responds to both +each+ and +call+ must be treated as an + # Enumerable Body, not a Streaming Body. If it responds to +each+, you + # must call +each+ and not +call+. If the Body doesn't respond to + # +each+, then you can assume it responds to +call+. + # + # The Body must either be consumed or returned. The Body is consumed by + # optionally calling either +each+ or +call+. + # Then, if the Body responds to +close+, it must be called to release + # any resources associated with the generation of the body. + # In other words, +close+ must always be called at least once; typically + # after the web server has sent the response to the client, but also in + # cases where the Rack application makes internal/virtual requests and + # discards the response. + # + # source://rack//lib/rack/lint.rb#831 + def close; end + + # ==== Enumerable Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#865 + def each; end + + # @return [Boolean] + # + # source://rack//lib/rack/lint.rb#910 + def respond_to?(name, *_arg1); end + + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#60 + def response; end + + # If the Body responds to +to_ary+, it must return an +Array+ whose + # contents are identical to that produced by calling +each+. + # Middleware may call +to_ary+ directly on the Body and return a new + # Body in its place. In other words, middleware can only process the + # Body directly if it responds to +to_ary+. If the Body responds to both + # +to_ary+ and +close+, its implementation of +to_ary+ must call + # +close+. + # + # source://rack//lib/rack/lint.rb#926 + def to_ary; end + + # source://rack//lib/rack/lint.rb#906 + def to_path; end + + # source://rack//lib/rack/lint.rb#770 + def verify_content_length(size); end + + # source://rack//lib/rack/lint.rb#847 + def verify_to_path; end +end + +# source://rack//lib/rack/lint.rb#904 +Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/lint.rb#540 +class Rack::Lint::Wrapper::ErrorWrapper + # @return [ErrorWrapper] a new instance of ErrorWrapper + # + # source://rack//lib/rack/lint.rb#541 + def initialize(error); end + + # * +close+ must never be called on the error stream. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#563 + def close(*args); end + + # * +flush+ must be called without arguments and must be called + # in order to make the error appear for sure. + # + # source://rack//lib/rack/lint.rb#558 + def flush; end + + # * +puts+ must be called with a single argument that responds to +to_s+. + # + # source://rack//lib/rack/lint.rb#546 + def puts(str); end + + # * +write+ must be called with a single argument that is a String. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#551 + def write(str); end +end + +# source://rack//lib/rack/lint.rb#445 +class Rack::Lint::Wrapper::InputWrapper + # @return [InputWrapper] a new instance of InputWrapper + # + # source://rack//lib/rack/lint.rb#446 + def initialize(input); end + + # * +close+ can be called on the input stream to indicate that + # any remaining input is not needed. + # + # source://rack//lib/rack/lint.rb#523 + def close(*args); end + + # * +each+ must be called without arguments and only yield Strings. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#511 + def each(*args); end + + # * +gets+ must be called without arguments and return a string, + # or +nil+ on EOF. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#452 + def gets(*args); end + + # * +read+ behaves like IO#read. + # Its signature is read([length, [buffer]]). + # + # If given, +length+ must be a non-negative Integer (>= 0) or +nil+, + # and +buffer+ must be a String and may not be nil. + # + # If +length+ is given and not nil, then this method reads at most + # +length+ bytes from the input stream. + # + # If +length+ is not given or nil, then this method reads + # all data until EOF. + # + # When EOF is reached, this method returns nil if +length+ is given + # and not nil, or "" if +length+ is not given or is nil. + # + # If +buffer+ is given, then the read data will be placed + # into +buffer+ instead of a newly created String object. + # + # source://rack//lib/rack/lint.rb#478 + def read(*args); end +end + +# source://rack//lib/rack/lint.rb#959 +class Rack::Lint::Wrapper::StreamWrapper + extend ::Forwardable + + # @return [StreamWrapper] a new instance of StreamWrapper + # + # source://rack//lib/rack/lint.rb#974 + def initialize(stream); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def <<(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def close(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def close_read(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def close_write(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def closed?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def flush(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def read(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def write(*args, **_arg1, &block); end +end + +# The semantics of these IO methods must be a best effort match to +# those of a normal Ruby IO or Socket object, using standard arguments +# and raising standard exceptions. Servers are encouraged to simply +# pass on real IO objects, although it is recognized that this approach +# is not directly compatible with HTTP/2. +# +# source://rack//lib/rack/lint.rb#967 +Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) + +# Rack::Lock locks every request inside a mutex, so that every request +# will effectively be executed synchronously. +# +# source://rack//lib/rack/lock.rb#8 +class Rack::Lock + # @return [Lock] a new instance of Lock + # + # source://rack//lib/rack/lock.rb#9 + def initialize(app, mutex = T.unsafe(nil)); end + + # source://rack//lib/rack/lock.rb#13 + def call(env); end + + private + + # source://rack//lib/rack/lock.rb#25 + def unlock; end +end + +# Sets up rack.logger to write to rack.errors stream +# +# source://rack//lib/rack/logger.rb#10 +class Rack::Logger + # @return [Logger] a new instance of Logger + # + # source://rack//lib/rack/logger.rb#11 + def initialize(app, level = T.unsafe(nil)); end + + # source://rack//lib/rack/logger.rb#15 + def call(env); end +end + +# Rack::MediaType parse media type and parameters out of content_type string +# +# source://rack//lib/rack/media_type.rb#6 +class Rack::MediaType + class << self + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/media_type.rb#30 + def params(content_type); end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/media_type.rb#16 + def type(content_type); end + + private + + # source://rack//lib/rack/media_type.rb#43 + def strip_doublequotes(str); end + end +end + +# source://rack//lib/rack/media_type.rb#7 +Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/method_override.rb#8 +class Rack::MethodOverride + # @return [MethodOverride] a new instance of MethodOverride + # + # source://rack//lib/rack/method_override.rb#15 + def initialize(app); end + + # source://rack//lib/rack/method_override.rb#19 + def call(env); end + + # source://rack//lib/rack/method_override.rb#31 + def method_override(env); end + + private + + # source://rack//lib/rack/method_override.rb#44 + def allowed_methods; end + + # source://rack//lib/rack/method_override.rb#48 + def method_override_param(req); end +end + +# source://rack//lib/rack/method_override.rb#13 +Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#9 +Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#12 +Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/method_override.rb#11 +Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/mime.rb#4 +module Rack::Mime + private + + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 + def mime_type(ext, fallback = T.unsafe(nil)); end + + class << self + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 + def mime_type(ext, fallback = T.unsafe(nil)); end + end +end + +# List of most common mime-types, selected various sources +# according to their usefulness in a webserving scope for Ruby +# users. +# +# To amend this list with your local mime.types list you can use: +# +# require 'webrick/httputils' +# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') +# Rack::Mime::MIME_TYPES.merge!(list) +# +# N.B. On Ubuntu the mime.types file does not include the leading period, so +# users may need to modify the data before merging into the hash. +# +# source://rack//lib/rack/mime.rb#51 +Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) + +# Rack::MockRequest helps testing your Rack application without +# actually using HTTP. +# +# After performing a request on a URL with get/post/put/patch/delete, it +# returns a MockResponse with useful helper methods for effective +# testing. +# +# You can pass a hash with additional configuration to the +# get/post/put/patch/delete. +# :input:: A String or IO-like to be used as rack.input. +# :fatal:: Raise a FatalWarning if the app writes to rack.errors. +# :lint:: If true, wrap the application in a Rack::Lint. +# +# source://rack//lib/rack/mock_request.rb#23 +class Rack::MockRequest + # @return [MockRequest] a new instance of MockRequest + # + # source://rack//lib/rack/mock_request.rb#44 + def initialize(app); end + + # Make a DELETE request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#57 + def delete(uri, opts = T.unsafe(nil)); end + + # Make a GET request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#49 + def get(uri, opts = T.unsafe(nil)); end + + # Make a HEAD request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#59 + def head(uri, opts = T.unsafe(nil)); end + + # Make an OPTIONS request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#61 + def options(uri, opts = T.unsafe(nil)); end + + # Make a PATCH request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#55 + def patch(uri, opts = T.unsafe(nil)); end + + # Make a POST request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#51 + def post(uri, opts = T.unsafe(nil)); end + + # Make a PUT request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#53 + def put(uri, opts = T.unsafe(nil)); end + + # Make a request using the given request method for the given + # uri to the rack application and return a MockResponse. + # Options given are passed to MockRequest.env_for. + # + # source://rack//lib/rack/mock_request.rb#66 + def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + class << self + # Return the Rack environment used for a request to +uri+. + # All options that are strings are added to the returned environment. + # Options: + # :fatal :: Whether to raise an exception if request outputs to rack.errors + # :input :: The rack.input to set + # :http_version :: The SERVER_PROTOCOL to set + # :method :: The HTTP request method to use + # :params :: The params to use + # :script_name :: The SCRIPT_NAME to set + # + # source://rack//lib/rack/mock_request.rb#98 + def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + # For historical reasons, we're pinning to RFC 2396. + # URI::Parser = URI::RFC2396_Parser + # + # source://rack//lib/rack/mock_request.rb#84 + def parse_uri_rfc2396(uri); end + end +end + +# source://rack//lib/rack/mock_request.rb#27 +class Rack::MockRequest::FatalWarner + # source://rack//lib/rack/mock_request.rb#36 + def flush; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#28 + def puts(warning); end + + # source://rack//lib/rack/mock_request.rb#39 + def string; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#32 + def write(warning); end +end + +# source://rack//lib/rack/mock_request.rb#24 +class Rack::MockRequest::FatalWarning < ::RuntimeError; end + +# Rack::MockResponse provides useful helpers for testing your apps. +# Usually, you don't create the MockResponse on your own, but use +# MockRequest. +# +# source://rack//lib/rack/mock_response.rb#13 +class Rack::MockResponse < ::Rack::Response + # @return [MockResponse] a new instance of MockResponse + # + # source://rack//lib/rack/mock_response.rb#24 + def initialize(status, headers, body, errors = T.unsafe(nil)); end + + # source://rack//lib/rack/mock_response.rb#39 + def =~(other); end + + # source://rack//lib/rack/mock_response.rb#47 + def body; end + + # source://rack//lib/rack/mock_response.rb#73 + def cookie(name); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 + def cookies; end + + # @return [Boolean] + # + # source://rack//lib/rack/mock_response.rb#69 + def empty?; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 + def errors; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 + def errors=(_arg0); end + + # source://rack//lib/rack/mock_response.rb#43 + def match(other); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 + def original_headers; end + + private + + # source://rack//lib/rack/mock_response.rb#100 + def identify_cookie_attributes(cookie_filling); end + + # source://rack//lib/rack/mock_response.rb#79 + def parse_cookies_from_header; end + + class << self + def [](*_arg0); end + end +end + +# A multipart form data parser, adapted from IOWA. +# +# Usually, Rack::Request#POST takes care of calling this. +# +# source://rack//lib/rack/multipart/parser.rb#9 +module Rack::Multipart + class << self + # source://rack//lib/rack/multipart.rb#72 + def build_multipart(params, first = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#68 + def extract_multipart(request, params = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#48 + def parse_multipart(env, params = T.unsafe(nil)); end + end +end + +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. +# +# source://rack//lib/rack/multipart/parser.rb#26 +class Rack::Multipart::BoundaryTooLongError < ::StandardError + include ::Rack::BadRequest +end + +# source://rack//lib/rack/multipart/parser.rb#33 +Rack::Multipart::EOL = T.let(T.unsafe(nil), String) + +# Use specific error class when parsing multipart request +# that ends early. +# +# source://rack//lib/rack/multipart/parser.rb#20 +class Rack::Multipart::EmptyContentError < ::EOFError + include ::Rack::BadRequest +end + +# Prefer to use the BoundaryTooLongError class or Rack::BadRequest. +# +# source://rack//lib/rack/multipart/parser.rb#31 +Rack::Multipart::Error = Rack::Multipart::BoundaryTooLongError + +# source://rack//lib/rack/multipart/generator.rb#7 +class Rack::Multipart::Generator + # @return [Generator] a new instance of Generator + # + # source://rack//lib/rack/multipart/generator.rb#8 + def initialize(params, first = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart/generator.rb#16 + def dump; end + + private + + # source://rack//lib/rack/multipart/generator.rb#89 + def content_for_other(file, name); end + + # source://rack//lib/rack/multipart/generator.rb#77 + def content_for_tempfile(io, file, name); end + + # source://rack//lib/rack/multipart/generator.rb#52 + def flattened_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/generator.rb#37 + def multipart?; end +end + +# source://rack//lib/rack/multipart/parser.rb#34 +Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart.rb#16 +Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#36 +Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#37 +Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#35 +Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart.rb#18 +class Rack::Multipart::MissingInputError < ::StandardError + include ::Rack::BadRequest +end + +# source://rack//lib/rack/multipart/parser.rb#10 +class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE + include ::Rack::BadRequest +end + +# source://rack//lib/rack/multipart/parser.rb#14 +class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError + include ::Rack::BadRequest +end + +# Accumulator for multipart form data, conforming to the QueryParser API. +# In future, the Parser could return the pair list directly, but that would +# change its API. +# +# source://rack//lib/rack/multipart.rb#25 +class Rack::Multipart::ParamList + # @return [ParamList] a new instance of ParamList + # + # source://rack//lib/rack/multipart.rb#34 + def initialize; end + + # source://rack//lib/rack/multipart.rb#38 + def <<(pair); end + + # source://rack//lib/rack/multipart.rb#42 + def to_params_hash; end + + class << self + # source://rack//lib/rack/multipart.rb#26 + def make_params; end + + # source://rack//lib/rack/multipart.rb#30 + def normalize_params(params, key, value); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#39 +class Rack::Multipart::Parser + # @return [Parser] a new instance of Parser + # + # source://rack//lib/rack/multipart/parser.rb#200 + def initialize(boundary, tempfile, bufsize, query_parser); end + + # source://rack//lib/rack/multipart/parser.rb#217 + def parse(io); end + + # source://rack//lib/rack/multipart/parser.rb#240 + def result; end + + # Returns the value of attribute state. + # + # source://rack//lib/rack/multipart/parser.rb#198 + def state; end + + private + + # Scan until the we find the start or end of the boundary. + # If we find it, return the appropriate symbol for the start or + # end of the boundary. If we don't find the start or end of the + # boundary, clear the buffer and return nil. + # + # source://rack//lib/rack/multipart/parser.rb#434 + def consume_boundary; end + + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/multipart/parser.rb#252 + def dequote(str); end + + # Return the related Encoding object. However, because + # enc is submitted by the user, it may be invalid, so + # use a binary encoding in that case. + # + # source://rack//lib/rack/multipart/parser.rb#489 + def find_encoding(enc); end + + # source://rack//lib/rack/multipart/parser.rb#294 + def handle_consume_token; end + + # source://rack//lib/rack/multipart/parser.rb#495 + def handle_empty_content!(content); end + + # This handles the initial parser state. We read until we find the starting + # boundary, then we can transition to the next state. If we find the ending + # boundary, this is an invalid multipart upload, but keep scanning for opening + # boundary in that case. If no boundary found, we need to keep reading data + # and retry. It's highly unlikely the initial read will not consume the + # boundary. The client would have to deliberately craft a response + # with the opening boundary beyond the buffer size for that to happen. + # + # source://rack//lib/rack/multipart/parser.rb#271 + def handle_fast_forward; end + + # source://rack//lib/rack/multipart/parser.rb#411 + def handle_mime_body; end + + # source://rack//lib/rack/multipart/parser.rb#306 + def handle_mime_head; end + + # source://rack//lib/rack/multipart/parser.rb#443 + def normalize_filename(filename); end + + # source://rack//lib/rack/multipart/parser.rb#258 + def read_data(io, outbuf); end + + # source://rack//lib/rack/multipart/parser.rb#456 + def tag_multipart_encoding(filename, content_type, name, body); end + + class << self + # source://rack//lib/rack/multipart/parser.rb#87 + def parse(io, content_length, content_type, tmpfile, bufsize, qp); end + + # source://rack//lib/rack/multipart/parser.rb#80 + def parse_boundary(content_type); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#40 +Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/multipart/parser.rb#48 +class Rack::Multipart::Parser::BoundedIO + # @return [BoundedIO] a new instance of BoundedIO + # + # source://rack//lib/rack/multipart/parser.rb#49 + def initialize(io, content_length); end + + # source://rack//lib/rack/multipart/parser.rb#55 + def read(size, outbuf = T.unsafe(nil)); end +end + +# source://rack//lib/rack/multipart/parser.rb#453 +Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#305 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_BYTES = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/multipart/parser.rb#304 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/multipart/parser.rb#107 +class Rack::Multipart::Parser::Collector + include ::Enumerable + + # @return [Collector] a new instance of Collector + # + # source://rack//lib/rack/multipart/parser.rb#143 + def initialize(tempfile); end + + # source://rack//lib/rack/multipart/parser.rb#149 + def each; end + + # source://rack//lib/rack/multipart/parser.rb#169 + def on_mime_body(mime_index, content); end + + # source://rack//lib/rack/multipart/parser.rb#173 + def on_mime_finish(mime_index); end + + # source://rack//lib/rack/multipart/parser.rb#153 + def on_mime_head(mime_index, head, filename, content_type, name); end + + private + + # source://rack//lib/rack/multipart/parser.rb#178 + def check_part_limits; end +end + +# source://rack//lib/rack/multipart/parser.rb#131 +class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#133 + def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#132 + def file?; end +end + +# source://rack//lib/rack/multipart/parser.rb#108 +class Rack::Multipart::Parser::Collector::MimePart < ::Struct + # @yield [data] + # + # source://rack//lib/rack/multipart/parser.rb#109 + def get_data; end +end + +# source://rack//lib/rack/multipart/parser.rb#136 +class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#138 + def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#137 + def file?; end +end + +# source://rack//lib/rack/multipart/parser.rb#78 +Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) + +# source://rack//lib/rack/multipart/parser.rb#77 +class Rack::Multipart::Parser::MultipartInfo < ::Struct + # Returns the value of attribute params + # + # @return [Object] the current value of params + def params; end + + # Sets the attribute params + # + # @param value [Object] the value to set the attribute params to. + # @return [Object] the newly set value + def params=(_); end + + # Returns the value of attribute tmp_files + # + # @return [Object] the current value of tmp_files + def tmp_files; end + + # Sets the attribute tmp_files + # + # @param value [Object] the value to set the attribute tmp_files to. + # @return [Object] the newly set value + def tmp_files=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#42 +Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) + +# source://rack//lib/rack/multipart/parser.rb#41 +Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/uploaded_file.rb#8 +class Rack::Multipart::UploadedFile + # @return [UploadedFile] a new instance of UploadedFile + # + # source://rack//lib/rack/multipart/uploaded_file.rb#16 + def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end + + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 + def content_type; end + + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 + def content_type=(_arg0); end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 + def local_path; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#40 + def method_missing(method_name, *args, &block); end + + # The filename, *not* including the path, of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#11 + def original_filename; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 + def path; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/uploaded_file.rb#36 + def respond_to?(*args); end +end + +# source://rack//lib/rack/null_logger.rb#6 +class Rack::NullLogger + # @return [NullLogger] a new instance of NullLogger + # + # source://rack//lib/rack/null_logger.rb#7 + def initialize(app); end + + # source://rack//lib/rack/null_logger.rb#45 + def <<(msg); end + + # source://rack//lib/rack/null_logger.rb#43 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#11 + def call(env); end + + # source://rack//lib/rack/null_logger.rb#42 + def close; end + + # source://rack//lib/rack/null_logger.rb#34 + def datetime_format; end + + # source://rack//lib/rack/null_logger.rb#39 + def datetime_format=(datetime_format); end + + # source://rack//lib/rack/null_logger.rb#17 + def debug(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#27 + def debug!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#23 + def debug?; end + + # source://rack//lib/rack/null_logger.rb#19 + def error(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#28 + def error!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#25 + def error?; end + + # source://rack//lib/rack/null_logger.rb#20 + def fatal(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#29 + def fatal!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#26 + def fatal?; end + + # source://rack//lib/rack/null_logger.rb#35 + def formatter; end + + # source://rack//lib/rack/null_logger.rb#40 + def formatter=(formatter); end + + # source://rack//lib/rack/null_logger.rb#16 + def info(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#30 + def info!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#22 + def info?; end + + # source://rack//lib/rack/null_logger.rb#32 + def level; end + + # source://rack//lib/rack/null_logger.rb#37 + def level=(level); end + + # source://rack//lib/rack/null_logger.rb#44 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#33 + def progname; end + + # source://rack//lib/rack/null_logger.rb#38 + def progname=(progname); end + + # source://rack//lib/rack/null_logger.rb#46 + def reopen(logdev = T.unsafe(nil)); end + + # source://rack//lib/rack/null_logger.rb#36 + def sev_threshold; end + + # source://rack//lib/rack/null_logger.rb#41 + def sev_threshold=(sev_threshold); end + + # source://rack//lib/rack/null_logger.rb#21 + def unknown(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#18 + def warn(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#31 + def warn!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#24 + def warn?; end +end + +# source://rack//lib/rack/constants.rb#34 +Rack::OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#31 +Rack::PATCH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#8 +Rack::PATH_INFO = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#29 +Rack::POST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#30 +Rack::PUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#12 +Rack::QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/query_parser.rb#7 +class Rack::QueryParser + # @return [QueryParser] a new instance of QueryParser + # + # source://rack//lib/rack/query_parser.rb#36 + def initialize(params_class, param_depth_limit); end + + # source://rack//lib/rack/query_parser.rb#166 + def make_params; end + + # source://rack//lib/rack/query_parser.rb#170 + def new_depth_limit(param_depth_limit); end + + # normalize_params recursively expands parameters into structural types. If + # the structural types represented by two different parameter names are in + # conflict, a ParameterTypeError is raised. The depth argument is deprecated + # and should no longer be used, it is kept for backwards compatibility with + # earlier versions of rack. + # + # source://rack//lib/rack/query_parser.rb#94 + def normalize_params(params, name, v, _depth = T.unsafe(nil)); end + + # Returns the value of attribute param_depth_limit. + # + # source://rack//lib/rack/query_parser.rb#34 + def param_depth_limit; end + + # parse_nested_query expands a query string into structural types. Supported + # types are Arrays, Hashes and basic value types. It is possible to supply + # query strings with parameters of conflicting types, in this case a + # ParameterTypeError is raised. Users are encouraged to return a 400 in this + # case. + # + # source://rack//lib/rack/query_parser.rb#73 + def parse_nested_query(qs, separator = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&'. You can also use this + # to parse cookies by changing the characters used in the second parameter + # (which defaults to '&'). + # + # source://rack//lib/rack/query_parser.rb#45 + def parse_query(qs, separator = T.unsafe(nil), &unescaper); end + + private + + # @raise [ParamsTooDeepError] + # + # source://rack//lib/rack/query_parser.rb#98 + def _normalize_params(params, name, v, depth); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#180 + def params_hash_has_key?(hash, key); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#176 + def params_hash_type?(obj); end + + # source://rack//lib/rack/query_parser.rb#192 + def unescape(string, encoding = T.unsafe(nil)); end + + class << self + # source://rack//lib/rack/query_parser.rb#30 + def make_default(param_depth_limit); end + end +end + +# source://rack//lib/rack/query_parser.rb#9 +Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/query_parser.rb#8 +Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# InvalidParameterError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain invalid format or byte +# sequence. +# +# source://rack//lib/rack/query_parser.rb#20 +class Rack::QueryParser::InvalidParameterError < ::ArgumentError + include ::Rack::BadRequest +end + +# ParameterTypeError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain conflicting types. +# +# source://rack//lib/rack/query_parser.rb#13 +class Rack::QueryParser::ParameterTypeError < ::TypeError + include ::Rack::BadRequest +end + +# source://rack//lib/rack/query_parser.rb#196 +class Rack::QueryParser::Params < ::Hash + def to_params_hash; end +end + +# ParamsTooDeepError is the error that is raised when params are recursively +# nested over the specified limit. +# +# source://rack//lib/rack/query_parser.rb#26 +class Rack::QueryParser::ParamsTooDeepError < ::RangeError + include ::Rack::BadRequest +end + +# source://rack//lib/rack/constants.rb#43 +Rack::RACK_EARLY_HINTS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#44 +Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#51 +Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#46 +Rack::RACK_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#52 +Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#45 +Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#66 +Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#54 +Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#55 +Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#53 +Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#62 +Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#63 +Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#61 +Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#58 +Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#57 +Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#59 +Rack::RACK_REQUEST_FORM_PAIRS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#60 +Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#64 +Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#65 +Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#56 +Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#47 +Rack::RACK_SESSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#48 +Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#49 +Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#42 +Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#50 +Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) + +# Rack environment variables +# +# source://rack//lib/rack/constants.rb#41 +Rack::RACK_VERSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/version.rb#15 +Rack::RELEASE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#9 +Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#10 +Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) + +# Rack::Recursive allows applications called down the chain to +# include data from other applications (by using +# rack['rack.recursive.include'][...] or raise a +# ForwardRequest to redirect internally. +# +# source://rack//lib/rack/recursive.rb#36 +class Rack::Recursive + # @return [Recursive] a new instance of Recursive + # + # source://rack//lib/rack/recursive.rb#37 + def initialize(app); end + + # source://rack//lib/rack/recursive.rb#45 + def _call(env); end + + # source://rack//lib/rack/recursive.rb#41 + def call(env); end + + # source://rack//lib/rack/recursive.rb#52 + def include(env, path); end +end + +# High performant source reloader +# +# This class acts as Rack middleware. +# +# What makes it especially suited for use in a production environment is that +# any file will only be checked once and there will only be made one system +# call stat(2). +# +# Please note that this will not reload files in the background, it does so +# only when actively called. +# +# It is performing a check/reload cycle at the start of every request, but +# also respects a cool down time, during which nothing will be done. +# +# source://rack//lib/rack/reloader.rb#24 +class Rack::Reloader + # @return [Reloader] a new instance of Reloader + # + # source://rack//lib/rack/reloader.rb#25 + def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end + + # source://rack//lib/rack/reloader.rb#36 + def call(env); end + + # source://rack//lib/rack/reloader.rb#50 + def reload!(stderr = T.unsafe(nil)); end + + # A safe Kernel::load, issuing the hooks depending on the results + # + # source://rack//lib/rack/reloader.rb#58 + def safe_load(file, mtime, stderr = T.unsafe(nil)); end +end + +# source://rack//lib/rack/reloader.rb#68 +module Rack::Reloader::Stat + # Takes a relative or absolute +file+ name, a couple possible +paths+ that + # the +file+ might reside in. Returns the full path and File::Stat for the + # path. + # + # source://rack//lib/rack/reloader.rb#88 + def figure_path(file, paths); end + + # source://rack//lib/rack/reloader.rb#69 + def rotation; end + + # source://rack//lib/rack/reloader.rb#103 + def safe_stat(file); end +end + +# Rack::Request provides a convenient interface to a Rack +# environment. It is stateless, the environment +env+ passed to the +# constructor will be directly modified. +# +# req = Rack::Request.new(env) +# req.post? +# req.params["data"] +# +# source://rack//lib/rack/request.rb#16 +class Rack::Request + include ::Rack::Request::Env + include ::Rack::Request::Helpers + + # @return [Request] a new instance of Request + # + # source://rack//lib/rack/request.rb#62 + def initialize(env); end + + # source://rack//lib/rack/request.rb#76 + def delete_param(k); end + + # source://rack//lib/rack/request.rb#67 + def params; end + + # source://rack//lib/rack/request.rb#67 + def query; end + + # source://rack//lib/rack/request.rb#71 + def update_param(k, v); end + + # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 + def version_supplied; end + + # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 + def version_supplied=(_arg0); end + + # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#96 + def xhr?; end + + class << self + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority; end + + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority=(_arg0); end + + # Returns the value of attribute ip_filter. + # + # source://rack//lib/rack/request.rb#18 + def ip_filter; end + + # Sets the attribute ip_filter + # + # @param value the value to set the attribute ip_filter to. + # + # source://rack//lib/rack/request.rb#18 + def ip_filter=(_arg0); end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority; end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority=(_arg0); end + end +end + +# source://rack//lib/rack/request.rb#60 +Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/request.rb#82 +module Rack::Request::Env + # source://rack//lib/rack/request.rb#86 + def initialize(env); end + + # Add a header that may have multiple values. + # + # Example: + # request.add_header 'Accept', 'image/png' + # request.add_header 'Accept', '*/*' + # + # assert_equal 'image/png,*/*', request.get_header('Accept') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # source://rack//lib/rack/request.rb#129 + def add_header(key, v); end + + # Delete a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#140 + def delete_header(name); end + + # Loops through each key / value pair in the request specific data. + # + # source://rack//lib/rack/request.rb#111 + def each_header(&block); end + + # The environment of the request. + # + # source://rack//lib/rack/request.rb#84 + def env; end + + # If a block is given, it yields to the block if the value hasn't been set + # on the request. + # + # source://rack//lib/rack/request.rb#106 + def fetch_header(name, &block); end + + # Get a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#100 + def get_header(name); end + + # Predicate method to test to see if `name` has been set as request + # specific data + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#95 + def has_header?(name); end + + # Set a request specific value for `name` to `v` + # + # source://rack//lib/rack/request.rb#116 + def set_header(name, v); end + + private + + # source://rack//lib/rack/request.rb#144 + def initialize_copy(other); end +end + +# source://rack//lib/rack/request.rb#149 +module Rack::Request::Helpers + # Returns the data received in the query string. + # + # source://rack//lib/rack/request.rb#484 + def GET; end + + # Returns the data received in the request body. + # + # This method support both application/x-www-form-urlencoded and + # multipart/form-data. + # + # source://rack//lib/rack/request.rb#503 + def POST; end + + # source://rack//lib/rack/request.rb#607 + def accept_encoding; end + + # source://rack//lib/rack/request.rb#611 + def accept_language; end + + # The authority of the incoming request as defined by RFC3976. + # https://tools.ietf.org/html/rfc3986#section-3.2 + # + # In HTTP/1, this is the `host` header. + # In HTTP/2, this is the `:authority` pseudo-header. + # + # source://rack//lib/rack/request.rb#266 + def authority; end + + # source://rack//lib/rack/request.rb#590 + def base_url; end + + # source://rack//lib/rack/request.rb#190 + def body; end + + # The character set of the request body if a "charset" media type + # parameter was given, or nil if no "charset" was specified. Note + # that, per RFC2616, text/* media types that specify no explicit + # charset are to be considered ISO-8859-1. + # + # source://rack//lib/rack/request.rb#458 + def content_charset; end + + # source://rack//lib/rack/request.rb#199 + def content_length; end + + # source://rack//lib/rack/request.rb#308 + def content_type; end + + # source://rack//lib/rack/request.rb#293 + def cookies; end + + # Checks the HTTP request method (or verb) to see if it was of type DELETE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#220 + def delete?; end + + # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. + # + # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works. + # + # env['rack.input'] is not touched. + # + # source://rack//lib/rack/request.rb#585 + def delete_param(k); end + + # Determine whether the request body contains form-data by checking + # the request content-type for one of the media-types: + # "application/x-www-form-urlencoded" or "multipart/form-data". The + # list of form-data media types can be modified through the + # +FORM_DATA_MEDIA_TYPES+ array. + # + # A request body is also assumed to contain form-data when no + # content-type header is provided and the request_method is POST. + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#470 + def form_data?; end + + # source://rack//lib/rack/request.rb#393 + def forwarded_authority; end + + # source://rack//lib/rack/request.rb#353 + def forwarded_for; end + + # source://rack//lib/rack/request.rb#374 + def forwarded_port; end + + # source://rack//lib/rack/request.rb#603 + def fullpath; end + + # Checks the HTTP request method (or verb) to see if it was of type GET + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#223 + def get?; end + + # Checks the HTTP request method (or verb) to see if it was of type HEAD + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#226 + def head?; end + + # Returns a formatted host, suitable for being used in a URI. + # + # source://rack//lib/rack/request.rb#333 + def host; end + + # The `HTTP_HOST` header. + # + # source://rack//lib/rack/request.rb#318 + def host_authority; end + + # source://rack//lib/rack/request.rb#322 + def host_with_port(authority = T.unsafe(nil)); end + + # Returns an address suitable for being to resolve to an address. + # In the case of a domain name or IPv4 address, the result is the same + # as +host+. In the case of IPv6 or future address formats, the square + # brackets are removed. + # + # source://rack//lib/rack/request.rb#341 + def hostname; end + + # source://rack//lib/rack/request.rb#414 + def ip; end + + # Checks the HTTP request method (or verb) to see if it was of type LINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#232 + def link?; end + + # source://rack//lib/rack/request.rb#200 + def logger; end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/request.rb#441 + def media_type; end + + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/request.rb#450 + def media_type_params; end + + # Checks the HTTP request method (or verb) to see if it was of type OPTIONS + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#229 + def options?; end + + # The union of GET and POST data. + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # source://rack//lib/rack/request.rb#556 + def params; end + + # Determine whether the request body contains data by checking + # the request media_type against registered parse-data media-types + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#479 + def parseable_data?; end + + # Checks the HTTP request method (or verb) to see if it was of type PATCH + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#235 + def patch?; end + + # source://rack//lib/rack/request.rb#599 + def path; end + + # source://rack//lib/rack/request.rb#194 + def path_info; end + + # source://rack//lib/rack/request.rb#195 + def path_info=(s); end + + # source://rack//lib/rack/request.rb#345 + def port; end + + # Checks the HTTP request method (or verb) to see if it was of type POST + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#238 + def post?; end + + # Checks the HTTP request method (or verb) to see if it was of type PUT + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#241 + def put?; end + + # source://rack//lib/rack/request.rb#198 + def query_string; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 + def referer; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 + def referrer; end + + # source://rack//lib/rack/request.rb#197 + def request_method; end + + # source://rack//lib/rack/request.rb#249 + def scheme; end + + # source://rack//lib/rack/request.rb#191 + def script_name; end + + # source://rack//lib/rack/request.rb#192 + def script_name=(s); end + + # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` + # variables. + # + # source://rack//lib/rack/request.rb#272 + def server_authority; end + + # source://rack//lib/rack/request.rb#285 + def server_name; end + + # source://rack//lib/rack/request.rb#289 + def server_port; end + + # source://rack//lib/rack/request.rb#207 + def session; end + + # source://rack//lib/rack/request.rb#213 + def session_options; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#410 + def ssl?; end + + # Checks the HTTP request method (or verb) to see if it was of type TRACE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#244 + def trace?; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#615 + def trusted_proxy?(ip); end + + # Checks the HTTP request method (or verb) to see if it was of type UNLINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#247 + def unlink?; end + + # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. + # + # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET. + # + # env['rack.input'] is not touched. + # + # source://rack//lib/rack/request.rb#565 + def update_param(k, v); end + + # Tries to return a remake of the original request URL as a string. + # + # source://rack//lib/rack/request.rb#595 + def url; end + + # source://rack//lib/rack/request.rb#201 + def user_agent; end + + # like Hash#values_at + # + # source://rack//lib/rack/request.rb#620 + def values_at(*keys); end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#313 + def xhr?; end + + private + + # source://rack//lib/rack/request.rb#776 + def allowed_scheme(header); end + + # source://rack//lib/rack/request.rb#628 + def default_session; end + + # source://rack//lib/rack/request.rb#684 + def expand_param_pairs(pairs, query_parser = T.unsafe(nil)); end + + # source://rack//lib/rack/request.rb#780 + def forwarded_priority; end + + # source://rack//lib/rack/request.rb#752 + def forwarded_scheme; end + + # Get an array of values set in the RFC 7239 `Forwarded` request header. + # + # source://rack//lib/rack/request.rb#668 + def get_http_forwarded(token); end + + # source://rack//lib/rack/request.rb#644 + def parse_http_accept_header(header); end + + # source://rack//lib/rack/request.rb#680 + def parse_multipart; end + + # source://rack//lib/rack/request.rb#676 + def parse_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/request.rb#672 + def query_parser; end + + # source://rack//lib/rack/request.rb#743 + def reject_trusted_ip_addresses(ip_addresses); end + + # source://rack//lib/rack/request.rb#737 + def split_authority(authority); end + + # source://rack//lib/rack/request.rb#694 + def split_header(value); end + + # Assist with compatibility when processing `X-Forwarded-For`. + # + # source://rack//lib/rack/request.rb#631 + def wrap_ipv6(host); end + + # source://rack//lib/rack/request.rb#784 + def x_forwarded_proto_priority; end +end + +# source://rack//lib/rack/request.rb#722 +Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# Default ports depending on scheme. Used to decide whether or not +# to include the port in a generated URI. +# +# source://rack//lib/rack/request.rb#168 +Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) + +# The set of form-data media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for form-data / param parsing. +# +# source://rack//lib/rack/request.rb#153 +Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/request.rb#747 +Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/request.rb#176 +Rack::Request::Helpers::HTTP_FORWARDED = T.let(T.unsafe(nil), String) + +# The address of the client which connected to the proxy. +# +# source://rack//lib/rack/request.rb#171 +Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) + +# The contents of the host/:authority header sent to the proxy. +# +# source://rack//lib/rack/request.rb#174 +Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) + +# The port used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#185 +Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) + +# The protocol used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#182 +Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) + +# The value of the scheme sent to the proxy. +# +# source://rack//lib/rack/request.rb#179 +Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) + +# Another way for specifying https scheme was used. +# +# source://rack//lib/rack/request.rb#188 +Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) + +# The set of media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for param parsing like soap attachments or generic multiparts +# +# source://rack//lib/rack/request.rb#161 +Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# Rack::Response provides a convenient interface to create a Rack +# response. +# +# It allows setting of headers and cookies, and provides useful +# defaults (an OK response with empty headers and body). +# +# You can use Response#write to iteratively generate your response, +# but note that this is buffered by Rack::Response until you call +# +finish+. +finish+ however can take a block inside which calls to +# +write+ are synchronous with the Rack response. +# +# Your application's +call+ should end returning Response#finish. +# +# source://rack//lib/rack/response.rb#23 +class Rack::Response + include ::Rack::Response::Helpers + + # Initialize the response object with the specified +body+, +status+ + # and +headers+. + # + # If the +body+ is +nil+, construct an empty response object with internal + # buffering. + # + # If the +body+ responds to +to_str+, assume it's a string-like object and + # construct a buffered response object containing using that string as the + # initial contents of the buffer. + # + # Otherwise it is expected +body+ conforms to the normal requirements of a + # Rack response body, typically implementing one of +each+ (enumerable + # body) or +call+ (streaming body). + # + # The +status+ defaults to +200+ which is the "OK" HTTP status code. You + # can provide any other valid status code. + # + # The +headers+ must be a +Hash+ of key-value header pairs which conform to + # the Rack specification for response headers. The key must be a +String+ + # instance and the value can be either a +String+ or +Array+ instance. + # + # @return [Response] a new instance of Response + # @yield [_self] + # @yieldparam _self [Rack::Response] the object that the method was called on + # + # source://rack//lib/rack/response.rb#54 + def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#164 + def [](key); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#168 + def []=(key, value); end + + # Returns the value of attribute body. + # + # source://rack//lib/rack/response.rb#31 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://rack//lib/rack/response.rb#31 + def body=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#95 + def chunked?; end + + # source://rack//lib/rack/response.rb#152 + def close; end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#172 + def delete_header(key); end + + # source://rack//lib/rack/response.rb#130 + def each(&callback); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#156 + def empty?; end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#107 + def finish(&block); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#164 + def get_header(key); end + + # @raise [ArgumentError] + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#160 + def has_header?(key); end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#32 + def headers; end + + # Returns the value of attribute length. + # + # source://rack//lib/rack/response.rb#31 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://rack//lib/rack/response.rb#31 + def length=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#99 + def no_entity_body?; end + + # source://rack//lib/rack/response.rb#90 + def redirect(target, status = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#168 + def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#31 + def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#31 + def status=(_arg0); end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # For *response + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#107 + def to_a(&block); end + + # Append a chunk to the response body. + # + # Converts the response into a buffered response if it wasn't already. + # + # NOTE: Do not mix #write and direct #body access! + # + # source://rack//lib/rack/response.rb#146 + def write(chunk); end + + class << self + # source://rack//lib/rack/response.rb#24 + def [](status, headers, body); end + end +end + +# source://rack//lib/rack/response.rb#28 +Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/response.rb#180 +module Rack::Response::Helpers + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#191 + def accepted?; end + + # Add a header that may have multiple values. + # + # Example: + # response.add_header 'vary', 'accept-encoding' + # response.add_header 'vary', 'cookie' + # + # assert_equal 'accept-encoding,cookie', response.get_header('vary') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#219 + def add_header(key, value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#194 + def bad_request?; end + + # Specify that the content should be cached. + # + # @option directive + # @param duration [Integer] The number of seconds until the cache expires. + # @param directive [Hash] a customizable set of options + # + # source://rack//lib/rack/response.rb#307 + def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end + + # source://rack//lib/rack/response.rb#290 + def cache_control; end + + # source://rack//lib/rack/response.rb#294 + def cache_control=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#186 + def client_error?; end + + # source://rack//lib/rack/response.rb#257 + def content_length; end + + # Get the content type of the response. + # + # source://rack//lib/rack/response.rb#240 + def content_type; end + + # Set the content type of the response. + # + # source://rack//lib/rack/response.rb#245 + def content_type=(content_type); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#190 + def created?; end + + # source://rack//lib/rack/response.rb#274 + def delete_cookie(key, value = T.unsafe(nil)); end + + # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. + # + # source://rack//lib/rack/response.rb#299 + def do_not_cache!; end + + # source://rack//lib/rack/response.rb#314 + def etag; end + + # source://rack//lib/rack/response.rb#318 + def etag=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#196 + def forbidden?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#206 + def include?(header); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#183 + def informational?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#181 + def invalid?; end + + # source://rack//lib/rack/response.rb#262 + def location; end + + # source://rack//lib/rack/response.rb#266 + def location=(location); end + + # source://rack//lib/rack/response.rb#249 + def media_type; end + + # source://rack//lib/rack/response.rb#253 + def media_type_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#198 + def method_not_allowed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#193 + def moved_permanently?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#192 + def no_content?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#199 + def not_acceptable?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#197 + def not_found?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#189 + def ok?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#201 + def precondition_failed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#204 + def redirect?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#185 + def redirection?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#200 + def request_timeout?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#187 + def server_error?; end + + # source://rack//lib/rack/response.rb#270 + def set_cookie(key, value); end + + # source://rack//lib/rack/response.rb#282 + def set_cookie_header; end + + # source://rack//lib/rack/response.rb#286 + def set_cookie_header=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#184 + def successful?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#195 + def unauthorized?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#202 + def unprocessable?; end + + protected + + # source://rack//lib/rack/response.rb#359 + def append(chunk); end + + # Convert the body of this response into an internally buffered Array if possible. + # + # `@buffered` is a ternary value which indicates whether the body is buffered. It can be: + # * `nil` - The body has not been buffered yet. + # * `true` - The body is buffered as an Array instance. + # * `false` - The body is not buffered and cannot be buffered. + # + # @return [Boolean] whether the body is buffered as an Array instance. + # + # source://rack//lib/rack/response.rb#332 + def buffered_body!; end +end + +# source://rack//lib/rack/response.rb#375 +class Rack::Response::Raw + include ::Rack::Response::Helpers + + # @return [Raw] a new instance of Raw + # + # source://rack//lib/rack/response.rb#381 + def initialize(status, headers); end + + # source://rack//lib/rack/response.rb#398 + def delete_header(key); end + + # source://rack//lib/rack/response.rb#390 + def get_header(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#386 + def has_header?(key); end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#378 + def headers; end + + # source://rack//lib/rack/response.rb#394 + def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#379 + def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#379 + def status=(_arg0); end +end + +# source://rack//lib/rack/response.rb#29 +Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# Class which can make any IO object rewindable, including non-rewindable ones. It does +# this by buffering the data into a tempfile, which is rewindable. +# +# Don't forget to call #close when you're done. This frees up temporary resources that +# RewindableInput uses, though it does *not* close the original IO object. +# +# source://rack//lib/rack/rewindable_input.rb#14 +class Rack::RewindableInput + # @return [RewindableInput] a new instance of RewindableInput + # + # source://rack//lib/rack/rewindable_input.rb#29 + def initialize(io); end + + # Closes this RewindableInput object without closing the originally + # wrapped IO object. Cleans up any temporary resources that this RewindableInput + # has created. + # + # This method may be called multiple times. It does nothing on subsequent calls. + # + # source://rack//lib/rack/rewindable_input.rb#65 + def close; end + + # source://rack//lib/rack/rewindable_input.rb#45 + def each(&block); end + + # source://rack//lib/rack/rewindable_input.rb#35 + def gets; end + + # source://rack//lib/rack/rewindable_input.rb#40 + def read(*args); end + + # source://rack//lib/rack/rewindable_input.rb#50 + def rewind; end + + # source://rack//lib/rack/rewindable_input.rb#55 + def size; end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/rewindable_input.rb#109 + def filesystem_has_posix_semantics?; end + + # source://rack//lib/rack/rewindable_input.rb#78 + def make_rewindable; end +end + +# Makes rack.input rewindable, for compatibility with applications and middleware +# designed for earlier versions of Rack (where rack.input was required to be +# rewindable). +# +# source://rack//lib/rack/rewindable_input.rb#18 +class Rack::RewindableInput::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://rack//lib/rack/rewindable_input.rb#19 + def initialize(app); end + + # source://rack//lib/rack/rewindable_input.rb#23 + def call(env); end +end + +# Sets an "x-runtime" response header, indicating the response +# time of the request, in seconds +# +# You can put it right before the application to see the processing +# time, or before all the other middlewares to include time for them, +# too. +# +# source://rack//lib/rack/runtime.rb#12 +class Rack::Runtime + # @return [Runtime] a new instance of Runtime + # + # source://rack//lib/rack/runtime.rb#16 + def initialize(app, name = T.unsafe(nil)); end + + # source://rack//lib/rack/runtime.rb#22 + def call(env); end +end + +# source://rack//lib/rack/runtime.rb#13 +Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/runtime.rb#14 +Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#11 +Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#14 +Rack::SERVER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#15 +Rack::SERVER_PORT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#13 +Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#24 +Rack::SET_COOKIE = T.let(T.unsafe(nil), String) + +# = Sendfile +# +# The Sendfile middleware intercepts responses whose body is being +# served from a file and replaces it with a server specific x-sendfile +# header. The web server is then responsible for writing the file contents +# to the client. This can dramatically reduce the amount of work required +# by the Ruby backend and takes advantage of the web server's optimized file +# delivery code. +# +# In order to take advantage of this middleware, the response body must +# respond to +to_path+ and the request must include an x-sendfile-type +# header. Rack::Files and other components implement +to_path+ so there's +# rarely anything you need to do in your application. The x-sendfile-type +# header is typically set in your web servers configuration. The following +# sections attempt to document +# +# === Nginx +# +# Nginx supports the x-accel-redirect header. This is similar to x-sendfile +# but requires parts of the filesystem to be mapped into a private URL +# hierarchy. +# +# The following example shows the Nginx configuration required to create +# a private "/files/" area, enable x-accel-redirect, and pass the special +# x-sendfile-type and x-accel-mapping headers to the backend: +# +# location ~ /files/(.*) { +# internal; +# alias /var/www/$1; +# } +# +# location / { +# proxy_redirect off; +# +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# +# proxy_set_header x-sendfile-type x-accel-redirect; +# proxy_set_header x-accel-mapping /var/www/=/files/; +# +# proxy_pass http://127.0.0.1:8080/; +# } +# +# Note that the x-sendfile-type header must be set exactly as shown above. +# The x-accel-mapping header should specify the location on the file system, +# followed by an equals sign (=), followed name of the private URL pattern +# that it maps to. The middleware performs a simple substitution on the +# resulting path. +# +# See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile +# +# === lighttpd +# +# Lighttpd has supported some variation of the x-sendfile header for some +# time, although only recent version support x-sendfile in a reverse proxy +# configuration. +# +# $HTTP["host"] == "example.com" { +# proxy-core.protocol = "http" +# proxy-core.balancer = "round-robin" +# proxy-core.backends = ( +# "127.0.0.1:8000", +# "127.0.0.1:8001", +# ... +# ) +# +# proxy-core.allow-x-sendfile = "enable" +# proxy-core.rewrite-request = ( +# "x-sendfile-type" => (".*" => "x-sendfile") +# ) +# } +# +# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore +# +# === Apache +# +# x-sendfile is supported under Apache 2.x using a separate module: +# +# https://tn123.org/mod_xsendfile/ +# +# Once the module is compiled and installed, you can enable it using +# XSendFile config directive: +# +# RequestHeader Set x-sendfile-type x-sendfile +# ProxyPassReverse / http://localhost:8001/ +# XSendFile on +# +# === Mapping parameter +# +# The third parameter allows for an overriding extension of the +# x-accel-mapping header. Mappings should be provided in tuples of internal to +# external. The internal values may contain regular expression syntax, they +# will be matched with case indifference. +# +# source://rack//lib/rack/sendfile.rb#104 +class Rack::Sendfile + # @return [Sendfile] a new instance of Sendfile + # + # source://rack//lib/rack/sendfile.rb#105 + def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end + + # source://rack//lib/rack/sendfile.rb#113 + def call(env); end + + private + + # source://rack//lib/rack/sendfile.rb#154 + def map_accel_path(env, path); end + + # source://rack//lib/rack/sendfile.rb#148 + def variation(env); end +end + +# Rack::ShowExceptions catches all exceptions raised from the app it +# wraps. It shows a useful backtrace with the sourcefile and +# clickable context, the whole Rack environment and the request +# data. +# +# Be careful when you use this on public-facing sites as it could +# reveal information helpful to attackers. +# +# source://rack//lib/rack/show_exceptions.rb#18 +class Rack::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://rack//lib/rack/show_exceptions.rb#26 + def initialize(app); end + + # source://rack//lib/rack/show_exceptions.rb#30 + def call(env); end + + # source://rack//lib/rack/show_exceptions.rb#65 + def dump_exception(exception); end + + # source://rack//lib/rack/show_exceptions.rb#116 + def h(obj); end + + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#56 + def prefers_plaintext?(env); end + + # source://rack//lib/rack/show_exceptions.rb#76 + def pretty(env, exception); end + + # source://rack//lib/rack/show_exceptions.rb#112 + def template; end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#60 + def accepts_html?(env); end +end + +# source://rack//lib/rack/show_exceptions.rb#19 +Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/show_exceptions.rb#21 +class Rack::ShowExceptions::Frame < ::Struct + # Returns the value of attribute context_line + # + # @return [Object] the current value of context_line + def context_line; end + + # Sets the attribute context_line + # + # @param value [Object] the value to set the attribute context_line to. + # @return [Object] the newly set value + def context_line=(_); 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 + + # Returns the value of attribute function + # + # @return [Object] the current value of function + def function; end + + # Sets the attribute function + # + # @param value [Object] the value to set the attribute function to. + # @return [Object] the newly set value + def function=(_); end + + # Returns the value of attribute lineno + # + # @return [Object] the current value of lineno + def lineno; end + + # Sets the attribute lineno + # + # @param value [Object] the value to set the attribute lineno to. + # @return [Object] the newly set value + def lineno=(_); end + + # Returns the value of attribute post_context + # + # @return [Object] the current value of post_context + def post_context; end + + # Sets the attribute post_context + # + # @param value [Object] the value to set the attribute post_context to. + # @return [Object] the newly set value + def post_context=(_); end + + # Returns the value of attribute post_context_lineno + # + # @return [Object] the current value of post_context_lineno + def post_context_lineno; end + + # Sets the attribute post_context_lineno + # + # @param value [Object] the value to set the attribute post_context_lineno to. + # @return [Object] the newly set value + def post_context_lineno=(_); end + + # Returns the value of attribute pre_context + # + # @return [Object] the current value of pre_context + def pre_context; end + + # Sets the attribute pre_context + # + # @param value [Object] the value to set the attribute pre_context to. + # @return [Object] the newly set value + def pre_context=(_); end + + # Returns the value of attribute pre_context_lineno + # + # @return [Object] the current value of pre_context_lineno + def pre_context_lineno; end + + # Sets the attribute pre_context_lineno + # + # @param value [Object] the value to set the attribute pre_context_lineno to. + # @return [Object] the newly set value + def pre_context_lineno=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rack//lib/rack/show_exceptions.rb#131 +Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) + +# Rack::ShowStatus catches all empty responses and replaces them +# with a site explaining the error. +# +# Additional details can be put into rack.showstatus.detail +# and will be shown as HTML. If such details exist, the error page +# is always rendered, even if the reply was not empty. +# +# source://rack//lib/rack/show_status.rb#18 +class Rack::ShowStatus + # @return [ShowStatus] a new instance of ShowStatus + # + # source://rack//lib/rack/show_status.rb#19 + def initialize(app); end + + # source://rack//lib/rack/show_status.rb#24 + def call(env); end + + # source://rack//lib/rack/show_status.rb#54 + def h(obj); end +end + +# source://rack//lib/rack/show_status.rb#69 +Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) + +# The Rack::Static middleware intercepts requests for static files +# (javascript files, images, stylesheets, etc) based on the url prefixes or +# route mappings passed in the options, and serves them using a Rack::Files +# object. This allows a Rack stack to serve both static and dynamic content. +# +# Examples: +# +# Serve all requests beginning with /media from the "media" folder located +# in the current directory (ie media/*): +# +# use Rack::Static, :urls => ["/media"] +# +# Same as previous, but instead of returning 404 for missing files under +# /media, call the next middleware: +# +# use Rack::Static, :urls => ["/media"], :cascade => true +# +# Serve all requests beginning with /css or /images from the folder "public" +# in the current directory (ie public/css/* and public/images/*): +# +# use Rack::Static, :urls => ["/css", "/images"], :root => "public" +# +# Serve all requests to / with "index.html" from the folder "public" in the +# current directory (ie public/index.html): +# +# use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public' +# +# Serve all requests normally from the folder "public" in the current +# directory but uses index.html as default route for "/" +# +# use Rack::Static, :urls => [""], :root => 'public', :index => +# 'index.html' +# +# Set custom HTTP Headers for based on rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# [rule, {header_field => content, header_field => content}], +# [rule, {header_field => content}] +# ] +# +# Rules for selecting files: +# +# 1) All files +# Provide the :all symbol +# :all => Matches every file +# +# 2) Folders +# Provide the folder path as a string +# '/folder' or '/folder/subfolder' => Matches files in a certain folder +# +# 3) File Extensions +# Provide the file extensions as an array +# ['css', 'js'] or %w(css js) => Matches files ending in .css or .js +# +# 4) Regular Expressions / Regexp +# Provide a regular expression +# %r{\.(?:css|js)\z} => Matches files ending in .css or .js +# /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in +# the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg) +# Note: This Regexp is available as a shortcut, using the :fonts rule +# +# 5) Font Shortcut +# Provide the :fonts symbol +# :fonts => Uses the Regexp rule stated right above to match all common web font endings +# +# Rule Ordering: +# Rules are applied in the order that they are provided. +# List rather general rules above special ones. +# +# Complete example use case including HTTP header rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# # Cache all static files in public caches (e.g. Rack::Cache) +# # as well as in the browser +# [:all, {'cache-control' => 'public, max-age=31536000'}], +# +# # Provide web fonts with cross-origin access-control-headers +# # Firefox requires this when serving assets using a Content Delivery Network +# [:fonts, {'access-control-allow-origin' => '*'}] +# ] +# +# source://rack//lib/rack/static.rb#92 +class Rack::Static + # @return [Static] a new instance of Static + # + # source://rack//lib/rack/static.rb#93 + def initialize(app, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rack//lib/rack/static.rb#109 + def add_index_root?(path); end + + # Convert HTTP header rules to HTTP headers + # + # source://rack//lib/rack/static.rb#166 + def applicable_rules(path); end + + # source://rack//lib/rack/static.rb#125 + def call(env); end + + # source://rack//lib/rack/static.rb#121 + def can_serve(path); end + + # source://rack//lib/rack/static.rb#113 + def overwrite_file_path(path); end + + # source://rack//lib/rack/static.rb#117 + def route_file(path); end +end + +# source://rack//lib/rack/constants.rb#38 +Rack::TRACE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#25 +Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) +# Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter +# https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ +# +# source://rack//lib/rack/tempfile_reaper.rb#11 +class Rack::TempfileReaper + # @return [TempfileReaper] a new instance of TempfileReaper + # + # source://rack//lib/rack/tempfile_reaper.rb#12 + def initialize(app); end + + # source://rack//lib/rack/tempfile_reaper.rb#16 + def call(env); end +end + +# source://rack//lib/rack/constants.rb#37 +Rack::UNLINK = T.let(T.unsafe(nil), String) + +# Rack::URLMap takes a hash mapping urls or paths to apps, and +# dispatches accordingly. Support for HTTP/1.1 host names exists if +# the URLs start with http:// or https://. +# +# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part +# relevant for dispatch is in the SCRIPT_NAME, and the rest in the +# PATH_INFO. This should be taken care of when you need to +# reconstruct the URL in order to create links. +# +# URLMap dispatches in such a way that the longest paths are tried +# first, since they are most specific. +# +# source://rack//lib/rack/urlmap.rb#20 +class Rack::URLMap + # @return [URLMap] a new instance of URLMap + # + # source://rack//lib/rack/urlmap.rb#21 + def initialize(map = T.unsafe(nil)); end + + # source://rack//lib/rack/urlmap.rb#48 + def call(env); end + + # source://rack//lib/rack/urlmap.rb#25 + def remap(map); end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/urlmap.rb#87 + def casecmp?(v1, v2); end +end + +# Rack::Utils contains a grab-bag of useful methods for writing web +# applications adopted from all kinds of Ruby libraries. +# +# source://rack//lib/rack/utils.rb#20 +module Rack::Utils + private + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#166 + def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#119 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#408 + def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#608 + def clean_path_info(path_info); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#90 + def clock_time; end + + # source://rack//lib/rack/utils.rb#366 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#362 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#390 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#39 + def escape(s); end + + # source://rack//lib/rack/utils.rb#261 + def escape_cookie_key(key); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + def escape_html(_arg0); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#45 + def escape_path(s); end + + # source://rack//lib/rack/utils.rb#148 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#412 + def get_byte_ranges(http_range, size); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#252 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#233 + def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#105 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#101 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#137 + def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#401 + def rfc2822(time); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#454 + def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#191 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#293 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#336 + def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#588 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#57 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#51 + def unescape_path(s); end + + # source://rack//lib/rack/utils.rb#625 + def valid_path?(path); end + + class << self + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#166 + def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#119 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#408 + def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#608 + def clean_path_info(path_info); end + + # source://rack//lib/rack/utils.rb#90 + def clock_time; end + + # Returns the value of attribute default_query_parser. + # + # source://rack//lib/rack/utils.rb#29 + def default_query_parser; end + + # Sets the attribute default_query_parser + # + # @param value the value to set the attribute default_query_parser to. + # + # source://rack//lib/rack/utils.rb#29 + def default_query_parser=(_arg0); end + + # source://rack//lib/rack/utils.rb#366 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#362 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#390 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#39 + def escape(s); end + + # source://rack//lib/rack/utils.rb#261 + def escape_cookie_key(key); end + + def escape_html(_arg0); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#45 + def escape_path(s); end + + # source://rack//lib/rack/utils.rb#148 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#412 + def get_byte_ranges(http_range, size); end + + # Returns the value of attribute multipart_file_limit. + # + # source://rack//lib/rack/utils.rb#64 + def multipart_file_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#64 + def multipart_file_limit=(_arg0); end + + # Returns the value of attribute multipart_file_limit. + # multipart_part_limit is the original name of multipart_file_limit, but + # the limit only counts parts with filenames. + # + # source://rack//lib/rack/utils.rb#64 + def multipart_part_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#64 + def multipart_part_limit=(_arg0); end + + # Returns the value of attribute multipart_total_part_limit. + # + # source://rack//lib/rack/utils.rb#62 + def multipart_total_part_limit; end + + # Sets the attribute multipart_total_part_limit + # + # @param value the value to set the attribute multipart_total_part_limit to. + # + # source://rack//lib/rack/utils.rb#62 + def multipart_total_part_limit=(_arg0); end + + # source://rack//lib/rack/utils.rb#81 + def param_depth_limit; end + + # source://rack//lib/rack/utils.rb#85 + def param_depth_limit=(v); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#252 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#233 + def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#105 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#101 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#137 + def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#401 + def rfc2822(time); end + + # source://rack//lib/rack/utils.rb#454 + def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#191 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#293 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#336 + def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#588 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#57 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#51 + def unescape_path(s); end + + # @return [Boolean] + # + # source://rack//lib/rack/utils.rb#625 + def valid_path?(path); end + end +end + +# source://rack//lib/rack/utils.rb#25 +Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# Context allows the use of a compatible middleware at different points +# in a request handling stack. A compatible middleware must define +# #context which should take the arguments env and app. The first of which +# would be the request environment. The second of which would be the rack +# application that the request would be forwarded to. +# +# source://rack//lib/rack/utils.rb#477 +class Rack::Utils::Context + # @return [Context] a new instance of Context + # + # source://rack//lib/rack/utils.rb#480 + def initialize(app_f, app_r); end + + # Returns the value of attribute app. + # + # source://rack//lib/rack/utils.rb#478 + def app; end + + # source://rack//lib/rack/utils.rb#485 + def call(env); end + + # source://rack//lib/rack/utils.rb#493 + def context(env, app = T.unsafe(nil)); end + + # Returns the value of attribute for. + # + # source://rack//lib/rack/utils.rb#478 + def for; end + + # source://rack//lib/rack/utils.rb#489 + def recontext(app); end +end + +# source://rack//lib/rack/utils.rb#24 +Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# Every standard HTTP code mapped to the appropriate message. +# Generated with: +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv \ +# | ruby -rcsv -e "puts CSV.parse(STDIN, headers: true) \ +# .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \ +# .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)" +# +# source://rack//lib/rack/utils.rb#504 +Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#22 +Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError + +# source://rack//lib/rack/utils.rb#26 +Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params + +# source://rack//lib/rack/utils.rb#623 +Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/utils.rb#574 +Rack::Utils::OBSOLETE_SYMBOLS_TO_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#582 +Rack::Utils::OBSOLETE_SYMBOL_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#606 +Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/utils.rb#21 +Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError + +# source://rack//lib/rack/utils.rb#23 +Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError + +# Responses with HTTP status codes that should not have an entity body +# +# source://rack//lib/rack/utils.rb#568 +Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#570 +Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) + +# A valid cookie key according to RFC2616. +# A can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. +# +# source://rack//lib/rack/utils.rb#258 +Rack::Utils::VALID_COOKIE_KEY = T.let(T.unsafe(nil), Regexp) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rackup@2.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rackup@2.1.0.rbi new file mode 100644 index 0000000..6195ce7 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rackup@2.1.0.rbi @@ -0,0 +1,390 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rackup` gem. +# Please instead update this file by running `bin/tapioca gem rackup`. + + +# source://rackup//lib/rackup/handler.rb#6 +module Rackup; end + +# *Handlers* connect web servers with Rack. +# +# Rackup includes Handlers for WEBrick and CGI. +# +# Handlers usually are activated by calling MyHandler.run(myapp). +# A second optional hash can be passed to include server-specific +# configuration. +# +# source://rackup//lib/rackup/handler.rb#14 +module Rackup::Handler + class << self + # source://rackup//lib/rackup/handler.rb#30 + def [](name); end + + # source://rackup//lib/rackup/handler.rb#84 + def default; end + + # source://rackup//lib/rackup/handler.rb#40 + def get(name); end + + # Select first available Rack handler given an `Array` of server names. + # Raises `LoadError` if no handler was found. + # + # > pick ['puma', 'webrick'] + # => Rackup::Handler::WEBrick + # + # @raise [LoadError] + # + # source://rackup//lib/rackup/handler.rb#69 + def pick(server_names); end + + # Register a named handler class. + # + # source://rackup//lib/rackup/handler.rb#18 + def register(name, klass); end + + # Transforms server-name constants to their canonical form as filenames, + # then tries to require them but silences the LoadError if not found + # + # Naming convention: + # + # Foo # => 'foo' + # FooBar # => 'foo_bar.rb' + # FooBAR # => 'foobar.rb' + # FOObar # => 'foobar.rb' + # FOOBAR # => 'foobar.rb' + # FooBarBaz # => 'foo_bar_baz.rb' + # + # source://rackup//lib/rackup/handler.rb#106 + def require_handler(prefix, const_name); end + end +end + +# source://rackup//lib/rackup/handler/cgi.rb#8 +class Rackup::Handler::CGI + include ::Rack + + class << self + # source://rackup//lib/rackup/handler/cgi.rb#11 + def run(app, **options); end + + # source://rackup//lib/rackup/handler/cgi.rb#51 + def send_body(body); end + + # source://rackup//lib/rackup/handler/cgi.rb#40 + def send_headers(status, headers); end + + # source://rackup//lib/rackup/handler/cgi.rb#16 + def serve(app); end + end +end + +# source://rackup//lib/rackup/handler.rb#59 +Rackup::Handler::RACKUP_HANDLER = T.let(T.unsafe(nil), String) + +# source://rackup//lib/rackup/handler.rb#58 +Rackup::Handler::RACK_HANDLER = T.let(T.unsafe(nil), String) + +# source://rackup//lib/rackup/handler.rb#61 +Rackup::Handler::SERVER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rackup//lib/rackup/handler/webrick.rb#18 +class Rackup::Handler::WEBrick < ::WEBrick::HTTPServlet::AbstractServlet + # @return [WEBrick] a new instance of WEBrick + # + # source://rackup//lib/rackup/handler/webrick.rb#54 + def initialize(server, app); end + + # source://rackup//lib/rackup/handler/webrick.rb#91 + def service(req, res); end + + class << self + # @yield [@server] + # + # source://rackup//lib/rackup/handler/webrick.rb#19 + def run(app, **options); end + + # source://rackup//lib/rackup/handler/webrick.rb#47 + def shutdown; end + + # source://rackup//lib/rackup/handler/webrick.rb#37 + def valid_options; end + end +end + +# This handles mapping the WEBrick request to a Rack input stream. +# +# source://rackup//lib/rackup/handler/webrick.rb#60 +class Rackup::Handler::WEBrick::Input + include ::Rackup::Stream::Reader + + # @return [Input] a new instance of Input + # + # source://rackup//lib/rackup/handler/webrick.rb#63 + def initialize(request); end + + # source://rackup//lib/rackup/handler/webrick.rb#78 + def close; end + + private + + # Read one chunk from the request body. + # + # source://rackup//lib/rackup/handler/webrick.rb#86 + def read_next; end +end + +# source://rackup//lib/rackup/server.rb#22 +class Rackup::Server + # Options may include: + # * :app + # a rack application to run (overrides :config and :builder) + # * :builder + # a string to evaluate a Rack::Builder from + # * :config + # a rackup configuration file path to load (.ru) + # * :environment + # this selects the middleware that will be wrapped around + # your application. Default options available are: + # - development: CommonLogger, ShowExceptions, and Lint + # - deployment: CommonLogger + # - none: no extra middleware + # note: when the server is a cgi server, CommonLogger is not included. + # * :server + # choose a specific Rackup::Handler, e.g. cgi, fcgi, webrick + # * :daemonize + # if truthy, the server will daemonize itself (fork, detach, etc) + # if :noclose, the server will not close STDOUT/STDERR + # * :pid + # path to write a pid file after daemonize + # * :Host + # the host address to bind to (used by supporting Rackup::Handler) + # * :Port + # the port to bind to (used by supporting Rackup::Handler) + # * :AccessLog + # webrick access log options (or supporting Rackup::Handler) + # * :debug + # turn on debug output ($DEBUG = true) + # * :warn + # turn on warnings ($-w = true) + # * :include + # add given paths to $LOAD_PATH + # * :require + # require the given libraries + # + # Additional options for profiling app initialization include: + # * :heapfile + # location for ObjectSpace.dump_all to write the output to + # * :profile_file + # location for CPU/Memory (StackProf) profile output (defaults to a tempfile) + # * :profile_mode + # StackProf profile mode (cpu|wall|object) + # + # @return [Server] a new instance of Server + # + # source://rackup//lib/rackup/server.rb#230 + def initialize(options = T.unsafe(nil)); end + + # source://rackup//lib/rackup/server.rb#262 + def app; end + + # source://rackup//lib/rackup/server.rb#248 + def default_options; end + + # source://rackup//lib/rackup/server.rb#296 + def middleware; end + + # source://rackup//lib/rackup/server.rb#243 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://rackup//lib/rackup/server.rb#185 + def options=(_arg0); end + + # source://rackup//lib/rackup/server.rb#344 + def server; end + + # source://rackup//lib/rackup/server.rb#300 + def start(&block); end + + private + + # source://rackup//lib/rackup/server.rb#413 + def build_app(app); end + + # source://rackup//lib/rackup/server.rb#349 + def build_app_and_options_from_config; end + + # source://rackup//lib/rackup/server.rb#395 + def build_app_from_string; end + + # source://rackup//lib/rackup/server.rb#442 + def check_pid!; end + + # source://rackup//lib/rackup/server.rb#427 + def daemonize_app; end + + # source://rackup//lib/rackup/server.rb#456 + def exit_with_pid(pid); end + + # source://rackup//lib/rackup/server.rb#357 + def handle_profiling(heapfile, profile_mode, filename); end + + # source://rackup//lib/rackup/server.rb#385 + def make_profile_name(filename); end + + # source://rackup//lib/rackup/server.rb#409 + def opt_parser; end + + # source://rackup//lib/rackup/server.rb#399 + def parse_options(args); end + + # source://rackup//lib/rackup/server.rb#423 + def wrapped_app; end + + # source://rackup//lib/rackup/server.rb#434 + def write_pid; end + + class << self + # source://rackup//lib/rackup/server.rb#273 + def default_middleware_by_environment; end + + # source://rackup//lib/rackup/server.rb#267 + def logging_middleware; end + + # source://rackup//lib/rackup/server.rb#291 + def middleware; end + + # Start a new rack server (like running rackup). This will parse ARGV and + # provide standard ARGV rackup options, defaulting to load 'config.ru'. + # + # Providing an options hash will prevent ARGV parsing and will not include + # any default options. + # + # This method can be used to very easily launch a CGI application, for + # example: + # + # Rack::Server.start( + # :app => lambda do |e| + # [200, {'content-type' => 'text/html'}, ['hello world']] + # end, + # :server => 'cgi' + # ) + # + # Further options available here are documented on Rack::Server#initialize + # + # source://rackup//lib/rackup/server.rb#181 + def start(options = T.unsafe(nil)); end + end +end + +# source://rackup//lib/rackup/server.rb#23 +class Rackup::Server::Options + # source://rackup//lib/rackup/server.rb#143 + def handler_opts(options); end + + # source://rackup//lib/rackup/server.rb#24 + def parse!(args); end +end + +# The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind. +# +# source://rackup//lib/rackup/stream.rb#8 +class Rackup::Stream + include ::Rackup::Stream::Reader + + # @raise [ArgumentError] + # @return [Stream] a new instance of Stream + # + # source://rackup//lib/rackup/stream.rb#9 + def initialize(input = T.unsafe(nil), output = T.unsafe(nil)); end + + # source://rackup//lib/rackup/stream.rb#147 + def <<(buffer); end + + # Close the input and output bodies. + # + # source://rackup//lib/rackup/stream.rb#169 + def close(error = T.unsafe(nil)); end + + # source://rackup//lib/rackup/stream.rb#154 + def close_read; end + + # close must never be called on the input stream. huh? + # + # source://rackup//lib/rackup/stream.rb#160 + def close_write; end + + # Whether the stream has been closed. + # + # @return [Boolean] + # + # source://rackup//lib/rackup/stream.rb#179 + def closed?; end + + # Whether there are any output chunks remaining? + # + # @return [Boolean] + # + # source://rackup//lib/rackup/stream.rb#184 + def empty?; end + + # source://rackup//lib/rackup/stream.rb#151 + def flush; end + + # Returns the value of attribute input. + # + # source://rackup//lib/rackup/stream.rb#20 + def input; end + + # Returns the value of attribute output. + # + # source://rackup//lib/rackup/stream.rb#21 + def output; end + + # source://rackup//lib/rackup/stream.rb#134 + def write(buffer); end + + # source://rackup//lib/rackup/stream.rb#143 + def write_nonblock(buffer); end + + private + + # source://rackup//lib/rackup/stream.rb#190 + def read_next; end +end + +# This provides a read-only interface for data, which is surprisingly tricky to implement correctly. +# +# source://rackup//lib/rackup/stream.rb#24 +module Rackup::Stream::Reader + # source://rackup//lib/rackup/stream.rb#99 + def each; end + + # source://rackup//lib/rackup/stream.rb#95 + def gets; end + + # read behaves like IO#read. Its signature is read([length, [buffer]]). If given, length must be a non-negative Integer (>= 0) or nil, and buffer must be a String and may not be nil. If length is given and not nil, then this method reads at most length bytes from the input stream. If length is not given or nil, then this method reads all data until EOF. When EOF is reached, this method returns nil if length is given and not nil, or “” if length is not given or is nil. If buffer is given, then the read data will be placed into buffer instead of a newly created String object. + # + # @param length [Integer] the amount of data to read + # @param buffer [String] the buffer which will receive the data + # @return a buffer containing the data + # + # source://rackup//lib/rackup/stream.rb#32 + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end + + # source://rackup//lib/rackup/stream.rb#105 + def read_nonblock(length, buffer = T.unsafe(nil)); end + + # Read at most `length` bytes from the stream. Will avoid reading from the underlying stream if possible. + # + # source://rackup//lib/rackup/stream.rb#74 + def read_partial(length = T.unsafe(nil)); end +end + +# source://rackup//lib/rackup/version.rb#7 +Rackup::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi new file mode 100644 index 0000000..d84b00e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi @@ -0,0 +1,758 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails-dom-testing` gem. +# Please instead update this file by running `bin/tapioca gem rails-dom-testing`. + + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3 +module Rails + class << self + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#45 + def application; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#43 + def application=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#126 + def autoloaders; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#56 + def backtrace_cleaner; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#52 + def configuration; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#75 + def env; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#82 + def env=(environment); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#93 + def error; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/gem_version.rb#5 + def gem_version; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#106 + def groups(*groups); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialize!(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialized?(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#122 + def public_path; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#65 + def root; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/version.rb#7 + def version; end + end +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4 +module Rails::Dom; end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5 +module Rails::Dom::Testing + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version; end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version=(val); end + + class << self + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version; end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#12 + def default_html_version=(val); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing.rb#15 + def html5_support?; end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#19 + def html_document(html_version: T.unsafe(nil)); end + + # source://rails-dom-testing//lib/rails/dom/testing.rb#26 + def html_document_fragment(html_version: T.unsafe(nil)); end + + private + + # source://rails-dom-testing//lib/rails/dom/testing.rb#34 + def choose_html_parser(parser_classes, html_version: T.unsafe(nil)); end + end +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#6 +module Rails::Dom::Testing::Assertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#7 +module Rails::Dom::Testing::Assertions::DomAssertions + # \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order) + # + # # assert that the referenced method generates the appropriate HTML string + # assert_dom_equal( + # 'Apples', + # link_to("Apples", "http://www.example.com"), + # ) + # + # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces + # and newlines). If you want stricter matching with exact matching for whitespace, pass + # strict: true: + # + # # these assertions will both pass + # assert_dom_equal "
    \nfoo\n\
    ", "
    foo
    ", strict: false + # assert_dom_not_equal "
    \nfoo\n\
    ", "
    foo
    ", strict: true + # + # The DOMs are created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_equal expected, actual, html_version: :html5 + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#35 + def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end + + # The negated form of +assert_dom_equal+. + # + # # assert that the referenced method does not generate the specified HTML string + # assert_dom_not_equal( + # 'Apples', + # link_to("Oranges", "http://www.example.com"), + # ) + # + # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces + # and newlines). If you want stricter matching with exact matching for whitespace, pass + # strict: true: + # + # # these assertions will both pass + # assert_dom_equal "
    \nfoo\n\
    ", "
    foo
    ", strict: false + # assert_dom_not_equal "
    \nfoo\n\
    ", "
    foo
    ", strict: true + # + # The DOMs are created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_not_equal expected, actual, html_version: :html5 + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68 + def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end + + protected + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#75 + def compare_doms(expected, actual, strict); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#128 + def equal_attribute?(attr, other_attr); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#115 + def equal_attribute_nodes?(nodes, other_nodes); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#107 + def equal_child?(child, other_child, strict); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#95 + def equal_children?(child, other_child, strict); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#87 + def extract_children(node, strict); end + + private + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#133 + def fragment(text, html_version: T.unsafe(nil)); end +end + +# Adds the +assert_dom+ method for use in Rails functional +# test cases, which can be used to make assertions on the response HTML of a controller +# action. You can also call +assert_dom+ within another +assert_dom+ to +# make assertions on elements selected by the enclosing assertion. +# +# Use +css_select+ to select elements without making an assertions, either +# from the response HTML or elements selected by the enclosing assertion. +# +# In addition to HTML responses, you can make the following assertions: +# +# * +assert_dom_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions. +# * +assert_dom_email+ - Assertions on the HTML body of an e-mail. +# +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#7 +module Rails::Dom::Testing::Assertions::SelectorAssertions + # An assertion that selects elements and makes one or more equality tests. + # + # If the first argument is an element, selects all matching elements + # starting from (and including) that element and all its children in + # depth-first order. + # + # If no element is specified +assert_dom+ selects from + # the element returned in +document_root_element+ + # unless +assert_dom+ is called from within an +assert_dom+ block. + # Override +document_root_element+ to tell +assert_dom+ what to select from. + # The default implementation raises an exception explaining this. + # + # When called with a block +assert_dom+ passes an array of selected elements + # to the block. Calling +assert_dom+ from the block, with no element specified, + # runs the assertion on the complete set of elements selected by the enclosing assertion. + # Alternatively the array may be iterated through so that +assert_dom+ can be called + # separately for each element. + # + # + # ==== Example + # If the response contains two ordered lists, each with four list elements then: + # assert_dom "ol" do |elements| + # elements.each do |element| + # assert_dom element, "li", 4 + # end + # end + # + # will pass, as will: + # assert_dom "ol" do + # assert_dom "li", 8 + # end + # + # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression + # with substitution values (Array). + # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution. + # assert_dom returns nil if called with an invalid css selector. + # + # assert_dom "div:match('id', ?)", "id_string" + # assert_dom "div:match('id', ?)", :id_string + # assert_dom "div:match('id', ?)", 1 + # assert_dom "div:match('id', ?)", /\d+/ + # + # === Equality Tests + # + # The equality test may be one of the following: + # * true - Assertion is true if at least one element selected. + # * false - Assertion is true if no element selected. + # * String/Regexp - Assertion is true if the text value of at least + # one element matches the string or regular expression. + # * Integer - Assertion is true if exactly that number of + # elements are selected. + # * Range - Assertion is true if the number of selected + # elements fit the range. + # If no equality test specified, the assertion is true if at least one + # element selected. + # + # To perform more than one equality tests, use a hash with the following keys: + # * :text - Narrow the selection to elements that have this text + # value (string or regexp). + # * :html - Narrow the selection to elements that have this HTML + # content (string or regexp). + # * :count - Assertion is true if the number of selected elements + # is equal to this value. + # * :minimum - Assertion is true if the number of selected + # elements is at least this value. + # * :maximum - Assertion is true if the number of selected + # elements is at most this value. + # + # If the method is called with a block, once all equality tests are + # evaluated the block is called with an array of all matched elements. + # + # # At least one form element + # assert_dom "form" + # + # # Form element includes four input fields + # assert_dom "form input", 4 + # + # # Page title is "Welcome" + # assert_dom "title", "Welcome" + # + # # Page title is "Welcome" and there is only one title element + # assert_dom "title", {count: 1, text: "Welcome"}, + # "Wrong title or more than one title element" + # + # # Page contains no forms + # assert_dom "form", false, "This page must contain no forms" + # + # # Test the content and style + # assert_dom "body div.header ul.menu" + # + # # Use substitution values + # assert_dom "ol>li:match('id', ?)", /item-\d+/ + # + # # All input fields in the form have a name + # assert_dom "form input" do + # assert_dom ":match('name', ?)", /.+/ # Not empty + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163 + def assert_dom(*args, &block); end + + # Extracts the body of an email and runs nested assertions on it. + # + # You must enable deliveries for this assertion to work, use: + # ActionMailer::Base.perform_deliveries = true + # + # Example usage: + # + # assert_dom_email do + # assert_dom "h1", "Email alert" + # end + # + # assert_dom_email do + # items = assert_dom "ol>li" + # items.each do + # # Work with items here... + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_email(html_version: :html5) do + # assert_dom "h1", "Email alert" + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + def assert_dom_email(html_version: T.unsafe(nil), &block); end + + # Extracts the content of an element, treats it as encoded HTML and runs + # nested assertion on it. + # + # You typically call this method within another assertion to operate on + # all currently selected elements. You can also pass an element or array + # of elements. + # + # The content of each element is un-encoded, and wrapped in the root + # element +encoded+. It then calls the block with all un-encoded elements. + # + # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix) + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # # Select each entry item and then the title item + # assert_dom "entry>title" do + # # Run assertions on the encoded title elements + # assert_dom_encoded do + # assert_dom "b" + # end + # end + # end + # + # + # # Selects all paragraph tags from within the description of an RSS feed + # assert_dom "rss[version=2.0]" do + # # Select description element of each feed item. + # assert_dom "channel>item>description" do + # # Run assertions on the encoded elements. + # assert_dom_encoded do + # assert_dom "p" + # end + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # assert_dom "entry>title" do + # assert_dom_encoded(html_version: :html5) do + # assert_dom "b" + # end + # end + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + def assert_dom_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end + + # An assertion that selects elements and makes one or more equality tests. + # + # If the first argument is an element, selects all matching elements + # starting from (and including) that element and all its children in + # depth-first order. + # + # If no element is specified +assert_dom+ selects from + # the element returned in +document_root_element+ + # unless +assert_dom+ is called from within an +assert_dom+ block. + # Override +document_root_element+ to tell +assert_dom+ what to select from. + # The default implementation raises an exception explaining this. + # + # When called with a block +assert_dom+ passes an array of selected elements + # to the block. Calling +assert_dom+ from the block, with no element specified, + # runs the assertion on the complete set of elements selected by the enclosing assertion. + # Alternatively the array may be iterated through so that +assert_dom+ can be called + # separately for each element. + # + # + # ==== Example + # If the response contains two ordered lists, each with four list elements then: + # assert_dom "ol" do |elements| + # elements.each do |element| + # assert_dom element, "li", 4 + # end + # end + # + # will pass, as will: + # assert_dom "ol" do + # assert_dom "li", 8 + # end + # + # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression + # with substitution values (Array). + # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution. + # assert_dom returns nil if called with an invalid css selector. + # + # assert_dom "div:match('id', ?)", "id_string" + # assert_dom "div:match('id', ?)", :id_string + # assert_dom "div:match('id', ?)", 1 + # assert_dom "div:match('id', ?)", /\d+/ + # + # === Equality Tests + # + # The equality test may be one of the following: + # * true - Assertion is true if at least one element selected. + # * false - Assertion is true if no element selected. + # * String/Regexp - Assertion is true if the text value of at least + # one element matches the string or regular expression. + # * Integer - Assertion is true if exactly that number of + # elements are selected. + # * Range - Assertion is true if the number of selected + # elements fit the range. + # If no equality test specified, the assertion is true if at least one + # element selected. + # + # To perform more than one equality tests, use a hash with the following keys: + # * :text - Narrow the selection to elements that have this text + # value (string or regexp). + # * :html - Narrow the selection to elements that have this HTML + # content (string or regexp). + # * :count - Assertion is true if the number of selected elements + # is equal to this value. + # * :minimum - Assertion is true if the number of selected + # elements is at least this value. + # * :maximum - Assertion is true if the number of selected + # elements is at most this value. + # + # If the method is called with a block, once all equality tests are + # evaluated the block is called with an array of all matched elements. + # + # # At least one form element + # assert_dom "form" + # + # # Form element includes four input fields + # assert_dom "form input", 4 + # + # # Page title is "Welcome" + # assert_dom "title", "Welcome" + # + # # Page title is "Welcome" and there is only one title element + # assert_dom "title", {count: 1, text: "Welcome"}, + # "Wrong title or more than one title element" + # + # # Page contains no forms + # assert_dom "form", false, "This page must contain no forms" + # + # # Test the content and style + # assert_dom "body div.header ul.menu" + # + # # Use substitution values + # assert_dom "ol>li:match('id', ?)", /item-\d+/ + # + # # All input fields in the form have a name + # assert_dom "form input" do + # assert_dom ":match('name', ?)", /.+/ # Not empty + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163 + def assert_select(*args, &block); end + + # Extracts the body of an email and runs nested assertions on it. + # + # You must enable deliveries for this assertion to work, use: + # ActionMailer::Base.perform_deliveries = true + # + # Example usage: + # + # assert_dom_email do + # assert_dom "h1", "Email alert" + # end + # + # assert_dom_email do + # items = assert_dom "ol>li" + # items.each do + # # Work with items here... + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom_email(html_version: :html5) do + # assert_dom "h1", "Email alert" + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285 + def assert_select_email(html_version: T.unsafe(nil), &block); end + + # Extracts the content of an element, treats it as encoded HTML and runs + # nested assertion on it. + # + # You typically call this method within another assertion to operate on + # all currently selected elements. You can also pass an element or array + # of elements. + # + # The content of each element is un-encoded, and wrapped in the root + # element +encoded+. It then calls the block with all un-encoded elements. + # + # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix) + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # # Select each entry item and then the title item + # assert_dom "entry>title" do + # # Run assertions on the encoded title elements + # assert_dom_encoded do + # assert_dom "b" + # end + # end + # end + # + # + # # Selects all paragraph tags from within the description of an RSS feed + # assert_dom "rss[version=2.0]" do + # # Select description element of each feed item. + # assert_dom "channel>item>description" do + # # Run assertions on the encoded elements. + # assert_dom_encoded do + # assert_dom "p" + # end + # end + # end + # + # The DOM is created using an HTML parser specified by + # Rails::Dom::Testing.default_html_version (either :html4 or :html5). + # + # When testing in a Rails application, the parser default can also be set by setting + # +Rails.application.config.dom_testing_default_html_version+. + # + # If you want to specify the HTML parser just for a particular assertion, pass + # html_version: :html4 or html_version: :html5 keyword arguments: + # + # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do + # assert_dom "entry>title" do + # assert_dom_encoded(html_version: :html5) do + # assert_dom "b" + # end + # end + # end + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232 + def assert_select_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end + + # Select and return all matching elements. + # + # If called with a single argument, uses that argument as a selector. + # Called without an element +css_select+ selects from + # the element returned in +document_root_element+ + # + # The default implementation of +document_root_element+ raises an exception explaining this. + # + # Returns an empty Nokogiri::XML::NodeSet if no match is found. + # + # If called with two arguments, uses the first argument as the root + # element and the second argument as the selector. Attempts to match the + # root element and any of its children. + # Returns an empty Nokogiri::XML::NodeSet if no match is found. + # + # The selector may be a CSS selector expression (String). + # css_select returns nil if called with an invalid css selector. + # + # # Selects all div tags + # divs = css_select("div") + # + # # Selects all paragraph tags and does something interesting + # pars = css_select("p") + # pars.each do |par| + # # Do something fun with paragraphs here... + # end + # + # # Selects all list items in unordered lists + # items = css_select("ul>li") + # + # # Selects all form tags and then all inputs inside the form + # forms = css_select("form") + # forms.each do |form| + # inputs = css_select(form, "input") + # ... + # end + # + # @raise [ArgumentError] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#58 + def css_select(*args); end + + private + + # +equals+ must contain :minimum, :maximum and :count keys + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#307 + def assert_size_match!(size, equals, css_selector, message = T.unsafe(nil)); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#319 + def count_description(min, max, count); end + + # @raise [NotImplementedError] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#301 + def document_root_element; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#335 + def nest_selection(selection); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#344 + def nodeset(node); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#331 + def pluralize_element(quantity); end +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#12 +class Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector + include ::Minitest::Assertions + + # @return [HTMLSelector] a new instance of HTMLSelector + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#17 + def initialize(values, previous_selection = T.unsafe(nil), &root_fallback); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + def context; end + + # Returns the value of attribute css_selector. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def css_selector; end + + # Returns the value of attribute message. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def message; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39 + def select; end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33 + def selecting_no_body?; end + + # Returns the value of attribute tests. + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13 + def tests; end + + private + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#100 + def extract_equality_tests; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#72 + def extract_root(previous_selection, root_fallback); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#89 + def extract_selectors; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#48 + def filter(matches); end + + class << self + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46 + def context; end + end +end + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#44 +Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array) + +# source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#8 +class Rails::Dom::Testing::Assertions::SelectorAssertions::SubstitutionContext + # @return [SubstitutionContext] a new instance of SubstitutionContext + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#9 + def initialize; end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#20 + def match(matches, attribute, matcher); end + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13 + def substitute!(selector, values, format_for_presentation = T.unsafe(nil)); end + + private + + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#25 + def matcher_for(value, format_for_presentation); end + + # @return [Boolean] + # + # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#36 + def substitutable?(value); end +end + +# source://rails-dom-testing//lib/rails/dom/testing/railtie.rb#6 +class Rails::Dom::Testing::Railtie < ::Rails::Railtie; end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi new file mode 100644 index 0000000..f9c3675 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi @@ -0,0 +1,785 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails-html-sanitizer` gem. +# Please instead update this file by running `bin/tapioca gem rails-html-sanitizer`. + + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14 +module ActionView + class << self + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/deprecator.rb#4 + def deprecator; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view.rb#93 + def eager_load!; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/gem_version.rb#5 + def gem_version; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/version.rb#7 + def version; end + end +end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#15 +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/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers.rb#35 + def eager_load!; end + end +end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#16 +module ActionView::Helpers::SanitizeHelper + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#111 + def sanitize(html, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#116 + def sanitize_css(style); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#150 + def strip_links(html); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#133 + def strip_tags(html); end + + class << self + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + end +end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17 +module ActionView::Helpers::SanitizeHelper::ClassMethods + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#175 + def full_sanitizer; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#155 + def full_sanitizer=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#185 + def link_sanitizer; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#155 + def link_sanitizer=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#195 + def safe_list_sanitizer; end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#155 + def safe_list_sanitizer=(_arg0); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#165 + def sanitized_allowed_attributes; end + + # Replaces the allowed HTML attributes for the +sanitize+ helper. + # + # class Application < Rails::Application + # config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc'] + # end + # + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#34 + def sanitized_allowed_attributes=(attributes); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_keywords; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_keywords=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_properties; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_properties=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_protocols; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_protocols=(_); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#161 + def sanitized_allowed_tags; end + + # Replaces the allowed tags for the +sanitize+ helper. + # + # class Application < Rails::Application + # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td' + # end + # + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#24 + def sanitized_allowed_tags=(tags); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_bad_tags; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_bad_tags=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_protocol_separator; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_protocol_separator=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_shorthand_css_properties; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_shorthand_css_properties=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_uri_attributes; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_uri_attributes=(_); end + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/helpers/sanitize_helper.rb#157 + def sanitizer_vendor; end + + private + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#52 + def deprecate_option(name); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3 +module Rails + class << self + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def app_class=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#45 + def application; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#43 + def application=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#126 + def autoloaders; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#56 + def backtrace_cleaner; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def cache=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#52 + def configuration; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/deprecator.rb#4 + def deprecator; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#75 + def env; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#82 + def env=(environment); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#93 + def error; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/gem_version.rb#5 + def gem_version; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#106 + def groups(*groups); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialize!(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#49 + def initialized?(*_arg0, **_arg1, &_arg2); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#44 + def logger=(_arg0); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#122 + def public_path; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails.rb#65 + def root; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/version.rb#7 + def version; end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#4 +module Rails::HTML; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#193 +module Rails::HTML4; end + +# == Rails::HTML4::FullSanitizer +# +# Removes all tags from HTML4 but strips out scripts, forms and comments. +# +# full_sanitizer = Rails::HTML4::FullSanitizer.new +# full_sanitizer.sanitize("Bold no more! See more here...") +# # => "Bold no more! See more here..." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#224 +class Rails::HTML4::FullSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::Full + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML4::LinkSanitizer +# +# Removes +a+ tags and +href+ attributes from HTML4 leaving only the link text. +# +# link_sanitizer = Rails::HTML4::LinkSanitizer.new +# link_sanitizer.sanitize('Only the link text will be kept.') +# # => "Only the link text will be kept." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#239 +class Rails::HTML4::LinkSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::Link + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML4::SafeListSanitizer +# +# Sanitizes HTML4 and CSS from an extensive safe list. +# +# === Whitespace +# +# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri, +# which wraps either a C or Java parser for the respective Ruby implementation. Those two +# parsers determine how whitespace is ultimately handled. +# +# When the stripped markup will be rendered the users browser won't take whitespace into account +# anyway. It might be better to suggest your users wrap their whitespace sensitive content in +# pre tags or that you do so automatically. +# +# === Options +# +# Sanitizes both html and css via the safe lists found in +# Rails::HTML::Concern::Scrubber::SafeList +# +# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html. +# There's a class level option: +# +# Rails::HTML4::SafeListSanitizer.allowed_tags = %w(table tr td) +# Rails::HTML4::SafeListSanitizer.allowed_attributes = %w(id class style) +# +# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the +# class level options. +# +# === Examples +# +# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new +# +# # default: sanitize via a extensive safe list of allowed elements +# safe_list_sanitizer.sanitize(@article.body) +# +# # sanitize via the supplied tags and attributes +# safe_list_sanitizer.sanitize( +# @article.body, +# tags: %w(table tr td), +# attributes: %w(id class style), +# ) +# +# # sanitize via a custom Loofah scrubber +# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new) +# +# # prune nodes from the tree instead of stripping tags and leaving inner content +# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new(prune: true) +# +# # the sanitizer can also sanitize CSS +# safe_list_sanitizer.sanitize_css('background-color: #000;') +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#297 +class Rails::HTML4::SafeListSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::SafeList + include ::Rails::HTML::Concern::Serializer::UTF8Encode + + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + def allowed_attributes; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + def allowed_attributes=(_arg0); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#143 + def allowed_tags; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#143 + def allowed_tags=(_arg0); end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#194 +module Rails::HTML4::Sanitizer + extend ::Rails::HTML4::Sanitizer::VendorMethods +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#195 +module Rails::HTML4::Sanitizer::VendorMethods + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#196 + def full_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#200 + def link_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#204 + def safe_list_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#208 + def white_list_sanitizer; end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#305 +module Rails::HTML5; end + +# == Rails::HTML5::FullSanitizer +# +# Removes all tags from HTML5 but strips out scripts, forms and comments. +# +# full_sanitizer = Rails::HTML5::FullSanitizer.new +# full_sanitizer.sanitize("Bold no more! See more here...") +# # => "Bold no more! See more here..." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#334 +class Rails::HTML5::FullSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::Full + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML5::LinkSanitizer +# +# Removes +a+ tags and +href+ attributes from HTML5 leaving only the link text. +# +# link_sanitizer = Rails::HTML5::LinkSanitizer.new +# link_sanitizer.sanitize('Only the link text will be kept.') +# # => "Only the link text will be kept." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#349 +class Rails::HTML5::LinkSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::Link + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML5::SafeListSanitizer +# +# Sanitizes HTML5 and CSS from an extensive safe list. +# +# === Whitespace +# +# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri, +# which wraps either a C or Java parser for the respective Ruby implementation. Those two +# parsers determine how whitespace is ultimately handled. +# +# When the stripped markup will be rendered the users browser won't take whitespace into account +# anyway. It might be better to suggest your users wrap their whitespace sensitive content in +# pre tags or that you do so automatically. +# +# === Options +# +# Sanitizes both html and css via the safe lists found in +# Rails::HTML::Concern::Scrubber::SafeList +# +# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html. +# There's a class level option: +# +# Rails::HTML5::SafeListSanitizer.allowed_tags = %w(table tr td) +# Rails::HTML5::SafeListSanitizer.allowed_attributes = %w(id class style) +# +# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the +# class level options. +# +# === Examples +# +# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new +# +# # default: sanitize via a extensive safe list of allowed elements +# safe_list_sanitizer.sanitize(@article.body) +# +# # sanitize via the supplied tags and attributes +# safe_list_sanitizer.sanitize( +# @article.body, +# tags: %w(table tr td), +# attributes: %w(id class style), +# ) +# +# # sanitize via a custom Loofah scrubber +# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new) +# +# # prune nodes from the tree instead of stripping tags and leaving inner content +# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new(prune: true) +# +# # the sanitizer can also sanitize CSS +# safe_list_sanitizer.sanitize_css('background-color: #000;') +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#407 +class Rails::HTML5::SafeListSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::SafeList + include ::Rails::HTML::Concern::Serializer::UTF8Encode + + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + def allowed_attributes; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#144 + def allowed_attributes=(_arg0); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#143 + def allowed_tags; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#143 + def allowed_tags=(_arg0); end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#306 +class Rails::HTML5::Sanitizer + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#308 + def full_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#312 + def link_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#316 + def safe_list_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#320 + def white_list_sanitizer; end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#33 +module Rails::HTML::Concern; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#34 +module Rails::HTML::Concern::ComposedSanitize + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#35 + def sanitize(html, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#43 +module Rails::HTML::Concern::Parser; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#44 +module Rails::HTML::Concern::Parser::HTML4 + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#45 + def parse_fragment(html); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#50 +module Rails::HTML::Concern::Parser::HTML5 + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#51 + def parse_fragment(html); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#57 +module Rails::HTML::Concern::Scrubber; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#58 +module Rails::HTML::Concern::Scrubber::Full + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#59 + def scrub(fragment, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#64 +module Rails::HTML::Concern::Scrubber::Link + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#65 + def initialize; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#72 + def scrub(fragment, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#77 +module Rails::HTML::Concern::Scrubber::SafeList + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#151 + def initialize(prune: T.unsafe(nil)); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#168 + def sanitize_css(style_string); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#155 + def scrub(fragment, options = T.unsafe(nil)); end + + private + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#177 + def allowed_attributes(options); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#173 + def allowed_tags(options); end + + class << self + # @private + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#141 + def included(klass); end + end +end + +# The default safe list for attributes +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#125 +Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# The default safe list for tags +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#79 +Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_TAGS = T.let(T.unsafe(nil), Set) + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#183 +module Rails::HTML::Concern::Serializer; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#184 +module Rails::HTML::Concern::Serializer::UTF8Encode + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#185 + def serialize(fragment); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#417 +Rails::HTML::FullSanitizer = Rails::HTML4::FullSanitizer + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#418 +Rails::HTML::LinkSanitizer = Rails::HTML4::LinkSanitizer + +# === Rails::HTML::PermitScrubber +# +# +Rails::HTML::PermitScrubber+ allows you to permit only your own tags and/or attributes. +# +# +Rails::HTML::PermitScrubber+ can be subclassed to determine: +# - When a node should be skipped via +skip_node?+. +# - When a node is allowed via +allowed_node?+. +# - When an attribute should be scrubbed via +scrub_attribute?+. +# +# Subclasses don't need to worry if tags or attributes are set or not. +# If tags or attributes are not set, Loofah's behavior will be used. +# If you override +allowed_node?+ and no tags are set, it will not be called. +# Instead Loofahs behavior will be used. +# Likewise for +scrub_attribute?+ and attributes respectively. +# +# Text and CDATA nodes are skipped by default. +# Unallowed elements will be stripped, i.e. element is removed but its subtree kept. +# Supplied tags and attributes should be Enumerables. +# +# +tags=+ +# If set, elements excluded will be stripped. +# If not, elements are stripped based on Loofahs +HTML5::Scrub.allowed_element?+. +# +# +attributes=+ +# If set, attributes excluded will be removed. +# If not, attributes are removed based on Loofahs +HTML5::Scrub.scrub_attributes+. +# +# class CommentScrubber < Rails::HTML::PermitScrubber +# def initialize +# super +# self.tags = %w(form script comment blockquote) +# end +# +# def skip_node?(node) +# node.text? +# end +# +# def scrub_attribute?(name) +# name == "style" +# end +# end +# +# See the documentation for +Nokogiri::XML::Node+ to understand what's possible +# with nodes: https://nokogiri.org/rdoc/Nokogiri/XML/Node.html +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#49 +class Rails::HTML::PermitScrubber < ::Loofah::Scrubber + # @return [PermitScrubber] a new instance of PermitScrubber + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#52 + def initialize(prune: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def attributes; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#62 + def attributes=(attributes); end + + # Returns the value of attribute prune. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def prune; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#66 + def scrub(node); end + + # Returns the value of attribute tags. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def tags; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#58 + def tags=(tags); end + + protected + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#82 + def allowed_node?(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#94 + def keep_node?(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#136 + def scrub_attribute(node, attr_node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#90 + def scrub_attribute?(name); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#107 + def scrub_attributes(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#120 + def scrub_css_attribute(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#102 + def scrub_node(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#86 + def skip_node?(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#129 + def validate!(var, name); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#419 +Rails::HTML::SafeListSanitizer = Rails::HTML4::SafeListSanitizer + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#5 +class Rails::HTML::Sanitizer + extend ::Rails::HTML4::Sanitizer::VendorMethods + + # @raise [NotImplementedError] + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#18 + def sanitize(html, options = T.unsafe(nil)); end + + private + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#28 + def properly_encode(fragment, options); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#23 + def remove_xpaths(node, xpaths); end + + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#13 + def best_supported_vendor; end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#7 + def html5_support?; end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#6 +Rails::HTML::Sanitizer::VERSION = T.let(T.unsafe(nil), String) + +# === Rails::HTML::TargetScrubber +# +# Where +Rails::HTML::PermitScrubber+ picks out tags and attributes to permit in +# sanitization, +Rails::HTML::TargetScrubber+ targets them for removal. +# +# +tags=+ +# If set, elements included will be stripped. +# +# +attributes=+ +# If set, attributes included will be removed. +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#171 +class Rails::HTML::TargetScrubber < ::Rails::HTML::PermitScrubber + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#172 + def allowed_node?(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#176 + def scrub_attribute?(name); end +end + +# === Rails::HTML::TextOnlyScrubber +# +# +Rails::HTML::TextOnlyScrubber+ allows you to permit text nodes. +# +# Unallowed elements will be stripped, i.e. element is removed but its subtree kept. +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#186 +class Rails::HTML::TextOnlyScrubber < ::Loofah::Scrubber + # @return [TextOnlyScrubber] a new instance of TextOnlyScrubber + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#187 + def initialize; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#191 + def scrub(node); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#420 +Rails::HTML::WhiteListSanitizer = Rails::HTML4::SafeListSanitizer + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#11 +Rails::Html = Rails::HTML diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rails@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..e414d25 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails` gem. +# Please instead update this file by running `bin/tapioca gem rails`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store@2.15.0.rbi new file mode 100644 index 0000000..0966338 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store@2.15.0.rbi @@ -0,0 +1,265 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails_event_store` gem. +# Please instead update this file by running `bin/tapioca gem rails_event_store`. + + +# source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#3 +module RailsEventStore; end + +# source://rails_event_store//lib/rails_event_store/active_job_id_only_scheduler.rb#6 +class RailsEventStore::ActiveJobIdOnlyScheduler + # source://rails_event_store//lib/rails_event_store/active_job_id_only_scheduler.rb#7 + def call(klass, record); end + + # source://rails_event_store//lib/rails_event_store/active_job_id_only_scheduler.rb#11 + def verify(subscriber); end +end + +# source://rails_event_store//lib/rails_event_store/active_job_scheduler.rb#6 +class RailsEventStore::ActiveJobScheduler + # @return [ActiveJobScheduler] a new instance of ActiveJobScheduler + # + # source://rails_event_store//lib/rails_event_store/active_job_scheduler.rb#7 + def initialize(serializer:); end + + # source://rails_event_store//lib/rails_event_store/active_job_scheduler.rb#11 + def call(klass, record); end + + # source://rails_event_store//lib/rails_event_store/active_job_scheduler.rb#15 + def verify(subscriber); end + + private + + # Returns the value of attribute serializer. + # + # source://rails_event_store//lib/rails_event_store/active_job_scheduler.rb#25 + def serializer; end +end + +# source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#4 +class RailsEventStore::AfterCommitAsyncDispatcher + # @return [AfterCommitAsyncDispatcher] a new instance of AfterCommitAsyncDispatcher + # + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#5 + def initialize(scheduler:); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#23 + def async_record(schedule_proc); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#9 + def call(subscriber, _, record); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#13 + def run(&schedule_proc); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#27 + def verify(subscriber); end +end + +# source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#31 +class RailsEventStore::AfterCommitAsyncDispatcher::AsyncRecord + # @return [AsyncRecord] a new instance of AsyncRecord + # + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#32 + def initialize(schedule_proc); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#42 + def before_committed!; end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#36 + def committed!(*_arg0); end + + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#40 + def rolledback!(*_arg0); end + + # Returns the value of attribute schedule_proc. + # + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#46 + def schedule_proc; end + + # @return [Boolean] + # + # source://rails_event_store//lib/rails_event_store/after_commit_async_dispatcher.rb#44 + def trigger_transactional_callbacks?; end +end + +# source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#4 +module RailsEventStore::AsyncHandler + class << self + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#22 + def prepended(host_class); end + + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#9 + def with(event_store: T.unsafe(nil), event_store_locator: T.unsafe(nil), serializer: T.unsafe(nil)); end + + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#5 + def with_defaults; end + end +end + +# source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#27 +module RailsEventStore::AsyncHandlerJobIdOnly + class << self + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#44 + def prepended(host_class); end + + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#32 + def with(event_store: T.unsafe(nil), event_store_locator: T.unsafe(nil)); end + + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#28 + def with_defaults; end + end +end + +# source://rails_event_store//lib/rails_event_store/browser.rb#7 +class RailsEventStore::Browser < ::Rails::Engine + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# source://rails_event_store//lib/rails_event_store/client.rb#4 +class RailsEventStore::Client < ::RubyEventStore::Client + # @return [Client] a new instance of Client + # + # source://rails_event_store//lib/rails_event_store/client.rb#7 + def initialize(mapper: T.unsafe(nil), repository: T.unsafe(nil), subscriptions: T.unsafe(nil), dispatcher: T.unsafe(nil), clock: T.unsafe(nil), correlation_id_generator: T.unsafe(nil), request_metadata: T.unsafe(nil)); end + + # Returns the value of attribute request_metadata. + # + # source://rails_event_store//lib/rails_event_store/client.rb#5 + def request_metadata; end + + # source://rails_event_store//lib/rails_event_store/client.rb#32 + def with_request_metadata(env, &block); end + + private + + # source://rails_event_store//lib/rails_event_store/client.rb#38 + def default_request_metadata; end +end + +# source://rails_event_store//lib/rails_event_store/all.rb#29 +RailsEventStore::CorrelatedCommands = RubyEventStore::CorrelatedCommands + +# source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#50 +module RailsEventStore::CorrelatedHandler + # source://rails_event_store//lib/rails_event_store/async_handler_helpers.rb#51 + def perform(event); end +end + +# source://rails_event_store//lib/rails_event_store/all.rb#16 +RailsEventStore::Event = RubyEventStore::Event + +# source://rails_event_store//lib/rails_event_store/all.rb#23 +RailsEventStore::EventNotFound = RubyEventStore::EventNotFound + +# source://rails_event_store//lib/rails_event_store/all.rb#30 +RailsEventStore::GLOBAL_STREAM = T.let(T.unsafe(nil), Object) + +# source://rails_event_store//lib/rails_event_store/all.rb#32 +RailsEventStore::ImmediateAsyncDispatcher = RubyEventStore::ImmediateAsyncDispatcher + +# source://rails_event_store//lib/rails_event_store/all.rb#17 +RailsEventStore::InMemoryRepository = RubyEventStore::InMemoryRepository + +# source://rails_event_store//lib/rails_event_store/all.rb#22 +RailsEventStore::IncorrectStreamData = RubyEventStore::IncorrectStreamData + +# source://rails_event_store//lib/rails_event_store/all.rb#21 +RailsEventStore::InvalidExpectedVersion = RubyEventStore::InvalidExpectedVersion + +# source://rails_event_store//lib/rails_event_store/all.rb#25 +RailsEventStore::InvalidHandler = RubyEventStore::InvalidHandler + +# source://rails_event_store//lib/rails_event_store/all.rb#28 +RailsEventStore::InvalidPageSize = RubyEventStore::InvalidPageSize + +# source://rails_event_store//lib/rails_event_store/all.rb#26 +RailsEventStore::InvalidPageStart = RubyEventStore::InvalidPageStart + +# source://rails_event_store//lib/rails_event_store/all.rb#27 +RailsEventStore::InvalidPageStop = RubyEventStore::InvalidPageStop + +# source://rails_event_store//lib/rails_event_store/json_client.rb#4 +class RailsEventStore::JSONClient < ::RailsEventStore::Client + # @return [JSONClient] a new instance of JSONClient + # + # source://rails_event_store//lib/rails_event_store/json_client.rb#5 + def initialize(mapper: T.unsafe(nil), repository: T.unsafe(nil), subscriptions: T.unsafe(nil), dispatcher: T.unsafe(nil), clock: T.unsafe(nil), correlation_id_generator: T.unsafe(nil), request_metadata: T.unsafe(nil)); end +end + +# source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#16 +class RailsEventStore::LinkByCausationId < ::RubyEventStore::LinkByCausationId + # @return [LinkByCausationId] a new instance of LinkByCausationId + # + # source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#17 + def initialize(event_store: T.unsafe(nil), prefix: T.unsafe(nil)); end +end + +# source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#10 +class RailsEventStore::LinkByCorrelationId < ::RubyEventStore::LinkByCorrelationId + # @return [LinkByCorrelationId] a new instance of LinkByCorrelationId + # + # source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#11 + def initialize(event_store: T.unsafe(nil), prefix: T.unsafe(nil)); end +end + +# source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#22 +class RailsEventStore::LinkByEventType < ::RubyEventStore::LinkByEventType + # @return [LinkByEventType] a new instance of LinkByEventType + # + # source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#23 + def initialize(event_store: T.unsafe(nil), prefix: T.unsafe(nil)); end +end + +# source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#4 +class RailsEventStore::LinkByMetadata < ::RubyEventStore::LinkByMetadata + # @return [LinkByMetadata] a new instance of LinkByMetadata + # + # source://rails_event_store//lib/rails_event_store/link_by_metadata.rb#5 + def initialize(key:, event_store: T.unsafe(nil), prefix: T.unsafe(nil)); end +end + +# source://rails_event_store//lib/rails_event_store/middleware.rb#4 +class RailsEventStore::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://rails_event_store//lib/rails_event_store/middleware.rb#5 + def initialize(app); end + + # source://rails_event_store//lib/rails_event_store/middleware.rb#9 + def call(env); end + + private + + # source://rails_event_store//lib/rails_event_store/middleware.rb#19 + def config; end +end + +# source://rails_event_store//lib/rails_event_store/all.rb#31 +RailsEventStore::PAGE_SIZE = T.let(T.unsafe(nil), Integer) + +# source://rails_event_store//lib/rails_event_store/all.rb#19 +RailsEventStore::Projection = RubyEventStore::Projection + +# source://rails_event_store//lib/rails_event_store/railtie.rb#7 +class RailsEventStore::Railtie < ::Rails::Railtie; end + +# source://rails_event_store//lib/rails_event_store/all.rb#24 +RailsEventStore::SubscriberNotExist = RubyEventStore::SubscriberNotExist + +# source://rails_event_store//lib/rails_event_store/all.rb#18 +RailsEventStore::Subscriptions = RubyEventStore::Subscriptions + +# source://rails_event_store//lib/rails_event_store/version.rb#4 +RailsEventStore::VERSION = T.let(T.unsafe(nil), String) + +# source://rails_event_store//lib/rails_event_store/all.rb#20 +RailsEventStore::WrongExpectedEventVersion = RubyEventStore::WrongExpectedEventVersion diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store_active_record@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store_active_record@2.15.0.rbi new file mode 100644 index 0000000..c98d03b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rails_event_store_active_record@2.15.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails_event_store_active_record` gem. +# Please instead update this file by running `bin/tapioca gem rails_event_store_active_record`. + + +# source://rails_event_store_active_record//lib/rails_event_store_active_record.rb#5 +RailsEventStoreActiveRecord = RubyEventStore::ActiveRecord diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/railties@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/railties@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi new file mode 100644 index 0000000..85dbe6c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/railties@8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9.rbi @@ -0,0 +1,6361 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `railties` gem. +# Please instead update this file by running `bin/tapioca gem railties`. + + +# :include: ../README.rdoc +# +# source://railties//lib/rails/gem_version.rb#3 +module Rails + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::Benchmarkable + + class << self + # Returns the value of attribute app_class. + # + # source://railties//lib/rails.rb#44 + def app_class; end + + # Sets the attribute app_class + # + # @param value the value to set the attribute app_class to. + # + # source://railties//lib/rails.rb#44 + def app_class=(_arg0); end + + # source://railties//lib/rails.rb#45 + def application; end + + # Sets the attribute application + # + # @param value the value to set the attribute application to. + # + # source://railties//lib/rails.rb#43 + def application=(_arg0); end + + # source://railties//lib/rails.rb#126 + def autoloaders; end + + # source://railties//lib/rails.rb#56 + def backtrace_cleaner; end + + # Returns the value of attribute cache. + # + # source://railties//lib/rails.rb#44 + def cache; end + + # Sets the attribute cache + # + # @param value the value to set the attribute cache to. + # + # source://railties//lib/rails.rb#44 + def cache=(_arg0); end + + # The Configuration instance used to configure the \Rails environment + # + # source://railties//lib/rails.rb#52 + def configuration; end + + # source://railties//lib/rails/deprecator.rb#4 + def deprecator; end + + # Returns the current \Rails environment. + # + # Rails.env # => "development" + # Rails.env.development? # => true + # Rails.env.production? # => false + # Rails.env.local? # => true true for "development" and "test", false for anything else + # + # source://railties//lib/rails.rb#75 + def env; end + + # Sets the \Rails environment. + # + # Rails.env = "staging" # => "staging" + # + # source://railties//lib/rails.rb#82 + def env=(environment); end + + # Returns the ActiveSupport::ErrorReporter of the current \Rails project, + # otherwise it returns +nil+ if there is no project. + # + # Rails.error.handle(IOError) do + # # ... + # end + # Rails.error.report(error) + # + # source://railties//lib/rails.rb#93 + def error; end + + # Returns the currently loaded version of \Rails as a +Gem::Version+. + # + # source://railties//lib/rails/gem_version.rb#5 + def gem_version; end + + # Returns all \Rails groups for loading based on: + # + # * The \Rails environment; + # * The environment variable RAILS_GROUPS; + # * The optional envs given as argument and the hash with group dependencies; + # + # Rails.groups assets: [:development, :test] + # # => [:default, "development", :assets] for Rails.env == "development" + # # => [:default, "production"] for Rails.env == "production" + # + # source://railties//lib/rails.rb#106 + def groups(*groups); end + + # source://railties//lib/rails.rb#49 + def initialize!(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails.rb#49 + def initialized?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute logger. + # + # source://railties//lib/rails.rb#44 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://railties//lib/rails.rb#44 + def logger=(_arg0); end + + # Returns a Pathname object of the public folder of the current + # \Rails project, otherwise it returns +nil+ if there is no project: + # + # Rails.public_path + # # => # + # + # source://railties//lib/rails.rb#122 + def public_path; end + + # Returns a Pathname object of the current \Rails project, + # otherwise it returns +nil+ if there is no project: + # + # Rails.root + # # => # + # + # source://railties//lib/rails.rb#65 + def root; end + + # Returns the currently loaded version of \Rails as a string. + # + # source://railties//lib/rails/version.rb#7 + def version; end + end +end + +# An Engine with the responsibility of coordinating the whole boot process. +# +# == Initialization +# +# Rails::Application is responsible for executing all railties and engines +# initializers. It also executes some bootstrap initializers (check +# Rails::Application::Bootstrap) and finishing initializers, after all the others +# are executed (check Rails::Application::Finisher). +# +# == \Configuration +# +# Besides providing the same configuration as Rails::Engine and Rails::Railtie, +# the application object has several specific configurations, for example +# +enable_reloading+, +consider_all_requests_local+, +filter_parameters+, +# +logger+, and so forth. +# +# Check Rails::Application::Configuration to see them all. +# +# == Routes +# +# The application object is also responsible for holding the routes and reloading routes +# whenever the files change in development. +# +# == Middlewares +# +# The Application is also responsible for building the middleware stack. +# +# == Booting process +# +# The application is also responsible for setting up and executing the booting +# process. From the moment you require config/application.rb in your app, +# the booting process goes like this: +# +# 1. require "config/boot.rb" to set up load paths. +# 2. +require+ railties and engines. +# 3. Define +Rails.application+ as class MyApp::Application < Rails::Application. +# 4. Run +config.before_configuration+ callbacks. +# 5. Load config/environments/ENV.rb. +# 6. Run +config.before_initialize+ callbacks. +# 7. Run Railtie#initializer defined by railties, engines, and application. +# One by one, each engine sets up its load paths and routes, and runs its config/initializers/* files. +# 8. Custom Railtie#initializers added by railties, engines, and applications are executed. +# 9. Build the middleware stack and run +to_prepare+ callbacks. +# 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+. +# 11. Run +config.after_initialize+ callbacks. +# +# source://railties//lib/rails/application.rb#62 +class Rails::Application < ::Rails::Engine + # @return [Application] a new instance of Application + # + # source://railties//lib/rails/application.rb#109 + def initialize(initial_variable_values = T.unsafe(nil), &block); end + + # Returns the value of attribute assets. + # + # source://railties//lib/rails/application.rb#100 + def assets; end + + # Sets the attribute assets + # + # @param value the value to set the attribute assets to. + # + # source://railties//lib/rails/application.rb#100 + def assets=(_arg0); end + + # Returns the value of attribute autoloaders. + # + # source://railties//lib/rails/application.rb#102 + def autoloaders; end + + # source://railties//lib/rails/engine.rb#517 + def build_middleware_stack; end + + # source://railties//lib/rails/application.rb#451 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://railties//lib/rails/application.rb#455 + def config=(_arg0); end + + # Convenience for loading config/foo.yml for the current \Rails env. + # Example: + # + # # config/exception_notification.yml: + # production: + # url: http://127.0.0.1:8080 + # namespace: my_app_production + # + # development: + # url: http://localhost:3001 + # namespace: my_app_development + # + # + # + # # config/environments/production.rb + # Rails.application.configure do + # config.middleware.use ExceptionNotifier, config_for(:exception_notification) + # end + # + # You can also store configurations in a shared section which will be merged + # with the environment configuration + # + # # config/example.yml + # shared: + # foo: + # bar: + # baz: 1 + # + # development: + # foo: + # bar: + # qux: 2 + # + # + # + # # development environment + # Rails.application.config_for(:example)[:foo][:bar] + # # => { baz: 1, qux: 2 } + # + # source://railties//lib/rails/application.rb#288 + def config_for(name, env: T.unsafe(nil)); end + + # Sends any console called in the instance of a new application up + # to the +console+ method defined in Rails::Railtie. + # + # source://railties//lib/rails/application.rb#371 + def console(&blk); end + + # Returns an ActiveSupport::EncryptedConfiguration instance for the + # credentials file specified by +config.credentials.content_path+. + # + # By default, +config.credentials.content_path+ will point to either + # config/credentials/#{environment}.yml.enc for the current + # environment (for example, +config/credentials/production.yml.enc+ for the + # +production+ environment), or +config/credentials.yml.enc+ if that file + # does not exist. + # + # The encryption key is taken from either ENV["RAILS_MASTER_KEY"], + # or from the file specified by +config.credentials.key_path+. By default, + # +config.credentials.key_path+ will point to either + # config/credentials/#{environment}.key for the current + # environment, or +config/master.key+ if that file does not exist. + # + # source://railties//lib/rails/application.rb#492 + def credentials; end + + # Sets the attribute credentials + # + # @param value the value to set the attribute credentials to. + # + # source://railties//lib/rails/application.rb#456 + def credentials=(_arg0); end + + # source://railties//lib/rails/application.rb#104 + def default_url_options(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/application.rb#104 + def default_url_options=(arg); end + + # A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators). + # The collection's configuration methods affect all deprecators in the + # collection. Additionally, the collection's +silence+ method silences all + # deprecators in the collection for the duration of a given block. + # + # source://railties//lib/rails/application.rb#244 + def deprecators; end + + # Eager loads the application code. + # + # source://railties//lib/rails/application.rb#550 + def eager_load!; end + + # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted + # file. By default, the encryption key is taken from either + # ENV["RAILS_MASTER_KEY"], or from the +config/master.key+ file. + # + # my_config = Rails.application.encrypted("config/my_config.enc") + # + # my_config.read + # # => "foo:\n bar: 123\n" + # + # my_config.foo.bar + # # => 123 + # + # Encrypted files can be edited with the bin/rails encrypted:edit + # command. (See the output of bin/rails encrypted:edit --help for + # more information.) + # + # source://railties//lib/rails/application.rb#511 + def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end + + # Stores some of the \Rails initial environment parameters which + # will be used by middlewares and engines to configure themselves. + # + # source://railties//lib/rails/application.rb#317 + def env_config; end + + # Returns the value of attribute executor. + # + # source://railties//lib/rails/application.rb#102 + def executor; end + + # Sends any generators called in the instance of a new application up + # to the +generators+ method defined in Rails::Railtie. + # + # source://railties//lib/rails/application.rb#377 + def generators(&blk); end + + # source://railties//lib/rails/application.rb#524 + def helpers_paths; end + + # Initialize the application passing the given group. By default, the + # group is :default + # + # source://railties//lib/rails/application.rb#438 + def initialize!(group = T.unsafe(nil)); end + + # Returns true if the application is initialized. + # + # @return [Boolean] + # + # source://railties//lib/rails/application.rb#134 + def initialized?; end + + # Sends the initializers to the +initializer+ method defined in the + # Rails::Initializable module. Each Rails::Application class has its own + # set of initializers, as defined by the Initializable module. + # + # source://railties//lib/rails/application.rb#359 + def initializer(name, opts = T.unsafe(nil), &block); end + + # source://railties//lib/rails/application.rb#445 + def initializers; end + + # Sends the +isolate_namespace+ method up to the class method. + # + # source://railties//lib/rails/application.rb#388 + def isolate_namespace(mod); end + + # Returns a key generator (ActiveSupport::CachingKeyGenerator) for a + # specified +secret_key_base+. The return value is memoized, so additional + # calls with the same +secret_key_base+ will return the same key generator + # instance. + # + # source://railties//lib/rails/application.rb#172 + def key_generator(secret_key_base = T.unsafe(nil)); end + + # source://railties//lib/rails/application.rb#544 + def load_generators(app = T.unsafe(nil)); end + + # Returns a message verifier object. + # + # This verifier can be used to generate and verify signed messages in the application. + # + # It is recommended not to use the same verifier for different things, so you can get different + # verifiers passing the +verifier_name+ argument. + # + # For instance, +ActiveStorage::Blob.signed_id_verifier+ is implemented using this feature, which assures that + # the IDs strings haven't been tampered with and are safe to use in a finder. + # + # See the ActiveSupport::MessageVerifier documentation for more information. + # + # ==== Parameters + # + # * +verifier_name+ - the name of the message verifier. + # + # ==== Examples + # + # message = Rails.application.message_verifier('my_purpose').generate('data to sign against tampering') + # Rails.application.message_verifier('my_purpose').verify(message) + # # => 'data to sign against tampering' + # + # source://railties//lib/rails/application.rb#236 + def message_verifier(verifier_name); end + + # Returns a message verifier factory (ActiveSupport::MessageVerifiers). This + # factory can be used as a central point to configure and create message + # verifiers (ActiveSupport::MessageVerifier) for your application. + # + # By default, message verifiers created by this factory will generate + # messages using the default ActiveSupport::MessageVerifier options. You can + # override these options with a combination of + # ActiveSupport::MessageVerifiers#clear_rotations and + # ActiveSupport::MessageVerifiers#rotate. However, this must be done prior + # to building any message verifier instances. For example, in a + # +before_initialize+ block: + # + # # Use `url_safe: true` when generating messages + # config.before_initialize do |app| + # app.message_verifiers.clear_rotations + # app.message_verifiers.rotate(url_safe: true) + # end + # + # Message verifiers created by this factory will always use a secret derived + # from #secret_key_base when generating messages. +clear_rotations+ will not + # affect this behavior. However, older +secret_key_base+ values can be + # rotated for verifying messages: + # + # # Fall back to old `secret_key_base` when verifying messages + # config.before_initialize do |app| + # app.message_verifiers.rotate(secret_key_base: "old secret_key_base") + # end + # + # source://railties//lib/rails/application.rb#208 + def message_verifiers; end + + # Return an array of railties respecting the order they're loaded + # and the order specified by the +railties_order+ config. + # + # While running initializers we need engines in reverse order here when + # copying migrations from railties ; we need them in the order given by + # +railties_order+. + # + # source://railties//lib/rails/application.rb#540 + def migration_railties; end + + # Returns the dasherized application name. + # + # MyApp::Application.new.name => "my-app" + # + # source://railties//lib/rails/application.rb#141 + def name; end + + # If you try to define a set of Rake tasks on the instance, these will get + # passed up to the Rake tasks defined on the application's class. + # + # source://railties//lib/rails/application.rb#352 + def rake_tasks(&block); end + + # Reload application routes regardless if they changed or not. + # + # source://railties//lib/rails/application.rb#160 + def reload_routes!; end + + # source://railties//lib/rails/application.rb#164 + def reload_routes_unless_loaded; end + + # Returns the value of attribute reloader. + # + # source://railties//lib/rails/application.rb#102 + def reloader; end + + # Returns the value of attribute reloaders. + # + # source://railties//lib/rails/application.rb#102 + def reloaders; end + + # source://railties//lib/rails/application.rb#414 + def require_environment!; end + + # source://railties//lib/rails/application.rb#419 + def routes_reloader; end + + # source://railties//lib/rails/application.rb#145 + def run_load_hooks!; end + + # Sends any runner called in the instance of a new application up + # to the +runner+ method defined in Rails::Railtie. + # + # source://railties//lib/rails/application.rb#365 + def runner(&blk); end + + # Returns the value of attribute sandbox. + # + # source://railties//lib/rails/application.rb#100 + def sandbox; end + + # Sets the attribute sandbox + # + # @param value the value to set the attribute sandbox to. + # + # source://railties//lib/rails/application.rb#100 + def sandbox=(_arg0); end + + # Returns the value of attribute sandbox. + # + # source://railties//lib/rails/application.rb#100 + def sandbox?; end + + # The secret_key_base is used as the input secret to the application's key generator, which in turn + # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, + # including the ones that sign and encrypt cookies. + # + # In development and test, this is randomly generated and stored in a + # temporary file in tmp/local_secret.txt. + # + # You can also set ENV["SECRET_KEY_BASE_DUMMY"] to trigger the use of a randomly generated + # secret_key_base that's stored in a temporary file. This is useful when precompiling assets for + # production as part of a build step that otherwise does not need access to the production secrets. + # + # Dockerfile example: RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile. + # + # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], + # then +credentials.secret_key_base+. For most applications, the correct place to store it is in the + # encrypted credentials file. + # + # source://railties//lib/rails/application.rb#474 + def secret_key_base; end + + # Sends any server called in the instance of a new application up + # to the +server+ method defined in Rails::Railtie. + # + # source://railties//lib/rails/application.rb#383 + def server(&blk); end + + # source://railties//lib/rails/application.rb#520 + def to_app; end + + # Returns an array of file paths appended with a hash of + # directories-extensions suitable for ActiveSupport::FileUpdateChecker + # API. + # + # source://railties//lib/rails/application.rb#426 + def watchable_args; end + + protected + + # source://railties//lib/rails/application.rb#623 + def default_middleware_stack; end + + # source://railties//lib/rails/application.rb#628 + def ensure_generator_templates_added; end + + # Returns the ordered railties for this application considering railties_order. + # + # source://railties//lib/rails/application.rb#589 + def ordered_railties; end + + # source://railties//lib/rails/application.rb#611 + def railties_initializers(current); end + + # source://railties//lib/rails/application.rb#578 + def run_console_blocks(app); end + + # source://railties//lib/rails/application.rb#568 + def run_generators_blocks(app); end + + # source://railties//lib/rails/application.rb#573 + def run_runner_blocks(app); end + + # source://railties//lib/rails/application.rb#583 + def run_server_blocks(app); end + + # source://railties//lib/rails/application.rb#557 + def run_tasks_blocks(app); end + + private + + # source://railties//lib/rails/application.rb#641 + def build_middleware; end + + # source://railties//lib/rails/application.rb#634 + def build_request(env); end + + # source://railties//lib/rails/application.rb#645 + def coerce_same_site_protection(protection); end + + # source://railties//lib/rails/application.rb#649 + def filter_parameters; end + + class << self + # This method is called just after an application inherits from Rails::Application, + # allowing the developer to load classes in lib and use them during application + # configuration. + # + # class MyApplication < Rails::Application + # require "my_backend" # in lib/my_backend + # config.i18n.backend = MyBackend + # end + # + # Notice this method takes into consideration the default root path. So if you + # are changing config.root inside your application definition or having a custom + # Rails application, you will need to add lib to $LOAD_PATH on your own in case + # you need to load files in lib/ during the application configuration as well. + # + # source://railties//lib/rails/application.rb#407 + def add_lib_to_load_path!(root); end + + # source://railties//lib/rails/application.rb#84 + def create(initial_variable_values = T.unsafe(nil), &block); end + + # source://railties//lib/rails/application.rb#88 + def find_root(from); end + + # @private + # + # source://railties//lib/rails/application.rb#71 + def inherited(base); end + + # source://railties//lib/rails/application.rb#80 + def instance; end + + def new(*_arg0); end + end +end + +# source://railties//lib/rails/application/bootstrap.rb#11 +module Rails::Application::Bootstrap + include ::Rails::Initializable + extend ::Rails::Initializable::ClassMethods +end + +# source://railties//lib/rails/application/configuration.rb#13 +class Rails::Application::Configuration < ::Rails::Engine::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://railties//lib/rails/application/configuration.rb#30 + def initialize(*_arg0); end + + # Returns the value of attribute add_autoload_paths_to_load_path. + # + # source://railties//lib/rails/application/configuration.rb#14 + def add_autoload_paths_to_load_path; end + + # Sets the attribute add_autoload_paths_to_load_path + # + # @param value the value to set the attribute add_autoload_paths_to_load_path to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def add_autoload_paths_to_load_path=(_arg0); end + + # Returns the value of attribute allow_concurrency. + # + # source://railties//lib/rails/application/configuration.rb#14 + def allow_concurrency; end + + # Sets the attribute allow_concurrency + # + # @param value the value to set the attribute allow_concurrency to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def allow_concurrency=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#571 + def annotations; end + + # Returns the value of attribute api_only. + # + # source://railties//lib/rails/application/configuration.rb#28 + def api_only; end + + # source://railties//lib/rails/application/configuration.rb#386 + def api_only=(value); end + + # Returns the value of attribute asset_host. + # + # source://railties//lib/rails/application/configuration.rb#14 + def asset_host; end + + # Sets the attribute asset_host + # + # @param value the value to set the attribute asset_host to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def asset_host=(_arg0); end + + # Returns the value of attribute assume_ssl. + # + # source://railties//lib/rails/application/configuration.rb#14 + def assume_ssl; end + + # Sets the attribute assume_ssl + # + # @param value the value to set the attribute assume_ssl to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def assume_ssl=(_arg0); end + + # Returns the value of attribute autoflush_log. + # + # source://railties//lib/rails/application/configuration.rb#14 + def autoflush_log; end + + # Sets the attribute autoflush_log + # + # @param value the value to set the attribute autoflush_log to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def autoflush_log=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#481 + def autoload_lib(ignore:); end + + # source://railties//lib/rails/application/configuration.rb#493 + def autoload_lib_once(ignore:); end + + # Returns the value of attribute beginning_of_week. + # + # source://railties//lib/rails/application/configuration.rb#14 + def beginning_of_week; end + + # Sets the attribute beginning_of_week + # + # @param value the value to set the attribute beginning_of_week to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def beginning_of_week=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#398 + def broadcast_log_level; end + + # Returns the value of attribute cache_classes. + # + # source://railties//lib/rails/application/configuration.rb#14 + def cache_classes; end + + # Sets the attribute cache_classes + # + # @param value the value to set the attribute cache_classes to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def cache_classes=(_arg0); end + + # Returns the value of attribute cache_store. + # + # source://railties//lib/rails/application/configuration.rb#14 + def cache_store; end + + # Sets the attribute cache_store + # + # @param value the value to set the attribute cache_store to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def cache_store=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#505 + def colorize_logging; end + + # source://railties//lib/rails/application/configuration.rb#509 + def colorize_logging=(val); end + + # Returns the value of attribute consider_all_requests_local. + # + # source://railties//lib/rails/application/configuration.rb#14 + def consider_all_requests_local; end + + # Sets the attribute consider_all_requests_local + # + # @param value the value to set the attribute consider_all_requests_local to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def consider_all_requests_local=(_arg0); end + + # Returns the value of attribute console. + # + # source://railties//lib/rails/application/configuration.rb#14 + def console; end + + # Sets the attribute console + # + # @param value the value to set the attribute console to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def console=(_arg0); end + + # Configures the ActionDispatch::ContentSecurityPolicy. + # + # source://railties//lib/rails/application/configuration.rb#576 + def content_security_policy(&block); end + + # Returns the value of attribute content_security_policy_nonce_directives. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_nonce_directives; end + + # Sets the attribute content_security_policy_nonce_directives + # + # @param value the value to set the attribute content_security_policy_nonce_directives to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_nonce_directives=(_arg0); end + + # Returns the value of attribute content_security_policy_nonce_generator. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_nonce_generator; end + + # Sets the attribute content_security_policy_nonce_generator + # + # @param value the value to set the attribute content_security_policy_nonce_generator to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_nonce_generator=(_arg0); end + + # Returns the value of attribute content_security_policy_report_only. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_report_only; end + + # Sets the attribute content_security_policy_report_only + # + # @param value the value to set the attribute content_security_policy_report_only to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def content_security_policy_report_only=(_arg0); end + + # Returns the value of attribute credentials. + # + # source://railties//lib/rails/application/configuration.rb#14 + def credentials; end + + # Sets the attribute credentials + # + # @param value the value to set the attribute credentials to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def credentials=(_arg0); end + + # Loads and returns the entire raw configuration of database from + # values stored in config/database.yml. + # + # source://railties//lib/rails/application/configuration.rb#444 + def database_configuration; end + + # source://railties//lib/rails/application/configuration.rb#400 + def debug_exception_response_format; end + + # Sets the attribute debug_exception_response_format + # + # @param value the value to set the attribute debug_exception_response_format to. + # + # source://railties//lib/rails/application/configuration.rb#404 + def debug_exception_response_format=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#593 + def default_log_file; end + + # Returns the value of attribute disable_sandbox. + # + # source://railties//lib/rails/application/configuration.rb#14 + def disable_sandbox; end + + # Sets the attribute disable_sandbox + # + # @param value the value to set the attribute disable_sandbox to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def disable_sandbox=(_arg0); end + + # Returns the value of attribute dom_testing_default_html_version. + # + # source://railties//lib/rails/application/configuration.rb#14 + def dom_testing_default_html_version; end + + # Sets the attribute dom_testing_default_html_version + # + # @param value the value to set the attribute dom_testing_default_html_version to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def dom_testing_default_html_version=(_arg0); end + + # Returns the value of attribute eager_load. + # + # source://railties//lib/rails/application/configuration.rb#14 + def eager_load; end + + # Sets the attribute eager_load + # + # @param value the value to set the attribute eager_load to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def eager_load=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#362 + def enable_reloading; end + + # source://railties//lib/rails/application/configuration.rb#366 + def enable_reloading=(value); end + + # Returns the value of attribute encoding. + # + # source://railties//lib/rails/application/configuration.rb#28 + def encoding; end + + # source://railties//lib/rails/application/configuration.rb#378 + def encoding=(value); end + + # Returns the value of attribute exceptions_app. + # + # source://railties//lib/rails/application/configuration.rb#14 + def exceptions_app; end + + # Sets the attribute exceptions_app + # + # @param value the value to set the attribute exceptions_app to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def exceptions_app=(_arg0); end + + # Returns the value of attribute file_watcher. + # + # source://railties//lib/rails/application/configuration.rb#14 + def file_watcher; end + + # Sets the attribute file_watcher + # + # @param value the value to set the attribute file_watcher to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def file_watcher=(_arg0); end + + # Returns the value of attribute filter_parameters. + # + # source://railties//lib/rails/application/configuration.rb#14 + def filter_parameters; end + + # Sets the attribute filter_parameters + # + # @param value the value to set the attribute filter_parameters to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def filter_parameters=(_arg0); end + + # Returns the value of attribute filter_redirect. + # + # source://railties//lib/rails/application/configuration.rb#14 + def filter_redirect; end + + # Sets the attribute filter_redirect + # + # @param value the value to set the attribute filter_redirect to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def filter_redirect=(_arg0); end + + # Returns the value of attribute force_ssl. + # + # source://railties//lib/rails/application/configuration.rb#14 + def force_ssl; end + + # Sets the attribute force_ssl + # + # @param value the value to set the attribute force_ssl to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def force_ssl=(_arg0); end + + # Returns the value of attribute helpers_paths. + # + # source://railties//lib/rails/application/configuration.rb#14 + def helpers_paths; end + + # Sets the attribute helpers_paths + # + # @param value the value to set the attribute helpers_paths to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def helpers_paths=(_arg0); end + + # Returns the value of attribute host_authorization. + # + # source://railties//lib/rails/application/configuration.rb#14 + def host_authorization; end + + # Sets the attribute host_authorization + # + # @param value the value to set the attribute host_authorization to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def host_authorization=(_arg0); end + + # Returns the value of attribute hosts. + # + # source://railties//lib/rails/application/configuration.rb#14 + def hosts; end + + # Sets the attribute hosts + # + # @param value the value to set the attribute hosts to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def hosts=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#605 + def inspect; end + + # Load the config/database.yml to create the Rake tasks for + # multiple databases without loading the environment and filling in the + # environment specific configuration values. + # + # Do not use this method, use #database_configuration instead. + # + # source://railties//lib/rails/application/configuration.rb#426 + def load_database_yaml; end + + # Loads default configuration values for a target version. This includes + # defaults for versions prior to the target version. See the + # {configuration guide}[https://guides.rubyonrails.org/configuring.html#versioned-default-values] + # for the default values associated with a particular version. + # + # source://railties//lib/rails/application/configuration.rb#92 + def load_defaults(target_version); end + + # Returns the value of attribute loaded_config_version. + # + # source://railties//lib/rails/application/configuration.rb#28 + def loaded_config_version; end + + # Returns the value of attribute log_file_size. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_file_size; end + + # Sets the attribute log_file_size + # + # @param value the value to set the attribute log_file_size to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_file_size=(_arg0); end + + # Returns the value of attribute log_formatter. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_formatter; end + + # Sets the attribute log_formatter + # + # @param value the value to set the attribute log_formatter to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_formatter=(_arg0); end + + # Returns the value of attribute log_level. + # + # source://railties//lib/rails/application/configuration.rb#28 + def log_level; end + + # source://railties//lib/rails/application/configuration.rb#393 + def log_level=(level); end + + # Returns the value of attribute log_tags. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_tags; end + + # Sets the attribute log_tags + # + # @param value the value to set the attribute log_tags to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def log_tags=(_arg0); end + + # Returns the value of attribute logger. + # + # source://railties//lib/rails/application/configuration.rb#14 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def logger=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#406 + def paths; end + + # Configures the ActionDispatch::PermissionsPolicy. + # + # source://railties//lib/rails/application/configuration.rb#585 + def permissions_policy(&block); end + + # Returns the value of attribute precompile_filter_parameters. + # + # source://railties//lib/rails/application/configuration.rb#14 + def precompile_filter_parameters; end + + # Sets the attribute precompile_filter_parameters + # + # @param value the value to set the attribute precompile_filter_parameters to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def precompile_filter_parameters=(_arg0); end + + # Returns the value of attribute public_file_server. + # + # source://railties//lib/rails/application/configuration.rb#14 + def public_file_server; end + + # Sets the attribute public_file_server + # + # @param value the value to set the attribute public_file_server to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def public_file_server=(_arg0); end + + # Returns the value of attribute railties_order. + # + # source://railties//lib/rails/application/configuration.rb#14 + def railties_order; end + + # Sets the attribute railties_order + # + # @param value the value to set the attribute railties_order to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def railties_order=(_arg0); end + + # Returns the value of attribute rake_eager_load. + # + # source://railties//lib/rails/application/configuration.rb#14 + def rake_eager_load; end + + # Sets the attribute rake_eager_load + # + # @param value the value to set the attribute rake_eager_load to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def rake_eager_load=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#370 + def read_encrypted_secrets; end + + # source://railties//lib/rails/application/configuration.rb#374 + def read_encrypted_secrets=(value); end + + # Returns the value of attribute relative_url_root. + # + # source://railties//lib/rails/application/configuration.rb#14 + def relative_url_root; end + + # Sets the attribute relative_url_root + # + # @param value the value to set the attribute relative_url_root to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def relative_url_root=(_arg0); end + + # Returns the value of attribute reload_classes_only_on_change. + # + # source://railties//lib/rails/application/configuration.rb#14 + def reload_classes_only_on_change; end + + # Sets the attribute reload_classes_only_on_change + # + # @param value the value to set the attribute reload_classes_only_on_change to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def reload_classes_only_on_change=(_arg0); end + + # @return [Boolean] + # + # source://railties//lib/rails/application/configuration.rb#358 + def reloading_enabled?; end + + # Returns the value of attribute require_master_key. + # + # source://railties//lib/rails/application/configuration.rb#14 + def require_master_key; end + + # Sets the attribute require_master_key + # + # @param value the value to set the attribute require_master_key to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def require_master_key=(_arg0); end + + # Returns the value of attribute sandbox_by_default. + # + # source://railties//lib/rails/application/configuration.rb#14 + def sandbox_by_default; end + + # Sets the attribute sandbox_by_default + # + # @param value the value to set the attribute sandbox_by_default to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def sandbox_by_default=(_arg0); end + + # source://railties//lib/rails/application/configuration.rb#514 + def secret_key_base; end + + # source://railties//lib/rails/application/configuration.rb#524 + def secret_key_base=(new_secret_key_base); end + + # Returns the value of attribute server_timing. + # + # source://railties//lib/rails/application/configuration.rb#14 + def server_timing; end + + # Sets the attribute server_timing + # + # @param value the value to set the attribute server_timing to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def server_timing=(_arg0); end + + # Returns the value of attribute session_options. + # + # source://railties//lib/rails/application/configuration.rb#14 + def session_options; end + + # Sets the attribute session_options + # + # @param value the value to set the attribute session_options to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def session_options=(_arg0); end + + # Specifies what class to use to store the session. Possible values + # are +:cache_store+, +:cookie_store+, +:mem_cache_store+, a custom + # store, or +:disabled+. +:disabled+ tells \Rails not to deal with + # sessions. + # + # Additional options will be set as +session_options+: + # + # config.session_store :cookie_store, key: "_your_app_session" + # config.session_options # => {key: "_your_app_session"} + # + # If a custom store is specified as a symbol, it will be resolved to + # the +ActionDispatch::Session+ namespace: + # + # # use ActionDispatch::Session::MyCustomStore as the session store + # config.session_store :my_custom_store + # + # source://railties//lib/rails/application/configuration.rb#551 + def session_store(new_session_store = T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://railties//lib/rails/application/configuration.rb#567 + def session_store?; end + + # Returns the value of attribute silence_healthcheck_path. + # + # source://railties//lib/rails/application/configuration.rb#14 + def silence_healthcheck_path; end + + # Sets the attribute silence_healthcheck_path + # + # @param value the value to set the attribute silence_healthcheck_path to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def silence_healthcheck_path=(_arg0); end + + # Returns the value of attribute ssl_options. + # + # source://railties//lib/rails/application/configuration.rb#14 + def ssl_options; end + + # Sets the attribute ssl_options + # + # @param value the value to set the attribute ssl_options to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def ssl_options=(_arg0); end + + # Returns the value of attribute time_zone. + # + # source://railties//lib/rails/application/configuration.rb#14 + def time_zone; end + + # Sets the attribute time_zone + # + # @param value the value to set the attribute time_zone to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def time_zone=(_arg0); end + + # Returns the value of attribute x. + # + # source://railties//lib/rails/application/configuration.rb#14 + def x; end + + # Sets the attribute x + # + # @param value the value to set the attribute x to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def x=(_arg0); end + + # Returns the value of attribute yjit. + # + # source://railties//lib/rails/application/configuration.rb#14 + def yjit; end + + # Sets the attribute yjit + # + # @param value the value to set the attribute yjit to. + # + # source://railties//lib/rails/application/configuration.rb#14 + def yjit=(_arg0); end + + private + + # source://railties//lib/rails/application/configuration.rb#632 + def credentials_defaults; end + + # source://railties//lib/rails/application/configuration.rb#642 + def generate_local_secret; end + + # @return [Boolean] + # + # source://railties//lib/rails/application/configuration.rb#654 + def generate_local_secret?; end +end + +# source://railties//lib/rails/application/configuration.rb#609 +class Rails::Application::Configuration::Custom + # @return [Custom] a new instance of Custom + # + # source://railties//lib/rails/application/configuration.rb#610 + def initialize; end + + # source://railties//lib/rails/application/configuration.rb#614 + def method_missing(method, *args); end + + private + + # @return [Boolean] + # + # source://railties//lib/rails/application/configuration.rb#626 + def respond_to_missing?(symbol, _); end +end + +# source://railties//lib/rails/application/default_middleware_stack.rb#5 +class Rails::Application::DefaultMiddlewareStack + # @return [DefaultMiddlewareStack] a new instance of DefaultMiddlewareStack + # + # source://railties//lib/rails/application/default_middleware_stack.rb#8 + def initialize(app, config, paths); end + + # Returns the value of attribute app. + # + # source://railties//lib/rails/application/default_middleware_stack.rb#6 + def app; end + + # source://railties//lib/rails/application/default_middleware_stack.rb#14 + def build_stack; end + + # Returns the value of attribute config. + # + # source://railties//lib/rails/application/default_middleware_stack.rb#6 + def config; end + + # Returns the value of attribute paths. + # + # source://railties//lib/rails/application/default_middleware_stack.rb#6 + def paths; end + + private + + # source://railties//lib/rails/application/default_middleware_stack.rb#113 + def load_rack_cache; end + + # source://railties//lib/rails/application/default_middleware_stack.rb#135 + def show_exceptions_app; end +end + +# source://railties//lib/rails/application/finisher.rb#11 +module Rails::Application::Finisher + include ::Rails::Initializable + extend ::Rails::Initializable::ClassMethods +end + +# source://railties//lib/rails/application/finisher.rb#111 +module Rails::Application::Finisher::InterlockHook + class << self + # source://railties//lib/rails/application/finisher.rb#116 + def complete(_state); end + + # source://railties//lib/rails/application/finisher.rb#112 + def run; end + end +end + +# source://railties//lib/rails/application/finisher.rb#97 +class Rails::Application::Finisher::MonitorHook + # @return [MonitorHook] a new instance of MonitorHook + # + # source://railties//lib/rails/application/finisher.rb#98 + def initialize(monitor = T.unsafe(nil)); end + + # source://railties//lib/rails/application/finisher.rb#106 + def complete(_state); end + + # source://railties//lib/rails/application/finisher.rb#102 + def run; end +end + +# source://railties//lib/rails/application.rb#106 +Rails::Application::INITIAL_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/application/routes_reloader.rb#7 +class Rails::Application::RoutesReloader + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # @return [RoutesReloader] a new instance of RoutesReloader + # + # source://railties//lib/rails/application/routes_reloader.rb#15 + def initialize; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # Returns the value of attribute eager_load. + # + # source://railties//lib/rails/application/routes_reloader.rb#11 + def eager_load; end + + # Sets the attribute eager_load + # + # @param value the value to set the attribute eager_load to. + # + # source://railties//lib/rails/application/routes_reloader.rb#11 + def eager_load=(_arg0); end + + # source://railties//lib/rails/application/routes_reloader.rb#13 + def execute(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/application/routes_reloader.rb#13 + def execute_if_updated(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/application/routes_reloader.rb#33 + def execute_unless_loaded; end + + # Returns the value of attribute external_routes. + # + # source://railties//lib/rails/application/routes_reloader.rb#10 + def external_routes; end + + # Returns the value of attribute loaded. + # + # source://railties//lib/rails/application/routes_reloader.rb#10 + def loaded; end + + # Returns the value of attribute paths. + # + # source://railties//lib/rails/application/routes_reloader.rb#10 + def paths; end + + # source://railties//lib/rails/application/routes_reloader.rb#23 + def reload!; end + + # Returns the value of attribute route_sets. + # + # source://railties//lib/rails/application/routes_reloader.rb#10 + def route_sets; end + + # source://railties//lib/rails/application/routes_reloader.rb#12 + def run_after_load_paths=(_arg0); end + + # source://railties//lib/rails/application/routes_reloader.rb#13 + def updated?(*_arg0, **_arg1, &_arg2); end + + private + + # source://railties//lib/rails/application/routes_reloader.rb#52 + def clear!; end + + # source://railties//lib/rails/application/routes_reloader.rb#68 + def finalize!; end + + # source://railties//lib/rails/application/routes_reloader.rb#59 + def load_paths; end + + # source://railties//lib/rails/application/routes_reloader.rb#72 + def revert; end + + # source://railties//lib/rails/application/routes_reloader.rb#64 + def run_after_load_paths; end + + # source://railties//lib/rails/application/routes_reloader.rb#42 + def updater; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# source://railties//lib/rails/application_controller.rb#3 +class Rails::ApplicationController < ::ActionController::Base + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://railties//lib/rails/application_controller.rb#25 + def disable_content_security_policy_nonce!; end + + # @return [Boolean] + # + # source://railties//lib/rails/application_controller.rb#21 + def local_request?; end + + # source://railties//lib/rails/application_controller.rb#15 + def require_local!; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# source://railties//lib/rails/autoloaders.rb#4 +class Rails::Autoloaders + include ::Enumerable + + # @return [Autoloaders] a new instance of Autoloaders + # + # source://railties//lib/rails/autoloaders.rb#11 + def initialize; end + + # @yield [main] + # + # source://railties//lib/rails/autoloaders.rb#31 + def each; end + + # source://railties//lib/rails/autoloaders.rb#40 + def log!; end + + # source://railties//lib/rails/autoloaders.rb#36 + def logger=(logger); end + + # Returns the value of attribute main. + # + # source://railties//lib/rails/autoloaders.rb#9 + def main; end + + # Returns the value of attribute once. + # + # source://railties//lib/rails/autoloaders.rb#9 + def once; end + + # @return [Boolean] + # + # source://railties//lib/rails/autoloaders.rb#44 + def zeitwerk_enabled?; end +end + +# source://railties//lib/rails/autoloaders/inflector.rb#7 +module Rails::Autoloaders::Inflector + class << self + # source://railties//lib/rails/autoloaders/inflector.rb#12 + def camelize(basename, _abspath); end + + # source://railties//lib/rails/autoloaders/inflector.rb#16 + def inflect(overrides); end + end +end + +# source://railties//lib/rails/backtrace_cleaner.rb#7 +class Rails::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://railties//lib/rails/backtrace_cleaner.rb#11 + def initialize; end + + # source://railties//lib/rails/backtrace_cleaner.rb#29 + def clean(backtrace, kind = T.unsafe(nil)); end + + # source://railties//lib/rails/backtrace_cleaner.rb#36 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # source://railties//lib/rails/backtrace_cleaner.rb#29 + def filter(backtrace, kind = T.unsafe(nil)); end +end + +# source://railties//lib/rails/backtrace_cleaner.rb#8 +Rails::BacktraceCleaner::APP_DIRS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/backtrace_cleaner.rb#9 +Rails::BacktraceCleaner::RENDER_TEMPLATE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/command.rb#11 +module Rails::Command + include ::Rails::Command::Behavior + extend ::ActiveSupport::Autoload + extend ::Rails::Command::Behavior::ClassMethods + + class << self + # source://railties//lib/rails/command.rb#116 + def application_root; end + + # source://railties//lib/rails/command.rb#57 + def environment; end + + # Rails finds namespaces similar to Thor, it only adds one rule: + # + # Command names must end with "_command.rb". This is required because Rails + # looks in load paths and loads the command just before it's going to be used. + # + # find_by_namespace :webrat, :integration + # + # Will search for the following commands: + # + # "webrat", "webrat:integration", "rails:webrat", "rails:webrat:integration" + # + # source://railties//lib/rails/command.rb#96 + def find_by_namespace(namespace, command_name = T.unsafe(nil)); end + + # source://railties//lib/rails/command.rb#53 + def hidden_commands; end + + # Receives a namespace, arguments, and the behavior to invoke the command. + # + # source://railties//lib/rails/command.rb#62 + def invoke(full_namespace, args = T.unsafe(nil), **config); end + + # source://railties//lib/rails/command.rb#120 + def printing_commands; end + + # Returns the root of the \Rails engine or app running the command. + # + # source://railties//lib/rails/command.rb#108 + def root; end + + private + + # source://railties//lib/rails/command.rb#159 + def command_type; end + + # source://railties//lib/rails/command.rb#167 + def file_lookup_paths; end + + # source://railties//lib/rails/command.rb#154 + def invoke_rake(task, args, config); end + + # source://railties//lib/rails/command.rb#163 + def lookup_paths; end + + # @return [Boolean] + # + # source://railties//lib/rails/command.rb#127 + def rails_new_with_no_path?(args); end + + # source://railties//lib/rails/command.rb#131 + def split_namespace(namespace); end + + # source://railties//lib/rails/command.rb#146 + def with_argv(argv); end + end +end + +# source://railties//lib/rails/command/actions.rb#5 +module Rails::Command::Actions + # source://railties//lib/rails/command/actions.rb#18 + def boot_application!; end + + # source://railties//lib/rails/command/actions.rb#23 + def load_environment_config!; end + + # source://railties//lib/rails/command/actions.rb#46 + def load_generators; end + + # source://railties//lib/rails/command/actions.rb#42 + def load_tasks; end + + # source://railties//lib/rails/command/actions.rb#13 + def require_application!; end + + # Change to the application's path if there is no config.ru file in current directory. + # This allows us to run rails server from other directories, but still get + # the main config.ru and properly set the tmp directory. + # + # source://railties//lib/rails/command/actions.rb#9 + def set_application_directory!; end +end + +# source://railties//lib/rails/command/base.rb#14 +class Rails::Command::Base < ::Thor + include ::Rails::Command::Actions + + # source://thor/1.3.2/lib/thor/base.rb#155 + def current_subcommand; end + + # source://railties//lib/rails/command/base.rb#172 + def executable(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/command/base.rb#175 + def invoke_command(command, *_arg1); end + + class << self + # source://railties//lib/rails/command/base.rb#86 + def banner(command = T.unsafe(nil), *_arg1); end + + # Sets the base_name taking into account the current class namespace. + # + # Rails::Command::TestCommand.base_name # => 'rails' + # + # source://railties//lib/rails/command/base.rb#106 + def base_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def bin; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def bin=(new_value); end + + # source://railties//lib/rails/command/base.rb#20 + def bin?; end + + # source://railties//lib/rails/command/base.rb#122 + def class_usage; end + + # Return command name without namespaces. + # + # Rails::Command::TestCommand.command_name # => 'test' + # + # source://railties//lib/rails/command/base.rb#115 + def command_name; end + + # Default file root to place extra files a command might need, placed + # one folder above the command file. + # + # For a Rails::Command::TestCommand placed in rails/command/test_command.rb + # would return rails/test. + # + # source://railties//lib/rails/command/base.rb#139 + def default_command_root; end + + # Tries to get the description from a USAGE file one folder above the command + # root. + # + # source://railties//lib/rails/command/base.rb#34 + def desc(usage = T.unsafe(nil), description = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns true when the app is a \Rails engine. + # + # @return [Boolean] + # + # source://railties//lib/rails/command/base.rb#28 + def engine?; end + + # source://railties//lib/rails/command/base.rb#82 + def executable(command_name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://railties//lib/rails/command/base.rb#23 + def exit_on_failure?; end + + # Override Thor's class-level help to also show the USAGE. + # + # source://railties//lib/rails/command/base.rb#98 + def help(shell, *_arg1); end + + # Convenience method to hide this command from the available ones when + # running rails command. + # + # source://railties//lib/rails/command/base.rb#55 + def hide_command!; end + + # source://railties//lib/rails/command/base.rb#59 + def inherited(base); end + + # Convenience method to get the namespace from the class name. It's the + # same as Thor default except that the Command at the end of the class + # is removed. + # + # source://railties//lib/rails/command/base.rb#45 + def namespace(name = T.unsafe(nil)); end + + # source://railties//lib/rails/command/base.rb#67 + def perform(command, args, config); end + + # source://railties//lib/rails/command/base.rb#76 + def printing_commands; end + + # Path to lookup a USAGE description in a file. + # + # source://railties//lib/rails/command/base.rb#129 + def usage_path; end + + private + + # Allow the command method to be called perform. + # + # source://railties//lib/rails/command/base.rb#146 + def create_command(meth); end + + # source://railties//lib/rails/command/base.rb#159 + def namespaced_name(name); end + + # source://railties//lib/rails/command/base.rb#164 + def resolve_path(path); end + end +end + +# source://railties//lib/rails/command/base.rb#15 +class Rails::Command::Base::Error < ::Thor::Error; end + +# source://railties//lib/rails/command/behavior.rb#7 +module Rails::Command::Behavior + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::Rails::Command::Behavior::ClassMethods +end + +# source://railties//lib/rails/command/behavior.rb#0 +module Rails::Command::Behavior::ClassMethods + # source://railties//lib/rails/command/behavior.rb#12 + def no_color!; end + + # source://railties//lib/rails/command/behavior.rb#17 + def subclasses; end + + private + + # source://railties//lib/rails/command/behavior.rb#36 + def lookup(namespaces); end + + # source://railties//lib/rails/command/behavior.rb#56 + def lookup!; end + + # source://railties//lib/rails/command/behavior.rb#70 + def namespaces_to_paths(namespaces); end + + # source://railties//lib/rails/command/behavior.rb#23 + def print_list(base, namespaces); end +end + +# source://railties//lib/rails/command.rb#17 +class Rails::Command::CorrectableNameError < ::StandardError + include ::DidYouMean::Correctable + + # @return [CorrectableNameError] a new instance of CorrectableNameError + # + # source://railties//lib/rails/command.rb#20 + def initialize(message, name, alternatives); end + + # source://railties//lib/rails/command.rb#35 + def corrections; end + + # Returns the value of attribute name. + # + # source://railties//lib/rails/command.rb#18 + def name; end +end + +# source://railties//lib/rails/command.rb#49 +Rails::Command::HELP_MAPPINGS = T.let(T.unsafe(nil), Set) + +# source://railties//lib/rails/command.rb#41 +class Rails::Command::UnrecognizedCommandError < ::Rails::Command::CorrectableNameError + # @return [UnrecognizedCommandError] a new instance of UnrecognizedCommandError + # + # source://railties//lib/rails/command.rb#42 + def initialize(name); end +end + +# source://railties//lib/rails/command.rb#50 +Rails::Command::VERSION_MAPPINGS = T.let(T.unsafe(nil), Set) + +# source://railties//lib/rails/configuration.rb#9 +module Rails::Configuration; end + +# source://railties//lib/rails/configuration.rb#104 +class Rails::Configuration::Generators + # @return [Generators] a new instance of Generators + # + # source://railties//lib/rails/configuration.rb#108 + def initialize; end + + # source://railties//lib/rails/configuration.rb#130 + def after_generate(&block); end + + # Returns the value of attribute after_generate_callbacks. + # + # source://railties//lib/rails/configuration.rb#106 + def after_generate_callbacks; end + + # Returns the value of attribute aliases. + # + # source://railties//lib/rails/configuration.rb#105 + def aliases; end + + # Sets the attribute aliases + # + # @param value the value to set the attribute aliases to. + # + # source://railties//lib/rails/configuration.rb#105 + def aliases=(_arg0); end + + # Returns the value of attribute api_only. + # + # source://railties//lib/rails/configuration.rb#105 + def api_only; end + + # Sets the attribute api_only + # + # @param value the value to set the attribute api_only to. + # + # source://railties//lib/rails/configuration.rb#105 + def api_only=(_arg0); end + + # source://railties//lib/rails/configuration.rb#134 + def apply_rubocop_autocorrect_after_generate!; end + + # Returns the value of attribute colorize_logging. + # + # source://railties//lib/rails/configuration.rb#105 + def colorize_logging; end + + # Sets the attribute colorize_logging + # + # @param value the value to set the attribute colorize_logging to. + # + # source://railties//lib/rails/configuration.rb#105 + def colorize_logging=(_arg0); end + + # Returns the value of attribute fallbacks. + # + # source://railties//lib/rails/configuration.rb#105 + def fallbacks; end + + # Sets the attribute fallbacks + # + # @param value the value to set the attribute fallbacks to. + # + # source://railties//lib/rails/configuration.rb#105 + def fallbacks=(_arg0); end + + # Returns the value of attribute hidden_namespaces. + # + # source://railties//lib/rails/configuration.rb#106 + def hidden_namespaces; end + + # source://railties//lib/rails/configuration.rb#126 + def hide_namespace(namespace); end + + # source://railties//lib/rails/configuration.rb#143 + def method_missing(method, *args); end + + # Returns the value of attribute options. + # + # source://railties//lib/rails/configuration.rb#105 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://railties//lib/rails/configuration.rb#105 + def options=(_arg0); end + + # Returns the value of attribute templates. + # + # source://railties//lib/rails/configuration.rb#105 + def templates; end + + # Sets the attribute templates + # + # @param value the value to set the attribute templates to. + # + # source://railties//lib/rails/configuration.rb#105 + def templates=(_arg0); end + + private + + # source://railties//lib/rails/configuration.rb#119 + def initialize_copy(source); end +end + +# MiddlewareStackProxy is a proxy for the \Rails middleware stack that allows +# you to configure middlewares in your application. It works basically as a +# command recorder, saving each command to be applied after initialization +# over the default middleware stack, so you can add, swap, or remove any +# middleware in \Rails. +# +# You can add your own middlewares by using the +config.middleware.use+ method: +# +# config.middleware.use Magical::Unicorns +# +# This will put the +Magical::Unicorns+ middleware on the end of the stack. +# You can use +insert_before+ if you wish to add a middleware before another: +# +# config.middleware.insert_before Rack::Head, Magical::Unicorns +# +# There's also +insert_after+ which will insert a middleware after another: +# +# config.middleware.insert_after Rack::Head, Magical::Unicorns +# +# Middlewares can also be completely swapped out and replaced with others: +# +# config.middleware.swap ActionDispatch::Flash, Magical::Unicorns +# +# Middlewares can be moved from one place to another: +# +# config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns +# +# This will move the +Magical::Unicorns+ middleware before the +# +ActionDispatch::Flash+. You can also move it after: +# +# config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns +# +# And finally they can also be removed from the stack completely: +# +# config.middleware.delete ActionDispatch::Flash +# +# source://railties//lib/rails/configuration.rb#46 +class Rails::Configuration::MiddlewareStackProxy + # @return [MiddlewareStackProxy] a new instance of MiddlewareStackProxy + # + # source://railties//lib/rails/configuration.rb#47 + def initialize(operations = T.unsafe(nil), delete_operations = T.unsafe(nil)); end + + # source://railties//lib/rails/configuration.rb#96 + def +(other); end + + # source://railties//lib/rails/configuration.rb#70 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#52 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#58 + def insert_after(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#52 + def insert_before(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#88 + def merge_into(other); end + + # source://railties//lib/rails/configuration.rb#74 + def move(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#80 + def move_after(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#74 + def move_before(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#62 + def swap(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#84 + def unshift(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/configuration.rb#66 + def use(*_arg0, **_arg1, &_arg2); end + + protected + + # Returns the value of attribute delete_operations. + # + # source://railties//lib/rails/configuration.rb#101 + def delete_operations; end + + # Returns the value of attribute operations. + # + # source://railties//lib/rails/configuration.rb#101 + def operations; end +end + +# +Rails::Engine+ allows you to wrap a specific \Rails application or subset of +# functionality and share it with other applications or within a larger packaged application. +# Every Rails::Application is just an engine, which allows for simple +# feature and application sharing. +# +# Any +Rails::Engine+ is also a Rails::Railtie, so the same +# methods (like {rake_tasks}[rdoc-ref:Rails::Railtie::rake_tasks] and +# {generators}[rdoc-ref:Rails::Railtie::generators]) and configuration +# options that are available in railties can also be used in engines. +# +# == Creating an Engine +# +# If you want a gem to behave as an engine, you have to specify an +Engine+ +# for it somewhere inside your plugin's +lib+ folder (similar to how we +# specify a +Railtie+): +# +# # lib/my_engine.rb +# module MyEngine +# class Engine < Rails::Engine +# end +# end +# +# Then ensure that this file is loaded at the top of your config/application.rb +# (or in your +Gemfile+), and it will automatically load models, controllers, and helpers +# inside +app+, load routes at config/routes.rb, load locales at +# config/locales/**/*, and load tasks at lib/tasks/**/*. +# +# == Configuration +# +# Like railties, engines can access a config object which contains configuration shared by +# all railties and the application. +# Additionally, each engine can access autoload_paths, eager_load_paths and +# autoload_once_paths settings which are scoped to that engine. +# +# class MyEngine < Rails::Engine +# # Add a load path for this specific Engine +# config.autoload_paths << File.expand_path("lib/some/path", __dir__) +# +# initializer "my_engine.add_middleware" do |app| +# app.middleware.use MyEngine::Middleware +# end +# end +# +# == Generators +# +# You can set up generators for engines with config.generators method: +# +# class MyEngine < Rails::Engine +# config.generators do |g| +# g.orm :active_record +# g.template_engine :erb +# g.test_framework :test_unit +# end +# end +# +# You can also set generators for an application by using config.app_generators: +# +# class MyEngine < Rails::Engine +# # note that you can also pass block to app_generators in the same way you +# # can pass it to generators method +# config.app_generators.orm :datamapper +# end +# +# == Paths +# +# Applications and engines have flexible path configuration, meaning that you +# are not required to place your controllers at app/controllers, but +# in any place which you find convenient. +# +# For example, let's suppose you want to place your controllers in lib/controllers. +# You can set that as an option: +# +# class MyEngine < Rails::Engine +# paths["app/controllers"] = "lib/controllers" +# end +# +# You can also have your controllers loaded from both app/controllers and +# lib/controllers: +# +# class MyEngine < Rails::Engine +# paths["app/controllers"] << "lib/controllers" +# end +# +# The available paths in an engine are: +# +# class MyEngine < Rails::Engine +# paths["app"] # => ["app"] +# paths["app/controllers"] # => ["app/controllers"] +# paths["app/helpers"] # => ["app/helpers"] +# paths["app/models"] # => ["app/models"] +# paths["app/views"] # => ["app/views"] +# paths["lib"] # => ["lib"] +# paths["lib/tasks"] # => ["lib/tasks"] +# paths["config"] # => ["config"] +# paths["config/initializers"] # => ["config/initializers"] +# paths["config/locales"] # => ["config/locales"] +# paths["config/routes.rb"] # => ["config/routes.rb"] +# end +# +# The Application class adds a couple more paths to this set. And as in your +# Application, all folders under +app+ are automatically added to the load path. +# If you have an app/services folder for example, it will be added by default. +# +# == Endpoint +# +# An engine can also be a Rack application. It can be useful if you have a Rack application that +# you would like to provide with some of the +Engine+'s features. +# +# To do that, use the ::endpoint method: +# +# module MyEngine +# class Engine < Rails::Engine +# endpoint MyRackApplication +# end +# end +# +# Now you can mount your engine in application's routes: +# +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/engine" +# end +# +# == Middleware stack +# +# As an engine can now be a Rack endpoint, it can also have a middleware +# stack. The usage is exactly the same as in Application: +# +# module MyEngine +# class Engine < Rails::Engine +# middleware.use SomeMiddleware +# end +# end +# +# == Routes +# +# If you don't specify an endpoint, routes will be used as the default +# endpoint. You can use them just like you use an application's routes: +# +# # ENGINE/config/routes.rb +# MyEngine::Engine.routes.draw do +# get "/" => "posts#index" +# end +# +# == Mount priority +# +# Note that now there can be more than one router in your application, and it's better to avoid +# passing requests through many routers. Consider this situation: +# +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/blog" +# get "/blog/omg" => "main#omg" +# end +# +# +MyEngine+ is mounted at /blog, and /blog/omg points to application's +# controller. In such a situation, requests to /blog/omg will go through +MyEngine+, +# and if there is no such route in +Engine+'s routes, it will be dispatched to main#omg. +# It's much better to swap that: +# +# Rails.application.routes.draw do +# get "/blog/omg" => "main#omg" +# mount MyEngine::Engine => "/blog" +# end +# +# Now, +Engine+ will get only requests that were not handled by +Application+. +# +# == Engine name +# +# There are some places where an Engine's name is used: +# +# * routes: when you mount an Engine with mount(MyEngine::Engine => '/my_engine'), +# it's used as default :as option +# * rake task for installing migrations my_engine:install:migrations +# +# Engine name is set by default based on class name. For +MyEngine::Engine+ it will be +# my_engine_engine. You can change it manually using the engine_name method: +# +# module MyEngine +# class Engine < Rails::Engine +# engine_name "my_engine" +# end +# end +# +# == Isolated Engine +# +# Normally when you create controllers, helpers, and models inside an engine, they are treated +# as if they were created inside the application itself. This means that all helpers and +# named routes from the application will be available to your engine's controllers as well. +# +# However, sometimes you want to isolate your engine from the application, especially if your engine +# has its own router. To do that, you simply need to call ::isolate_namespace. This method requires +# you to pass a module where all your controllers, helpers, and models should be nested to: +# +# module MyEngine +# class Engine < Rails::Engine +# isolate_namespace MyEngine +# end +# end +# +# With such an engine, everything that is inside the +MyEngine+ module will be isolated from +# the application. +# +# Consider this controller: +# +# module MyEngine +# class FooController < ActionController::Base +# end +# end +# +# If the +MyEngine+ engine is marked as isolated, +FooController+ only has +# access to helpers from +MyEngine+, and url_helpers from +# MyEngine::Engine.routes. +# +# The next thing that changes in isolated engines is the behavior of routes. +# Normally, when you namespace your controllers, you also need to namespace +# the related routes. With an isolated engine, the engine's namespace is +# automatically applied, so you don't need to specify it explicitly in your +# routes: +# +# MyEngine::Engine.routes.draw do +# resources :articles +# end +# +# If +MyEngine+ is isolated, the routes above will point to +# +MyEngine::ArticlesController+. You also don't need to use longer +# URL helpers like +my_engine_articles_path+. Instead, you should simply use +# +articles_path+, like you would do with your main application. +# +# To make this behavior consistent with other parts of the framework, +# isolated engines also have an effect on ActiveModel::Naming. In a +# normal \Rails app, when you use a namespaced model such as +# +Namespace::Article+, ActiveModel::Naming will generate +# names with the prefix "namespace". In an isolated engine, the prefix will +# be omitted in URL helpers and form fields, for convenience. +# +# polymorphic_url(MyEngine::Article.new) +# # => "articles_path" # not "my_engine_articles_path" +# +# form_for(MyEngine::Article.new) do +# text_field :title # => +# end +# +# Additionally, an isolated engine will set its own name according to its +# namespace, so MyEngine::Engine.engine_name will return +# "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_", +# meaning for example that +MyEngine::Article+ will use the +# +my_engine_articles+ database table by default. +# +# == Using Engine's routes outside Engine +# +# Since you can now mount an engine inside application's routes, you do not have direct access to +Engine+'s +# url_helpers inside +Application+. When you mount an engine in an application's routes, a special helper is +# created to allow you to do that. Consider such a scenario: +# +# # config/routes.rb +# Rails.application.routes.draw do +# mount MyEngine::Engine => "/my_engine", as: "my_engine" +# get "/foo" => "foo#index" +# end +# +# Now, you can use the my_engine helper inside your application: +# +# class FooController < ApplicationController +# def index +# my_engine.root_url # => /my_engine/ +# end +# end +# +# There is also a main_app helper that gives you access to application's routes inside Engine: +# +# module MyEngine +# class BarController +# def index +# main_app.foo_path # => /foo +# end +# end +# end +# +# Note that the :as option given to mount takes the engine_name as default, so most of the time +# you can simply omit it. +# +# Finally, if you want to generate a URL to an engine's route using +# polymorphic_url, you also need to pass the engine helper. Let's +# say that you want to create a form pointing to one of the engine's routes. +# All you need to do is pass the helper as the first element in array with +# attributes for URL: +# +# form_for([my_engine, @user]) +# +# This code will use my_engine.user_path(@user) to generate the proper route. +# +# == Isolated engine's helpers +# +# Sometimes you may want to isolate an engine, but use helpers that are defined for it. +# If you want to share just a few specific helpers you can add them to application's +# helpers in ApplicationController: +# +# class ApplicationController < ActionController::Base +# helper MyEngine::SharedEngineHelper +# end +# +# If you want to include all of the engine's helpers, you can use the #helper method on an engine's +# instance: +# +# class ApplicationController < ActionController::Base +# helper MyEngine::Engine.helpers +# end +# +# It will include all of the helpers from engine's directory. Take into account this does +# not include helpers defined in controllers with helper_method or other similar solutions, +# only helpers defined in the helpers directory will be included. +# +# == Migrations & seed data +# +# Engines can have their own migrations. The default path for migrations is exactly the same +# as in application: db/migrate +# +# To use engine's migrations in application you can use the rake task below, which copies them to +# application's dir: +# +# $ rake ENGINE_NAME:install:migrations +# +# Note that some of the migrations may be skipped if a migration with the same name already exists +# in application. In such a situation you must decide whether to leave that migration or rename the +# migration in the application and rerun copying migrations. +# +# If your engine has migrations, you may also want to prepare data for the database in +# the db/seeds.rb file. You can load that data using the load_seed method, e.g. +# +# MyEngine::Engine.load_seed +# +# == Loading priority +# +# In order to change engine's priority you can use +config.railties_order+ in the main application. +# It will affect the priority of loading views, helpers, assets, and all the other files +# related to engine or application. +# +# # load Blog::Engine with highest priority, followed by application and other railties +# config.railties_order = [Blog::Engine, :main_app, :all] +# +# source://railties//lib/rails/engine/railties.rb#4 +class Rails::Engine < ::Rails::Railtie + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + + # @return [Engine] a new instance of Engine + # + # source://railties//lib/rails/engine.rb#440 + def initialize; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _load_seed_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_load_seed_callbacks(&block); end + + # Returns the underlying Rack application for this engine. + # + # source://railties//lib/rails/engine.rb#517 + def app; end + + # Define the Rack API for this engine. + # + # source://railties//lib/rails/engine.rb#534 + def call(env); end + + # Define the configuration object for the engine. + # + # source://railties//lib/rails/engine.rb#553 + def config; end + + # source://railties//lib/rails/engine.rb#491 + def eager_load!; end + + # Returns the endpoint for this engine. If none is registered, + # defaults to an ActionDispatch::Routing::RouteSet. + # + # source://railties//lib/rails/engine.rb#529 + def endpoint; end + + # source://railties//lib/rails/engine.rb#438 + def engine_name(*_arg0, **_arg1, &_arg2); end + + # Defines additional Rack env configuration that is added on each call. + # + # source://railties//lib/rails/engine.rb#540 + def env_config; end + + # Returns a module with all the helpers defined for the engine. + # + # source://railties//lib/rails/engine.rb#501 + def helpers; end + + # Returns all registered helpers paths. + # + # source://railties//lib/rails/engine.rb#512 + def helpers_paths; end + + # source://railties//lib/rails/engine.rb#438 + def isolated?(&_arg0); end + + # Load console and invoke the registered hooks. + # Check Rails::Railtie.console for more info. + # + # source://railties//lib/rails/engine.rb#454 + def load_console(app = T.unsafe(nil)); end + + # Load \Rails generators and invoke the registered hooks. + # Check Rails::Railtie.generators for more info. + # + # source://railties//lib/rails/engine.rb#477 + def load_generators(app = T.unsafe(nil)); end + + # Load \Rails runner and invoke the registered hooks. + # Check Rails::Railtie.runner for more info. + # + # source://railties//lib/rails/engine.rb#462 + def load_runner(app = T.unsafe(nil)); end + + # Load data from db/seeds.rb file. It can be used in to load engines' + # seeds, e.g.: + # + # Blog::Engine.load_seed + # + # source://railties//lib/rails/engine.rb#561 + def load_seed; end + + # Invoke the server registered hooks. + # Check Rails::Railtie.server for more info. + # + # source://railties//lib/rails/engine.rb#486 + def load_server(app = T.unsafe(nil)); end + + # Load Rake and railties tasks, and invoke the registered hooks. + # Check Rails::Railtie.rake_tasks for more info. + # + # source://railties//lib/rails/engine.rb#469 + def load_tasks(app = T.unsafe(nil)); end + + # source://railties//lib/rails/engine.rb#437 + def middleware(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/engine.rb#437 + def paths(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/engine.rb#496 + def railties; end + + # source://railties//lib/rails/engine.rb#437 + def root(*_arg0, **_arg1, &_arg2); end + + # Defines the routes for this engine. If a block is given to + # routes, it is appended to the engine. + # + # source://railties//lib/rails/engine.rb#546 + def routes(&block); end + + # @return [Boolean] + # + # source://railties//lib/rails/engine.rb#681 + def routes?; end + + protected + + # source://railties//lib/rails/engine.rb#686 + def run_tasks_blocks(*_arg0); end + + private + + # source://railties//lib/rails/engine.rb#718 + def _all_autoload_once_paths; end + + # source://railties//lib/rails/engine.rb#722 + def _all_autoload_paths; end + + # source://railties//lib/rails/engine.rb#731 + def _all_load_paths(add_autoload_paths_to_load_path); end + + # source://railties//lib/rails/engine.rb#756 + def build_middleware; end + + # source://railties//lib/rails/engine.rb#748 + def build_request(env); end + + # source://railties//lib/rails/engine.rb#714 + def default_middleware_stack; end + + # @return [Boolean] + # + # source://railties//lib/rails/engine.rb#742 + def fixtures_in_root_and_not_in_vendor_or_dot_dir?(fixtures); end + + # @return [Boolean] + # + # source://railties//lib/rails/engine.rb#698 + def has_migrations?; end + + # source://railties//lib/rails/engine.rb#692 + def load_config_initializer(initializer); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _load_seed_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _load_seed_callbacks=(value); end + + # Returns the value of attribute called_from. + # + # source://railties//lib/rails/engine.rb#354 + def called_from; end + + # Sets the attribute called_from + # + # @param value the value to set the attribute called_from to. + # + # source://railties//lib/rails/engine.rb#354 + def called_from=(_arg0); end + + # source://railties//lib/rails/engine.rb#359 + def eager_load!(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/engine.rb#379 + def endpoint(endpoint = T.unsafe(nil)); end + + # source://railties//lib/rails/railtie.rb#176 + def engine_name(name = T.unsafe(nil)); end + + # Finds engine with given path. + # + # source://railties//lib/rails/engine.rb#424 + def find(path); end + + # source://railties//lib/rails/engine.rb#375 + def find_root(from); end + + # source://railties//lib/rails/engine.rb#702 + def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end + + # @private + # + # source://railties//lib/rails/engine.rb#361 + def inherited(base); end + + # source://railties//lib/rails/engine.rb#385 + def isolate_namespace(mod); end + + # Returns the value of attribute isolated. + # + # source://railties//lib/rails/engine.rb#354 + def isolated; end + + # Sets the attribute isolated + # + # @param value the value to set the attribute isolated to. + # + # source://railties//lib/rails/engine.rb#354 + def isolated=(_arg0); end + + # Returns the value of attribute isolated. + # + # source://railties//lib/rails/engine.rb#354 + def isolated?; end + end +end + +# source://railties//lib/rails/engine/configuration.rb#7 +class Rails::Engine::Configuration < ::Rails::Railtie::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://railties//lib/rails/engine/configuration.rb#41 + def initialize(root = T.unsafe(nil)); end + + # Private method that adds custom autoload once paths to the ones defined + # by +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#127 + def all_autoload_once_paths; end + + # Private method that adds custom autoload paths to the ones defined by + # +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#121 + def all_autoload_paths; end + + # Private method that adds custom eager load paths to the ones defined by + # +paths+. + # + # source://railties//lib/rails/engine/configuration.rb#133 + def all_eager_load_paths; end + + # An array of custom autoload once paths. These won't be eager loaded + # unless you push them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib_once+. + # + # source://railties//lib/rails/engine/configuration.rb#29 + def autoload_once_paths; end + + # Sets the attribute autoload_once_paths + # + # @param value the value to set the attribute autoload_once_paths to. + # + # source://railties//lib/rails/engine/configuration.rb#10 + def autoload_once_paths=(_arg0); end + + # An array of custom autoload paths to be added to the ones defined + # automatically by Rails. These won't be eager loaded, unless you push + # them to +eager_load_paths+ too, which is recommended. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # source://railties//lib/rails/engine/configuration.rb#20 + def autoload_paths; end + + # Sets the attribute autoload_paths + # + # @param value the value to set the attribute autoload_paths to. + # + # source://railties//lib/rails/engine/configuration.rb#10 + def autoload_paths=(_arg0); end + + # Returns the value of attribute default_scope. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def default_scope; end + + # Sets the attribute default_scope + # + # @param value the value to set the attribute default_scope to. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def default_scope=(_arg0); end + + # An array of custom eager load paths to be added to the ones defined + # automatically by Rails. Anything in this collection is considered to be + # an autoload path regardless of whether it was added to +autoload_paths+. + # + # This collection is empty by default, it accepts strings and +Pathname+ + # objects. + # + # If you'd like to add +lib+ to it, please see +autoload_lib+. + # + # source://railties//lib/rails/engine/configuration.rb#39 + def eager_load_paths; end + + # Sets the attribute eager_load_paths + # + # @param value the value to set the attribute eager_load_paths to. + # + # source://railties//lib/rails/engine/configuration.rb#10 + def eager_load_paths=(_arg0); end + + # Holds generators configuration: + # + # config.generators do |g| + # g.orm :data_mapper, migration: true + # g.template_engine :haml + # g.test_framework :rspec + # end + # + # If you want to disable color in console, do: + # + # config.generators.colorize_logging = false + # + # @yield [@generators] + # + # source://railties//lib/rails/engine/configuration.rb#67 + def generators; end + + # Returns the value of attribute javascript_path. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def javascript_path; end + + # Sets the attribute javascript_path + # + # @param value the value to set the attribute javascript_path to. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def javascript_path=(_arg0); end + + # Returns the value of attribute middleware. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def middleware; end + + # Sets the attribute middleware + # + # @param value the value to set the attribute middleware to. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def middleware=(_arg0); end + + # source://railties//lib/rails/engine/configuration.rb#73 + def paths; end + + # Returns the value of attribute root. + # + # source://railties//lib/rails/engine/configuration.rb#8 + def root; end + + # source://railties//lib/rails/engine/configuration.rb#115 + def root=(value); end + + # Returns the value of attribute route_set_class. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def route_set_class; end + + # Sets the attribute route_set_class + # + # @param value the value to set the attribute route_set_class to. + # + # source://railties//lib/rails/engine/configuration.rb#9 + def route_set_class=(_arg0); end +end + +# source://railties//lib/rails/engine/lazy_route_set.rb#9 +class Rails::Engine::LazyRouteSet < ::ActionDispatch::Routing::RouteSet + # @return [LazyRouteSet] a new instance of LazyRouteSet + # + # source://railties//lib/rails/engine/lazy_route_set.rb#49 + def initialize(config = T.unsafe(nil)); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#66 + def call(req); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#71 + def draw(&block); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#56 + def generate_extras(options, recall = T.unsafe(nil)); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#62 + def generate_url_helpers(supports_path); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#76 + def recognize_path(path, environment = T.unsafe(nil)); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#81 + def routes; end + + private + + # source://railties//lib/rails/engine/lazy_route_set.rb#87 + def method_missing_module; end +end + +# source://railties//lib/rails/engine/lazy_route_set.rb#10 +class Rails::Engine::LazyRouteSet::NamedRouteCollection < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection + # @return [Boolean] + # + # source://railties//lib/rails/engine/lazy_route_set.rb#11 + def route_defined?(name); end +end + +# source://railties//lib/rails/engine/lazy_route_set.rb#17 +module Rails::Engine::LazyRouteSet::ProxyUrlHelpers + # source://railties//lib/rails/engine/lazy_route_set.rb#23 + def full_url_for(options); end + + # @return [Boolean] + # + # source://railties//lib/rails/engine/lazy_route_set.rb#33 + def optimize_routes_generation?; end + + # source://railties//lib/rails/engine/lazy_route_set.rb#43 + def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#38 + def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#28 + def route_for(name, *args); end + + # source://railties//lib/rails/engine/lazy_route_set.rb#18 + def url_for(options); end +end + +# source://railties//lib/rails/engine/railties.rb#5 +class Rails::Engine::Railties + include ::Enumerable + + # @return [Railties] a new instance of Railties + # + # source://railties//lib/rails/engine/railties.rb#9 + def initialize; end + + # source://railties//lib/rails/engine/railties.rb#18 + def -(others); end + + # Returns the value of attribute _all. + # + # source://railties//lib/rails/engine/railties.rb#7 + def _all; end + + # source://railties//lib/rails/engine/railties.rb#14 + def each(*args, &block); end +end + +# source://railties//lib/rails/generators.rb#14 +module Rails::Generators + include ::Rails::Command::Behavior + extend ::Rails::Command::Behavior::ClassMethods + + # source://railties//lib/rails/generators.rb#27 + def namespace; end + + # source://railties//lib/rails/generators.rb#27 + def namespace=(val); end + + class << self + # source://railties//lib/rails/generators.rb#279 + def add_generated_file(file); end + + # source://railties//lib/rails/generators.rb#92 + def after_generate_callbacks; end + + # source://railties//lib/rails/generators.rb#84 + def aliases; end + + # Configure generators for API only applications. It basically hides + # everything that is usually browser related, such as assets and session + # migration generators, and completely disable helpers and assets + # so generators such as scaffold won't create them. + # + # source://railties//lib/rails/generators.rb#116 + def api_only!; end + + # source://railties//lib/rails/generators.rb#68 + def configure!(config); end + + # Hold configured generators fallbacks. If a plugin developer wants a + # generator group to fall back to another group in case of missing generators, + # they can add a fallback. + # + # For example, shoulda is considered a test_framework and is an extension + # of test_unit. However, most part of shoulda generators are similar to + # test_unit ones. + # + # Shoulda then can tell generators to search for test_unit generators when + # some of them are not available by adding a fallback: + # + # Rails::Generators.fallbacks[:shoulda] = :test_unit + # + # source://railties//lib/rails/generators.rb#108 + def fallbacks; end + + # Rails finds namespaces similar to Thor, it only adds one rule: + # + # Generators names must end with "_generator.rb". This is required because Rails + # looks in load paths and loads the generator just before it's going to be used. + # + # find_by_namespace :webrat, :rails, :integration + # + # Will search for the following generators: + # + # "rails:webrat", "webrat:integration", "webrat" + # + # Notice that "rails:generators:webrat" could be loaded as well, what + # Rails looks for is the first and last parts of the namespace. + # + # source://railties//lib/rails/generators.rb#234 + def find_by_namespace(name, base = T.unsafe(nil), context = T.unsafe(nil)); end + + # Show help message with available generators. + # + # source://railties//lib/rails/generators.rb#170 + def help(command = T.unsafe(nil)); end + + # Returns an array of generator namespaces that are hidden. + # Generator namespaces may be hidden for a variety of reasons. + # Some are aliased such as "rails:migration" and can be + # invoked with the shorter "migration". + # + # source://railties//lib/rails/generators.rb#134 + def hidden_namespaces; end + + # source://railties//lib/rails/generators.rb#164 + def hide_namespace(*namespaces); end + + # source://railties//lib/rails/generators.rb#164 + def hide_namespaces(*namespaces); end + + # Receives a namespace, arguments, and the behavior to invoke the generator. + # It's used as the default entry point for generate, destroy, and update + # commands. + # + # source://railties//lib/rails/generators.rb#261 + def invoke(namespace, args = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://railties//lib/rails/generators.rb#27 + def namespace; end + + # source://railties//lib/rails/generators.rb#27 + def namespace=(val); end + + # source://railties//lib/rails/generators.rb#88 + def options; end + + # source://railties//lib/rails/generators.rb#192 + def print_generators; end + + # source://railties//lib/rails/generators.rb#187 + def public_namespaces; end + + # source://railties//lib/rails/generators.rb#196 + def sorted_groups; end + + # source://railties//lib/rails/generators.rb#80 + def templates_path; end + + private + + # source://railties//lib/rails/generators.rb#306 + def command_type; end + + # source://railties//lib/rails/generators.rb#314 + def file_lookup_paths; end + + # Try fallbacks for the given base. + # + # source://railties//lib/rails/generators.rb#291 + def invoke_fallbacks_for(name, base); end + + # source://railties//lib/rails/generators.rb#310 + def lookup_paths; end + + # source://railties//lib/rails/generators.rb#285 + def print_list(base, namespaces); end + + # source://railties//lib/rails/generators.rb#318 + def run_after_generate_callback; end + end +end + +# source://railties//lib/rails/generators/actions.rb#9 +module Rails::Generators::Actions + # source://railties//lib/rails/generators/actions.rb#10 + def initialize(*_arg0); end + + # Add the given source to +Gemfile+ + # + # If block is given, gem entries in block are wrapped into the source group. + # + # add_source "http://gems.github.com/" + # + # add_source "http://gems.github.com/" do + # gem "rspec-rails" + # end + # + # source://railties//lib/rails/generators/actions.rb#151 + def add_source(source, options = T.unsafe(nil), &block); end + + # Adds configuration code to a \Rails runtime environment. + # + # By default, adds code inside the +Application+ class in + # +config/application.rb+ so that it applies to all environments. + # + # environment %(config.asset_host = "cdn.provider.com") + # + # Results in: + # + # # config/application.rb + # class Application < Rails::Application + # config.asset_host = "cdn.provider.com" + # # ... + # end + # + # If the +:env+ option is specified, the code will be added to the + # corresponding file in +config/environments+ instead. + # + # environment %(config.asset_host = "localhost:3000"), env: "development" + # + # Results in: + # + # # config/environments/development.rb + # Rails.application.configure do + # config.asset_host = "localhost:3000" + # # ... + # end + # + # +:env+ can also be an array. In which case, the code is added to each + # corresponding file in +config/environments+. + # + # The code can also be specified as the return value of the block: + # + # environment do + # %(config.asset_host = "cdn.provider.com") + # end + # + # environment(nil, env: "development") do + # %(config.asset_host = "localhost:3000") + # end + # + # source://railties//lib/rails/generators/actions.rb#206 + def application(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Adds configuration code to a \Rails runtime environment. + # + # By default, adds code inside the +Application+ class in + # +config/application.rb+ so that it applies to all environments. + # + # environment %(config.asset_host = "cdn.provider.com") + # + # Results in: + # + # # config/application.rb + # class Application < Rails::Application + # config.asset_host = "cdn.provider.com" + # # ... + # end + # + # If the +:env+ option is specified, the code will be added to the + # corresponding file in +config/environments+ instead. + # + # environment %(config.asset_host = "localhost:3000"), env: "development" + # + # Results in: + # + # # config/environments/development.rb + # Rails.application.configure do + # config.asset_host = "localhost:3000" + # # ... + # end + # + # +:env+ can also be an array. In which case, the code is added to each + # corresponding file in +config/environments+. + # + # The code can also be specified as the return value of the block: + # + # environment do + # %(config.asset_host = "cdn.provider.com") + # end + # + # environment(nil, env: "development") do + # %(config.asset_host = "localhost:3000") + # end + # + # source://railties//lib/rails/generators/actions.rb#206 + def environment(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Adds a +gem+ declaration to the +Gemfile+ for the specified gem. + # + # gem "rspec", group: :test + # gem "technoweenie-restful-authentication", lib: "restful-authentication", source: "http://gems.github.com/" + # gem "rails", "3.0", git: "https://github.com/rails/rails" + # gem "RedCloth", ">= 4.1.0", "< 4.2.0" + # gem "rspec", comment: "Put this comment above the gem declaration" + # + # Note that this method only adds the gem to the +Gemfile+; it does not + # install the gem. + # + # ==== Options + # + # [+:version+] + # The version constraints for the gem, specified as a string or an + # array of strings: + # + # gem "my_gem", version: "~> 1.1" + # gem "my_gem", version: [">= 1.1", "< 2.0"] + # + # Alternatively, can be specified as one or more arguments following the + # gem name: + # + # gem "my_gem", ">= 1.1", "< 2.0" + # + # [+:comment+] + # Outputs a comment above the +gem+ declaration in the +Gemfile+. + # + # gem "my_gem", comment: "First line.\nSecond line." + # + # Outputs: + # + # # First line. + # # Second line. + # gem "my_gem" + # + # [+:group+] + # The gem group in the +Gemfile+ that the gem belongs to. + # + # [+:git+] + # The URL of the git repository for the gem. + # + # Any additional options passed to this method will be appended to the + # +gem+ declaration in the +Gemfile+. For example: + # + # gem "my_gem", comment: "Edge my_gem", git: "https://example.com/my_gem.git", branch: "master" + # + # Outputs: + # + # # Edge my_gem + # gem "my_gem", git: "https://example.com/my_gem.git", branch: "master" + # + # source://railties//lib/rails/generators/actions.rb#67 + def gem(*args); end + + # Wraps gem entries inside a group. + # + # gem_group :development, :test do + # gem "rspec-rails" + # end + # + # source://railties//lib/rails/generators/actions.rb#111 + def gem_group(*names, &block); end + + # Runs another generator. + # + # generate "scaffold", "Post title:string body:text" + # generate "scaffold", "Post", "title:string", "body:text" + # + # The first argument is the generator name, and the remaining arguments + # are joined together and passed to the generator. + # + # source://railties//lib/rails/generators/actions.rb#332 + def generate(what, *args); end + + # Runs one or more git commands. + # + # git :init + # # => runs `git init` + # + # git add: "this.file that.rb" + # # => runs `git add this.file that.rb` + # + # git commit: "-m 'First commit'" + # # => runs `git commit -m 'First commit'` + # + # git add: "good.rb", rm: "bad.cxx" + # # => runs `git add good.rb; git rm bad.cxx` + # + # source://railties//lib/rails/generators/actions.rb#237 + def git(commands = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/actions.rb#125 + def github(repo, options = T.unsafe(nil), &block); end + + # Creates an initializer file in +config/initializers/+. The code can be + # specified as an argument or as the return value of the block. + # + # initializer "api.rb", <<~RUBY + # API_KEY = "123456" + # RUBY + # + # initializer "api.rb" do + # %(API_KEY = "123456") + # end + # + # source://railties//lib/rails/generators/actions.rb#319 + def initializer(filename, data = T.unsafe(nil)); end + + # Creates a file in +lib/+. The contents can be specified as an argument + # or as the return value of the block. + # + # lib "foreign.rb", <<~RUBY + # # Foreign code is fun + # RUBY + # + # lib "foreign.rb" do + # "# Foreign code is fun" + # end + # + # source://railties//lib/rails/generators/actions.rb#275 + def lib(filename, data = T.unsafe(nil)); end + + # Runs the specified \Rails command. + # + # rails_command "db:migrate" + # rails_command "db:migrate", env: "production" + # rails_command "db:migrate", abort_on_failure: true + # rails_command "stats", capture: true + # rails_command "gems:install", sudo: true + # + # ==== Options + # + # [+:env+] + # The \Rails environment in which to run the command. Defaults to + # ENV["RAILS_ENV"] || "development". + # + # [+:abort_on_failure+] + # Whether to halt the generator if the command exits with a non-success + # exit status. + # + # [+:capture+] + # Whether to capture and return the output of the command. + # + # [+:sudo+] + # Whether to run the command using +sudo+. + # + # source://railties//lib/rails/generators/actions.rb#391 + def rails_command(command, options = T.unsafe(nil)); end + + # Runs the specified Rake task. + # + # rake "db:migrate" + # rake "db:migrate", env: "production" + # rake "db:migrate", abort_on_failure: true + # rake "stats", capture: true + # rake "gems:install", sudo: true + # + # ==== Options + # + # [+:env+] + # The \Rails environment in which to run the task. Defaults to + # ENV["RAILS_ENV"] || "development". + # + # [+:abort_on_failure+] + # Whether to halt the generator if the task exits with a non-success + # exit status. + # + # [+:capture+] + # Whether to capture and return the output of the task. + # + # [+:sudo+] + # Whether to run the task using +sudo+. + # + # source://railties//lib/rails/generators/actions.rb#364 + def rake(command, options = T.unsafe(nil)); end + + # Creates a Rake tasks file in +lib/tasks/+. The code can be specified as + # an argument or as the return value of the block. + # + # rakefile "bootstrap.rake", <<~RUBY + # task :bootstrap do + # puts "Boots! Boots! Boots!" + # end + # RUBY + # + # rakefile "bootstrap.rake" do + # project = ask("What is the UNIX name of your project?") + # + # <<~RUBY + # namespace :#{project} do + # task :bootstrap do + # puts "Boots! Boots! Boots!" + # end + # end + # RUBY + # end + # + # source://railties//lib/rails/generators/actions.rb#302 + def rakefile(filename, data = T.unsafe(nil)); end + + # Reads the given file at the source root and prints it in the console. + # + # readme "README" + # + # source://railties//lib/rails/generators/actions.rb#442 + def readme(path); end + + # Make an entry in \Rails routing file config/routes.rb + # + # route "root 'welcome#index'" + # route "root 'admin#index'", namespace: :admin + # + # source://railties//lib/rails/generators/actions.rb#409 + def route(routing_code, namespace: T.unsafe(nil)); end + + # Creates a file in +vendor/+. The contents can be specified as an + # argument or as the return value of the block. + # + # vendor "foreign.rb", <<~RUBY + # # Foreign code is fun + # RUBY + # + # vendor "foreign.rb" do + # "# Foreign code is fun" + # end + # + # source://railties//lib/rails/generators/actions.rb#258 + def vendor(filename, data = T.unsafe(nil)); end + + private + + # Append string to a file with a newline if necessary + # + # source://railties//lib/rails/generators/actions.rb#507 + def append_file_with_newline(path, str, options = T.unsafe(nil)); end + + # Runs the supplied command using either "rake ..." or "rails ..." + # based on the executor parameter provided. + # + # source://railties//lib/rails/generators/actions.rb#461 + def execute_command(executor, command, options = T.unsafe(nil)); end + + # Indent the +Gemfile+ to the depth of @indentation + # + # source://railties//lib/rails/generators/actions.rb#494 + def indentation; end + + # Define log for backwards compatibility. If just one argument is sent, + # invoke say, otherwise invoke say_status. Differently from say and + # similarly to say_status, this method respects the quiet? option given. + # + # source://railties//lib/rails/generators/actions.rb#450 + def log(*args); end + + # source://railties//lib/rails/generators/actions.rb#513 + def match_file(path, pattern); end + + # Returns optimized string with indentation + # + # source://railties//lib/rails/generators/actions.rb#487 + def optimize_indentation(value, amount = T.unsafe(nil)); end + + # Always returns value in double quotes. + # + # source://railties//lib/rails/generators/actions.rb#475 + def quote(value); end + + # Returns optimized string with indentation + # + # source://railties//lib/rails/generators/actions.rb#487 + def rebase_indentation(value, amount = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/actions.rb#517 + def route_namespace_pattern(namespace); end + + # Manage +Gemfile+ indentation for a DSL action block + # + # source://railties//lib/rails/generators/actions.rb#499 + def with_indentation(&block); end +end + +# source://railties//lib/rails/generators/actions/create_migration.rb#9 +class Rails::Generators::Actions::CreateMigration < ::Thor::Actions::CreateFile + # source://railties//lib/rails/generators/actions/create_migration.rb#41 + def existing_migration; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#41 + def exists?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/actions/create_migration.rb#18 + def identical?; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#22 + def invoke!; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#10 + def migration_dir; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#14 + def migration_file_name; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#37 + def relative_existing_migration; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#29 + def revoke!; end + + private + + # source://railties//lib/rails/generators/actions/create_migration.rb#48 + def on_conflict_behavior; end + + # source://railties//lib/rails/generators/actions/create_migration.rb#69 + def say_status(status, color, message = T.unsafe(nil)); end +end + +# ActiveModel is a class to be implemented by each ORM to allow \Rails to +# generate customized controller code. +# +# The API has the same methods as ActiveRecord, but each method returns a +# string that matches the ORM API. +# +# For example: +# +# ActiveRecord::Generators::ActiveModel.find(Foo, "params[:id]") +# # => "Foo.find(params[:id])" +# +# DataMapper::Generators::ActiveModel.find(Foo, "params[:id]") +# # => "Foo.get(params[:id])" +# +# On initialization, the ActiveModel accepts the instance name that will +# receive the calls: +# +# builder = ActiveRecord::Generators::ActiveModel.new "@foo" +# builder.save # => "@foo.save" +# +# The only exception in ActiveModel for ActiveRecord is the use of self.build +# instead of self.new. +# +# source://railties//lib/rails/generators/active_model.rb#28 +class Rails::Generators::ActiveModel + # @return [ActiveModel] a new instance of ActiveModel + # + # source://railties//lib/rails/generators/active_model.rb#31 + def initialize(name); end + + # Used for: + # + # * DELETE +destroy+ + # + # source://railties//lib/rails/generators/active_model.rb#89 + def destroy; end + + # Used for: + # + # * POST +create+ + # * PATCH / PUT +update+ + # + # source://railties//lib/rails/generators/active_model.rb#82 + def errors; end + + # Returns the value of attribute name. + # + # source://railties//lib/rails/generators/active_model.rb#29 + def name; end + + # Used for: + # + # * POST +create+ + # + # source://railties//lib/rails/generators/active_model.rb#67 + def save; end + + # Used for: + # + # * PATCH / PUT +update+ + # + # source://railties//lib/rails/generators/active_model.rb#74 + def update(params = T.unsafe(nil)); end + + class << self + # Used for: + # + # * GET +index+ + # + # source://railties//lib/rails/generators/active_model.rb#38 + def all(klass); end + + # Used for: + # + # * GET +new+ + # * POST +create+ + # + # source://railties//lib/rails/generators/active_model.rb#56 + def build(klass, params = T.unsafe(nil)); end + + # Used for: + # + # * GET +show+ + # * GET +edit+ + # * PATCH / PUT +update+ + # * DELETE +destroy+ + # + # source://railties//lib/rails/generators/active_model.rb#48 + def find(klass, params = T.unsafe(nil)); end + end +end + +# source://railties//lib/rails/generators/app_name.rb#5 +module Rails::Generators::AppName + private + + # source://railties//lib/rails/generators/app_name.rb#22 + def app_const; end + + # source://railties//lib/rails/generators/app_name.rb#17 + def app_const_base; end + + # source://railties//lib/rails/generators/app_name.rb#9 + def app_name; end + + # source://railties//lib/rails/generators/app_name.rb#17 + def camelized; end + + # source://railties//lib/rails/generators/app_name.rb#13 + def original_app_name; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/app_name.rb#26 + def valid_const?; end +end + +# source://railties//lib/rails/generators/app_name.rb#6 +Rails::Generators::AppName::RESERVED_NAMES = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/generators/base.rb#17 +class Rails::Generators::Base < ::Thor::Group + include ::Thor::Actions + include ::Rails::Generators::Actions + extend ::Thor::Actions::ClassMethods + + private + + # Check whether the given class names are already taken by user + # application or Ruby on Rails. + # + # source://railties//lib/rails/generators/base.rb#264 + def class_collisions(*class_names); end + + # Takes in an array of nested modules and extracts the last module + # + # source://railties//lib/rails/generators/base.rb#287 + def extract_last_module(nesting); end + + # source://railties//lib/rails/generators/base.rb#427 + def gem_ruby_version; end + + # source://railties//lib/rails/generators/base.rb#302 + def indent(content, multiplier = T.unsafe(nil)); end + + # Wrap block with namespace of current application + # if namespace exists and is not skipped + # + # source://railties//lib/rails/generators/base.rb#296 + def module_namespacing(&block); end + + # source://railties//lib/rails/generators/base.rb#312 + def namespace; end + + # source://railties//lib/rails/generators/base.rb#320 + def namespace_dirs; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/base.rb#316 + def namespaced?; end + + # source://railties//lib/rails/generators/base.rb#324 + def namespaced_path; end + + # source://railties//lib/rails/generators/base.rb#307 + def wrap_with_namespace(content); end + + class << self + # Small macro to add ruby as an option to the generator with proper + # default value plus an instance helper method called shebang. + # + # source://railties//lib/rails/generators/base.rb#396 + def add_shebang_option!; end + + # Use \Rails default banner. + # + # source://railties//lib/rails/generators/base.rb#329 + def banner; end + + # Sets the base_name taking into account the current class namespace. + # + # source://railties//lib/rails/generators/base.rb#334 + def base_name; end + + # Returns the base root for a common set of generators. This is used to dynamically + # guess the default source root. + # + # source://railties//lib/rails/generators/base.rb#236 + def base_root; end + + # Make class option aware of Rails::Generators.options and Rails::Generators.aliases. + # + # source://railties//lib/rails/generators/base.rb#217 + def class_option(name, options = T.unsafe(nil)); end + + # Returns default aliases for the option name given doing a lookup in + # Rails::Generators.aliases. + # + # source://railties//lib/rails/generators/base.rb#357 + def default_aliases_for_option(name, options); end + + # Returns default for the option name given doing a lookup in config. + # + # source://railties//lib/rails/generators/base.rb#362 + def default_for_option(config, name, options, default); end + + # source://railties//lib/rails/generators/base.rb#422 + def default_generator_root; end + + # Returns the default source root for a given generator. This is used internally + # by Rails to set its generators source root. If you want to customize your source + # root, you should use source_root. + # + # source://railties//lib/rails/generators/base.rb#227 + def default_source_root; end + + # Returns the default value for the option name given doing a lookup in + # Rails::Generators.options. + # + # source://railties//lib/rails/generators/base.rb#351 + def default_value_for_option(name, options); end + + # Tries to get the description from a USAGE file one folder above the source + # root otherwise uses a default description. + # + # source://railties//lib/rails/generators/base.rb#41 + def desc(description = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/base.rb#29 + def exit_on_failure?; end + + # Removes the namespaces and get the generator name. For example, + # Rails::Generators::ModelGenerator will return "model" as generator name. + # + # source://railties//lib/rails/generators/base.rb#342 + def generator_name; end + + # Convenience method to hide this generator from the available ones when + # running rails generator command. + # + # source://railties//lib/rails/generators/base.rb#61 + def hide!; end + + # Invoke a generator based on the value supplied by the user to the + # given option named "name". A class option is created when this method + # is invoked and you can set a hash to customize it. + # + # ==== Examples + # + # module Rails::Generators + # class ControllerGenerator < Base + # hook_for :test_framework, aliases: "-t" + # end + # end + # + # The example above will create a test framework option and will invoke + # a generator based on the user supplied value. + # + # For example, if the user invoke the controller generator as: + # + # $ bin/rails generate controller Account --test-framework=test_unit + # + # The controller generator will then try to invoke the following generators: + # + # "rails:test_unit", "test_unit:controller", "test_unit" + # + # Notice that "rails:generators:test_unit" could be loaded as well, what + # \Rails looks for is the first and last parts of the namespace. This is what + # allows any test framework to hook into \Rails as long as it provides any + # of the hooks above. + # + # ==== Options + # + # The first and last part used to find the generator to be invoked are + # guessed based on class invokes hook_for, as noticed in the example above. + # This can be customized with two options: +:in+ and +:as+. + # + # Let's suppose you are creating a generator that needs to invoke the + # controller generator from test unit. Your first attempt is: + # + # class AwesomeGenerator < Rails::Generators::Base + # hook_for :test_framework + # end + # + # The lookup in this case for test_unit as input is: + # + # "test_unit:awesome", "test_unit" + # + # Which is not the desired lookup. You can change it by providing the + # +:as+ option: + # + # class AwesomeGenerator < Rails::Generators::Base + # hook_for :test_framework, as: :controller + # end + # + # And now it will look up at: + # + # "test_unit:controller", "test_unit" + # + # Similarly, if you want it to also look up in the rails namespace, you + # just need to provide the +:in+ value: + # + # class AwesomeGenerator < Rails::Generators::Base + # hook_for :test_framework, in: :rails, as: :controller + # end + # + # And the lookup is exactly the same as previously: + # + # "rails:test_unit", "test_unit:controller", "test_unit" + # + # ==== Switches + # + # All hooks come with switches for user interface. If you do not want + # to use any test framework, you can do: + # + # $ bin/rails generate controller Account --skip-test-framework + # + # Or similarly: + # + # $ bin/rails generate controller Account --no-test-framework + # + # ==== Boolean hooks + # + # In some cases, you may want to provide a boolean hook. For example, webrat + # developers might want to have webrat available on controller generator. + # This can be achieved as: + # + # Rails::Generators::ControllerGenerator.hook_for :webrat, type: :boolean + # + # Then, if you want webrat to be invoked, just supply: + # + # $ bin/rails generate controller Account --webrat + # + # The hooks lookup is similar as above: + # + # "rails:generators:webrat", "webrat:generators:controller", "webrat" + # + # ==== Custom invocations + # + # You can also supply a block to hook_for to customize how the hook is + # going to be invoked. The block receives two arguments, an instance + # of the current class and the class to be invoked. + # + # For example, in the resource generator, the controller should be invoked + # with a pluralized class name. But by default it is invoked with the same + # name as the resource generator, which is singular. To change this, we + # can give a block to customize how the controller can be invoked. + # + # hook_for :resource_controller do |instance, controller| + # instance.invoke controller, [ instance.name.pluralize ] + # end + # + # source://railties//lib/rails/generators/base.rb#174 + def hook_for(*names, &block); end + + # Keep hooks configuration that are used on prepare_for_invocation. + # + # source://railties//lib/rails/generators/base.rb#375 + def hooks; end + + # Cache source root and add lib/generators/base/generator/templates to + # source paths. + # + # source://railties//lib/rails/generators/base.rb#242 + def inherited(base); end + + # Convenience method to get the namespace from the class name. It's the + # same as Thor default except that the Generator at the end of the class + # is removed. + # + # source://railties//lib/rails/generators/base.rb#54 + def namespace(name = T.unsafe(nil)); end + + # Prepare class invocation to search on Rails namespace if a previous + # added hook is being used. + # + # source://railties//lib/rails/generators/base.rb#381 + def prepare_for_invocation(name, value); end + + # Remove a previously added hook. + # + # remove_hook_for :orm + # + # source://railties//lib/rails/generators/base.rb#207 + def remove_hook_for(*names); end + + # Returns the source root for this generator using default_source_root as default. + # + # source://railties//lib/rails/generators/base.rb#34 + def source_root(path = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/base.rb#414 + def usage_path; end + end +end + +# source://railties//lib/rails/generators.rb#29 +Rails::Generators::DEFAULT_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://railties//lib/rails/generators.rb#46 +Rails::Generators::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://railties//lib/rails/generators/database.rb#5 +class Rails::Generators::Database + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#119 + def base_package; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#123 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#130 + def feature; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#111 + def feature_name; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#115 + def gem; end + + # source://railties//lib/rails/generators/database.rb#128 + def host; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#95 + def name; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#107 + def port; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#103 + def service; end + + # source://railties//lib/rails/generators/database.rb#127 + def socket; end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/database.rb#99 + def template; end + + # source://railties//lib/rails/generators/database.rb#136 + def volume; end + + class << self + # source://railties//lib/rails/generators/database.rb#84 + def all; end + + # source://railties//lib/rails/generators/database.rb#72 + def build(database_name); end + end +end + +# source://railties//lib/rails/generators/database.rb#6 +Rails::Generators::Database::DATABASES = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/generators/database.rb#49 +module Rails::Generators::Database::MariaDB + # source://railties//lib/rails/generators/database.rb#50 + def name; end + + # source://railties//lib/rails/generators/database.rb#54 + def port; end + + # source://railties//lib/rails/generators/database.rb#58 + def service; end +end + +# source://railties//lib/rails/generators/database.rb#267 +class Rails::Generators::Database::MariaDBMySQL2 < ::Rails::Generators::Database::MySQL2 + include ::Rails::Generators::Database::MariaDB +end + +# source://railties//lib/rails/generators/database.rb#271 +class Rails::Generators::Database::MariaDBTrilogy < ::Rails::Generators::Database::Trilogy + include ::Rails::Generators::Database::MariaDB +end + +# source://railties//lib/rails/generators/database.rb#8 +module Rails::Generators::Database::MySQL + # source://railties//lib/rails/generators/database.rb#44 + def host; end + + # source://railties//lib/rails/generators/database.rb#9 + def name; end + + # source://railties//lib/rails/generators/database.rb#13 + def port; end + + # source://railties//lib/rails/generators/database.rb#17 + def service; end + + # source://railties//lib/rails/generators/database.rb#30 + def socket; end +end + +# source://railties//lib/rails/generators/database.rb#142 +class Rails::Generators::Database::MySQL2 < ::Rails::Generators::Database + include ::Rails::Generators::Database::MySQL + + # source://railties//lib/rails/generators/database.rb#153 + def base_package; end + + # source://railties//lib/rails/generators/database.rb#157 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#161 + def feature_name; end + + # source://railties//lib/rails/generators/database.rb#149 + def gem; end + + # source://railties//lib/rails/generators/database.rb#145 + def template; end +end + +# source://railties//lib/rails/generators/database.rb#275 +class Rails::Generators::Database::Null < ::Rails::Generators::Database + # source://railties//lib/rails/generators/database.rb#281 + def base_package; end + + # source://railties//lib/rails/generators/database.rb#282 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#283 + def feature_name; end + + # source://railties//lib/rails/generators/database.rb#276 + def name; end + + # source://railties//lib/rails/generators/database.rb#279 + def port; end + + # source://railties//lib/rails/generators/database.rb#278 + def service; end + + # source://railties//lib/rails/generators/database.rb#277 + def template; end + + # source://railties//lib/rails/generators/database.rb#280 + def volume; end +end + +# source://railties//lib/rails/generators/database.rb#166 +class Rails::Generators::Database::PostgreSQL < ::Rails::Generators::Database + # source://railties//lib/rails/generators/database.rb#196 + def base_package; end + + # source://railties//lib/rails/generators/database.rb#200 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#204 + def feature_name; end + + # source://railties//lib/rails/generators/database.rb#192 + def gem; end + + # source://railties//lib/rails/generators/database.rb#167 + def name; end + + # source://railties//lib/rails/generators/database.rb#188 + def port; end + + # source://railties//lib/rails/generators/database.rb#175 + def service; end + + # source://railties//lib/rails/generators/database.rb#171 + def template; end +end + +# source://railties//lib/rails/generators/database.rb#233 +class Rails::Generators::Database::SQLite3 < ::Rails::Generators::Database + # source://railties//lib/rails/generators/database.rb#254 + def base_package; end + + # source://railties//lib/rails/generators/database.rb#258 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#262 + def feature_name; end + + # source://railties//lib/rails/generators/database.rb#250 + def gem; end + + # source://railties//lib/rails/generators/database.rb#234 + def name; end + + # source://railties//lib/rails/generators/database.rb#246 + def port; end + + # source://railties//lib/rails/generators/database.rb#242 + def service; end + + # source://railties//lib/rails/generators/database.rb#238 + def template; end +end + +# source://railties//lib/rails/generators/database.rb#209 +class Rails::Generators::Database::Trilogy < ::Rails::Generators::Database + include ::Rails::Generators::Database::MySQL + + # source://railties//lib/rails/generators/database.rb#220 + def base_package; end + + # source://railties//lib/rails/generators/database.rb#224 + def build_package; end + + # source://railties//lib/rails/generators/database.rb#228 + def feature_name; end + + # source://railties//lib/rails/generators/database.rb#216 + def gem; end + + # source://railties//lib/rails/generators/database.rb#212 + def template; end +end + +# source://railties//lib/rails/generators/base.rb#14 +class Rails::Generators::Error < ::Thor::Error; end + +# source://railties//lib/rails/generators/generated_attribute.rb#8 +class Rails::Generators::GeneratedAttribute + # @return [GeneratedAttribute] a new instance of GeneratedAttribute + # + # source://railties//lib/rails/generators/generated_attribute.rb#114 + def initialize(name, type = T.unsafe(nil), index_type = T.unsafe(nil), attr_options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#216 + def attachment?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#220 + def attachments?; end + + # Returns the value of attribute attr_options. + # + # source://railties//lib/rails/generators/generated_attribute.rb#32 + def attr_options; end + + # source://railties//lib/rails/generators/generated_attribute.rb#176 + def column_name; end + + # source://railties//lib/rails/generators/generated_attribute.rb#138 + def default; end + + # source://railties//lib/rails/generators/generated_attribute.rb#122 + def field_type; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#180 + def foreign_key?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#196 + def has_index?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#200 + def has_uniq_index?; end + + # source://railties//lib/rails/generators/generated_attribute.rb#164 + def human_name; end + + # source://railties//lib/rails/generators/generated_attribute.rb#168 + def index_name; end + + # Sets the attribute index_name + # + # @param value the value to set the attribute index_name to. + # + # source://railties//lib/rails/generators/generated_attribute.rb#33 + def index_name=(_arg0); end + + # source://railties//lib/rails/generators/generated_attribute.rb#232 + def inject_index_options; end + + # source://railties//lib/rails/generators/generated_attribute.rb#228 + def inject_options; end + + # Returns the value of attribute name. + # + # source://railties//lib/rails/generators/generated_attribute.rb#31 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://railties//lib/rails/generators/generated_attribute.rb#31 + def name=(_arg0); end + + # source://railties//lib/rails/generators/generated_attribute.rb#236 + def options_for_migration; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#204 + def password_digest?; end + + # source://railties//lib/rails/generators/generated_attribute.rb#156 + def plural_name; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#188 + def polymorphic?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#184 + def reference?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#192 + def required?; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#212 + def rich_text?; end + + # source://railties//lib/rails/generators/generated_attribute.rb#160 + def singular_name; end + + # source://railties//lib/rails/generators/generated_attribute.rb#248 + def to_s; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#208 + def token?; end + + # Returns the value of attribute type. + # + # source://railties//lib/rails/generators/generated_attribute.rb#31 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://railties//lib/rails/generators/generated_attribute.rb#31 + def type=(_arg0); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#224 + def virtual?; end + + private + + # source://railties//lib/rails/generators/generated_attribute.rb#259 + def print_attribute_options; end + + class << self + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#68 + def dangerous_name?(name); end + + # source://railties//lib/rails/generators/generated_attribute.rb#36 + def parse(column_definition); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#83 + def reference?(type); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#79 + def valid_index_type?(index_type); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/generated_attribute.rb#73 + def valid_type?(type); end + + private + + # parse possible attribute options like :limit for string/text/binary/integer, :precision/:scale for decimals or :polymorphic for references/belongs_to + # when declaring options curly brackets should be used + # + # source://railties//lib/rails/generators/generated_attribute.rb#90 + def parse_type_and_options(type); end + end +end + +# source://railties//lib/rails/generators/generated_attribute.rb#11 +Rails::Generators::GeneratedAttribute::DEFAULT_TYPES = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/generators/generated_attribute.rb#9 +Rails::Generators::GeneratedAttribute::INDEX_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/generators/generated_attribute.rb#10 +Rails::Generators::GeneratedAttribute::UNIQ_INDEX_OPTIONS = T.let(T.unsafe(nil), Array) + +# Holds common methods for migrations. It assumes that migrations have the +# [0-9]*_name format and can be used by other frameworks (like Sequel) +# just by implementing the +next_migration_number+ method. +# +# source://railties//lib/rails/generators/migration.rb#11 +module Rails::Generators::Migration + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::Rails::Generators::Migration::ClassMethods + + # source://railties//lib/rails/generators/migration.rb#35 + def create_migration(destination, data, config = T.unsafe(nil), &block); end + + # Returns the value of attribute migration_class_name. + # + # source://railties//lib/rails/generators/migration.rb#13 + def migration_class_name; end + + # Returns the value of attribute migration_file_name. + # + # source://railties//lib/rails/generators/migration.rb#13 + def migration_file_name; end + + # Returns the value of attribute migration_number. + # + # source://railties//lib/rails/generators/migration.rb#13 + def migration_number; end + + # Creates a migration template at the given destination. The difference + # to the default template method is that the migration number is prepended + # to the destination file name. + # + # The migration number, migration file name, migration class name are + # available as instance variables in the template to be rendered. + # + # migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb" + # + # source://railties//lib/rails/generators/migration.rb#56 + def migration_template(source, destination, config = T.unsafe(nil)); end + + # source://railties//lib/rails/generators/migration.rb#39 + def set_migration_assigns!(destination); end +end + +# source://railties//lib/rails/generators/migration.rb#15 +module Rails::Generators::Migration::ClassMethods + # source://railties//lib/rails/generators/migration.rb#24 + def current_migration_number(dirname); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/migration.rb#20 + def migration_exists?(dirname, file_name); end + + # source://railties//lib/rails/generators/migration.rb#16 + def migration_lookup_at(dirname); end + + # @raise [NotImplementedError] + # + # source://railties//lib/rails/generators/migration.rb#30 + def next_migration_number(dirname); end +end + +# source://railties//lib/rails/generators/model_helpers.rb#7 +module Rails::Generators::ModelHelpers + # source://railties//lib/rails/generators/model_helpers.rb#26 + def initialize(args, *_options); end + + # source://railties//lib/rails/generators/model_helpers.rb#19 + def skip_warn; end + + # source://railties//lib/rails/generators/model_helpers.rb#19 + def skip_warn=(val); end + + private + + # @return [Boolean] + # + # source://railties//lib/rails/generators/model_helpers.rb#56 + def inflection_impossible?(name); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/model_helpers.rb#52 + def irregular_model_name?(name); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/model_helpers.rb#48 + def plural_model_name?(name); end + + class << self + # source://railties//lib/rails/generators/model_helpers.rb#21 + def included(base); end + + # source://railties//lib/rails/generators/model_helpers.rb#19 + def skip_warn; end + + # source://railties//lib/rails/generators/model_helpers.rb#19 + def skip_warn=(val); end + end +end + +# source://railties//lib/rails/generators/model_helpers.rb#14 +Rails::Generators::ModelHelpers::INFLECTION_IMPOSSIBLE_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/generators/model_helpers.rb#10 +Rails::Generators::ModelHelpers::IRREGULAR_MODEL_NAME_WARN_MESSAGE = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/generators/model_helpers.rb#8 +Rails::Generators::ModelHelpers::PLURAL_MODEL_NAME_WARN_MESSAGE = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/generators/named_base.rb#8 +class Rails::Generators::NamedBase < ::Rails::Generators::Base + # @return [NamedBase] a new instance of NamedBase + # + # source://railties//lib/rails/generators/named_base.rb#11 + def initialize(args, *options); end + + # Returns the value of attribute file_name. + # + # source://thor/1.3.2/lib/thor/base.rb#155 + def file_name; end + + # source://railties//lib/rails/generators/named_base.rb#29 + def js_template(source, destination); end + + # source://thor/1.3.2/lib/thor/base.rb#163 + def name; end + + # source://thor/1.3.2/lib/thor/base.rb#163 + def name=(_arg0); end + + # source://railties//lib/rails/generators/named_base.rb#23 + def template(source, *args, &block); end + + private + + # Tries to retrieve the application name or simply return application. + # + # source://railties//lib/rails/generators/named_base.rb#138 + def application_name; end + + # source://railties//lib/rails/generators/named_base.rb#175 + def assign_names!(name); end + + # source://railties//lib/rails/generators/named_base.rb#188 + def attributes_names; end + + # source://railties//lib/rails/generators/named_base.rb#70 + def class_name; end + + # source://railties//lib/rails/generators/named_base.rb#58 + def class_path; end + + # source://railties//lib/rails/generators/named_base.rb#105 + def edit_helper(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/generators/named_base.rb#54 + def file_path; end + + # source://railties//lib/rails/generators/named_base.rb#125 + def fixture_file_name; end + + # source://railties//lib/rails/generators/named_base.rb#74 + def human_name; end + + # source://railties//lib/rails/generators/named_base.rb#82 + def i18n_scope; end + + # source://railties//lib/rails/generators/named_base.rb#97 + def index_helper(type: T.unsafe(nil)); end + + # source://railties//lib/rails/generators/named_base.rb#43 + def inside_template; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/named_base.rb#50 + def inside_template?; end + + # source://railties//lib/rails/generators/named_base.rb#150 + def model_resource_name(base_name = T.unsafe(nil), prefix: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/named_base.rb#200 + def mountable_engine?; end + + # source://railties//lib/rails/generators/named_base.rb#66 + def namespaced_class_path; end + + # source://railties//lib/rails/generators/named_base.rb#109 + def new_helper(type: T.unsafe(nil)); end + + # Convert attributes array into GeneratedAttribute objects. + # + # source://railties//lib/rails/generators/named_base.rb#182 + def parse_attributes!; end + + # source://railties//lib/rails/generators/named_base.rb#121 + def plural_file_name; end + + # source://railties//lib/rails/generators/named_base.rb#78 + def plural_name; end + + # source://railties//lib/rails/generators/named_base.rb#167 + def plural_route_name; end + + # source://railties//lib/rails/generators/named_base.rb#117 + def plural_table_name; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/named_base.rb#196 + def pluralize_table_names?; end + + # source://railties//lib/rails/generators/named_base.rb#146 + def redirect_resource_name; end + + # source://railties//lib/rails/generators/named_base.rb#62 + def regular_class_path; end + + # source://railties//lib/rails/generators/named_base.rb#129 + def route_url; end + + # source://railties//lib/rails/generators/named_base.rb#101 + def show_helper(arg = T.unsafe(nil), type: T.unsafe(nil)); end + + # FIXME: We are avoiding to use alias because a bug on thor that make + # this method public and add it to the task list. + # + # source://railties//lib/rails/generators/named_base.rb#39 + def singular_name; end + + # source://railties//lib/rails/generators/named_base.rb#159 + def singular_route_name; end + + # source://railties//lib/rails/generators/named_base.rb#113 + def singular_table_name; end + + # source://railties//lib/rails/generators/named_base.rb#86 + def table_name; end + + # @return [Boolean] + # + # source://railties//lib/rails/generators/named_base.rb#93 + def uncountable?; end + + # source://railties//lib/rails/generators/named_base.rb#133 + def url_helper_prefix; end + + class << self + # Add a class collisions name to be checked on class initialization. You + # can supply a hash with a +:prefix+ or +:suffix+ to be tested. + # + # ==== Examples + # + # check_class_collision suffix: "Decorator" + # + # If the generator is invoked with class name Admin, it will check for + # the presence of "AdminDecorator". + # + # source://railties//lib/rails/generators/named_base.rb#214 + def check_class_collision(options = T.unsafe(nil)); end + end +end + +# We need to store the RAILS_DEV_PATH in a constant, otherwise the path +# can change when we FileUtils.cd. +# +# source://railties//lib/rails/generators.rb#65 +Rails::Generators::RAILS_DEV_PATH = T.let(T.unsafe(nil), String) + +# Deal with controller names on scaffold and add some helpers to deal with +# ActiveModel. +# +# source://railties//lib/rails/generators/resource_helpers.rb#10 +module Rails::Generators::ResourceHelpers + include ::Rails::Generators::ModelHelpers + + # Set controller variables on initialization. + # + # source://railties//lib/rails/generators/resource_helpers.rb#17 + def initialize(*args); end + + private + + # source://railties//lib/rails/generators/resource_helpers.rb#39 + def assign_controller_names!(name); end + + # source://railties//lib/rails/generators/resource_helpers.rb#50 + def controller_class_name; end + + # source://railties//lib/rails/generators/resource_helpers.rb#31 + def controller_class_path; end + + # Returns the value of attribute controller_file_name. + # + # source://railties//lib/rails/generators/resource_helpers.rb#29 + def controller_file_name; end + + # source://railties//lib/rails/generators/resource_helpers.rb#46 + def controller_file_path; end + + # source://railties//lib/rails/generators/resource_helpers.rb#54 + def controller_i18n_scope; end + + # Returns the value of attribute controller_name. + # + # source://railties//lib/rails/generators/resource_helpers.rb#29 + def controller_name; end + + # Loads the ORM::Generators::ActiveModel class. This class is responsible + # to tell scaffold entities how to generate a specific method for the + # ORM. Check Rails::Generators::ActiveModel for more information. + # + # source://railties//lib/rails/generators/resource_helpers.rb#61 + def orm_class; end + + # Initialize ORM::Generators::ActiveModel to access instance methods. + # + # source://railties//lib/rails/generators/resource_helpers.rb#77 + def orm_instance(name = T.unsafe(nil)); end + + class << self + # source://railties//lib/rails/generators/resource_helpers.rb#11 + def included(base); end + end +end + +# This class provides a TestCase for testing generators. To set up, you need +# just to configure the destination and set which generator is being tested: +# +# class AppGeneratorTest < Rails::Generators::TestCase +# tests AppGenerator +# destination File.expand_path("../tmp", __dir__) +# end +# +# If you want to ensure your destination root is clean before running each test, +# you can set a setup callback: +# +# class AppGeneratorTest < Rails::Generators::TestCase +# tests AppGenerator +# destination File.expand_path("../tmp", __dir__) +# setup :prepare_destination +# end +# +# source://railties//lib/rails/generators/test_case.rb#30 +class Rails::Generators::TestCase < ::ActiveSupport::TestCase + include ::ActiveSupport::Testing::Stream + include ::Rails::Generators::Testing::Behavior + include ::Rails::Generators::Testing::SetupAndTeardown + include ::Rails::Generators::Testing::Assertions + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::Rails::Generators::Testing::Behavior::ClassMethods + + # source://railties//lib/rails/generators/testing/behavior.rb#21 + def current_path; end + + # source://railties//lib/rails/generators/testing/behavior.rb#21 + def current_path=(_arg0); end + + # source://railties//lib/rails/generators/testing/behavior.rb#21 + def current_path?; end + + # source://railties//lib/rails/generators/testing/behavior.rb#22 + def default_arguments; end + + # source://railties//lib/rails/generators/testing/behavior.rb#22 + def default_arguments=(_arg0); end + + # source://railties//lib/rails/generators/testing/behavior.rb#22 + def default_arguments?; end + + # source://railties//lib/rails/generators/testing/behavior.rb#23 + def destination_root; end + + # source://railties//lib/rails/generators/testing/behavior.rb#23 + def destination_root=(_arg0); end + + # source://railties//lib/rails/generators/testing/behavior.rb#23 + def destination_root?; end + + # source://railties//lib/rails/generators/testing/behavior.rb#24 + def generator_class; end + + # source://railties//lib/rails/generators/testing/behavior.rb#24 + def generator_class=(_arg0); end + + # source://railties//lib/rails/generators/testing/behavior.rb#24 + def generator_class?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def current_path; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def current_path=(new_value); end + + # source://railties//lib/rails/generators/testing/behavior.rb#21 + def current_path?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def default_arguments; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def default_arguments=(new_value); end + + # source://railties//lib/rails/generators/testing/behavior.rb#22 + def default_arguments?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def destination_root; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def destination_root=(new_value); end + + # source://railties//lib/rails/generators/testing/behavior.rb#23 + def destination_root?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def generator_class; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def generator_class=(new_value); end + + # source://railties//lib/rails/generators/testing/behavior.rb#24 + def generator_class?; end + end +end + +# source://railties//lib/rails/generators/testing/behavior.rb#13 +module Rails::Generators::Testing; end + +# source://railties//lib/rails/generators/testing/assertions.rb#6 +module Rails::Generators::Testing::Assertions + # Asserts the given class method exists in the given content. This method does not detect + # class methods inside (class << self), only class methods which starts with "self.". + # When a block is given, it yields the content of the method. + # + # assert_migration "db/migrate/create_products.rb" do |migration| + # assert_class_method :up, migration do |up| + # assert_match(/create_table/, up) + # end + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#88 + def assert_class_method(method, content, &block); end + + # Asserts a given file exists. You need to supply an absolute path or a path relative + # to the configured destination: + # + # assert_file "config/environment.rb" + # + # You can also give extra arguments. If the argument is a regexp, it will check if the + # regular expression matches the given file content. If it's a string, it compares the + # file with the given string: + # + # assert_file "config/environment.rb", /initialize/ + # + # Finally, when a block is given, it yields the file content: + # + # assert_file "app/controllers/products_controller.rb" do |controller| + # assert_instance_method :index, controller do |index| + # assert_match(/Product\.all/, index) + # end + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#25 + def assert_directory(relative, *contents); end + + # Asserts the given attribute type gets a proper default value: + # + # assert_field_default_value :string, "MyString" + # + # source://railties//lib/rails/generators/testing/assertions.rb#117 + def assert_field_default_value(attribute_type, value); end + + # Asserts the given attribute type gets translated to a field type + # properly: + # + # assert_field_type :date, :date_select + # + # source://railties//lib/rails/generators/testing/assertions.rb#110 + def assert_field_type(attribute_type, field_type); end + + # Asserts a given file exists. You need to supply an absolute path or a path relative + # to the configured destination: + # + # assert_file "config/environment.rb" + # + # You can also give extra arguments. If the argument is a regexp, it will check if the + # regular expression matches the given file content. If it's a string, it compares the + # file with the given string: + # + # assert_file "config/environment.rb", /initialize/ + # + # Finally, when a block is given, it yields the file content: + # + # assert_file "app/controllers/products_controller.rb" do |controller| + # assert_instance_method :index, controller do |index| + # assert_match(/Product\.all/, index) + # end + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#25 + def assert_file(relative, *contents); end + + # Asserts a given initializer exists. You need to supply a path relative + # to the `config/initializers/` directory. + # + # assert_initializer "mail_interceptors.rb" + # + # You can also give extra arguments. If the argument is a regexp, it will check if the + # regular expression matches the given file content. If it's a string, it compares the + # file with the given string: + # + # assert_initializer "mail_interceptors.rb", /SandboxEmailInterceptor/ + # + # Finally, when a block is given, it yields the file content: + # + # assert_initializer "mail_interceptors.rb" do |initializer| + # assert_match(/SandboxEmailInterceptor/, initializer) + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#141 + def assert_initializer(name, *contents, &block); end + + # Asserts the given method exists in the given content. When a block is given, + # it yields the content of the method. + # + # assert_file "app/controllers/products_controller.rb" do |controller| + # assert_instance_method :index, controller do |index| + # assert_match(/Product\.all/, index) + # end + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#100 + def assert_instance_method(method, content); end + + # Asserts the given method exists in the given content. When a block is given, + # it yields the content of the method. + # + # assert_file "app/controllers/products_controller.rb" do |controller| + # assert_instance_method :index, controller do |index| + # assert_match(/Product\.all/, index) + # end + # end + # + # source://railties//lib/rails/generators/testing/assertions.rb#100 + def assert_method(method, content); end + + # Asserts a given migration exists. You need to supply an absolute path or a + # path relative to the configured destination: + # + # assert_migration "db/migrate/create_products.rb" + # + # This method manipulates the given path and tries to find any migration which + # matches the migration name. For example, the call above is converted to: + # + # assert_file "db/migrate/003_create_products.rb" + # + # Consequently, assert_migration accepts the same arguments has assert_file. + # + # source://railties//lib/rails/generators/testing/assertions.rb#64 + def assert_migration(relative, *contents, &block); end + + # Asserts a given file does not exist. You need to supply an absolute path or a + # path relative to the configured destination: + # + # assert_no_file "config/random.rb" + # + # source://railties//lib/rails/generators/testing/assertions.rb#47 + def assert_no_directory(relative); end + + # Asserts a given file does not exist. You need to supply an absolute path or a + # path relative to the configured destination: + # + # assert_no_file "config/random.rb" + # + # source://railties//lib/rails/generators/testing/assertions.rb#47 + def assert_no_file(relative); end + + # Asserts a given migration does not exist. You need to supply an absolute path or a + # path relative to the configured destination: + # + # assert_no_migration "db/migrate/create_products.rb" + # + # source://railties//lib/rails/generators/testing/assertions.rb#74 + def assert_no_migration(relative); end +end + +# source://railties//lib/rails/generators/testing/behavior.rb#14 +module Rails::Generators::Testing::Behavior + include ::ActiveSupport::Testing::Stream + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::Rails::Generators::Testing::Behavior::ClassMethods + + # Create a Rails::Generators::GeneratedAttribute by supplying the + # attribute type and, optionally, the attribute name: + # + # create_generated_attribute(:string, "name") + # + # source://railties//lib/rails/generators/testing/behavior.rb#89 + def create_generated_attribute(attribute_type, name = T.unsafe(nil), index = T.unsafe(nil)); end + + # Instantiate the generator. + # + # source://railties//lib/rails/generators/testing/behavior.rb#81 + def generator(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Runs the generator configured for this class. The first argument is an array like + # command line arguments: + # + # class AppGeneratorTest < Rails::Generators::TestCase + # tests AppGenerator + # destination File.expand_path("../tmp", __dir__) + # setup :prepare_destination + # + # test "database.yml is not created when skipping Active Record" do + # run_generator %w(myapp --skip-active-record) + # assert_no_file "config/database.yml" + # end + # end + # + # You can provide a configuration hash as second argument. This method returns the output + # printed by the generator. + # + # source://railties//lib/rails/generators/testing/behavior.rb#67 + def run_generator(args = T.unsafe(nil), config = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://railties//lib/rails/generators/testing/behavior.rb#94 + def destination_root_is_set?; end + + # source://railties//lib/rails/generators/testing/behavior.rb#98 + def ensure_current_path; end + + # source://railties//lib/rails/generators/testing/behavior.rb#108 + def migration_file_name(relative); end + + # Clears all files and directories in destination. + # + # source://railties//lib/rails/generators/testing/behavior.rb#103 + def prepare_destination; end + + module GeneratedClassMethods + def current_path; end + def current_path=(value); end + def current_path?; end + def default_arguments; end + def default_arguments=(value); end + def default_arguments?; end + def destination_root; end + def destination_root=(value); end + def destination_root?; end + def generator_class; end + def generator_class=(value); end + def generator_class?; end + end + + module GeneratedInstanceMethods + def current_path; end + def current_path=(value); end + def current_path?; end + def default_arguments; end + def default_arguments=(value); end + def default_arguments?; end + def destination_root; end + def destination_root=(value); end + def destination_root?; end + def generator_class; end + def generator_class=(value); end + def generator_class?; end + end +end + +# source://railties//lib/rails/generators/testing/behavior.rb#27 +module Rails::Generators::Testing::Behavior::ClassMethods + # Sets default arguments on generator invocation. This can be overwritten when + # invoking it. + # + # arguments %w(app_name --skip-active-record) + # + # source://railties//lib/rails/generators/testing/behavior.rb#39 + def arguments(array); end + + # Sets the destination of generator files: + # + # destination File.expand_path("../tmp", __dir__) + # + # source://railties//lib/rails/generators/testing/behavior.rb#46 + def destination(path); end + + # Sets which generator should be tested: + # + # tests AppGenerator + # + # source://railties//lib/rails/generators/testing/behavior.rb#31 + def tests(klass); end +end + +# source://railties//lib/rails/generators/testing/setup_and_teardown.rb#6 +module Rails::Generators::Testing::SetupAndTeardown + # source://railties//lib/rails/generators/testing/setup_and_teardown.rb#7 + def setup; end + + # source://railties//lib/rails/generators/testing/setup_and_teardown.rb#13 + def teardown; end +end + +# Built-in Health Check Endpoint +# +# \Rails also comes with a built-in health check endpoint that is reachable at +# the +/up+ path. This endpoint will return a 200 status code if the app has +# booted with no exceptions, and a 500 status code otherwise. +# +# In production, many applications are required to report their status upstream, +# whether it's to an uptime monitor that will page an engineer when things go +# wrong, or a load balancer or Kubernetes controller used to determine a pod's +# health. This health check is designed to be a one-size fits all that will work +# in many situations. +# +# While any newly generated \Rails applications will have the health check at +# +/up+, you can configure the path to be anything you'd like in your +# "config/routes.rb": +# +# Rails.application.routes.draw do +# get "healthz" => "rails/health#show", as: :rails_health_check +# end +# +# The health check will now be accessible via the +/healthz+ path. +# +# NOTE: This endpoint does not reflect the status of all of your application's +# dependencies, such as the database or Redis cluster. Replace +# "rails/health#show" with your own controller action if you have +# application specific needs. +# +# Think carefully about what you want to check as it can lead to situations +# where your application is being restarted due to a third-party service going +# bad. Ideally, you should design your application to handle those outages +# gracefully. +# +# source://railties//lib/rails/health_controller.rb#35 +class Rails::HealthController < ::ActionController::Base + # source://railties//lib/rails/health_controller.rb#38 + def show; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://railties//lib/rails/health_controller.rb#51 + def html_status(color:); end + + # source://railties//lib/rails/health_controller.rb#47 + def render_down; end + + # source://railties//lib/rails/health_controller.rb#43 + def render_up; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + +# This module helps build the runtime properties that are displayed in +# Rails::InfoController responses. These include the active \Rails version, +# Ruby version, Rack version, and so on. +# +# source://railties//lib/rails/info.rb#9 +module Rails::Info + # source://railties//lib/rails/info.rb#10 + def properties; end + + # source://railties//lib/rails/info.rb#10 + def properties=(val); end + + class << self + # source://railties//lib/rails/info.rb#31 + def inspect; end + + # source://railties//lib/rails/info.rb#10 + def properties; end + + # source://railties//lib/rails/info.rb#10 + def properties=(val); end + + # source://railties//lib/rails/info.rb#25 + def property(name, value = T.unsafe(nil)); end + + # source://railties//lib/rails/info.rb#43 + def to_html; end + + # source://railties//lib/rails/info.rb#31 + def to_s; end + end +end + +# source://railties//lib/rails/info_controller.rb#6 +class Rails::InfoController < ::Rails::ApplicationController + # source://railties//lib/rails/info_controller.rb#12 + def index; end + + # source://railties//lib/rails/info_controller.rb#35 + def notes; end + + # source://railties//lib/rails/info_controller.rb#16 + def properties; end + + # source://railties//lib/rails/info_controller.rb#21 + def routes; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://railties//lib/rails/info_controller.rb#8 + def _layout_from_proc; end + + # source://railties//lib/rails/info_controller.rb#44 + def matching_routes(query:, exact_match:); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# source://railties//lib/rails/initializable.rb#6 +module Rails::Initializable + mixes_in_class_methods ::Rails::Initializable::ClassMethods + + # source://railties//lib/rails/initializable.rb#66 + def initializers; end + + # source://railties//lib/rails/initializable.rb#58 + def run_initializers(group = T.unsafe(nil), *args); end + + class << self + # source://railties//lib/rails/initializable.rb#7 + def included(base); end + end +end + +# source://railties//lib/rails/initializable.rb#70 +module Rails::Initializable::ClassMethods + # @raise [ArgumentError] + # + # source://railties//lib/rails/initializable.rb#88 + def initializer(name, opts = T.unsafe(nil), &blk); end + + # source://railties//lib/rails/initializable.rb#71 + def initializers; end + + # source://railties//lib/rails/initializable.rb#75 + def initializers_chain; end + + # source://railties//lib/rails/initializable.rb#84 + def initializers_for(binding); end +end + +# source://railties//lib/rails/initializable.rb#45 +class Rails::Initializable::Collection < ::Array + include ::TSort + + # source://railties//lib/rails/initializable.rb#53 + def +(other); end + + # source://railties//lib/rails/initializable.rb#49 + def tsort_each_child(initializer, &block); end + + def tsort_each_node; end +end + +# source://railties//lib/rails/initializable.rb#11 +class Rails::Initializable::Initializer + # @return [Initializer] a new instance of Initializer + # + # source://railties//lib/rails/initializable.rb#14 + def initialize(name, context, options, &block); end + + # source://railties//lib/rails/initializable.rb#23 + def after; end + + # source://railties//lib/rails/initializable.rb#19 + def before; end + + # @return [Boolean] + # + # source://railties//lib/rails/initializable.rb#27 + def belongs_to?(group); end + + # source://railties//lib/rails/initializable.rb#35 + def bind(context); end + + # Returns the value of attribute block. + # + # source://railties//lib/rails/initializable.rb#12 + def block; end + + # source://railties//lib/rails/initializable.rb#40 + def context_class; end + + # Returns the value of attribute name. + # + # source://railties//lib/rails/initializable.rb#12 + def name; end + + # source://railties//lib/rails/initializable.rb#31 + def run(*args); end +end + +# source://railties//lib/rails/test_unit/line_filtering.rb#6 +module Rails::LineFiltering + # source://railties//lib/rails/test_unit/line_filtering.rb#7 + def run(reporter, options = T.unsafe(nil)); end +end + +# source://railties//lib/rails/mailers_controller.rb#6 +class Rails::MailersController < ::Rails::ApplicationController + # source://railties//lib/rails/mailers_controller.rb#22 + def download; end + + # source://railties//lib/rails/mailers_controller.rb#17 + def index; end + + # source://railties//lib/rails/mailers_controller.rb#32 + def preview; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://railties//lib/rails/mailers_controller.rb#107 + def attachment_url(attachment); end + + # source://railties//lib/rails/mailers_controller.rb#101 + def attachments_for(email); end + + # source://railties//lib/rails/mailers_controller.rb#93 + def find_part(format); end + + # source://railties//lib/rails/mailers_controller.rb#81 + def find_preferred_part(*formats); end + + # source://railties//lib/rails/mailers_controller.rb#69 + def find_preview; end + + # source://railties//lib/rails/mailers_controller.rb#115 + def locale_query(locale); end + + # source://railties//lib/rails/mailers_controller.rb#111 + def part_query(mime_type); end + + # source://railties//lib/rails/mailers_controller.rb#119 + def set_locale(&block); end + + # @return [Boolean] + # + # source://railties//lib/rails/mailers_controller.rb#65 + def show_previews?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _helper_methods; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# source://railties//lib/rails/mailers_controller.rb#0 +module Rails::MailersController::HelperMethods + include ::ActionText::ContentHelper + include ::ActionText::TagHelper + include ::ActionController::Base::HelperMethods + + # source://railties//lib/rails/mailers_controller.rb#13 + def attachment_url(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/mailers_controller.rb#13 + def locale_query(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/mailers_controller.rb#13 + def part_query(*_arg0, **_arg1, &_arg2); end +end + +# source://railties//lib/rails/paths.rb#6 +module Rails::Paths; end + +# source://railties//lib/rails/paths.rb#114 +class Rails::Paths::Path + include ::Enumerable + + # @return [Path] a new instance of Path + # + # source://railties//lib/rails/paths.rb#119 + def initialize(root, current, paths, options = T.unsafe(nil)); end + + # source://railties//lib/rails/paths.rb#171 + def <<(path); end + + # source://railties//lib/rails/paths.rb#132 + def absolute_current; end + + # source://railties//lib/rails/paths.rb#153 + def autoload!; end + + # source://railties//lib/rails/paths.rb#161 + def autoload?; end + + # source://railties//lib/rails/paths.rb#153 + def autoload_once!; end + + # source://railties//lib/rails/paths.rb#161 + def autoload_once?; end + + # source://railties//lib/rails/paths.rb#136 + def children; end + + # source://railties//lib/rails/paths.rb#176 + def concat(paths); end + + # source://railties//lib/rails/paths.rb#167 + def each(&block); end + + # source://railties//lib/rails/paths.rb#153 + def eager_load!; end + + # source://railties//lib/rails/paths.rb#161 + def eager_load?; end + + # Returns all expanded paths but only if they exist in the filesystem. + # + # source://railties//lib/rails/paths.rb#220 + def existent; end + + # source://railties//lib/rails/paths.rb#231 + def existent_directories; end + + # Expands all paths against the root and return all unique values. + # + # source://railties//lib/rails/paths.rb#201 + def expanded; end + + # source://railties//lib/rails/paths.rb#196 + def extensions; end + + # source://railties//lib/rails/paths.rb#143 + def first; end + + # Returns the value of attribute glob. + # + # source://railties//lib/rails/paths.rb#117 + def glob; end + + # Sets the attribute glob + # + # @param value the value to set the attribute glob to. + # + # source://railties//lib/rails/paths.rb#117 + def glob=(_arg0); end + + # source://railties//lib/rails/paths.rb#147 + def last; end + + # source://railties//lib/rails/paths.rb#153 + def load_path!; end + + # source://railties//lib/rails/paths.rb#161 + def load_path?; end + + # source://railties//lib/rails/paths.rb#188 + def paths; end + + # source://railties//lib/rails/paths.rb#171 + def push(path); end + + # source://railties//lib/rails/paths.rb#157 + def skip_autoload!; end + + # source://railties//lib/rails/paths.rb#157 + def skip_autoload_once!; end + + # source://railties//lib/rails/paths.rb#157 + def skip_eager_load!; end + + # source://railties//lib/rails/paths.rb#157 + def skip_load_path!; end + + # Expands all paths against the root and return all unique values. + # + # source://railties//lib/rails/paths.rb#201 + def to_a; end + + # source://railties//lib/rails/paths.rb#184 + def to_ary; end + + # source://railties//lib/rails/paths.rb#180 + def unshift(*paths); end + + private + + # source://railties//lib/rails/paths.rb#238 + def files_in(path); end +end + +# This object is an extended hash that behaves as root of the Rails::Paths system. +# It allows you to collect information about how you want to structure your application +# paths through a Hash-like \API. It requires you to give a physical path on initialization. +# +# root = Root.new "/rails" +# root.add "app/controllers", eager_load: true +# +# The above command creates a new root object and adds "app/controllers" as a path. +# This means we can get a Rails::Paths::Path object back like below: +# +# path = root["app/controllers"] +# path.eager_load? # => true +# path.is_a?(Rails::Paths::Path) # => true +# +# The Path[rdoc-ref:Rails::Paths::Path] object is simply an enumerable and +# allows you to easily add extra paths: +# +# path.is_a?(Enumerable) # => true +# path.to_ary.inspect # => ["app/controllers"] +# +# path << "lib/controllers" +# path.to_ary.inspect # => ["app/controllers", "lib/controllers"] +# +# Notice that when you add a path using #add, the +# Path[rdoc-ref:Rails::Paths::Path] object created already contains the path +# with the same path value given to #add. In some situations, you may not +# want this behavior, so you can give :with as option. +# +# root.add "config/routes", with: "config/routes.rb" +# root["config/routes"].inspect # => ["config/routes.rb"] +# +# The #add method accepts the following options as arguments: +# +eager_load+, +autoload+, +autoload_once+, and +glob+. +# +# Finally, the Path[rdoc-ref:Rails::Paths::Path] object also provides a few +# helpers: +# +# root = Root.new "/rails" +# root.add "app/controllers" +# +# root["app/controllers"].expanded # => ["/rails/app/controllers"] +# root["app/controllers"].existent # => ["/rails/app/controllers"] +# +# Check the Rails::Paths::Path documentation for more information. +# +# source://railties//lib/rails/paths.rb#51 +class Rails::Paths::Root + # @return [Root] a new instance of Root + # + # source://railties//lib/rails/paths.rb#54 + def initialize(path); end + + # source://railties//lib/rails/paths.rb#69 + def [](path); end + + # source://railties//lib/rails/paths.rb#59 + def []=(path, value); end + + # source://railties//lib/rails/paths.rb#64 + def add(path, options = T.unsafe(nil)); end + + # source://railties//lib/rails/paths.rb#85 + def all_paths; end + + # source://railties//lib/rails/paths.rb#89 + def autoload_once; end + + # source://railties//lib/rails/paths.rb#97 + def autoload_paths; end + + # source://railties//lib/rails/paths.rb#93 + def eager_load; end + + # source://railties//lib/rails/paths.rb#77 + def keys; end + + # source://railties//lib/rails/paths.rb#101 + def load_paths; end + + # Returns the value of attribute path. + # + # source://railties//lib/rails/paths.rb#52 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://railties//lib/rails/paths.rb#52 + def path=(_arg0); end + + # source://railties//lib/rails/paths.rb#73 + def values; end + + # source://railties//lib/rails/paths.rb#81 + def values_at(*list); end + + private + + # source://railties//lib/rails/paths.rb#106 + def filter_by(&block); end +end + +# source://railties//lib/rails/pwa_controller.rb#5 +class Rails::PwaController < ::Rails::ApplicationController + # source://railties//lib/rails/pwa_controller.rb#12 + def manifest; end + + # source://railties//lib/rails/pwa_controller.rb#8 + def service_worker; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + +# source://railties//lib/rails/rack.rb#4 +module Rails::Rack; end + +# Sets log tags, logs the request, calls the app, and flushes the logs. +# +# Log tags (+taggers+) can be an Array containing: methods that the +request+ +# object responds to, objects that respond to +to_s+ or Proc objects that accept +# an instance of the +request+ object. +# +# source://railties//lib/rails/rack/logger.rb#14 +class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber + # @return [Logger] a new instance of Logger + # + # source://railties//lib/rails/rack/logger.rb#15 + def initialize(app, taggers = T.unsafe(nil)); end + + # source://railties//lib/rails/rack/logger.rb#20 + def call(env); end + + private + + # source://railties//lib/rails/rack/logger.rb#33 + def call_app(request, env); end + + # source://railties//lib/rails/rack/logger.rb#64 + def compute_tags(request); end + + # source://railties//lib/rails/rack/logger.rb#81 + def finish_request_instrumentation(handle, logger_tag_pop_count); end + + # source://railties//lib/rails/rack/logger.rb#77 + def logger; end + + # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700 + # + # source://railties//lib/rails/rack/logger.rb#56 + def started_request_message(request); end +end + +# Allows you to silence requests made to a specific path. +# This is useful for preventing recurring requests like health checks from clogging the logging. +# This middleware is used to do just that against the path /up in production by default. +# +# Example: +# +# config.middleware.insert_before \ +# Rails::Rack::Logger, Rails::Rack::SilenceRequest, path: "/up" +# +# This middleware can also be configured using `config.silence_healthcheck_path = "/up"` in Rails. +# +# source://railties//lib/rails/rack/silence_request.rb#19 +class Rails::Rack::SilenceRequest + # @return [SilenceRequest] a new instance of SilenceRequest + # + # source://railties//lib/rails/rack/silence_request.rb#20 + def initialize(app, path:); end + + # source://railties//lib/rails/rack/silence_request.rb#24 + def call(env); end +end + +# +Rails::Railtie+ is the core of the \Rails framework and provides +# several hooks to extend \Rails and/or modify the initialization process. +# +# Every major component of \Rails (Action Mailer, Action Controller, Active +# Record, etc.) implements a railtie. Each of them is responsible for their +# own initialization. This makes \Rails itself absent of any component hooks, +# allowing other components to be used in place of any of the \Rails defaults. +# +# Developing a \Rails extension does _not_ require implementing a railtie, but +# if you need to interact with the \Rails framework during or after boot, then +# a railtie is needed. +# +# For example, an extension doing any of the following would need a railtie: +# +# * creating initializers +# * configuring a \Rails framework for the application, like setting a generator +# * adding config.* keys to the environment +# * setting up a subscriber with ActiveSupport::Notifications +# * adding Rake tasks +# +# == Creating a Railtie +# +# To extend \Rails using a railtie, create a subclass of +Rails::Railtie+. +# This class must be loaded during the \Rails boot process, and is conventionally +# called +MyNamespace::Railtie+. +# +# The following example demonstrates an extension which can be used with or +# without \Rails. +# +# # lib/my_gem/railtie.rb +# module MyGem +# class Railtie < Rails::Railtie +# end +# end +# +# # lib/my_gem.rb +# require "my_gem/railtie" if defined?(Rails::Railtie) +# +# == Initializers +# +# To add an initialization step to the \Rails boot process from your railtie, just +# define the initialization code with the +initializer+ macro: +# +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do +# # some initialization behavior +# end +# end +# +# If specified, the block can also receive the application object, in case you +# need to access some application-specific configuration, like middleware: +# +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do |app| +# app.middleware.use MyGem::Middleware +# end +# end +# +# Finally, you can also pass :before and :after as options to +# +initializer+, in case you want to couple it with a specific step in the +# initialization process. +# +# == Configuration +# +# Railties can access a config object which contains configuration shared by all +# railties and the application: +# +# class MyGem::Railtie < Rails::Railtie +# # Customize the ORM +# config.app_generators.orm :my_gem_orm +# +# # Add a to_prepare block which is executed once in production +# # and before each request in development. +# config.to_prepare do +# MyGem.setup! +# end +# end +# +# == Loading Rake Tasks and Generators +# +# If your railtie has Rake tasks, you can tell \Rails to load them through the method +# +rake_tasks+: +# +# class MyGem::Railtie < Rails::Railtie +# rake_tasks do +# load "path/to/my_gem.tasks" +# end +# end +# +# By default, \Rails loads generators from your load path. However, if you want to place +# your generators at a different location, you can specify in your railtie a block which +# will load them during normal generators lookup: +# +# class MyGem::Railtie < Rails::Railtie +# generators do +# require "path/to/my_gem_generator" +# end +# end +# +# Since filenames on the load path are shared across gems, be sure that files you load +# through a railtie have unique names. +# +# == Run another program when the \Rails server starts +# +# In development, it's very usual to have to run another process next to the \Rails Server. In example +# you might want to start the Webpack or React server. Or maybe you need to run your job scheduler process +# like Sidekiq. This is usually done by opening a new shell and running the program from here. +# +# \Rails allow you to specify a +server+ block which will get called when a \Rails server starts. +# This way, your users don't need to remember to have to open a new shell and run another program, making +# this less confusing for everyone. +# It can be used like this: +# +# class MyGem::Railtie < Rails::Railtie +# server do +# WebpackServer.start +# end +# end +# +# == Application and Engine +# +# An engine is nothing more than a railtie with some initializers already set. And since +# Rails::Application is an engine, the same configuration described here can be +# used in both. +# +# Be sure to look at the documentation of those specific classes for more information. +# +# source://railties//lib/rails/railtie.rb#136 +class Rails::Railtie + include ::Rails::Initializable + extend ::ActiveSupport::DescendantsTracker + extend ::Rails::Initializable::ClassMethods + + # @return [Railtie] a new instance of Railtie + # + # source://railties//lib/rails/railtie.rb#245 + def initialize; end + + # This is used to create the config object on Railties, an instance of + # Railtie::Configuration, that is used by Railties and Application to store + # related configuration. + # + # source://railties//lib/rails/railtie.rb#262 + def config; end + + # source://railties//lib/rails/railtie.rb#255 + def configure(&block); end + + # source://railties//lib/rails/railtie.rb#251 + def inspect; end + + # source://railties//lib/rails/railtie.rb#243 + def railtie_name(*_arg0, **_arg1, &_arg2); end + + # source://railties//lib/rails/railtie.rb#266 + def railtie_namespace; end + + protected + + # source://railties//lib/rails/railtie.rb#271 + def run_console_blocks(app); end + + # source://railties//lib/rails/railtie.rb#275 + def run_generators_blocks(app); end + + # source://railties//lib/rails/railtie.rb#279 + def run_runner_blocks(app); end + + # source://railties//lib/rails/railtie.rb#288 + def run_server_blocks(app); end + + # source://railties//lib/rails/railtie.rb#283 + def run_tasks_blocks(app); end + + private + + # run `&block` in every registered block in `#register_block_for` + # + # source://railties//lib/rails/railtie.rb#294 + def each_registered_block(type, &block); end + + class << self + # source://railties//lib/rails/railtie.rb#194 + def <=>(other); end + + # @return [Boolean] + # + # source://railties//lib/rails/railtie.rb#172 + def abstract_railtie?; end + + # source://railties//lib/rails/railtie.rb#146 + def config(*_arg0, **_arg1, &_arg2); end + + # Allows you to configure the railtie. This is the same method seen in + # Railtie::Configurable, but this module is no longer required for all + # subclasses of Railtie so we provide the class method here. + # + # source://railties//lib/rails/railtie.rb#190 + def configure(&block); end + + # source://railties//lib/rails/railtie.rb#156 + def console(&blk); end + + # source://railties//lib/rails/railtie.rb#164 + def generators(&blk); end + + # @private + # + # source://railties//lib/rails/railtie.rb#198 + def inherited(subclass); end + + # Since Rails::Railtie cannot be instantiated, any methods that call + # +instance+ are intended to be called only on subclasses of a Railtie. + # + # source://railties//lib/rails/railtie.rb#183 + def instance; end + + # source://railties//lib/rails/railtie.rb#176 + def railtie_name(name = T.unsafe(nil)); end + + # source://railties//lib/rails/railtie.rb#152 + def rake_tasks(&blk); end + + # source://railties//lib/rails/railtie.rb#160 + def runner(&blk); end + + # source://railties//lib/rails/railtie.rb#168 + def server(&blk); end + + # source://railties//lib/rails/railtie.rb#148 + def subclasses; end + + protected + + # source://railties//lib/rails/railtie.rb#206 + def increment_load_index; end + + # Returns the value of attribute load_index. + # + # source://railties//lib/rails/railtie.rb#204 + def load_index; end + + private + + # source://railties//lib/rails/railtie.rb#212 + def generate_railtie_name(string); end + + # If the class method does not have a method, then send the method call + # to the Railtie instance. + # + # source://railties//lib/rails/railtie.rb#224 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + def new(*_arg0); end + + # receives an instance variable identifier, set the variable value if is + # blank and append given block to value, which will be used later in + # `#each_registered_block(type, &block)` + # + # source://railties//lib/rails/railtie.rb#235 + def register_block_for(type, &blk); end + + # @return [Boolean] + # + # source://railties//lib/rails/railtie.rb#216 + def respond_to_missing?(name, _); end + end +end + +# source://railties//lib/rails/railtie.rb#142 +Rails::Railtie::ABSTRACT_RAILTIES = T.let(T.unsafe(nil), Array) + +# source://railties//lib/rails/railtie/configuration.rb#7 +class Rails::Railtie::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://railties//lib/rails/railtie/configuration.rb#8 + def initialize; end + + # Last configurable block to run. Called after frameworks initialize. + # + # source://railties//lib/rails/railtie/configuration.rb#70 + def after_initialize(&block); end + + # Called after application routes have been loaded. + # + # source://railties//lib/rails/railtie/configuration.rb#75 + def after_routes_loaded(&block); end + + # This allows you to modify application's generators from Railties. + # + # Values set on app_generators will become defaults for application, unless + # application overwrites them. + # + # @yield [@@app_generators] + # + # source://railties//lib/rails/railtie/configuration.rb#47 + def app_generators; end + + # This allows you to modify the application's middlewares from Engines. + # + # All operations you run on the app_middleware will be replayed on the + # application once it is defined and the default_middlewares are + # created + # + # source://railties//lib/rails/railtie/configuration.rb#39 + def app_middleware; end + + # First configurable block to run. Called before any initializers are run. + # + # source://railties//lib/rails/railtie/configuration.rb#54 + def before_configuration(&block); end + + # Third configurable block to run. Does not run if +config.eager_load+ + # set to false. + # + # source://railties//lib/rails/railtie/configuration.rb#60 + def before_eager_load(&block); end + + # Second configurable block to run. Called before frameworks initialize. + # + # source://railties//lib/rails/railtie/configuration.rb#65 + def before_initialize(&block); end + + # All namespaces that are eager loaded + # + # source://railties//lib/rails/railtie/configuration.rb#18 + def eager_load_namespaces; end + + # @return [Boolean] + # + # source://railties//lib/rails/railtie/configuration.rb#90 + def respond_to?(name, include_private = T.unsafe(nil)); end + + # Defines generic callbacks to run before #after_initialize. Useful for + # Rails::Railtie subclasses. + # + # source://railties//lib/rails/railtie/configuration.rb#86 + def to_prepare(&blk); end + + # Array of callbacks defined by #to_prepare. + # + # source://railties//lib/rails/railtie/configuration.rb#80 + def to_prepare_blocks; end + + # Add directories that should be watched for change. + # The key of the hashes should be directories and the values should + # be an array of extensions to match in each directory. + # + # source://railties//lib/rails/railtie/configuration.rb#30 + def watchable_dirs; end + + # Add files that should be watched for change. + # + # source://railties//lib/rails/railtie/configuration.rb#23 + def watchable_files; end + + private + + # @return [Boolean] + # + # source://railties//lib/rails/railtie/configuration.rb#95 + def actual_method?(key); end + + # source://railties//lib/rails/railtie/configuration.rb#99 + def method_missing(name, *args, &blk); end + + class << self + # Expose the eager_load_namespaces at "module" level for convenience. + # + # source://railties//lib/rails/railtie/configuration.rb#13 + def eager_load_namespaces; end + end +end + +# Implements the logic behind +Rails::Command::NotesCommand+. See rails notes --help for usage information. +# +# Annotation objects are triplets :line, :tag, :text that +# represent the line where the annotation lives, its tag, and its text. Note +# the filename is not stored. +# +# Annotations are looked for in comments and modulus whitespace they have to +# start with the tag optionally followed by a colon. Everything up to the end +# of the line (or closing ERB comment tag) is considered to be their text. +# +# source://railties//lib/rails/source_annotation_extractor.rb#21 +class Rails::SourceAnnotationExtractor + # @return [SourceAnnotationExtractor] a new instance of SourceAnnotationExtractor + # + # source://railties//lib/rails/source_annotation_extractor.rb#154 + def initialize(tag); end + + # Prints the mapping from filenames to annotations in +results+ ordered by filename. + # The +options+ hash is passed to each annotation's +to_s+. + # + # source://railties//lib/rails/source_annotation_extractor.rb#203 + def display(results, options = T.unsafe(nil)); end + + # Returns a hash that maps filenames under +dirs+ (recursively) to arrays + # with their annotations. + # + # source://railties//lib/rails/source_annotation_extractor.rb#160 + def find(dirs); end + + # Returns a hash that maps filenames under +dir+ (recursively) to arrays + # with their annotations. Files with extensions registered in + # Rails::SourceAnnotationExtractor::Annotation.extensions are + # taken into account. Only files with annotations are included. + # + # source://railties//lib/rails/source_annotation_extractor.rb#168 + def find_in(dir); end + + # Returns the value of attribute tag. + # + # source://railties//lib/rails/source_annotation_extractor.rb#152 + def tag; end + + class << self + # Prints all annotations with tag +tag+ under the root directories +app+, + # +config+, +db+, +lib+, and +test+ (recursively). + # + # If +tag+ is nil, annotations with either default or registered tags are printed. + # + # Specific directories can be explicitly set using the :dirs key in +options+. + # + # Rails::SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true + # + # If +options+ has a :tag flag, it will be passed to each annotation's +to_s+. + # + # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account. + # + # This class method is the single entry point for the rails notes command. + # + # source://railties//lib/rails/source_annotation_extractor.rb#145 + def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# source://railties//lib/rails/source_annotation_extractor.rb#71 +class Rails::SourceAnnotationExtractor::Annotation < ::Struct + # Returns a representation of the annotation that looks like this: + # + # [126] [TODO] This algorithm is simple and clearly correct, make it faster. + # + # If +options+ has a flag :tag the tag is shown as in the example above. + # Otherwise the string contains just line and text. + # + # source://railties//lib/rails/source_annotation_extractor.rb#124 + def to_s(options = T.unsafe(nil)); end + + class << self + # source://railties//lib/rails/source_annotation_extractor.rb#72 + def directories; end + + # source://railties//lib/rails/source_annotation_extractor.rb#92 + def extensions; end + + # Registers additional directories to be included + # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another") + # + # source://railties//lib/rails/source_annotation_extractor.rb#78 + def register_directories(*dirs); end + + # Registers new Annotations File Extensions + # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } + # + # source://railties//lib/rails/source_annotation_extractor.rb#98 + def register_extensions(*exts, &block); end + + # Registers additional tags + # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME") + # + # source://railties//lib/rails/source_annotation_extractor.rb#88 + def register_tags(*additional_tags); end + + # source://railties//lib/rails/source_annotation_extractor.rb#82 + def tags; end + end +end + +# Wraps a regular expression that will be tested against each of the source +# file's comments. +# +# source://railties//lib/rails/source_annotation_extractor.rb#24 +class Rails::SourceAnnotationExtractor::ParserExtractor < ::Struct + # source://railties//lib/rails/source_annotation_extractor.rb#26 + def annotations(file); end +end + +# Wraps a regular expression that will iterate through a file's lines and +# test each one for the given pattern. +# +# source://railties//lib/rails/source_annotation_extractor.rb#59 +class Rails::SourceAnnotationExtractor::PatternExtractor < ::Struct + # source://railties//lib/rails/source_annotation_extractor.rb#60 + def annotations(file); end +end + +# source://railties//lib/rails/test_unit/test_parser.rb#12 +module Rails::TestUnit; end + +# source://railties//lib/rails/test_unit/runner.rb#146 +class Rails::TestUnit::CompositeFilter + # @return [CompositeFilter] a new instance of CompositeFilter + # + # source://railties//lib/rails/test_unit/runner.rb#149 + def initialize(runnable, filter, patterns); end + + # minitest uses === to find matching filters. + # + # source://railties//lib/rails/test_unit/runner.rb#156 + def ===(method); end + + # Returns the value of attribute named_filter. + # + # source://railties//lib/rails/test_unit/runner.rb#147 + def named_filter; end + + private + + # source://railties//lib/rails/test_unit/runner.rb#171 + def derive_line_filters(patterns); end + + # source://railties//lib/rails/test_unit/runner.rb#161 + def derive_named_filter(filter); end +end + +# source://railties//lib/rails/test_unit/runner.rb#182 +class Rails::TestUnit::Filter + # @return [Filter] a new instance of Filter + # + # source://railties//lib/rails/test_unit/runner.rb#183 + def initialize(runnable, file, line_or_range); end + + # source://railties//lib/rails/test_unit/runner.rb#192 + def ===(method); end + + private + + # source://railties//lib/rails/test_unit/runner.rb#204 + def definition_for(method); end +end + +# source://railties//lib/rails/test_unit/runner.rb#12 +class Rails::TestUnit::InvalidTestError < ::StandardError + # @return [InvalidTestError] a new instance of InvalidTestError + # + # source://railties//lib/rails/test_unit/runner.rb#13 + def initialize(path, suggestion); end +end + +# source://railties//lib/rails/test_unit/runner.rb#21 +class Rails::TestUnit::Runner + # source://railties//lib/rails/test_unit/runner.rb#24 + def filters; end + + class << self + # source://railties//lib/rails/test_unit/runner.rb#27 + def attach_before_load_options(opts); end + + # source://railties//lib/rails/test_unit/runner.rb#78 + def compose_filter(runnable, filter); end + + # source://railties//lib/rails/test_unit/runner.rb#24 + def filters; end + + # source://railties//lib/rails/test_unit/runner.rb#57 + def load_tests(argv); end + + # source://railties//lib/rails/test_unit/runner.rb#32 + def parse_options(argv); end + + # source://railties//lib/rails/test_unit/runner.rb#51 + def run(argv = T.unsafe(nil)); end + + # source://railties//lib/rails/test_unit/runner.rb#45 + def run_from_rake(test_command, argv = T.unsafe(nil)); end + + private + + # source://railties//lib/rails/test_unit/runner.rb#113 + def default_test_exclude_glob; end + + # source://railties//lib/rails/test_unit/runner.rb#109 + def default_test_glob; end + + # source://railties//lib/rails/test_unit/runner.rb#89 + def extract_filters(argv); end + + # source://railties//lib/rails/test_unit/runner.rb#125 + def list_tests(patterns); end + + # source://railties//lib/rails/test_unit/runner.rb#131 + def normalize_declarative_test_filter(filter); end + + # @return [Boolean] + # + # source://railties//lib/rails/test_unit/runner.rb#121 + def path_argument?(arg); end + + # @return [Boolean] + # + # source://railties//lib/rails/test_unit/runner.rb#117 + def regexp_filter?(arg); end + end +end + +# source://railties//lib/rails/test_unit/runner.rb#23 +Rails::TestUnit::Runner::PATH_ARGUMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://railties//lib/rails/test_unit/runner.rb#22 +Rails::TestUnit::Runner::TEST_FOLDERS = T.let(T.unsafe(nil), Array) + +# Parse a test file to extract the line ranges of all tests in both +# method-style (def test_foo) and declarative-style (test "foo" do) +# +# source://railties//lib/rails/test_unit/test_parser.rb#15 +module Rails::TestUnit::TestParser + class << self + # Helper to translate a method object into the path and line range where + # the method was defined. + # + # source://railties//lib/rails/test_unit/test_parser.rb#18 + def definition_for(method); end + end +end + +# source://railties//lib/rails/test_unit/railtie.rb#6 +class Rails::TestUnitRailtie < ::Rails::Railtie; end + +# source://railties//lib/rails/gem_version.rb#9 +module Rails::VERSION; end + +# source://railties//lib/rails/gem_version.rb#10 +Rails::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://railties//lib/rails/gem_version.rb#11 +Rails::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://railties//lib/rails/gem_version.rb#13 +Rails::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/gem_version.rb#15 +Rails::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://railties//lib/rails/gem_version.rb#12 +Rails::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://railties//lib/rails/welcome_controller.rb#5 +class Rails::WelcomeController < ::Rails::ApplicationController + # source://railties//lib/rails/welcome_controller.rb#9 + def index; end + + private + + # source://actionview/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _layout_conditions; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rainbow@3.1.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rainbow@3.1.1.rbi new file mode 100644 index 0000000..d02bc04 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -0,0 +1,403 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rainbow` gem. +# Please instead update this file by running `bin/tapioca gem rainbow`. + + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://rainbow//lib/rainbow/global.rb#23 + def Rainbow(string); end +end + +# source://rainbow//lib/rainbow/string_utils.rb#3 +module Rainbow + class << self + # source://rainbow//lib/rainbow/global.rb#10 + def enabled; end + + # source://rainbow//lib/rainbow/global.rb#14 + def enabled=(value); end + + # source://rainbow//lib/rainbow/global.rb#6 + def global; end + + # source://rainbow//lib/rainbow.rb#6 + def new; end + + # source://rainbow//lib/rainbow/global.rb#18 + def uncolor(string); end + end +end + +# source://rainbow//lib/rainbow/color.rb#4 +class Rainbow::Color + # Returns the value of attribute ground. + # + # source://rainbow//lib/rainbow/color.rb#5 + def ground; end + + class << self + # source://rainbow//lib/rainbow/color.rb#7 + def build(ground, values); end + + # source://rainbow//lib/rainbow/color.rb#40 + def parse_hex_color(hex); end + end +end + +# source://rainbow//lib/rainbow/color.rb#54 +class Rainbow::Color::Indexed < ::Rainbow::Color + # @return [Indexed] a new instance of Indexed + # + # source://rainbow//lib/rainbow/color.rb#57 + def initialize(ground, num); end + + # source://rainbow//lib/rainbow/color.rb#62 + def codes; end + + # Returns the value of attribute num. + # + # source://rainbow//lib/rainbow/color.rb#55 + def num; end +end + +# source://rainbow//lib/rainbow/color.rb#69 +class Rainbow::Color::Named < ::Rainbow::Color::Indexed + # @return [Named] a new instance of Named + # + # source://rainbow//lib/rainbow/color.rb#90 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#82 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#86 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/color.rb#70 +Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/color.rb#100 +class Rainbow::Color::RGB < ::Rainbow::Color::Indexed + # @return [RGB] a new instance of RGB + # + # source://rainbow//lib/rainbow/color.rb#107 + def initialize(ground, *values); end + + # Returns the value of attribute b. + # + # source://rainbow//lib/rainbow/color.rb#101 + def b; end + + # source://rainbow//lib/rainbow/color.rb#116 + def codes; end + + # Returns the value of attribute g. + # + # source://rainbow//lib/rainbow/color.rb#101 + def g; end + + # Returns the value of attribute r. + # + # source://rainbow//lib/rainbow/color.rb#101 + def r; end + + private + + # source://rainbow//lib/rainbow/color.rb#122 + def code_from_rgb; end + + class << self + # source://rainbow//lib/rainbow/color.rb#103 + def to_ansi_domain(value); end + end +end + +# source://rainbow//lib/rainbow/color.rb#129 +class Rainbow::Color::X11Named < ::Rainbow::Color::RGB + include ::Rainbow::X11ColorNames + + # @return [X11Named] a new instance of X11Named + # + # source://rainbow//lib/rainbow/color.rb#140 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#132 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#136 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/null_presenter.rb#4 +class Rainbow::NullPresenter < ::String + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def background(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def bg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#49 + def black; end + + # source://rainbow//lib/rainbow/null_presenter.rb#33 + def blink; end + + # source://rainbow//lib/rainbow/null_presenter.rb#65 + def blue; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bold; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bright; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def color(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def cross_out; end + + # source://rainbow//lib/rainbow/null_presenter.rb#73 + def cyan; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def dark; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def faint; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def fg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def foreground(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#57 + def green; end + + # source://rainbow//lib/rainbow/null_presenter.rb#41 + def hide; end + + # source://rainbow//lib/rainbow/null_presenter.rb#37 + def inverse; end + + # source://rainbow//lib/rainbow/null_presenter.rb#25 + def italic; end + + # source://rainbow//lib/rainbow/null_presenter.rb#69 + def magenta; end + + # source://rainbow//lib/rainbow/null_presenter.rb#81 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/null_presenter.rb#53 + def red; end + + # source://rainbow//lib/rainbow/null_presenter.rb#13 + def reset; end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def strike; end + + # source://rainbow//lib/rainbow/null_presenter.rb#29 + def underline; end + + # source://rainbow//lib/rainbow/null_presenter.rb#77 + def white; end + + # source://rainbow//lib/rainbow/null_presenter.rb#61 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/null_presenter.rb#89 + def respond_to_missing?(method_name, *args); end +end + +# source://rainbow//lib/rainbow/presenter.rb#8 +class Rainbow::Presenter < ::String + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def background(*values); end + + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def bg(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#92 + def black; end + + # Turns on blinking attribute for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#72 + def blink; end + + # source://rainbow//lib/rainbow/presenter.rb#108 + def blue; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bold; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bright; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def color(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def cross_out; end + + # source://rainbow//lib/rainbow/presenter.rb#116 + def cyan; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def dark; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def faint; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def fg(*values); end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def foreground(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#100 + def green; end + + # Hides this text (set its color to the same as background). + # + # source://rainbow//lib/rainbow/presenter.rb#82 + def hide; end + + # Inverses current foreground/background colors. + # + # source://rainbow//lib/rainbow/presenter.rb#77 + def inverse; end + + # Turns on italic style for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#61 + def italic; end + + # source://rainbow//lib/rainbow/presenter.rb#112 + def magenta; end + + # We take care of X11 color method call here. + # Such as #aqua, #ghostwhite. + # + # source://rainbow//lib/rainbow/presenter.rb#126 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#96 + def red; end + + # Resets terminal to default colors/backgrounds. + # + # It shouldn't be needed to use this method because all methods + # append terminal reset code to end of string. + # + # source://rainbow//lib/rainbow/presenter.rb#40 + def reset; end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def strike; end + + # Turns on underline decoration for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#66 + def underline; end + + # source://rainbow//lib/rainbow/presenter.rb#120 + def white; end + + # source://rainbow//lib/rainbow/presenter.rb#104 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/presenter.rb#134 + def respond_to_missing?(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#140 + def wrap_with_sgr(codes); end +end + +# source://rainbow//lib/rainbow/presenter.rb#9 +Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/string_utils.rb#4 +class Rainbow::StringUtils + class << self + # source://rainbow//lib/rainbow/string_utils.rb#17 + def uncolor(string); end + + # source://rainbow//lib/rainbow/string_utils.rb#5 + def wrap_with_sgr(string, codes); end + end +end + +# source://rainbow//lib/rainbow/wrapper.rb#7 +class Rainbow::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rainbow//lib/rainbow/wrapper.rb#10 + def initialize(enabled = T.unsafe(nil)); end + + # Returns the value of attribute enabled. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled=(_arg0); end + + # source://rainbow//lib/rainbow/wrapper.rb#14 + def wrap(string); end +end + +# source://rainbow//lib/rainbow/x11_color_names.rb#4 +module Rainbow::X11ColorNames; end + +# source://rainbow//lib/rainbow/x11_color_names.rb#5 +Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rake@13.2.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rake@13.2.1.rbi new file mode 100644 index 0000000..4f0a92e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rake@13.2.1.rbi @@ -0,0 +1,3121 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rake` gem. +# Please instead update this file by running `bin/tapioca gem rake`. + + +# :stopdoc: +# +# Some top level Constants. +# +# source://rake//lib/rake.rb#69 +FileList = Rake::FileList + +# -- +# This a FileUtils extension that defines several additional commands to be +# added to the FileUtils utility functions. +# +# source://rake//lib/rake/file_utils.rb#8 +module FileUtils + # Run a Ruby interpreter with the given arguments. + # + # Example: + # ruby %{-pe '$_.upcase!' ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' + # + # sh 'ls', 'file with spaces' + # + # # check exit status after command runs + # sh %{grep pattern file} do |ok, res| + # if !ok + # puts "pattern not found (status = #{res.exitstatus})" + # end + # end + # + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # Split a file path into individual directory names. + # + # Example: + # split_all("a/b/c") => ['a', 'b', 'c'] + # + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + private + + # source://rake//lib/rake/file_utils.rb#61 + def create_shell_runner(cmd); end + + # source://rake//lib/rake/file_utils.rb#84 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#71 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#106 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# source://rake//lib/rake/file_utils.rb#10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/ext/core.rb#2 +class Module + # Check for an existing method in the current class before extending. If + # the method already exists, then a warning is printed and the extension is + # not added. Otherwise the block is yielded and any definitions in the + # block will take effect. + # + # Usage: + # + # class String + # rake_extension("xyz") do + # def xyz + # ... + # end + # end + # end + # + # source://rake//lib/rake/ext/core.rb#18 + def rake_extension(method); end +end + +# source://rake//lib/rake/cloneable.rb#2 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # source://rake//lib/rake/rake_module.rb#33 + def add_rakelib(*files); end + + # Current Rake Application + # + # source://rake//lib/rake/rake_module.rb#8 + def application; end + + # Set the current Rake application object. + # + # source://rake//lib/rake/rake_module.rb#13 + def application=(app); end + + # Yield each file or directory component. + # + # source://rake//lib/rake/file_list.rb#418 + def each_dir_parent(dir); end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + # + # source://rake//lib/rake/file_list.rb#429 + def from_pathname(path); end + + # Load a rakefile. + # + # source://rake//lib/rake/rake_module.rb#28 + def load_rakefile(path); end + + # Return the original directory where the Rake application was started. + # + # source://rake//lib/rake/rake_module.rb#23 + def original_dir; end + + # source://rake//lib/rake/rake_module.rb#17 + def suggested_thread_count; end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.load_rakefile + # end + # + # puts other_rake.tasks + # + # source://rake//lib/rake/rake_module.rb#54 + def with_application(block_application = T.unsafe(nil)); end + end +end + +# Rake main application object. When invoking +rake+ from the +# command line, a Rake::Application object is created and run. +# +# source://rake//lib/rake/application.rb#19 +class Rake::Application + include ::Rake::TaskManager + include ::Rake::TraceOutput + + # Initialize a Rake::Application object. + # + # @return [Application] a new instance of Application + # + # source://rake//lib/rake/application.rb#49 + def initialize; end + + # Add a file to the list of files to be imported. + # + # source://rake//lib/rake/application.rb#807 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#161 + def add_loader(ext, loader); end + + # Collect the list of tasks on the command line. If no tasks are + # given, return a list containing only the default task. + # Environmental assignments are processed at this time as well. + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + # + # source://rake//lib/rake/application.rb#788 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#802 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#288 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#250 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#234 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#275 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#242 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#257 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#265 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#411 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#328 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#379 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#383 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#387 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#229 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#708 + def find_rakefile_location; end + + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. + # + # source://rake//lib/rake/application.rb#674 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#261 + def has_cause?(ex); end + + # True if one of the files in RAKEFILES is in the current directory. + # If a match is found, it is copied into @rakefile. + # + # source://rake//lib/rake/application.rb#304 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # source://rake//lib/rake/application.rb#88 + def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end + + # Invokes a task with arguments that are extracted from +task_string+ + # + # source://rake//lib/rake/application.rb#185 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#812 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#124 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # source://rake//lib/rake/application.rb#24 + def name; end + + # Application options from the command line + # + # source://rake//lib/rake/application.rb#167 + def options; end + + # The original directory where rake was invoked. + # + # source://rake//lib/rake/application.rb#27 + def original_dir; end + + # source://rake//lib/rake/application.rb#191 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#720 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # source://rake//lib/rake/application.rb#694 + def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end + + # Name of the actual rakefile used. + # + # source://rake//lib/rake/application.rb#30 + def rakefile; end + + # source://rake//lib/rake/application.rb#828 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#725 + def raw_load_rakefile; end + + # Run the Rake application. The run method performs the following + # three steps: + # + # * Initialize the command line options (+init+). + # * Define the tasks (+load_rakefile+). + # * Run the top level tasks (+top_level+). + # + # If you wish to build a custom rake command, you should call + # +init+ on your application. Then define any tasks. Finally, + # call +top_level+ to run your top level tasks. + # + # source://rake//lib/rake/application.rb#79 + def run(argv = T.unsafe(nil)); end + + # Run the given block with the thread startup and shutdown. + # + # source://rake//lib/rake/application.rb#144 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#837 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#213 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # source://rake//lib/rake/application.rb#432 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#757 + def system_dir; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns=(_arg0); end + + # source://rake//lib/rake/application.rb#367 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#178 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#131 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # source://rake//lib/rake/application.rb#36 + def top_level_tasks; end + + # source://rake//lib/rake/application.rb#418 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#400 + def truncate(string, width); end + + # We will truncate output if we are outputting to a TTY or if we've been + # given an explicit column width to honor + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#323 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # source://rake//lib/rake/application.rb#39 + def tty_output=(_arg0); end + + # True if we are outputting to TTY, false otherwise + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#317 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#391 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#396 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#751 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#297 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#650 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#657 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#423 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#774 + def standard_system_dir; end +end + +# source://rake//lib/rake/application.rb#41 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#3 +module Rake::Backtrace + class << self + # source://rake//lib/rake/backtrace.rb#19 + def collapse(backtrace); end + end +end + +# source://rake//lib/rake/backtrace.rb#8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/backtrace.rb#17 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# source://rake//lib/rake/cloneable.rb#6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://rake//lib/rake/application.rb#13 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# source://rake//lib/rake/cpu_counter.rb#6 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://rake//lib/rake/cpu_counter.rb#11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # source://rake//lib/rake/cpu_counter.rb#7 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] do + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#166 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # source://rake//lib/rake/dsl_definition.rb#92 + def directory(*args, &block); end + + # Declare a file task. + # + # Example: + # file "config.cfg" => ["config.template"] do + # open("config.cfg", "w") do |outfile| + # open("config.template") do |infile| + # while line = infile.gets + # outfile.puts line + # end + # end + # end + # end + # + # source://rake//lib/rake/dsl_definition.rb#76 + def file(*args, &block); end + + # Declare a file creation task. + # (Mainly used for the directory command). + # + # source://rake//lib/rake/dsl_definition.rb#82 + def file_create(*args, &block); end + + # Import the partial Rakefiles +fn+. Imported files are loaded + # _after_ the current file is completely loaded. This allows the + # import statement to appear anywhere in the importing file, and yet + # allowing the imported files to depend on objects defined in the + # importing file. + # + # A common use of the import statement is to include files + # containing dependency declarations. + # + # See also the --rakelibdir command line option. + # + # Example: + # import ".depend", "my_rules" + # + # source://rake//lib/rake/dsl_definition.rb#184 + def import(*fns); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#113 + def multitask(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#136 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#98 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-c', '-o', t.name, t.source + # end + # + # source://rake//lib/rake/dsl_definition.rb#152 + def rule(*args, &block); end + + # source://rake//lib/rake/file_utils.rb#110 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://rake//lib/rake/default_loader.rb#5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # source://rake//lib/rake/default_loader.rb#10 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://rake//lib/rake/task_arguments.rb#108 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# source://rake//lib/rake/early_time.rb#5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://rake//lib/rake/file_creation_task.rb#12 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_creation_task.rb#14 + def needed?; end + + # Time stamp for file creation task. This time stamp is earlier + # than any other time stamp. + # + # source://rake//lib/rake/file_creation_task.rb#20 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @return [FileList] a new instance of FileList + # @yield [_self] + # @yieldparam _self [Rake::FileList] the object that the method was called on + # + # source://rake//lib/rake/file_list.rb#99 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#68 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#68 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#77 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#77 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def []=(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#68 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact_blank(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact_blank!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#77 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def exclude?(*args, &block); end + + # Should the given file name be excluded from the list? + # + # NOTE: This method was formerly named "exclude?", but Rails + # introduced an exclude? method as an array method and setup a + # conflict with file list. We renamed the method to avoid + # confusion. If you were using "FileList#exclude?" in your user + # code, you will need to update. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#364 + def excluded_from_list?(fn); end + + # source://rake//lib/rake/file_list.rb#77 + def excluding(*args, &block); end + + # Return a new file list that only contains file names from the current + # file list that exist on the file system. + # + # source://rake//lib/rake/file_list.rb#320 + def existing; end + + # Modify the current file list so that it contains only file name that + # exist on the file system. + # + # source://rake//lib/rake/file_list.rb#326 + def existing!; end + + # Return a new FileList with String#ext method applied to + # each member of the array. + # + # This method is a shortcut for: + # + # array.collect { |item| item.ext(newext) } + # + # +ext+ is a user added method for the Array class. + # + # source://rake//lib/rake/file_list.rb#284 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/file_list.rb#77 + def extract!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def extract_options!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fifth(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def forty_two(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fourth(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def from(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://rake//lib/rake/file_list.rb#253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#264 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # source://rake//lib/rake/file_list.rb#77 + def in_order_of(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def including(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index_with(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def many?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def maximum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minimum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # source://rake//lib/rake/file_list.rb#334 + def partition(&block); end + + # Apply the pathmap spec to each of the included file names, returning a + # new file list with the modified paths. (See String#pathmap for + # details.) + # + # source://rake//lib/rake/file_list.rb#272 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#77 + def permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pick(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def place(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pluck(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#77 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def second(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def second_to_last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sole(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://rake//lib/rake/file_list.rb#242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#258 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#77 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def tally(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def third(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def third_to_last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#77 + def to_formatted_s(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_fs(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_h(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_msgpack(*args, &block); end + + # Convert a FileList to a string by joining all elements with a space. + # + # source://rake//lib/rake/file_list.rb#344 + def to_s; end + + # source://rake//lib/rake/file_list.rb#77 + def to_sentence(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_xml(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def without(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://rake//lib/rake/file_list.rb#400 + def [](*args); end + + # Get a sorted list of files matching the pattern. This method + # should be preferred to Dir[pattern] and Dir.glob(pattern) because + # the files returned are guaranteed to be sorted. + # + # source://rake//lib/rake/file_list.rb#407 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://rake//lib/rake/file_list.rb#44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#86 +Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) + +# List of additional methods that must be delegated. +# +# source://rake//lib/rake/file_list.rb#47 +Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) + +# List of methods that should not be delegated here (we define special +# versions of them explicitly below). +# +# source://rake//lib/rake/file_list.rb#51 +Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) + +# List of delegated methods that return new array values which need +# wrapping. +# +# source://rake//lib/rake/file_list.rb#55 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://rake//lib/rake/file_task.rb#12 +class Rake::FileTask < ::Rake::Task + # Is this file task needed? Yes if it doesn't exist, or if its time stamp + # is out of date. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#16 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#25 + def timestamp; end + + private + + # Are there any prerequisites with a later time than the given time stamp? + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#36 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # source://rake//lib/rake/file_task.rb#53 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # Check that the options do not contain options not listed in + # +optdecl+. An ArgumentError exception is thrown if non-declared + # options are found. + # + # @raise [ArgumentError] + # + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # Returns the value of attribute nowrite_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag; end + + # Sets the attribute nowrite_flag + # + # @param value the value to set the attribute nowrite_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag; end + + # Sets the attribute verbose_flag + # + # @param value the value to set the attribute verbose_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag=(_arg0); end + end +end + +# source://rake//lib/rake/file_utils_ext.rb#17 +Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) + +# InvocationChain tracks the chain of task invocations to detect +# circular dependencies. +# +# source://rake//lib/rake/invocation_chain.rb#6 +class Rake::InvocationChain < ::Rake::LinkedList + # Append an invocation to the chain of invocations. It is an error + # if the invocation already listed. + # + # source://rake//lib/rake/invocation_chain.rb#15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # source://rake//lib/rake/invocation_chain.rb#23 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://rake//lib/rake/invocation_chain.rb#55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# source://rake//lib/rake/invocation_chain.rb#39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://rake//lib/rake/invocation_exception_mixin.rb#3 +module Rake::InvocationExceptionMixin + # Return the invocation chain (list of Rake tasks) that were in + # effect when this exception was detected by rake. May be null if + # no tasks were active. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://rake//lib/rake/late_time.rb#17 +Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) + +# LateTime is a fake timestamp that occurs _after_ any other time value. +# +# source://rake//lib/rake/late_time.rb#4 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://rake//lib/rake/linked_list.rb#6 +class Rake::LinkedList + include ::Enumerable + + # @return [LinkedList] a new instance of LinkedList + # + # source://rake//lib/rake/linked_list.rb#84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://rake//lib/rake/linked_list.rb#25 + def ==(other); end + + # Polymorphically add a new element to the head of a list. The + # type of head node will be the same list type as the tail. + # + # source://rake//lib/rake/linked_list.rb#12 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://rake//lib/rake/linked_list.rb#8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # source://rake//lib/rake/linked_list.rb#42 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://rake//lib/rake/linked_list.rb#36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # source://rake//lib/rake/linked_list.rb#73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://rake//lib/rake/linked_list.rb#78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # source://rake//lib/rake/linked_list.rb#59 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://rake//lib/rake/linked_list.rb#95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # @return [EmptyLinkedList] a new instance of EmptyLinkedList + # + # source://rake//lib/rake/linked_list.rb#98 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://rake//lib/rake/multi_task.rb#10 + def invoke_prerequisites(task_args, invocation_chain); end +end + +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. +# +# source://rake//lib/rake/name_space.rb#6 +class Rake::NameSpace + # Create a namespace lookup object using the given task manager + # and the list of scopes. + # + # @return [NameSpace] a new instance of NameSpace + # + # source://rake//lib/rake/name_space.rb#12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://rake//lib/rake/name_space.rb#20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # source://rake//lib/rake/name_space.rb#27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://rake//lib/rake/name_space.rb#34 + def tasks; end +end + +# Include PrivateReader to use +private_reader+. +# +# source://rake//lib/rake/private_reader.rb#5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://rake//lib/rake/private_reader.rb#11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # source://rake//lib/rake/private_reader.rb#14 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://rake//lib/rake/promise.rb#11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # @return [Promise] a new instance of Promise + # + # source://rake//lib/rake/promise.rb#17 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://rake//lib/rake/promise.rb#29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # source://rake//lib/rake/promise.rb#42 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#78 + def error?; end + + # Do we have a result for the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#73 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://rake//lib/rake/promise.rb#12 +Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) + +# Exit status class for times the system just gives us a nil. +# +# source://rake//lib/rake/pseudo_status.rb#6 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://rake//lib/rake/pseudo_status.rb#13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://rake//lib/rake/scope.rb#11 + def path_with_task_name(task_name); end + + # Trim +n+ innermost scope levels from the scope. In no case will + # this trim beyond the toplevel scope. + # + # source://rake//lib/rake/scope.rb#17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://rake//lib/rake/scope.rb#41 +Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) + +# Scope lists always end with an EmptyScope object. See Null +# Object Pattern) +# +# source://rake//lib/rake/scope.rb#28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://rake//lib/rake/task.rb#15 +class Rake::Task + # Create a task named +task_name+ with no actions or prerequisites. Use + # +enhance+ to add actions and prerequisites. + # + # @return [Task] a new instance of Task + # + # source://rake//lib/rake/task.rb#99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://rake//lib/rake/task.rb#24 + def actions; end + + # Add a description to the task. The description can consist of an option + # argument list (enclosed brackets) and an optional comment. + # + # source://rake//lib/rake/task.rb#298 + def add_description(description); end + + # List of all unique prerequisite tasks including prerequisite tasks' + # prerequisites. + # Includes self when cyclic dependencies are found. + # + # source://rake//lib/rake/task.rb#77 + def all_prerequisite_tasks; end + + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + # + # source://rake//lib/rake/task.rb#39 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://rake//lib/rake/task.rb#141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # source://rake//lib/rake/task.rb#153 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://rake//lib/rake/task.rb#168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # source://rake//lib/rake/task.rb#180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://rake//lib/rake/task.rb#174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # source://rake//lib/rake/task.rb#162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://rake//lib/rake/task.rb#304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # source://rake//lib/rake/task.rb#115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://rake//lib/rake/task.rb#270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # source://rake//lib/rake/task.rb#316 + def full_comment; end + + # source://rake//lib/rake/task.rb#46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # source://rake//lib/rake/task.rb#354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://rake//lib/rake/task.rb#237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # source://rake//lib/rake/task.rb#249 + def invoke_prerequisites_concurrently(task_args, invocation_chain); end + + # File/Line locations of each of the task definitions for this + # task (only valid if the task was defined with the detect + # location option set). + # + # source://rake//lib/rake/task.rb#35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # source://rake//lib/rake/task.rb#147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://rake//lib/rake/task.rb#30 + def scope; end + + # Set the names of the arguments for this task. +args+ should be + # an array of symbols, one for each argument name. + # + # source://rake//lib/rake/task.rb#348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://rake//lib/rake/task.rb#51 + def sources=(_arg0); end + + # Timestamp for this task. Basic tasks return the current time for their + # time stamp. Other tasks can be more sophisticated. + # + # source://rake//lib/rake/task.rb#292 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://rake//lib/rake/task.rb#308 + def add_comment(comment); end + + # Get the first sentence in a string. The sentence is terminated + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. + # + # source://rake//lib/rake/task.rb#341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://rake//lib/rake/task.rb#65 + def lookup_prerequisite(prerequisite_name); end + + # Transform the list of comments as specified by the block and + # join with the separator. + # + # source://rake//lib/rake/task.rb#328 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://rake//lib/rake/task.rb#404 + def [](task_name); end + + # Clear the task list. This cause rake to immediately forget all the + # tasks that have been assigned. (Normally used in the unit tests.) + # + # source://rake//lib/rake/task.rb#391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://rake//lib/rake/task.rb#421 + def create_rule(*args, &block); end + + # Define a task given +args+ and an option block. If a rule with the + # given name already exists, the prerequisites and actions are added to + # the existing task. Returns the defined task. + # + # source://rake//lib/rake/task.rb#416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://rake//lib/rake/task.rb#373 + def format_deps(deps); end + + # Apply the scope to the task name according to the rules for + # this kind of task. Generic tasks will accept the scope as + # part of the name. + # + # source://rake//lib/rake/task.rb#428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://rake//lib/rake/task.rb#396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# source://rake//lib/rake/task_argument_error.rb#5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://rake//lib/rake/task_arguments.rb#7 +class Rake::TaskArguments + include ::Enumerable + + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. + # + # @return [TaskArguments] a new instance of TaskArguments + # + # source://rake//lib/rake/task_arguments.rb#15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # source://rake//lib/rake/task_arguments.rb#44 + def [](index); end + + # Enumerates the arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # source://rake//lib/rake/task_arguments.rb#32 + def extras; end + + # source://rake//lib/rake/task_arguments.rb#93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def has_key?(key); end + + # source://rake//lib/rake/task_arguments.rb#79 + def inspect; end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://rake//lib/rake/task_arguments.rb#11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # source://rake//lib/rake/task_arguments.rb#38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://rake//lib/rake/task_arguments.rb#27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#71 + def to_hash; end + + # source://rake//lib/rake/task_arguments.rb#75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # source://rake//lib/rake/task_arguments.rb#61 + def values_at(*keys); end + + # Specify a hash of default values for task arguments. Use the + # defaults only if there is no specific value for the given + # argument. + # + # source://rake//lib/rake/task_arguments.rb#51 + def with_defaults(defaults); end + + protected + + # source://rake//lib/rake/task_arguments.rb#99 + def lookup(name); end +end + +# Base class for Task Libraries. +# +# source://rake//lib/rake/tasklib.rb#7 +class Rake::TaskLib + include ::Rake::Cloneable + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL +end + +# The TaskManager module is a mixin for managing tasks. +# +# source://rake//lib/rake/task_manager.rb#5 +module Rake::TaskManager + # source://rake//lib/rake/task_manager.rb#9 + def initialize; end + + # Find a matching task for +task_name+. + # + # source://rake//lib/rake/task_manager.rb#54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://rake//lib/rake/task_manager.rb#17 + def create_rule(*args, &block); end + + # Return the list of scope names currently active in the task + # manager. + # + # source://rake//lib/rake/task_manager.rb#222 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://rake//lib/rake/task_manager.rb#151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # source://rake//lib/rake/task_manager.rb#68 + def generate_did_you_mean_suggestions(task_name); end + + # source://rake//lib/rake/task_manager.rb#62 + def generate_message_for_undefined_task(task_name); end + + # Evaluate the block in a nested namespace named +name+. Create + # an anonymous namespace if +name+ is nil. + # + # source://rake//lib/rake/task_manager.rb#228 + def in_namespace(name); end + + # Lookup a task. Return an existing task if found, otherwise + # create a task of the current type. + # + # source://rake//lib/rake/task_manager.rb#49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://rake//lib/rake/task_manager.rb#192 + def lookup(task_name, initial_scope = T.unsafe(nil)); end + + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. + # + # source://rake//lib/rake/task_manager.rb#88 + def resolve_args(args); end + + # source://rake//lib/rake/task_manager.rb#81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # source://rake//lib/rake/task_manager.rb#174 + def tasks_in_scope(scope); end + + private + + # Add a location to the locations field of the given task. + # + # source://rake//lib/rake/task_manager.rb#241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://rake//lib/rake/task_manager.rb#271 + def attempt_rule(task_name, task_pattern, args, extensions, block, level); end + + # Find the location that called into the dsl layer. + # + # source://rake//lib/rake/task_manager.rb#248 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://rake//lib/rake/task_manager.rb#259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # source://rake//lib/rake/task_manager.rb#319 + def get_description(task); end + + # Lookup the task name + # + # source://rake//lib/rake/task_manager.rb#208 + def lookup_in_scope(name, scope); end + + # Make a list of sources from the list of file name extensions / + # translation procs. + # + # source://rake//lib/rake/task_manager.rb#293 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://rake//lib/rake/thread_history_display.rb#6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay + # + # source://rake//lib/rake/thread_history_display.rb#11 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/private_reader.rb#15 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/private_reader.rb#15 + def stats; end + + # source://rake//lib/rake/private_reader.rb#15 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#8 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://rake//lib/rake/thread_pool.rb#12 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://rake//lib/rake/thread_pool.rb#33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # source://rake//lib/rake/thread_pool.rb#68 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://rake//lib/rake/thread_pool.rb#77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # source://rake//lib/rake/thread_pool.rb#44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://rake//lib/rake/thread_pool.rb#158 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # source://rake//lib/rake/thread_pool.rb#95 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def safe_thread_count; end + + # source://rake//lib/rake/thread_pool.rb#117 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#145 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::OTHER = T.let(T.unsafe(nil), Array) + +# Win 32 interface methods for Rake. Windows specific functionality +# will be placed here to collect that knowledge in one spot. +# +# source://rake//lib/rake/win32.rb#7 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://rake//lib/rake/win32.rb#30 + def win32_system_dir; end + + # True if running on a windows system. + # + # @return [Boolean] + # + # source://rake//lib/rake/win32.rb#16 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#70 +RakeFileUtils = Rake::FileUtilsExt + +# source://rake//lib/rake/ext/string.rb#4 +class String + include ::Comparable + + # source://rake//lib/rake/ext/string.rb#14 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/ext/string.rb#138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # source://rake//lib/rake/ext/string.rb#27 + def pathmap_explode; end + + # source://rake//lib/rake/ext/string.rb#41 + def pathmap_partial(n); end + + # source://rake//lib/rake/ext/string.rb#59 + def pathmap_replace(patterns, &block); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rbi@0.1.13.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rbi@0.1.13.rbi new file mode 100644 index 0000000..227528d --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rbi@0.1.13.rbi @@ -0,0 +1,3078 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# source://rbi//lib/rbi/loc.rb#4 +module RBI; end + +# source://rbi//lib/rbi/model.rb#1041 +class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1053 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1059 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#613 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1064 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#1045 + sig { returns(::String) } + def value; end +end + +# Attributes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#349 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/model.rb#374 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#348 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#382 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#113 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#356 + sig { returns(T::Array[::Symbol]) } + def names; end + + # source://rbi//lib/rbi/printer.rb#375 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#362 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#359 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#359 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#385 +class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#399 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#405 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#411 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#417 +class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#431 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#437 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#443 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#449 +class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#463 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#469 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#475 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# source://rbi//lib/rbi/model.rb#74 +class RBI::BlankLine < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#78 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#217 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end +end + +# source://rbi//lib/rbi/model.rb#814 +class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#825 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#836 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#543 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#548 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#831 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#218 +class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#236 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#244 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#222 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#222 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#284 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end + + # source://rbi//lib/rbi/model.rb#225 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#225 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#53 +class RBI::Comment < ::RBI::Node + # source://rbi//lib/rbi/model.rb#60 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#66 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#197 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#57 + sig { returns(::String) } + def text; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#57 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 +class RBI::ConflictTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + sig { returns(::RBI::Tree) } + def left; end + + # @return [Tree] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + def right; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#312 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#327 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#335 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#335 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#103 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#316 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#342 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#316 + def value; end +end + +# source://rbi//lib/rbi/model.rb#889 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#901 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#143 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#907 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#137 +class RBI::File + # source://rbi//lib/rbi/model.rb#156 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#164 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#105 + sig { params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#147 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#147 + def comments=(_arg0); end + + # source://rbi//lib/rbi/model.rb#169 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#129 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#141 + sig { returns(::RBI::Tree) } + def root; end + + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#141 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#144 + sig { returns(T.nilable(::String)) } + def strictness; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#144 + def strictness=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#135 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/formatter.rb#5 +class RBI::Formatter + # source://rbi//lib/rbi/formatter.rb#36 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_methods: T::Boolean, + sort_nodes: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end + + # source://rbi//lib/rbi/formatter.rb#15 + sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } + def add_sig_templates=(add_sig_templates); end + + # source://rbi//lib/rbi/formatter.rb#59 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#64 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # source://rbi//lib/rbi/formatter.rb#18 + sig { params(group_nodes: T::Boolean).returns(T::Boolean) } + def group_nodes=(group_nodes); end + + # source://rbi//lib/rbi/formatter.rb#24 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#24 + def max_line_length=(_arg0); end + + # source://rbi//lib/rbi/formatter.rb#21 + sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } + def nest_non_public_methods=(nest_non_public_methods); end + + # source://rbi//lib/rbi/formatter.rb#12 + sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } + def nest_singleton_methods=(nest_singleton_methods); end + + # source://rbi//lib/rbi/formatter.rb#53 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end + + # source://rbi//lib/rbi/formatter.rb#9 + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 +class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/printer.rb#838 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 +class RBI::Group::Kind < ::T::Enum + enums do + Mixins = new + RequiredAncestors = new + Helpers = new + TypeMembers = new + MixesInClassMethods = new + Sends = new + Attrs = new + TStructFields = new + TEnums = new + Inits = new + Methods = new + SingletonClasses = new + Consts = new + end +end + +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1372 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1386 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#825 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#173 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1376 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1393 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#866 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#878 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#133 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#884 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/index.rb#5 +class RBI::Index < ::RBI::Visitor + # source://rbi//lib/rbi/index.rb#21 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/index.rb#32 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # source://rbi//lib/rbi/index.rb#37 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#27 + sig { returns(T::Array[::String]) } + def keys; end + + # source://rbi//lib/rbi/index.rb#42 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/index.rb#59 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#13 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/index.rb#74 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # + # source://rbi//lib/rbi/index.rb#85 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#1069 +class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1082 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1088 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#622 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1073 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#1093 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#755 +class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#770 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#782 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#513 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#518 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#777 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#759 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#728 +class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#739 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#750 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#498 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#503 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#745 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#787 +class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#798 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#809 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#528 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#533 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#804 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/loc.rb#5 +class RBI::Loc + # source://rbi//lib/rbi/loc.rb#38 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def begin_column; end + + # source://rbi//lib/rbi/loc.rb#27 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#24 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#56 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#47 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 +class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#483 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#513 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#533 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/printer.rb#384 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#568 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#558 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#553 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#563 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#543 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#538 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#548 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#585 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + block: T.proc.params(node: ::RBI::Sig).void + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#611 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#123 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/printer.rb#437 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#493 + sig { returns(T::Boolean) } + def is_singleton; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#493 + def is_singleton=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#487 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#487 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#432 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#490 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#499 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#499 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#620 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#496 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#496 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1433 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1445 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#153 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1451 + sig { override.returns(::String) } + def to_s; end +end + +# Mixins +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#843 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#860 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#558 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#850 + sig { returns(T::Array[::String]) } + def names; end +end + +# source://rbi//lib/rbi/model.rb#190 +class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#204 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#211 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#194 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#194 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#270 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#5 +class RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#18 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # @abstract + # + # source://rbi//lib/rbi/printer.rb#146 + sig { abstract.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # Can `self` and `_other` be merged into a single definition? + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#24 + sig { void } + def detach; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 + sig { returns(::RBI::Group::Kind) } + def group_kind; end + + # source://rbi//lib/rbi/model.rb#15 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#15 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/printer.rb#179 + sig { returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # source://rbi//lib/rbi/model.rb#46 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#12 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#12 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#156 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#169 + sig { params(v: ::RBI::Printer).void } + def print_blank_line_before(v); end + + # source://rbi//lib/rbi/model.rb#33 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # source://rbi//lib/rbi/printer.rb#162 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#83 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#93 + sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#99 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#90 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#90 + def comments=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/printer.rb#188 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# source://rbi//lib/rbi/model.rb#674 +class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#689 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#696 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#468 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#473 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#678 + sig { returns(::String) } + def value; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#625 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#641 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#446 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#459 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#632 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/printer.rb#451 + sig { params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#647 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::StandardError + # source://rbi//lib/rbi/parser.rb#14 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#11 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#53 +class RBI::Parser + # source://rbi//lib/rbi/parser.rb#88 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#83 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # source://rbi//lib/rbi/parser.rb#95 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # source://rbi//lib/rbi/parser.rb#65 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#70 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # source://rbi//lib/rbi/parser.rb#60 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#76 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/parser.rb#791 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#798 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#795 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#850 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#805 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#153 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#163 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#160 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#157 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#299 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#176 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#208 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#201 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#194 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#241 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#255 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#272 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#283 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#467 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#485 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#508 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#513 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#520 + sig { returns(T::Array[::RBI::Comment]) } + def current_sigs_comments; end + + # source://rbi//lib/rbi/parser.rb#527 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#545 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#574 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#550 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#648 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#658 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#708 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#745 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#759 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#769 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#783 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#122 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#126 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#136 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#141 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#148 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end +end + +# source://rbi//lib/rbi/printer.rb#5 +class RBI::Printer < ::RBI::Visitor + # source://rbi//lib/rbi/printer.rb#28 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#46 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/printer.rb#41 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#18 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#52 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#72 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#58 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#65 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/printer.rb#90 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#78 + sig { params(file: ::RBI::File).void } + def visit_file(file); end +end + +# source://rbi//lib/rbi/model.rb#982 +class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#992 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Private).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#966 +class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#976 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Protected).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#950 +class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#960 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#652 +class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#663 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#669 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1456 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1469 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#870 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/index.rb#163 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1460 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1475 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#701 +class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#712 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#723 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#483 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#488 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#718 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#31 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#38 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 +class RBI::Rewriters::Merge + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 +class RBI::Rewriters::Merge::Conflict < ::T::Struct + const :left, ::RBI::Node + const :right, ::RBI::Node + const :left_name, ::String + const :right_name, ::String + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +class RBI::Rewriters::Merge::Keep < ::T::Enum + enums do + NONE = new + LEFT = new + RIGHT = new + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 +class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 +class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct + const :deleted_node, ::RBI::Node + const :duplicate_of, ::RBI::Node + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#176 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/printer.rb#242 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#182 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#93 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/printer.rb#256 + sig { params(v: ::RBI::Printer).void } + def print_body(v); end + + # @abstract + # + # source://rbi//lib/rbi/printer.rb#253 + sig { abstract.params(v: ::RBI::Printer).void } + def print_header(v); end + + # source://rbi//lib/rbi/model.rb#185 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 +class RBI::ScopeConflict < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + sig { returns(::RBI::Scope) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 + sig { override.returns(T::Boolean) } + def oneline?; end + + # @return [Scope] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + def right; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#1000 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1018 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1026 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#1031 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#592 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1007 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#193 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1004 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#1036 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1100 +class RBI::Sig < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1132 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1157 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#1167 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#633 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1162 + sig { params(name: ::String, type: ::String).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1116 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1116 + def checked=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#656 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#1110 + sig { returns(T::Boolean) } + def is_abstract; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#651 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#1104 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#1107 + sig { returns(T.nilable(::String)) } + def return_type; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1107 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1113 + sig { returns(T::Array[::String]) } + def type_params; end + + private + + # source://rbi//lib/rbi/printer.rb#698 + sig { params(v: ::RBI::Printer).void } + def print_as_block(v); end + + # source://rbi//lib/rbi/printer.rb#674 + sig { params(v: ::RBI::Printer).void } + def print_as_line(v); end + + # source://rbi//lib/rbi/printer.rb#663 + sig { returns(T::Array[::String]) } + def sig_modifiers; end +end + +# source://rbi//lib/rbi/model.rb#1176 +class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1191 + sig do + params( + name: ::String, + type: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1199 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#751 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#764 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#1180 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/printer.rb#756 + sig { params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1180 + def type; end +end + +# source://rbi//lib/rbi/model.rb#251 +class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#261 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#267 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/printer.rb#321 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# source://rbi//lib/rbi/model.rb#272 +class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#294 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#303 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#282 + sig { returns(T::Boolean) } + def keyword_init; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#282 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#279 + sig { returns(T::Array[::Symbol]) } + def members; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#279 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#276 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#276 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#300 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1317 +class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1328 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1334 +class RBI::TEnumBlock < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1348 + sig do + params( + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1360 + sig { params(name: ::String).void } + def <<(name); end + + # source://rbi//lib/rbi/printer.rb#795 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1355 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/index.rb#223 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#1338 + sig { returns(T::Array[::String]) } + def names; end + + # source://rbi//lib/rbi/model.rb#1365 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1206 +class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1217 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1255 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1268 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1274 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#203 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1280 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#1223 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#1244 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#773 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1233 + sig { returns(T.nilable(::String)) } + def default; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1233 + def default=(_arg0); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#1252 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1230 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def name=(_arg0); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def type; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1285 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1298 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1304 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#213 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1310 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#106 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#89 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: ::String, + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#25 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_path(constant, &block); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#135 + sig do + params( + parameters: T::Hash[T.any(::String, ::Symbol), ::String], + type_parameters: T::Array[::String], + return_type: ::String + ).returns(::RBI::Sig) + end + def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi//lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#150 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.15.0/lib/tapioca/rbi_ext/model.rb#145 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://rbi//lib/rbi/model.rb#1398 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1413 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#812 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1421 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1402 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1428 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1402 + def value; end +end + +# source://rbi//lib/rbi/parser.rb#20 +class RBI::UnexpectedParserError < ::StandardError + # source://rbi//lib/rbi/parser.rb#27 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#24 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#34 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#914 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#924 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#930 + sig { params(other: ::RBI::Visibility).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#579 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#945 + sig { returns(T::Boolean) } + def private?; end + + # source://rbi//lib/rbi/model.rb#940 + sig { returns(T::Boolean) } + def protected?; end + + # source://rbi//lib/rbi/model.rb#935 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#921 + sig { returns(::Symbol) } + def visibility; end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 +class RBI::VisibilityGroup < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # source://rbi//lib/rbi/printer.rb#848 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#861 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::Visitor + abstract! + + # @abstract + # + # source://rbi//lib/rbi/visitor.rb#12 + sig { abstract.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#15 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rdoc@6.7.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rdoc@6.7.0.rbi new file mode 100644 index 0000000..ad2e9bf --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rdoc@6.7.0.rbi @@ -0,0 +1,12721 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rdoc` gem. +# Please instead update this file by running `bin/tapioca gem rdoc`. + + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + +# RDoc produces documentation for Ruby source files by parsing the source and +# extracting the definition for classes, modules, methods, includes and +# requires. It associates these with optional documentation contained in an +# immediately preceding comment block then renders the result using an output +# formatter. +# +# For a simple introduction to writing or generating documentation using RDoc +# see the README. +# +# == Roadmap +# +# If you think you found a bug in RDoc see CONTRIBUTING@Bugs +# +# If you want to use RDoc to create documentation for your Ruby source files, +# see RDoc::Markup and refer to rdoc --help for command line usage. +# +# If you want to set the default markup format see +# RDoc::Markup@Supported+Formats +# +# If you want to store rdoc configuration in your gem (such as the default +# markup format) see RDoc::Options@Saved+Options +# +# If you want to write documentation for Ruby files see RDoc::Parser::Ruby +# +# If you want to write documentation for extensions written in C see +# RDoc::Parser::C +# +# If you want to generate documentation using rake see RDoc::Task. +# +# If you want to drive RDoc programmatically, see RDoc::RDoc. +# +# If you want to use the library to format text blocks into HTML or other +# formats, look at RDoc::Markup. +# +# If you want to make an RDoc plugin such as a generator or directive handler +# see RDoc::RDoc. +# +# If you want to write your own output generator see RDoc::Generator. +# +# If you want an overview of how RDoc works see CONTRIBUTING +# +# == Credits +# +# RDoc is currently being maintained by Eric Hodel . +# +# Dave Thomas is the original author of RDoc. +# +# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding +# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby +# parser for irb and the rtags package. +# +# source://rdoc//lib/rdoc.rb#58 +module RDoc + class << self + # Searches and returns the directory for settings. + # + # 1. $HOME/.rdoc directory, if it exists. + # 2. The +rdoc+ directory under the path specified by the + # +XDG_DATA_HOME+ environment variable, if it is set. + # 3. $HOME/.local/share/rdoc directory. + # + # Other than the home directory, the containing directory will be + # created automatically. + # + # source://rdoc//lib/rdoc.rb#134 + def home; end + + # Loads the best available YAML library. + # + # source://rdoc//lib/rdoc.rb#107 + def load_yaml; end + end +end + +# Represent an alias, which is an old_name/new_name pair associated with a +# particular context +# -- +# TODO implement Alias as a proxy to a method/attribute, inheriting from +# MethodAttr +# +# source://rdoc//lib/rdoc/alias.rb#9 +class RDoc::Alias < ::RDoc::CodeObject + # Creates a new Alias with a token stream of +text+ that aliases +old_name+ + # to +new_name+, has +comment+ and is a +singleton+ context. + # + # @return [Alias] a new instance of Alias + # + # source://rdoc//lib/rdoc/alias.rb#37 + def initialize(text, old_name, new_name, comment, singleton = T.unsafe(nil)); end + + # Order by #singleton then #new_name + # + # source://rdoc//lib/rdoc/alias.rb#50 + def <=>(other); end + + # HTML fragment reference for this alias + # + # source://rdoc//lib/rdoc/alias.rb#57 + def aref; end + + # Full old name including namespace + # + # source://rdoc//lib/rdoc/alias.rb#65 + def full_old_name; end + + # HTML id-friendly version of +#new_name+. + # + # source://rdoc//lib/rdoc/alias.rb#72 + def html_name; end + + # source://rdoc//lib/rdoc/alias.rb#76 + def inspect; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def name; end + + # '::' for the alias of a singleton method/attribute, '#' for instance-level. + # + # source://rdoc//lib/rdoc/alias.rb#87 + def name_prefix; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def new_name; end + + # Aliasee method's name + # + # source://rdoc//lib/rdoc/alias.rb#21 + def old_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_new_name; end + + # Old name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#94 + def pretty_old_name; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton=(_arg0); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/alias.rb#31 + def text; end + + # source://rdoc//lib/rdoc/alias.rb#107 + def to_s; end +end + +# AnyMethod is the base class for objects representing methods +# +# source://rdoc//lib/rdoc/any_method.rb#5 +class RDoc::AnyMethod < ::RDoc::MethodAttr + include ::RDoc::TokenStream + + # Creates a new AnyMethod with a token stream +text+ and +name+ + # + # @return [AnyMethod] a new instance of AnyMethod + # + # source://rdoc//lib/rdoc/any_method.rb#46 + def initialize(text, name); end + + # Adds +an_alias+ as an alias for this method in +context+. + # + # source://rdoc//lib/rdoc/any_method.rb#59 + def add_alias(an_alias, context = T.unsafe(nil)); end + + # Prefix for +aref+ is 'method'. + # + # source://rdoc//lib/rdoc/any_method.rb#76 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # Use this for displaying a method's argument lists. + # + # source://rdoc//lib/rdoc/any_method.rb#85 + def arglists; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function=(_arg0); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/any_method.rb#96 + def call_seq; end + + # Sets the different ways you can call this method. If an empty +call_seq+ + # is given nil is assumed. + # + # See also #param_seq + # + # source://rdoc//lib/rdoc/any_method.rb#112 + def call_seq=(call_seq); end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super; end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super=(_arg0); end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize; end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize=(_arg0); end + + # Whether the method has a call-seq. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/any_method.rb#121 + def has_call_seq?; end + + # Loads is_alias_for from the internal name. Returns nil if the alias + # cannot be found. + # + # source://rdoc//lib/rdoc/any_method.rb#129 + def is_alias_for; end + + # Dumps this AnyMethod for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/any_method.rb#147 + def marshal_dump; end + + # Loads this AnyMethod from +array+. For a loaded AnyMethod the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/any_method.rb#184 + def marshal_load(array); end + + # Method name + # + # If the method has no assigned name, it extracts it from #call_seq. + # + # source://rdoc//lib/rdoc/any_method.rb#233 + def name; end + + # A list of this method's method and yield parameters. +call-seq+ params + # are preferred over parsed method and block params. + # + # source://rdoc//lib/rdoc/any_method.rb#246 + def param_list; end + + # Pretty parameter list for this method. If the method's parameters were + # given by +call-seq+ it is preferred over the parsed values. + # + # source://rdoc//lib/rdoc/any_method.rb#278 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params=(_arg0); end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title; end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title=(_arg0); end + + # Whether to skip the method description, true for methods that have + # aliases with a call-seq that doesn't include the method name. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/any_method.rb#310 + def skip_description?; end + + # Sets the store for this method and its referenced code objects. + # + # source://rdoc//lib/rdoc/any_method.rb#317 + def store=(store); end + + # For methods that +super+, find the superclass method that would be called. + # + # source://rdoc//lib/rdoc/any_method.rb#326 + def superclass_method; end + + protected + + # call_seq without deduplication and alias lookup. + # + # source://rdoc//lib/rdoc/any_method.rb#345 + def _call_seq; end + + private + + # call_seq with alias examples information removed, if this + # method is an alias method. + # + # source://rdoc//lib/rdoc/any_method.rb#355 + def deduplicate_call_seq(call_seq); end +end + +# An attribute created by \#attr, \#attr_reader, \#attr_writer or +# \#attr_accessor +# +# source://rdoc//lib/rdoc/attr.rb#6 +class RDoc::Attr < ::RDoc::MethodAttr + # Creates a new Attr with body +text+, +name+, read/write status +rw+ and + # +comment+. +singleton+ marks this as a class attribute. + # + # @return [Attr] a new instance of Attr + # + # source://rdoc//lib/rdoc/attr.rb#25 + def initialize(text, name, rw, comment, singleton = T.unsafe(nil)); end + + # Attributes are equal when their names, singleton and rw are identical + # + # source://rdoc//lib/rdoc/attr.rb#36 + def ==(other); end + + # Add +an_alias+ as an attribute in +context+. + # + # source://rdoc//lib/rdoc/attr.rb#46 + def add_alias(an_alias, context); end + + # The #aref prefix for attributes + # + # source://rdoc//lib/rdoc/attr.rb#61 + def aref_prefix; end + + # Attributes never call super. See RDoc::AnyMethod#calls_super + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#71 + def calls_super; end + + # Returns attr_reader, attr_writer or attr_accessor as appropriate. + # + # source://rdoc//lib/rdoc/attr.rb#78 + def definition; end + + # source://rdoc//lib/rdoc/attr.rb#86 + def inspect; end + + # Dumps this Attr for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/attr.rb#102 + def marshal_dump; end + + # Loads this Attr from +array+. For a loaded Attr the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/attr.rb#124 + def marshal_load(array); end + + # source://rdoc//lib/rdoc/attr.rb#151 + def pretty_print(q); end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw; end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw=(_arg0); end + + # source://rdoc//lib/rdoc/attr.rb#162 + def to_s; end + + # Attributes do not have token streams. + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#172 + def token_stream; end +end + +# ClassModule is the base class for objects representing either a class or a +# module. +# +# source://rdoc//lib/rdoc/class_module.rb#6 +class RDoc::ClassModule < ::RDoc::Context + # Creates a new ClassModule with +name+ with optional +superclass+ + # + # This is a constructor for subclasses, and must never be called directly. + # + # @return [ClassModule] a new instance of ClassModule + # + # source://rdoc//lib/rdoc/class_module.rb#111 + def initialize(name, superclass = T.unsafe(nil)); end + + # Adds +comment+ to this ClassModule's list of comments at +location+. This + # method is preferred over #comment= since it allows ri data to be updated + # across multiple runs. + # + # source://rdoc//lib/rdoc/class_module.rb#127 + def add_comment(comment, location); end + + # source://rdoc//lib/rdoc/class_module.rb#148 + def add_things(my_things, other_things); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def ancestors; end + + # HTML fragment reference for this module or class. See + # RDoc::NormalClass#aref and RDoc::NormalModule#aref + # + # source://rdoc//lib/rdoc/class_module.rb#183 + def aref; end + + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/class_module.rb#175 + def aref_prefix; end + + # Clears the comment. Used by the Ruby parser. + # + # source://rdoc//lib/rdoc/class_module.rb#195 + def clear_comment; end + + # This method is deprecated, use #add_comment instead. + # + # Appends +comment+ to the current comment, but separated by a rule. Works + # more like +=. + # + # source://rdoc//lib/rdoc/class_module.rb#205 + def comment=(comment); end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location; end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location=(_arg0); end + + # Prepares this ClassModule for use by a generator. + # + # See RDoc::Store#complete + # + # source://rdoc//lib/rdoc/class_module.rb#223 + def complete(min_visibility); end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases; end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases=(_arg0); end + + # Handy wrapper for marking up this class or module's comment + # + # source://rdoc//lib/rdoc/generator/markup.rb#131 + def description; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram=(_arg0); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # Ancestors of this class or module only + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def direct_ancestors; end + + # Does this ClassModule or any of its methods have document_self set? + # + # source://rdoc//lib/rdoc/class_module.rb#233 + def document_self_or_methods; end + + # Does this class or module have a comment with content or is + # #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#241 + def documented?; end + + # Iterates the ancestors of this class or module for which an + # RDoc::ClassModule exists. + # + # source://rdoc//lib/rdoc/class_module.rb#251 + def each_ancestor; end + + # Looks for a symbol in the #ancestors. See Context#find_local_symbol. + # + # source://rdoc//lib/rdoc/class_module.rb#264 + def find_ancestor_local_symbol(symbol); end + + # Finds a class or module with +name+ in this namespace or its descendants + # + # source://rdoc//lib/rdoc/class_module.rb#276 + def find_class_named(name); end + + # Return the fully qualified name of this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#289 + def full_name; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for=(_arg0); end + + # TODO: filter included items by #display? + # + # source://rdoc//lib/rdoc/class_module.rb#300 + def marshal_dump; end + + # source://rdoc//lib/rdoc/class_module.rb#346 + def marshal_load(array); end + + # Merges +class_module+ into this ClassModule. + # + # The data in +class_module+ is preferred over the receiver. + # + # source://rdoc//lib/rdoc/class_module.rb#435 + def merge(class_module); end + + # Merges collection +mine+ with +other+ preferring other. +other_files+ is + # used to help determine which items should be deleted. + # + # Yields whether the item should be added or removed (true or false) and the + # item to be added or removed. + # + # merge_collections things, other.things, other.in_files do |add, thing| + # if add then + # # add the thing + # else + # # remove the thing + # end + # end + # + # source://rdoc//lib/rdoc/class_module.rb#519 + def merge_collections(mine, other, other_files, &block); end + + # Merges the comments in this ClassModule with the comments in the other + # ClassModule +cm+. + # + # source://rdoc//lib/rdoc/class_module.rb#531 + def merge_sections(cm); end + + # Does this object represent a module? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#570 + def module?; end + + # Allows overriding the initial name. + # + # Used for modules and classes that are constant aliases. + # + # source://rdoc//lib/rdoc/class_module.rb#579 + def name=(new_name); end + + # Name to use to generate the url: + # modules and classes that are aliases for another + # module or class return the name of the latter. + # + # source://rdoc//lib/rdoc/class_module.rb#622 + def name_for_path; end + + # Returns the classes and modules that are not constants + # aliasing another class or module. For use by formatters + # only (caches its result). + # + # source://rdoc//lib/rdoc/class_module.rb#631 + def non_aliases; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/class_module.rb#587 + def parse(comment_location); end + + # Path to this class or module for use with HTML generator output. + # + # source://rdoc//lib/rdoc/class_module.rb#613 + def path; end + + # Updates the child modules or classes of class/module +parent+ by + # deleting the ones that have been removed from the documentation. + # + # +parent_hash+ is either parent.modules_hash or + # parent.classes_hash and +all_hash+ is ::all_modules_hash or + # ::all_classes_hash. + # + # source://rdoc//lib/rdoc/class_module.rb#643 + def remove_nodoc_children; end + + # source://rdoc//lib/rdoc/class_module.rb#657 + def remove_things(my_things, other_files); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/class_module.rb#672 + def search_record; end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/class_module.rb#687 + def store=(store); end + + # Get the superclass of this class. Attempts to retrieve the superclass + # object, returns the name if it is not known. + # + # source://rdoc//lib/rdoc/class_module.rb#701 + def superclass; end + + # Set the superclass of this class to +superclass+ + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/class_module.rb#708 + def superclass=(superclass); end + + # source://rdoc//lib/rdoc/class_module.rb#713 + def to_s; end + + # 'module' or 'class' + # + # source://rdoc//lib/rdoc/class_module.rb#724 + def type; end + + # Updates the child modules & classes by replacing the ones that are + # aliases through a constant. + # + # The aliased module/class is replaced in the children and in + # RDoc::Store#modules_hash or RDoc::Store#classes_hash + # by a copy that has RDoc::ClassModule#is_alias_for set to + # the aliased module/class, and this copy is added to #aliases + # of the aliased module/class. + # + # Formatters can use the #non_aliases method to retrieve children that + # are not aliases, for instance to list the namespace content, since + # the aliased modules are included in the constants of the class/module, + # that are listed separately. + # + # source://rdoc//lib/rdoc/class_module.rb#743 + def update_aliases; end + + # Deletes from #extends those whose module has been removed from the + # documentation. + # -- + # FIXME: like update_includes, extends are not reliably removed + # + # source://rdoc//lib/rdoc/class_module.rb#791 + def update_extends; end + + # Deletes from #includes those whose module has been removed from the + # documentation. + # -- + # FIXME: includes are not reliably removed, see _possible_bug test case + # + # source://rdoc//lib/rdoc/class_module.rb#776 + def update_includes; end + + class << self + # Return a RDoc::ClassModule of class +class_type+ that is a copy + # of module +module+. Used to promote modules to classes. + # -- + # TODO move to RDoc::NormalClass (I think) + # + # source://rdoc//lib/rdoc/class_module.rb#50 + def from_module(class_type, mod); end + end +end + +# Base class for the RDoc code tree. +# +# We contain the common stuff for contexts (which are containers) and other +# elements (methods, attributes and so on) +# +# Here's the tree of the CodeObject subclasses: +# +# * RDoc::Context +# * RDoc::TopLevel +# * RDoc::ClassModule +# * RDoc::AnonClass (never used so far) +# * RDoc::NormalClass +# * RDoc::NormalModule +# * RDoc::SingleClass +# * RDoc::MethodAttr +# * RDoc::Attr +# * RDoc::AnyMethod +# * RDoc::GhostMethod +# * RDoc::MetaMethod +# * RDoc::Alias +# * RDoc::Constant +# * RDoc::Mixin +# * RDoc::Require +# * RDoc::Include +# +# source://rdoc//lib/rdoc/code_object.rb#28 +class RDoc::CodeObject + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new CodeObject that will document itself and its children + # + # @return [CodeObject] a new instance of CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#102 + def initialize; end + + # Our comment + # + # source://rdoc//lib/rdoc/code_object.rb#35 + def comment; end + + # Replaces our comment with +comment+, unless it is empty. + # + # source://rdoc//lib/rdoc/code_object.rb#135 + def comment=(comment); end + + # Should this CodeObject be displayed in output? + # + # A code object should be displayed if: + # + # * The item didn't have a nodoc or wasn't in a container that had nodoc + # * The item wasn't ignored + # * The item has documentation and was not suppressed + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#163 + def display?; end + + # Do we document our children? + # + # source://rdoc//lib/rdoc/code_object.rb#40 + def document_children; end + + # Enables or disables documentation of this CodeObject's children unless it + # has been turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#172 + def document_children=(document_children); end + + # Do we document ourselves? + # + # source://rdoc//lib/rdoc/code_object.rb#45 + def document_self; end + + # Enables or disables documentation of this CodeObject unless it has been + # turned off by :enddoc:. If the argument is +nil+ it means the + # + # source://rdoc//lib/rdoc/code_object.rb#183 + def document_self=(document_self); end + + # Does this object have a comment with content or is #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#194 + def documented?; end + + # Are we done documenting (ie, did we come across a :enddoc:)? + # + # source://rdoc//lib/rdoc/code_object.rb#50 + def done_documenting; end + + # Turns documentation on/off, and turns on/off #document_self + # and #document_children. + # + # Once documentation has been turned off (by +:enddoc:+), + # the object will refuse to turn #document_self or + # will have no effect in the current file. + # + # source://rdoc//lib/rdoc/code_object.rb#207 + def done_documenting=(value); end + + # Yields each parent of this CodeObject. See also + # RDoc::ClassModule#each_ancestor + # + # source://rdoc//lib/rdoc/code_object.rb#218 + def each_parent; end + + # Which file this code object was defined in + # + # source://rdoc//lib/rdoc/code_object.rb#55 + def file; end + + # File name where this CodeObject was found. + # + # See also RDoc::Context#in_files + # + # source://rdoc//lib/rdoc/code_object.rb#233 + def file_name; end + + # Force documentation of this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#60 + def force_documentation; end + + # Force the documentation of this object unless documentation + # has been turned off by :enddoc: + # -- + # HACK untested, was assigning to an ivar + # + # source://rdoc//lib/rdoc/code_object.rb#245 + def force_documentation=(value); end + + # Sets the full_name overriding any computed full name. + # + # Set to +nil+ to clear RDoc's cached value + # + # source://rdoc//lib/rdoc/code_object.rb#254 + def full_name=(full_name); end + + # Use this to ignore a CodeObject and all its children until found again + # (#record_location is called). An ignored item will not be displayed in + # documentation. + # + # See github issue #55 + # + # The ignored status is temporary in order to allow implementation details + # to be hidden. At the end of processing a file RDoc allows all classes + # and modules to add new documentation to previously created classes. + # + # If a class was ignored (via stopdoc) then reopened later with additional + # documentation it should be displayed. If a class was ignored and never + # reopened it should not be displayed. The ignore flag allows this to + # occur. + # + # source://rdoc//lib/rdoc/code_object.rb#274 + def ignore; end + + # Has this class been ignored? + # + # See also #ignore + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#287 + def ignored?; end + + # Initializes state for visibility of this CodeObject and its children. + # + # source://rdoc//lib/rdoc/code_object.rb#121 + def initialize_visibility; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line=(_arg0); end + + # Hash of arbitrary metadata for this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#70 + def metadata; end + + # The options instance from the store this CodeObject is attached to, or a + # default options instance if the CodeObject is not attached. + # + # This is used by Text#snippet + # + # source://rdoc//lib/rdoc/code_object.rb#297 + def options; end + + # Our parent CodeObject. The parent may be missing for classes loaded from + # legacy RI data stores. + # + # source://rdoc//lib/rdoc/code_object.rb#309 + def parent; end + + # Sets the parent CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#75 + def parent=(_arg0); end + + # File name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#331 + def parent_file_name; end + + # Name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#338 + def parent_name; end + + # source://rdoc//lib/rdoc/code_object.rb#80 + def received_nodoc; end + + # Records the RDoc::TopLevel (file) where this code object was defined + # + # source://rdoc//lib/rdoc/code_object.rb#345 + def record_location(top_level); end + + # The section this CodeObject is in. Sections allow grouping of constants, + # attributes and methods inside a class or module. + # + # source://rdoc//lib/rdoc/code_object.rb#355 + def section; end + + # Set the section this CodeObject is in + # + # source://rdoc//lib/rdoc/code_object.rb#85 + def section=(_arg0); end + + # Enable capture of documentation unless documentation has been + # turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#365 + def start_doc; end + + # Disable capture of documentation + # + # source://rdoc//lib/rdoc/code_object.rb#377 + def stop_doc; end + + # The RDoc::Store for this object. + # + # source://rdoc//lib/rdoc/code_object.rb#90 + def store; end + + # Sets the +store+ that contains this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#387 + def store=(store); end + + # Use this to suppress a CodeObject and all its children until the next file + # it is seen in or documentation is discovered. A suppressed item with + # documentation will be displayed while an ignored item with documentation + # may not be displayed. + # + # source://rdoc//lib/rdoc/code_object.rb#404 + def suppress; end + + # Has this class been suppressed? + # + # See also #suppress + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#417 + def suppressed?; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer=(_arg0); end +end + +# source://rdoc//lib/rdoc/comment.rb#12 +class RDoc::Comment + include ::RDoc::Text + + # Creates a new comment with +text+ that is found in the RDoc::TopLevel + # +location+. + # + # @return [Comment] a new instance of Comment + # + # source://rdoc//lib/rdoc/comment.rb#56 + def initialize(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/comment.rb#74 + def ==(other); end + + # Overrides the content returned by #parse. Use when there is no #text + # source for this comment + # + # source://rdoc//lib/rdoc/comment.rb#50 + def document=(_arg0); end + + # A comment is empty if its text String is empty. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#128 + def empty?; end + + # HACK dubious + # + # source://rdoc//lib/rdoc/comment.rb#135 + def encode!(encoding); end + + # Look for a 'call-seq' in the comment to override the normal parameter + # handling. The :call-seq: is indented from the baseline. All lines of the + # same indentation level and prefix are consumed. + # + # For example, all of the following will be used as the :call-seq: + # + # # :call-seq: + # # ARGF.readlines(sep=$/) -> array + # # ARGF.readlines(limit) -> array + # # ARGF.readlines(sep, limit) -> array + # # + # # ARGF.to_a(sep=$/) -> array + # # ARGF.to_a(limit) -> array + # # ARGF.to_a(sep, limit) -> array + # + # source://rdoc//lib/rdoc/comment.rb#95 + def extract_call_seq(method); end + + # The RDoc::TopLevel this comment was found in + # + # For duck-typing when merging classes at load time + # + # source://rdoc//lib/rdoc/comment.rb#24 + def file; end + + # The format of this comment. Defaults to RDoc::Markup + # + # source://rdoc//lib/rdoc/comment.rb#19 + def format; end + + # Sets the format of this comment and resets any parsed document + # + # source://rdoc//lib/rdoc/comment.rb#143 + def format=(format); end + + # source://rdoc//lib/rdoc/comment.rb#148 + def inspect; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line=(_arg0); end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location; end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location=(_arg0); end + + # Normalizes the text. See RDoc::Text#normalize_comment for details + # + # source://rdoc//lib/rdoc/comment.rb#157 + def normalize; end + + # Was this text normalized? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#171 + def normalized?; end + + # Parses the comment into an RDoc::Markup::Document. The parsed document is + # cached until the text is changed. + # + # source://rdoc//lib/rdoc/comment.rb#179 + def parse; end + + # Removes private sections from this comment. Private sections are flush to + # the comment marker and start with -- and end with ++. + # For C-style comments, a private marker may not start at the opening of the + # comment. + # + # /* + # *-- + # * private + # *++ + # * public + # */ + # + # source://rdoc//lib/rdoc/comment.rb#200 + def remove_private; end + + # The text for this comment + # + # source://rdoc//lib/rdoc/comment.rb#39 + def text; end + + # Replaces this comment's text with +text+ and resets the parsed document. + # + # An error is raised if the comment contains a document but no text. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/comment.rb#214 + def text=(text); end + + # The text for this comment + # + # Alias for text + # + # source://rdoc//lib/rdoc/comment.rb#39 + def to_s; end + + # Returns true if this comment is in TomDoc format. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#225 + def tomdoc?; end + + private + + # -- + # TODO deep copy @document + # + # source://rdoc//lib/rdoc/comment.rb#70 + def initialize_copy(copy); end +end + +# A constant +# +# source://rdoc//lib/rdoc/constant.rb#5 +class RDoc::Constant < ::RDoc::CodeObject + # Creates a new constant with +name+, +value+ and +comment+ + # + # @return [Constant] a new instance of Constant + # + # source://rdoc//lib/rdoc/constant.rb#32 + def initialize(name, value, comment); end + + # Constants are ordered by name + # + # source://rdoc//lib/rdoc/constant.rb#47 + def <=>(other); end + + # Constants are equal when their #parent and #name is the same + # + # source://rdoc//lib/rdoc/constant.rb#56 + def ==(other); end + + # A constant is documented if it has a comment, or is an alias + # for a documented class or module. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/constant.rb#66 + def documented?; end + + # Full constant name including namespace + # + # source://rdoc//lib/rdoc/constant.rb#81 + def full_name; end + + # source://rdoc//lib/rdoc/constant.rb#99 + def inspect; end + + # The module or class this constant is an alias for + # + # source://rdoc//lib/rdoc/constant.rb#88 + def is_alias_for; end + + # Sets the module or class this is constant is an alias for. + # + # source://rdoc//lib/rdoc/constant.rb#12 + def is_alias_for=(_arg0); end + + # Dumps this Constant for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/constant.rb#109 + def marshal_dump; end + + # Loads this Constant from +array+. For a loaded Constant the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/constant.rb#135 + def marshal_load(array); end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name; end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name=(_arg0); end + + # Path to this constant for use with HTML generator output. + # + # source://rdoc//lib/rdoc/constant.rb#153 + def path; end + + # source://rdoc//lib/rdoc/constant.rb#157 + def pretty_print(q); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/constant.rb#171 + def store=(store); end + + # source://rdoc//lib/rdoc/constant.rb#177 + def to_s; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value=(_arg0); end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility; end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility=(_arg0); end +end + +# A Context is something that can hold modules, classes, methods, attributes, +# aliases, requires, and includes. Classes, modules, and files are all +# Contexts. +# +# source://rdoc//lib/rdoc/context.rb#7 +class RDoc::Context < ::RDoc::CodeObject + include ::Comparable + + # Creates an unnamed empty context with public current visibility + # + # @return [Context] a new instance of Context + # + # source://rdoc//lib/rdoc/context.rb#123 + def initialize; end + + # Contexts are sorted by full_name + # + # source://rdoc//lib/rdoc/context.rb#171 + def <=>(other); end + + # Adds an item of type +klass+ with the given +name+ and +comment+ to the + # context. + # + # Currently only RDoc::Extend and RDoc::Include are supported. + # + # source://rdoc//lib/rdoc/context.rb#183 + def add(klass, name, comment); end + + # Adds +an_alias+ that is automatically resolved + # + # source://rdoc//lib/rdoc/context.rb#198 + def add_alias(an_alias); end + + # Adds +attribute+ if not already there. If it is (as method(s) or attribute), + # updates the comment if it was empty. + # + # The attribute is registered only if it defines a new method. + # For instance, attr_reader :foo will not be registered + # if method +foo+ exists, but attr_accessor :foo will be registered + # if method +foo+ exists, but foo= does not. + # + # source://rdoc//lib/rdoc/context.rb#225 + def add_attribute(attribute); end + + # Adds a class named +given_name+ with +superclass+. + # + # Both +given_name+ and +superclass+ may contain '::', and are + # interpreted relative to the +self+ context. This allows handling correctly + # examples like these: + # class RDoc::Gauntlet < Gauntlet + # module Mod + # class Object # implies < ::Object + # class SubObject < Object # this is _not_ ::Object + # + # Given class Container::Item RDoc assumes +Container+ is a module + # unless it later sees class Container. +add_class+ automatically + # upgrades +given_name+ to a class in this case. + # + # source://rdoc//lib/rdoc/context.rb#288 + def add_class(class_type, given_name, superclass = T.unsafe(nil)); end + + # Adds the class or module +mod+ to the modules or + # classes Hash +self_hash+, and to +all_hash+ (either + # TopLevel::modules_hash or TopLevel::classes_hash), + # unless #done_documenting is +true+. Sets the #parent of +mod+ + # to +self+, and its #section to #current_section. Returns +mod+. + # + # source://rdoc//lib/rdoc/context.rb#404 + def add_class_or_module(mod, self_hash, all_hash); end + + # Adds +constant+ if not already there. If it is, updates the comment, + # value and/or is_alias_for of the known constant if they were empty/nil. + # + # source://rdoc//lib/rdoc/context.rb#429 + def add_constant(constant); end + + # Adds extension module +ext+ which should be an RDoc::Extend + # + # source://rdoc//lib/rdoc/context.rb#463 + def add_extend(ext); end + + # Adds included module +include+ which should be an RDoc::Include + # + # source://rdoc//lib/rdoc/context.rb#454 + def add_include(include); end + + # Adds +method+ if not already there. If it is (as method or attribute), + # updates the comment if it was empty. + # + # source://rdoc//lib/rdoc/context.rb#473 + def add_method(method); end + + # Adds a module named +name+. If RDoc already knows +name+ is a class then + # that class is returned instead. See also #add_class. + # + # source://rdoc//lib/rdoc/context.rb#506 + def add_module(class_type, name); end + + # Adds an alias from +from+ (a class or module) to +name+ which was defined + # in +file+. + # + # source://rdoc//lib/rdoc/context.rb#527 + def add_module_alias(from, from_name, to, file); end + + # Adds a module by +RDoc::NormalModule+ instance. See also #add_module. + # + # source://rdoc//lib/rdoc/context.rb#519 + def add_module_by_normal_module(mod); end + + # Adds +require+ to this context's top level + # + # source://rdoc//lib/rdoc/context.rb#568 + def add_require(require); end + + # Returns a section with +title+, creating it if it doesn't already exist. + # +comment+ will be appended to the section's comment. + # + # A section with a +title+ of +nil+ will return the default section. + # + # See also RDoc::Context::Section + # + # source://rdoc//lib/rdoc/context.rb#586 + def add_section(title, comment = T.unsafe(nil)); end + + # Adds +thing+ to the collection +array+ + # + # source://rdoc//lib/rdoc/context.rb#600 + def add_to(array, thing); end + + # Class/module aliases + # + # source://rdoc//lib/rdoc/context.rb#25 + def aliases; end + + # Is there any content? + # + # This means any of: comment, aliases, methods, attributes, external + # aliases, require, constant. + # + # Includes and extends are also checked unless includes == false. + # + # source://rdoc//lib/rdoc/context.rb#616 + def any_content(includes = T.unsafe(nil)); end + + # All attr* methods + # + # source://rdoc//lib/rdoc/context.rb#30 + def attributes; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params=(_arg0); end + + # Creates the full name for a child with +name+ + # + # source://rdoc//lib/rdoc/context.rb#632 + def child_name(name); end + + # Class attributes + # + # source://rdoc//lib/rdoc/context.rb#645 + def class_attributes; end + + # Class methods + # + # source://rdoc//lib/rdoc/context.rb#652 + def class_method_list; end + + # Array of classes in this context + # + # source://rdoc//lib/rdoc/context.rb#659 + def classes; end + + # All classes and modules in this namespace + # + # source://rdoc//lib/rdoc/context.rb#666 + def classes_and_modules; end + + # Hash of classes keyed by class name + # + # source://rdoc//lib/rdoc/context.rb#673 + def classes_hash; end + + # Constants defined + # + # source://rdoc//lib/rdoc/context.rb#40 + def constants; end + + # Hash of registered constants. + # + # source://rdoc//lib/rdoc/context.rb#118 + def constants_hash; end + + # Current visibility of this line + # + # source://rdoc//lib/rdoc/context.rb#102 + def current_line_visibility=(_arg0); end + + # The current documentation section that new items will be added to. If + # temporary_section is available it will be used. + # + # source://rdoc//lib/rdoc/context.rb#681 + def current_section; end + + # Sets the current documentation section of documentation + # + # source://rdoc//lib/rdoc/context.rb#45 + def current_section=(_arg0); end + + # Is part of this thing was defined in +file+? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#694 + def defined_in?(file); end + + # source://rdoc//lib/rdoc/context.rb#698 + def display(method_attr); end + + # Iterator for ancestors for duck-typing. Does nothing. See + # RDoc::ClassModule#each_ancestor. + # + # This method exists to make it easy to work with Context subclasses that + # aren't part of RDoc. + # + # source://rdoc//lib/rdoc/context.rb#713 + def each_ancestor(&_); end + + # Iterator for attributes + # + # source://rdoc//lib/rdoc/context.rb#719 + def each_attribute; end + + # Iterator for classes and modules + # + # source://rdoc//lib/rdoc/context.rb#726 + def each_classmodule(&block); end + + # Iterator for constants + # + # source://rdoc//lib/rdoc/context.rb#733 + def each_constant; end + + # Iterator for extension modules + # + # source://rdoc//lib/rdoc/context.rb#747 + def each_extend; end + + # Iterator for included modules + # + # source://rdoc//lib/rdoc/context.rb#740 + def each_include; end + + # Iterator for methods + # + # source://rdoc//lib/rdoc/context.rb#754 + def each_method; end + + # Iterator for each section's contents sorted by title. The +section+, the + # section's +constants+ and the sections +attributes+ are yielded. The + # +constants+ and +attributes+ collections are sorted. + # + # To retrieve methods in a section use #methods_by_type with the optional + # +section+ parameter. + # + # NOTE: Do not edit collections yielded by this method + # + # source://rdoc//lib/rdoc/context.rb#770 + def each_section; end + + # Modules this context is extended with + # + # source://rdoc//lib/rdoc/context.rb#60 + def extends; end + + # Aliases that could not be resolved. + # + # source://rdoc//lib/rdoc/context.rb#92 + def external_aliases; end + + # Finds an attribute +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#787 + def find_attribute(name, singleton); end + + # Finds an attribute with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#795 + def find_attribute_named(name); end + + # Finds a class method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#809 + def find_class_method_named(name); end + + # Finds a constant with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#816 + def find_constant_named(name); end + + # Find a module at a higher scope + # + # source://rdoc//lib/rdoc/context.rb#825 + def find_enclosing_module_named(name); end + + # Finds an external alias +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#832 + def find_external_alias(name, singleton); end + + # Finds an external alias with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#839 + def find_external_alias_named(name); end + + # Finds a file with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#853 + def find_file_named(name); end + + # Finds an instance method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#860 + def find_instance_method_named(name); end + + # Finds a method, constant, attribute, external alias, module or file + # named +symbol+ in this context. + # + # source://rdoc//lib/rdoc/context.rb#868 + def find_local_symbol(symbol); end + + # Finds a method named +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#880 + def find_method(name, singleton); end + + # Finds a instance or module method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#893 + def find_method_named(name); end + + # Find a module with +name+ using ruby's scoping rules + # + # source://rdoc//lib/rdoc/context.rb#907 + def find_module_named(name); end + + # Look up +symbol+, first as a module, then as a local symbol. + # + # source://rdoc//lib/rdoc/context.rb#917 + def find_symbol(symbol); end + + # Look up a module named +symbol+. + # + # source://rdoc//lib/rdoc/context.rb#924 + def find_symbol_module(symbol); end + + # The full name for this context. This method is overridden by subclasses. + # + # source://rdoc//lib/rdoc/context.rb#957 + def full_name; end + + # Does this context and its methods and constants all have documentation? + # + # (Yes, fully documented doesn't mean everything.) + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#966 + def fully_documented?; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/context.rb#976 + def http_url(prefix); end + + # Files this context is found in + # + # source://rdoc//lib/rdoc/context.rb#50 + def in_files; end + + # Modules this context includes + # + # source://rdoc//lib/rdoc/context.rb#55 + def includes; end + + # Sets the defaults for methods and so-forth + # + # source://rdoc//lib/rdoc/context.rb#145 + def initialize_methods_etc; end + + # Instance attributes + # + # source://rdoc//lib/rdoc/context.rb#987 + def instance_attributes; end + + # Instance methods + # -- + # TODO remove this later + # + # source://rdoc//lib/rdoc/context.rb#1003 + def instance_method_list; end + + # Instance methods + # + # source://rdoc//lib/rdoc/context.rb#994 + def instance_methods; end + + # Methods defined in this context + # + # source://rdoc//lib/rdoc/context.rb#65 + def method_list; end + + # Breaks method_list into a nested hash by type ('class' or + # 'instance') and visibility (+:public+, +:protected+, +:private+). + # + # If +section+ is provided only methods in that RDoc::Context::Section will + # be returned. + # + # source://rdoc//lib/rdoc/context.rb#1015 + def methods_by_type(section = T.unsafe(nil)); end + + # Hash of registered methods. Attributes are also registered here, + # twice if they are RW. + # + # source://rdoc//lib/rdoc/context.rb#108 + def methods_hash; end + + # Yields AnyMethod and Attr entries matching the list of names in +methods+. + # + # source://rdoc//lib/rdoc/context.rb#1038 + def methods_matching(methods, singleton = T.unsafe(nil), &block); end + + # Array of modules in this context + # + # source://rdoc//lib/rdoc/context.rb#1051 + def modules; end + + # Hash of modules keyed by module name + # + # source://rdoc//lib/rdoc/context.rb#1058 + def modules_hash; end + + # Name of this class excluding namespace. See also full_name + # + # source://rdoc//lib/rdoc/context.rb#70 + def name; end + + # Name to use to generate the url. + # #full_name by default. + # + # source://rdoc//lib/rdoc/context.rb#1066 + def name_for_path; end + + # Changes the visibility for new methods to +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1073 + def ongoing_visibility=(visibility); end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params; end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params=(_arg0); end + + # Record +top_level+ as a file +self+ is in. + # + # source://rdoc//lib/rdoc/context.rb#1080 + def record_location(top_level); end + + # Should we remove this context from the documentation? + # + # The answer is yes if: + # * #received_nodoc is +true+ + # * #any_content is +false+ (not counting includes) + # * All #includes are modules (not a string), and their module has + # #remove_from_documentation? == true + # * All classes and modules have #remove_from_documentation? == true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#1094 + def remove_from_documentation?; end + + # Removes methods and attributes with a visibility less than +min_visibility+. + # -- + # TODO mark the visibility of attributes in the template (if not public?) + # + # source://rdoc//lib/rdoc/context.rb#1107 + def remove_invisible(min_visibility); end + + # Only called when min_visibility == :public or :private + # + # source://rdoc//lib/rdoc/context.rb#1117 + def remove_invisible_in(array, min_visibility); end + + # Files this context requires + # + # source://rdoc//lib/rdoc/context.rb#75 + def requires; end + + # Tries to resolve unmatched aliases when a method or attribute has just + # been added. + # + # source://rdoc//lib/rdoc/context.rb#1133 + def resolve_aliases(added); end + + # Returns RDoc::Context::Section objects referenced in this context for use + # in a table of contents. + # + # source://rdoc//lib/rdoc/context.rb#1149 + def section_contents; end + + # Sections in this context + # + # source://rdoc//lib/rdoc/context.rb#1173 + def sections; end + + # source://rdoc//lib/rdoc/context.rb#1177 + def sections_hash; end + + # Given an array +names+ of constants, set the visibility of each constant to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1202 + def set_constant_visibility_for(names, visibility); end + + # Sets the current section to a section with +title+. See also #add_section + # + # source://rdoc//lib/rdoc/context.rb#1184 + def set_current_section(title, comment); end + + # Given an array +methods+ of method names, set the visibility of each to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1192 + def set_visibility_for(methods, visibility, singleton = T.unsafe(nil)); end + + # Sorts sections alphabetically (default) or in TomDoc fashion (none, + # Public, Internal, Deprecated) + # + # source://rdoc//lib/rdoc/context.rb#1213 + def sort_sections; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section=(_arg0); end + + # source://rdoc//lib/rdoc/context.rb#1229 + def to_s; end + + # Return the TopLevel that owns us + # -- + # FIXME we can be 'owned' by several TopLevel (see #record_location & + # #in_files) + # + # source://rdoc//lib/rdoc/context.rb#1239 + def top_level; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists=(_arg0); end + + # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ + # + # source://rdoc//lib/rdoc/context.rb#1249 + def upgrade_to_class(mod, class_type, enclosing); end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility; end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility=(_arg0); end +end + +# A section of documentation like: +# +# # :section: The title +# # The body +# +# Sections can be referenced multiple times and will be collapsed into a +# single section. +# +# source://rdoc//lib/rdoc/context/section.rb#13 +class RDoc::Context::Section + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new section with +title+ and +comment+ + # + # @return [Section] a new instance of Section + # + # source://rdoc//lib/rdoc/context/section.rb#42 + def initialize(parent, title, comment); end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def ==(other); end + + # Adds +comment+ to this section + # + # source://rdoc//lib/rdoc/context/section.rb#63 + def add_comment(comment); end + + # Anchor reference for linking to this section + # + # source://rdoc//lib/rdoc/context/section.rb#83 + def aref; end + + # Section comment + # + # source://rdoc//lib/rdoc/context/section.rb#22 + def comment; end + + # Section comments + # + # source://rdoc//lib/rdoc/context/section.rb#27 + def comments; end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def eql?(other); end + + # Extracts the comment for this section from the original comment block. + # If the first line contains :section:, strip it and use the rest. + # Otherwise remove lines up to the line containing :section:, and look + # for those lines again at the end and remove them. This lets us write + # + # # :section: The title + # # The body + # + # source://rdoc//lib/rdoc/context/section.rb#98 + def extract_comment(comment); end + + # source://rdoc//lib/rdoc/context/section.rb#130 + def hash; end + + # The files comments in this section come from + # + # source://rdoc//lib/rdoc/context/section.rb#137 + def in_files; end + + # source://rdoc//lib/rdoc/context/section.rb#126 + def inspect; end + + # Serializes this Section. The title and parsed comment are saved, but not + # the section parent which must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#158 + def marshal_dump; end + + # De-serializes this Section. The section parent must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#169 + def marshal_load(array); end + + # Context this Section lives in + # + # source://rdoc//lib/rdoc/context/section.rb#32 + def parent; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/context/section.rb#180 + def parse; end + + # The section's title, or 'Top Section' if the title is nil. + # + # This is used by the table of contents template so the name is silly. + # + # source://rdoc//lib/rdoc/context/section.rb#208 + def plain_html; end + + # Removes a comment from this section if it is from the same file as + # +comment+ + # + # source://rdoc//lib/rdoc/context/section.rb#216 + def remove_comment(comment); end + + # Section title + # + # source://rdoc//lib/rdoc/context/section.rb#37 + def title; end +end + +# RDoc::CrossReference is a reusable way to create cross references for names. +# +# source://rdoc//lib/rdoc/cross_reference.rb#8 +class RDoc::CrossReference + # Allows cross-references to be created based on the given +context+ + # (RDoc::Context). + # + # @return [CrossReference] a new instance of CrossReference + # + # source://rdoc//lib/rdoc/cross_reference.rb#127 + def initialize(context); end + + # Returns a reference to +name+. + # + # If the reference is found and +name+ is not documented +text+ will be + # returned. If +name+ is escaped +name+ is returned. If +name+ is not + # found +text+ is returned. + # + # source://rdoc//lib/rdoc/cross_reference.rb#190 + def resolve(name, text); end + + # Returns a method reference to +name+. + # + # source://rdoc//lib/rdoc/cross_reference.rb#137 + def resolve_method(name); end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen; end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen=(_arg0); end +end + +# Regular expression to match method arguments. +# +# source://rdoc//lib/rdoc/cross_reference.rb#28 +RDoc::CrossReference::METHOD_ARGS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Regular expression to match a single method argument. +# +# source://rdoc//lib/rdoc/cross_reference.rb#23 +RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) + +# A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson +# and Masatoshi SEKI. +# +# To use: +# +# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil +# +# File.open 'hello.txt', 'w' do |io| +# erbio.result binding +# end +# +# Note that binding must enclose the io you wish to output on. +# +# source://rdoc//lib/rdoc/erbio.rb#18 +class RDoc::ERBIO < ::ERB + # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize + # + # @return [ERBIO] a new instance of ERBIO + # + # source://rdoc//lib/rdoc/erbio.rb#23 + def initialize(str, trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # Instructs +compiler+ how to write to +io_variable+ + # + # source://rdoc//lib/rdoc/erbio.rb#30 + def set_eoutvar(compiler, io_variable); end +end + +# Allows an ERB template to be rendered in the context (binding) of an +# existing ERB template evaluation. +# +# source://rdoc//lib/rdoc/erb_partial.rb#6 +class RDoc::ERBPartial < ::ERB + # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only + # if it isn't already set. + # + # source://rdoc//lib/rdoc/erb_partial.rb#12 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# This class is a wrapper around File IO and Encoding that helps RDoc load +# files and convert them to the correct encoding. +# +# source://rdoc//lib/rdoc/encoding.rb#8 +module RDoc::Encoding + class << self + # Changes encoding based on +encoding+ without converting and returns new + # string + # + # source://rdoc//lib/rdoc/encoding.rb#112 + def change_encoding(text, encoding); end + + # Detects the encoding of +string+ based on the magic comment + # + # source://rdoc//lib/rdoc/encoding.rb#92 + def detect_encoding(string); end + + # Reads the contents of +filename+ and handles any encoding directives in + # the file. + # + # The content will be converted to the +encoding+. If the file cannot be + # converted a warning will be printed and nil will be returned. + # + # If +force_transcode+ is true the document will be transcoded and any + # unknown character in the target encoding will be replaced with '?' + # + # source://rdoc//lib/rdoc/encoding.rb#32 + def read_file(filename, encoding, force_transcode = T.unsafe(nil)); end + + # Removes magic comments and shebang + # + # source://rdoc//lib/rdoc/encoding.rb#102 + def remove_magic_comment(string); end + end +end + +# source://rdoc//lib/rdoc/encoding.rb#10 +RDoc::Encoding::HEADER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/generator/darkfish.rb#55 +class RDoc::Generator::Darkfish + include ::ERB::Escape + include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + + # Initialize a few instance variables before we start + # + # @return [Darkfish] a new instance of Darkfish + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#159 + def initialize(store, options); end + + # Creates a template from its components and the +body_file+. + # + # For backwards compatibility, if +body_file+ contains "--op from the + # options for a full path. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#102 + def base_dir; end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#191 + def class_dir; end + + # Classes and modules to be used by this generator, not necessarily + # displayed. See also #modsort + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#108 + def classes; end + + # Copies static files from the static_path into the output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#265 + def copy_static; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#182 + def debug_msg(*msg); end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run; end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run=(_arg0); end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#199 + def file_dir; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output=(_arg0); end + + # Files to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#124 + def files; end + + # Create the directories the generated docs will live in if they don't + # already exist. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#207 + def gen_sub_directories; end + + # Build the initial indices and output objects based on an array of TopLevel + # objects containing the extracted information. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#241 + def generate; end + + # Generates a class file for +klass+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#337 + def generate_class(klass, template_file = T.unsafe(nil)); end + + # Generate a documentation file for each class and module + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#368 + def generate_class_files; end + + # Generate a documentation file for each file + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#395 + def generate_file_files; end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#303 + def generate_index; end + + # Generate a page file for +file+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#464 + def generate_page(file); end + + # Generates the 404 page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#493 + def generate_servlet_not_found(message); end + + # Generates the servlet root page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#526 + def generate_servlet_root(installed); end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#553 + def generate_table_of_contents; end + + # Return a list of the documented modules sorted by salience first, then + # by name. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#294 + def get_sorted_module_list(classes); end + + # Try to extract Subversion information out of the first constant whose + # value looks like a subversion Id tag. If no matching constant is found, + # and empty hash is returned. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#652 + def get_svninfo(klass); end + + # source://rdoc//lib/rdoc/generator/darkfish.rb#584 + def install_rdoc_static_file(source, destination, options); end + + # The JSON index generator for this Darkfish generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#129 + def json_index; end + + # Methods to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#134 + def methods; end + + # Sorted list of classes and modules to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#139 + def modsort; end + + # The output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#154 + def outputdir; end + + # Renders the ERb contained in +file_name+ relative to the template + # directory and returns the result based on the current context. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#699 + def render(file_name); end + + # Load and render the erb template in the given +template_file+ and write + # it out to +out_file+. + # + # Both +template_file+ and +out_file+ should be Pathname-like objects. + # + # An io will be yielded which must be captured by binding in the caller. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#717 + def render_template(template_file, out_file = T.unsafe(nil)); end + + # Prepares for generation of output from the current directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#604 + def setup; end + + # The RDoc::Store that is the source of the generated content + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#144 + def store; end + + # The directory where the template files live + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#149 + def template_dir; end + + # Retrieves a cache template for +file+, if present, or fills the cache. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#764 + def template_for(file, page = T.unsafe(nil), klass = T.unsafe(nil)); end + + # Creates the result for +template+ with +context+. If an error is raised a + # Pathname +template_file+ will indicate the file where the error occurred. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#751 + def template_result(template, context, template_file); end + + # Return a string describing the amount of time in the given number of + # seconds in terms a human can understand easily. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#621 + def time_delta_string(seconds); end + + # Copy over the stylesheet into the appropriate place in the output + # directory. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#215 + def write_style_sheet; end +end + +# source://rdoc//lib/rdoc/generator/json_index.rb#77 +class RDoc::Generator::JsonIndex + include ::RDoc::Text + + # Creates a new generator. +parent_generator+ is used to determine the + # class_dir and file_dir of links in the output index. + # + # +options+ are the same options passed to the parent generator. + # + # @return [JsonIndex] a new instance of JsonIndex + # + # source://rdoc//lib/rdoc/generator/json_index.rb#94 + def initialize(parent_generator, options); end + + # Builds the JSON index as a Hash. + # + # source://rdoc//lib/rdoc/generator/json_index.rb#110 + def build_index; end + + # The directory classes are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#271 + def class_dir; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/json_index.rb#123 + def debug_msg(*msg); end + + # The directory files are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#278 + def file_dir; end + + # Writes the JSON index to disk + # + # source://rdoc//lib/rdoc/generator/json_index.rb#131 + def generate; end + + # Compress the search_index.js file using gzip + # + # source://rdoc//lib/rdoc/generator/json_index.rb#166 + def generate_gzipped; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#86 + def index; end + + # Adds classes and modules to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#211 + def index_classes; end + + # Adds methods to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#230 + def index_methods; end + + # Adds pages to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#251 + def index_pages; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#282 + def reset(files, classes); end + + # Removes whitespace and downcases +string+ + # + # source://rdoc//lib/rdoc/generator/json_index.rb#296 + def search_string(string); end +end + +# Generates a POT file. +# +# Here is a translator work flow with the generator. +# +# == Create .pot +# +# You create .pot file by pot formatter: +# +# % rdoc --format pot +# +# It generates doc/rdoc.pot. +# +# == Create .po +# +# You create .po file from doc/rdoc.pot. This operation is needed only +# the first time. This work flow assumes that you are a translator +# for Japanese. +# +# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit +# provided by GNU gettext or rmsginit provided by gettext gem. This +# work flow uses gettext gem because it is more portable than GNU +# gettext for Rubyists. Gettext gem is implemented by pure Ruby. +# +# % gem install gettext +# % mkdir -p locale/ja +# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja +# +# Translate messages in .po +# +# You translate messages in .po by a PO file editor. po-mode.el exists +# for Emacs users. There are some GUI tools such as GTranslator. +# There are some Web services such as POEditor and Tansifex. You can +# edit by your favorite text editor because .po is a text file. +# Generate localized documentation +# +# You can generate localized documentation with locale/ja/rdoc.po: +# +# % rdoc --locale ja +# +# You can find documentation in Japanese in doc/. Yay! +# +# == Update translation +# +# You need to update translation when your application is added or +# modified messages. +# +# You can update .po by the following command lines: +# +# % rdoc --format pot +# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot +# +# You edit locale/ja/rdoc.po to translate new messages. +# +# source://rdoc//lib/rdoc/generator/pot.rb#56 +class RDoc::Generator::POT + # Set up a new .pot generator + # + # @return [POT] a new instance of POT + # + # source://rdoc//lib/rdoc/generator/pot.rb#68 + def initialize(store, options); end + + # source://rdoc//lib/rdoc/generator/pot.rb#85 + def class_dir; end + + # Writes .pot to disk. + # + # source://rdoc//lib/rdoc/generator/pot.rb#76 + def generate; end + + private + + # source://rdoc//lib/rdoc/generator/pot.rb#90 + def extract_messages; end +end + +# Extracts message from RDoc::Store +# +# source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#5 +class RDoc::Generator::POT::MessageExtractor + # Creates a message extractor for +store+. + # + # @return [MessageExtractor] a new instance of MessageExtractor + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#10 + def initialize(store); end + + # Extracts messages from +store+, stores them into + # RDoc::Generator::POT::PO and returns it. + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#19 + def extract; end + + private + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#64 + def entry(msgid, options); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#28 + def extract_from_klass(klass); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#51 + def extract_text(text, comment, location = T.unsafe(nil)); end +end + +# Generates a PO format text +# +# source://rdoc//lib/rdoc/generator/pot/po.rb#5 +class RDoc::Generator::POT::PO + # Creates an object that represents PO format. + # + # @return [PO] a new instance of PO + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#10 + def initialize; end + + # Adds a PO entry to the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#18 + def add(entry); end + + # Returns PO format text for the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#29 + def to_s; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po.rb#40 + def add_header; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#44 + def header_entry; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#73 + def sort_entries; end +end + +# A PO entry in PO +# +# source://rdoc//lib/rdoc/generator/pot/po_entry.rb#5 +class RDoc::Generator::POT::POEntry + # Creates a PO entry for +msgid+. Other valus can be specified by + # +options+. + # + # @return [POEntry] a new instance of POEntry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#29 + def initialize(msgid, options = T.unsafe(nil)); end + + # The comment content extracted from source file + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#17 + def extracted_comment; end + + # The flags of the PO entry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#23 + def flags; end + + # Merges the PO entry with +other_entry+. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#56 + def merge(other_entry); end + + # The msgid content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#8 + def msgid; end + + # The msgstr content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#11 + def msgstr; end + + # The locations where the PO entry is extracted + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#20 + def references; end + + # Returns the PO entry in PO format. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#41 + def to_s; end + + # The comment content created by translator (PO editor) + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#14 + def translator_comment; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#120 + def escape(string); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#72 + def format_comment(mark, comment); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#88 + def format_extracted_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#102 + def format_flags; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#109 + def format_message(message); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#92 + def format_references; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#84 + def format_translator_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#137 + def merge_array(array1, array2); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#133 + def merge_string(string1, string2); end +end + +# Generates ri data files +# +# source://rdoc//lib/rdoc/generator/ri.rb#5 +class RDoc::Generator::RI + # Set up a new ri generator + # + # @return [RI] a new instance of RI + # + # source://rdoc//lib/rdoc/generator/ri.rb#17 + def initialize(store, options); end + + # Writes the parsed data store to disk for use by ri. + # + # source://rdoc//lib/rdoc/generator/ri.rb#26 + def generate; end +end + +# A message container for a locale. +# +# This object provides the following two features: +# +# * Loads translated messages from .po file. +# * Translates a message into the locale. +# +# source://rdoc//lib/rdoc/i18n/locale.rb#10 +class RDoc::I18n::Locale + # Creates a new locale object for +name+ locale. +name+ must + # follow IETF language tag format. + # + # @return [Locale] a new instance of Locale + # + # source://rdoc//lib/rdoc/i18n/locale.rb#48 + def initialize(name); end + + # Loads translation messages from +locale_directory+/+@name+/rdoc.po + # or +locale_directory+/+@name+.po. The former has high priority. + # + # This method requires gettext gem for parsing .po file. If you + # don't have gettext gem, this method doesn't load .po file. This + # method warns and returns +false+. + # + # Returns +true+ if succeeded, +false+ otherwise. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#63 + def load(locale_directory); end + + # The name of the locale. It uses IETF language tag format + # +[language[_territory][.codeset][@modifier]]+. + # + # See also {BCP 47 - Tags for Identifying + # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#42 + def name; end + + # Translates the +message+ into locale. If there is no translation + # messages for +message+ in locale, +message+ itself is returned. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#98 + def translate(message); end + + class << self + # Returns the locale object for +locale_name+. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#19 + def [](locale_name); end + + # Sets the locale object for +locale_name+. + # + # Normally, this method is not used. This method is useful for + # testing. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#29 + def []=(locale_name, locale); end + end +end + +# An i18n supported text. +# +# This object provides the following two features: +# +# * Extracts translation messages from wrapped raw text. +# * Translates wrapped raw text in specified locale. +# +# Wrapped raw text is one of String, RDoc::Comment or Array of them. +# +# source://rdoc//lib/rdoc/i18n/text.rb#12 +class RDoc::I18n::Text + # Creates a new i18n supported text for +raw+ text. + # + # @return [Text] a new instance of Text + # + # source://rdoc//lib/rdoc/i18n/text.rb#17 + def initialize(raw); end + + # Extracts translation target messages and yields each message. + # + # Each yielded message is a Hash. It consists of the followings: + # + # :type :: :paragraph + # :paragraph :: String (The translation target message itself.) + # :line_no :: Integer (The line number of the :paragraph is started.) + # + # The above content may be added in the future. + # + # source://rdoc//lib/rdoc/i18n/text.rb#32 + def extract_messages; end + + # Translates raw text into +locale+. + # + # source://rdoc//lib/rdoc/i18n/text.rb#44 + def translate(locale); end + + private + + # source://rdoc//lib/rdoc/i18n/text.rb#88 + def each_line(raw, &block); end + + # @yield [part] + # + # source://rdoc//lib/rdoc/i18n/text.rb#101 + def emit_empty_line_event(line, line_no); end + + # source://rdoc//lib/rdoc/i18n/text.rb#110 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # source://rdoc//lib/rdoc/i18n/text.rb#60 + def parse(&block); end +end + +# source://rdoc//lib/rdoc/markdown.rb#182 +class RDoc::Markdown + # Creates a new markdown parser that enables the given +extensions+. + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#668 + def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Alphanumeric = %literals.Alphanumeric + # + # source://rdoc//lib/rdoc/markdown.rb#14705 + def _Alphanumeric; end + + # AlphanumericAscii = %literals.AlphanumericAscii + # + # source://rdoc//lib/rdoc/markdown.rb#14712 + def _AlphanumericAscii; end + + # AtxHeading = AtxStart:s @Sp AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1162 + def _AtxHeading; end + + # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline + # + # source://rdoc//lib/rdoc/markdown.rb#1080 + def _AtxInline; end + + # AtxStart = < /\#{1,6}/ > { text.length } + # + # source://rdoc//lib/rdoc/markdown.rb#1136 + def _AtxStart; end + + # AutoLink = (AutoLinkUrl | AutoLinkEmail) + # + # source://rdoc//lib/rdoc/markdown.rb#11574 + def _AutoLink; end + + # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#11707 + def _AutoLinkEmail; end + + # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11592 + def _AutoLinkUrl; end + + # BOM = %literals.BOM + # + # source://rdoc//lib/rdoc/markdown.rb#14719 + def _BOM; end + + # BlankLine = @Sp @Newline { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#14148 + def _BlankLine; end + + # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain) + # + # source://rdoc//lib/rdoc/markdown.rb#939 + def _Block; end + + # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } + # + # source://rdoc//lib/rdoc/markdown.rb#1566 + def _BlockQuote; end + + # BlockQuoteRaw = @StartList:a (">" " "? Line:l { a << l } (!">" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#1589 + def _BlockQuoteRaw; end + + # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2154 + def _Bullet; end + + # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2198 + def _BulletList; end + + # CharEntity = "&" < /[A-Za-z0-9]+/ > ";" { if entity = HTML_ENTITIES[text] then entity.pack 'U*' else "&#{text};" end } + # + # source://rdoc//lib/rdoc/markdown.rb#14812 + def _CharEntity; end + + # Code = (Ticks1 @Sp < ((!"`" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!"`" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!"`" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!"`" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { "#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#12511 + def _Code; end + + # CodeFence = &{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim } + # + # source://rdoc//lib/rdoc/markdown.rb#15681 + def _CodeFence; end + + # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14776 + def _DecEntity; end + + # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten } + # + # source://rdoc//lib/rdoc/markdown.rb#16339 + def _DefinitionList; end + + # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#16482 + def _DefinitionListDefinition; end + + # DefinitionListItem = DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = [] list_items << RDoc::Markup::ListItem.new(label, defns.shift) list_items.concat defns.map { |defn| RDoc::Markup::ListItem.new nil, defn } unless list_items.empty? list_items } + # + # source://rdoc//lib/rdoc/markdown.rb#16383 + def _DefinitionListItem; end + + # DefinitionListLabel = Inline:label @Sp @Newline { label } + # + # source://rdoc//lib/rdoc/markdown.rb#16449 + def _DefinitionListLabel; end + + # Digit = [0-9] + # + # source://rdoc//lib/rdoc/markdown.rb#14691 + def _Digit; end + + # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } + # + # source://rdoc//lib/rdoc/markdown.rb#899 + def _Doc; end + + # Emph = (EmphStar | EmphUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10283 + def _Emph; end + + # EmphStar = "*" !@Whitespace @StartList:a (!"*" Inline:b { a << b } | StrongStar:b { a << b })+ "*" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10319 + def _EmphStar; end + + # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10477 + def _EmphUl; end + + # EmptyTitle = "" + # + # source://rdoc//lib/rdoc/markdown.rb#12086 + def _EmptyTitle; end + + # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) + # + # source://rdoc//lib/rdoc/markdown.rb#9917 + def _Endline; end + + # Entity = (HexEntity | DecEntity | CharEntity):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9880 + def _Entity; end + + # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2687 + def _Enumerator; end + + # Eof = !. + # + # source://rdoc//lib/rdoc/markdown.rb#14542 + def _Eof; end + + # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9841 + def _EscapedChar; end + + # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } + # + # source://rdoc//lib/rdoc/markdown.rb#11147 + def _ExplicitLink; end + + # ExtendedSpecialChar = &{ notes? } "^" + # + # source://rdoc//lib/rdoc/markdown.rb#15184 + def _ExtendedSpecialChar; end + + # Heading = (SetextHeading | AtxHeading) + # + # source://rdoc//lib/rdoc/markdown.rb#1548 + def _Heading; end + + # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14740 + def _HexEntity; end + + # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 } + # + # source://rdoc//lib/rdoc/markdown.rb#1932 + def _HorizontalRule; end + + # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor + # + # source://rdoc//lib/rdoc/markdown.rb#2971 + def _HtmlAnchor; end + + # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl + # + # source://rdoc//lib/rdoc/markdown.rb#14273 + def _HtmlAttribute; end + + # HtmlBlock = < (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#8768 + def _HtmlBlock; end + + # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress + # + # source://rdoc//lib/rdoc/markdown.rb#3137 + def _HtmlBlockAddress; end + + # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote + # + # source://rdoc//lib/rdoc/markdown.rb#3303 + def _HtmlBlockBlockquote; end + + # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter + # + # source://rdoc//lib/rdoc/markdown.rb#3469 + def _HtmlBlockCenter; end + + # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3085 + def _HtmlBlockCloseAddress; end + + # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3251 + def _HtmlBlockCloseBlockquote; end + + # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3417 + def _HtmlBlockCloseCenter; end + + # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6737 + def _HtmlBlockCloseDd; end + + # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3583 + def _HtmlBlockCloseDir; end + + # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3749 + def _HtmlBlockCloseDiv; end + + # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3915 + def _HtmlBlockCloseDl; end + + # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6903 + def _HtmlBlockCloseDt; end + + # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4081 + def _HtmlBlockCloseFieldset; end + + # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4247 + def _HtmlBlockCloseForm; end + + # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7069 + def _HtmlBlockCloseFrameset; end + + # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4413 + def _HtmlBlockCloseH1; end + + # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4579 + def _HtmlBlockCloseH2; end + + # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4745 + def _HtmlBlockCloseH3; end + + # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4911 + def _HtmlBlockCloseH4; end + + # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5077 + def _HtmlBlockCloseH5; end + + # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5243 + def _HtmlBlockCloseH6; end + + # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8552 + def _HtmlBlockCloseHead; end + + # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7235 + def _HtmlBlockCloseLi; end + + # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5409 + def _HtmlBlockCloseMenu; end + + # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5575 + def _HtmlBlockCloseNoframes; end + + # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5741 + def _HtmlBlockCloseNoscript; end + + # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5907 + def _HtmlBlockCloseOl; end + + # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6073 + def _HtmlBlockCloseP; end + + # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6239 + def _HtmlBlockClosePre; end + + # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8397 + def _HtmlBlockCloseScript; end + + # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6405 + def _HtmlBlockCloseTable; end + + # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7401 + def _HtmlBlockCloseTbody; end + + # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7567 + def _HtmlBlockCloseTd; end + + # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7733 + def _HtmlBlockCloseTfoot; end + + # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7899 + def _HtmlBlockCloseTh; end + + # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8065 + def _HtmlBlockCloseThead; end + + # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8231 + def _HtmlBlockCloseTr; end + + # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6571 + def _HtmlBlockCloseUl; end + + # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd + # + # source://rdoc//lib/rdoc/markdown.rb#6789 + def _HtmlBlockDd; end + + # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir + # + # source://rdoc//lib/rdoc/markdown.rb#3635 + def _HtmlBlockDir; end + + # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv + # + # source://rdoc//lib/rdoc/markdown.rb#3801 + def _HtmlBlockDiv; end + + # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl + # + # source://rdoc//lib/rdoc/markdown.rb#3967 + def _HtmlBlockDl; end + + # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt + # + # source://rdoc//lib/rdoc/markdown.rb#6955 + def _HtmlBlockDt; end + + # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset + # + # source://rdoc//lib/rdoc/markdown.rb#4133 + def _HtmlBlockFieldset; end + + # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm + # + # source://rdoc//lib/rdoc/markdown.rb#4299 + def _HtmlBlockForm; end + + # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset + # + # source://rdoc//lib/rdoc/markdown.rb#7121 + def _HtmlBlockFrameset; end + + # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 + # + # source://rdoc//lib/rdoc/markdown.rb#4465 + def _HtmlBlockH1; end + + # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 + # + # source://rdoc//lib/rdoc/markdown.rb#4631 + def _HtmlBlockH2; end + + # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 + # + # source://rdoc//lib/rdoc/markdown.rb#4797 + def _HtmlBlockH3; end + + # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 + # + # source://rdoc//lib/rdoc/markdown.rb#4963 + def _HtmlBlockH4; end + + # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 + # + # source://rdoc//lib/rdoc/markdown.rb#5129 + def _HtmlBlockH5; end + + # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 + # + # source://rdoc//lib/rdoc/markdown.rb#5295 + def _HtmlBlockH6; end + + # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead + # + # source://rdoc//lib/rdoc/markdown.rb#8604 + def _HtmlBlockHead; end + + # HtmlBlockInTags = (HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead) + # + # source://rdoc//lib/rdoc/markdown.rb#8651 + def _HtmlBlockInTags; end + + # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi + # + # source://rdoc//lib/rdoc/markdown.rb#7287 + def _HtmlBlockLi; end + + # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu + # + # source://rdoc//lib/rdoc/markdown.rb#5461 + def _HtmlBlockMenu; end + + # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes + # + # source://rdoc//lib/rdoc/markdown.rb#5627 + def _HtmlBlockNoframes; end + + # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript + # + # source://rdoc//lib/rdoc/markdown.rb#5793 + def _HtmlBlockNoscript; end + + # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl + # + # source://rdoc//lib/rdoc/markdown.rb#5959 + def _HtmlBlockOl; end + + # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3029 + def _HtmlBlockOpenAddress; end + + # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3195 + def _HtmlBlockOpenBlockquote; end + + # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3361 + def _HtmlBlockOpenCenter; end + + # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6681 + def _HtmlBlockOpenDd; end + + # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3527 + def _HtmlBlockOpenDir; end + + # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3693 + def _HtmlBlockOpenDiv; end + + # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3859 + def _HtmlBlockOpenDl; end + + # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6847 + def _HtmlBlockOpenDt; end + + # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4025 + def _HtmlBlockOpenFieldset; end + + # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4191 + def _HtmlBlockOpenForm; end + + # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7013 + def _HtmlBlockOpenFrameset; end + + # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4357 + def _HtmlBlockOpenH1; end + + # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4523 + def _HtmlBlockOpenH2; end + + # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4689 + def _HtmlBlockOpenH3; end + + # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4855 + def _HtmlBlockOpenH4; end + + # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5021 + def _HtmlBlockOpenH5; end + + # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5187 + def _HtmlBlockOpenH6; end + + # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8496 + def _HtmlBlockOpenHead; end + + # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7179 + def _HtmlBlockOpenLi; end + + # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5353 + def _HtmlBlockOpenMenu; end + + # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5519 + def _HtmlBlockOpenNoframes; end + + # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5685 + def _HtmlBlockOpenNoscript; end + + # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5851 + def _HtmlBlockOpenOl; end + + # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6017 + def _HtmlBlockOpenP; end + + # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6183 + def _HtmlBlockOpenPre; end + + # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8341 + def _HtmlBlockOpenScript; end + + # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6349 + def _HtmlBlockOpenTable; end + + # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7345 + def _HtmlBlockOpenTbody; end + + # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7511 + def _HtmlBlockOpenTd; end + + # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7677 + def _HtmlBlockOpenTfoot; end + + # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7843 + def _HtmlBlockOpenTh; end + + # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8009 + def _HtmlBlockOpenThead; end + + # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8175 + def _HtmlBlockOpenTr; end + + # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6515 + def _HtmlBlockOpenUl; end + + # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP + # + # source://rdoc//lib/rdoc/markdown.rb#6125 + def _HtmlBlockP; end + + # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre + # + # source://rdoc//lib/rdoc/markdown.rb#6291 + def _HtmlBlockPre; end + + # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript + # + # source://rdoc//lib/rdoc/markdown.rb#8449 + def _HtmlBlockScript; end + + # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8896 + def _HtmlBlockSelfClosing; end + + # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable + # + # source://rdoc//lib/rdoc/markdown.rb#6457 + def _HtmlBlockTable; end + + # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody + # + # source://rdoc//lib/rdoc/markdown.rb#7453 + def _HtmlBlockTbody; end + + # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd + # + # source://rdoc//lib/rdoc/markdown.rb#7619 + def _HtmlBlockTd; end + + # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot + # + # source://rdoc//lib/rdoc/markdown.rb#7785 + def _HtmlBlockTfoot; end + + # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh + # + # source://rdoc//lib/rdoc/markdown.rb#7951 + def _HtmlBlockTh; end + + # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead + # + # source://rdoc//lib/rdoc/markdown.rb#8117 + def _HtmlBlockThead; end + + # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr + # + # source://rdoc//lib/rdoc/markdown.rb#8283 + def _HtmlBlockTr; end + + # HtmlBlockType = ("ADDRESS" | "BLOCKQUOTE" | "CENTER" | "DD" | "DIR" | "DIV" | "DL" | "DT" | "FIELDSET" | "FORM" | "FRAMESET" | "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "HR" | "ISINDEX" | "LI" | "MENU" | "NOFRAMES" | "NOSCRIPT" | "OL" | "P" | "PRE" | "SCRIPT" | "TABLE" | "TBODY" | "TD" | "TFOOT" | "TH" | "THEAD" | "TR" | "UL" | "address" | "blockquote" | "center" | "dd" | "dir" | "div" | "dl" | "dt" | "fieldset" | "form" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hr" | "isindex" | "li" | "menu" | "noframes" | "noscript" | "ol" | "p" | "pre" | "script" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "ul") + # + # source://rdoc//lib/rdoc/markdown.rb#8951 + def _HtmlBlockType; end + + # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl + # + # source://rdoc//lib/rdoc/markdown.rb#6623 + def _HtmlBlockUl; end + + # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2919 + def _HtmlCloseAnchor; end + + # HtmlComment = "" .)* "-->" + # + # source://rdoc//lib/rdoc/markdown.rb#14415 + def _HtmlComment; end + + # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2863 + def _HtmlOpenAnchor; end + + # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#14462 + def _HtmlTag; end + + # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8828 + def _HtmlUnclosed; end + + # HtmlUnclosedType = ("HR" | "hr") + # + # source://rdoc//lib/rdoc/markdown.rb#8878 + def _HtmlUnclosedType; end + + # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } + # + # source://rdoc//lib/rdoc/markdown.rb#10972 + def _Image; end + + # InStyleTags = StyleOpen (!StyleClose .)* StyleClose + # + # source://rdoc//lib/rdoc/markdown.rb#9281 + def _InStyleTags; end + + # Indent = /\t| / + # + # source://rdoc//lib/rdoc/markdown.rb#14860 + def _Indent; end + + # IndentedLine = Indent Line + # + # source://rdoc//lib/rdoc/markdown.rb#14867 + def _IndentedLine; end + + # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol) + # + # source://rdoc//lib/rdoc/markdown.rb#9586 + def _Inline; end + + # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15431 + def _InlineNote; end + + # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } + # + # source://rdoc//lib/rdoc/markdown.rb#9365 + def _Inlines; end + + # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') } + # + # source://rdoc//lib/rdoc/markdown.rb#11907 + def _Label; end + + # Line = @RawLine:a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#14938 + def _Line; end + + # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } + # + # source://rdoc//lib/rdoc/markdown.rb#10042 + def _LineBreak; end + + # Link = (ExplicitLink | ReferenceLink | AutoLink) + # + # source://rdoc//lib/rdoc/markdown.rb#11011 + def _Link; end + + # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } + # + # source://rdoc//lib/rdoc/markdown.rb#2548 + def _ListBlock; end + + # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#2793 + def _ListBlockLine; end + + # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2592 + def _ListContinuationBlock; end + + # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2392 + def _ListItem; end + + # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2468 + def _ListItemTight; end + + # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2304 + def _ListLoose; end + + # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2239 + def _ListTight; end + + # Newline = %literals.Newline + # + # source://rdoc//lib/rdoc/markdown.rb#14726 + def _Newline; end + + # NonblankIndentedLine = !@BlankLine IndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#1821 + def _NonblankIndentedLine; end + + # NonindentSpace = / {0,3}/ + # + # source://rdoc//lib/rdoc/markdown.rb#14853 + def _NonindentSpace; end + + # Nonspacechar = !@Spacechar !@Newline . + # + # source://rdoc//lib/rdoc/markdown.rb#14552 + def _Nonspacechar; end + + # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . + # + # source://rdoc//lib/rdoc/markdown.rb#14653 + def _NormalChar; end + + # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#9938 + def _NormalEndline; end + + # Note = &{ notes? } @NonindentSpace RawNoteReference:ref ":" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil } + # + # source://rdoc//lib/rdoc/markdown.rb#15333 + def _Note; end + + # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15207 + def _NoteReference; end + + # Notes = (Note | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#15538 + def _Notes; end + + # OptionallyIndentedLine = Indent? Line + # + # source://rdoc//lib/rdoc/markdown.rb#14888 + def _OptionallyIndentedLine; end + + # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2752 + def _OrderedList; end + + # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1014 + def _Para; end + + # Plain = Inlines:a { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1057 + def _Plain; end + + # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") + # + # source://rdoc//lib/rdoc/markdown.rb#14175 + def _Quoted; end + + # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } + # + # source://rdoc//lib/rdoc/markdown.rb#14108 + def _RawHtml; end + + # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#14961 + def _RawLine; end + + # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a } + # + # source://rdoc//lib/rdoc/markdown.rb#15560 + def _RawNoteBlock; end + + # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#15237 + def _RawNoteReference; end + + # RefSrc = < Nonspacechar+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12026 + def _RefSrc; end + + # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) + # + # source://rdoc//lib/rdoc/markdown.rb#12062 + def _RefTitle; end + + # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12185 + def _RefTitleDouble; end + + # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12277 + def _RefTitleParens; end + + # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12093 + def _RefTitleSingle; end + + # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title reference label, link nil } + # + # source://rdoc//lib/rdoc/markdown.rb#11832 + def _Reference; end + + # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) + # + # source://rdoc//lib/rdoc/markdown.rb#11032 + def _ReferenceLink; end + + # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11050 + def _ReferenceLinkDouble; end + + # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11096 + def _ReferenceLinkSingle; end + + # References = (Reference | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#12369 + def _References; end + + # SetextBottom1 = /={1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1262 + def _SetextBottom1; end + + # SetextBottom2 = /-{1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1283 + def _SetextBottom2; end + + # SetextHeading = (SetextHeading1 | SetextHeading2) + # + # source://rdoc//lib/rdoc/markdown.rb#1244 + def _SetextHeading; end + + # SetextHeading1 = &(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1304 + def _SetextHeading1; end + + # SetextHeading2 = &(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1426 + def _SetextHeading2; end + + # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) + # + # source://rdoc//lib/rdoc/markdown.rb#15040 + def _SkipBlock; end + + # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11206 + def _Source; end + + # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* + # + # source://rdoc//lib/rdoc/markdown.rb#11266 + def _SourceContents; end + + # Sp = @Spacechar* + # + # source://rdoc//lib/rdoc/markdown.rb#14584 + def _Sp; end + + # Space = @Spacechar+ { " " } + # + # source://rdoc//lib/rdoc/markdown.rb#9646 + def _Space; end + + # Spacechar = %literals.Spacechar + # + # source://rdoc//lib/rdoc/markdown.rb#14733 + def _Spacechar; end + + # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10129 + def _StarLine; end + + # StartList = &. { [] } + # + # source://rdoc//lib/rdoc/markdown.rb#14914 + def _StartList; end + + # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9678 + def _Str; end + + # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9751 + def _StrChunk; end + + # Strike = &{ strike? } "~~" !@Whitespace @StartList:a (!"~~" Inline:b { a << b })+ "~~" { strike a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10861 + def _Strike; end + + # Strong = (StrongStar | StrongUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10635 + def _Strong; end + + # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10653 + def _StrongStar; end + + # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10757 + def _StrongUl; end + + # StyleBlock = < InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#9328 + def _StyleBlock; end + + # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9229 + def _StyleClose; end + + # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9173 + def _StyleOpen; end + + # Symbol = < @SpecialChar > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#10069 + def _Symbol; end + + # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) } + # + # source://rdoc//lib/rdoc/markdown.rb#15937 + def _Table; end + + # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } + # + # source://rdoc//lib/rdoc/markdown.rb#16304 + def _TableAlign; end + + # TableAlign2 = "|" @Sp TableAlign + # + # source://rdoc//lib/rdoc/markdown.rb#16278 + def _TableAlign2; end + + # TableHead = TableItem2+:items "|"? @Newline { items } + # + # source://rdoc//lib/rdoc/markdown.rb#15993 + def _TableHead; end + + # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } + # + # source://rdoc//lib/rdoc/markdown.rb#16159 + def _TableItem; end + + # TableItem2 = "|" TableItem + # + # source://rdoc//lib/rdoc/markdown.rb#16138 + def _TableItem2; end + + # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line } + # + # source://rdoc//lib/rdoc/markdown.rb#16185 + def _TableLine; end + + # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } + # + # source://rdoc//lib/rdoc/markdown.rb#16045 + def _TableRow; end + + # TerminalEndline = @Sp @Newline @Eof + # + # source://rdoc//lib/rdoc/markdown.rb#10016 + def _TerminalEndline; end + + # Ticks1 = "`" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12391 + def _Ticks1; end + + # Ticks2 = "``" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12415 + def _Ticks2; end + + # Ticks3 = "```" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12439 + def _Ticks3; end + + # Ticks4 = "````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12463 + def _Ticks4; end + + # Ticks5 = "`````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12487 + def _Ticks5; end + + # Title = (TitleSingle | TitleDouble | ""):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#11383 + def _Title; end + + # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" + # + # source://rdoc//lib/rdoc/markdown.rb#11497 + def _TitleDouble; end + + # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" + # + # source://rdoc//lib/rdoc/markdown.rb#11420 + def _TitleSingle; end + + # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10206 + def _UlLine; end + + # UlOrStarLine = (UlLine | StarLine):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#10095 + def _UlOrStarLine; end + + # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } + # + # source://rdoc//lib/rdoc/markdown.rb#1895 + def _Verbatim; end + + # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } + # + # source://rdoc//lib/rdoc/markdown.rb#1845 + def _VerbatimChunk; end + + # Whitespace = (@Spacechar | @Newline) + # + # source://rdoc//lib/rdoc/markdown.rb#10301 + def _Whitespace; end + + # root = Doc + # + # source://rdoc//lib/rdoc/markdown.rb#892 + def _root; end + + # source://rdoc//lib/rdoc/markdown.rb#502 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown.rb#468 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def break_on_newline=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def break_on_newline?; end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def css=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def css?; end + + # source://rdoc//lib/rdoc/markdown.rb#250 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#211 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#234 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#259 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def definition_lists=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def definition_lists?; end + + # Wraps `text` in emphasis for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#683 + def emphasis(text); end + + # :category: Extensions + # + # Enables or disables the extension with `name` + # + # source://rdoc//lib/rdoc/markdown.rb#705 + def extension(name, enable); end + + # :category: Extensions + # + # Is the extension `name` enabled? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markdown.rb#696 + def extension?(name); end + + # source://rdoc//lib/rdoc/markdown.rb#449 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown.rb#371 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown.rb#208 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown.rb#318 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown.rb#323 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown.rb#306 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown.rb#327 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown.rb#393 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown.rb#271 + def get_line(no); end + + # source://rdoc//lib/rdoc/markdown.rb#285 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def github=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def github?; end + + # source://rdoc//lib/rdoc/markdown.rb#535 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def html=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def html?; end + + # Parses `text` in a clone of this parser. This is used for handling nested + # lists the same way as markdown_parser. + # + # source://rdoc//lib/rdoc/markdown.rb#717 + def inner_parse(text); end + + # source://rdoc//lib/rdoc/markdown.rb#267 + def lines; end + + # Finds a link reference for `label` and creates a new link to it with + # `content` as the link text. If `label` was not encountered in the + # reference-gathering parser pass the label and content are reconstructed + # with the linking `text` (usually whitespace). + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#737 + def link_to(content, label = T.unsafe(nil), text = T.unsafe(nil)); end + + # Creates an RDoc::Markup::ListItem by parsing the `unparsed` content from + # the first parsing pass. + # + # source://rdoc//lib/rdoc/markdown.rb#754 + def list_item_from(unparsed); end + + # source://rdoc//lib/rdoc/markdown.rb#373 + def match_string(str); end + + # Stores `label` as a note and fills in previously unknown note references. + # + # source://rdoc//lib/rdoc/markdown.rb#762 + def note(label); end + + # Creates a new link for the footnote `reference` and adds the reference to + # the note order list for proper display at the end of the document. + # + # source://rdoc//lib/rdoc/markdown.rb#776 + def note_for(ref); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def notes=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def notes?; end + + # Creates an RDoc::Markup::Paragraph from `parts` and including + # extension-specific behavior + # + # source://rdoc//lib/rdoc/markdown.rb#793 + def paragraph(parts); end + + # Parses `markdown` into an RDoc::Document + # + # source://rdoc//lib/rdoc/markdown.rb#808 + def parse(markdown); end + + # The internal kpeg parse method + # + # source://rdoc//lib/rdoc/markdown.rb#414 + def peg_parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#221 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#341 + def raise_error; end + + # Stores `label` as a reference to `link` and fills in previously unknown + # link references. + # + # source://rdoc//lib/rdoc/markdown.rb#855 + def reference(label, link); end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#383 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown.rb#364 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown.rb#290 + def set_string(string, pos); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown.rb#887 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown.rb#196 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#345 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#297 + def show_pos; end + + # Wraps `text` in strike markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#877 + def strike(text); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def strike=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def strike?; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown.rb#207 + def string; end + + # Wraps `text` in strong markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#866 + def strong(text); end + + private + + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # TODO remove when kpeg 0.10 is released + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#188 + def orig_initialize(str, debug = T.unsafe(nil)); end + + class << self + # Creates extension methods for the `name` extension to enable and disable + # the extension and to query if they are active. + # + # source://rdoc//lib/rdoc/markdown.rb#603 + def extension(name); end + + # Parses the `markdown` document into an RDoc::Document using the default + # extensions. + # + # source://rdoc//lib/rdoc/markdown.rb#656 + def parse(markdown); end + + # source://rdoc//lib/rdoc/markdown.rb#566 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown.rb#257 +class RDoc::Markdown::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This set of literals is for Ruby 1.9 regular expressions and gives full +# unicode support. +# +# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric +# characters, newlines and spaces. +# +# source://rdoc//lib/rdoc/markdown/literals.rb#11 +class RDoc::Markdown::Literals + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # + # @return [Literals] a new instance of Literals + # + # source://rdoc//lib/rdoc/markdown/literals.rb#17 + def initialize(str, debug = T.unsafe(nil)); end + + # Alphanumeric = /\p{Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#405 + def _Alphanumeric; end + + # AlphanumericAscii = /[A-Za-z0-9]/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#412 + def _AlphanumericAscii; end + + # BOM = "uFEFF" + # + # source://rdoc//lib/rdoc/markdown/literals.rb#419 + def _BOM; end + + # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#426 + def _Newline; end + + # NonAlphanumeric = /\p{^Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#433 + def _NonAlphanumeric; end + + # Spacechar = /\t|\p{Zs}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#440 + def _Spacechar; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#331 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#297 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#79 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#40 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#63 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#88 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#278 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#200 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#37 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#147 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#152 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#135 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#156 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#222 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#100 + def get_line(no); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#114 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#364 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#96 + def lines; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#202 + def match_string(str); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#243 + def parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def pos=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#50 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown/literals.rb#170 + def raise_error; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#212 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#193 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#119 + def set_string(string, pos); end + + # :startdoc: + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown/literals.rb#402 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown/literals.rb#25 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#174 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#126 + def show_pos; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#36 + def string; end + + class << self + # source://rdoc//lib/rdoc/markdown/literals.rb#395 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#86 +class RDoc::Markdown::Literals::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#257 +class RDoc::Markdown::Literals::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown/literals.rb#258 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#267 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#267 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#269 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def set; end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#386 +class RDoc::Markdown::Literals::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown/literals.rb#387 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#392 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#392 + def rendered; end +end + +# source://rdoc//lib/rdoc/markdown.rb#428 +class RDoc::Markdown::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown.rb#429 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#440 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def set; end +end + +# source://rdoc//lib/rdoc/markdown.rb#557 +class RDoc::Markdown::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown.rb#558 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown.rb#563 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown.rb#563 + def rendered; end +end + +# source://rdoc//lib/rdoc/markup.rb#106 +class RDoc::Markup + # Take a block of text and use various heuristics to determine its + # structure (paragraphs, lists, and so on). Invoke an event handler as we + # identify significant chunks. + # + # @return [Markup] a new instance of Markup + # + # source://rdoc//lib/rdoc/markup.rb#146 + def initialize(attribute_manager = T.unsafe(nil)); end + + # Add to the sequences recognized as general markup. + # + # source://rdoc//lib/rdoc/markup.rb#163 + def add_html(tag, name); end + + # Add to other inline sequences. For example, we could add WikiWords using + # something like: + # + # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) + # + # Each wiki word will be presented to the output formatter. + # + # source://rdoc//lib/rdoc/markup.rb#175 + def add_regexp_handling(pattern, name); end + + # Add to the sequences used to add formatting to an individual word (such + # as *bold*). Matching entries will generate attributes that the output + # formatters can recognize by their +name+. + # + # source://rdoc//lib/rdoc/markup.rb#156 + def add_word_pair(start, stop, name); end + + # An AttributeManager which handles inline markup. + # + # source://rdoc//lib/rdoc/markup.rb#111 + def attribute_manager; end + + # We take +input+, parse it if necessary, then invoke the output +formatter+ + # using a Visitor to render the result. + # + # source://rdoc//lib/rdoc/markup.rb#183 + def convert(input, formatter); end + + class << self + # Parses +str+ into an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/markup.rb#116 + def parse(str); end + end +end + +# An AttrChanger records a change in attributes. It contains a bitmap of the +# attributes to turn on, and a bitmap of those to turn off. +# +# source://rdoc//lib/rdoc/markup/attr_changer.rb#4 +class RDoc::Markup::AttrChanger < ::Struct + # source://rdoc//lib/rdoc/markup/attr_changer.rb#18 + def inspect; end + + # source://rdoc//lib/rdoc/markup/attr_changer.rb#14 + def to_s; end +end + +# An array of attributes which parallels the characters in a string. +# +# source://rdoc//lib/rdoc/markup/attr_span.rb#5 +class RDoc::Markup::AttrSpan + # Creates a new AttrSpan for +length+ characters + # + # @return [AttrSpan] a new instance of AttrSpan + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#10 + def initialize(length, exclusive); end + + # Accesses flags for character +n+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#31 + def [](n); end + + # Toggles +bits+ from +start+ to +length+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#17 + def set_attrs(start, length, bits); end +end + +# Manages changes of attributes in a block of text +# +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#6 +class RDoc::Markup::AttributeManager + # Creates a new attribute manager that understands bold, emphasized and + # teletype text. + # + # @return [AttributeManager] a new instance of AttributeManager + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#80 + def initialize; end + + # Adds a markup class with +name+ for words surrounded by HTML tag +tag+. + # To process emphasis tags: + # + # am.add_html 'em', :EM + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#286 + def add_html(tag, name, exclusive = T.unsafe(nil)); end + + # Adds a regexp handling for +pattern+ with +name+. A simple URL handler + # would be: + # + # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#298 + def add_regexp_handling(pattern, name, exclusive = T.unsafe(nil)); end + + # Adds a markup class with +name+ for words wrapped in the +start+ and + # +stop+ character. To make words wrapped with "*" bold: + # + # am.add_word_pair '*', '*', :BOLD + # + # @raise [ArgumentError] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#261 + def add_word_pair(start, stop, name, exclusive = T.unsafe(nil)); end + + # Return an attribute object with the given turn_on and turn_off bits set + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#103 + def attribute(turn_on, turn_off); end + + # The attributes enabled for this markup object. + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#40 + def attributes; end + + # Changes the current attribute from +current+ to +new+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#110 + def change_attribute(current, new); end + + # Used by the tests to change attributes by name from +current_set+ to + # +new_set+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#119 + def changed_attribute_by_name(current_set, new_set); end + + # Map attributes like textto the sequence + # \001\002\001\003, where is a per-attribute specific + # character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#154 + def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#160 + def convert_attrs_matching_word_pairs(str, attrs, exclusive); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#185 + def convert_attrs_word_pair_map(str, attrs, exclusive); end + + # Converts HTML tags to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#206 + def convert_html(str, attrs, exclusive = T.unsafe(nil)); end + + # Converts regexp handling sequences to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#223 + def convert_regexp_handlings(str, attrs, exclusive = T.unsafe(nil)); end + + # Copies +start_pos+ to +end_pos+ from the current string + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#135 + def copy_string(start_pos, end_pos); end + + # Debug method that prints a string along with its attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#329 + def display_attributes; end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#142 + def exclusive?(attr); end + + # A bits of exclusive maps + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#74 + def exclusive_bitmap; end + + # Processes +str+ converting attributes, HTML and regexp handlings + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#307 + def flow(str); end + + # This maps HTML tags to the corresponding attribute char + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#58 + def html_tags; end + + # Escapes regexp handling sequences of text to prevent conversion to RDoc + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#239 + def mask_protected_sequences; end + + # This maps delimiters that occur around words (such as *bold* or +tt+) + # where the start and end delimiters and the same. This lets us optimize + # the regexp + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#47 + def matching_word_pairs; end + + # A \ in front of a character that would normally be processed turns off + # processing. We do this by turning \< into <#{PROTECT} + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#64 + def protectable; end + + # And this maps _regexp handling_ sequences to a name. A regexp handling + # sequence is something like a WikiWord + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#70 + def regexp_handlings; end + + # Splits the string into chunks by attribute change + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#354 + def split_into_flow; end + + # Unescapes regexp handling sequences of text + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#251 + def unmask_protected_sequences; end + + # And this is used when the delimiters aren't the same. In this case the + # hash maps a pattern to the attribute character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#53 + def word_pair_map; end +end + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#147 +RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#146 +RDoc::Markup::AttributeManager::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# We manage a set of attributes. Each attribute has a symbol name and a bit +# value. +# +# source://rdoc//lib/rdoc/markup/attributes.rb#6 +class RDoc::Markup::Attributes + # Creates a new attributes set. + # + # @return [Attributes] a new instance of Attributes + # + # source://rdoc//lib/rdoc/markup/attributes.rb#16 + def initialize; end + + # Returns a string representation of +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#46 + def as_string(bitmap); end + + # Returns a unique bit for +name+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#29 + def bitmap_for(name); end + + # yields each attribute name in +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#60 + def each_name_of(bitmap); end + + # The regexp handling attribute type. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/attributes.rb#11 + def regexp_handling; end +end + +# An empty line. This class is a singleton. +# +# source://rdoc//lib/rdoc/markup/blank_line.rb#5 +class RDoc::Markup::BlankLine + # Calls #accept_blank_line on +visitor+ + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/blank_line.rb#23 + def pretty_print(q); end + + class << self + # RDoc::Markup::BlankLine is a singleton + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#12 + def new; end + end +end + +# A quoted section which contains markup items. +# +# source://rdoc//lib/rdoc/markup/block_quote.rb#5 +class RDoc::Markup::BlockQuote < ::RDoc::Markup::Raw + # Calls #accept_block_quote on +visitor+ + # + # source://rdoc//lib/rdoc/markup/block_quote.rb#10 + def accept(visitor); end +end + +# A Document containing lists, headings, paragraphs, etc. +# +# source://rdoc//lib/rdoc/markup/document.rb#5 +class RDoc::Markup::Document + include ::Enumerable + + # Creates a new Document with +parts+ + # + # @return [Document] a new instance of Document + # + # source://rdoc//lib/rdoc/markup/document.rb#29 + def initialize(*parts); end + + # Appends +part+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#40 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/document.rb#56 + def ==(other); end + + # Runs this document and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/document.rb#65 + def accept(visitor); end + + # Concatenates the given +parts+ onto the document + # + # source://rdoc//lib/rdoc/markup/document.rb#76 + def concat(parts); end + + # Enumerator for the parts of this document + # + # source://rdoc//lib/rdoc/markup/document.rb#83 + def each(&block); end + + # Does this document have no parts? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#90 + def empty?; end + + # The file this document was created from. See also + # RDoc::ClassModule#add_comment + # + # source://rdoc//lib/rdoc/markup/document.rb#13 + def file; end + + # The file this Document was created from. + # + # source://rdoc//lib/rdoc/markup/document.rb#97 + def file=(location); end + + # When this is a collection of documents (#file is not set and this document + # contains only other documents as its direct children) #merge replaces + # documents in this class with documents from +other+ when the file matches + # and adds documents from +other+ when the files do not. + # + # The information in +other+ is preferred over the receiver + # + # source://rdoc//lib/rdoc/markup/document.rb#114 + def merge(other); end + + # Does this Document contain other Documents? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#134 + def merged?; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below=(_arg0); end + + # The parts of the Document + # + # source://rdoc//lib/rdoc/markup/document.rb#24 + def parts; end + + # source://rdoc//lib/rdoc/markup/document.rb#138 + def pretty_print(q); end + + # Appends +parts+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#151 + def push(*parts); end + + # Returns an Array of headings in the document. + # + # Require 'rdoc/markup/formatter' before calling this method. + # + # source://rdoc//lib/rdoc/markup/document.rb#160 + def table_of_contents; end +end + +# Base class for RDoc markup formatters +# +# Formatters are a visitor that converts an RDoc::Markup tree (from a comment) +# into some kind of output. RDoc ships with formatters for converting back to +# rdoc, ANSI text, HTML, a Table of Contents and other formats. +# +# If you'd like to write your own Formatter use +# RDoc::Markup::FormatterTestCase. If you're writing a text-output formatter +# use RDoc::Markup::TextFormatterTestCase which provides extra test cases. +# +# source://rdoc//lib/rdoc/markup/formatter.rb#13 +class RDoc::Markup::Formatter + # Creates a new Formatter + # + # @return [Formatter] a new instance of Formatter + # + # source://rdoc//lib/rdoc/markup/formatter.rb#48 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +document+ to the output + # + # source://rdoc//lib/rdoc/markup/formatter.rb#69 + def accept_document(document); end + + # Adds a regexp handling for links of the form rdoc-...: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#83 + def add_regexp_handling_RDOCLINK; end + + # Adds a regexp handling for links of the form {}[] and + # [] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#91 + def add_regexp_handling_TIDYLINK; end + + # Add a new set of tags for an attribute. We allow separate start and end + # tags for flexibility + # + # source://rdoc//lib/rdoc/markup/formatter.rb#105 + def add_tag(name, start, stop); end + + # Allows +tag+ to be decorated with additional information. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#113 + def annotate(tag); end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#120 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#127 + def convert_flow(flow); end + + # Converts added regexp handlings. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/formatter.rb#150 + def convert_regexp_handling(target); end + + # Converts a string to be fancier if desired + # + # source://rdoc//lib/rdoc/markup/formatter.rb#176 + def convert_string(string); end + + # Use ignore in your subclass to ignore the content of a node. + # + # ## + # # We don't support raw nodes in ToNoRaw + # + # alias accept_raw ignore + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def ignore(*node); end + + # Are we currently inside tt tags? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#194 + def in_tt?; end + + # Turns off tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#216 + def off_tags(res, item); end + + # Turns on tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#201 + def on_tags(res, item); end + + # Extracts and a scheme, url and an anchor id from +url+ and returns them. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#231 + def parse_url(url); end + + # Is +tag+ a tt tag? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#261 + def tt?(tag); end + + class << self + # Converts a target url to one that is relative to a given path + # + # source://rdoc//lib/rdoc/markup/formatter.rb#24 + def gen_relative_url(path, target); end + end +end + +# A hard-break in the middle of a paragraph. +# +# source://rdoc//lib/rdoc/markup/hard_break.rb#5 +class RDoc::Markup::HardBreak + # source://rdoc//lib/rdoc/markup/hard_break.rb#23 + def ==(other); end + + # Calls #accept_hard_break on +visitor+ + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/hard_break.rb#27 + def pretty_print(q); end + + class << self + # RDoc::Markup::HardBreak is a singleton + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#12 + def new; end + end +end + +# source://rdoc//lib/rdoc/markup/heading.rb#6 +class RDoc::Markup::Heading < ::Struct + # source://rdoc//lib/rdoc/markup/heading.rb#40 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/heading.rb#47 + def aref; end + + # source://rdoc//lib/rdoc/markup/heading.rb#55 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/heading.rb#68 + def plain_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#72 + def pretty_print(q); end + + class << self + # source://rdoc//lib/rdoc/markup/heading.rb#22 + def to_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#14 + def to_label; end + end +end + +# A file included at generation time. Objects of this class are created by +# RDoc::RD for an extension-less include. +# +# This implementation in incomplete. +# +# source://rdoc//lib/rdoc/markup/include.rb#8 +class RDoc::Markup::Include + # Creates a new include that will import +file+ from +include_path+ + # + # @return [Include] a new instance of Include + # + # source://rdoc//lib/rdoc/markup/include.rb#23 + def initialize(file, include_path); end + + # source://rdoc//lib/rdoc/markup/include.rb#28 + def ==(other); end + + # The filename to be included, without extension + # + # source://rdoc//lib/rdoc/markup/include.rb#13 + def file; end + + # Directories to search for #file + # + # source://rdoc//lib/rdoc/markup/include.rb#18 + def include_path; end + + # source://rdoc//lib/rdoc/markup/include.rb#33 + def pretty_print(q); end +end + +# An Indented Paragraph of text +# +# source://rdoc//lib/rdoc/markup/indented_paragraph.rb#5 +class RDoc::Markup::IndentedParagraph < ::RDoc::Markup::Raw + # Creates a new IndentedParagraph containing +parts+ indented with +indent+ + # spaces + # + # @return [IndentedParagraph] a new instance of IndentedParagraph + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#16 + def initialize(indent, *parts); end + + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#22 + def ==(other); end + + # Calls #accept_indented_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#29 + def accept(visitor); end + + # The indent in number of spaces + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#10 + def indent; end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text followed by the indent. + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#37 + def text(hard_break = T.unsafe(nil)); end +end + +# A List is a homogeneous set of ListItems. +# +# The supported list types include: +# +# :BULLET:: +# An unordered list +# :LABEL:: +# An unordered definition list, but using an alternate RDoc::Markup syntax +# :LALPHA:: +# An ordered list using increasing lowercase English letters +# :NOTE:: +# An unordered definition list +# :NUMBER:: +# An ordered list using increasing Arabic numerals +# :UALPHA:: +# An ordered list using increasing uppercase English letters +# +# Definition lists behave like HTML definition lists. Each list item can +# describe multiple terms. See RDoc::Markup::ListItem for how labels and +# definition are stored as list items. +# +# source://rdoc//lib/rdoc/markup/list.rb#24 +class RDoc::Markup::List + # Creates a new list of +type+ with +items+. Valid list types are: + # +:BULLET+, +:LABEL+, +:LALPHA+, +:NOTE+, +:NUMBER+, +:UALPHA+ + # + # @return [List] a new instance of List + # + # source://rdoc//lib/rdoc/markup/list.rb#40 + def initialize(type = T.unsafe(nil), *items); end + + # Appends +item+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#49 + def <<(item); end + + # source://rdoc//lib/rdoc/markup/list.rb#53 + def ==(other); end + + # Runs this list and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list.rb#62 + def accept(visitor); end + + # Is the list empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list.rb#75 + def empty?; end + + # Items in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#34 + def items; end + + # Returns the last item in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#82 + def last; end + + # source://rdoc//lib/rdoc/markup/list.rb#86 + def pretty_print(q); end + + # Appends +items+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#97 + def push(*items); end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type; end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type=(_arg0); end +end + +# An item within a List that contains paragraphs, headings, etc. +# +# For BULLET, NUMBER, LALPHA and UALPHA lists, the label will always be nil. +# For NOTE and LABEL lists, the list label may contain: +# +# * a single String for a single label +# * an Array of Strings for a list item with multiple terms +# * nil for an extra description attached to a previously labeled list item +# +# source://rdoc//lib/rdoc/markup/list_item.rb#12 +class RDoc::Markup::ListItem + # Creates a new ListItem with an optional +label+ containing +parts+ + # + # @return [ListItem] a new instance of ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#27 + def initialize(label = T.unsafe(nil), *parts); end + + # Appends +part+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#36 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/list_item.rb#40 + def ==(other); end + + # Runs this list item and all its #parts through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list_item.rb#49 + def accept(visitor); end + + # Is the ListItem empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list_item.rb#62 + def empty?; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label=(_arg0); end + + # Length of parts in the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#69 + def length; end + + # Parts of the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#22 + def parts; end + + # source://rdoc//lib/rdoc/markup/list_item.rb#73 + def pretty_print(q); end + + # Adds +parts+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#95 + def push(*parts); end +end + +# A Paragraph of text +# +# source://rdoc//lib/rdoc/markup/paragraph.rb#5 +class RDoc::Markup::Paragraph < ::RDoc::Markup::Raw + # Calls #accept_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#10 + def accept(visitor); end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text. + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#18 + def text(hard_break = T.unsafe(nil)); end +end + +# A recursive-descent parser for RDoc markup. +# +# The parser tokenizes an input string then parses the tokens into a Document. +# Documents can be converted into output formats by writing a visitor like +# RDoc::Markup::ToHTML. +# +# The parser only handles the block-level constructs Paragraph, List, +# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote. +# Inline markup such as \+blah\+ is handled separately by +# RDoc::Markup::AttributeManager. +# +# To see what markup the Parser implements read RDoc. To see how to use +# RDoc markup to format text in your program read RDoc::Markup. +# +# source://rdoc//lib/rdoc/markup/parser.rb#19 +class RDoc::Markup::Parser + include ::RDoc::Text + + # Creates a new Parser. See also ::parse + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/markup/parser.rb#79 + def initialize; end + + # Builds a Heading of +level+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#90 + def build_heading(level); end + + # Builds a List flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#108 + def build_list(margin); end + + # Builds a Paragraph that is flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#208 + def build_paragraph(margin); end + + # Builds a Verbatim that is indented from +margin+. + # + # The verbatim block is shifted left (the least indented lines start in + # column 0). Each part of the verbatim is one line of text, always + # terminated by a newline. Blank lines always consist of a single newline + # character, and there is never a single newline at the end of the verbatim. + # + # source://rdoc//lib/rdoc/markup/parser.rb#243 + def build_verbatim(margin); end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug; end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug=(_arg0); end + + # Pulls the next token from the stream. + # + # source://rdoc//lib/rdoc/markup/parser.rb#327 + def get; end + + # Parses the tokens into an array of RDoc::Markup::XXX objects, + # and appends them to the passed +parent+ RDoc::Markup::YYY object. + # + # Exits at the end of the token stream, or when it encounters a token + # in a column less than +indent+ (unless it is a NEWLINE). + # + # Returns +parent+. + # + # source://rdoc//lib/rdoc/markup/parser.rb#342 + def parse(parent, indent = T.unsafe(nil)); end + + # Small hook that is overridden by RDoc::TomDoc + # + # source://rdoc//lib/rdoc/markup/parser.rb#406 + def parse_text(parent, indent); end + + # Returns the next token on the stream without modifying the stream + # + # source://rdoc//lib/rdoc/markup/parser.rb#413 + def peek_token; end + + # Creates the StringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#468 + def setup_scanner(input); end + + # Skips the next token if its type is +token_type+. + # + # Optionally raises an error if the next token is not of the expected type. + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markup/parser.rb#477 + def skip(token_type, error = T.unsafe(nil)); end + + # Turns text +input+ into a stream of tokens + # + # source://rdoc//lib/rdoc/markup/parser.rb#488 + def tokenize(input); end + + # Token accessor + # + # source://rdoc//lib/rdoc/markup/parser.rb#53 + def tokens; end + + # Returns the current token to the token stream + # + # @raise [Error] + # + # source://rdoc//lib/rdoc/markup/parser.rb#578 + def unget; end + + class << self + # Parses +str+ into a Document. + # + # Use RDoc::Markup#parse instead of this method. + # + # source://rdoc//lib/rdoc/markup/parser.rb#60 + def parse(str); end + + # Returns a token stream for +str+, for testing + # + # source://rdoc//lib/rdoc/markup/parser.rb#70 + def tokenize(str); end + end +end + +# A simple wrapper of StringScanner that is aware of the current column and lineno +# +# source://rdoc//lib/rdoc/markup/parser.rb#422 +class RDoc::Markup::Parser::MyStringScanner + # :stopdoc: + # + # @return [MyStringScanner] a new instance of MyStringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#425 + def initialize(input); end + + # source://rdoc//lib/rdoc/markup/parser.rb#458 + def [](i); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/parser.rb#450 + def eos?; end + + # source://rdoc//lib/rdoc/markup/parser.rb#454 + def matched; end + + # source://rdoc//lib/rdoc/markup/parser.rb#445 + def newline!; end + + # source://rdoc//lib/rdoc/markup/parser.rb#441 + def pos; end + + # source://rdoc//lib/rdoc/markup/parser.rb#430 + def scan(re); end + + # source://rdoc//lib/rdoc/markup/parser.rb#436 + def unscan(s); end +end + +# Handle common directives that can occur in a block of text: +# +# \:include: filename +# +# Directives can be escaped by preceding them with a backslash. +# +# RDoc plugin authors can register additional directives to be handled by +# using RDoc::Markup::PreProcess::register. +# +# Any directive that is not built-in to RDoc (including those registered via +# plugins) will be stored in the metadata hash on the CodeObject the comment +# is attached to. See RDoc::Markup@Directives for the list of built-in +# directives. +# +# source://rdoc//lib/rdoc/markup/pre_process.rb#17 +class RDoc::Markup::PreProcess + # Creates a new pre-processor for +input_file_name+ that will look for + # included files in +include_path+ + # + # @return [PreProcess] a new instance of PreProcess + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#78 + def initialize(input_file_name, include_path); end + + # Look for the given file in the directory containing the current file, + # and then in each of the directories specified in the RDOC_INCLUDE path + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#288 + def find_include_file(name); end + + # Look for directives in the given +text+. + # + # Options that we don't handle are yielded. If the block returns false the + # directive is restored to the text. If the block returns nil or no block + # was given the directive is handled according to the registered directives. + # If a String was returned the directive is replaced with the string. + # + # If no matching directive was registered the directive is restored to the + # text. + # + # If +code_object+ is given and the directive is unknown then the + # directive's parameter is set as metadata on the +code_object+. See + # RDoc::CodeObject#metadata for details. + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#99 + def handle(text, code_object = T.unsafe(nil), &block); end + + # Performs the actions described by +directive+ and its parameter +param+. + # + # +code_object+ is used for directives that operate on a class or module. + # +prefix+ is used to ensure the replacement for handled directives is + # correct. +encoding+ is used for the include directive. + # + # For a list of directives in RDoc see RDoc::Markup. + # -- + # When 1.8.7 support is ditched prefix can be defaulted to '' + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#150 + def handle_directive(prefix, directive, param, code_object = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Handles the :include: _filename_ directive. + # + # If the first line of the included file starts with '#', and contains + # an encoding information in the form 'coding:' or 'coding=', it is + # removed. + # + # If all lines in the included file start with a '#', this leading '#' + # is removed before inclusion. The included content is indented like + # the :include: directive. + # -- + # so all content will be verbatim because of the likely space after '#'? + # TODO shift left the whole file content in that case + # TODO comment stop/start #-- and #++ in included file must be processed here + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#262 + def include_file(name, indent, encoding); end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options; end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options=(_arg0); end + + class << self + # Adds a post-process handler for directives. The handler will be called + # with the result RDoc::Comment (or text String) and the code object for the + # comment (if any). + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#30 + def post_process(&block); end + + # Registered post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#37 + def post_processors; end + + # Registers +directive+ as one handled by RDoc. If a block is given the + # directive will be replaced by the result of the block, otherwise the + # directive will be removed from the processed text. + # + # The block will be called with the directive name and the directive + # parameter: + # + # RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| + # # replace text, etc. + # end + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#53 + def register(directive, &block); end + + # Registered directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#60 + def registered; end + + # Clears all registered directives and post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#67 + def reset; end + end +end + +# A section of text that is added to the output document as-is +# +# source://rdoc//lib/rdoc/markup/raw.rb#5 +class RDoc::Markup::Raw + # Creates a new Raw containing +parts+ + # + # @return [Raw] a new instance of Raw + # + # source://rdoc//lib/rdoc/markup/raw.rb#15 + def initialize(*parts); end + + # Appends +text+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#23 + def <<(text); end + + # source://rdoc//lib/rdoc/markup/raw.rb#27 + def ==(other); end + + # Calls #accept_raw+ on +visitor+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#34 + def accept(visitor); end + + # Appends +other+'s parts + # + # source://rdoc//lib/rdoc/markup/raw.rb#41 + def merge(other); end + + # The component parts of the list + # + # source://rdoc//lib/rdoc/markup/raw.rb#10 + def parts; end + + # source://rdoc//lib/rdoc/markup/raw.rb#45 + def pretty_print(q); end + + # Appends +texts+ onto this Paragraph + # + # source://rdoc//lib/rdoc/markup/raw.rb#58 + def push(*texts); end + + # The raw text + # + # source://rdoc//lib/rdoc/markup/raw.rb#65 + def text; end +end + +# Hold details of a regexp handling sequence +# +# source://rdoc//lib/rdoc/markup/regexp_handling.rb#5 +class RDoc::Markup::RegexpHandling + # Creates a new regexp handling sequence of +type+ with +text+ + # + # @return [RegexpHandling] a new instance of RegexpHandling + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#20 + def initialize(type, text); end + + # Regexp handlings are equal when the have the same text and type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#27 + def ==(o); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#31 + def inspect; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text=(_arg0); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#36 + def to_s; end + + # Regexp handling type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#10 + def type; end +end + +# A horizontal rule with a weight +# +# source://rdoc//lib/rdoc/markup/rule.rb#5 +class RDoc::Markup::Rule < ::Struct + # Calls #accept_rule on +visitor+ + # + # source://rdoc//lib/rdoc/markup/rule.rb#10 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/rule.rb#14 + def pretty_print(q); end +end + +# A section of table +# +# source://rdoc//lib/rdoc/markup/table.rb#5 +class RDoc::Markup::Table + # Creates new instance + # + # @return [Table] a new instance of Table + # + # source://rdoc//lib/rdoc/markup/table.rb#16 + def initialize(header, align, body); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markup/table.rb#21 + def ==(other); end + + # source://rdoc//lib/rdoc/markup/table.rb#28 + def accept(visitor); end + + # alignments of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#10 + def align; end + + # alignments of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#10 + def align=(_arg0); end + + # body texts of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#13 + def body; end + + # body texts of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#13 + def body=(_arg0); end + + # headers of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#7 + def header; end + + # headers of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#7 + def header=(_arg0); end + + # source://rdoc//lib/rdoc/markup/table.rb#32 + def pretty_print(q); end +end + +# Outputs RDoc markup with vibrant ANSI color! +# +# source://rdoc//lib/rdoc/markup/to_ansi.rb#5 +class RDoc::Markup::ToAnsi < ::RDoc::Markup::ToRdoc + # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color! + # + # @return [ToAnsi] a new instance of ToAnsi + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#10 + def initialize(markup = T.unsafe(nil)); end + + # Overrides indent width to ensure output lines up correctly. + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#31 + def accept_list_item_end(list_item); end + + # Adds coloring to note and label list items + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#55 + def accept_list_item_start(list_item); end + + # Maps attributes to ANSI sequences + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#22 + def init_tags; end + + # Starts accepting with a reset screen + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#87 + def start_accepting; end +end + +# Outputs RDoc markup with hot backspace action! You will probably need a +# pager to use this output format. +# +# This formatter won't work on 1.8.6 because it lacks String#chars. +# +# source://rdoc//lib/rdoc/markup/to_bs.rb#8 +class RDoc::Markup::ToBs < ::RDoc::Markup::ToRdoc + # Returns a new ToBs that is ready for hot backspace action! + # + # @return [ToBs] a new instance of ToBs + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#13 + def initialize(markup = T.unsafe(nil)); end + + # Makes heading text bold. + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#33 + def accept_heading(heading); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#46 + def accept_list_item_start(list_item); end + + # Turns on or off regexp handling for +convert_string+ + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#71 + def annotate(tag); end + + # Calls convert_string on the result of convert_regexp_handling + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#84 + def convert_regexp_handling(target); end + + # Adds bold or underline mixed with backspaces + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#91 + def convert_string(string); end + + # Sets a flag that is picked up by #annotate to do the right thing in + # #convert_string + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#24 + def init_tags; end +end + +# Outputs RDoc markup as HTML. +# +# source://rdoc//lib/rdoc/markup/to_html.rb#7 +class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter + include ::RDoc::Text + + # Creates a new formatter that will output HTML + # + # @return [ToHtml] a new instance of ToHtml + # + # source://rdoc//lib/rdoc/markup/to_html.rb#45 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#291 + def accept_blank_line(blank_line); end + + # Adds +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#190 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output. The headings greater than 6 are trimmed to + # level 6. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#299 + def accept_heading(heading); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#262 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#284 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#273 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#253 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#203 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#320 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#246 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#327 + def accept_table(header, body, aligns); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#216 + def accept_verbatim(verbatim); end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object; end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object=(_arg0); end + + # CGI-escapes +text+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#352 + def convert_string(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#183 + def end_accepting; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path=(_arg0); end + + # Generate a link to +url+ with content +text+. Handles the special cases + # for img: and link: described under handle_regexp_HYPERLINK + # + # source://rdoc//lib/rdoc/markup/to_html.rb#360 + def gen_url(url, text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#85 + def handle_RDOCLINK(url); end + + # +target+ is a
    + # + # source://rdoc//lib/rdoc/markup/to_html.rb#110 + def handle_regexp_HARD_BREAK(target); end + + # +target+ is a potential link. The following schemes are handled: + # + # mailto::: + # Inserted as-is. + # http::: + # Links are checked to see if they reference an image. If so, that image + # gets inserted using an tag. Otherwise a conventional + # is used. + # link::: + # Reference to a local file relative to the output directory. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#126 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # + # For the +rdoc-ref+ scheme the named reference will be returned without + # creating a link. + # + # For the +rdoc-label+ scheme the footnote and label prefixes are stripped + # when creating a link. All other contents will be linked verbatim. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#141 + def handle_regexp_RDOCLINK(target); end + + # This +target+ is a link where the label is different from the URL + # label[url] or {long label}[url] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#149 + def handle_regexp_TIDYLINK(target); end + + # Determines the HTML list element for +list_type+ and +open_tag+ + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#385 + def html_list_name(list_type, open_tag); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#26 + def in_list_entry; end + + # Adds regexp handlings about link notations. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#80 + def init_link_notation_regexp_handlings; end + + # Adds regexp handlings. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#70 + def init_regexp_handlings; end + + # Maps attributes to HTML tags + # + # source://rdoc//lib/rdoc/markup/to_html.rb#394 + def init_tags; end + + # source://rdoc//lib/rdoc/markup/to_html.rb#27 + def list; end + + # Returns the HTML end-tag for +list_type+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#420 + def list_end_for(list_type); end + + # Returns the HTML tag for +list_type+, possible using a label from + # +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#404 + def list_item_start(list_item, list_type); end + + # Returns true if text is valid ruby syntax + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#434 + def parseable?(text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#25 + def res; end + + # Prepares the visitor for HTML generation + # + # source://rdoc//lib/rdoc/markup/to_html.rb#174 + def start_accepting; end + + # Converts +item+ to HTML using RDoc::Text#to_html + # + # source://rdoc//lib/rdoc/markup/to_html.rb#448 + def to_html(item); end +end + +# source://rdoc//lib/rdoc/markup/to_html.rb#65 +RDoc::Markup::ToHtml::URL_CHARACTERS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Subclass of the RDoc::Markup::ToHtml class that supports looking up method +# names, classes, etc to create links. RDoc::CrossReference is used to +# generate those links based on the current context. +# +# source://rdoc//lib/rdoc/markup/to_html_crossref.rb#7 +class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml + # Creates a new crossref resolver that generates links relative to +context+ + # which lives at +from_path+ in the generated files. '#' characters on + # references are removed unless +show_hash+ is true. Only method names + # preceded by '#' or '::' are linked, unless +hyperlink_all+ is true. + # + # @raise [ArgumentError] + # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#32 + def initialize(options, from_path, context, markup = T.unsafe(nil)); end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context; end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context=(_arg0); end + + # Creates a link to the reference +name+ if the name exists. If +text+ is + # given it is used as the link text, otherwise +name+ is used. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#61 + def cross_reference(name, text = T.unsafe(nil), code = T.unsafe(nil)); end + + # Generates links for rdoc-ref: scheme URLs and allows + # RDoc::Markup::ToHtml to handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#131 + def gen_url(url, text); end + + # We're invoked when any text matches the CROSSREF pattern. If we find the + # corresponding reference, generate a link. If the name we're looking for + # contains no punctuation, we look for it up the module/class chain. For + # example, ToHtml is found, even without the RDoc::Markup:: prefix, + # because we look for it in module Markup first. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#83 + def handle_regexp_CROSSREF(target); end + + # Handles rdoc-ref: scheme links and allows RDoc::Markup::ToHtml to + # handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#102 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # For the rdoc-ref scheme the cross-reference will be looked up and the + # given name will be used. + # + # All other contents are handled by + # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#116 + def handle_regexp_RDOCLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#46 + def init_link_notation_regexp_handlings; end + + # Creates an HTML link to +name+ with the given +text+. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#141 + def link(name, text, code = T.unsafe(nil)); end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash; end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash=(_arg0); end +end + +# Outputs RDoc markup as paragraphs with inline markup only. +# +# source://rdoc//lib/rdoc/markup/to_html_snippet.rb#5 +class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml + # Creates a new ToHtmlSnippet formatter that will cut off the input on the + # next word boundary after the given number of +characters+ or +paragraphs+ + # of text have been encountered. + # + # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#37 + def initialize(options, characters = T.unsafe(nil), paragraphs = T.unsafe(nil), markup = T.unsafe(nil)); end + + # Adds +heading+ to the output as a paragraph + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#53 + def accept_heading(heading); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#85 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#91 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#98 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#72 + def accept_paragraph(paragraph); end + + # Raw sections are untrusted and ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # Rules are ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#107 + def accept_verbatim(verbatim); end + + # Throws +:done+ when paragraph_limit paragraphs have been encountered + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#198 + def add_paragraph; end + + # After this many characters the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#10 + def character_limit; end + + # The number of characters seen so far. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#15 + def characters; end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#207 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#218 + def convert_flow(flow); end + + # Returns just the text of +link+, +url+ is only used to determine the link + # type. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#171 + def gen_url(url, text); end + + # Removes escaping from the cross-references in +target+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#131 + def handle_regexp_CROSSREF(target); end + + # +target+ is a
    + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#138 + def handle_regexp_HARD_BREAK(target); end + + # In snippets, there are no lists + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#191 + def html_list_name(list_type, open_tag); end + + # Lists are paragraphs, but notes and labels have a separator + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#146 + def list_item_start(list_item, list_type); end + + # The attribute bitmask + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#20 + def mask; end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#264 + def off_tags(res, item); end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#254 + def on_tags(res, item); end + + # After this many paragraphs the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#25 + def paragraph_limit; end + + # Count of paragraphs found + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#30 + def paragraphs; end + + # Prepares the visitor for HTML snippet generation + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#122 + def start_accepting; end + + # Truncates +text+ at the end of the first word after the character_limit. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#273 + def truncate(text); end +end + +# Joins the parts of an RDoc::Markup::Paragraph into a single String. +# +# This allows for easier maintenance and testing of Markdown support. +# +# This formatter only works on Paragraph instances. Attempting to process +# other markup syntax items will not work. +# +# source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#10 +class RDoc::Markup::ToJoinedParagraph < ::RDoc::Markup::Formatter + # @return [ToJoinedParagraph] a new instance of ToJoinedParagraph + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#12 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # Converts the parts of +paragraph+ to a single entry. + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#25 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#19 + def end_accepting; end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#16 + def start_accepting; end +end + +# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are +# converted to their link part and cross-reference links have the suppression +# marks removed (\\SomeClass is converted to SomeClass). +# +# source://rdoc//lib/rdoc/markup/to_label.rb#9 +class RDoc::Markup::ToLabel < ::RDoc::Markup::Formatter + # Creates a new formatter that will output HTML-safe labels + # + # @return [ToLabel] a new instance of ToLabel + # + # source://rdoc//lib/rdoc/markup/to_label.rb#16 + def initialize(markup = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Converts +text+ to an HTML-safe label + # + # source://rdoc//lib/rdoc/markup/to_label.rb#32 + def convert(text); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def end_accepting(*node); end + + # Converts the CROSSREF +target+ to plain text, removing the suppression + # marker, if any + # + # source://rdoc//lib/rdoc/markup/to_label.rb#42 + def handle_regexp_CROSSREF(target); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def handle_regexp_HARD_BREAK(*node); end + + # Converts the TIDYLINK +target+ to just the text part + # + # source://rdoc//lib/rdoc/markup/to_label.rb#51 + def handle_regexp_TIDYLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_label.rb#11 + def res; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def start_accepting(*node); end +end + +# Outputs parsed markup as Markdown +# +# source://rdoc//lib/rdoc/markup/to_markdown.rb#7 +class RDoc::Markup::ToMarkdown < ::RDoc::Markup::ToRdoc + # Creates a new formatter that will output Markdown format text + # + # @return [ToMarkdown] a new instance of ToMarkdown + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#12 + def initialize(markup = T.unsafe(nil)); end + + # Finishes consumption of `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#47 + def accept_list_end(list); end + + # Finishes consumption of `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#54 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#75 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#100 + def accept_list_start(list); end + + # Adds `rule` to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#117 + def accept_rule(rule); end + + # Outputs `verbatim` indented 4 columns + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#126 + def accept_verbatim(verbatim); end + + # Creates a Markdown-style URL from +url+ with +text+. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#140 + def gen_url(url, text); end + + # Handles rdoc- type links for footnotes. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#149 + def handle_rdoc_link(url); end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#40 + def handle_regexp_HARD_BREAK(target); end + + # Converts the rdoc-...: links into a Markdown.style links. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#187 + def handle_regexp_RDOCLINK(target); end + + # Converts the RDoc markup tidylink into a Markdown.style link. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#169 + def handle_regexp_TIDYLINK(target); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#31 + def init_tags; end +end + +# Outputs RDoc markup as RDoc markup! (mostly) +# +# source://rdoc//lib/rdoc/markup/to_rdoc.rb#5 +class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter + # Creates a new formatter that will output (mostly) \RDoc markup + # + # @return [ToRdoc] a new instance of ToRdoc + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#45 + def initialize(markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#77 + def accept_blank_line(blank_line); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#84 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#99 + def accept_heading(heading); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#211 + def accept_indented_paragraph(paragraph); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#110 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#119 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#143 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#176 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#203 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#221 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#228 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#251 + def accept_table(header, body, aligns); end + + # Outputs +verbatim+ indented 2 columns + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#237 + def accept_verbatim(verbatim); end + + # Applies attribute-specific markup to +text+ using RDoc::AttributeManager + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#279 + def attributes(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#287 + def end_accepting; end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#303 + def handle_regexp_HARD_BREAK(target); end + + # Removes preceding \\ from the suppressed crossref +target+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#294 + def handle_regexp_SUPPRESSED_CROSSREF(target); end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent; end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent=(_arg0); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#68 + def init_tags; end + + # Stack of current list indexes for alphabetic and numeric lists + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#20 + def list_index; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#25 + def list_type; end + + # Stack of list widths for indentation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#30 + def list_width; end + + # Prefix for the next list item. See #use_prefix + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#35 + def prefix; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#40 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#310 + def start_accepting; end + + # Adds the stored #prefix to the output and clears it. Lists generate a + # prefix for later consumption. + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#324 + def use_prefix; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width=(_arg0); end + + # Wraps +text+ to #width + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#334 + def wrap(text); end +end + +# Extracts just the RDoc::Markup::Heading elements from a +# RDoc::Markup::Document to help build a table of contents +# +# source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#6 +class RDoc::Markup::ToTableOfContents < ::RDoc::Markup::Formatter + # @return [ToTableOfContents] a new instance of ToTableOfContents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#27 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # Adds +document+ to the output, using its heading cutoff if present + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#36 + def accept_document(document); end + + # Adds +heading+ to the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#45 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end_bullet(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Returns the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#52 + def end_accepting; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below=(_arg0); end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#20 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#59 + def start_accepting; end + + # Returns true if +heading+ is below the display threshold + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#67 + def suppressed?(heading); end + + class << self + # Singleton for table-of-contents generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#13 + def to_toc; end + end +end + +# This Markup outputter is used for testing purposes. +# +# source://rdoc//lib/rdoc/markup/to_test.rb#5 +class RDoc::Markup::ToTest < ::RDoc::Markup::Formatter + # source://rdoc//lib/rdoc/markup/to_test.rb#55 + def accept_blank_line(blank_line); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#59 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#44 + def accept_list_end(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#52 + def accept_list_item_end(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#48 + def accept_list_item_start(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#33 + def accept_list_start(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#21 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#25 + def accept_raw(raw); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#63 + def accept_rule(rule); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#29 + def accept_verbatim(verbatim); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#17 + def end_accepting; end + + # :section: Visitor + # + # source://rdoc//lib/rdoc/markup/to_test.rb#12 + def start_accepting; end +end + +# Extracts sections of text enclosed in plus, tt or code. Used to discover +# undocumented parameters. +# +# source://rdoc//lib/rdoc/markup/to_tt_only.rb#6 +class RDoc::Markup::ToTtOnly < ::RDoc::Markup::Formatter + # Creates a new tt-only formatter. + # + # @return [ToTtOnly] a new instance of ToTtOnly + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#21 + def initialize(markup = T.unsafe(nil)); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_blank_line(markup_item); end + + # Adds tts from +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#30 + def accept_block_quote(block_quote); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_heading(markup_item); end + + # Pops the list type for +list+ from #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#37 + def accept_list_end(list); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_list_item_end(markup_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#51 + def accept_list_item_start(list_item); end + + # Pushes the list type for +list+ onto #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#44 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#63 + def accept_paragraph(paragraph); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_raw(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_rule(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_verbatim(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def do_nothing(markup_item); end + + # Returns an Array of items that were wrapped in plus, tt or code. + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#107 + def end_accepting; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#11 + def list_type; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#16 + def res; end + + # Prepares the visitor for gathering tt sections + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#114 + def start_accepting; end + + # Extracts tt sections from +text+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#84 + def tt_sections(text); end +end + +# A section of verbatim text +# +# source://rdoc//lib/rdoc/markup/verbatim.rb#5 +class RDoc::Markup::Verbatim < ::RDoc::Markup::Raw + # @return [Verbatim] a new instance of Verbatim + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#12 + def initialize(*parts); end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#18 + def ==(other); end + + # Calls #accept_verbatim on +visitor+ + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#25 + def accept(visitor); end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format; end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format=(_arg0); end + + # Collapses 3+ newlines into two newlines + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#32 + def normalize; end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#53 + def pretty_print(q); end + + # Is this verbatim section Ruby code? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#71 + def ruby?; end + + # The text of the section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#79 + def text; end +end + +# Abstract class representing either a method or an attribute. +# +# source://rdoc//lib/rdoc/method_attr.rb#5 +class RDoc::MethodAttr < ::RDoc::CodeObject + include ::Comparable + + # Creates a new MethodAttr from token stream +text+ and method or attribute + # name +name+. + # + # Usually this is called by super from a subclass. + # + # @return [MethodAttr] a new instance of MethodAttr + # + # source://rdoc//lib/rdoc/method_attr.rb#78 + def initialize(text, name); end + + # Order by #singleton then #name + # + # source://rdoc//lib/rdoc/method_attr.rb#113 + def <=>(other); end + + # source://rdoc//lib/rdoc/method_attr.rb#121 + def ==(other); end + + # Abstract method. Contexts in their building phase call this + # to register a new alias for this known method/attribute. + # + # - creates a new AnyMethod/Attribute named an_alias.new_name; + # - adds +self+ as an alias for the new method or attribute + # - adds the method or attribute to #aliases + # - adds the method or attribute to +context+. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#209 + def add_alias(an_alias, context); end + + # Prepend +src+ with line numbers. Relies on the first line of a source + # code listing having: + # + # # File xxxxx, line dddd + # + # If it has this comment then line numbers are added to +src+ and the , + # line dddd portion of the comment is removed. + # + # source://rdoc//lib/rdoc/generator/markup.rb#77 + def add_line_numbers(src); end + + # Array of other names for this method/attribute + # + # source://rdoc//lib/rdoc/method_attr.rb#32 + def aliases; end + + # HTML fragment reference for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#216 + def aref; end + + # Prefix for +aref+, defined by subclasses. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#225 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # source://rdoc//lib/rdoc/method_attr.rb#64 + def arglists; end + + # Parameters yielded by the called block + # + # source://rdoc//lib/rdoc/method_attr.rb#49 + def block_params; end + + # Attempts to sanitize the content passed by the Ruby parser: + # remove outer parentheses, etc. + # + # source://rdoc//lib/rdoc/method_attr.rb#233 + def block_params=(value); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq; end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq=(_arg0); end + + # A method/attribute is documented if any of the following is true: + # - it has a comment; + # - it is an alias for a documented method; + # - it has a +#see+ method that is documented. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/method_attr.rb#132 + def documented?; end + + # source://rdoc//lib/rdoc/method_attr.rb#178 + def find_method_or_attribute(name); end + + # source://rdoc//lib/rdoc/method_attr.rb#166 + def find_see; end + + # Full method/attribute name including namespace + # + # source://rdoc//lib/rdoc/method_attr.rb#300 + def full_name; end + + # HTML id-friendly method/attribute name + # + # source://rdoc//lib/rdoc/method_attr.rb#291 + def html_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#105 + def initialize_visibility; end + + # source://rdoc//lib/rdoc/method_attr.rb#304 + def inspect; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for=(_arg0); end + + # Turns the method's token stream into HTML. + # + # Prepends line numbers if +options.line_numbers+ is true. + # + # source://rdoc//lib/rdoc/generator/markup.rb#101 + def markup_code; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name=(_arg0); end + + # '::' for a class method/attribute, '#' for an instance method. + # + # source://rdoc//lib/rdoc/method_attr.rb#319 + def name_prefix; end + + # Name for output to HTML. For class methods the full name with a "." is + # used like +SomeClass.method_name+. For instance methods the class name is + # used if +context+ does not match the parent. + # + # This is to help prevent people from using :: to call class methods. + # + # source://rdoc//lib/rdoc/method_attr.rb#330 + def output_name(context); end + + # Pretty parameter list for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#69 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params=(_arg0); end + + # Name of our parent with special handling for un-marshaled methods + # + # source://rdoc//lib/rdoc/method_attr.rb#360 + def parent_name; end + + # Path to this method for use with HTML generator output. + # + # source://rdoc//lib/rdoc/method_attr.rb#353 + def path; end + + # Method/attribute name with class/instance indicator + # + # source://rdoc//lib/rdoc/method_attr.rb#339 + def pretty_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#364 + def pretty_print(q); end + + # Used by RDoc::Generator::JsonIndex to create a record for the search + # engine. + # + # source://rdoc//lib/rdoc/method_attr.rb#398 + def search_record; end + + # A method/attribute to look at, + # in particular if this method/attribute has no documentation. + # + # It can be a method/attribute of the superclass or of an included module, + # including the Kernel module, which is always appended to the included + # modules. + # + # Returns +nil+ if there is no such method/attribute. + # The +#is_alias_for+ method/attribute, if any, is not included. + # + # Templates may generate a "see also ..." if this method/attribute + # has documentation, and "see ..." if it does not. + # + # source://rdoc//lib/rdoc/method_attr.rb#152 + def see; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/method_attr.rb#160 + def store=(store); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/method_attr.rb#27 + def text; end + + # source://rdoc//lib/rdoc/method_attr.rb#410 + def to_s; end + + # Type of method/attribute (class or instance) + # + # source://rdoc//lib/rdoc/method_attr.rb#346 + def type; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility=(_arg0); end + + private + + # Resets cached data for the object so it can be rebuilt by accessor methods + # + # source://rdoc//lib/rdoc/method_attr.rb#101 + def initialize_copy(other); end +end + +# A Mixin adds features from a module into another context. RDoc::Include and +# RDoc::Extend are both mixins. +# +# source://rdoc//lib/rdoc/mixin.rb#6 +class RDoc::Mixin < ::RDoc::CodeObject + # Creates a new Mixin for +name+ with +comment+ + # + # @return [Mixin] a new instance of Mixin + # + # source://rdoc//lib/rdoc/mixin.rb#16 + def initialize(name, comment); end + + # Mixins are sorted by name + # + # source://rdoc//lib/rdoc/mixin.rb#26 + def <=>(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def ==(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def eql?(other); end + + # Full name based on #module + # + # source://rdoc//lib/rdoc/mixin.rb#41 + def full_name; end + + # source://rdoc//lib/rdoc/mixin.rb#46 + def hash; end + + # source://rdoc//lib/rdoc/mixin.rb#50 + def inspect; end + + # Attempts to locate the included module object. Returns the name if not + # known. + # + # The scoping rules of Ruby to resolve the name of an included module are: + # - first look into the children of the current context; + # - if not found, look into the children of included modules, + # in reverse inclusion order; + # - if still not found, go up the hierarchy of names. + # + # This method has O(n!) behavior when the module calling + # include is referencing nonexistent modules. Avoid calling #module until + # after all the files are parsed. This behavior is due to ruby's constant + # lookup behavior. + # + # As of the beginning of October, 2011, no gem includes nonexistent modules. + # + # source://rdoc//lib/rdoc/mixin.rb#75 + def module; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/mixin.rb#110 + def store=(store); end + + # source://rdoc//lib/rdoc/mixin.rb#116 + def to_s; end +end + +# A normal class, neither singleton nor anonymous +# +# source://rdoc//lib/rdoc/normal_class.rb#5 +class RDoc::NormalClass < ::RDoc::ClassModule + # The ancestors of this class including modules. Unlike Module#ancestors, + # this class is not included in the result. The result will contain both + # RDoc::ClassModules and Strings. + # + # source://rdoc//lib/rdoc/normal_class.rb#12 + def ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#24 + def aref_prefix; end + + # The definition of this class, class MyClassName + # + # source://rdoc//lib/rdoc/normal_class.rb#31 + def definition; end + + # source://rdoc//lib/rdoc/normal_class.rb#35 + def direct_ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#39 + def inspect; end + + # source://rdoc//lib/rdoc/normal_class.rb#56 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/normal_class.rb#47 + def to_s; end +end + +# A normal module, like NormalClass +# +# source://rdoc//lib/rdoc/normal_module.rb#5 +class RDoc::NormalModule < ::RDoc::ClassModule + # source://rdoc//lib/rdoc/normal_module.rb#7 + def aref_prefix; end + + # The definition of this module, module MyModuleName + # + # source://rdoc//lib/rdoc/normal_module.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/normal_module.rb#11 + def inspect; end + + # This is a module, returns true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/normal_module.rb#28 + def module?; end + + # source://rdoc//lib/rdoc/normal_module.rb#32 + def pretty_print(q); end + + # Modules don't have one, raises NoMethodError + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/normal_module.rb#69 + def superclass; end +end + +# RDoc::Options handles the parsing and storage of options +# +# == Saved Options +# +# You can save some options like the markup format in the +# .rdoc_options file in your gem. The easiest way to do this is: +# +# rdoc --markup tomdoc --write-options +# +# Which will automatically create the file and fill it with the options you +# specified. +# +# The following options will not be saved since they interfere with the user's +# preferences or with the normal operation of RDoc: +# +# * +--coverage-report+ +# * +--dry-run+ +# * +--encoding+ +# * +--force-update+ +# * +--format+ +# * +--pipe+ +# * +--quiet+ +# * +--template+ +# * +--verbose+ +# +# == Custom Options +# +# Generators can hook into RDoc::Options to add generator-specific command +# line options. +# +# When --format is encountered in ARGV, RDoc calls ::setup_options on +# the generator class to add extra options to the option parser. Options for +# custom generators must occur after --format. rdoc --help +# will list options for all installed generators. +# +# Example: +# +# class RDoc::Generator::Spellcheck +# RDoc::RDoc.add_generator self +# +# def self.setup_options rdoc_options +# op = rdoc_options.option_parser +# +# op.on('--spell-dictionary DICTIONARY', +# RDoc::Options::Path) do |dictionary| +# rdoc_options.spell_dictionary = dictionary +# end +# end +# end +# +# Of course, RDoc::Options does not respond to +spell_dictionary+ by default +# so you will need to add it: +# +# class RDoc::Options +# +# ## +# # The spell dictionary used by the spell-checking plugin. +# +# attr_accessor :spell_dictionary +# +# end +# +# == Option Validators +# +# OptionParser validators will validate and cast user input values. In +# addition to the validators that ship with OptionParser (String, Integer, +# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), +# RDoc::Options adds Path, PathArray and Template. +# +# source://rdoc//lib/rdoc/options.rb#75 +class RDoc::Options + # @return [Options] a new instance of Options + # + # source://rdoc//lib/rdoc/options.rb#347 + def initialize(loaded_options = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/options.rb#460 + def ==(other); end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#152 + def charset; end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#152 + def charset=(_arg0); end + + # Check that the files on the command line exist + # + # source://rdoc//lib/rdoc/options.rb#484 + def check_files; end + + # Ensure only one generator is loaded + # + # source://rdoc//lib/rdoc/options.rb#505 + def check_generator; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#244 + def coverage_report; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#244 + def coverage_report=(_arg0); end + + # Set the title, but only if not already set. Used to set the title + # from a source file, so that a title set from the command line + # will have the priority. + # + # source://rdoc//lib/rdoc/options.rb#517 + def default_title=(string); end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#157 + def dry_run; end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#157 + def dry_run=(_arg0); end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#164 + def encoding; end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#164 + def encoding=(_arg0); end + + # Create a regexp for #exclude + # + # source://rdoc//lib/rdoc/options.rb#545 + def exclude; end + + # Files matching this pattern will be excluded + # + # source://rdoc//lib/rdoc/options.rb#169 + def exclude=(_arg0); end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#174 + def files; end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#174 + def files=(_arg0); end + + # Completes any unfinished option setup business such as filtering for + # existent files, creating a regexp for #exclude and setting a default + # #template. + # + # source://rdoc//lib/rdoc/options.rb#561 + def finish; end + + # Fixes the page_dir to be relative to the root_dir and adds the page_dir to + # the files list. + # + # source://rdoc//lib/rdoc/options.rb#602 + def finish_page_dir; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#180 + def force_output; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#180 + def force_output=(_arg0); end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#185 + def force_update; end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#185 + def force_update=(_arg0); end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#190 + def formatter; end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#190 + def formatter=(_arg0); end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#195 + def generator; end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#195 + def generator=(_arg0); end + + # Returns a properly-space list of generators and their descriptions. + # + # source://rdoc//lib/rdoc/options.rb#621 + def generator_descriptions; end + + # For #== + # + # source://rdoc//lib/rdoc/options.rb#200 + def generator_name; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#206 + def generator_options; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#206 + def generator_options=(_arg0); end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#212 + def hyperlink_all; end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#212 + def hyperlink_all=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#352 + def init_ivars; end + + # source://rdoc//lib/rdoc/options.rb#397 + def init_with(map); end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#217 + def line_numbers; end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#217 + def line_numbers=(_arg0); end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#222 + def locale; end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#222 + def locale=(_arg0); end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#227 + def locale_dir; end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#227 + def locale_dir=(_arg0); end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#233 + def main_page; end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#233 + def main_page=(_arg0); end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#239 + def markup; end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#239 + def markup=(_arg0); end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#249 + def op_dir; end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#249 + def op_dir=(_arg0); end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#254 + def option_parser; end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#254 + def option_parser=(_arg0); end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#258 + def output_decoration; end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#258 + def output_decoration=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#428 + def override(map); end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#264 + def page_dir; end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#264 + def page_dir=(_arg0); end + + # Parses command line options. + # + # source://rdoc//lib/rdoc/options.rb#647 + def parse(argv); end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#269 + def pipe; end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#269 + def pipe=(_arg0); end + + # Don't display progress as we process the files + # + # source://rdoc//lib/rdoc/options.rb#1192 + def quiet; end + + # Set quietness to +bool+ + # + # source://rdoc//lib/rdoc/options.rb#1199 + def quiet=(bool); end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#274 + def rdoc_include; end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#274 + def rdoc_include=(_arg0); end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#281 + def root; end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#281 + def root=(_arg0); end + + # Removes directories from +path+ that are outside the current directory + # + # source://rdoc//lib/rdoc/options.rb#1206 + def sanitize_path(path); end + + # Set up an output generator for the named +generator_name+. + # + # If the found generator responds to :setup_options it will be called with + # the options instance. This allows generators to add custom options or set + # default options. + # + # source://rdoc//lib/rdoc/options.rb#1233 + def setup_generator(generator_name = T.unsafe(nil)); end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#286 + def show_hash; end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#286 + def show_hash=(_arg0); end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#345 + def skip_tests; end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#345 + def skip_tests=(_arg0); end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#291 + def static_path; end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#291 + def static_path=(_arg0); end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#296 + def tab_width; end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#296 + def tab_width=(_arg0); end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#301 + def template; end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#301 + def template=(_arg0); end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#306 + def template_dir; end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#306 + def template_dir=(_arg0); end + + # Finds the template dir for +template+ + # + # source://rdoc//lib/rdoc/options.rb#1255 + def template_dir_for(template); end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#311 + def template_stylesheets; end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#311 + def template_stylesheets=(_arg0); end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#316 + def title; end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#316 + def title=(_arg0); end + + # For dumping YAML + # + # source://rdoc//lib/rdoc/options.rb#524 + def to_yaml(*options); end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#321 + def update_output_dir; end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#321 + def update_output_dir=(_arg0); end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#326 + def verbosity; end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#326 + def verbosity=(_arg0); end + + # Minimum visibility of a documented method. One of +:public+, +:protected+, + # +:private+ or +:nodoc+. + # + # The +:nodoc+ visibility ignores all directives related to visibility. The + # directive. + # + # source://rdoc//lib/rdoc/options.rb#341 + def visibility; end + + # Sets the minimum visibility of a documented method. + # + # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+. + # + # When +:all+ is passed, visibility is set to +:private+, similarly to + # RDOCOPT="--all", see #visibility for more information. + # + # source://rdoc//lib/rdoc/options.rb#1272 + def visibility=(visibility); end + + # Displays a warning using Kernel#warn if we're being verbose + # + # source://rdoc//lib/rdoc/options.rb#1284 + def warn(message); end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#331 + def webcvs; end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#331 + def webcvs=(_arg0); end + + # Writes the YAML file .rdoc_options to the current directory containing the + # parsed options. + # + # source://rdoc//lib/rdoc/options.rb#1292 + def write_options; end + + # source://rdoc//lib/rdoc/options.rb#424 + def yaml_initialize(tag, map); end + + class << self + # Loads options from .rdoc_options if the file exists, otherwise creates a + # new RDoc::Options instance. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/options.rb#1306 + def load_options; end + end +end + +# A parser is simple a class that subclasses RDoc::Parser and implements #scan +# to fill in an RDoc::TopLevel with parsed data. +# +# The initialize method takes an RDoc::TopLevel to fill with parsed content, +# the name of the file to be parsed, the content of the file, an RDoc::Options +# object and an RDoc::Stats object to inform the user of parsed items. The +# scan method is then called to parse the file and must return the +# RDoc::TopLevel object. By calling super these items will be set for you. +# +# In order to be used by RDoc the parser needs to register the file extensions +# it can parse. Use ::parse_files_matching to register extensions. +# +# require 'rdoc' +# +# class RDoc::Parser::Xyz < RDoc::Parser +# parse_files_matching /\.xyz$/ +# +# def initialize top_level, file_name, content, options, stats +# super +# +# # extra initialization if needed +# end +# +# def scan +# # parse file and fill in @top_level +# end +# end +# +# source://rdoc//lib/rdoc/parser.rb#33 +class RDoc::Parser + # Creates a new Parser storing +top_level+, +file_name+, +content+, + # +options+ and +stats+ in instance variables. In +@preprocess+ an + # RDoc::Markup::PreProcess object is created which allows processing of + # directives. + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/parser.rb#254 + def initialize(top_level, file_name, content, options, stats); end + + # The name of the file being parsed + # + # source://rdoc//lib/rdoc/parser.rb#52 + def file_name; end + + # Normalizes tabs in +body+ + # + # source://rdoc//lib/rdoc/parser.rb#274 + def handle_tab_width(body); end + + class << self + # Alias an extension to another extension. After this call, files ending + # "new_ext" will be parsed using the same parser as "old_ext" + # + # source://rdoc//lib/rdoc/parser.rb#58 + def alias_extension(old_ext, new_ext); end + + # Determines if the file is a "binary" file which basically means it has + # content that an RDoc parser shouldn't try to consume. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#74 + def binary?(file); end + + # Return a parser that can handle a particular extension + # + # source://rdoc//lib/rdoc/parser.rb#107 + def can_parse(file_name); end + + # Returns a parser that can handle the extension for +file_name+. This does + # not depend upon the file being readable. + # + # source://rdoc//lib/rdoc/parser.rb#120 + def can_parse_by_name(file_name); end + + # Returns the file type from the modeline in +file_name+ + # + # source://rdoc//lib/rdoc/parser.rb#143 + def check_modeline(file_name); end + + # Finds and instantiates the correct parser for the given +file_name+ and + # +content+. + # + # source://rdoc//lib/rdoc/parser.rb#169 + def for(top_level, file_name, content, options, stats); end + + # Record which file types this parser can understand. + # + # It is ok to call this multiple times. + # + # source://rdoc//lib/rdoc/parser.rb#203 + def parse_files_matching(regexp); end + + # An Array of arrays that maps file extension (or name) regular + # expressions to parser classes that will parse matching filenames. + # + # Use parse_files_matching to register a parser's file extensions. + # + # source://rdoc//lib/rdoc/parser.rb#45 + def parsers; end + + # Removes an emacs-style modeline from the first line of the document + # + # source://rdoc//lib/rdoc/parser.rb#210 + def remove_modeline(content); end + + # If there is a markup: parser_name comment at the front of the + # file, use it to determine the parser. For example: + # + # # markup: rdoc + # # Class comment can go here + # + # class C + # end + # + # The comment should appear as the first line of the +content+. + # + # If the content contains a shebang or editor modeline the comment may + # appear on the second or third line. + # + # Any comment style may be used to hide the markup comment. + # + # source://rdoc//lib/rdoc/parser.rb#231 + def use_markup(content); end + + # Checks if +file+ is a zip file in disguise. Signatures from + # http://www.garykessler.net/library/file_sigs.html + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#94 + def zip?(file); end + end +end + +# RDoc::Parser::C attempts to parse C extension files. It looks for +# the standard patterns that you find in extensions: +rb_define_class+, +# +rb_define_method+ and so on. It tries to find the corresponding +# C source for the methods and extract comments, but if we fail +# we don't worry too much. +# +# The comments associated with a Ruby method are extracted from the C +# comment block associated with the routine that _implements_ that +# method, that is to say the method whose name is given in the +# +rb_define_method+ call. For example, you might write: +# +# /* +# * Returns a new array that is a one-dimensional flattening of this +# * array (recursively). That is, for every element that is an array, +# * extract its elements into the new array. +# * +# * s = [ 1, 2, 3 ] #=> [1, 2, 3] +# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] +# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] +# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +# */ +# static VALUE +# rb_ary_flatten(VALUE ary) +# { +# ary = rb_obj_dup(ary); +# rb_ary_flatten_bang(ary); +# return ary; +# } +# +# ... +# +# void +# Init_Array(void) +# { +# ... +# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); +# +# Here RDoc will determine from the +rb_define_method+ line that there's a +# method called "flatten" in class Array, and will look for the implementation +# in the method +rb_ary_flatten+. It will then use the comment from that +# method in the HTML output. This method must be in the same source file +# as the +rb_define_method+. +# +# The comment blocks may include special directives: +# +# [Document-class: +name+] +# Documentation for the named class. +# +# [Document-module: +name+] +# Documentation for the named module. +# +# [Document-const: +name+] +# Documentation for the named +rb_define_const+. +# +# Constant values can be supplied on the first line of the comment like so: +# +# /* 300: The highest possible score in bowling */ +# rb_define_const(cFoo, "PERFECT", INT2FIX(300)); +# +# The value can contain internal colons so long as they are escaped with a \ +# +# [Document-global: +name+] +# Documentation for the named +rb_define_global_const+ +# +# [Document-variable: +name+] +# Documentation for the named +rb_define_variable+ +# +# [Document-method\: +method_name+] +# Documentation for the named method. Use this when the method name is +# unambiguous. +# +# [Document-method\: ClassName::method_name] +# Documentation for a singleton method in the given class. Use this when +# the method name alone is ambiguous. +# +# [Document-method\: ClassName#method_name] +# Documentation for a instance method in the given class. Use this when the +# method name alone is ambiguous. +# +# [Document-attr: +name+] +# Documentation for the named attribute. +# +# [call-seq: text up to an empty line] +# Because C source doesn't give descriptive names to Ruby-level parameters, +# you need to document the calling sequence explicitly +# +# In addition, RDoc assumes by default that the C method implementing a +# Ruby function is in the same source file as the rb_define_method call. +# If this isn't the case, add the comment: +# +# rb_define_method(....); // in filename +# +# As an example, we might have an extension that defines multiple classes +# in its Init_xxx method. We could document them using +# +# /* +# * Document-class: MyClass +# * +# * Encapsulate the writing and reading of the configuration +# * file. ... +# */ +# +# /* +# * Document-method: read_value +# * +# * call-seq: +# * cfg.read_value(key) -> value +# * cfg.read_value(key} { |key| } -> value +# * +# * Return the value corresponding to +key+ from the configuration. +# * In the second form, if the key isn't found, invoke the +# * block and return its value. +# */ +# +# source://rdoc//lib/rdoc/parser/c.rb#119 +class RDoc::Parser::C < ::RDoc::Parser + include ::RDoc::Text + + # Prepares for parsing a C file. See RDoc::Parser#initialize for details on + # the arguments. + # + # @return [C] a new instance of C + # + # source://rdoc//lib/rdoc/parser/c.rb#171 + def initialize(top_level, file_name, content, options, stats); end + + # Add alias, either from a direct alias definition, or from two + # method that reference the same function. + # + # source://rdoc//lib/rdoc/parser/c.rb#250 + def add_alias(var_name, class_obj, old_name, new_name, comment); end + + # Maps C variable names to names of Ruby classes or modules + # + # source://rdoc//lib/rdoc/parser/c.rb#133 + def classes; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content=(_arg0); end + + # Scans #content for rb_define_alias + # + # source://rdoc//lib/rdoc/parser/c.rb#222 + def do_aliases; end + + # Scans #content for rb_attr and rb_define_attr + # + # source://rdoc//lib/rdoc/parser/c.rb#263 + def do_attrs; end + + # Scans #content for boot_defclass + # + # source://rdoc//lib/rdoc/parser/c.rb#286 + def do_boot_defclass; end + + # Scans #content for rb_define_class, boot_defclass, rb_define_class_under + # and rb_singleton_class + # + # source://rdoc//lib/rdoc/parser/c.rb#298 + def do_classes_and_modules; end + + # Scans #content for rb_define_variable, rb_define_readonly_variable, + # rb_define_const and rb_define_global_const + # + # source://rdoc//lib/rdoc/parser/c.rb#396 + def do_constants; end + + # Scans #content for rb_include_module + # + # source://rdoc//lib/rdoc/parser/c.rb#442 + def do_includes; end + + # Scans #content for rb_define_method, rb_define_singleton_method, + # rb_define_module_function, rb_define_private_method, + # rb_define_global_function and define_filetest_function + # + # source://rdoc//lib/rdoc/parser/c.rb#458 + def do_methods; end + + # Creates classes and module that were missing were defined due to the file + # order being different than the declaration order. + # + # source://rdoc//lib/rdoc/parser/c.rb#507 + def do_missing; end + + # Dependencies from a missing enclosing class to the classes in + # missing_dependencies that depend upon it. + # + # source://rdoc//lib/rdoc/parser/c.rb#144 + def enclosure_dependencies; end + + # Finds the comment for an alias on +class_name+ from +new_name+ to + # +old_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#523 + def find_alias_comment(class_name, new_name, old_name); end + + # Finds a comment for rb_define_attr, rb_attr or Document-attr. + # + # +var_name+ is the C class variable the attribute is defined on. + # +attr_name+ is the attribute's name. + # + # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or + # neither must be provided. + # + # source://rdoc//lib/rdoc/parser/c.rb#541 + def find_attr_comment(var_name, attr_name, read = T.unsafe(nil), write = T.unsafe(nil)); end + + # Find the C code corresponding to a Ruby method + # + # source://rdoc//lib/rdoc/parser/c.rb#598 + def find_body(class_name, meth_name, meth_obj, file_content, quiet = T.unsafe(nil)); end + + # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#682 + def find_class(raw_name, name, base_name = T.unsafe(nil)); end + + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # + # source://rdoc//lib/rdoc/parser/c.rb#723 + def find_class_comment(class_name, class_mod); end + + # Finds a comment matching +type+ and +const_name+ either above the + # comment or in the matching Document- section. + # + # source://rdoc//lib/rdoc/parser/c.rb#789 + def find_const_comment(type, const_name, class_name = T.unsafe(nil)); end + + # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate. + # + # source://rdoc//lib/rdoc/parser/c.rb#806 + def find_modifiers(comment, meth_obj); end + + # Finds a Document-method override for +meth_obj+ on +class_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#816 + def find_override_comment(class_name, meth_obj); end + + # Generate a Ruby-method table + # + # source://rdoc//lib/rdoc/parser/c.rb#574 + def gen_body_table(file_content); end + + # Generate a const table + # + # source://rdoc//lib/rdoc/parser/c.rb#756 + def gen_const_table(file_content); end + + # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either + # +read+, +write+ or both + # + # source://rdoc//lib/rdoc/parser/c.rb#838 + def handle_attr(var_name, attr_name, read, write); end + + # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ + # named +class_name+ in +parent+ which was assigned to the C +var_name+. + # + # source://rdoc//lib/rdoc/parser/c.rb#867 + def handle_class_module(var_name, type, class_name, parent, in_module); end + + # Adds constants. By providing some_value: at the start of the comment you + # can override the C value of the comment to give a friendly definition. + # + # /* 300: The perfect score in bowling */ + # rb_define_const(cFoo, "PERFECT", INT2FIX(300)); + # + # Will override INT2FIX(300) with the value +300+ in the output + # RDoc. Values may include quotes and escaped colons (\:). + # + # source://rdoc//lib/rdoc/parser/c.rb#932 + def handle_constants(type, var_name, const_name, definition); end + + # Removes #ifdefs that would otherwise confuse us + # + # source://rdoc//lib/rdoc/parser/c.rb#982 + def handle_ifdefs_in(body); end + + # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned + # to +var_name+. +type+ is the type of method definition function used. + # +singleton_method+ and +module_function+ create a singleton method. + # + # source://rdoc//lib/rdoc/parser/c.rb#991 + def handle_method(type, var_name, meth_name, function, param_count, source_file = T.unsafe(nil)); end + + # Registers a singleton class +sclass_var+ as a singleton of +class_var+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1061 + def handle_singleton(sclass_var, class_var); end + + # Maps C variable names to names of Ruby classes (and singleton classes) + # + # source://rdoc//lib/rdoc/parser/c.rb#149 + def known_classes; end + + # Loads the variable map with the given +name+ from the RDoc::Store, if + # present. + # + # source://rdoc//lib/rdoc/parser/c.rb#1072 + def load_variable_map(map_name); end + + # Look for directives in a normal comment block: + # + # /* + # * :title: My Awesome Project + # */ + # + # This method modifies the +comment+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1101 + def look_for_directives_in(context, comment); end + + # Classes found while parsing the C file that were not yet registered due to + # a missing enclosing class. These are processed by do_missing + # + # source://rdoc//lib/rdoc/parser/c.rb#155 + def missing_dependencies; end + + # Creates a RDoc::Comment instance. + # + # source://rdoc//lib/rdoc/parser/c.rb#1231 + def new_comment(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # Extracts parameters from the +method_body+ and returns a method + # parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT + # + # source://rdoc//lib/rdoc/parser/c.rb#1120 + def rb_scan_args(method_body); end + + # Removes lines that are commented out that might otherwise get picked up + # when scanning for classes and methods + # + # source://rdoc//lib/rdoc/parser/c.rb#1203 + def remove_commented_out_lines; end + + # Extracts the classes, modules, methods, attributes, constants and aliases + # from a C file and returns an RDoc::TopLevel for this file + # + # source://rdoc//lib/rdoc/parser/c.rb#1211 + def scan; end + + # Maps C variable names to names of Ruby singleton classes + # + # source://rdoc//lib/rdoc/parser/c.rb#160 + def singleton_classes; end + + # The TopLevel items in the parsed file belong to + # + # source://rdoc//lib/rdoc/parser/c.rb#165 + def top_level; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/parser/c.rb#126 +RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/parser/c.rb#127 +RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) + +# A ChangeLog file parser. +# +# This parser converts a ChangeLog into an RDoc::Markup::Document. When +# viewed as HTML a ChangeLog page will have an entry for each day's entries in +# the sidebar table of contents. +# +# This parser is meant to parse the MRI ChangeLog, but can be used to parse any +# {GNU style Change +# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html]. +# +# source://rdoc//lib/rdoc/parser/changelog.rb#14 +class RDoc::Parser::ChangeLog < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Attaches the +continuation+ of the previous line to the +entry_body+. + # + # Continued function listings are joined together as a single entry. + # Continued descriptions are joined to make a single paragraph. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#26 + def continue_entry_body(entry_body, continuation); end + + # Creates an RDoc::Markup::Document given the +groups+ of ChangeLog entries. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#44 + def create_document(groups); end + + # Returns a list of ChangeLog entries an RDoc::Markup nodes for the given + # +entries+. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#66 + def create_entries(entries); end + + # Returns an RDoc::Markup::List containing the given +items+ in the + # ChangeLog + # + # source://rdoc//lib/rdoc/parser/changelog.rb#83 + def create_items(items); end + + # Groups +entries+ by date. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#103 + def group_entries(entries); end + + # Parse date in ISO-8601, RFC-2822, or default of Git + # + # source://rdoc//lib/rdoc/parser/changelog.rb#119 + def parse_date(date); end + + # Parses the entries in the ChangeLog. + # + # Returns an Array of each ChangeLog entry in order of parsing. + # + # A ChangeLog entry is an Array containing the ChangeLog title (date and + # committer) and an Array of ChangeLog items (file and function changed with + # description). + # + # An example result would be: + # + # [ 'Tue Dec 4 08:33:46 2012 Eric Hodel ', + # [ 'README.EXT: Converted to RDoc format', + # 'README.EXT.ja: ditto']] + # + # source://rdoc//lib/rdoc/parser/changelog.rb#149 + def parse_entries; end + + # Converts the ChangeLog into an RDoc::Markup::Document + # + # source://rdoc//lib/rdoc/parser/changelog.rb#206 + def scan; end +end + +# The extension for Git commit log +# +# source://rdoc//lib/rdoc/parser/changelog.rb#222 +module RDoc::Parser::ChangeLog::Git + # Returns a list of ChangeLog entries as + # RDoc::Parser::ChangeLog::Git::LogEntry list for the given + # +entries+. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#262 + def create_entries(entries); end + + # Parses the entries in the Git commit logs + # + # source://rdoc//lib/rdoc/parser/changelog.rb#235 + def parse_entries; end + + # Parses auxiliary info. Currentry `base-url` to expand + # references is effective. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#227 + def parse_info(info); end +end + +# source://rdoc//lib/rdoc/parser/changelog.rb#271 +RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/changelog.rb#270 +class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct + # @return [LogEntry] a new instance of LogEntry + # + # source://rdoc//lib/rdoc/parser/changelog.rb#273 + def initialize(base, commit, author, email, date, contents); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#313 + def accept(visitor); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#294 + def aref; end + + # Returns the value of attribute author + # + # @return [Object] the current value of author + def author; end + + # Sets the attribute author + # + # @param value [Object] the value to set the attribute author to. + # @return [Object] the newly set value + def author=(_); end + + # Returns the value of attribute base + # + # @return [Object] the current value of base + def base; end + + # Sets the attribute base + # + # @param value [Object] the value to set the attribute base to. + # @return [Object] the newly set value + def base=(_); end + + # Returns the value of attribute commit + # + # @return [Object] the current value of commit + def commit; end + + # Sets the attribute commit + # + # @param value [Object] the value to set the attribute commit to. + # @return [Object] the newly set value + def commit=(_); end + + # Returns the value of attribute contents + # + # @return [Object] the current value of contents + def contents; end + + # Sets the attribute contents + # + # @param value [Object] the value to set the attribute contents to. + # @return [Object] the newly set value + def contents=(_); end + + # Returns the value of attribute date + # + # @return [Object] the current value of date + def date; end + + # Sets the attribute date + # + # @param value [Object] the value to set the attribute date to. + # @return [Object] the newly set value + def date=(_); end + + # Returns the value of attribute email + # + # @return [Object] the current value of email + def email; end + + # Sets the attribute email + # + # @param value [Object] the value to set the attribute email to. + # @return [Object] the newly set value + def email=(_); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#298 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#290 + def level; end + + # source://rdoc//lib/rdoc/parser/changelog.rb#330 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#302 + def text; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Parse a Markdown format file. The parsed RDoc::Markup::Document is attached +# as a file comment. +# +# source://rdoc//lib/rdoc/parser/markdown.rb#6 +class RDoc::Parser::Markdown < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an Markdown-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/markdown.rb#15 + def scan; end +end + +# Parse a RD format file. The parsed RDoc::Markup::Document is attached as a +# file comment. +# +# source://rdoc//lib/rdoc/parser/rd.rb#6 +class RDoc::Parser::RD < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an rd-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/rd.rb#15 + def scan; end +end + +# Wrapper for Ripper lex states +# +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#7 +class RDoc::Parser::RipperStateLex + # New lexer for +code+. + # + # @return [RipperStateLex] a new instance of RipperStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#576 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#322 + def get_squashed_tk; end + + private + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#465 + def get_embdoc_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#474 + def get_heredoc_tk(heredoc_name, indent); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#549 + def get_op_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#447 + def get_regexp_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#420 + def get_string_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#373 + def get_symbol_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#511 + def get_words_tk(tk); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#499 + def heredoc_end?(name, indent, tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#493 + def retrieve_heredoc_info(tk); end + + class << self + # Returns +true+ if lex state will be +END+ after +token+. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#597 + def end?(token); end + + # Returns tokens parsed from +code+. + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#584 + def parse(code); end + end +end + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#20 +RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#31 +RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#16 +RDoc::Parser::RipperStateLex::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#30 +RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#25 +RDoc::Parser::RipperStateLex::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#21 +RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#24 +RDoc::Parser::RipperStateLex::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#17 +RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#18 +RDoc::Parser::RipperStateLex::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#19 +RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#32 +RDoc::Parser::RipperStateLex::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#28 +RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#23 +RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#26 +RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#27 +RDoc::Parser::RipperStateLex::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#22 +RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#15 +RDoc::Parser::RipperStateLex::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#29 +RDoc::Parser::RipperStateLex::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#312 +class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter + # @return [InnerStateLex] a new instance of InnerStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#313 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#317 + def on_default(event, tok, data); end +end + +# TODO: Remove this constants after Ruby 2.4 EOL +# +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#11 +RDoc::Parser::RipperStateLex::RIPPER_HAS_LEX_STATE = T.let(T.unsafe(nil), TrueClass) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#13 +class RDoc::Parser::RipperStateLex::Token < ::Struct + # Returns the value of attribute char_no + # + # @return [Object] the current value of char_no + def char_no; end + + # Sets the attribute char_no + # + # @param value [Object] the value to set the attribute char_no to. + # @return [Object] the newly set value + def char_no=(_); end + + # Returns the value of attribute kind + # + # @return [Object] the current value of kind + def kind; end + + # Sets the attribute kind + # + # @param value [Object] the value to set the attribute kind to. + # @return [Object] the newly set value + def kind=(_); end + + # Returns the value of attribute line_no + # + # @return [Object] the current value of line_no + def line_no; end + + # Sets the attribute line_no + # + # @param value [Object] the value to set the attribute line_no to. + # @return [Object] the newly set value + def line_no=(_); end + + # Returns the value of attribute state + # + # @return [Object] the current value of state + def state; end + + # Sets the attribute state + # + # @param value [Object] the value to set the attribute state to. + # @return [Object] the newly set value + def state=(_); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Extracts code elements from a source file returning a TopLevel object +# containing the constituent file elements. +# +# This file is based on rtags +# +# RubyParser understands how to document: +# * classes +# * modules +# * methods +# * constants +# * aliases +# * private, public, protected +# * private_class_function, public_class_function +# * private_constant, public_constant +# * module_function +# * attr, attr_reader, attr_writer, attr_accessor +# * extra accessors given on the command line +# * metaprogrammed methods +# * require +# * include +# +# == Method Arguments +# +# -- +# NOTE: I don't think this works, needs tests, remove the paragraph following +# this block when known to work +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :args: directive: +# +# ## +# # This method tries over and over until it is tired +# +# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try +# puts thing_to_try +# go_go_go thing_to_try, tries - 1 +# end +# +# If you have a more-complex set of overrides you can use the :call-seq: +# directive: +# ++ +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :call-seq: +# directive: +# +# ## +# # This method can be called with a range or an offset and length +# # +# # :call-seq: +# # my_method(Range) +# # my_method(offset, length) +# +# def my_method(*args) +# end +# +# The parser extracts +yield+ expressions from method bodies to gather the +# yielded argument names. If your method manually calls a block instead of +# yielding or you want to override the discovered argument names use +# the :yields: directive: +# +# ## +# # My method is awesome +# +# def my_method(&block) # :yields: happy, times +# block.call 1, 2 +# end +# +# == Metaprogrammed Methods +# +# To pick up a metaprogrammed method, the parser looks for a comment starting +# with '##' before an identifier: +# +# ## +# # This is a meta-programmed method! +# +# add_my_method :meta_method, :arg1, :arg2 +# +# The parser looks at the token after the identifier to determine the name, in +# this example, :meta_method. If a name cannot be found, a warning is printed +# and 'unknown is used. +# +# You can force the name of a method using the :method: directive: +# +# ## +# # :method: some_method! +# +# By default, meta-methods are instance methods. To indicate that a method is +# a singleton method instead use the :singleton-method: directive: +# +# ## +# # :singleton-method: +# +# You can also use the :singleton-method: directive with a name: +# +# ## +# # :singleton-method: some_method! +# +# You can define arguments for metaprogrammed methods via either the +# :call-seq:, :arg: or :args: directives. +# +# Additionally you can mark a method as an attribute by +# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like +# for :method:, the name is optional. +# +# ## +# # :attr_reader: my_attr_name +# +# == Hidden methods and attributes +# +# You can provide documentation for methods that don't appear using +# the :method:, :singleton-method: and :attr: directives: +# +# ## +# # :attr_writer: ghost_writer +# # There is an attribute here, but you can't see it! +# +# ## +# # :method: ghost_method +# # There is a method here, but you can't see it! +# +# ## +# # this is a comment for a regular method +# +# def regular_method() end +# +# Note that by default, the :method: directive will be ignored if there is a +# standard rdocable item following it. +# +# source://rdoc//lib/rdoc/parser/ruby.rb#144 +class RDoc::Parser::Ruby < ::RDoc::Parser + include ::RDoc::TokenStream + include ::RDoc::Parser::RubyTools + + # Creates a new Ruby parser. + # + # @return [Ruby] a new instance of Ruby + # + # source://rdoc//lib/rdoc/parser/ruby.rb#164 + def initialize(top_level, file_name, content, options, stats); end + + # Look for the first comment in a file that isn't a shebang line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#236 + def collect_first_comment; end + + # Consumes trailing whitespace from the token stream + # + # source://rdoc//lib/rdoc/parser/ruby.rb#279 + def consume_trailing_spaces; end + + # Creates a new attribute in +container+ with +name+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#286 + def create_attr(container, single, name, rw, comment); end + + # Creates a module alias in +container+ at +rhs_name+ (or at the top-level + # for "::") with the name from +constant+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#300 + def create_module_alias(container, constant, rhs_name); end + + # Aborts with +msg+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#313 + def error(msg); end + + # Looks for a true or false token. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#322 + def get_bool; end + + # Look for the name of a class of module (optionally with a leading :: or + # with :: separated named) and return the ultimate name, the associated + # container, and the given name (with the ::). + # + # source://rdoc//lib/rdoc/parser/ruby.rb#340 + def get_class_or_module(container, ignore_constants = T.unsafe(nil)); end + + # Return a superclass, which can be either a constant of an expression + # + # source://rdoc//lib/rdoc/parser/ruby.rb#423 + def get_class_specification; end + + # Parse a constant, which might be qualified by one or more class or module + # names + # + # source://rdoc//lib/rdoc/parser/ruby.rb#456 + def get_constant; end + + # Little hack going on here. In the statement: + # + # f = 2*(1+yield) + # + # We see the RPAREN as the next token, so we need to exit early. This still + # won't catch all cases (such as "a = yield + 1" + # + # source://rdoc//lib/rdoc/parser/ruby.rb#558 + def get_end_token(tk); end + + # Get an included module that may be surrounded by parens + # + # source://rdoc//lib/rdoc/parser/ruby.rb#473 + def get_included_module_with_optional_parens; end + + # Retrieves the method container for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#578 + def get_method_container(container, name_t); end + + # Extracts a name or symbol from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#621 + def get_symbol_or_name; end + + # Retrieves the read token stream and replaces +pattern+ with +replacement+ + # using gsub. If the result is only a ";" returns an empty string. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#194 + def get_tkread_clean(pattern, replacement); end + + # Extracts the visibility information for the visibility token +tk+ + # and +single+ class type identifier. + # + # Returns the visibility type (a string), the visibility (a symbol) and + # +singleton+ if the methods following should be converted to singleton + # methods. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#208 + def get_visibility_information(tk, single); end + + # Look for directives in a normal comment block: + # + # # :stopdoc: + # # Don't display comment from this point forward + # + # This routine modifies its +comment+ parameter. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#661 + def look_for_directives_in(container, comment); end + + # Adds useful info about the parser to +message+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#681 + def make_message(message); end + + # Creates a comment with the correct format + # + # source://rdoc//lib/rdoc/parser/ruby.rb#693 + def new_comment(comment, line_no = T.unsafe(nil)); end + + # Parses an +alias+ in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#762 + def parse_alias(context, single, tk, comment); end + + # Creates an RDoc::Attr for the name following +tk+, setting the comment to + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#704 + def parse_attr(context, single, tk, comment); end + + # Creates an RDoc::Attr for each attribute listed after +tk+, setting the + # comment for each to +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#733 + def parse_attr_accessor(context, single, tk, comment); end + + # Extracts call parameters from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#803 + def parse_call_parameters(tk); end + + # Parses a class in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#846 + def parse_class(container, single, tk, comment); end + + # Parses and creates a regular class + # + # source://rdoc//lib/rdoc/parser/ruby.rb#880 + def parse_class_regular(container, declaration_context, single, name_t, given_name, comment); end + + # Parses a singleton class in +container+ with the given +name+ and + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#920 + def parse_class_singleton(container, name, comment); end + + # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for + # :method: or :attr: directives in +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1085 + def parse_comment(container, tk, comment); end + + # Parse a comment that is describing an attribute in +container+ with the + # given +name+ and +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1113 + def parse_comment_attr(container, type, name, comment); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1125 + def parse_comment_ghost(container, text, name, column, line_no, comment); end + + # Creates an RDoc::Method on +container+ from +comment+ if there is a + # Signature section in the comment + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1164 + def parse_comment_tomdoc(container, tk, comment); end + + # Parses a constant in +context+ with +comment+. If +ignore_constants+ is + # true, no found constants will be added to RDoc. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#959 + def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1026 + def parse_constant_body(container, constant, is_array_or_hash); end + + # Parses a Module#private_constant or Module#public_constant call from +tk+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2103 + def parse_constant_visibility(container, single, tk); end + + # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to + # +container+ # with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1199 + def parse_extend_or_include(klass, container, comment); end + + # Parses identifiers that can create new methods or change visibility. + # + # Returns true if the comment was not consumed. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1237 + def parse_identifier(container, single, tk, comment); end + + # Parses an +included+ with a block feature of ActiveSupport::Concern. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1219 + def parse_included_with_activesupport_concern(container, comment); end + + # Parses a meta-programmed attribute and creates an RDoc::Attr. + # + # To create foo and bar attributes on class C with comment "My attributes": + # + # class C + # + # ## + # # :attr: + # # + # # My attributes + # + # my_attr :foo, :bar + # + # end + # + # To create a foo attribute on class C with comment "My attribute": + # + # class C + # + # ## + # # :attr: foo + # # + # # My attribute + # + # my_attr :foo, :bar + # + # end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1301 + def parse_meta_attr(context, single, tk, comment); end + + # Parses a meta-programmed method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1335 + def parse_meta_method(container, single, tk, comment); end + + # Parses the name of a metaprogrammed method. +comment+ is used to + # determine the name while +tk+ is used in an error message if the name + # cannot be determined. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1381 + def parse_meta_method_name(comment, tk); end + + # Parses the parameters and block for a meta-programmed method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1405 + def parse_meta_method_params(container, single, meth, tk, comment); end + + # Parses a normal method defined by +def+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1437 + def parse_method(container, single, tk, comment); end + + # Parses a method that needs to be ignored. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1522 + def parse_method_dummy(container); end + + # Parses the name of a method in +container+. + # + # Returns the method name, the container it is in (for def Foo.name) and if + # it is a singleton or regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1535 + def parse_method_name(container); end + + # For the given +container+ and initial name token +name_t+ the method name + # is parsed from the token stream for a regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1562 + def parse_method_name_regular(container, name_t); end + + # For the given +container+ and initial name token +name_t+ the method name + # and the new +container+ (if necessary) are parsed from the token stream + # for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1580 + def parse_method_name_singleton(container, name_t); end + + # Extracts +yield+ parameters from +method+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1624 + def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end + + # Capture the method's parameters. Along the way, look for a comment + # containing: + # + # # yields: .... + # + # and add this as the block_params for the method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1691 + def parse_method_parameters(method); end + + # Parses the parameters and body of +meth+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1492 + def parse_method_params_and_body(container, single, meth, added_container); end + + # Parses an RDoc::NormalModule in +container+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1706 + def parse_module(container, single, tk, comment); end + + # Parses an RDoc::Require in +context+ containing +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1728 + def parse_require(context, comment); end + + # Parses a rescue + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1749 + def parse_rescue; end + + # The core of the Ruby parser. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1780 + def parse_statements(container, single = T.unsafe(nil), current_method = T.unsafe(nil), comment = T.unsafe(nil)); end + + # Parse up to +no+ symbol arguments + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1971 + def parse_symbol_arg(no = T.unsafe(nil)); end + + # Parses up to +no+ symbol arguments surrounded by () and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1986 + def parse_symbol_arg_paren(no); end + + # Parses up to +no+ symbol arguments separated by spaces and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2014 + def parse_symbol_arg_space(no, tk); end + + # Returns symbol text from the next token + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2045 + def parse_symbol_in_arg; end + + # Parses statements in the top-level +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2062 + def parse_top_level_statements(container); end + + # Determines the visibility in +container+ from +tk+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2080 + def parse_visibility(container, single, tk); end + + # Determines the block parameter for +context+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2119 + def parse_yield(context, single, tk, method); end + + # Directives are modifier comments that can appear after class, module, or + # method names. For example: + # + # def fred # :yields: a, b + # + # or: + # + # + # We return the directive name and any parameters as a two element array if + # the name is in +allowed+. A directive can be found anywhere up to the end + # of the current line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2140 + def read_directive(allowed); end + + # Handles directives following the definition for +context+ (any + # RDoc::CodeObject) if the directives are +allowed+ at this point. + # + # See also RDoc::Markup::PreProcess#handle_directive + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2172 + def read_documentation_modifiers(context, allowed); end + + # Records the location of this +container+ in the file for this parser and + # adds it to the list of classes and modules in the file. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2191 + def record_location(container); end + + # Retrieve comment body without =begin/=end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1769 + def retrieve_comment_body(tk); end + + # Scans this Ruby file for Ruby constructs + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2203 + def scan; end + + # skip the var [in] part of a 'for' statement + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2291 + def skip_for_variable; end + + # Skips the next method in +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2302 + def skip_method(container); end + + # while, until, and for have an optional do + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2250 + def skip_optional_do_after_expression; end + + # Skip opening parentheses and yield the block. + # Skip closing parentheses too when exists. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#401 + def skip_parentheses(&block); end + + # Skip spaces until a comment is found + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2311 + def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end + + # Marks containers between +container+ and +ancestor+ as ignored + # + # source://rdoc//lib/rdoc/parser/ruby.rb#646 + def suppress_parents(container, ancestor); end + + # Return +true+ if +tk+ is a newline. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ruby.rb#186 + def tk_nl?(tk); end + + # Updates visibility in +container+ from +vis_type+ and +vis+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2323 + def update_visibility(container, vis_type, vis, singleton); end + + # Prints +message+ to +$stderr+ unless we're being quiet + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2368 + def warn(message); end +end + +# Collection of methods for writing parsers +# +# source://rdoc//lib/rdoc/parser/ruby_tools.rb#5 +module RDoc::Parser::RubyTools + # Adds a token listener +obj+, but you should probably use token_listener + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#10 + def add_token_listener(obj); end + + # Fetches the next token from the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#18 + def get_tk; end + + # Reads and returns all tokens up to one of +tokens+. Leaves the matched + # token in the token list. + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#52 + def get_tk_until(*tokens); end + + # Retrieves a String representation of the read tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#73 + def get_tkread; end + + # Peek equivalent for get_tkread + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#82 + def peek_read; end + + # Peek at the next token, but don't remove it from the stream + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#89 + def peek_tk; end + + # Removes the token listener +obj+ + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#97 + def remove_token_listener(obj); end + + # Resets the tools + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#104 + def reset; end + + # Skips whitespace tokens including newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#115 + def skip_tkspace; end + + # Skips whitespace tokens excluding newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#129 + def skip_tkspace_without_nl; end + + # Has +obj+ listen to tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#143 + def token_listener(obj); end + + # Returns +tk+ to the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#153 + def unget_tk(tk); end +end + +# Parse a non-source file. We basically take the whole thing as one big +# comment. +# +# source://rdoc//lib/rdoc/parser/simple.rb#6 +class RDoc::Parser::Simple < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Prepare to parse a plain file + # + # @return [Simple] a new instance of Simple + # + # source://rdoc//lib/rdoc/parser/simple.rb#17 + def initialize(top_level, file_name, content, options, stats); end + + # source://rdoc//lib/rdoc/parser/simple.rb#12 + def content; end + + # Removes the encoding magic comment from +text+ + # + # source://rdoc//lib/rdoc/parser/simple.rb#41 + def remove_coding_comment(text); end + + # Removes private comments. + # + # Unlike RDoc::Comment#remove_private this implementation only looks for two + # dashes at the beginning of the line. Three or more dashes are considered + # to be a rule and ignored. + # + # source://rdoc//lib/rdoc/parser/simple.rb#52 + def remove_private_comment(comment); end + + # Extract the file contents and attach them to the TopLevel as a comment + # + # source://rdoc//lib/rdoc/parser/simple.rb#28 + def scan; end +end + +# source://rdoc//lib/rdoc/rd.rb#72 +class RDoc::RD + class << self + # Parses +rd+ source and returns an RDoc::Markup::Document. If the + # =begin or =end lines are missing they will be added. + # + # source://rdoc//lib/rdoc/rd.rb#78 + def parse(rd); end + end +end + +# RD format parser for headings, paragraphs, lists, verbatim sections that +# exist as blocks. +# +# source://rdoc//lib/rdoc/rd/block_parser.rb#660 +class RDoc::RD::BlockParser < ::Racc::Parser + # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format + # document. + # + # @return [BlockParser] a new instance of BlockParser + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#695 + def initialize; end + + # reduce 0 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1330 + def _reduce_1(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1372 + def _reduce_10(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1377 + def _reduce_11(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1382 + def _reduce_12(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1390 + def _reduce_13(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1396 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1403 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1408 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1413 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1424 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1435 + def _reduce_19(val, _values, result); end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1335 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1441 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1447 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1453 + def _reduce_22(val, _values, result); end + + # reduce 26 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1469 + def _reduce_27(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1475 + def _reduce_28(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1481 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1340 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1487 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1492 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1497 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1503 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1508 + def _reduce_34(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1513 + def _reduce_35(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1519 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1525 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1530 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1535 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1345 + def _reduce_4(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1541 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1547 + def _reduce_41(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1552 + def _reduce_42(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1557 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1565 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1571 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1576 + def _reduce_46(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1581 + def _reduce_47(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1587 + def _reduce_48(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1593 + def _reduce_49(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1350 + def _reduce_5(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1599 + def _reduce_50(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1605 + def _reduce_51(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1611 + def _reduce_52(val, _values, result); end + + # reduce 53 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1618 + def _reduce_54(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1623 + def _reduce_55(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1630 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1355 + def _reduce_6(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1643 + def _reduce_62(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1649 + def _reduce_63(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1655 + def _reduce_64(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1661 + def _reduce_65(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1667 + def _reduce_66(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1673 + def _reduce_67(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1678 + def _reduce_68(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1683 + def _reduce_69(val, _values, result); end + + # reduce 70 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1690 + def _reduce_71(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1695 + def _reduce_72(val, _values, result); end + + # reduce 7 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1362 + def _reduce_8(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1367 + def _reduce_9(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1700 + def _reduce_none(val, _values, result); end + + # Adds footnote +content+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1045 + def add_footnote(content); end + + # Adds label +label+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1059 + def add_label(label); end + + # Retrieves the content of +values+ as a single String + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1028 + def content(values); end + + # Footnotes for this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#679 + def footnotes; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#689 + def include_path; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#689 + def include_path=(_arg0); end + + # Labels for items in this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#684 + def labels; end + + # Current line number + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#983 + def line_index; end + + # Returns the next token from the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#751 + def next_token; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#967 + def on_error(et, ev, _values); end + + # Creates a paragraph for +value+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1035 + def paragraph(value); end + + # Parses +src+ and returns an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#707 + def parse(src); end + + private + + # Cuts off excess whitespace in +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#931 + def cut_off(src); end + + # Formats line numbers +line_numbers+ prettily + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1019 + def format_line_num(*line_numbers); end + + # Retrieves the content for +file+ from the include_path + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1000 + def get_included(file); end + + # Yields to the given block if +indent+ matches the current indent, otherwise + # an indentation token is processed. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#913 + def if_current_indent_equal(indent); end + + # Parses subtree +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#990 + def parse_subtree(src); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#958 + def set_term_to_element(parent, term); end +end + +# source://rdoc//lib/rdoc/rd/block_parser.rb#1324 +RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# Inline keeps track of markup and labels to create proper links. +# +# source://rdoc//lib/rdoc/rd/inline.rb#5 +class RDoc::RD::Inline + # Initializes the Inline with +rdoc+ and +inline+ + # + # @return [Inline] a new instance of Inline + # + # source://rdoc//lib/rdoc/rd/inline.rb#34 + def initialize(rdoc, reference); end + + # source://rdoc//lib/rdoc/rd/inline.rb#42 + def ==(other); end + + # Appends +more+ to this inline. +more+ may be a String or another Inline. + # + # source://rdoc//lib/rdoc/rd/inline.rb#50 + def append(more); end + + # source://rdoc//lib/rdoc/rd/inline.rb#65 + def inspect; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def rdoc; end + + # The text of the reference + # + # source://rdoc//lib/rdoc/rd/inline.rb#10 + def reference; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def to_s; end + + class << self + # Creates a new Inline for +rdoc+ and +reference+. + # + # +rdoc+ may be another Inline or a String. If +reference+ is not given it + # will use the text from +rdoc+. + # + # source://rdoc//lib/rdoc/rd/inline.rb#23 + def new(rdoc, reference = T.unsafe(nil)); end + end +end + +# RD format parser for inline markup such as emphasis, links, footnotes, etc. +# +# source://rdoc//lib/rdoc/rd/inline_parser.rb#661 +class RDoc::RD::InlineParser < ::Racc::Parser + # Creates a new parser for inline markup in the rd format. The +block_parser+ + # is used to for footnotes and labels in the inline text. + # + # @return [InlineParser] a new instance of InlineParser + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#734 + def initialize(block_parser); end + + # reduce 100 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1746 + def _reduce_101(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1753 + def _reduce_102(val, _values, result); end + + # reduce 108 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1771 + def _reduce_109(val, _values, result); end + + # reduce 110 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1778 + def _reduce_111(val, _values, result); end + + # reduce 112 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1786 + def _reduce_113(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1791 + def _reduce_114(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1796 + def _reduce_115(val, _values, result); end + + # reduce 12 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1409 + def _reduce_13(val, _values, result); end + + # reduce 135 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1841 + def _reduce_136(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1416 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1423 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1430 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1437 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1445 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1451 + def _reduce_19(val, _values, result); end + + # reduce 1 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1381 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1459 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1465 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1474 + def _reduce_22(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1480 + def _reduce_23(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1486 + def _reduce_24(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1492 + def _reduce_25(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1501 + def _reduce_26(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1507 + def _reduce_27(val, _values, result); end + + # reduce 28 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1516 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1386 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1521 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1526 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1532 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1538 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1544 + def _reduce_34(val, _values, result); end + + # reduce 35 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1552 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1557 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1562 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1568 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1574 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1580 + def _reduce_41(val, _values, result); end + + # reduce 42 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1588 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1594 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1600 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1606 + def _reduce_46(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1632 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1638 + def _reduce_58(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1644 + def _reduce_59(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1650 + def _reduce_60(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1657 + def _reduce_62(val, _values, result); end + + # reduce 63 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1665 + def _reduce_64(val, _values, result); end + + # reduce 77 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1697 + def _reduce_78(val, _values, result); end + + # reduce 137 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1848 + def _reduce_none(val, _values, result); end + + # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#883 + def inline(rdoc, reference = T.unsafe(nil)); end + + # Returns the next token from the inline text + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#752 + def next_token; end + + # Returns words following an error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#872 + def next_words_on_error; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#832 + def on_error(et, ev, values); end + + # Parses the +inline+ text from RD format into RDoc format. + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#741 + def parse(inline); end + + # Returns words before the error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#849 + def prev_words_on_error(ev); end + + private + + # Returns the last line of +src+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#860 + def last_line(src); end +end + +# source://rdoc//lib/rdoc/rd/inline_parser.rb#1373 +RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This is the driver for generating RDoc output. It handles file parsing and +# generation of output. +# +# To use this class to generate RDoc output via the API, the recommended way +# is: +# +# rdoc = RDoc::RDoc.new +# options = RDoc::Options.load_options # returns an RDoc::Options instance +# # set extra options +# rdoc.document options +# +# You can also generate output like the +rdoc+ executable: +# +# rdoc = RDoc::RDoc.new +# rdoc.document argv +# +# Where +argv+ is an array of strings, each corresponding to an argument you'd +# give rdoc on the command line. See rdoc --help for details. +# +# source://rdoc//lib/rdoc/rdoc.rb#29 +class RDoc::RDoc + # Creates a new RDoc::RDoc instance. Call #document to parse files and + # generate documentation. + # + # @return [RDoc] a new instance of RDoc + # + # source://rdoc//lib/rdoc/rdoc.rb#100 + def initialize; end + + # Generates documentation or a coverage report depending upon the settings + # in +options+. + # + # +options+ can be either an RDoc::Options instance or an array of strings + # equivalent to the strings that would be passed on the command line like + # %w[-q -o doc -t My\ Doc\ Title]. #document will automatically + # call RDoc::Options#finish if an options instance was given. + # + # For a list of options, see either RDoc::Options or rdoc --help. + # + # By default, output will be stored in a directory called "doc" below the + # current directory, so make sure you're somewhere writable before invoking. + # + # source://rdoc//lib/rdoc/rdoc.rb#450 + def document(options); end + + # Report an error message and exit + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/rdoc.rb#113 + def error(msg); end + + # Gathers a set of parseable files from the files and directories listed in + # +files+. + # + # source://rdoc//lib/rdoc/rdoc.rb#121 + def gather_files(files); end + + # Generates documentation for +file_info+ (from #parse_files) into the + # output dir using the generator selected + # by the RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#515 + def generate; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator=(_arg0); end + + # Turns RDoc from stdin into HTML + # + # source://rdoc//lib/rdoc/rdoc.rb#142 + def handle_pipe; end + + # Installs a siginfo handler that prints the current filename. + # + # source://rdoc//lib/rdoc/rdoc.rb#157 + def install_siginfo_handler; end + + # Hash of files and their last modified times. + # + # source://rdoc//lib/rdoc/rdoc.rb#57 + def last_modified; end + + # Return a list of the files to be processed in a directory. We know that + # this directory doesn't have a .document file, so we're looking for real + # files. However we may well contain subdirectories which must be tested + # for .document files. + # + # source://rdoc//lib/rdoc/rdoc.rb#323 + def list_files_in_directory(dir); end + + # Given a list of files and directories, create a list of all the Ruby + # files they contain. + # + # If +force_doc+ is true we always add the given files, if false, only + # add files that we guarantee we can parse. It is true when looking at + # files given on the command line, false when recursing through + # subdirectories. + # + # The effect of this is that if you want a file with a non-standard + # extension parsed, you must name it explicitly. + # + # source://rdoc//lib/rdoc/rdoc.rb#275 + def normalized_file_list(relative_files, force_doc = T.unsafe(nil), exclude_pattern = T.unsafe(nil)); end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options; end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options=(_arg0); end + + # Return the path name of the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#240 + def output_flag_file(op_dir); end + + # The .document file contains a list of file and directory name patterns, + # representing candidates for documentation. It may also contain comments + # (starting with '#') + # + # source://rdoc//lib/rdoc/rdoc.rb#249 + def parse_dot_doc_file(in_dir, filename); end + + # Parses +filename+ and returns an RDoc::TopLevel + # + # source://rdoc//lib/rdoc/rdoc.rb#332 + def parse_file(filename); end + + # Parse each file on the command line, recursively entering directories. + # + # source://rdoc//lib/rdoc/rdoc.rb#404 + def parse_files(files); end + + # Removes a siginfo handler and replaces the previous + # + # source://rdoc//lib/rdoc/rdoc.rb#534 + def remove_siginfo_handler; end + + # Removes file extensions known to be unparseable from +files+ and TAGS + # files for emacs and vim. + # + # source://rdoc//lib/rdoc/rdoc.rb#428 + def remove_unparseable(files); end + + # Create an output dir if it doesn't exist. If it does exist, but doesn't + # contain the flag file created.rid then we refuse to use it, as + # we may clobber some manually generated documentation + # + # source://rdoc//lib/rdoc/rdoc.rb#170 + def setup_output_dir(dir, force); end + + # Accessor for statistics. Available after each call to parse_files + # + # source://rdoc//lib/rdoc/rdoc.rb#67 + def stats; end + + # The current documentation store + # + # source://rdoc//lib/rdoc/rdoc.rb#72 + def store; end + + # Sets the current documentation tree to +store+ and sets the store's rdoc + # driver to this instance. + # + # source://rdoc//lib/rdoc/rdoc.rb#215 + def store=(store); end + + # Update the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#223 + def update_output_dir(op_dir, time, last = T.unsafe(nil)); end + + class << self + # Add +klass+ that can generate output after parsing + # + # source://rdoc//lib/rdoc/rdoc.rb#77 + def add_generator(klass); end + + # Active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#85 + def current; end + + # Sets the active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#92 + def current=(rdoc); end + end +end + +# List of directory names skipped if test suites should be skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#46 +RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES = T.let(T.unsafe(nil), Array) + +# List of directory names always skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#41 +RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) + +# The RI driver implements the command-line ri tool. +# +# The driver supports: +# * loading RI data from: +# * Ruby's standard library +# * RubyGems +# * ~/.rdoc +# * A user-supplied directory +# * Paging output (uses RI_PAGER environment variable, PAGER environment +# variable or the less, more and pager programs) +# * Interactive mode with tab-completion +# * Abbreviated names (ri Zl shows Zlib documentation) +# * Colorized output +# * Merging output from multiple RI data sources +# +# source://rdoc//lib/rdoc/ri/driver.rb#25 +class RDoc::RI::Driver + # Creates a new driver using +initial_options+ from ::process_args + # + # @return [Driver] a new instance of Driver + # + # source://rdoc//lib/rdoc/ri/driver.rb#391 + def initialize(initial_options = T.unsafe(nil)); end + + # Adds paths for undocumented classes +also_in+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#429 + def add_also_in(out, also_in); end + + # Adds a class header to +out+ for class +name+ which is described in + # +classes+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#446 + def add_class(out, name, classes); end + + # Adds +extends+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#473 + def add_extends(out, extends); end + + # Adds a list of +extensions+ to this module of the given +type+ to +out+. + # add_includes and add_extends call this, so you should use those directly. + # + # source://rdoc//lib/rdoc/ri/driver.rb#481 + def add_extension_modules(out, type, extensions); end + + # Renders multiple included +modules+ from +store+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#499 + def add_extension_modules_multiple(out, store, modules); end + + # Adds a single extension module +include+ from +store+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#526 + def add_extension_modules_single(out, store, include); end + + # Adds "(from ...)" to +out+ for +store+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#466 + def add_from(out, store); end + + # Adds +includes+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#540 + def add_includes(out, includes); end + + # Looks up the method +name+ and adds it to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#547 + def add_method(out, name); end + + # Adds documentation for all methods in +klass+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#558 + def add_method_documentation(out, klass); end + + # Adds a list of +methods+ to +out+ with a heading of +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#571 + def add_method_list(out, methods, name); end + + # Returns ancestor classes of +klass+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#591 + def ancestors_of(klass); end + + # source://rdoc//lib/rdoc/ri/driver.rb#926 + def check_did_you_mean; end + + # For RubyGems backwards compatibility + # + # source://rdoc//lib/rdoc/ri/driver.rb#622 + def class_cache; end + + # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#628 + def class_document(name, found, klasses, includes, extends); end + + # Adds the class +comment+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#650 + def class_document_comment(out, comment); end + + # Adds the constants from +klass+ to the Document +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#670 + def class_document_constants(out, klass); end + + # Hash mapping a known class or module to the stores it can be loaded from + # + # source://rdoc//lib/rdoc/ri/driver.rb#694 + def classes; end + + # Returns the stores wherein +name+ is found along with the classes, + # extends and includes that match it + # + # source://rdoc//lib/rdoc/ri/driver.rb#714 + def classes_and_includes_and_extends_for(name); end + + # Completes +name+ based on the caches. For Readline + # + # source://rdoc//lib/rdoc/ri/driver.rb#739 + def complete(name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#750 + def complete_klass(name, klass, selector, method, completions); end + + # source://rdoc//lib/rdoc/ri/driver.rb#769 + def complete_method(name, klass, selector, completions); end + + # Converts +document+ to text and writes it to the pager + # + # source://rdoc//lib/rdoc/ri/driver.rb#789 + def display(document); end + + # Outputs formatted RI data for class +name+. Groups undocumented classes + # + # source://rdoc//lib/rdoc/ri/driver.rb#802 + def display_class(name); end + + # Outputs formatted RI data for method +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#818 + def display_method(name); end + + # Outputs formatted RI data for the class or method +name+. + # + # Returns true if +name+ was found, false if it was not an alternative could + # be guessed, raises an error if +name+ couldn't be guessed. + # + # source://rdoc//lib/rdoc/ri/driver.rb#832 + def display_name(name); end + + # Displays each name in +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#861 + def display_names(names); end + + # Outputs formatted RI data for page +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#872 + def display_page(name); end + + # Outputs a formatted RI page list for the pages in +store+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#903 + def display_page_list(store, pages = T.unsafe(nil), search = T.unsafe(nil)); end + + # Expands abbreviated klass +klass+ into a fully-qualified class. "Zl::Da" + # will be expanded to Zlib::DataError. + # + # source://rdoc//lib/rdoc/ri/driver.rb#947 + def expand_class(klass); end + + # Expands the class portion of +name+ into a fully-qualified class. See + # #expand_class. + # + # source://rdoc//lib/rdoc/ri/driver.rb#965 + def expand_name(name); end + + # Filters the methods in +found+ trying to find a match for +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#981 + def filter_methods(found, name); end + + # Yields items matching +name+ including the store they were found in, the + # class being searched for, the class they were found in (an ancestor) the + # types of methods to look up (from #method_type), and the method name being + # searched for + # + # source://rdoc//lib/rdoc/ri/driver.rb#999 + def find_methods(name); end + + # Finds a store that matches +name+ which can be the name of a gem, "ruby", + # "home" or "site". + # + # See also RDoc::Store#source + # + # @raise [RDoc::RI::Driver::NotFoundError] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1045 + def find_store(name); end + + # Creates a new RDoc::Markup::Formatter. If a formatter is given with -f, + # use it. If we're outputting to a pager, use bs, otherwise ansi. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1062 + def formatter(io); end + + # Runs ri interactively using Readline if it is available. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1075 + def interactive; end + + # Lists classes known to ri starting with +names+. If +names+ is empty all + # known classes are shown. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1114 + def list_known_classes(names = T.unsafe(nil)); end + + # Returns an Array of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1146 + def list_methods_matching(name); end + + # Loads RI data for method +name+ on +klass+ from +store+. +type+ and + # +cache+ indicate if it is a class or instance method. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1185 + def load_method(store, cache, klass, type, name); end + + # Returns an Array of RI data for methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1208 + def load_methods_matching(name); end + + # Returns a filtered list of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1229 + def lookup_method(name); end + + # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1254 + def method_document(name, filtered); end + + # Returns the type of method (:both, :instance, :class) for +selector+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1272 + def method_type(selector); end + + # Returns a regular expression for +name+ that will match an + # RDoc::AnyMethod's name. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1284 + def name_regexp(name); end + + # Paginates output through a pager program. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1298 + def page; end + + # Are we using a pager? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1316 + def paging?; end + + # Extracts the class, selector and method name parts from +name+ like + # Foo::Bar#baz. + # + # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a + # method + # + # source://rdoc//lib/rdoc/ri/driver.rb#1327 + def parse_name(name); end + + # Renders the +klass+ from +store+ to +out+. If the klass has no + # documentable items the class is added to +also_in+ instead. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1359 + def render_class(out, store, klass, also_in); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1389 + def render_method(out, store, method, name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1409 + def render_method_arguments(out, arglists); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1418 + def render_method_comment(out, method, alias_for = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1436 + def render_method_superclass(out, method); end + + # Looks up and displays ri data according to the options given. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1448 + def run; end + + # Sets up a pager program to pass output through. Tries the RI_PAGER and + # PAGER environment variables followed by pager, less then more. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1468 + def setup_pager; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#62 + def show_all; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#62 + def show_all=(_arg0); end + + # Starts a WEBrick server for ri. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1494 + def start_server; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#67 + def stores; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#67 + def stores=(_arg0); end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#72 + def use_stdout; end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#72 + def use_stdout=(_arg0); end + + class << self + # Default options for ri + # + # source://rdoc//lib/rdoc/ri/driver.rb#77 + def default_options; end + + # Dump +data_path+ using pp + # + # source://rdoc//lib/rdoc/ri/driver.rb#98 + def dump(data_path); end + + # Parses +argv+ and returns a Hash of options + # + # source://rdoc//lib/rdoc/ri/driver.rb#109 + def process_args(argv); end + + # Runs the ri command line executable using +argv+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#376 + def run(argv = T.unsafe(nil)); end + end +end + +# Raised when a name isn't found in the ri data stores +# +# source://rdoc//lib/rdoc/ri/driver.rb#35 +class RDoc::RI::Driver::NotFoundError < ::RDoc::RI::Driver::Error + # @return [NotFoundError] a new instance of NotFoundError + # + # source://rdoc//lib/rdoc/ri/driver.rb#37 + def initialize(klass, suggestion_proc = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#49 + def message; end + + # Name that wasn't found + # + # source://rdoc//lib/rdoc/ri/driver.rb#45 + def name; end +end + +# For RubyGems backwards compatibility +# +# source://rdoc//lib/rdoc/ri/formatter.rb#5 +module RDoc::RI::Formatter; end + +# source://rdoc//lib/rdoc/ri/store.rb#4 +RDoc::RI::Store = RDoc::Store + +# A file loaded by \#require +# +# source://rdoc//lib/rdoc/require.rb#5 +class RDoc::Require < ::RDoc::CodeObject + # Creates a new Require that loads +name+ with +comment+ + # + # @return [Require] a new instance of Require + # + # source://rdoc//lib/rdoc/require.rb#15 + def initialize(name, comment); end + + # source://rdoc//lib/rdoc/require.rb#22 + def inspect; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name=(_arg0); end + + # source://rdoc//lib/rdoc/require.rb#31 + def to_s; end + + # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. + # + # source://rdoc//lib/rdoc/require.rb#38 + def top_level; end +end + +# This is a WEBrick servlet that allows you to browse ri documentation. +# +# You can show documentation through either `ri --server` or, with RubyGems +# 2.0 or newer, `gem server`. For ri, the server runs on port 8214 by +# default. For RubyGems the server runs on port 8808 by default. +# +# You can use this servlet in your own project by mounting it on a WEBrick +# server: +# +# require 'webrick' +# +# server = WEBrick::HTTPServer.new Port: 8000 +# +# server.mount '/', RDoc::Servlet +# +# If you want to mount the servlet some other place than the root, provide the +# base path when mounting: +# +# server.mount '/rdoc', RDoc::Servlet, '/rdoc' +# +# source://rdoc//lib/rdoc/servlet.rb#34 +class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new WEBrick servlet. + # + # Use +mount_path+ when mounting the servlet somewhere other than /. + # + # Use +extra_doc_dirs+ for additional documentation directories. + # + # +server+ is provided automatically by WEBrick when mounting. +stores+ and + # +cache+ are provided automatically by the servlet. + # + # @return [Servlet] a new instance of Servlet + # + # source://rdoc//lib/rdoc/servlet.rb#69 + def initialize(server, stores, cache, mount_path = T.unsafe(nil), extra_doc_dirs = T.unsafe(nil)); end + + # Serves the asset at the path in +req+ for +generator_name+ via +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#100 + def asset(generator_name, req, res); end + + # Maps an asset type to its path on the filesystem + # + # source://rdoc//lib/rdoc/servlet.rb#42 + def asset_dirs; end + + # GET request entry point. Fills in +res+ for the path, etc. in +req+. + # + # source://rdoc//lib/rdoc/servlet.rb#119 + def do_GET(req, res); end + + # Fills in +res+ with the class, module or page for +req+ from +store+. + # + # +path+ is relative to the mount_path and is used to determine the class, + # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet). + # +generator+ is used to create the page. + # + # source://rdoc//lib/rdoc/servlet.rb#152 + def documentation_page(store, generator, path, req, res); end + + # Creates the JSON search index on +res+ for the given +store+. +generator+ + # must respond to \#json_index to build. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#171 + def documentation_search(store, generator, req, res); end + + # Returns the RDoc::Store and path relative to +mount_path+ for + # documentation at +path+. + # + # source://rdoc//lib/rdoc/servlet.rb#185 + def documentation_source(path); end + + # Generates an error page for the +exception+ while handling +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#203 + def error(exception, req, res); end + + # Instantiates a Darkfish generator for +store+ + # + # source://rdoc//lib/rdoc/servlet.rb#246 + def generator_for(store); end + + # Handles the If-Modified-Since HTTP header on +req+ for +path+. If the + # file has not been modified a Not Modified response is returned. If the + # file has been modified a Last-Modified header is added to +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#267 + def if_modified_since(req, res, path = T.unsafe(nil)); end + + # Returns an Array of installed documentation. + # + # Each entry contains the documentation name (gem name, 'Ruby + # Documentation', etc.), the path relative to the mount point, whether the + # documentation exists, the type of documentation (See RDoc::RI::Paths#each) + # and the filesystem to the RDoc::Store for the documentation. + # + # source://rdoc//lib/rdoc/servlet.rb#290 + def installed_docs; end + + # Returns a 404 page built by +generator+ for +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#318 + def not_found(generator, req, res, message = T.unsafe(nil)); end + + # An RDoc::Options instance used for rendering options + # + # source://rdoc//lib/rdoc/servlet.rb#47 + def options; end + + # Enumerates the ri paths. See RDoc::RI::Paths#each + # + # source://rdoc//lib/rdoc/servlet.rb#327 + def ri_paths(&block); end + + # Generates the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#334 + def root(req, res); end + + # Generates a search index for the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#345 + def root_search(req, res); end + + # Displays documentation for +req+ on +res+, whether that be HTML or some + # asset. + # + # source://rdoc//lib/rdoc/servlet.rb#395 + def show_documentation(req, res); end + + # Returns an RDoc::Store for the given +source_name+ ('ruby' or a gem name). + # + # source://rdoc//lib/rdoc/servlet.rb#419 + def store_for(source_name); end + + class << self + # Creates an instance of this servlet that shares cached data between + # requests. + # + # source://rdoc//lib/rdoc/servlet.rb#53 + def get_instance(server, *options); end + end +end + +# A singleton class +# +# source://rdoc//lib/rdoc/single_class.rb#5 +class RDoc::SingleClass < ::RDoc::ClassModule + # Adds the superclass to the included modules. + # + # source://rdoc//lib/rdoc/single_class.rb#10 + def ancestors; end + + # source://rdoc//lib/rdoc/single_class.rb#14 + def aref_prefix; end + + # The definition of this singleton class, class << MyClassName + # + # source://rdoc//lib/rdoc/single_class.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/single_class.rb#25 + def pretty_print(q); end +end + +# RDoc statistics collector which prints a summary and report of a project's +# documentation totals. +# +# source://rdoc//lib/rdoc/stats.rb#6 +class RDoc::Stats + include ::RDoc::Text + + # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 + # which will create an RDoc::Stats::Normal outputter. + # + # @return [Stats] a new instance of Stats + # + # source://rdoc//lib/rdoc/stats.rb#29 + def initialize(store, num_files, verbosity = T.unsafe(nil)); end + + # Records the parsing of an alias +as+. + # + # source://rdoc//lib/rdoc/stats.rb#52 + def add_alias(as); end + + # Records the parsing of an attribute +attribute+ + # + # source://rdoc//lib/rdoc/stats.rb#59 + def add_attribute(attribute); end + + # Records the parsing of a class +klass+ + # + # source://rdoc//lib/rdoc/stats.rb#66 + def add_class(klass); end + + # Records the parsing of +constant+ + # + # source://rdoc//lib/rdoc/stats.rb#73 + def add_constant(constant); end + + # Records the parsing of +file+ + # + # source://rdoc//lib/rdoc/stats.rb#80 + def add_file(file); end + + # Records the parsing of +method+ + # + # source://rdoc//lib/rdoc/stats.rb#88 + def add_method(method); end + + # Records the parsing of a module +mod+ + # + # source://rdoc//lib/rdoc/stats.rb#95 + def add_module(mod); end + + # Call this to mark the beginning of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#102 + def begin_adding; end + + # Calculates documentation totals and percentages for classes, modules, + # constants, attributes and methods. + # + # source://rdoc//lib/rdoc/stats.rb#110 + def calculate; end + + # Output level for the coverage report + # + # source://rdoc//lib/rdoc/stats.rb#13 + def coverage_level; end + + # Sets coverage report level. Accepted values are: + # + # false or nil:: No report + # 0:: Classes, modules, constants, attributes, methods + # 1:: Level 0 + method parameters + # + # source://rdoc//lib/rdoc/stats.rb#158 + def coverage_level=(level); end + + # Returns the length and number of undocumented items in +collection+. + # + # source://rdoc//lib/rdoc/stats.rb#167 + def doc_stats(collection); end + + # Call this to mark the end of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#175 + def done_adding; end + + # Count of files parsed during parsing + # + # source://rdoc//lib/rdoc/stats.rb#18 + def files_so_far; end + + # The documentation status of this project. +true+ when 100%, +false+ when + # less than 100% and +nil+ when unknown. + # + # Set by calling #calculate + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/stats.rb#185 + def fully_documented?; end + + # A report that says you did a great job! + # + # source://rdoc//lib/rdoc/stats.rb#192 + def great_job; end + + # Total number of files found + # + # source://rdoc//lib/rdoc/stats.rb#23 + def num_files; end + + # Calculates the percentage of items documented. + # + # source://rdoc//lib/rdoc/stats.rb#204 + def percent_doc; end + + # Returns a report on which items are not documented + # + # source://rdoc//lib/rdoc/stats.rb#218 + def report; end + + # Returns a report on undocumented attributes in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#259 + def report_attributes(cm); end + + # Returns a report on undocumented items in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#277 + def report_class_module(cm); end + + # Returns a report on undocumented constants in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#329 + def report_constants(cm); end + + # Returns a report on undocumented methods in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#351 + def report_methods(cm); end + + # Returns a summary of the collected statistics. + # + # source://rdoc//lib/rdoc/stats.rb#389 + def summary; end + + # Determines which parameters in +method+ were not documented. Returns a + # total parameter count and an Array of undocumented methods. + # + # source://rdoc//lib/rdoc/stats.rb#439 + def undoc_params(method); end +end + +# Stats printer that prints just the files being documented with a progress +# bar +# +# source://rdoc//lib/rdoc/stats/normal.rb#13 +class RDoc::Stats::Normal < ::RDoc::Stats::Quiet + # source://rdoc//lib/rdoc/stats/normal.rb#15 + def begin_adding; end + + # source://rdoc//lib/rdoc/stats/normal.rb#54 + def done_adding; end + + # Prints a file with a progress bar + # + # source://rdoc//lib/rdoc/stats/normal.rb#23 + def print_file(files_so_far, filename); end +end + +# Stats printer that prints nothing +# +# source://rdoc//lib/rdoc/stats/quiet.rb#5 +class RDoc::Stats::Quiet + # Creates a new Quiet that will print nothing + # + # @return [Quiet] a new instance of Quiet + # + # source://rdoc//lib/rdoc/stats/quiet.rb#10 + def initialize(num_files); end + + # Prints a message at the beginning of parsing + # + # source://rdoc//lib/rdoc/stats/quiet.rb#17 + def begin_adding(*_arg0); end + + # Prints when RDoc is done + # + # source://rdoc//lib/rdoc/stats/quiet.rb#57 + def done_adding(*_arg0); end + + # Prints when an alias is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#22 + def print_alias(*_arg0); end + + # Prints when an attribute is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#27 + def print_attribute(*_arg0); end + + # Prints when a class is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#32 + def print_class(*_arg0); end + + # Prints when a constant is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#37 + def print_constant(*_arg0); end + + # Prints when a file is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#42 + def print_file(*_arg0); end + + # Prints when a method is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#47 + def print_method(*_arg0); end + + # Prints when a module is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#52 + def print_module(*_arg0); end +end + +# Stats printer that prints everything documented, including the documented +# status +# +# source://rdoc//lib/rdoc/stats/verbose.rb#6 +class RDoc::Stats::Verbose < ::RDoc::Stats::Normal + # Returns a marker for RDoc::CodeObject +co+ being undocumented + # + # source://rdoc//lib/rdoc/stats/verbose.rb#11 + def nodoc(co); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#15 + def print_alias(as); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#19 + def print_attribute(attribute); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#23 + def print_class(klass); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#27 + def print_constant(constant); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#31 + def print_file(files_so_far, file); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#36 + def print_method(method); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#40 + def print_module(mod); end +end + +# A set of rdoc data for a single project (gem, path, etc.). +# +# The store manages reading and writing ri data for a project and maintains a +# cache of methods, classes and ancestors in the store. +# +# The store maintains a #cache of its contents for faster lookup. After +# adding items to the store it must be flushed using #save_cache. The cache +# contains the following structures: +# +# @cache = { +# :ancestors => {}, # class name => ancestor names +# :attributes => {}, # class name => attributes +# :class_methods => {}, # class name => class methods +# :instance_methods => {}, # class name => instance methods +# :modules => [], # classes and modules in this store +# :pages => [], # page names +# } +# -- +# TODO need to prune classes +# +# source://rdoc//lib/rdoc/store.rb#25 +class RDoc::Store + # Creates a new Store of +type+ that will load or save to +path+ + # + # @return [Store] a new instance of Store + # + # source://rdoc//lib/rdoc/store.rb#127 + def initialize(path = T.unsafe(nil), type = T.unsafe(nil)); end + + # Adds +module+ as an enclosure (namespace) for the given +variable+ for C + # files. + # + # source://rdoc//lib/rdoc/store.rb#169 + def add_c_enclosure(variable, namespace); end + + # Adds C variables from an RDoc::Parser::C + # + # source://rdoc//lib/rdoc/store.rb#176 + def add_c_variables(c_parser); end + + # Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the + # created RDoc::TopLevel. + # + # source://rdoc//lib/rdoc/store.rb#188 + def add_file(absolute_name, relative_name: T.unsafe(nil), parser: T.unsafe(nil)); end + + # Returns all classes discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#212 + def all_classes; end + + # Returns all classes and modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#219 + def all_classes_and_modules; end + + # All TopLevels known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#226 + def all_files; end + + # Returns all modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#233 + def all_modules; end + + # Ancestors cache accessor. Maps a klass name to an Array of its ancestors + # in this store. If Foo in this store inherits from Object, Kernel won't be + # listed (it will be included from ruby's ri store). + # + # source://rdoc//lib/rdoc/store.rb#242 + def ancestors; end + + # Attributes cache accessor. Maps a class to an Array of its attributes. + # + # source://rdoc//lib/rdoc/store.rb#249 + def attributes; end + + # Maps C variables to class or module names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#80 + def c_class_variables; end + + # Stores the name of the C variable a class belongs to. This helps wire up + # classes defined from C across files. + # + # source://rdoc//lib/rdoc/store.rb#73 + def c_enclosure_classes; end + + # source://rdoc//lib/rdoc/store.rb#75 + def c_enclosure_names; end + + # Maps C variables to singleton class names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#85 + def c_singleton_class_variables; end + + # The contents of the Store + # + # source://rdoc//lib/rdoc/store.rb#112 + def cache; end + + # Path to the cache file + # + # source://rdoc//lib/rdoc/store.rb#256 + def cache_path; end + + # Path to the ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#263 + def class_file(klass_name); end + + # Class methods cache accessor. Maps a class to an Array of its class + # methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#272 + def class_methods; end + + # Path where data for +klass_name+ will be stored (methods or class data) + # + # source://rdoc//lib/rdoc/store.rb#279 + def class_path(klass_name); end + + # Hash of all classes known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#286 + def classes_hash; end + + # Removes empty items and ensures item in each collection are unique and + # sorted + # + # source://rdoc//lib/rdoc/store.rb#294 + def clean_cache_collection(collection); end + + # Prepares the RDoc code object tree for use by a generator. + # + # It finds unique classes/modules defined, and replaces classes/modules that + # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for + # set. + # + # It updates the RDoc::ClassModule#constant_aliases attribute of "real" + # classes or modules. + # + # It also completely removes the classes and modules that should be removed + # from the documentation and the methods that have a visibility below + # +min_visibility+, which is the --visibility option. + # + # See also RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#322 + def complete(min_visibility); end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run; end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run=(_arg0); end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding; end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding=(_arg0); end + + # Hash of all files known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#362 + def files_hash; end + + # Finds the enclosure (namespace) for the given C +variable+. + # + # source://rdoc//lib/rdoc/store.rb#369 + def find_c_enclosure(variable); end + + # Finds the class with +name+ in all discovered classes + # + # source://rdoc//lib/rdoc/store.rb#394 + def find_class_named(name); end + + # Finds the class with +name+ starting in namespace +from+ + # + # source://rdoc//lib/rdoc/store.rb#401 + def find_class_named_from(name, from); end + + # Finds the class or module with +name+ + # + # source://rdoc//lib/rdoc/store.rb#419 + def find_class_or_module(name); end + + # Finds the file with +name+ in all discovered files + # + # source://rdoc//lib/rdoc/store.rb#427 + def find_file_named(name); end + + # Finds the module with +name+ in all discovered modules + # + # source://rdoc//lib/rdoc/store.rb#434 + def find_module_named(name); end + + # Returns the RDoc::TopLevel that is a text file and has the given + # +file_name+ + # + # source://rdoc//lib/rdoc/store.rb#442 + def find_text_page(file_name); end + + # Finds unique classes/modules defined in +all_hash+, + # and returns them as an array. Performs the alias + # updates in +all_hash+: see ::complete. + # -- + # TODO aliases should be registered by Context#add_module_alias + # + # source://rdoc//lib/rdoc/store.rb#455 + def find_unique(all_hash); end + + # Fixes the erroneous BasicObject < Object in 1.9. + # + # Because we assumed all classes without a stated superclass + # inherit from Object, we have the above wrong inheritance. + # + # We fix BasicObject right away if we are running in a Ruby + # version >= 1.9. + # + # source://rdoc//lib/rdoc/store.rb#474 + def fix_basic_object_inheritance; end + + # Friendly rendition of #path + # + # source://rdoc//lib/rdoc/store.rb#483 + def friendly_path; end + + # source://rdoc//lib/rdoc/store.rb#495 + def inspect; end + + # Instance methods cache accessor. Maps a class to an Array of its + # instance methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#503 + def instance_methods; end + + # Loads all items from this store into memory. This recreates a + # documentation tree for use by a generator + # + # source://rdoc//lib/rdoc/store.rb#511 + def load_all; end + + # Loads cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#559 + def load_cache; end + + # Loads ri data for +klass_name+ and hooks it up to this store. + # + # source://rdoc//lib/rdoc/store.rb#598 + def load_class(klass_name); end + + # Loads ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#616 + def load_class_data(klass_name); end + + # Loads ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#629 + def load_method(klass_name, method_name); end + + # Loads ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#645 + def load_page(page_name); end + + # Gets the main page for this RDoc store. This page is used as the root of + # the RDoc server. + # + # source://rdoc//lib/rdoc/store.rb#661 + def main; end + + # Sets the main page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#668 + def main=(page); end + + # Converts the variable => ClassModule map +variables+ from a C parser into + # a variable => class name map. + # + # source://rdoc//lib/rdoc/store.rb#676 + def make_variable_map(variables); end + + # Path to the ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#689 + def method_file(klass_name, method_name); end + + # Modules cache accessor. An Array of all the module (and class) names in + # the store. + # + # source://rdoc//lib/rdoc/store.rb#703 + def module_names; end + + # Hash of all modules known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#710 + def modules_hash; end + + # Returns the RDoc::TopLevel that is a text file and has the given +name+ + # + # source://rdoc//lib/rdoc/store.rb#717 + def page(name); end + + # Path to the ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#726 + def page_file(page_name); end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path; end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path=(_arg0); end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc; end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc=(_arg0); end + + # Removes from +all_hash+ the contexts that are nodoc or have no content. + # + # See RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#737 + def remove_nodoc(all_hash); end + + # Saves all entries in the store + # + # source://rdoc//lib/rdoc/store.rb#747 + def save; end + + # Writes the cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#772 + def save_cache; end + + # Writes the ri data for +klass+ (or module) + # + # source://rdoc//lib/rdoc/store.rb#799 + def save_class(klass); end + + # Writes the ri data for +method+ on +klass+ + # + # source://rdoc//lib/rdoc/store.rb#873 + def save_method(klass, method); end + + # Writes the ri data for +page+ + # + # source://rdoc//lib/rdoc/store.rb#896 + def save_page(page); end + + # Source of the contents of this store. + # + # For a store from a gem the source is the gem name. For a store from the + # home directory the source is "home". For system ri store (the standard + # library documentation) the source is"ruby". For a store from the site + # ri directory the store is "site". For other stores the source is the + # #path. + # + # source://rdoc//lib/rdoc/store.rb#922 + def source; end + + # Gets the title for this RDoc store. This is used as the title in each + # page on the RDoc server + # + # source://rdoc//lib/rdoc/store.rb#936 + def title; end + + # Sets the title page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#943 + def title=(title); end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type; end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type=(_arg0); end + + # Returns the unique classes discovered by RDoc. + # + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#952 + def unique_classes; end + + # Returns the unique classes and modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#960 + def unique_classes_and_modules; end + + # Returns the unique modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#968 + def unique_modules; end + + # The lazy constants alias will be discovered in passing + # + # source://rdoc//lib/rdoc/store.rb#122 + def unmatched_constant_alias; end + + # Sets the parser of +absolute_name+, unless it from a source code file. + # + # source://rdoc//lib/rdoc/store.rb#203 + def update_parser_of_file(absolute_name, parser); end + + private + + # source://rdoc//lib/rdoc/store.rb#973 + def marshal_load(file); end +end + +# source://rdoc//lib/rdoc/store.rb#977 +RDoc::Store::MarshalFilter = T.let(T.unsafe(nil), Proc) + +# Raised when a stored file for a class, module, page or method is missing. +# +# source://rdoc//lib/rdoc/store.rb#36 +class RDoc::Store::MissingFileError < ::RDoc::Store::Error + # Creates a new MissingFileError for the missing +file+ for the given + # +name+ that should have been in the +store+. + # + # @return [MissingFileError] a new instance of MissingFileError + # + # source://rdoc//lib/rdoc/store.rb#57 + def initialize(store, file, name); end + + # The file the #name should be saved as + # + # source://rdoc//lib/rdoc/store.rb#46 + def file; end + + # source://rdoc//lib/rdoc/store.rb#63 + def message; end + + # The name of the object the #file would be loaded from + # + # source://rdoc//lib/rdoc/store.rb#51 + def name; end + + # The store the file should exist in + # + # source://rdoc//lib/rdoc/store.rb#41 + def store; end +end + +# RDoc::Task creates the following rake tasks to generate and clean up RDoc +# output: +# +# [rdoc] +# Main task for this RDoc task. +# +# [clobber_rdoc] +# Delete all the rdoc files. This target is automatically added to the main +# clobber target. +# +# [rerdoc] +# Rebuild the rdoc files from scratch, even if they are not out of date. +# +# [rdoc:coverage] +# Print RDoc coverage report for all rdoc files. +# +# Simple Example: +# +# require 'rdoc/task' +# +# RDoc::Task.new do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# end +# +# The +rdoc+ object passed to the block is an RDoc::Task object. See the +# attributes list for the RDoc::Task class for available customization options. +# +# == Specifying different task names +# +# You may wish to give the task a different name, such as if you are +# generating two sets of documentation. For instance, if you want to have a +# development set of documentation including private methods: +# +# require 'rdoc/task' +# +# RDoc::Task.new :rdoc_dev do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# rdoc.options << "--all" +# end +# +# The tasks would then be named :rdoc_dev, +# :clobber_rdoc_dev, and :rerdoc_dev. +# +# If you wish to have completely different task names, then pass a Hash as +# first argument. With the :rdoc, :clobber_rdoc and +# :rerdoc options, you can customize the task names to your liking. +# +# For example: +# +# require 'rdoc/task' +# +# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", +# :rerdoc => "rdoc:force") +# +# This will create the tasks :rdoc, :rdoc:clean, +# :rdoc:force, and :rdoc:coverage. +# +# source://rdoc//lib/rdoc/task.rb#99 +class RDoc::Task < ::Rake::TaskLib + # Create an RDoc task with the given name. See the RDoc::Task class overview + # for documentation. + # + # @return [Task] a new instance of Task + # @yield [_self] + # @yieldparam _self [RDoc::Task] the object that the method was called on + # + # source://rdoc//lib/rdoc/task.rb#158 + def initialize(name = T.unsafe(nil)); end + + # The block passed to this method will be called just before running the + # RDoc generator. It is allowed to modify RDoc::Task attributes inside the + # block. + # + # source://rdoc//lib/rdoc/task.rb#288 + def before_running_rdoc(&block); end + + # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and + # :rerdoc. If other names are given an ArgumentError is raised. + # + # source://rdoc//lib/rdoc/task.rb#174 + def check_names(names); end + + # Task description for the clobber rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#188 + def clobber_task_description; end + + # Task description for the coverage task or its renamed description + # + # source://rdoc//lib/rdoc/task.rb#309 + def coverage_task_description; end + + # Sets default task values + # + # source://rdoc//lib/rdoc/task.rb#195 + def defaults; end + + # Create the tasks defined by this task lib. + # + # source://rdoc//lib/rdoc/task.rb#224 + def define; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#152 + def external; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#152 + def external=(_arg0); end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#137 + def generator; end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#137 + def generator=(_arg0); end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#209 + def inline_source; end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#217 + def inline_source=(value); end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#126 + def main; end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#126 + def main=(_arg0); end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#110 + def markup; end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#110 + def markup=(_arg0); end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#104 + def name; end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#104 + def name=(_arg0); end + + # List of options that will be supplied to RDoc + # + # source://rdoc//lib/rdoc/task.rb#272 + def option_list; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#147 + def options; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#147 + def options=(_arg0); end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#115 + def rdoc_dir; end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#115 + def rdoc_dir=(_arg0); end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#142 + def rdoc_files; end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#142 + def rdoc_files=(_arg0); end + + # Task description for the rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#295 + def rdoc_task_description; end + + # Task description for the rerdoc task or its renamed description + # + # source://rdoc//lib/rdoc/task.rb#302 + def rerdoc_task_description; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#131 + def template; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#131 + def template=(_arg0); end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#120 + def title; end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#120 + def title=(_arg0); end + + private + + # source://rdoc//lib/rdoc/task.rb#326 + def clobber_task_name; end + + # source://rdoc//lib/rdoc/task.rb#340 + def coverage_task_name; end + + # source://rdoc//lib/rdoc/task.rb#315 + def rdoc_target; end + + # source://rdoc//lib/rdoc/task.rb#319 + def rdoc_task_name; end + + # source://rdoc//lib/rdoc/task.rb#333 + def rerdoc_task_name; end +end + +# Methods for manipulating comment text +# +# source://rdoc//lib/rdoc/text.rb#11 +module RDoc::Text + # Expands tab characters in +text+ to eight spaces + # + # source://rdoc//lib/rdoc/text.rb#63 + def expand_tabs(text); end + + # Flush +text+ left based on the shortest line + # + # source://rdoc//lib/rdoc/text.rb#82 + def flush_left(text); end + + # The language for this text. This affects stripping comments + # markers. + # + # source://rdoc//lib/rdoc/text.rb#17 + def language; end + + # The language for this text. This affects stripping comments + # markers. + # + # source://rdoc//lib/rdoc/text.rb#17 + def language=(_arg0); end + + # Convert a string in markup format into HTML. + # + # Requires the including class to implement #formatter + # + # source://rdoc//lib/rdoc/text.rb#101 + def markup(text); end + + # Strips hashes, expands tabs then flushes +text+ to the left + # + # source://rdoc//lib/rdoc/text.rb#117 + def normalize_comment(text); end + + # Normalizes +text+ then builds a RDoc::Markup::Document from it + # + # source://rdoc//lib/rdoc/text.rb#135 + def parse(text, format = T.unsafe(nil)); end + + # The first +limit+ characters of +text+ as HTML + # + # source://rdoc//lib/rdoc/text.rb#149 + def snippet(text, limit = T.unsafe(nil)); end + + # Strips leading # characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#158 + def strip_hashes(text); end + + # Strips leading and trailing \n characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#170 + def strip_newlines(text); end + + # Strips /* */ style comments + # + # source://rdoc//lib/rdoc/text.rb#177 + def strip_stars(text); end + + # source://rdoc//lib/rdoc/text.rb#200 + def to_html(text); end + + # Wraps +txt+ to +line_len+ + # + # source://rdoc//lib/rdoc/text.rb#287 + def wrap(txt, line_len = T.unsafe(nil)); end + + class << self + # Transcodes +character+ to +encoding+ with a +fallback+ character. + # + # source://rdoc//lib/rdoc/text.rb#55 + def encode_fallback(character, encoding, fallback); end + end +end + +# Character class to be separated by a space when concatenating +# lines. +# +# source://rdoc//lib/rdoc/text.rb#320 +RDoc::Text::SPACE_SEPARATED_LETTER_CLASS = T.let(T.unsafe(nil), Regexp) + +# A TokenStream is a list of tokens, gathered during the parse of some entity +# (say a method). Entities populate these streams by being registered with the +# lexer. Any class can collect tokens by including TokenStream. From the +# outside, you use such an object by calling the start_collecting_tokens +# method, followed by calls to add_token and pop_token. +# +# source://rdoc//lib/rdoc/token_stream.rb#9 +module RDoc::TokenStream + # Adds one +token+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#84 + def add_token(token); end + + # Adds +tokens+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#77 + def add_tokens(tokens); end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def collect_tokens; end + + # Remove the last token from the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#100 + def pop_token; end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def start_collecting_tokens; end + + # Current token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#107 + def token_stream; end + + # Returns a string representation of the token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#114 + def tokens_to_s; end + + class << self + # Converts +token_stream+ to HTML wrapping various tokens with + # elements. Some tokens types are wrapped in spans + # with the given class names. Other token types are not wrapped in spans. + # + # source://rdoc//lib/rdoc/token_stream.rb#16 + def to_html(token_stream); end + end +end + +# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a) +# +# The TomDoc specification can be found at: +# +# http://tomdoc.org +# +# The latest version of the TomDoc specification can be found at: +# +# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md +# +# To choose TomDoc as your only default format see RDoc::Options@Saved+Options +# for instructions on setting up a .rdoc_options file to store +# your project default. +# +# There are a few differences between this parser and the specification. A +# best-effort was made to follow the specification as closely as possible but +# some choices to deviate were made. +# +# A future version of RDoc will warn when a MUST or MUST NOT is violated and +# may warn when a SHOULD or SHOULD NOT is violated. RDoc will always try +# to emit documentation even if given invalid TomDoc. +# +# Here are some implementation choices this parser currently makes: +# +# This parser allows rdoc-style inline markup but you should not depended on +# it. +# +# This parser allows a space between the comment and the method body. +# +# This parser does not require the default value to be described for an +# optional argument. +# +# This parser does not examine the order of sections. An Examples section may +# precede the Arguments section. +# +# This class is documented in TomDoc format. Since this is a subclass of the +# RDoc markup parser there isn't much to see here, unfortunately. +# +# source://rdoc//lib/rdoc/tom_doc.rb#42 +class RDoc::TomDoc < ::RDoc::Markup::Parser + # Public: Creates a new TomDoc parser. See also RDoc::Markup::parse + # + # @return [TomDoc] a new instance of TomDoc + # + # source://rdoc//lib/rdoc/tom_doc.rb#130 + def initialize; end + + # Internal: Builds a heading from the token stream + # + # level - The level of heading to create + # + # Returns an RDoc::Markup::Heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#143 + def build_heading(level); end + + # Internal: Builds a paragraph from the token stream + # + # margin - Unused + # + # Returns an RDoc::Markup::Paragraph. + # + # source://rdoc//lib/rdoc/tom_doc.rb#173 + def build_paragraph(margin); end + + # Internal: Builds a verbatim from the token stream. A verbatim in the + # Examples section will be marked as in Ruby format. + # + # margin - The indentation from the margin for lines that belong to this + # verbatim section. + # + # Returns an RDoc::Markup::Verbatim + # + # source://rdoc//lib/rdoc/tom_doc.rb#159 + def build_verbatim(margin); end + + # Detects a section change to "Returns" and adds a heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#213 + def parse_text(parent, indent); end + + # Internal: Turns text into an Array of tokens + # + # text - A String containing TomDoc-format text. + # + # Returns self. + # + # source://rdoc//lib/rdoc/tom_doc.rb#231 + def tokenize(text); end + + # Internal: Token accessor + # + # source://rdoc//lib/rdoc/tom_doc.rb#46 + def tokens; end + + class << self + # Internal: Adds a post-processor which sets the RDoc section based on the + # comment's status. + # + # Returns nothing. + # + # source://rdoc//lib/rdoc/tom_doc.rb#53 + def add_post_processor; end + + # Public: Parses TomDoc from text + # + # text - A String containing TomDoc-format text. + # + # Examples + # + # RDoc::TomDoc.parse <<-TOMDOC + # This method does some things + # + # Returns nothing. + # TOMDOC + # # => # + # + # Returns an RDoc::Markup::Document representing the TomDoc format. + # + # source://rdoc//lib/rdoc/tom_doc.rb#84 + def parse(text); end + + # Internal: Extracts the Signature section's method signature + # + # comment - An RDoc::Comment that will be parsed and have the signature + # extracted + # + # Returns a String containing the signature and nil if not + # + # source://rdoc//lib/rdoc/tom_doc.rb#100 + def signature(comment); end + end +end + +# A TopLevel context is a representation of the contents of a single file +# +# source://rdoc//lib/rdoc/top_level.rb#5 +class RDoc::TopLevel < ::RDoc::Context + # Creates a new TopLevel for the file at +absolute_name+. If documentation + # is being generated outside the source dir +relative_name+ is relative to + # the source directory. + # + # @return [TopLevel] a new instance of TopLevel + # + # source://rdoc//lib/rdoc/top_level.rb#43 + def initialize(absolute_name, relative_name = T.unsafe(nil)); end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#67 + def ==(other); end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name; end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name=(_arg0); end + + # Adds +an_alias+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#76 + def add_alias(an_alias); end + + # Adds +constant+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#85 + def add_constant(constant); end + + # Adds +include+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#94 + def add_include(include); end + + # Adds +method+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#103 + def add_method(method); end + + # Adds class or module +mod+. Used in the building phase + # by the Ruby parser. + # + # source://rdoc//lib/rdoc/top_level.rb#113 + def add_to_classes_or_modules(mod); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#120 + def base_name; end + + # All the classes or modules that were declared in + # this file. These are assigned to either +#classes_hash+ + # or +#modules_hash+ once we know what they really are. + # + # source://rdoc//lib/rdoc/top_level.rb#29 + def classes_or_modules; end + + # Returns a URL for this source file on some web repository. Use the -W + # command line option to set. + # + # source://rdoc//lib/rdoc/generator/markup.rb#149 + def cvs_url; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram=(_arg0); end + + # Only a TopLevel that contains text file) will be displayed. See also + # RDoc::CodeObject#display? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#130 + def display?; end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#67 + def eql?(other); end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat; end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat=(_arg0); end + + # See RDoc::TopLevel::find_class_or_module + # -- + # TODO Why do we search through all classes/modules found, not just the + # ones of this instance? + # + # source://rdoc//lib/rdoc/top_level.rb#140 + def find_class_or_module(name); end + + # Finds a class or module named +symbol+ + # + # source://rdoc//lib/rdoc/top_level.rb#147 + def find_local_symbol(symbol); end + + # Finds a module or class with +name+ + # + # source://rdoc//lib/rdoc/top_level.rb#154 + def find_module_named(name); end + + # Returns the relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#161 + def full_name; end + + # An RDoc::TopLevel has the same hash as another with the same + # relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#169 + def hash; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/top_level.rb#176 + def http_url(prefix); end + + # source://rdoc//lib/rdoc/top_level.rb#182 + def inspect; end + + # Time this file was last modified, if known + # + # source://rdoc//lib/rdoc/top_level.rb#194 + def last_modified; end + + # Dumps this TopLevel for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/top_level.rb#201 + def marshal_dump; end + + # Loads this TopLevel from +array+. + # + # source://rdoc//lib/rdoc/top_level.rb#213 + def marshal_load(array); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#120 + def name; end + + # Returns the NormalClass "Object", creating it if not found. + # + # Records +self+ as a location in "Object". + # + # source://rdoc//lib/rdoc/top_level.rb#227 + def object_class; end + + # Base name of this file without the extension + # + # source://rdoc//lib/rdoc/top_level.rb#238 + def page_name; end + + # The parser class that processed this file + # + # source://rdoc//lib/rdoc/top_level.rb#36 + def parser; end + + # Sets the parser for this toplevel context, also the store. + # + # source://rdoc//lib/rdoc/top_level.rb#58 + def parser=(val); end + + # Path to this file for use with HTML generator output. + # + # source://rdoc//lib/rdoc/top_level.rb#248 + def path; end + + # source://rdoc//lib/rdoc/top_level.rb#252 + def pretty_print(q); end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name; end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name=(_arg0); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/top_level.rb#266 + def search_record; end + + # Is this TopLevel from a text file instead of a source code file? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#283 + def text?; end + + # source://rdoc//lib/rdoc/top_level.rb#287 + def to_s; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/task.rb#347 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils +end + +# For backwards compatibility +# +# source://rdoc//lib/rdoc/task.rb#352 +Rake::RDocTask = RDoc::Task diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/regexp_parser@2.9.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/regexp_parser@2.9.2.rbi new file mode 100644 index 0000000..584c455 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/regexp_parser@2.9.2.rbi @@ -0,0 +1,3772 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#1 +module Regexp::Expression; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#5 +class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def alternatives; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#9 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#6 +Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative + +# A sequence of expressions, used by Alternation as one of its alternatives. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#3 +class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#10 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#2 +module Regexp::Expression::Anchor; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#18 +Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#20 +Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#3 +class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#5 +class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#11 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#8 +class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#12 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#19 +Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#21 +Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#22 +Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#6 +class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#13 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#9 +class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#14 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#11 +class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#15 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#16 +class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#16 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#14 +class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#13 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 +class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#18 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#64 +module Regexp::Expression::Assertion; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#65 +class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#67 +class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#19 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#70 +class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#20 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#68 +class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#14 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 +class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#15 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#74 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#2 +module Regexp::Expression::Backreference; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#3 +class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#155 + def match_length; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#140 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#34 +class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base + # @return [Name] a new instance of Name + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#38 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 + def name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 +class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#24 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#62 +class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name + # @return [NameRecursionLevel] a new instance of NameRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#65 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#63 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#24 +class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base + # @return [Number] a new instance of Number + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 + def number; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#49 +class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#27 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#51 +class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#28 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#53 +class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative + # @return [NumberRecursionLevel] a new instance of NumberRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#56 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#54 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#44 +class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def effective_number; end + + # Sets the attribute effective_number + # + # @param value the value to set the attribute effective_number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def effective_number=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 + def human_name; end + + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/base.rb#2 +class Regexp::Expression::Base + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 + def =~(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 + def a?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 + def ascii_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 + def attributes; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def case_insensitive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 + def d?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 + def default_classes?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def extended?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def free_spacing?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#47 + def greedy?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def i?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def ignore_case?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 + def m?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 + def match(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 + def match?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 + def matches?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 + def multiline?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#56 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#17 + def quantify(*args); end + + # Deprecated. Prefer `#repetitions` which has a more uniform interface. + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#26 + def quantity; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#31 + def repetitions; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level=(_arg0); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 + def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 + def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#9 + def to_re(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 + def u?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 + def unicode_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#21 + def unquantified_clone; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def x?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#2 +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + # @return [CharacterSet] a new instance of CharacterSet + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#6 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#16 + def close; end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed; end + + # Sets the attribute closed + # + # @param value the value to set the attribute closed to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed=(_arg0); end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#12 + def negate; end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negative; end + + # Sets the attribute negative + # + # @param value the value to set the attribute negative to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negative=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#3 +class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#29 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#5 +class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#30 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#6 +Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#3 +class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#8 + def <<(exp); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#14 + def complete?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#31 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#16 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#4 + def ts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#2 +module Regexp::Expression::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#5 +class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#32 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#3 +class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#17 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#6 +class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#15 +class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#8 +class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#14 +class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#7 +class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#9 +class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#13 +class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#11 +class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#12 +class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#10 +class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#8 +class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#33 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#130 + def comment?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#2 +module Regexp::Expression::Conditional; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#25 +class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#9 +class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#35 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end + + # Name or number of the referenced capturing group that determines state. + # Returns a String if reference is by name, Integer if by number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#14 + def reference; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#19 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#141 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#27 +class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#30 + def <<(exp); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#50 + def branches; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#46 + def condition; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#41 + def condition=(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#54 + def reference; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#58 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#142 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#3 +class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error + # @return [TooManyBranches] a new instance of TooManyBranches + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#4 + def initialize; end +end + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#101 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#2 +module Regexp::Expression::EscapeSequence; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#63 +class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#64 + def char; end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#70 + def control_sequence_to_s(control_sequence); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#75 + def meta_char_to_codepoint(meta_char); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#27 +class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 +class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 +class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 + def codepoint; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 +class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#37 +class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#39 +class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base + # @raise [NoMethodError] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#40 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#48 + def chars; end + + # @raise [NoMethodError] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#44 + def codepoint; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#52 + def codepoints; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#164 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#81 +class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#82 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#30 +class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#36 +class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#21 +class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 + def char; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#87 +class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#88 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#93 +class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#94 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#31 +class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#57 +class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#58 + def char; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 +class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#33 +class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#34 +class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#2 +class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end + + # @raise [Regexp::Parser::Error] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#3 + def quantify(*_args); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#135 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#2 +module Regexp::Expression::Group; end + +# Special case. Absence group can match 0.. chars, irrespective of content. +# TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#19 +class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#172 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#20 +class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#3 +class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#18 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#40 +class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#37 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def identifier; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number; end + + # Sets the attribute number + # + # @param value the value to set the attribute number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number=(_arg0); end + + # Returns the value of attribute number_at_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number_at_level; end + + # Sets the attribute number_at_level + # + # @param value the value to set the attribute number_at_level to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number_at_level=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#126 + def capturing?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#60 +class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#20 + def parts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#131 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#136 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#45 +class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture + # @return [Named] a new instance of Named + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#49 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 + def identifier; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 + def name; end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#54 + def initialize_copy(orig); end +end + +# TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no +# longer inherit from Group because it is effectively a terminal expression. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#23 +class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base + # Returns the value of attribute option_changes. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 + def option_changes; end + + # Sets the attribute option_changes + # + # @param value the value to set the attribute option_changes to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 + def option_changes=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#31 + def quantify(*args); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 + def initialize_copy(orig); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#6 +class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base + # @return [Passive] a new instance of Passive + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#9 + def initialize(*_arg0); end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#7 + def implicit=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 + def implicit?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 +module Regexp::Expression::Keep; end + +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression +# that contains all expressions to its left. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 +class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#39 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/literal.rb#2 +class Regexp::Expression::Literal < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#40 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#105 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#85 +Regexp::Expression::MatchLength = Regexp::MatchLength + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#10 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#118 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#2 +class Regexp::Expression::PosixClass < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 + def name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#18 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#9 +Regexp::Expression::Posixclass = Regexp::Expression::PosixClass + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#117 +Regexp::Expression::Property = Regexp::Expression::UnicodeProperty + +# TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and +# call super in #initialize, but raise in #quantifier= and #quantify, +# or introduce an Expression::Quantifiable intermediate class. +# Or actually allow chaining as a more concise but tricky solution than PR#69. +# +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#6 +class Regexp::Expression::Quantifier + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Quantifier] a new instance of Quantifier + # + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 + def initialize(*args); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def greedy?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#42 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#46 + def mode; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#19 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#52 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#64 + def derived_data; end +end + +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 +Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#2 +class Regexp::Expression::Root < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#41 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#3 + def build(options = T.unsafe(nil)); end + end +end + +# A sequence of expressions. Differs from a Subexpressions by how it handles +# quantifiers, as it applies them to its last element instead of itself as +# a whole subexpression. +# +# Used as the base class for the Alternation alternatives, Conditional +# branches, and CharacterSet::Intersection intersected sequences. +# +# source://regexp_parser//lib/regexp_parser/expression/sequence.rb#8 +class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#27 + def quantify(token, *args); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#23 + def ts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#10 + def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end + end +end + +# abstract class +# +# source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#3 +class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#12 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#16 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def operands; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def operator; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#22 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def sequences; end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 + def ts; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#22 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#2 +module Regexp::Expression::Shared + mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def ==(other); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def ===(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#51 + def base_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#124 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#96 + def coded_offset; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#128 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#133 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#47 + def ends_at(include_quantifier = T.unsafe(nil)); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def eql?(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#55 + def full_length; end + + # default implementation, e.g. "atomic group", "hex escape", "word type", .. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#4 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#3 + def inspect; end + + # Test if this expression has the given test_token, and optionally a given + # test_type. + # + # # Any expressions + # exp.is? :* # always returns true + # + # # is it a :capture + # exp.is? :capture + # + # # is it a :character and a :set + # exp.is? :character, :set + # + # # is it a :meta :dot + # exp.is? :dot, :meta + # + # # is it a :meta or :escape :dot + # exp.is? :dot, [:meta, :escape] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 + def is?(test_token, test_type = T.unsafe(nil)); end + + # not an alias so as to respect overrides of #negative? + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#8 + def negated?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#3 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#100 + def nesting_level=(lvl); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#92 + def offset; end + + # Test if this expression matches an entry in the given scope spec. + # + # A scope spec can be one of: + # + # . An array: Interpreted as a set of tokens, tested for inclusion + # of the expression's token. + # + # . A hash: Where the key is interpreted as the expression type + # and the value is either a symbol or an array. In this + # case, when the scope is a hash, one_of? calls itself to + # evaluate the key's value. + # + # . A symbol: matches the expression's token or type, depending on + # the level of the call. If one_of? is called directly with + # a symbol then it will always be checked against the + # type of the expression. If it's being called for a value + # from a hash, it will be checked against the token of the + # expression. + # + # # any expression + # exp.one_of?(:*) # always true + # + # # like exp.type?(:group) + # exp.one_of?(:group) + # + # # any expression of type meta + # exp.one_of?(:meta => :*) + # + # # meta dots and alternations + # exp.one_of?(:meta => [:dot, :alternation]) + # + # # meta dots and any set tokens + # exp.one_of?({meta: [:dot], set: :*}) + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#75 + def one_of?(scope, top = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 + def optional?; end + + # default implementation + # + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#4 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#84 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#12 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#17 + def pretty_print_instance_variables; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#115 + def quantified?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#106 + def quantifier=(qtf); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#88 + def quantifier_affix(expression_format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#43 + def starts_at; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#120 + def terminal?; end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 + def to_s(format = T.unsafe(nil)); end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 + def to_str(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#37 + def token_class; end + + # Test if this expression has the given test_type, which can be either + # a symbol or an array of symbols to check against the expression's type. + # + # # is it a :group expression + # exp.type? :group + # + # # is it a :set, or :meta + # exp.type? [:set, :meta] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#13 + def type?(test_type); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#18 + def init_from_token_and_options(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#32 + def initialize_copy(orig); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#10 + def intersperse(expressions, separator); end + + class << self + # @private + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#5 + def included(mod); end + end +end + +# filled in ./methods/*.rb +# +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#3 +module Regexp::Expression::Shared::ClassMethods + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#125 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#129 + def comment?; end + + # Convenience method to init a valid Expression without a Regexp::Token + # + # @raise [ArgumentError] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#5 + def construct(params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#15 + def construct_defaults; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#134 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#139 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#121 + def terminal?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#25 + def token_class; end +end + +# source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#2 +class Regexp::Expression::Subexpression < ::Regexp::Expression::Base + include ::Enumerable + + # @return [Subexpression] a new instance of Subexpression + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#20 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def [](*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def at(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#33 + def dig(*indices); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def each(*args, &block); end + + # Traverses the expression, passing each recursive child to the + # given block. + # If the block takes two arguments, the indices of the children within + # their parents are also passed to it. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#8 + def each_expression(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def empty?(*args, &block); end + + # Returns the value of attribute expressions. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def expressions; end + + # Sets the attribute expressions + # + # @param value the value to set the attribute expressions to. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def expressions=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#50 + def extract_quantifier_target(quantifier_description); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def fetch(*args, &block); end + + # Returns a new array with the results of calling the given block once + # for every expression. If a block is not given, returns an array with + # each expression and its level index as an array. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#56 + def flat_map(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def index(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#118 + def inner_match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def join(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def last(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def length(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#111 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#21 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 + def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 + def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#39 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#43 + def to_h; end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 + def traverse(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def values_at(*args, &block); end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 + def walk(include_self = T.unsafe(nil), &block); end + + protected + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#66 + def each_expression_with_index(&block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#73 + def each_expression_without_index(&block); end + + private + + # Override base method to clone the expressions as well. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#13 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 + def terminal?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#2 +module Regexp::Expression::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#13 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#14 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#15 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#32 +class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 +class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 + def name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#19 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 + def shortcut; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#16 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#100 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#111 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 +module Regexp::Expression::UnicodeProperty::Letter; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 +module Regexp::Expression::UnicodeProperty::Mark; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#49 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 +module Regexp::Expression::UnicodeProperty::Number; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#59 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#68 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 +module Regexp::Expression::UnicodeProperty::Separator; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#81 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#90 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 +class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#42 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#12 + def merge(exp); end +end + +# A very thin wrapper around the scanner that breaks quantified literal runs, +# collects emitted tokens into an array, calculates their nesting depth, and +# normalizes tokens for the parser, and checks if they are implemented by the +# given syntax flavor. +# +# source://regexp_parser//lib/regexp_parser/lexer.rb#5 +class Regexp::Lexer + # source://regexp_parser//lib/regexp_parser/lexer.rb#71 + def emit(token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#20 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/lexer.rb#91 + def ascend(type, token); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def block=(_arg0); end + + # if a codepoint list is followed by a quantifier, that quantifier applies + # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' + # c.f. #break_literal. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#143 + def break_codepoint_list(token); end + + # called by scan to break a literal run that is longer than one character + # into two separate tokens when it is followed by a quantifier + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#123 + def break_literal(token); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#106 + def descend(type, token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#162 + def merge_condition(current, last); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def nesting=(_arg0); end + + # Returns the value of attribute preprev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def preprev_token; end + + # Sets the attribute preprev_token + # + # @param value the value to set the attribute preprev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def preprev_token=(_arg0); end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def prev_token=(_arg0); end + + # Returns the value of attribute set_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def set_nesting; end + + # Sets the attribute set_nesting + # + # @param value the value to set the attribute set_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def set_nesting=(_arg0); end + + # Returns the value of attribute shift. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def shift; end + + # Sets the attribute shift + # + # @param value the value to set the attribute shift to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def shift=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/lexer.rb#16 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#16 + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/lexer.rb#12 +Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#14 +Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#7 +Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#1 +class Regexp::MatchLength + include ::Enumerable + + # @return [MatchLength] a new instance of MatchLength + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#9 + def initialize(exp, opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#24 + def each(opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#35 + def endless_each; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#44 + def fixed?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#40 + def include?(length); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#60 + def inspect; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#52 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#48 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#56 + def minmax; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#65 + def to_re; end + + private + + # Returns the value of attribute base_max. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_max; end + + # Sets the attribute base_max + # + # @param value the value to set the attribute base_max to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_max=(_arg0); end + + # Returns the value of attribute base_min. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_min; end + + # Sets the attribute base_min + # + # @param value the value to set the attribute base_min to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_min=(_arg0); end + + # Returns the value of attribute exp_class. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def exp_class; end + + # Sets the attribute exp_class + # + # @param value the value to set the attribute exp_class to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def exp_class=(_arg0); end + + # Returns the value of attribute max_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def max_rep; end + + # Sets the attribute max_rep + # + # @param value the value to set the attribute max_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def max_rep=(_arg0); end + + # Returns the value of attribute min_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def min_rep; end + + # Sets the attribute min_rep + # + # @param value the value to set the attribute min_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def min_rep=(_arg0); end + + # Returns the value of attribute reify. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def reify; end + + # Sets the attribute reify + # + # @param value the value to set the attribute reify to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def reify=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#74 + def test_regexp; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#4 + def of(obj); end + end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#2 +class Regexp::Parser + include ::Regexp::Expression + + # source://regexp_parser//lib/regexp_parser/parser.rb#25 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/parser.rb#574 + def active_opts; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#99 + def anchor(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#262 + def assign_effective_number(exp); end + + # Assigns referenced expressions to referring expressions, e.g. if there is + # an instance of Backreference::Number, its #referenced_expression is set to + # the instance of Group::Capture that it refers to via its number. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#581 + def assign_referenced_expressions; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#227 + def backref(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#202 + def captured_group_count_at_level; end + + # Returns the value of attribute captured_group_counts. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def captured_group_counts; end + + # Sets the attribute captured_group_counts + # + # @param value the value to set the attribute captured_group_counts to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def captured_group_counts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#570 + def close_completed_character_set_range; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#210 + def close_group; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#538 + def close_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#269 + def conditional(token); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#206 + def count_captured_group; end + + # @yield [node] + # + # source://regexp_parser//lib/regexp_parser/parser.rb#216 + def decrease_nesting; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#305 + def escape(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#60 + def extract_options(input, options); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#349 + def free_space(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#114 + def group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#509 + def increase_group_level(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#549 + def intersection(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#360 + def keep(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#364 + def literal(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#368 + def meta(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#534 + def negate_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#299 + def nest(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#294 + def nest_conditional(exp); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def nesting=(_arg0); end + + # Returns the value of attribute node. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def node; end + + # Sets the attribute node + # + # @param value the value to set the attribute node to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def node=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#165 + def open_group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#527 + def open_set(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#130 + def options_group(token); end + + # Returns the value of attribute options_stack. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def options_stack; end + + # Sets the attribute options_stack + # + # @param value the value to set the attribute options_stack to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def options_stack=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#76 + def parse_token(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#390 + def posixclass(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#397 + def property(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#479 + def quantifier(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#542 + def range(token); end + + # Returns the value of attribute root. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def root; end + + # Sets the attribute root + # + # @param value the value to set the attribute root to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def root=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#379 + def sequence_operation(klass, token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#515 + def set(token); end + + # Returns the value of attribute switching_options. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def switching_options; end + + # Sets the attribute switching_options + # + # @param value the value to set the attribute switching_options to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def switching_options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#198 + def total_captured_group_count; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#553 + def type(token); end + + class << self + # source://regexp_parser//lib/regexp_parser/parser.rb#21 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#128 +Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) + +# base class for all gem-specific errors +# +# source://regexp_parser//lib/regexp_parser/error.rb#3 +class Regexp::Parser::Error < ::StandardError; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#127 +Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/parser.rb#7 +class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#394 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#395 +Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#15 +class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError + # @return [UnknownTokenError] a new instance of UnknownTokenError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#16 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#9 +class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError + # @return [UnknownTokenTypeError] a new instance of UnknownTokenTypeError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#10 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#3 +Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#3 +class Regexp::Scanner + # Emits an array with the details of the scanned pattern + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2406 + def emit(type, token, text); end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 + def literal_run; end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 + def literal_run=(_arg0); end + + # @raise [PrematureEndError] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#24 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # Appends one or more characters to the literal buffer, to be emitted later + # by a call to emit_literal. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2468 + def append_literal(data, ts, te); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def block=(_arg0); end + + # Returns the value of attribute char_pos. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def char_pos; end + + # Sets the attribute char_pos + # + # @param value the value to set the attribute char_pos to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def char_pos=(_arg0); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def conditional_stack; end + + # Sets the attribute conditional_stack + # + # @param value the value to set the attribute conditional_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def conditional_stack=(_arg0); end + + # Copy from ts to te from data as text + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2462 + def copy(data, ts, te); end + + # Emits the literal run collected by calls to the append_literal method. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 + def emit_literal; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2508 + def emit_meta_control_sequence(data, ts, te, token); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2479 + def emit_options(text); end + + # Returns the value of attribute free_spacing. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def free_spacing; end + + # Sets the attribute free_spacing + # + # @param value the value to set the attribute free_spacing to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def free_spacing=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2441 + def free_spacing?(input_object, options); end + + # Returns the value of attribute group_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def group_depth; end + + # Sets the attribute group_depth + # + # @param value the value to set the attribute group_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def group_depth=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2453 + def in_group?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2457 + def in_set?; end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def prev_token=(_arg0); end + + # Returns the value of attribute set_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def set_depth; end + + # Sets the attribute set_depth + # + # @param value the value to set the attribute set_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def set_depth=(_arg0); end + + # Returns the value of attribute spacing_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def spacing_stack; end + + # Sets the attribute spacing_stack + # + # @param value the value to set the attribute spacing_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def spacing_stack=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 + def long_prop_map; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2396 + def parse_prop_map(name); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2400 + def posix_classes; end + + # Scans the given regular expression text, or Regexp object and collects the + # emitted token into an array that gets returned at the end. If a block is + # given, it gets called for each emitted token. + # + # This method may raise errors if a syntax error is encountered. + # -------------------------------------------------------------------------- + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#20 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # lazy-load property maps when first needed + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 + def short_prop_map; end + end +end + +# Invalid back reference. Used for name a number refs/calls. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#44 +class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError + # @return [InvalidBackrefError] a new instance of InvalidBackrefError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#45 + def initialize(what, reason); end +end + +# Invalid group. Used for named groups. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#29 +class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupError] a new instance of InvalidGroupError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#30 + def initialize(what, reason); end +end + +# Invalid groupOption. Used for inline options. +# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#37 +class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupOption] a new instance of InvalidGroupOption + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#38 + def initialize(option, text); end +end + +# Invalid sequence format. Used for escape sequences, mainly. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#22 +class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError + # @return [InvalidSequenceError] a new instance of InvalidSequenceError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#23 + def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end +end + +# Unexpected end of pattern +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#3 +class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError + # @return [PrematureEndError] a new instance of PrematureEndError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#4 + def initialize(where = T.unsafe(nil)); end +end + +# General scanner error (catch all) +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#5 +class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end + +# The POSIX class name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#58 +class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError + # @return [UnknownPosixClassError] a new instance of UnknownPosixClassError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#59 + def initialize(text, _); end +end + +# The property name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#51 +class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError + # @return [UnknownUnicodePropertyError] a new instance of UnknownUnicodePropertyError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#52 + def initialize(name, _); end +end + +# Base for all scanner validation errors +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#3 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#5 + def for(type, problem, reason = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#9 + def types; end + end +end + +# After loading all the tokens the map is full. Extract all tokens and types +# into the All and Types constants. +# +# source://regexp_parser//lib/regexp_parser/syntax.rb#3 +module Regexp::Syntax + private + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 + def specified_versions; end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 + def version_class(version); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 + def specified_versions; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 + def version_class(version); end + end +end + +# A syntax that always returns true, passing all tokens as implemented. This +# is useful during development, testing, and should be useful for some types +# of transformations as well. +# +# source://regexp_parser//lib/regexp_parser/syntax/any.rb#5 +class Regexp::Syntax::Any < ::Regexp::Syntax::Base + class << self + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/any.rb#8 + def implements?(_type, _token); end + end +end + +# A lookup map of supported types and tokens in a given syntax +# +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#9 +class Regexp::Syntax::Base + include ::Regexp::Syntax::Token + + # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` + # + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#99 + def initialize; end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#104 + def method_missing(name, *args); end + + private + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#115 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#46 + def added_features; end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 + def check!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 + def check?(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#26 + def excludes(type, tokens); end + + # Returns the value of attribute features. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 + def features; end + + # Sets the attribute features + # + # @param value the value to set the attribute features to. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 + def features=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#36 + def implementations(type); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#21 + def implements(type, tokens); end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 + def implements!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 + def implements?(type, token); end + + # automatically inherit features through the syntax class hierarchy + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#16 + def inherited(subclass); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#54 + def normalize(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#74 + def normalize_backref(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#65 + def normalize_group(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#50 + def removed_features; end + end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions.rb#8 +Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 +class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError + # @return [InvalidVersionNameError] a new instance of InvalidVersionNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#7 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#2 +class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError + # @return [NotImplementedError] a new instance of NotImplementedError + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#3 + def initialize(syntax, type, token); end +end + +# source://regexp_parser//lib/regexp_parser/syntax.rb#4 +class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#3 +module Regexp::Syntax::Token; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#42 +Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#15 +module Regexp::Syntax::Token::Alternation; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#16 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#17 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#3 +module Regexp::Syntax::Token::Anchor; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#9 +Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#4 +Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#5 +Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#7 +Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#6 +Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#10 +Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#3 +module Regexp::Syntax::Token::Assertion; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#7 +Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#4 +Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#5 +Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#8 +Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#31 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#3 +module Regexp::Syntax::Token::Backreference; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#15 +Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#7 +Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#6 +Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#5 +Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#4 +Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#9 +Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#16 +Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#11 +Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#13 +Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#3 +module Regexp::Syntax::Token::CharacterSet; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#7 +Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#4 +Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#5 +Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#8 +Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#3 +module Regexp::Syntax::Token::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#10 +Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#4 +Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#8 +Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#5 +Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#6 +Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#11 +Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#3 +module Regexp::Syntax::Token::Conditional; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#9 +Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#6 +Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#4 +Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#7 +Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#11 +Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#3 +module Regexp::Syntax::Token::Escape; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#8 +Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#24 +Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#4 +Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#6 +Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#20 +Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#13 +Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#22 +Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#25 +Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#11 +Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#31 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#11 +module Regexp::Syntax::Token::FreeSpace; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#12 +Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#13 +Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#3 +module Regexp::Syntax::Token::Group; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#17 +Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#8 +Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#4 +Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#10 +Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#5 +Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#7 +Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#9 +Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#18 +Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#12 +Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#15 +Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#3 +module Regexp::Syntax::Token::Keep; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#6 +Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#4 +Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#7 +Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#6 +module Regexp::Syntax::Token::Literal; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#7 +Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#8 +Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#4 +Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#3 +module Regexp::Syntax::Token::Meta; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 +Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#4 +Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#6 +Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#9 +Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#3 +module Regexp::Syntax::Token::PosixClass; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#9 +Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#7 +Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#11 +Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#4 +Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#10 +Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#749 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#3 +module Regexp::Syntax::Token::Quantifier; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#29 +Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#4 +Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#22 +Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#26 +Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#24 +Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#23 +Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#16 +Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#10 +Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#30 +Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#28 +Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#14 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + +# Type is the same as Backreference so keeping it here, for now. +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#20 +module Regexp::Syntax::Token::SubexpressionCall; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#24 +Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#21 +Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#22 +Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#43 +Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#3 +module Regexp::Syntax::Token::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#64 +Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#40 +Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#44 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#46 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#48 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#50 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#52 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#54 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#56 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#58 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#60 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#739 +Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 +module Regexp::Syntax::Token::UnicodeProperty::Category; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#36 +Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#33 +Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#14 +Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#17 +Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#20 +Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#23 +Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#30 +Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#27 +Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#6 +Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#9 +Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#133 +Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#66 +Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#120 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#125 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 +Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#694 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#722 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#742 +Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 +Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 +Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#135 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#231 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#237 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#247 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#273 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#282 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#291 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#298 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#308 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#315 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#322 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#741 +Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#692 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#334 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#433 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#561 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#596 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#609 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#623 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#633 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#647 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#659 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#670 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#726 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#727 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#728 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#729 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#730 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#732 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#733 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#734 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#735 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#736 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#737 +Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#12 +class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError + # @return [UnknownSyntaxNameError] a new instance of UnknownSyntaxNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#13 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.8.6.rb#1 +class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.1.rb#1 +class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.3.rb#1 +class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.0.0.rb#1 +class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.2.0.rb#1 +class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.3.0.rb#1 +class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.0.rb#1 +class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.1.rb#1 +class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.5.0.rb#1 +class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.0.rb#1 +class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.2.rb#1 +class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.3.rb#1 +class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.1.0.rb#1 +class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.2.0.rb#1 +class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#4 +Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#2 +Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#3 +Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/token.rb#2 +Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/token.rb#13 +class Regexp::Token < ::Struct + def conditional_level; end + def conditional_level=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#20 + def length; end + + def level; end + def level=(_); end + + # Returns the value of attribute next. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def next; end + + # Sets the attribute next + # + # @param value the value to set the attribute next to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def next=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def offset; end + + # Returns the value of attribute previous. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def previous; end + + # Sets the attribute previous + # + # @param value the value to set the attribute previous to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def previous=(_arg0); end + + def set_level; end + def set_level=(_); end + def te; end + def te=(_); end + def text; end + def text=(_); end + def token; end + def token=(_); end + def ts; end + def ts=(_); end + def type; end + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/reline@0.5.10.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/reline@0.5.10.rbi new file mode 100644 index 0000000..676e499 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/reline@0.5.10.rbi @@ -0,0 +1,2441 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + + +# source://reline//lib/reline/version.rb#1 +module Reline + extend ::Forwardable + extend ::SingleForwardable + + class << self + # source://reline//lib/reline.rb#486 + def core; end + + # source://reline//lib/reline.rb#482 + def encoding_system_needs; end + + # source://reline//lib/reline.rb#463 + def insert_text(text); end + + # source://reline//lib/reline.rb#506 + def line_editor; end + + # source://reline//lib/reline.rb#502 + def ungetc(c); end + end +end + +# source://reline//lib/reline/io/ansi.rb#4 +class Reline::ANSI < ::Reline::IO + # @return [ANSI] a new instance of ANSI + # + # source://reline//lib/reline/io/ansi.rb#36 + def initialize; end + + # @return [Boolean] + # + # source://reline//lib/reline/io/ansi.rb#283 + def both_tty?; end + + # source://reline//lib/reline/io/ansi.rb#343 + def clear_screen; end + + # source://reline//lib/reline/io/ansi.rb#248 + def cursor_pos; end + + # source://reline//lib/reline/io/ansi.rb#366 + def deprep(otio); end + + # @return [Boolean] + # + # source://reline//lib/reline/io/ansi.rb#209 + def empty_buffer?; end + + # source://reline//lib/reline/io/ansi.rb#43 + def encoding; end + + # source://reline//lib/reline/io/ansi.rb#331 + def erase_after_cursor; end + + # source://reline//lib/reline/io/ansi.rb#231 + def get_screen_size; end + + # if the usage expects to wait indefinitely, use Float::INFINITY for timeout_second + # + # source://reline//lib/reline/io/ansi.rb#201 + def getc(timeout_second); end + + # source://reline//lib/reline/io/ansi.rb#307 + def hide_cursor; end + + # @return [Boolean] + # + # source://reline//lib/reline/io/ansi.rb#205 + def in_pasting?; end + + # source://reline//lib/reline/io/ansi.rb#170 + def inner_getc(timeout_second); end + + # source://reline//lib/reline/io/ansi.rb#154 + def input=(val); end + + # source://reline//lib/reline/io/ansi.rb#287 + def move_cursor_column(x); end + + # source://reline//lib/reline/io/ansi.rb#299 + def move_cursor_down(x); end + + # source://reline//lib/reline/io/ansi.rb#291 + def move_cursor_up(x); end + + # source://reline//lib/reline/io/ansi.rb#158 + def output=(val); end + + # source://reline//lib/reline/io/ansi.rb#359 + def prep; end + + # source://reline//lib/reline/io/ansi.rb#189 + def read_bracketed_paste; end + + # source://reline//lib/reline/io/ansi.rb#220 + def retrieve_keybuffer; end + + # This only works when the cursor is at the bottom of the scroll range + # For more details, see https://github.com/ruby/reline/pull/577#issuecomment-1646679623 + # + # source://reline//lib/reline/io/ansi.rb#337 + def scroll_down(x); end + + # source://reline//lib/reline/io/ansi.rb#70 + def set_bracketed_paste_key_bindings(config); end + + # source://reline//lib/reline/io/ansi.rb#47 + def set_default_key_bindings(config, allow_terminfo: T.unsafe(nil)); end + + # source://reline//lib/reline/io/ansi.rb#76 + def set_default_key_bindings_ansi_cursor(config); end + + # source://reline//lib/reline/io/ansi.rb#115 + def set_default_key_bindings_comprehensive_list(config); end + + # source://reline//lib/reline/io/ansi.rb#98 + def set_default_key_bindings_terminfo(config); end + + # source://reline//lib/reline/io/ansi.rb#241 + def set_screen_size(rows, columns); end + + # source://reline//lib/reline/io/ansi.rb#348 + def set_winch_handler(&handler); end + + # source://reline//lib/reline/io/ansi.rb#319 + def show_cursor; end + + # source://reline//lib/reline/io/ansi.rb#216 + def ungetc(c); end + + # source://reline//lib/reline/io/ansi.rb#162 + def with_raw_input; end +end + +# source://reline//lib/reline/io/ansi.rb#17 +Reline::ANSI::ANSI_CURSOR_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/io/ansi.rb#5 +Reline::ANSI::CAPNAME_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/io/ansi.rb#188 +Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/io/ansi.rb#187 +Reline::ANSI::START_BRACKETED_PASTE = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/config.rb#1 +class Reline::Config + # @return [Config] a new instance of Config + # + # source://reline//lib/reline/config.rb#31 + def initialize; end + + # source://reline//lib/reline/config.rb#162 + def add_default_key_binding(keystroke, target); end + + # source://reline//lib/reline/config.rb#158 + def add_default_key_binding_by_keymap(keymap, keystroke, target); end + + # source://reline//lib/reline/config.rb#147 + def add_oneshot_key_binding(keystroke, target); end + + # Returns the value of attribute autocompletion. + # + # source://reline//lib/reline/config.rb#29 + def autocompletion; end + + # Sets the attribute autocompletion + # + # @param value the value to set the attribute autocompletion to. + # + # source://reline//lib/reline/config.rb#29 + def autocompletion=(_arg0); end + + # source://reline//lib/reline/config.rb#313 + def bind_key(key, func_name); end + + # source://reline//lib/reline/config.rb#246 + def bind_variable(name, value, raw_value); end + + # source://reline//lib/reline/config.rb#26 + def completion_ignore_case; end + + # source://reline//lib/reline/config.rb#26 + def completion_ignore_case=(_arg0); end + + # source://reline//lib/reline/config.rb#26 + def convert_meta; end + + # source://reline//lib/reline/config.rb#26 + def convert_meta=(_arg0); end + + # source://reline//lib/reline/config.rb#26 + def disable_completion; end + + # source://reline//lib/reline/config.rb#26 + def disable_completion=(_arg0); end + + # source://reline//lib/reline/config.rb#72 + def editing_mode; end + + # source://reline//lib/reline/config.rb#76 + def editing_mode=(val); end + + # @return [Boolean] + # + # source://reline//lib/reline/config.rb#80 + def editing_mode_is?(*val); end + + # source://reline//lib/reline/config.rb#26 + def emacs_mode_string; end + + # source://reline//lib/reline/config.rb#26 + def emacs_mode_string=(_arg0); end + + # source://reline//lib/reline/config.rb#26 + def enable_bracketed_paste; end + + # source://reline//lib/reline/config.rb#26 + def enable_bracketed_paste=(_arg0); end + + # source://reline//lib/reline/config.rb#211 + def handle_directive(directive, file, no, if_stack); end + + # source://reline//lib/reline/config.rb#26 + def history_size; end + + # source://reline//lib/reline/config.rb#26 + def history_size=(_arg0); end + + # source://reline//lib/reline/config.rb#92 + def inputrc_path; end + + # source://reline//lib/reline/config.rb#26 + def isearch_terminators; end + + # source://reline//lib/reline/config.rb#26 + def isearch_terminators=(_arg0); end + + # source://reline//lib/reline/config.rb#142 + def key_bindings; end + + # source://reline//lib/reline/config.rb#327 + def key_notation_to_code(notation); end + + # source://reline//lib/reline/config.rb#84 + def keymap; end + + # source://reline//lib/reline/config.rb#26 + def keyseq_timeout; end + + # source://reline//lib/reline/config.rb#26 + def keyseq_timeout=(_arg0); end + + # @return [Boolean] + # + # source://reline//lib/reline/config.rb#88 + def loaded?; end + + # source://reline//lib/reline/config.rb#361 + def parse_keyseq(str); end + + # source://reline//lib/reline/config.rb#122 + def read(file = T.unsafe(nil)); end + + # source://reline//lib/reline/config.rb#166 + def read_lines(lines, file = T.unsafe(nil)); end + + # source://reline//lib/reline/config.rb#369 + def reload; end + + # source://reline//lib/reline/config.rb#35 + def reset; end + + # source://reline//lib/reline/config.rb#154 + def reset_oneshot_key_bindings; end + + # source://reline//lib/reline/config.rb#42 + def reset_variables; end + + # source://reline//lib/reline/config.rb#308 + def retrieve_string(str); end + + # source://reline//lib/reline/config.rb#26 + def show_all_if_ambiguous; end + + # source://reline//lib/reline/config.rb#26 + def show_all_if_ambiguous=(_arg0); end + + # source://reline//lib/reline/config.rb#26 + def show_mode_in_prompt; end + + # source://reline//lib/reline/config.rb#26 + def show_mode_in_prompt=(_arg0); end + + # Returns the value of attribute test_mode. + # + # source://reline//lib/reline/config.rb#2 + def test_mode; end + + # source://reline//lib/reline/config.rb#26 + def vi_cmd_mode_string; end + + # source://reline//lib/reline/config.rb#26 + def vi_cmd_mode_string=(_arg0); end + + # source://reline//lib/reline/config.rb#26 + def vi_ins_mode_string; end + + # source://reline//lib/reline/config.rb#26 + def vi_ins_mode_string=(_arg0); end + + private + + # source://reline//lib/reline/config.rb#118 + def default_inputrc_path; end + + # @return [Boolean] + # + # source://reline//lib/reline/config.rb#374 + def seven_bit_encoding?(encoding); end +end + +# source://reline//lib/reline/config.rb#6 +class Reline::Config::InvalidInputrc < ::RuntimeError + # Returns the value of attribute file. + # + # source://reline//lib/reline/config.rb#7 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://reline//lib/reline/config.rb#7 + def file=(_arg0); end + + # Returns the value of attribute lineno. + # + # source://reline//lib/reline/config.rb#7 + def lineno; end + + # Sets the attribute lineno + # + # @param value the value to set the attribute lineno to. + # + # source://reline//lib/reline/config.rb#7 + def lineno=(_arg0); end +end + +# source://reline//lib/reline/config.rb#4 +Reline::Config::KEYSEQ_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/config.rb#10 +Reline::Config::VARIABLE_NAMES = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/config.rb#24 +Reline::Config::VARIABLE_NAME_SYMBOLS = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#39 +class Reline::Core + extend ::Forwardable + + # @return [Core] a new instance of Core + # @yield [_self] + # @yieldparam _self [Reline::Core] the object that the method was called on + # + # source://reline//lib/reline.rb#67 + def initialize; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#161 + def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end + + # source://reline//lib/reline.rb#409 + def ambiguous_width; end + + # source://reline//lib/reline.rb#54 + def auto_indent_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#146 + def auto_indent_proc=(p); end + + # source://reline//lib/reline.rb#54 + def basic_quote_characters; end + + # source://reline//lib/reline.rb#103 + def basic_quote_characters=(v); end + + # source://reline//lib/reline.rb#54 + def basic_word_break_characters; end + + # source://reline//lib/reline.rb#95 + def basic_word_break_characters=(v); end + + # source://reline//lib/reline.rb#54 + def completer_quote_characters; end + + # source://reline//lib/reline.rb#107 + def completer_quote_characters=(v); end + + # source://reline//lib/reline.rb#54 + def completer_word_break_characters; end + + # source://reline//lib/reline.rb#99 + def completer_word_break_characters=(v); end + + # source://reline//lib/reline.rb#54 + def completion_append_character; end + + # source://reline//lib/reline.rb#83 + def completion_append_character=(val); end + + # source://reline//lib/reline.rb#123 + def completion_case_fold; end + + # source://reline//lib/reline.rb#119 + def completion_case_fold=(v); end + + # source://reline//lib/reline.rb#54 + def completion_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#131 + def completion_proc=(p); end + + # source://reline//lib/reline.rb#127 + def completion_quote_character; end + + # Returns the value of attribute config. + # + # source://reline//lib/reline.rb#56 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://reline//lib/reline.rb#56 + def config=(_arg0); end + + # source://reline//lib/reline.rb#171 + def dialog_proc(name_sym); end + + # source://reline//lib/reline.rb#54 + def dig_perfect_match_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#155 + def dig_perfect_match_proc=(p); end + + # source://reline//lib/reline.rb#195 + def emacs_editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline.rb#204 + def emacs_editing_mode?; end + + # source://reline//lib/reline.rb#79 + def encoding; end + + # source://reline//lib/reline.rb#54 + def filename_quote_characters; end + + # source://reline//lib/reline.rb#111 + def filename_quote_characters=(v); end + + # source://reline//lib/reline.rb#208 + def get_screen_size; end + + # @raise [TypeError] + # + # source://reline//lib/reline.rb#175 + def input=(val); end + + # source://reline//lib/reline.rb#75 + def io_gate; end + + # Returns the value of attribute key_stroke. + # + # source://reline//lib/reline.rb#57 + def key_stroke; end + + # Sets the attribute key_stroke + # + # @param value the value to set the attribute key_stroke to. + # + # source://reline//lib/reline.rb#57 + def key_stroke=(_arg0); end + + # Returns the value of attribute last_incremental_search. + # + # source://reline//lib/reline.rb#59 + def last_incremental_search; end + + # Sets the attribute last_incremental_search + # + # @param value the value to set the attribute last_incremental_search to. + # + # source://reline//lib/reline.rb#59 + def last_incremental_search=(_arg0); end + + # Returns the value of attribute line_editor. + # + # source://reline//lib/reline.rb#58 + def line_editor; end + + # Sets the attribute line_editor + # + # @param value the value to set the attribute line_editor to. + # + # source://reline//lib/reline.rb#58 + def line_editor=(_arg0); end + + # Returns the value of attribute output. + # + # source://reline//lib/reline.rb#60 + def output; end + + # @raise [TypeError] + # + # source://reline//lib/reline.rb#182 + def output=(val); end + + # source://reline//lib/reline.rb#54 + def output_modifier_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#136 + def output_modifier_proc=(p); end + + # source://reline//lib/reline.rb#54 + def pre_input_hook; end + + # source://reline//lib/reline.rb#151 + def pre_input_hook=(p); end + + # source://reline//lib/reline.rb#54 + def prompt_proc; end + + # @raise [ArgumentError] + # + # source://reline//lib/reline.rb#141 + def prompt_proc=(p); end + + # source://reline//lib/reline.rb#277 + def readline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil)); end + + # source://reline//lib/reline.rb#251 + def readmultiline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil), &confirm_multiline_termination); end + + # source://reline//lib/reline.rb#54 + def special_prefixes; end + + # source://reline//lib/reline.rb#115 + def special_prefixes=(v); end + + # source://reline//lib/reline.rb#190 + def vi_editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline.rb#200 + def vi_editing_mode?; end + + private + + # source://reline//lib/reline.rb#294 + def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end + + # source://reline//lib/reline.rb#414 + def may_req_ambiguous_char_width; end + + # GNU Readline watis for "keyseq-timeout" milliseconds when the input is + # ambiguous whether it is matching or matched. + # If the next character does not arrive within the specified timeout, input + # is considered as matched. + # `ESC` is ambiguous because it can be a standalone ESC (matched) or part of + # `ESC char` or part of CSI sequence (matching). + # + # source://reline//lib/reline.rb#379 + def read_io(keyseq_timeout, &block); end +end + +# source://reline//lib/reline.rb#40 +Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#249 +Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline.rb#212 +Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) + +# source://reline//lib/reline/io/dumb.rb#3 +class Reline::Dumb < ::Reline::IO + # @return [Dumb] a new instance of Dumb + # + # source://reline//lib/reline/io/dumb.rb#6 + def initialize(encoding: T.unsafe(nil)); end + + # source://reline//lib/reline/io/dumb.rb#87 + def clear_screen; end + + # source://reline//lib/reline/io/dumb.rb#62 + def cursor_pos; end + + # source://reline//lib/reline/io/dumb.rb#104 + def deprep(otio); end + + # @return [Boolean] + # + # source://reline//lib/reline/io/dumb.rb#14 + def dumb?; end + + # source://reline//lib/reline/io/dumb.rb#18 + def encoding; end + + # source://reline//lib/reline/io/dumb.rb#81 + def erase_after_cursor; end + + # source://reline//lib/reline/io/dumb.rb#58 + def get_screen_size; end + + # source://reline//lib/reline/io/dumb.rb#39 + def getc(_timeout_second); end + + # source://reline//lib/reline/io/dumb.rb#66 + def hide_cursor; end + + # @return [Boolean] + # + # source://reline//lib/reline/io/dumb.rb#97 + def in_pasting?; end + + # source://reline//lib/reline/io/dumb.rb#31 + def input=(val); end + + # source://reline//lib/reline/io/dumb.rb#72 + def move_cursor_column(val); end + + # source://reline//lib/reline/io/dumb.rb#78 + def move_cursor_down(val); end + + # source://reline//lib/reline/io/dumb.rb#75 + def move_cursor_up(val); end + + # source://reline//lib/reline/io/dumb.rb#101 + def prep; end + + # source://reline//lib/reline/io/dumb.rb#84 + def scroll_down(val); end + + # source://reline//lib/reline/io/dumb.rb#28 + def set_default_key_bindings(_); end + + # source://reline//lib/reline/io/dumb.rb#90 + def set_screen_size(rows, columns); end + + # source://reline//lib/reline/io/dumb.rb#94 + def set_winch_handler(&handler); end + + # source://reline//lib/reline/io/dumb.rb#69 + def show_cursor; end + + # source://reline//lib/reline/io/dumb.rb#54 + def ungetc(c); end + + # source://reline//lib/reline/io/dumb.rb#35 + def with_raw_input; end +end + +# Do not send color reset sequence +# +# source://reline//lib/reline/io/dumb.rb#4 +Reline::Dumb::RESET_COLOR = T.let(T.unsafe(nil), String) + +# NOTE: For making compatible with the rb-readline gem +# +# source://reline//lib/reline.rb#16 +Reline::FILENAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# source://reline//lib/reline/face.rb#3 +class Reline::Face + class << self + # source://reline//lib/reline/face.rb#169 + def [](name); end + + # source://reline//lib/reline/face.rb#173 + def config(name, &block); end + + # source://reline//lib/reline/face.rb#178 + def configs; end + + # source://reline//lib/reline/face.rb#164 + def force_truecolor; end + + # source://reline//lib/reline/face.rb#182 + def load_initial_configs; end + + # source://reline//lib/reline/face.rb#195 + def reset_to_initial_configs; end + + # @return [Boolean] + # + # source://reline//lib/reline/face.rb#160 + def truecolor?; end + end +end + +# source://reline//lib/reline/face.rb#58 +class Reline::Face::Config + # @return [Config] a new instance of Config + # + # source://reline//lib/reline/face.rb#62 + def initialize(name, &block); end + + # source://reline//lib/reline/face.rb#84 + def [](name); end + + # source://reline//lib/reline/face.rb#72 + def define(name, **values); end + + # Returns the value of attribute definition. + # + # source://reline//lib/reline/face.rb#70 + def definition; end + + # source://reline//lib/reline/face.rb#77 + def reconfigure; end + + private + + # source://reline//lib/reline/face.rb#126 + def format_to_sgr(ordered_values); end + + # @return [Boolean] + # + # source://reline//lib/reline/face.rb#153 + def rgb_expression?(color); end + + # source://reline//lib/reline/face.rb#90 + def sgr_rgb(key, value); end + + # source://reline//lib/reline/face.rb#108 + def sgr_rgb_256color(key, value); end + + # source://reline//lib/reline/face.rb#99 + def sgr_rgb_truecolor(key, value); end +end + +# source://reline//lib/reline/face.rb#59 +Reline::Face::Config::ESSENTIAL_DEFINE_NAMES = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/face.rb#60 +Reline::Face::Config::RESET_SGR = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/face.rb#4 +Reline::Face::SGR_PARAMETERS = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline.rb#519 +Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) + +# source://reline//lib/reline/history.rb#1 +class Reline::History < ::Array + # @return [History] a new instance of History + # + # source://reline//lib/reline/history.rb#2 + def initialize(config); end + + # source://reline//lib/reline/history.rb#52 + def <<(val); end + + # source://reline//lib/reline/history.rb#15 + def [](index); end + + # source://reline//lib/reline/history.rb#20 + def []=(index, val); end + + # source://reline//lib/reline/history.rb#25 + def concat(*val); end + + # source://reline//lib/reline/history.rb#10 + def delete_at(index); end + + # source://reline//lib/reline/history.rb#31 + def push(*val); end + + # source://reline//lib/reline/history.rb#6 + def to_s; end + + private + + # @raise [IndexError] + # + # source://reline//lib/reline/history.rb#62 + def check_index(index); end +end + +# source://reline//lib/reline/io.rb#3 +class Reline::IO + # @return [Boolean] + # + # source://reline//lib/reline/io.rb#27 + def dumb?; end + + # source://reline//lib/reline/io.rb#35 + def reset_color_sequence; end + + # @return [Boolean] + # + # source://reline//lib/reline/io.rb#31 + def win?; end + + class << self + # source://reline//lib/reline/io.rb#6 + def decide_io_gate; end + end +end + +# source://reline//lib/reline/io.rb#4 +Reline::IO::RESET_COLOR = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline.rb#512 +Reline::IOGate = T.let(T.unsafe(nil), Reline::ANSI) + +# source://reline//lib/reline.rb#21 +class Reline::Key < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute combined_char + # + # @return [Object] the current value of combined_char + def combined_char; end + + # Sets the attribute combined_char + # + # @param value [Object] the value to set the attribute combined_char to. + # @return [Object] the newly set value + def combined_char=(_); end + + # For dialog_proc `key.match?(dialog.name)` + # + # @return [Boolean] + # + # source://reline//lib/reline.rb#23 + def match?(sym); end + + # Returns the value of attribute with_meta + # + # @return [Object] the current value of with_meta + def with_meta; end + + # Sets the attribute with_meta + # + # @param value [Object] the value to set the attribute with_meta to. + # @return [Object] the newly set value + def with_meta=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/key_actor/base.rb#1 +class Reline::KeyActor::Base + # @return [Base] a new instance of Base + # + # source://reline//lib/reline/key_actor/base.rb#2 + def initialize(mapping = T.unsafe(nil)); end + + # source://reline//lib/reline/key_actor/base.rb#12 + def add(key, func); end + + # source://reline//lib/reline/key_actor/base.rb#27 + def clear; end + + # source://reline//lib/reline/key_actor/base.rb#23 + def get(key); end + + # source://reline//lib/reline/key_actor/base.rb#8 + def get_method(key); end + + # @return [Boolean] + # + # source://reline//lib/reline/key_actor/base.rb#19 + def matching?(key); end +end + +# source://reline//lib/reline/key_actor/composite.rb#1 +class Reline::KeyActor::Composite + # @return [Composite] a new instance of Composite + # + # source://reline//lib/reline/key_actor/composite.rb#2 + def initialize(key_actors); end + + # source://reline//lib/reline/key_actor/composite.rb#10 + def get(key); end + + # @return [Boolean] + # + # source://reline//lib/reline/key_actor/composite.rb#6 + def matching?(key); end +end + +# source://reline//lib/reline/key_actor/emacs.rb#2 +Reline::KeyActor::EMACS_MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_actor/vi_command.rb#2 +Reline::KeyActor::VI_COMMAND_MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_actor/vi_insert.rb#2 +Reline::KeyActor::VI_INSERT_MAPPING = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/key_stroke.rb#1 +class Reline::KeyStroke + # @return [KeyStroke] a new instance of KeyStroke + # + # source://reline//lib/reline/key_stroke.rb#6 + def initialize(config); end + + # source://reline//lib/reline/key_stroke.rb#42 + def expand(input); end + + # source://reline//lib/reline/key_stroke.rb#19 + def match_status(input); end + + private + + # source://reline//lib/reline/key_stroke.rb#106 + def key_mapping; end + + # returns match status of CSI/SS3 sequence and matched length + # + # source://reline//lib/reline/key_stroke.rb#70 + def match_unknown_escape_sequence(input, vi_mode: T.unsafe(nil)); end +end + +# source://reline//lib/reline/key_stroke.rb#4 +Reline::KeyStroke::CSI_INTERMEDIATE_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# source://reline//lib/reline/key_stroke.rb#3 +Reline::KeyStroke::CSI_PARAMETER_BYTES_RANGE = T.let(T.unsafe(nil), Range) + +# source://reline//lib/reline/key_stroke.rb#2 +Reline::KeyStroke::ESC_BYTE = T.let(T.unsafe(nil), Integer) + +# Input partially matches to a key sequence +# +# source://reline//lib/reline/key_stroke.rb#13 +Reline::KeyStroke::MATCHED = T.let(T.unsafe(nil), Symbol) + +# Input exactly matches to a key sequence +# +# source://reline//lib/reline/key_stroke.rb#11 +Reline::KeyStroke::MATCHING = T.let(T.unsafe(nil), Symbol) + +# Input matches to a key sequence and the key sequence is a prefix of another key sequence +# +# source://reline//lib/reline/key_stroke.rb#15 +Reline::KeyStroke::MATCHING_MATCHED = T.let(T.unsafe(nil), Symbol) + +# Input does not match to any key sequence +# +# source://reline//lib/reline/key_stroke.rb#17 +Reline::KeyStroke::UNMATCHED = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#1 +class Reline::KillRing + include ::Enumerable + + # @return [KillRing] a new instance of KillRing + # + # source://reline//lib/reline/kill_ring.rb#61 + def initialize(max = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#68 + def append(string, before_p = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#116 + def each; end + + # source://reline//lib/reline/kill_ring.rb#83 + def process; end + + # source://reline//lib/reline/kill_ring.rb#96 + def yank; end + + # source://reline//lib/reline/kill_ring.rb#106 + def yank_pop; end +end + +# source://reline//lib/reline/kill_ring.rb#21 +class Reline::KillRing::RingBuffer + # @return [RingBuffer] a new instance of RingBuffer + # + # source://reline//lib/reline/kill_ring.rb#25 + def initialize(max = T.unsafe(nil)); end + + # source://reline//lib/reline/kill_ring.rb#31 + def <<(point); end + + # @return [Boolean] + # + # source://reline//lib/reline/kill_ring.rb#56 + def empty?; end + + # Returns the value of attribute head. + # + # source://reline//lib/reline/kill_ring.rb#23 + def head; end + + # Returns the value of attribute size. + # + # source://reline//lib/reline/kill_ring.rb#22 + def size; end +end + +# source://reline//lib/reline/kill_ring.rb#11 +class Reline::KillRing::RingPoint < ::Struct + # @return [RingPoint] a new instance of RingPoint + # + # source://reline//lib/reline/kill_ring.rb#12 + def initialize(str); end + + # source://reline//lib/reline/kill_ring.rb#16 + def ==(other); end +end + +# source://reline//lib/reline/kill_ring.rb#6 +Reline::KillRing::State::CONTINUED = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#5 +Reline::KillRing::State::FRESH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#7 +Reline::KillRing::State::PROCESSED = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/kill_ring.rb#8 +Reline::KillRing::State::YANK = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#6 +class Reline::LineEditor + # @return [LineEditor] a new instance of LineEditor + # + # source://reline//lib/reline/line_editor.rb#75 + def initialize(config, encoding); end + + # source://reline//lib/reline/line_editor.rb#681 + def add_dialog_proc(name, p, context = T.unsafe(nil)); end + + # Returns the value of attribute auto_indent_proc. + # + # source://reline//lib/reline/line_editor.rb#14 + def auto_indent_proc; end + + # Sets the attribute auto_indent_proc + # + # @param value the value to set the attribute auto_indent_proc to. + # + # source://reline//lib/reline/line_editor.rb#14 + def auto_indent_proc=(_arg0); end + + # TODO: Use "private alias_method" idiom after drop Ruby 2.5. + # + # source://reline//lib/reline/line_editor.rb#8 + def byte_pointer; end + + # source://reline//lib/reline/line_editor.rb#1380 + def byte_pointer=(val); end + + # source://reline//lib/reline/line_editor.rb#398 + def calculate_overlay_levels(overlay_levels); end + + # source://reline//lib/reline/line_editor.rb#1165 + def call_completion_proc; end + + # source://reline//lib/reline/line_editor.rb#1173 + def call_completion_proc_with_checking_args(pre, target, post); end + + # source://reline//lib/reline/line_editor.rb#446 + def clear_dialogs; end + + # Returns the value of attribute completion_append_character. + # + # source://reline//lib/reline/line_editor.rb#11 + def completion_append_character; end + + # Sets the attribute completion_append_character + # + # @param value the value to set the attribute completion_append_character to. + # + # source://reline//lib/reline/line_editor.rb#11 + def completion_append_character=(_arg0); end + + # Returns the value of attribute completion_proc. + # + # source://reline//lib/reline/line_editor.rb#10 + def completion_proc; end + + # Sets the attribute completion_proc + # + # @param value the value to set the attribute completion_proc to. + # + # source://reline//lib/reline/line_editor.rb#10 + def completion_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#1319 + def confirm_multiline_termination; end + + # Returns the value of attribute confirm_multiline_termination_proc. + # + # source://reline//lib/reline/line_editor.rb#9 + def confirm_multiline_termination_proc; end + + # Sets the attribute confirm_multiline_termination_proc + # + # @param value the value to set the attribute confirm_multiline_termination_proc to. + # + # source://reline//lib/reline/line_editor.rb#9 + def confirm_multiline_termination_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#304 + def current_byte_pointer_cursor; end + + # source://reline//lib/reline/line_editor.rb#1216 + def current_line; end + + # source://reline//lib/reline/line_editor.rb#1346 + def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#888 + def dialog_proc_scope_completion_journey_data; end + + # Returns the value of attribute dig_perfect_match_proc. + # + # source://reline//lib/reline/line_editor.rb#15 + def dig_perfect_match_proc; end + + # Sets the attribute dig_perfect_match_proc + # + # @param value the value to set the attribute dig_perfect_match_proc to. + # + # source://reline//lib/reline/line_editor.rb#15 + def dig_perfect_match_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#790 + def editing_mode; end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#218 + def eof?; end + + # source://reline//lib/reline/line_editor.rb#214 + def finalize; end + + # source://reline//lib/reline/line_editor.rb#1400 + def finish; end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#1396 + def finished?; end + + # source://reline//lib/reline/line_editor.rb#166 + def handle_signal; end + + # source://reline//lib/reline/line_editor.rb#1086 + def input_key(key); end + + # source://reline//lib/reline/line_editor.rb#1324 + def insert_multiline_text(text); end + + # source://reline//lib/reline/line_editor.rb#1336 + def insert_text(text); end + + # source://reline//lib/reline/line_editor.rb#82 + def io_gate; end + + # source://reline//lib/reline/line_editor.rb#1212 + def line; end + + # source://reline//lib/reline/line_editor.rb#351 + def modified_lines; end + + # source://reline//lib/reline/line_editor.rb#273 + def multiline_off; end + + # source://reline//lib/reline/line_editor.rb#269 + def multiline_on; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://reline//lib/reline/line_editor.rb#16 + def output=(_arg0); end + + # Returns the value of attribute output_modifier_proc. + # + # source://reline//lib/reline/line_editor.rb#12 + def output_modifier_proc; end + + # Sets the attribute output_modifier_proc + # + # @param value the value to set the attribute output_modifier_proc to. + # + # source://reline//lib/reline/line_editor.rb#12 + def output_modifier_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#471 + def print_nomultiline_prompt; end + + # source://reline//lib/reline/line_editor.rb#357 + def prompt_list; end + + # Returns the value of attribute prompt_proc. + # + # source://reline//lib/reline/line_editor.rb#13 + def prompt_proc; end + + # Sets the attribute prompt_proc + # + # @param value the value to set the attribute prompt_proc to. + # + # source://reline//lib/reline/line_editor.rb#13 + def prompt_proc=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#1136 + def push_input_lines; end + + # source://reline//lib/reline/line_editor.rb#476 + def render; end + + # source://reline//lib/reline/line_editor.rb#461 + def render_finished; end + + # source://reline//lib/reline/line_editor.rb#406 + def render_line_differential(old_items, new_items); end + + # source://reline//lib/reline/line_editor.rb#554 + def rerender; end + + # source://reline//lib/reline/line_editor.rb#139 + def reset(prompt = T.unsafe(nil), encoding:); end + + # source://reline//lib/reline/line_editor.rb#260 + def reset_line; end + + # source://reline//lib/reline/line_editor.rb#222 + def reset_variables(prompt = T.unsafe(nil), encoding:); end + + # source://reline//lib/reline/line_editor.rb#550 + def rest_height(wrapped_cursor_y); end + + # source://reline//lib/reline/line_editor.rb#1243 + def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1132 + def save_old_buffer; end + + # source://reline//lib/reline/line_editor.rb#363 + def screen_height; end + + # source://reline//lib/reline/line_editor.rb#371 + def screen_scroll_top; end + + # source://reline//lib/reline/line_editor.rb#367 + def screen_width; end + + # source://reline//lib/reline/line_editor.rb#1155 + def scroll_into_view; end + + # source://reline//lib/reline/line_editor.rb#1220 + def set_current_line(line, byte_pointer = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1231 + def set_current_lines(lines, byte_pointer = T.unsafe(nil), line_index = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#86 + def set_pasting_state(in_pasting); end + + # source://reline//lib/reline/line_editor.rb#205 + def set_signal_handlers; end + + # source://reline//lib/reline/line_editor.rb#1148 + def trim_input_lines; end + + # source://reline//lib/reline/line_editor.rb#1076 + def update(key); end + + # source://reline//lib/reline/line_editor.rb#453 + def update_dialogs(key = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#546 + def upper_space_height(wrapped_cursor_y); end + + # source://reline//lib/reline/line_editor.rb#1388 + def whole_buffer; end + + # source://reline//lib/reline/line_editor.rb#1384 + def whole_lines; end + + # source://reline//lib/reline/line_editor.rb#343 + def with_cache(key, *deps); end + + # source://reline//lib/reline/line_editor.rb#962 + def wrap_method_call(method_symbol, method_obj, key, with_operator = T.unsafe(nil)); end + + # Calculate cursor position in word wrapped content. + # + # source://reline//lib/reline/line_editor.rb#437 + def wrapped_cursor_position; end + + # source://reline//lib/reline/line_editor.rb#375 + def wrapped_prompt_and_input_lines; end + + private + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#952 + def argumentable?(method_obj); end + + # source://reline//lib/reline/line_editor.rb#1555 + def backward_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1858 + def backward_delete_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2000 + def backward_kill_word(key); end + + # source://reline//lib/reline/line_editor.rb#1982 + def backward_word(key); end + + # source://reline//lib/reline/line_editor.rb#1572 + def beginning_of_line(key); end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#1392 + def buffer_empty?; end + + # source://reline//lib/reline/line_editor.rb#1411 + def byteinsert(str, byte_pointer, other); end + + # source://reline//lib/reline/line_editor.rb#1405 + def byteslice!(str, byte_pointer, size); end + + # source://reline//lib/reline/line_editor.rb#308 + def calculate_nearest_cursor(cursor); end + + # source://reline//lib/reline/line_editor.rb#1418 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2040 + def capitalize_word(key); end + + # source://reline//lib/reline/line_editor.rb#93 + def check_mode_string; end + + # source://reline//lib/reline/line_editor.rb#107 + def check_multiline_prompt(buffer, mode_string); end + + # source://reline//lib/reline/line_editor.rb#982 + def cleanup_waiting; end + + # source://reline//lib/reline/line_editor.rb#541 + def clear_rendered_screen_cache; end + + # source://reline//lib/reline/line_editor.rb#1966 + def clear_screen(key); end + + # source://reline//lib/reline/line_editor.rb#1438 + def complete(_key); end + + # source://reline//lib/reline/line_editor.rb#798 + def complete_internal_proc(list, is_menu); end + + # source://reline//lib/reline/line_editor.rb#1455 + def completion_journey_move(direction); end + + # source://reline//lib/reline/line_editor.rb#1471 + def completion_journey_up(_key); end + + # source://reline//lib/reline/line_editor.rb#2086 + def copy_for_vi(text); end + + # source://reline//lib/reline/line_editor.rb#1923 + def delete_char(key); end + + # source://reline//lib/reline/line_editor.rb#1938 + def delete_char_or_list(key); end + + # source://reline//lib/reline/line_editor.rb#692 + def dialog_range(dialog, dialog_y); end + + # source://reline//lib/reline/line_editor.rb#2050 + def downcase_word(key); end + + # source://reline//lib/reline/line_editor.rb#2339 + def ed_argument_digit(key); end + + # source://reline//lib/reline/line_editor.rb#1966 + def ed_clear_screen(key); end + + # source://reline//lib/reline/line_editor.rb#2285 + def ed_delete_next_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2197 + def ed_delete_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2000 + def ed_delete_prev_word(key); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1498 + def ed_digit(key); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1498 + def ed_insert(key); end + + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#1879 + def ed_kill_line(key); end + + # source://reline//lib/reline/line_editor.rb#1572 + def ed_move_to_beg(key); end + + # source://reline//lib/reline/line_editor.rb#1578 + def ed_move_to_end(key); end + + # source://reline//lib/reline/line_editor.rb#1829 + def ed_newline(key); end + + # source://reline//lib/reline/line_editor.rb#1542 + def ed_next_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1812 + def ed_next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1555 + def ed_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1795 + def ed_prev_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1982 + def ed_prev_word(key); end + + # source://reline//lib/reline/line_editor.rb#1526 + def ed_quoted_insert(str, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1758 + def ed_search_next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1743 + def ed_search_prev_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2010 + def ed_transpose_chars(key); end + + # source://reline//lib/reline/line_editor.rb#2027 + def ed_transpose_words(key); end + + # do nothing + # + # source://reline//lib/reline/line_editor.rb#1477 + def ed_unassigned(key); end + + # source://reline//lib/reline/line_editor.rb#2040 + def em_capitol_case(key); end + + # source://reline//lib/reline/line_editor.rb#1923 + def em_delete(key); end + + # source://reline//lib/reline/line_editor.rb#1990 + def em_delete_next_word(key); end + + # source://reline//lib/reline/line_editor.rb#1938 + def em_delete_or_list(key); end + + # source://reline//lib/reline/line_editor.rb#1858 + def em_delete_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2501 + def em_exchange_mark(key); end + + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the + # current line, no matter where point is. + # + # source://reline//lib/reline/line_editor.rb#1915 + def em_kill_line(key); end + + # source://reline//lib/reline/line_editor.rb#2076 + def em_kill_region(key); end + + # source://reline//lib/reline/line_editor.rb#2050 + def em_lower_case(key); end + + # source://reline//lib/reline/line_editor.rb#1974 + def em_next_word(key); end + + # source://reline//lib/reline/line_editor.rb#2496 + def em_set_mark(key); end + + # source://reline//lib/reline/line_editor.rb#2063 + def em_upper_case(key); end + + # source://reline//lib/reline/line_editor.rb#1950 + def em_yank(key); end + + # source://reline//lib/reline/line_editor.rb#1956 + def em_yank_pop(key); end + + # source://reline//lib/reline/line_editor.rb#2509 + def emacs_editing_mode(key); end + + # source://reline//lib/reline/line_editor.rb#1578 + def end_of_line(key); end + + # source://reline//lib/reline/line_editor.rb#2501 + def exchange_point_and_mark(key); end + + # source://reline//lib/reline/line_editor.rb#1542 + def forward_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1728 + def forward_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#1974 + def forward_word(key); end + + # source://reline//lib/reline/line_editor.rb#1583 + def generate_searcher(search_key); end + + # source://reline//lib/reline/line_editor.rb#183 + def handle_interrupted; end + + # source://reline//lib/reline/line_editor.rb#171 + def handle_resized; end + + # source://reline//lib/reline/line_editor.rb#1743 + def history_search_backward(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1758 + def history_search_forward(key, arg: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reline//lib/reline/line_editor.rb#956 + def inclusive?(method_obj); end + + # source://reline//lib/reline/line_editor.rb#1667 + def incremental_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#277 + def insert_new_line(cursor_line, next_line); end + + # source://reline//lib/reline/line_editor.rb#1422 + def key_delete(key); end + + # source://reline//lib/reline/line_editor.rb#1430 + def key_newline(key); end + + # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, + # +Ctrl-U+) + Kill from the cursor to the end of the line. + # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of + # the line. With a negative numeric argument, kill backward + # from the cursor to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#1879 + def kill_line(key); end + + # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the + # edit buffer and save it to the cut buffer. +vi-kill-line-prev+ + # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the + # current line, no matter where point is. + # + # source://reline//lib/reline/line_editor.rb#1915 + def kill_whole_line(key); end + + # source://reline//lib/reline/line_editor.rb#1990 + def kill_word(key); end + + # source://reline//lib/reline/line_editor.rb#794 + def menu(_target, list); end + + # source://reline//lib/reline/line_editor.rb#1463 + def menu_complete(_key); end + + # source://reline//lib/reline/line_editor.rb#1467 + def menu_complete_backward(_key); end + + # source://reline//lib/reline/line_editor.rb#782 + def modify_lines(before, complete); end + + # source://reline//lib/reline/line_editor.rb#901 + def move_completed_list(direction); end + + # source://reline//lib/reline/line_editor.rb#1773 + def move_history(history_pointer, line:, cursor:, save_buffer: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1812 + def next_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1054 + def normal_char(key); end + + # source://reline//lib/reline/line_editor.rb#844 + def perform_completion(list, just_show_list); end + + # source://reline//lib/reline/line_editor.rb#2537 + def prev_action_state_value(type); end + + # source://reline//lib/reline/line_editor.rb#1795 + def previous_history(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1195 + def process_auto_indent(line_index = T.unsafe(nil), cursor_dependent: T.unsafe(nil), add_newline: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1479 + def process_insert(force: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#990 + def process_key(key, method_symbol); end + + # source://reline//lib/reline/line_editor.rb#1526 + def quoted_insert(str, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2545 + def re_read_init_file(_key); end + + # source://reline//lib/reline/line_editor.rb#2527 + def redo(_key); end + + # Reflects lines to be rendered and new cursor position to the screen + # by calculating the difference from the previous render. + # + # source://reline//lib/reline/line_editor.rb#508 + def render_differential(new_lines, new_cursor_x, new_cursor_y); end + + # source://reline//lib/reline/line_editor.rb#913 + def retrieve_completion_journey_state; end + + # source://reline//lib/reline/line_editor.rb#1723 + def reverse_search_history(key); end + + # source://reline//lib/reline/line_editor.rb#928 + def run_for_operators(key, method_symbol, &block); end + + # source://reline//lib/reline/line_editor.rb#1733 + def search_history(prefix, pointer_range); end + + # source://reline//lib/reline/line_editor.rb#2397 + def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2449 + def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end + + # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) + # In insert mode, insert the input character left of the cursor + # position. In replace mode, overwrite the character at the + # cursor and move the cursor to the right by one character + # position. Accept an argument to do this repeatedly. It is an + # error if the input character is the NUL character (+Ctrl-@+). + # Failure to enlarge the edit buffer also results in an error. + # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append + # the input digit to the argument being read. Otherwise, call + # +ed-insert+. It is an error if the input character is not a + # digit or if the existing argument is already greater than a + # million. + # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. + # + # source://reline//lib/reline/line_editor.rb#1498 + def self_insert(key); end + + # source://reline//lib/reline/line_editor.rb#2496 + def set_mark(key); end + + # source://reline//lib/reline/line_editor.rb#2541 + def set_next_action_state(type, value); end + + # source://reline//lib/reline/line_editor.rb#300 + def split_by_width(str, max_width, offset: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2010 + def transpose_chars(key); end + + # source://reline//lib/reline/line_editor.rb#2027 + def transpose_words(key); end + + # source://reline//lib/reline/line_editor.rb#2517 + def undo(_key); end + + # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the + # beginning of the edit buffer to the cursor and save it to the + # cut buffer. + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#1902 + def unix_line_discard(key); end + + # source://reline//lib/reline/line_editor.rb#2076 + def unix_word_rubout(key); end + + # source://reline//lib/reline/line_editor.rb#2063 + def upcase_word(key); end + + # source://reline//lib/reline/line_editor.rb#698 + def update_each_dialog(dialog, cursor_column, cursor_row, key = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2096 + def vi_add(key); end + + # source://reline//lib/reline/line_editor.rb#2192 + def vi_add_at_eol(key); end + + # source://reline//lib/reline/line_editor.rb#2211 + def vi_change_meta(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2223 + def vi_change_meta_confirm(byte_pointer_diff); end + + # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line. + # + # source://reline//lib/reline/line_editor.rb#1891 + def vi_change_to_eol(key); end + + # source://reline//lib/reline/line_editor.rb#2101 + def vi_command_mode(key); end + + # source://reline//lib/reline/line_editor.rb#2229 + def vi_delete_meta(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2240 + def vi_delete_meta_confirm(byte_pointer_diff); end + + # source://reline//lib/reline/line_editor.rb#2173 + def vi_delete_prev_char(key); end + + # source://reline//lib/reline/line_editor.rb#2513 + def vi_editing_mode(key); end + + # source://reline//lib/reline/line_editor.rb#2158 + def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2274 + def vi_end_of_transmission(key); end + + # source://reline//lib/reline/line_editor.rb#2125 + def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2274 + def vi_eof_maybe(key); end + + # source://reline//lib/reline/line_editor.rb#1568 + def vi_first_print(key); end + + # source://reline//lib/reline/line_editor.rb#2308 + def vi_histedit(key); end + + # source://reline//lib/reline/line_editor.rb#2092 + def vi_insert(key); end + + # source://reline//lib/reline/line_editor.rb#2187 + def vi_insert_at_bol(key); end + + # source://reline//lib/reline/line_editor.rb#2487 + def vi_join_lines(key, arg: T.unsafe(nil)); end + + # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the + # beginning of the edit buffer to the cursor and save it to the + # cut buffer. + # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor + # to the beginning of the current line. + # + # source://reline//lib/reline/line_editor.rb#1902 + def vi_kill_line_prev(key); end + + # source://reline//lib/reline/line_editor.rb#2274 + def vi_list_or_eof(key); end + + # source://reline//lib/reline/line_editor.rb#2101 + def vi_movement_mode(key); end + + # source://reline//lib/reline/line_editor.rb#2140 + def vi_next_big_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2389 + def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2107 + def vi_next_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2329 + def vi_paste_next(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2320 + def vi_paste_prev(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2149 + def vi_prev_big_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2441 + def vi_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2116 + def vi_prev_word(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2365 + def vi_replace_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#1728 + def vi_search_next(key); end + + # source://reline//lib/reline/line_editor.rb#1723 + def vi_search_prev(key); end + + # source://reline//lib/reline/line_editor.rb#2356 + def vi_to_column(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2301 + def vi_to_history_line(key); end + + # source://reline//lib/reline/line_editor.rb#2393 + def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2445 + def vi_to_prev_char(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2252 + def vi_yank(key, arg: T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#2263 + def vi_yank_confirm(byte_pointer_diff); end + + # source://reline//lib/reline/line_editor.rb#1572 + def vi_zero(key); end + + # source://reline//lib/reline/line_editor.rb#1950 + def yank(key); end + + # source://reline//lib/reline/line_editor.rb#1956 + def yank_pop(key); end +end + +# source://reline//lib/reline/line_editor.rb#47 +class Reline::LineEditor::CompletionJourneyState < ::Struct + # Returns the value of attribute line_index + # + # @return [Object] the current value of line_index + def line_index; end + + # Sets the attribute line_index + # + # @param value [Object] the value to set the attribute line_index to. + # @return [Object] the newly set value + def line_index=(_); end + + # Returns the value of attribute list + # + # @return [Object] the current value of list + def list; end + + # Sets the attribute list + # + # @param value [Object] the value to set the attribute list to. + # @return [Object] the newly set value + def list=(_); end + + # Returns the value of attribute pointer + # + # @return [Object] the current value of pointer + def pointer; end + + # Sets the attribute pointer + # + # @param value [Object] the value to set the attribute pointer to. + # @return [Object] the newly set value + def pointer=(_); end + + # Returns the value of attribute post + # + # @return [Object] the current value of post + def post; end + + # Sets the attribute post + # + # @param value [Object] the value to set the attribute post to. + # @return [Object] the newly set value + def post=(_); end + + # Returns the value of attribute pre + # + # @return [Object] the current value of pre + def pre; end + + # Sets the attribute pre + # + # @param value [Object] the value to set the attribute pre to. + # @return [Object] the newly set value + def pre=(_); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target + def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value + def target=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/line_editor.rb#39 +Reline::LineEditor::CompletionState::COMPLETION = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#40 +Reline::LineEditor::CompletionState::MENU = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#41 +Reline::LineEditor::CompletionState::MENU_WITH_PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#38 +Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#42 +Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) + +# source://reline//lib/reline/line_editor.rb#690 +Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/line_editor.rb#636 +class Reline::LineEditor::Dialog + # @return [Dialog] a new instance of Dialog + # + # source://reline//lib/reline/line_editor.rb#640 + def initialize(name, config, proc_scope); end + + # source://reline//lib/reline/line_editor.rb#664 + def call(key); end + + # Returns the value of attribute column. + # + # source://reline//lib/reline/line_editor.rb#638 + def column; end + + # Sets the attribute column + # + # @param value the value to set the attribute column to. + # + # source://reline//lib/reline/line_editor.rb#638 + def column=(_arg0); end + + # Returns the value of attribute contents. + # + # source://reline//lib/reline/line_editor.rb#637 + def contents; end + + # source://reline//lib/reline/line_editor.rb#657 + def contents=(contents); end + + # Returns the value of attribute name. + # + # source://reline//lib/reline/line_editor.rb#637 + def name; end + + # Returns the value of attribute pointer. + # + # source://reline//lib/reline/line_editor.rb#638 + def pointer; end + + # Sets the attribute pointer + # + # @param value the value to set the attribute pointer to. + # + # source://reline//lib/reline/line_editor.rb#638 + def pointer=(_arg0); end + + # Returns the value of attribute scroll_top. + # + # source://reline//lib/reline/line_editor.rb#638 + def scroll_top; end + + # Sets the attribute scroll_top + # + # @param value the value to set the attribute scroll_top to. + # + # source://reline//lib/reline/line_editor.rb#638 + def scroll_top=(_arg0); end + + # source://reline//lib/reline/line_editor.rb#649 + def set_cursor_pos(col, row); end + + # Returns the value of attribute trap_key. + # + # source://reline//lib/reline/line_editor.rb#638 + def trap_key; end + + # Sets the attribute trap_key + # + # @param value the value to set the attribute trap_key to. + # + # source://reline//lib/reline/line_editor.rb#638 + def trap_key=(_arg0); end + + # Returns the value of attribute vertical_offset. + # + # source://reline//lib/reline/line_editor.rb#638 + def vertical_offset; end + + # Sets the attribute vertical_offset + # + # @param value the value to set the attribute vertical_offset to. + # + # source://reline//lib/reline/line_editor.rb#638 + def vertical_offset=(_arg0); end + + # Returns the value of attribute width. + # + # source://reline//lib/reline/line_editor.rb#637 + def width; end + + # source://reline//lib/reline/line_editor.rb#653 + def width=(v); end +end + +# source://reline//lib/reline/line_editor.rb#558 +class Reline::LineEditor::DialogProcScope + # @return [DialogProcScope] a new instance of DialogProcScope + # + # source://reline//lib/reline/line_editor.rb#561 + def initialize(line_editor, config, proc_to_exec, context); end + + # source://reline//lib/reline/line_editor.rb#631 + def call; end + + # source://reline//lib/reline/line_editor.rb#577 + def call_completion_proc_with_checking_args(pre, target, post); end + + # source://reline//lib/reline/line_editor.rb#623 + def completion_journey_data; end + + # source://reline//lib/reline/line_editor.rb#627 + def config; end + + # source://reline//lib/reline/line_editor.rb#569 + def context; end + + # source://reline//lib/reline/line_editor.rb#602 + def cursor_pos; end + + # source://reline//lib/reline/line_editor.rb#585 + def dialog; end + + # source://reline//lib/reline/line_editor.rb#606 + def just_cursor_moving; end + + # source://reline//lib/reline/line_editor.rb#598 + def key; end + + # source://reline//lib/reline/line_editor.rb#618 + def preferred_dialog_height; end + + # source://reline//lib/reline/line_editor.rb#573 + def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end + + # source://reline//lib/reline/line_editor.rb#614 + def screen_height; end + + # source://reline//lib/reline/line_editor.rb#610 + def screen_width; end + + # source://reline//lib/reline/line_editor.rb#589 + def set_cursor_pos(col, row); end + + # source://reline//lib/reline/line_editor.rb#581 + def set_dialog(dialog); end + + # source://reline//lib/reline/line_editor.rb#594 + def set_key(key); end +end + +# source://reline//lib/reline/line_editor.rb#559 +class Reline::LineEditor::DialogProcScope::CompletionJourneyData < ::Struct + # Returns the value of attribute list + # + # @return [Object] the current value of list + def list; end + + # Sets the attribute list + # + # @param value [Object] the value to set the attribute list to. + # @return [Object] the newly set value + def list=(_); end + + # Returns the value of attribute pointer + # + # @return [Object] the current value of pointer + def pointer; end + + # Sets the attribute pointer + # + # @param value [Object] the value to set the attribute pointer to. + # @return [Object] the newly set value + def pointer=(_); end + + # Returns the value of attribute postposing + # + # @return [Object] the current value of postposing + def postposing; end + + # Sets the attribute postposing + # + # @param value [Object] the value to set the attribute postposing to. + # @return [Object] the newly set value + def postposing=(_); end + + # Returns the value of attribute preposing + # + # @return [Object] the current value of preposing + def preposing; end + + # Sets the attribute preposing + # + # @param value [Object] the value to set the attribute preposing to. + # @return [Object] the newly set value + def preposing=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/line_editor.rb#1147 +Reline::LineEditor::MAX_INPUT_LINES = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/line_editor.rb#73 +Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) + +# source://reline//lib/reline/line_editor.rb#50 +class Reline::LineEditor::MenuInfo + # @return [MenuInfo] a new instance of MenuInfo + # + # source://reline//lib/reline/line_editor.rb#53 + def initialize(list); end + + # source://reline//lib/reline/line_editor.rb#57 + def lines(screen_width); end + + # Returns the value of attribute list. + # + # source://reline//lib/reline/line_editor.rb#51 + def list; end +end + +# source://reline//lib/reline/line_editor.rb#48 +Reline::LineEditor::NullActionState = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/line_editor.rb#45 +class Reline::LineEditor::RenderedScreen < ::Struct + # Returns the value of attribute base_y + # + # @return [Object] the current value of base_y + def base_y; end + + # Sets the attribute base_y + # + # @param value [Object] the value to set the attribute base_y to. + # @return [Object] the newly set value + def base_y=(_); end + + # Returns the value of attribute cursor_y + # + # @return [Object] the current value of cursor_y + def cursor_y; end + + # Sets the attribute cursor_y + # + # @param value [Object] the value to set the attribute cursor_y to. + # @return [Object] the newly set value + def cursor_y=(_); end + + # Returns the value of attribute lines + # + # @return [Object] the current value of lines + def lines; end + + # Sets the attribute lines + # + # @param value [Object] the value to set the attribute lines to. + # @return [Object] the newly set value + def lines=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://reline//lib/reline/line_editor.rb#18 +Reline::LineEditor::VI_MOTIONS = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/terminfo.rb#17 +module Reline::Terminfo + extend ::Fiddle + extend ::Fiddle::CParser + extend ::Fiddle::Importer + + class << self + # source://reline//lib/reline/terminfo.rb#37 + def curses_dl; end + + # source://reline//lib/reline/terminfo.rb#22 + def curses_dl_files; end + + # NOTE: This means Fiddle and curses are enabled. + # + # @return [Boolean] + # + # source://reline//lib/reline/terminfo.rb#145 + def enabled?; end + + # source://reline//lib/reline/terminfo.rb#85 + def setupterm(term, fildes); end + + # @return [Boolean] + # + # source://reline//lib/reline/terminfo.rb#149 + def term_supported?; end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#120 + def tigetflag(capname); end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#132 + def tigetnum(capname); end + + # @raise [TerminfoError] + # + # source://reline//lib/reline/terminfo.rb#102 + def tigetstr(capname); end + + # source://reline//lib/reline/terminfo.rb#112 + def tiparm(str, *args); end + end +end + +# source://reline//lib/reline/terminfo.rb#96 +class Reline::Terminfo::StringWithTiparm < ::String + # for method chain + # + # source://reline//lib/reline/terminfo.rb#97 + def tiparm(*args); end +end + +# source://reline//lib/reline.rb#17 +Reline::USERNAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) + +# source://reline//lib/reline/unicode.rb#1 +class Reline::Unicode + class << self + # source://reline//lib/reline/unicode.rb#82 + def calculate_width(str, allow_escape_code = T.unsafe(nil)); end + + # source://reline//lib/reline/unicode.rb#336 + def ed_transpose_words(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#296 + def em_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#316 + def em_big_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#247 + def em_forward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#267 + def em_forward_word_with_capitalization(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#44 + def escape_for_print(str); end + + # source://reline//lib/reline/unicode.rb#59 + def get_mbchar_width(mbchar); end + + # source://reline//lib/reline/unicode.rb#233 + def get_next_mbchar_size(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#238 + def get_prev_mbchar_size(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#108 + def split_by_width(str, max_width, encoding = T.unsafe(nil), offset: T.unsafe(nil)); end + + # source://reline//lib/reline/unicode.rb#162 + def take_mbchar_range(str, start_col, width, cover_begin: T.unsafe(nil), cover_end: T.unsafe(nil), padding: T.unsafe(nil)); end + + # Take a chunk of a String cut by width with escape sequences. + # + # source://reline//lib/reline/unicode.rb#158 + def take_range(str, start_col, max_width); end + + # source://reline//lib/reline/unicode.rb#625 + def vi_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#487 + def vi_big_backward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#457 + def vi_big_forward_end_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#437 + def vi_big_forward_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#657 + def vi_first_print(line); end + + # source://reline//lib/reline/unicode.rb#548 + def vi_forward_end_word(line, byte_pointer); end + + # source://reline//lib/reline/unicode.rb#507 + def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end + end +end + +# source://reline//lib/reline/unicode.rb#40 +Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/unicode/east_asian_width.rb#5 +Reline::Unicode::EastAsianWidth::CHUNK_LAST = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/unicode/east_asian_width.rb#5 +Reline::Unicode::EastAsianWidth::CHUNK_WIDTH = T.let(T.unsafe(nil), Array) + +# C-? C-8 +# +# source://reline//lib/reline/unicode.rb#36 +Reline::Unicode::EscapedChars = T.let(T.unsafe(nil), Array) + +# source://reline//lib/reline/unicode.rb#2 +Reline::Unicode::EscapedPairs = T.let(T.unsafe(nil), Hash) + +# source://reline//lib/reline/unicode.rb#39 +Reline::Unicode::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/unicode.rb#38 +Reline::Unicode::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# source://reline//lib/reline/unicode.rb#41 +Reline::Unicode::OSC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/unicode.rb#42 +Reline::Unicode::WIDTH_SCANNER = T.let(T.unsafe(nil), Regexp) + +# source://reline//lib/reline/version.rb#2 +Reline::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi new file mode 100644 index 0000000..91bc8f1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi @@ -0,0 +1,7626 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-ast` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-ast`. + + +class Parser::Source::Range + include ::RuboCop::AST::Ext::Range +end + +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#3 +module RuboCop; end + +# ... +# +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#4 +module RuboCop::AST + extend ::RuboCop::AST::RuboCopCompatibility +end + +# A node extension for `alias` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `alias` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#8 +class RuboCop::AST::AliasNode < ::RuboCop::AST::Node + # Returns the new identifier as specified by the `alias`. + # + # @return [SymbolNode] the new identifier + # + # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#19 + def new_identifier; end + + # Returns the old identifier as specified by the `alias`. + # + # @return [SymbolNode] the old identifier + # + # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#12 + def old_identifier; end +end + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#8 +class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#12 + def operator; end +end + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#8 +class RuboCop::AST::AndNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `and` as a string. + # Returns `and` for `&&` and vice versa. + # + # @return [String] the alternate of the `and` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#16 + def alternate_operator; end + + # Returns the inverse keyword of the `and` node as a string. + # Returns `||` for `&&` and `or` for `and`. + # + # @return [String] the inverse of the `and` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#24 + def inverse_operator; end +end + +# A node extension for `arg`, `optarg`, `restarg`, `kwarg`, `kwoptarg`, +# `kwrestarg`, `blockarg`, `shadowarg` and `forward_arg` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all `arg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#9 +class RuboCop::AST::ArgNode < ::RuboCop::AST::Node + # Checks whether the argument has a default value + # + # @return [Boolean] whether the argument has a default value + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#29 + def default?; end + + # Returns the default value of the argument, if any. + # + # @return [Node, nil] the default value of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#20 + def default_value; end + + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#13 + def name; end +end + +# A node extension for `args` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `args` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#8 +class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Yield each argument from the collection. + # Arguments can be inside `mlhs` nodes in the case of destructuring, so this + # flattens the collection to just `arg`, `optarg`, `restarg`, `kwarg`, + # `kwoptarg`, `kwrestarg`, `blockarg`, `forward_arg` and `shadowarg`. + # + # @return [Array] array of argument nodes. + # + # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#34 + def argument_list; end + + # It returns true if arguments are empty and delimiters do not exist. + # @example: + # # true + # def x; end + # x { } + # -> {} + # + # # false + # def x(); end + # def x a; end + # x { || } + # -> () {} + # -> a {} + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#24 + def empty_and_without_delimiters?; end +end + +# A node extension for `array` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `array` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#8 +class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node + # Checks whether the `array` literal is delimited by either percent or + # square brackets + # + # brackets + # + # @return [Boolean] whether the array is enclosed in percent or square + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 + def bracketed?; end + + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25 + def each_value(&block); end + + # Checks whether the `array` literal is delimited by percent brackets. + # + # @overload percent_literal? + # @overload percent_literal? + # @return [Boolean] whether the array is enclosed in percent brackets + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51 + def percent_literal?(type = T.unsafe(nil)); end + + # Checks whether the `array` literal is delimited by square brackets. + # + # @return [Boolean] whether the array is enclosed in square brackets + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36 + def square_brackets?; end + + # Returns an array of all value nodes in the `array` literal. + # + # @return [Array] an array of value nodes + # + # source://ast/2.4.2/lib/ast/node.rb#56 + def values; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#9 +RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#8 +class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#19 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 + def name; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, `rational`... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 +module RuboCop::AST::BasicLiteralNode + # Returns the value of the literal. + # + # @return [mixed] the value of the literal + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#11 + def value; end +end + +# Common functionality for nodes that are binary operations: +# `or`, `and` ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#7 +module RuboCop::AST::BinaryOperatorNode + # Returns all of the conditions, including nested conditions, + # of the binary operation. + # + # operation and the let and right hand side of any nested binary + # operators + # + # @return [Array] the left and right hand side of the binary + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#28 + def conditions; end + + # Returns the left hand side node of the binary operation. + # + # @return [Node] the left hand side of the binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#11 + def lhs; end + + # Returns the right hand side node of the binary operation. + # + # @return [Node] the right hand side of the binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#18 + def rhs; end +end + +# A node extension for `block` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# A `block` node is essentially a method send with a block. Parser nests +# the `send` node inside the `block` node. +# +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#11 +class RuboCop::AST::BlockNode < ::RuboCop::AST::Node + include ::RuboCop::AST::MethodIdentifierPredicates + + # Returns a collection of all descendants of this node that are + # argument type nodes. See `ArgsNode#argument_list` for details. + # + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 + def argument_list; end + + # The arguments of this block. + # Note that if the block has destructured arguments, `arguments` will + # return a `mlhs` node, whereas `argument_list` will return only + # actual argument nodes. + # + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#48 + def arguments; end + + # Checks whether this block takes any arguments. + # + # @return [Boolean] whether this `block` node takes any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#85 + def arguments?; end + + # The body of this block. + # + # @return [Node, nil] the body of the `block` node or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#71 + def body; end + + # Checks whether the `block` literal is delimited by curly braces. + # + # @return [Boolean] whether the `block` literal is enclosed in braces + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#92 + def braces?; end + + # The closing delimiter for this `block` literal. + # + # @return [String] the closing delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#120 + def closing_delimiter; end + + # The delimiters for this `block` literal. + # + # @return [Array] the delimiters for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#106 + def delimiters; end + + # A shorthand for getting the first argument of this block. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#29 + def first_argument; end + + # Checks whether the `block` literal is delimited by `do`-`end` keywords. + # + # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#99 + def keywords?; end + + # Checks whether this `block` literal belongs to a lambda. + # + # @return [Boolean] whether the `block` literal belongs to a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#143 + def lambda?; end + + # A shorthand for getting the last argument of this block. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#38 + def last_argument; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#78 + def method_name; end + + # Checks whether this is a multiline block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a several lines + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#136 + def multiline?; end + + # The opening delimiter for this `block` literal. + # + # @return [String] the opening delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#113 + def opening_delimiter; end + + # The `send` node associated with this block. + # + # @return [SendNode] the `send` node associated with the `block` node + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#20 + def send_node; end + + # Checks whether this is a single line block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#128 + def single_line?; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `block` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#150 + def void_context?; end + + private + + # Numbered arguments of this `numblock`. + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#157 + def numbered_arguments; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#14 +RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `break` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `break` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/break_node.rb#8 +class RuboCop::AST::BreakNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Builder` is an AST builder that is utilized to let `Parser` +# generate ASTs with {RuboCop::AST::Node}. +# +# @example +# buffer = Parser::Source::Buffer.new('(string)') +# buffer.source = 'puts :foo' +# +# builder = RuboCop::AST::Builder.new +# require 'parser/ruby25' +# parser = Parser::Ruby25.new(builder) +# root_node = parser.parse(buffer) +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#16 +class RuboCop::AST::Builder < ::Parser::Builders::Default + # Generates {Node} from the given information. + # + # @return [Node] the generated node + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#99 + def n(type, children, source_map); end + + # TODO: Figure out what to do about literal encoding handling... + # More details here https://github.com/whitequark/parser/issues/283 + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#105 + def string_value(token); end + + private + + # source://rubocop-ast//lib/rubocop/ast/builder.rb#111 + def node_klass(type); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#21 +RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) + +# A node extension for `case_match` nodes. This will be used in place of +# a plain node when the builder constructs the AST, making its methods +# available to all `case_match` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#8 +class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # and the `else` (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the `in` branches + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#38 + def branches; end + + # @deprecated Use `in_pattern_branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#19 + def each_in_pattern(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#59 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [EmptyElse] the empty else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#52 + def else_branch; end + + # Returns an array of all the `in` pattern branches in the `case` statement. + # + # @return [Array] an array of `in_pattern` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#30 + def in_pattern_branches; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#14 + def keyword; end +end + +# A node extension for `case` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `case` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#8 +class RuboCop::AST::CaseNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # and the else (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the when branches + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#38 + def branches; end + + # @deprecated Use `when_branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#19 + def each_when(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#55 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#48 + def else_branch; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#14 + def keyword; end + + # Returns an array of all the when branches in the `case` statement. + # + # @return [Array] an array of `when` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#30 + def when_branches; end +end + +# A node extension for `casgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 +class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#26 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#19 + def name; end + + # The namespace of the constant being assigned. + # + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#12 + def namespace; end +end + +# A node extension for `class` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `class` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#8 +class RuboCop::AST::ClassNode < ::RuboCop::AST::Node + # The body of this `class` node. + # + # @return [Node, nil] the body of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#26 + def body; end + + # The identifier for this `class` node. + # + # @return [Node] the identifier of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#12 + def identifier; end + + # The parent class for this `class` node. + # + # @return [Node, nil] the parent class of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#19 + def parent_class; end +end + +# A mixin that helps give collection nodes array polymorphism. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 +module RuboCop::AST::CollectionNode + extend ::RuboCop::SimpleForwardable + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def &(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def *(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def +(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def -(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def <<(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def all?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def any?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def append(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def assoc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chain(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def clear(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect_concat(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def combination(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def concat(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def count(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def cycle(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def deconstruct(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_if(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def detect(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def difference(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_cons(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_entry(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_slice(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_object(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def entries(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def exclude?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def excluding(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract_options!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fifth(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fill(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter_map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_all(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def first(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flat_map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def forty_two(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fourth(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def from(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep_v(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def group_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def in_order_of(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def include?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def including(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_with(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inject(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersect?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersection(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def join(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keep_if(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def last(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def lazy(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def length(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def many?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def maximum(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def member?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minimum(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def none?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def one?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pack(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def partition(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def permutation(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pick(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def place(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pluck(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def prepend(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def product(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def push(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rassoc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reduce(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_combination(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse_each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rindex(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sample(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second_to_last(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shelljoin(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shift(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def size(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_after(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_before(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_when(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sole(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sum(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tally(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third_to_last(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_ary(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_formatted_s(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_fs(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_msgpack(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_sentence(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_set(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_xml(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transpose(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def union(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def unshift(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def values_at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def without(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def zip(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def |(*_arg0, **_arg1, &_arg2); end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 +RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# Common functionality for nodes that have conditions: +# `if`, `while`, `until`, `case`. +# This currently doesn't include `when` nodes, because they have multiple +# conditions, and need to be checked for that. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#9 +module RuboCop::AST::ConditionalNode + # Returns the body associated with the condition. This works together with + # each node's custom destructuring method to select the correct part of + # the node. + # + # @note For `if` nodes, this is the truthy branch. + # @return [Node, nil] the body of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#40 + def body; end + + # Returns the condition of the node. This works together with each node's + # custom destructuring method to select the correct part of the node. + # + # @return [Node, nil] the condition of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#29 + def condition; end + + # Checks whether the condition of the node is written on more than + # one line. + # + # @return [Boolean] whether the condition is on more than one line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#21 + def multiline_condition?; end + + # Checks whether the condition of the node is written on a single line. + # + # @return [Boolean] whether the condition is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#13 + def single_line_condition?; end +end + +# A node extension for `const` nodes. +# +# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 +class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#26 + def absolute?; end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + def class_name?; end + + # Yield nodes for the namespace + # + # For `::Foo::Bar::BAZ` => yields: + # s(:cbase), then + # s(:const, :Foo), then + # s(:const, s(:const, :Foo), :Bar) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#43 + def each_path(&block); end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + def module_name?; end + + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#8 + def namespace; end + + # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#33 + def relative?; end + + # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#13 + def short_name; end +end + +# A node extension for `csend` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `csend` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#8 +class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#9 + def send_type?; end +end + +# A node extension for `def` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `def` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#8 +class RuboCop::AST::DefNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + + # Checks whether this method definition node forwards its arguments + # as per the feature added in Ruby 2.7. + # + # @note This is written in a way that may support lead arguments + # which are rumored to be added in a later version of Ruby. + # @return [Boolean] whether the `def` node uses argument forwarding + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#26 + def argument_forwarding?; end + + # An array containing the arguments of the method definition. + # + # @return [Array] the arguments of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#40 + def arguments; end + + # The body of the method definition. + # + # @note this can be either a `begin` node, if the method body contains + # multiple expressions, or any other node, if it contains a single + # expression. + # @return [Node] the body of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#51 + def body; end + + # @return [Boolean] if the definition is without an `end` or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#63 + def endless?; end + + # The name of the defined method as a symbol. + # + # @return [Symbol] the name of the defined method + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#33 + def method_name; end + + # The receiver of the method definition, if any. + # + # @return [Node, nil] the receiver of the method definition, or `nil`. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#58 + def receiver; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `def` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#15 + def void_context?; end +end + +# A node extension for `defined?` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#8 +class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#12 + def node_parts; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#7 +module RuboCop::AST::Descendence + # Returns an array of child nodes. + # This is a shorthand for `node.each_child_node.to_a`. + # + # @return [Array] an array of child nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#38 + def child_nodes; end + + # Returns an array of descendant nodes. + # This is a shorthand for `node.each_descendant.to_a`. + # + # @return [Array] an array of descendant nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#72 + def descendants; end + + # Calls the given block for each child node. + # If no block is given, an `Enumerator` is returned. + # + # Note that this is different from `node.children.each { |child| ... }` + # which yields all children including non-node elements. + # + # @overload each_child_node + # @overload each_child_node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each child node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#22 + def each_child_node(*types); end + + # Calls the given block for each descendant node with depth first order. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_descendant + # @overload each_descendant + # @overload each_descendant + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each descendant node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#60 + def each_descendant(*types, &block); end + + # Calls the given block for the receiver and each descendant node in + # depth-first order. + # If no block is given, an `Enumerator` is returned. + # + # This method would be useful when you treat the receiver node as the root + # of a tree and want to iterate over all nodes in the tree. + # + # @overload each_node + # @overload each_node + # @overload each_node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#95 + def each_node(*types, &block); end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#107 + def visit_descendants(types, &block); end +end + +# A node extension for `dstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `dstr` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#8 +class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode + # source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#9 + def value; end +end + +# A node extension for `ensure` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `ensure` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#8 +class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node + # Returns the body of the `ensure` clause. + # + # @return [Node, nil] The body of the `ensure`. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 + def body; end + + # Checks whether this node body is a void context. + # Always `true` for `ensure`. + # + # @return [true] whether the `ensure` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#20 + def void_context?; end +end + +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 +module RuboCop::AST::Ext; end + +# Extensions to Parser::AST::Range +# +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#7 +module RuboCop::AST::Ext::Range + # If `exclude_end` is `true`, then the range will be exclusive. + # + # Assume that `node` corresponds to the following array literal: + # + # [ + # :foo, + # :bar + # ] + # + # node.loc.begin.line_span # => 1..1 + # node.source_range.line_span(exclude_end: true) # => 1...4 + # + # @return [Range] the range of line numbers for the node + # + # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#20 + def line_span(exclude_end: T.unsafe(nil)); end +end + +# A node extension for `float` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `float` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/float_node.rb#8 +class RuboCop::AST::FloatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `for` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `for` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#8 +class RuboCop::AST::ForNode < ::RuboCop::AST::Node + # Returns the body of the `for` loop. + # + # @return [Node, nil] The body of the `for` loop. + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#48 + def body; end + + # Returns the collection the `for` loop is iterating over. + # + # @return [Node] The collection the `for` loop is iterating over + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#41 + def collection; end + + # Checks whether the `for` node has a `do` keyword. + # + # @return [Boolean] whether the `for` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#19 + def do?; end + + # Returns the keyword of the `for` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#12 + def keyword; end + + # Returns the iteration variable of the `for` loop. + # + # @return [Node] The iteration variable of the `for` loop + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#34 + def variable; end + + # Checks whether this node body is a void context. + # Always `true` for `for`. + # + # @return [true] whether the `for` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#27 + def void_context?; end +end + +# A node extension for `forward-args` nodes. This will be used in place +# of a plain node when the builder constructs the AST, making its methods +# available to all `forward-args` nodes within RuboCop. +# +# Not used with modern emitters: +# +# $ ruby-parse -e "def foo(...); end" +# (def :foo +# (args +# (forward-arg)) nil) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (def :foo +# (forward-args) nil) +# +# Note the extra 's' with legacy form. +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#23 +class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Node wraps itself in an array to be compatible with other + # enumerable argument types. + # + # source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#28 + def to_a; end +end + +# Common functionality for nodes that can be used as hash elements: +# `pair`, `kwsplat` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#7 +module RuboCop::AST::HashElementNode + # Returns the delta between this element's delimiter and the argument's. + # + # @note Pairs with different delimiter styles return a delta of 0 + # @return [Integer] the delta between the two delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#61 + def delimiter_delta(other); end + + # Returns the key of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the key of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#13 + def key; end + + # Returns the delta between this pair's key and the argument pair's. + # + # @note Keys on the same line always return a delta of 0 + # @note Keyword splats always return a delta of 0 for right alignment + # @param alignment [Symbol] whether to check the left or right side + # @return [Integer] the delta between the two keys + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#43 + def key_delta(other, alignment = T.unsafe(nil)); end + + # Checks whether this `hash` element is on the same line as `other`. + # + # @note A multiline element is considered to be on the same line if it + # shares any of its lines with `other` + # @return [Boolean] whether this element is on the same line as `other` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#32 + def same_line?(other); end + + # Returns the value of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the value of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#22 + def value; end + + # Returns the delta between this element's value and the argument's. + # + # @note Keyword splats always return a delta of 0 + # @return [Integer] the delta between the two values + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#52 + def value_delta(other); end +end + +# A helper class for comparing the positions of different parts of a +# `pair` node. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#67 +class RuboCop::AST::HashElementNode::HashElementDelta + # @raise [ArgumentError] + # @return [HashElementDelta] a new instance of HashElementDelta + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#68 + def initialize(first, second); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#89 + def delimiter_delta; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#75 + def key_delta(alignment = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#82 + def value_delta; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#106 + def delta(first, second, alignment = T.unsafe(nil)); end + + # Returns the value of attribute first. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def first; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#117 + def keyword_splat?; end + + # Returns the value of attribute second. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def second; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#100 + def valid_argument_types?; end +end + +# A node extension for `hash` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `hash` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#8 +class RuboCop::AST::HashNode < ::RuboCop::AST::Node + # Checks whether the `hash` literal is delimited by curly braces. + # + # @return [Boolean] whether the `hash` literal is enclosed in braces + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#117 + def braces?; end + + # Calls the given block for each `key` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#59 + def each_key(&block); end + + # Calls the given block for each `pair` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#33 + def each_pair; end + + # Calls the given block for each `value` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#83 + def each_value(&block); end + + # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes. + # + # @return[Boolean] whether the `hash` is empty + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#22 + def empty?; end + + # Returns an array of all the keys in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # @return [Array] an array of keys in the `hash` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#48 + def keys; end + + # Checks whether this `hash` uses a mix of hash rocket and colon + # delimiters for its pairs. + # + # @note `kwsplat` nodes are ignored. + # @return [Boolean] whether the `hash` uses mixed delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#110 + def mixed_delimiters?; end + + # Returns an array of all the key value pairs in the `hash` literal. + # + # ignored. + # + # @note this may be different from children as `kwsplat` nodes are + # @return [Array] an array of `pair` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#15 + def pairs; end + + # Checks whether any of the key value pairs in the `hash` literal are on + # the same line. + # + # @note A multiline `pair` is considered to be on the same line if it + # shares any of its lines with another `pair` + # @note `kwsplat` nodes are ignored. + # @return [Boolean] whether any `pair` nodes are on the same line + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#100 + def pairs_on_same_line?; end + + # Returns an array of all the values in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # @return [Array] an array of values in the `hash` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#72 + def values; end +end + +# A node extension for `if` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `if` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#8 +class RuboCop::AST::IfNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Returns an array of all the branches in the conditional statement. + # + # @return [Array] an array of branch nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#147 + def branches; end + + # @deprecated Use `branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#164 + def each_branch(&block); end + + # Checks whether the `if` node has an `else` clause. + # + # @note This returns `true` for nodes containing an `elsif` clause. + # This is legacy behavior, and many cops rely on it. + # @return [Boolean] whether the node has an `else` clause + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#42 + def else?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is falsey. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the falsey branch node of the `if` node + # @return [nil] when there is no else branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#126 + def else_branch; end + + # Checks whether the `if` is an `elsif`. Parser handles these by nesting + # `if` nodes in the `else` branch. + # + # @return [Boolean] whether the node is an `elsif` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#32 + def elsif?; end + + # Checks whether the `if` node has at least one `elsif` branch. Returns + # true if this `if` node itself is an `elsif`. + # + # @return [Boolean] whether the `if` node has at least one `elsif` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#104 + def elsif_conditional?; end + + # Checks whether this node is an `if` statement. (This is not true of + # ternary operators and `unless` statements.) + # + # @return [Boolean] whether the node is an `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#16 + def if?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is truthy. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the truthy branch node of the `if` node + # @return [nil] if the truthy branch is empty + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#115 + def if_branch; end + + # Returns the inverse keyword of the `if` node as a string. Returns `if` + # for `unless` nodes and vice versa. Returns an empty string for ternary + # operators. + # + # @return [String] the inverse keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#66 + def inverse_keyword; end + + # Returns the keyword of the `if` statement as a string. Returns an empty + # string for ternary operators. + # + # @return [String] the keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#57 + def keyword; end + + # Checks whether the `if` node is in a modifier form, i.e. a condition + # trailing behind an expression. Only `if` and `unless` nodes without + # other branches can be modifiers. + # + # @return [Boolean] whether the `if` node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80 + def modifier_form?; end + + # Checks whether the `if` node has nested `if` nodes in any of its + # branches. + # + # @note This performs a shallow search. + # @return [Boolean] whether the `if` node contains nested conditionals + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#90 + def nested_conditional?; end + + # Custom destructuring method. This is used to normalize the branches + # for `if` and `unless` nodes, to aid comparisons and conversions. + # + # @return [Array] the different parts of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#134 + def node_parts; end + + # Checks whether the `if` node is a ternary operator. + # + # @return [Boolean] whether the `if` node is a ternary operator + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#49 + def ternary?; end + + # Checks whether this node is an `unless` statement. (This is not true + # of ternary operators and `if` statements.) + # + # @return [Boolean] whether the node is an `unless` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#24 + def unless?; end +end + +# A node extension for `in` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `in` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#8 +class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node + # Returns the body of the `in` node. + # + # @return [Node, nil] the body of the `in` node + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#33 + def body; end + + # Returns the index of the `in` branch within the `case` statement. + # + # @return [Integer] the index of the `in` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#19 + def branch_index; end + + # Returns a node of the pattern in the `in` branch. + # + # @return [Node] a pattern node + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#12 + def pattern; end + + # Checks whether the `in` node has a `then` keyword. + # + # @return [Boolean] whether the `in` node has a `then` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#26 + def then?; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar]" +# (index +# (send nil :foo) +# (sym :bar)) +# $ ruby-parse --legacy -e "foo[:bar]" +# (send +# (send nil :foo) :[] +# (sym :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#19 +class RuboCop::AST::IndexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#29 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#24 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#34 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#43 + def first_argument_index; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar] = :baz" +# (indexasgn +# (send nil :foo) +# (sym :bar) +# (sym :baz)) +# $ ruby-parse --legacy -e "foo[:bar] = :baz" +# (send +# (send nil :foo) :[]= +# (sym :bar) +# (sym :baz)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#21 +class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#31 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#26 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#36 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#45 + def first_argument_index; end +end + +# A node extension for `int` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `int` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/int_node.rb#8 +class RuboCop::AST::IntNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its methods available to +# all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#8 +class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#26 + def colon?; end + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#18 + def hash_rocket?; end + + # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. + # + # @return [true] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#48 + def kwsplat_type?; end + + # Custom destructuring method. This is used to normalize the branches + # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements. + # + # @return [Array] the different parts of the `kwsplat` + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#41 + def node_parts; end + + # Returns the operator for the `kwsplat` as a string. + # + # @return [String] the double splat operator + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#33 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#11 +RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) + +# Used for modern support only: +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "->(foo) { bar }" +# (block +# (lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (block +# (send nil :lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#23 +class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#43 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#38 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#28 + def lambda?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#33 + def lambda_literal?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#53 + def method_name; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#48 + def receiver; end + + private + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#60 + def first_argument_index; end +end + +# Common functionality for nodes that are a kind of method dispatch: +# `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#8 +module RuboCop::AST::MethodDispatchNode + include ::RuboCop::AST::MethodIdentifierPredicates + extend ::RuboCop::AST::NodePattern::Macros + + # Checks whether the dispatched method is an access modifier. + # + # @return [Boolean] whether the dispatched method is an access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#64 + def access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#273 + def adjacent_def_modifier?(param0 = T.unsafe(nil)); end + + # Checks whether this node is an arithmetic operation + # + # @return [Boolean] whether the dispatched method is an arithmetic + # operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#175 + def arithmetic_operation?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + def assignment?; end + + # Checks whether the dispatched method is a bare access modifier that + # affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#73 + def bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#278 + def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # Checks whether this is a binary operation. + # + # @example + # + # foo + bar + # @return [Boolean] whether this method is a binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#248 + def binary_operation?; end + + # Whether this method dispatch has an explicit block. + # + # @return [Boolean] whether the dispatched method has a block + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#167 + def block_literal?; end + + # The `block` or `numblock` node associated with this method dispatch, if any. + # + # @return [BlockNode, nil] the `block` or `numblock` node associated with this method + # call or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 + def block_node; end + + # Checks whether the name of the dispatched method matches the argument + # and has an implicit receiver. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#100 + def command?(name); end + + # Checks whether the *explicit* receiver of this method dispatch is a + # `const` node. + # + # @return [Boolean] whether the receiver of this method dispatch + # is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#152 + def const_receiver?; end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # or `nil` if it isn't a def modifier + # + # @example + # + # private def foo; end + # @return [Node | nil] returns the `def|defs` node this is a modifier for, + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#199 + def def_modifier(node = T.unsafe(nil)); end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # See also `def_modifier` that returns the node or `nil` + # + # @example + # + # private def foo; end + # @return [Boolean] whether the `def|defs` node is a modifier or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#187 + def def_modifier?(node = T.unsafe(nil)); end + + # Checks whether the dispatched method uses a dot to connect the + # receiver and the method name. + # + # This is useful for comparison operators, which can be called either + # with or without a dot, i.e. `foo == bar` or `foo.== bar`. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#119 + def dot?; end + + # Checks whether the dispatched method uses a double colon to connect the + # receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#127 + def double_colon?; end + + # Checks whether the method dispatch is the implicit form of `#call`, + # e.g. `foo.(bar)`. + # + # @return [Boolean] whether the method is the implicit form of `#call` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#160 + def implicit_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#257 + def in_macro_scope?(param0 = T.unsafe(nil)); end + + # Checks whether this is a lambda. Some versions of parser parses + # non-literal lambdas as a method send. + # + # @return [Boolean] whether this method is a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#213 + def lambda?; end + + # Checks whether this is a lambda literal (stabby lambda.) + # + # @example + # + # -> (foo) { bar } + # @return [Boolean] whether this method is a lambda literal + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#224 + def lambda_literal?; end + + # Checks whether the dispatched method is a macro method. A macro method + # is defined as a method that sits in a class, module, or block body and + # has an implicit receiver. + # + # @note This does not include DSLs that use nested blocks, like RSpec + # @return [Boolean] whether the dispatched method is a macro method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#57 + def macro?; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#27 + def method_name; end + + # Checks whether the dispatched method is a non-bare access modifier that + # affects only the method it receives. + # + # @return [Boolean] whether the dispatched method is a non-bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#82 + def non_bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#283 + def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # The receiving node of the method dispatch. + # + # @return [Node, nil] the receiver of the dispatched method or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#20 + def receiver; end + + # Checks whether the dispatched method uses a safe navigation operator to + # connect the receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#135 + def safe_navigation?; end + + # The source range for the method name or keyword that dispatches this call. + # + # @return [Parser::Source::Range] the source range for the method name or keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#34 + def selector; end + + # Checks whether the *explicit* receiver of this method dispatch is + # `self`. + # + # @return [Boolean] whether the receiver of this method dispatch is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#143 + def self_receiver?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + def setter_method?; end + + # Checks whether the dispatched method is a bare `private` or `protected` + # access modifier that affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # `private` or `protected` access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#91 + def special_modifier?; end + + # Checks whether this is a unary operation. + # + # @example + # + # -foo + # @return [Boolean] whether this method is a unary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#235 + def unary_operation?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#12 +RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#14 +RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) + +# Common predicates for nodes that reference method identifiers: +# `send`, `csend`, `def`, `defs`, `super`, `zsuper` +# +# @note this mixin expects `#method_name` and `#receiver` to be implemented +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#9 +module RuboCop::AST::MethodIdentifierPredicates + # Checks whether the method is an assignment method. + # + # @return [Boolean] whether the method is an assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#142 + def assignment_method?; end + + # Checks whether the method is a bang method. + # + # @return [Boolean] whether the method is a bang method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#171 + def bang_method?; end + + # Checks whether the method is a camel case method, + # e.g. `Integer()`. + # + # @return [Boolean] whether the method is a camel case method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#179 + def camel_case_method?; end + + # Checks whether the method is a comparison method. + # + # @return [Boolean] whether the method is a comparison + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#135 + def comparison_method?; end + + # Checks whether the *explicit* receiver of node is a `const` node. + # + # @return [Boolean] whether the receiver of this node is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#193 + def const_receiver?; end + + # Checks whether the method is an Enumerable method. + # + # @return [Boolean] whether the method is an Enumerable method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#157 + def enumerable_method?; end + + # Checks whether the method is an enumerator method. + # + # @return [Boolean] whether the method is an enumerator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#149 + def enumerator_method?; end + + # Checks whether the method name matches the argument. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#79 + def method?(name); end + + # Checks whether this is a negation method, i.e. `!` or keyword `not`. + # + # @return [Boolean] whether this method is a negation method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#200 + def negation_method?; end + + # Checks whether the method is a nonmutating Array method. + # + # @return [Boolean] whether the method is a nonmutating Array method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#114 + def nonmutating_array_method?; end + + # Checks whether the method is a nonmutating binary operator method. + # + # @return [Boolean] whether the method is a nonmutating binary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#93 + def nonmutating_binary_operator_method?; end + + # Checks whether the method is a nonmutating Hash method. + # + # @return [Boolean] whether the method is a nonmutating Hash method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#121 + def nonmutating_hash_method?; end + + # Checks whether the method is a nonmutating operator method. + # + # @return [Boolean] whether the method is a nonmutating operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#107 + def nonmutating_operator_method?; end + + # Checks whether the method is a nonmutating String method. + # + # @return [Boolean] whether the method is a nonmutating String method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#128 + def nonmutating_string_method?; end + + # Checks whether the method is a nonmutating unary operator method. + # + # @return [Boolean] whether the method is a nonmutating unary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#100 + def nonmutating_unary_operator_method?; end + + # Checks whether the method is an operator method. + # + # @return [Boolean] whether the method is an operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#86 + def operator_method?; end + + # Checks whether the method is a predicate method. + # + # @return [Boolean] whether the method is a predicate method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#164 + def predicate_method?; end + + # Checks whether this is a prefix bang method, e.g. `!foo`. + # + # @return [Boolean] whether this method is a prefix bang + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#214 + def prefix_bang?; end + + # Checks whether this is a prefix not method, e.g. `not foo`. + # + # @return [Boolean] whether this method is a prefix not + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#207 + def prefix_not?; end + + # Checks whether the *explicit* receiver of this node is `self`. + # + # @return [Boolean] whether the receiver of this node is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#186 + def self_receiver?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#16 +RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#10 +RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#32 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#24 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#48 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#28 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#59 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#26 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# http://phrogz.net/programmingruby/language.html#table_18.4 +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 +RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# Common functionality for nodes that can be used as modifiers: +# `if`, `while`, `until` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#7 +module RuboCop::AST::ModifierNode + # Checks whether the node is in a modifier form, i.e. a condition + # trailing behind an expression. + # + # @return [Boolean] whether the node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#12 + def modifier_form?; end +end + +# A node extension for `module` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `module` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#8 +class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node + # The body of this `module` node. + # + # @return [Node, nil] the body of the module + # + # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#19 + def body; end + + # The identifier for this `module` node. + # + # @return [Node] the identifier of the module + # + # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#12 + def identifier; end +end + +# A node extension for `next` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `next` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/next_node.rb#8 +class RuboCop::AST::NextNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Node` is a subclass of `Parser::AST::Node`. It provides +# access to parent nodes and an object-oriented way to traverse an AST with +# the power of `Enumerable`. +# +# It has predicate methods for every node type, like this: +# +# @example +# node.send_type? # Equivalent to: `node.type == :send` +# node.op_asgn_type? # Equivalent to: `node.type == :op_asgn` +# +# # Non-word characters (other than a-zA-Z0-9_) in type names are omitted. +# node.defined_type? # Equivalent to: `node.type == :defined?` +# +# # Find the first lvar node under the receiver node. +# lvar_node = node.each_descendant.find(&:lvar_type?) +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#21 +class RuboCop::AST::Node < ::Parser::AST::Node + include ::RuboCop::AST::Sexp + include ::RuboCop::AST::Descendence + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Node] a new instance of Node + # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#113 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def __ENCODING___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def __FILE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def __LINE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def alias_type?; end + + # Returns an array of ancestor nodes. + # This is a shorthand for `node.each_ancestor.to_a`. + # + # @return [Array] an array of ancestor nodes + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#268 + def ancestors; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def and_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def and_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def arg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def args_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#474 + def argument?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#478 + def argument_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def array_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def array_pattern_with_tail_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def array_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#426 + def assignment?; end + + # Some cops treat the shovel operator as a kind of assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#376 + def assignment_or_similar?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def back_ref_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#430 + def basic_conditional?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#384 + def basic_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def begin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def block_pass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def block_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def blockarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def blockarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#482 + def boolean_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def break_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#466 + def call_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def case_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def case_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def casgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def cbase_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#470 + def chained?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#522 + def class_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#540 + def class_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def class_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#165 + def complete!; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 + def complete?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def complex_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#434 + def conditional?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + def const_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def const_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def const_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def csend_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def cvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def cvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def def_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#335 + def defined_module; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#340 + def defined_module_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def defined_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def defs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def dstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def dsym_type?; end + + # Calls the given block for each ancestor node from parent to root. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_ancestor + # @overload each_ancestor + # @overload each_ancestor + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each ancestor node + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#256 + def each_ancestor(*types, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def eflipflop_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def empty_else_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#370 + def empty_source?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def ensure_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#418 + def equals_asgn?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def erange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def false_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#392 + def falsey_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def find_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#282 + def first_line; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def float_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def for_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def forward_arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def forward_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def forwarded_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def forwarded_kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def forwarded_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#519 + def global_const?(param0 = T.unsafe(nil), param1); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#494 + def guard_clause?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def gvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def gvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def hash_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def hash_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def ident_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def if_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def if_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def iflipflop_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + def immutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def in_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def in_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def index_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def indexasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def int_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def irange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def ivar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def ivasgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 + def keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwbegin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwnilarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwoptarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def kwsplat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#513 + def lambda?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#516 + def lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def lambda_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + def last_line; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Node, nil] the left (aka previous) sibling + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 + def left_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array] the left (aka previous) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#218 + def left_siblings; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#290 + def line_count; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#380 + def literal?; end + + # NOTE: `loop { }` is a normal method call and thus not a loop keyword. + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#443 + def loop_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def lvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def masgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_alt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_as_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_current_line_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#501 + def match_guard_clause?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_nil_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_pattern_p_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_rest_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_var_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_with_lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def match_with_trailing_comma_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def mlhs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#547 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def module_type?; end + + # Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#362 + def multiline?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#396 + def mutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#679 + def new_class_or_module_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def next_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def nil_type?; end + + # Common destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # Some node types override this with their own custom + # destructuring method. + # + # @return [Array] the different parts of the ndde + # + # source://ast/2.4.2/lib/ast/node.rb#56 + def node_parts; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#296 + def nonempty_line_count; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def not_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def nth_ref_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def numargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def numblock_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#486 + def numeric_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def objc_kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def objc_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def objc_varargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def op_asgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#458 + def operator_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def optarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def or_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def or_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def pair_type?; end + + # Returns the parent node, or `nil` if the receiver is a root node. + # + # @return [Node, nil] the parent node or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#147 + def parent; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#156 + def parent?; end + + # Searching the AST + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#346 + def parent_module_name; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#462 + def parenthesized_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def pin_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#438 + def post_condition_loop?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def postexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def preexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + def proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def procarg0_type?; end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both. + # If we know that expressions are useful only for their return values, + # and have no side effects, that means we can reorder them, change the + # number of times they are evaluated, or replace them with other + # expressions which are equivalent in value. + # So, is evaluation of this node free of side effects? + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#590 + def pure?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#490 + def range_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def rational_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#307 + def receiver(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 + def recursive_basic_literal?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 + def recursive_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def redo_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#414 + def reference?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def regexp_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def regopt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def resbody_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def rescue_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def restarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def retry_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def return_type?; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Node, nil] the right (aka next) sibling + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 + def right_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array] the right (aka next) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#227 + def right_siblings; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#161 + def root?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def sclass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def self_type?; end + + # Most nodes are of 'send' type, so this method is defined + # separately to make this check as fast as possible. + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + def send_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def shadowarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#422 + def shorthand_asgn?; end + + # Returns the index of the receiver node in its siblings. (Sibling index + # uses zero based numbering.) + # Use is discouraged, this is a potentially slow method. + # + # @return [Integer, nil] the index of the receiver node in its siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#192 + def sibling_index; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#366 + def single_line?; end + + # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` + # + # @return [String, nil] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#274 + def source; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#300 + def source_length; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#278 + def source_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#454 + def special_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def splat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#312 + def str_content(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def str_type?; end + + # @deprecated Use `:class_constructor?` + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#535 + def struct_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def super_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def sym_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def true_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#388 + def truthy_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def undef_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def unless_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def until_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def until_type?; end + + # Override `AST::Node#updated` so that `AST::Processor` does not try to + # mutate our ASTs. Since we keep references from children to parents and + # not just the other way around, we cannot update an AST and share + # identical subtrees. Rather, the entire AST must be copied any time any + # part of it is changed. + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#181 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both + # If we know that an expression is useful only for its side effects, that + # means we can transform it in ways which preserve the side effects, but + # change the return value + # So, does the return value of this node matter? If we changed it to + # `(...; nil)`, might that affect anything? + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#560 + def value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#410 + def variable?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def when_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def while_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def while_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def xstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def yield_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 + def zsuper_type?; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node.rb#151 + def parent=(node); end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#618 + def begin_value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#629 + def case_if_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#326 + def defined_module0(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#623 + def for_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#665 + def parent_module_name_for_block(ancestor); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#653 + def parent_module_name_for_sclass(sclass_node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#640 + def parent_module_name_part(node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#608 + def visit_ancestors(types); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#635 + def while_until_value_used?; end + + class << self + private + + # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + def def_recursive_literal_predicate(kind); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#80 +RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#55 +RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#58 +RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#42 +RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) + +# <=> isn't included here, because it doesn't return a boolean. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#28 +RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#39 +RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#60 +RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#87 +RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#88 +RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#50 +RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#35 +RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#47 +RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#70 +RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#37 +RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#83 +RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#84 +RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#64 +RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#44 +RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#76 +RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#62 +RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#68 +RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#53 +RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#78 +RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#31 +RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#66 +RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) + +# This class performs a pattern-matching operation on an AST node. +# +# Detailed syntax: /docs/modules/ROOT/pages/node_pattern.adoc +# +# Initialize a new `NodePattern` with `NodePattern.new(pattern_string)`, then +# pass an AST node to `NodePattern#match`. Alternatively, use one of the class +# macros in `NodePattern::Macros` to define your own pattern-matching method. +# +# If the match fails, `nil` will be returned. If the match succeeds, the +# return value depends on whether a block was provided to `#match`, and +# whether the pattern contained any "captures" (values which are extracted +# from a matching AST.) +# +# - With block: #match yields the captures (if any) and passes the return +# value of the block through. +# - With no block, but one capture: the capture is returned. +# - With no block, but multiple captures: captures are returned as an array. +# - With no block and no captures: #match returns `true`. +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 +class RuboCop::AST::NodePattern + include ::RuboCop::AST::NodePattern::MethodDefiner + extend ::RuboCop::SimpleForwardable + + # @return [NodePattern] a new instance of NodePattern + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#77 + def initialize(str, compiler: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + def ==(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#107 + def as_json(_options = T.unsafe(nil)); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def ast; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def captures(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 + def encode_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + def eql?(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#119 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#115 + def init_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#103 + def marshal_dump; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#99 + def marshal_load(pattern); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#85 + def match(*args, **rest, &block); end + + # Returns the value of attribute match_code. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def match_code; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def named_parameters(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute pattern. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def pattern; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def positional_parameters(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 + def to_s; end + + class << self + # Yields its argument and any descendants, depth-first. + # + # @yield [element] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#59 + def descend(element, &block); end + end +end + +# Responsible to build the AST nodes for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#10 +class RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#17 + def emit_atom(type, value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#29 + def emit_call(type, selector, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#11 + def emit_capture(capture_token, node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#25 + def emit_list(type, _begin, children, _end); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#41 + def emit_subsequence(node_list); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#21 + def emit_unary_op(type, _operator = T.unsafe(nil), *children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#34 + def emit_union(begin_t, pattern_lists, end_t); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#53 + def n(type, *args); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#49 + def optimizable_as_set?(children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#57 + def union_children(pattern_lists); end +end + +# A NodePattern comment, simplified version of ::Parser::Source::Comment +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#7 +class RuboCop::AST::NodePattern::Comment + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#14 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @param other [Object] + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#31 + def ==(other); end + + # @return [String] a human-readable representation of this comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#39 + def inspect; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + def loc; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + def location; end + + # @return [String] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#20 + def text; end +end + +# The top-level compiler holding the global state +# Defers work to its subcompilers +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 +class RuboCop::AST::NodePattern::Compiler + extend ::RuboCop::SimpleForwardable + + # @return [Compiler] a new instance of Compiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bind(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute binding. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def binding; end + + # Returns the value of attribute captures. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def captures; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#42 + def compile_as_atom(node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#46 + def compile_as_node_pattern(node, **options); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#50 + def compile_sequence(sequence, var:); end + + # Enumerates `enum` while keeping track of state across + # union branches (captures and unification). + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#38 + def each_union(enum, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#74 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#31 + def named_parameter(name); end + + # Returns the value of attribute named_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def named_parameters; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#70 + def next_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#54 + def parser; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#26 + def positional_parameter(number); end + + # Returns the value of attribute positional_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def positional_parameters; end + + # Utilities + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#60 + def with_temp_variables(*names, &block); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#81 + def enforce_same_captures(enum); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#96 + def new_capture; end +end + +# Generates code that evaluates to a value (Ruby object) +# This value responds to `===`. +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#28 + def visit_const; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#32 + def visit_named_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_number; end + + # Assumes other types are node patterns. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#46 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#36 + def visit_positional_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#40 + def visit_set; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_string; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_symbol; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#15 + def visit_unify; end +end + +# Holds the list of bound variable names +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#8 +class RuboCop::AST::NodePattern::Compiler::Binding + # @return [Binding] a new instance of Binding + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#9 + def initialize; end + + # Yields the first time a given name is bound + # + # @return [String] bound variable name + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 + def bind(name); end + + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31 + def union_bind(enum); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#69 + def forbid(names); end +end + +# Variant of the Compiler with tracing information for nodes +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 +class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler + # @return [Debug] a new instance of Debug + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def comments(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 + def named_parameters; end + + # Returns the value of attribute node_ids. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#33 + def node_ids; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 + def parser; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tokens(*_arg0, **_arg1, &_arg2); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#36 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer + # @api private + # @return [Colorizer] a new instance of Colorizer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + def initialize(pattern, compiler: T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def compiler; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def node_pattern; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def pattern; end + + # @api private + # @return [Node] the Ruby AST + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#103 + def test(ruby, trace: T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#111 + def ruby_ast(ruby); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 + def ruby_parser; end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#37 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#92 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug + +# Result of a NodePattern run against a particular AST +# Consider constructor is private +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#46 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct + # @api private + # @return [Hash] a map for {character_position => color} + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#56 + def color_map(color_scheme = T.unsafe(nil)); end + + # @api private + # @return [String] a Rainbow colorized version of ruby + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def colorize(color_scheme = T.unsafe(nil)); end + + # Returns the value of attribute colorizer + # + # @return [Object] the current value of colorizer + def colorizer; end + + # Sets the attribute colorizer + # + # @param value [Object] the value to set the attribute colorizer to. + # @return [Object] the newly set value + def colorizer=(_); end + + # @api private + # @return [Hash] a map for {node => matched?}, depth-first + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#66 + def match_map; end + + # @api private + # @return [Boolean] a value of `Trace#matched?` or `:not_visitable` + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#74 + def matched?(node); end + + # Returns the value of attribute returned + # + # @return [Object] the current value of returned + def returned; end + + # Sets the attribute returned + # + # @param value [Object] the value to set the attribute returned to. + # @return [Object] the newly set value + def returned=(_); end + + # Returns the value of attribute ruby_ast + # + # @return [Object] the current value of ruby_ast + def ruby_ast; end + + # Sets the attribute ruby_ast + # + # @param value [Object] the value to set the attribute ruby_ast to. + # @return [Object] the newly set value + def ruby_ast=(_); end + + # Returns the value of attribute trace + # + # @return [Object] the current value of trace + def trace; end + + # Sets the attribute trace + # + # @param value [Object] the value to set the attribute trace to. + # @return [Object] the newly set value + def trace=(_); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#87 + def ast; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#81 + def color_map_for(node, color); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 +module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#140 + def do_compile; end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#150 + def node_id; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#146 + def tracer(kind); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 +class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#161 +class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# Compiled node pattern requires a named parameter `trace`, +# which should be an instance of this class +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#13 +class RuboCop::AST::NodePattern::Compiler::Debug::Trace + # @return [Trace] a new instance of Trace + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#14 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#18 + def enter(node_id); end + + # return nil (not visited), false (not matched) or true (matched) + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#28 + def matched?(node_id); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#23 + def success(node_id); end +end + +# Compiles code that evalues to true or false +# for a given value `var` (typically a RuboCop::AST::Node) +# or it's `node.type` if `seq_head` is true +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#13 +class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [NodePatternSubcompiler] a new instance of NodePatternSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#16 + def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end + + # Returns the value of attribute access. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def access; end + + # Returns the value of attribute seq_head. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def seq_head; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#119 + def access_element; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#123 + def access_node; end + + # @param [Array, nil] + # @return [String, nil] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#113 + def compile_args(arg_list, first: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#129 + def compile_guard_clause; end + + # Compiling helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#107 + def compile_value_match(value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#133 + def multiple_access(kind); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#30 + def visit_ascend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#58 + def visit_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#37 + def visit_descend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#84 + def visit_function_call; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#73 + def visit_intersection; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#25 + def visit_negation; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#88 + def visit_node_type; end + + # Assumes other types are atoms. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#100 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#80 + def visit_predicate; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#92 + def visit_sequence; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#49 + def visit_unify; end + + # Lists + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#64 + def visit_union; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#45 + def visit_wildcard; end +end + +# Compiles terms within a sequence to code that evalues to true or false. +# Compilation of the nodes that can match only a single term is deferred to +# `NodePatternSubcompiler`; only nodes that can match multiple terms are +# compiled here. +# Assumes the given `var` is a `::RuboCop::AST::Node` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 +class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # Calls `compile_sequence`; the actual `compile` method + # will be used for the different terms of the sequence. + # The only case of re-entrant call to `compile` is `visit_capture` + # + # @return [SequenceSubcompiler] a new instance of SequenceSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#25 + def initialize(compiler, sequence:, var:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#31 + def compile_sequence; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def in_sync; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#226 + def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def cur_index; end + + # yield `sync_code` iff not already in sync + # + # @yield [code] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#242 + def sync; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + def compile(node); end + + # Compilation helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#165 + def compile_and_advance(term); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#128 + def compile_any_order_branches(matched_var); end + + # @return [Array] Else code, and init code (if any) + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#137 + def compile_any_order_else; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#180 + def compile_captured_repetition(child_code, child_captures); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#119 + def compile_case(when_branches, else_code); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#361 + def compile_child_nb_guard(arity_range); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#319 + def compile_cur_index; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#325 + def compile_index(cur = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#353 + def compile_loop(term); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#347 + def compile_loop_advance(to = T.unsafe(nil)); end + + # Assumes `@cur_index` is already updated + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#198 + def compile_matched(kind); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#304 + def compile_max_matched; end + + # @return [String] code that evaluates to `false` if the matched arity is too small + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#270 + def compile_min_check; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#285 + def compile_remaining; end + + # @return [Hash] of {subcompiler => code} + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#373 + def compile_union_forks; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#313 + def empty_loop; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#214 + def handle_prev; end + + # Modifies in place `forks` + # Syncs our state + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#400 + def merge_forks!(forks); end + + # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#384 + def preserve_union_start(forks); end + + # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 + # and remaining arities are: 3..4, 2..3, 2..2, 0..0 + # + # @return [Array] total arities (as Ranges) of remaining children nodes + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#259 + def remaining_arities(children, last_arity); end + + # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#341 + def use_index_from_end; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#88 + def visit_any_order; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#150 + def visit_capture; end + + # Single node patterns are all handled here + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#62 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#78 + def visit_repetition; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#159 + def visit_rest; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#104 + def visit_union; end + + # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must + # have `def in_sequence_head; :raise; end` + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#333 + def within_loop; end +end + +# Shift of 1 from standard Ruby indices +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#19 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) + +# Base class for subcompilers +# Implements visitor pattern +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [Subcompiler] a new instance of Subcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#15 + def initialize(compiler); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + def compile(node); end + + # Returns the value of attribute compiler. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#13 + def compiler; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#34 + def do_compile; end + + # Returns the value of attribute node. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#32 + def node; end + + class << self + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#47 + def inherited(base); end + + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#42 + def method_added(method); end + + # Returns the value of attribute registry. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#40 + def registry; end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#53 +class RuboCop::AST::NodePattern::Invalid < ::StandardError; end + +# Lexer class for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#18 +class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#31 + def initialize(source); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def comments; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def source_buffer; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def tokens; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#60 + def do_parse; end + + # @return [token] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#40 + def emit(type); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#48 + def emit_comment; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#52 + def emit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#64 + def token(type, value); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#19 +RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#21 +RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The generated lexer RuboCop::AST::NodePattern::LexerRex +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#23 +class RuboCop::AST::NodePattern::LexerRex + # Yields on the current action. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#69 + def action; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename=(_arg0); end + + # The current location in the parse. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 + def location; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def match; end + + # The match groups for the current scan. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#60 + def matches; end + + # Lex the next token. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 + def next_token; end + + # Parse the given string. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 + def parse(str); end + + # Read in and parse the file at +path+. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 + def parse_file(path); end + + # The current scanner class. Must be overridden in subclasses. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 + def scanner_class; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss=(_arg0); end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state; end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state=(_arg0); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#31 +RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#27 +RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#29 +RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# :startdoc: +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#36 +class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#30 +RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#33 +RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#32 +RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#28 +RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#37 +class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end + +# Helpers for defining methods based on a pattern string +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#28 +module RuboCop::AST::NodePattern::Macros + # Define a method which applies a pattern to an AST node + # + # The new method will return nil if the node does not match. + # If the node matches, and a block is provided, the new method will + # yield to the block (passing any captures as block arguments). + # If the node matches, and no block is provided, the new method will + # return the captures, or `true` if there were none. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#36 + def def_node_matcher(method_name, pattern_str, **keyword_defaults); end + + # Define a method which recurses over the descendants of an AST node, + # checking whether any of them match the provided pattern + # + # If the method name ends with '?', the new method will return `true` + # as soon as it finds a descendant which matches. Otherwise, it will + # yield all descendants which match. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#46 + def def_node_search(method_name, pattern_str, **keyword_defaults); end +end + +# Functionality to turn `match_code` into methods/lambda +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#7 +module RuboCop::AST::NodePattern::MethodDefiner + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#37 + def as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#27 + def compile_as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#8 + def def_node_matcher(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#21 + def def_node_search(base, method_name, **defaults); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#139 + def compile_init; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#50 + def def_helper(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#114 + def emit_keyword_list(forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#132 + def emit_lambda_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#125 + def emit_method_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#63 + def emit_node_search(method_name); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#74 + def emit_node_search_body(method_name, prelude:, on_match:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#110 + def emit_param_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#119 + def emit_params(*first, forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#100 + def emit_retval; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#89 + def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end + + # This method minimizes the closure for our method + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#44 + def wrapping_block(method_name, **defaults); end +end + +# Base class for AST Nodes of a `NodePattern` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 +class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node + include ::RuboCop::AST::Descendence + extend ::RuboCop::SimpleForwardable + + # Note: `arity.end` may be `Float::INFINITY` + # + # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28 + def arity; end + + # @return [Range] arity as a Range + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68 + def arity_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22 + def capture?; end + + # @return [Node] most nodes have only one child + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47 + def child; end + + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42 + def children_nodes; end + + # @return [Array, nil] replace node with result, or `nil` if no change requested. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33 + def in_sequence_head; end + + # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) + # + # @return [Boolean] returns true for nodes having a Ruby literal equivalent + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 + def matches_within_set?; end + + # @return [Integer] nb of captures of that node and its descendants + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 + def nb_captures; end + + # To be overridden by subclasses + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 + def rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77 + def source_range; end + + # @return [Boolean] returns whether it matches a variable number of elements + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 + def variadic?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73 + def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end +end + +# Node class for `` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179 +class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197 + def arity; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189 + def ends_with_rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193 + def rest_node; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185 + def term_nodes; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182 +RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `$something` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 +class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def arity(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 + def capture?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108 + def in_sequence_head; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 + def nb_captures; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rest?(*_arg0, **_arg1, &_arg2); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 +module RuboCop::AST::NodePattern::Node::ForbidInSeqHead + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 + def in_sequence_head; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139 +RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81 +RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) + +# Registry +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 +RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 +RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) + +# Node class for `predicate?(:arg, :list)` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130 +class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135 + def arg_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 + def method_name; end +end + +# Node class for `int+` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142 +class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149 +RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `...` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161 +class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173 + def in_sequence_head; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165 + def rest?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 +RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) + +# Node class for `(type first second ...)` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117 +class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # @return [Sequence] a new instance of Sequence + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end +end + +# A list (potentially empty) of nodes; part of a Union +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205 +class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213 + def in_sequence_head; end +end + +# Node class for `{ ... }` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223 +class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 + def in_sequence_head; end +end + +# Parser for NodePattern +# Note: class reopened in `parser.racc` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 +class RuboCop::AST::NodePattern::Parser < ::Racc::Parser + extend ::RuboCop::SimpleForwardable + + # @return [Parser] a new instance of Parser + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 + def initialize(builder = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 + def _reduce_10(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 + def _reduce_11(val, _values); end + + # reduce 12 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 + def _reduce_13(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 + def _reduce_14(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 + def _reduce_15(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 + def _reduce_16(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 + def _reduce_17(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 + def _reduce_18(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 + def _reduce_19(val, _values); end + + # reduce 1 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 + def _reduce_2(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 + def _reduce_20(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 + def _reduce_21(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 + def _reduce_22(val, _values); end + + # reduce 24 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 + def _reduce_25(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 + def _reduce_26(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 + def _reduce_3(val, _values); end + + # reduce 32 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 + def _reduce_33(val, _values); end + + # reduce 36 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 + def _reduce_37(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 + def _reduce_38(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 + def _reduce_39(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 + def _reduce_4(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 + def _reduce_40(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 + def _reduce_41(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 + def _reduce_42(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 + def _reduce_43(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 + def _reduce_44(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 + def _reduce_45(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 + def _reduce_46(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 + def _reduce_5(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 + def _reduce_6(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 + def _reduce_7(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 + def _reduce_8(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 + def _reduce_9(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 + def _reduce_none(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_atom(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_call(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_capture(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_list(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_union(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 + def inspect; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def next_token(*_arg0, **_arg1, &_arg2); end + + # (Similar API to `parser` gem) + # Parses a source and returns the AST. + # + # @param source_buffer [Parser::Source::Buffer, String] The source buffer to parse. + # @return [NodePattern::Node] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#31 + def parse(source); end + + private + + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#50 + def enforce_unary(node); end + + # Overrides Racc::Parser's method: + # + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#59 + def on_error(token, val, _vstack); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#16 +RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#17 +RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 +RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 +RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 +RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# Overrides Parser to use `WithMeta` variants and provide additional methods +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#8 +class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def comments; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#100 + def do_parse; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def tokens; end +end + +# Overrides Builder to emit nodes with locations +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#39 +class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#40 + def emit_atom(type, token); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#61 + def emit_call(type, selector_t, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#55 + def emit_list(type, begin_t, children, end_t); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#49 + def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#81 + def join_exprs(left_expr, right_expr); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#75 + def loc(token_or_range); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#71 + def n(type, children, source_map); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#85 + def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end +end + +# Overrides Lexer to token locations and comments +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#10 +class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#13 + def initialize(str_or_buffer); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#27 + def emit_comment; end + + # @return [::Parser::Source::Range] last match's position + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#33 + def pos; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#11 + def source_buffer; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#23 + def token(type, value); end +end + +# Utility to assign a set of values to a constant +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#7 +module RuboCop::AST::NodePattern::Sets + class << self + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#31 + def [](set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#15 + def name(set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#22 + def uniq(name); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#14 +RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#8 +RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_AFTER_ACTION_APPEND_AFTER_ACTION_APPEND_AROUND_ACTION_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_AP_P_PP_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_BINWRITE_SYSWRITE_WRITE_WRITE_NONBLOCK = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CHANGE_COLUMN_EXECUTE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GET_POST_PUT_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE_BELONGS_TO = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HEAD_ASSERT_RESPONSE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HTML_HTML5 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INSERT_INSERT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES_TO_H_TO_XML = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH___MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MESSAGES_DETAILS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NOTICE_ALERT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REFERER_REFERRER = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RENDER_REDIRECT_TO = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RETURNING_UNIQUE_BY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ROOT_PUBLIC_PATH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_KEEP_IF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SKIP_AFTER_ACTION_SKIP_AROUND_ACTION_SKIP_BEFORE_ACTION_SKIP_ACTION_CALLBACK = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SORT_SORT_MIN_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STDOUT_STDERR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TASK_NAMESPACE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TIME_DATETIME = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_LOCALIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_T = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TRY_TRY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_T_TRANSLATE_L_LOCALIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_WHERE_NOT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__EQL_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___9 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___EQL_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___EQL_INCLUDE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 +RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) + +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 +module RuboCop::AST::NumericNode + # Checks whether this is literal has a sign. + # + # @example + # + # +42 + # @return [Boolean] whether this literal has a sign. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#17 + def sign?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#7 +RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#8 +class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node + # @return [AsgnNode] the assignment node + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 + def assignment_node; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#31 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#17 + def name; end + + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#24 + def operator; end +end + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#8 +class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#12 + def operator; end +end + +# A node extension for `or` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `or` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#8 +class RuboCop::AST::OrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `or` as a string. + # Returns `or` for `||` and vice versa. + # + # @return [String] the alternate of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#16 + def alternate_operator; end + + # Returns the inverse keyword of the `or` node as a string. + # Returns `and` for `or` and `&&` for `||`. + # + # @return [String] the inverse of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#24 + def inverse_operator; end +end + +# A node extension for `pair` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `pair` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#8 +class RuboCop::AST::PairNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # Checks whether the `pair` uses a colon delimiter. + # + # @return [Boolean] whether this `pair` uses a colon delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#30 + def colon?; end + + # Returns the delimiter of the `pair` as a string. Returns `=>` for a + # colon delimited `pair` and `:` for a hash rocket delimited `pair`. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#39 + def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses a hash rocket delimiter. + # + # @return [Boolean] whether this `pair` uses a hash rocket delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#23 + def hash_rocket?; end + + # Returns the inverse delimiter of the `pair` as a string. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the inverse delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#51 + def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses hash value omission. + # + # @return [Boolean] whether this `pair` uses hash value omission + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#69 + def value_omission?; end + + # Checks whether the value starts on its own line. + # + # @return [Boolean] whether the value in the `pair` starts its own line + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#62 + def value_on_new_line?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#15 +RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#11 +RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#17 +RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#13 +RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) + +# Requires implementing `arguments`. +# +# Common functionality for nodes that are parameterized: +# `send`, `super`, `zsuper`, `def`, `defs` +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#10 +module RuboCop::AST::ParameterizedNode + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#40 + def arguments?; end + + # Whether the last argument of the node is a block pass, + # i.e. `&block`. + # + # @return [Boolean] whether the last argument of the node is a block pass + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#58 + def block_argument?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#24 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#33 + def last_argument; end + + # Checks whether this node's arguments are wrapped in parentheses. + # + # @return [Boolean] whether this node's arguments are + # wrapped in parentheses + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#15 + def parenthesized?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + def rest_argument?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + def splat_argument?; end +end + +# A specialized `ParameterizedNode`. +# Requires implementing `first_argument_index` +# Implements `arguments` as `children[first_argument_index..-1]` +# and optimizes other calls +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#83 +module RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] arguments, if any + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#89 + def arguments; end + + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#119 + def arguments?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#103 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#112 + def last_argument; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#86 +RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# A specialized `ParameterizedNode` for node that have a single child +# containing either `nil`, an argument, or a `begin` node with all the +# arguments +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#66 +module RuboCop::AST::ParameterizedNode::WrappedArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] The arguments of the node. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#69 + def arguments; end +end + +# Common functionality for nodes that are predicates: +# `or`, `and` ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#7 +module RuboCop::AST::PredicateOperatorNode + # Checks whether this is a logical operator. + # + # @return [Boolean] whether this is a logical operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#27 + def logical_operator?; end + + # Returns the operator as a string. + # + # @return [String] the operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#20 + def operator; end + + # Checks whether this is a semantic operator. + # + # @return [Boolean] whether this is a semantic operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#34 + def semantic_operator?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 +RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) + +# A node extension for `procarg0` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all `arg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#8 +class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#12 + def name; end +end + +# ProcessedSource contains objects which are generated by Parser +# and other information such as disabled lines for cops. +# It also provides a convenient way to access source lines. +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#10 +class RuboCop::AST::ProcessedSource + # @return [ProcessedSource] a new instance of ProcessedSource + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#28 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#72 + def [](*args); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def ast; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#50 + def ast_with_comments; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 + def blank?; end + + # Returns the value of attribute buffer. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def buffer; end + + # Raw source checksum for tracking infinite loops. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#83 + def checksum; end + + # @return [Comment, nil] the comment at that line, if any. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116 + def comment_at_line(line); end + + # Consider using `each_comment_in_lines` instead + # + # @deprecated use contains_comment? + # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 + def commented?(source_range); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def comments; end + + # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. + # + # @deprecated Use `each_comment_in_lines` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#146 + def comments_before_line(line); end + + # Consider using `each_comment_in_lines` instead + # + # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 + def contains_comment?(source_range); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#160 + def current_line(token); end + + # Returns the value of attribute diagnostics. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def diagnostics; end + + # @deprecated Use `comments.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#88 + def each_comment(&block); end + + # Enumerates on the comments contained with the given `line_range` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 + def each_comment_in_lines(line_range); end + + # @deprecated Use `tokens.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 + def each_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 + def file_path; end + + # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#93 + def find_comment(&block); end + + # @deprecated Use `tokens.find` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#103 + def find_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#181 + def first_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#164 + def following_line(token); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#185 + def last_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#168 + def line_indentation(line_number); end + + # @return [Boolean] if the given line number has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 + def line_with_comment?(line); end + + # Returns the source lines, line break characters removed, excluding a + # possible __END__ and everything that comes after. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#58 + def lines; end + + # Returns the value of attribute parser_engine. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def parser_engine; end + + # Returns the value of attribute parser_error. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def parser_error; end + + # Returns the value of attribute path. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def path; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#156 + def preceding_line(token); end + + # Returns the value of attribute raw_source. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def raw_source; end + + # Returns the value of attribute ruby_version. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def ruby_version; end + + # The tokens list is always sorted by token position, except for cases when heredoc + # is passed as a method argument. In this case tokens are interleaved by + # heredoc contents' tokens. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#192 + def sorted_tokens; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#150 + def start_with?(string); end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def tokens; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 + def tokens_within(range_or_node); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#76 + def valid_syntax?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199 + def comment_index; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309 + def create_parser(ruby_version, parser_engine); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325 + def first_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330 + def last_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205 + def parse(source, ruby_version, parser_engine); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238 + def parser_class(ruby_version, parser_engine); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335 + def source_range(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 + def tokenize(parser); end + + class << self + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#14 +RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#17 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 +RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) + +# A node extension for `irange` and `erange` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `irange` and `erange` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#8 +class RuboCop::AST::RangeNode < ::RuboCop::AST::Node + # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#9 + def begin; end + + # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#13 + def end; end +end + +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `regexp` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `regexp` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#8 +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + # @return [String] a string of regexp content + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#37 + def content; end + + # @return [Bool] if char is one of the delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#57 + def delimiter?(char); end + + # @return [String] the regexp delimiters (without %r) + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#52 + def delimiters; end + + # @return [Bool] if regexp uses the extended regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#72 + def extended?; end + + # @return [Bool] if regexp uses the fixed-encoding regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#92 + def fixed_encoding?; end + + # @return [Bool] if regexp uses the ignore-case regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#77 + def ignore_case?; end + + # @return [Bool] if regexp contains interpolation + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#62 + def interpolation?; end + + # @return [Bool] if regexp uses the multiline regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#67 + def multiline_mode?; end + + # @return [Bool] if regexp uses the no-encoding regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#87 + def no_encoding?; end + + # NOTE: The 'o' option is ignored. + # + # @return [Integer] the Regexp option bits as returned by Regexp#options + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#32 + def options; end + + # @return [Bool] if the regexp is a %r{...} literal (using any delimiters) + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#47 + def percent_r_literal?; end + + # @return [RuboCop::AST::Node] a regopt node + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#25 + def regopt; end + + # @return [Bool] if regexp uses the single-interpolation regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#82 + def single_interpolation?; end + + # @return [Bool] if the regexp is a /.../ literal + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#42 + def slash_literal?; end + + # @return [Regexp] a regexp of this node + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#20 + def to_regexp; end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#98 + def regopt_include?(option); end +end + +# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#9 +RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) + +# A node extension for `resbody` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `resbody` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#8 +class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node + # Returns the body of the `rescue` clause. + # + # @return [Node, nil] The body of the `resbody`. + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#12 + def body; end + + # Returns the index of the `resbody` branch within the exception handling statement. + # + # @return [Integer] the index of the `resbody` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#40 + def branch_index; end + + # Returns the exception variable of the `rescue` clause. + # + # @return [Node, nil] The exception variable of the `resbody`. + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#33 + def exception_variable; end + + # Returns an array of all the exceptions in the `rescue` clause. + # + # @return [Array] an array of exception nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#19 + def exceptions; end +end + +# A node extension for `rescue` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `rescue` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#8 +class RuboCop::AST::RescueNode < ::RuboCop::AST::Node + # Returns the body of the rescue node. + # + # @return [Node, nil] The body of the rescue node. + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#12 + def body; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # and the else (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the rescue branches + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#27 + def branches; end + + # Checks whether this exception handling statement has an `else` branch. + # + # @return [Boolean] whether the exception handling statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#44 + def else?; end + + # Returns the else branch of the exception handling statement, if any. + # + # @return [Node] the else branch node of the exception handling statement + # @return [nil] if the exception handling statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#37 + def else_branch; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # @return [Array] an array of `resbody` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#19 + def resbody_branches; end +end + +# A node extension for `return` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `return` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/return_node.rb#8 +class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# Responsible for compatibility with main gem +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#8 +module RuboCop::AST::RuboCopCompatibility + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#13 + def rubocop_loaded; end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#9 +RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) + +# A node extension for `sclass` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sclass` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#8 +class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node + # The body of this `sclass` node. + # + # @return [Node, nil] the body of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#19 + def body; end + + # The identifier for this `sclass` node. (Always `self`.) + # + # @return [Node] the identifier of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#12 + def identifier; end +end + +# A node extension for `send` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#8 +class RuboCop::AST::SendNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#13 + def attribute_accessor?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#18 + def send_type?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#24 + def first_argument_index; end +end + +# This module provides a shorthand method to create a {Node} like +# `Parser::AST::Sexp`. +# +# @see https://www.rubydoc.info/gems/ast/AST/Sexp +# +# source://rubocop-ast//lib/rubocop/ast/sexp.rb#9 +module RuboCop::AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # + # source://rubocop-ast//lib/rubocop/ast/sexp.rb#11 + def s(type, *children); end +end + +# A node extension for `str`, `dstr`, and `xstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `str` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#8 +class RuboCop::AST::StrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#11 + def character_literal?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#15 + def heredoc?; end +end + +# A node extension for `super`- and `zsuper` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `super`- and `zsuper` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#8 +class RuboCop::AST::SuperNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `super` node + # + # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#16 + def node_parts; end +end + +# A node extension for `sym` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sym` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/symbol_node.rb#8 +class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode +end + +# A basic wrapper around Parser's tokens. +# +# source://rubocop-ast//lib/rubocop/ast/token.rb#6 +class RuboCop::AST::Token + # @return [Token] a new instance of Token + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#17 + def initialize(pos, type, text); end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#32 + def begin_pos; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#28 + def column; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#101 + def comma?; end + + # Type Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#57 + def comment?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#105 + def dot?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#117 + def end?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#36 + def end_pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#121 + def equal_sign?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#65 + def left_array_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#81 + def left_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#73 + def left_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#85 + def left_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#93 + def left_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#69 + def left_ref_bracket?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#24 + def line; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#125 + def new_line?; end + + # Returns the value of attribute pos. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#109 + def regexp_dots?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#113 + def rescue_modifier?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#77 + def right_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#89 + def right_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#97 + def right_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#61 + def semicolon?; end + + # Checks if there is whitespace after token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#45 + def space_after?; end + + # Checks if there is whitespace before token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#50 + def space_before?; end + + # Returns the value of attribute text. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def text; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#40 + def to_s; end + + # Returns the value of attribute type. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def type; end + + class << self + # source://rubocop-ast//lib/rubocop/ast/token.rb#11 + def from_parser_token(parser_token); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/token.rb#7 +RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) + +# Provides methods for traversing an AST. +# Does not transform an AST; for that, use Parser::AST::Processor. +# Override methods to perform custom processing. Remember to call `super` +# if you want to recursively process descendant nodes. +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#9 +module RuboCop::AST::Traversal + extend ::RuboCop::AST::Traversal::CallbackCompiler + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#173 + def on_(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___ENCODING__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___FILE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___LINE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_alias(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_and(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_and_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_arg_expr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array_pattern_with_tail(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_back_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_begin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#151 + def on_block(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_block_pass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_blockarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_break(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_case(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_case_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#146 + def on_casgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_cbase(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#147 + def on_class(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_complex(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 + def on_const(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_const_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + def on_csend(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_cvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_cvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 + def on_def(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_defined?(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#153 + def on_defs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_dstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_dsym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_eflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_empty_else(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_ensure(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_erange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_false(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_find_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_float(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_for(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forward_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forward_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_gvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_gvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_hash(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_hash_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#150 + def on_if(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_if_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_iflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_in_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_in_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_index(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_indexasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_int(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_irange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_ivar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_ivasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_kwarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_kwargs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_kwbegin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_kwnilarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + def on_kwoptarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + def on_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_kwsplat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_lambda(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_lvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_masgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_alt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_as(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_match_current_line(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_match_nil_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_match_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_match_pattern_p(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_match_rest(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_match_var(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_with_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_match_with_trailing_comma(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_mlhs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_module(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_mrasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_next(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_nil(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_not(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_nth_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#152 + def on_numblock(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#149 + def on_op_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + def on_optarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_or(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_or_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_pair(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_pin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_postexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_preexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_procarg0(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_rasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_rational(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_redo(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_regexp(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#135 + def on_regopt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_resbody(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_rescue(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + def on_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_retry(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_return(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_sclass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_self(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + def on_send(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_shadowarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_splat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_str(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_super(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_sym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_true(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_undef(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_unless_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_until(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_until_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_when(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_while(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_while_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_xstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_yield(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_zsuper(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#17 + def walk(node); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#25 +module RuboCop::AST::Traversal::CallbackCompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#61 + def arity_check(range); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#52 + def body(signature, prelude); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#35 + def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#26 +RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#29 +RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) + +# Only for debugging. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#12 +class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#100 +RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#15 +RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#8 +class RuboCop::AST::UntilNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `until` node as a string. + # Returns `while` for `until` nodes and vice versa. + # + # @return [String] the inverse keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `until` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#15 + def keyword; end +end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#5 +module RuboCop::AST::Version; end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#6 +RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) + +# A node extension for `when` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `when` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#8 +class RuboCop::AST::WhenNode < ::RuboCop::AST::Node + # Returns the body of the `when` node. + # + # @return [Node, nil] the body of the `when` node + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#42 + def body; end + + # Returns the index of the `when` branch within the `case` statement. + # + # @return [Integer] the index of the `when` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#28 + def branch_index; end + + # Returns an array of all the conditions in the `when` branch. + # + # @return [Array] an array of condition nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#12 + def conditions; end + + # @deprecated Use `conditions.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#17 + def each_condition(&block); end + + # Checks whether the `when` node has a `then` keyword. + # + # @return [Boolean] whether the `when` node has a `then` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#35 + def then?; end +end + +# A node extension for `while` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `while` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#8 +class RuboCop::AST::WhileNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `while` node as a string. + # Returns `until` for `while` nodes and vice versa. + # + # @return [String] the inverse keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `while` statement as a string. + # + # @return [String] the keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#15 + def keyword; end +end + +# A node extension for `yield` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `yield` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#8 +class RuboCop::AST::YieldNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `send` node + # + # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 + def node_parts; end +end + +class RuboCop::CommentConfig + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +class RuboCop::Config + # source://rubocop/1.66.1/lib/rubocop/config.rb#30 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#170 + def active_support_extensions_enabled?; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#96 + def add_excludes_from_higher_level(highest_config); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#197 + def allowed_camel_case_file?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#241 + def base_dir_for_path_parameters; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#271 + def bundler_lock_file_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#51 + def check; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#142 + def clusivity_config_for_badge?(badge); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#108 + def deprecation_check; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#162 + def disabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#166 + def enabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#219 + def file_to_exclude?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#178 + def file_to_include?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#158 + def for_all_cops; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#128 + def for_badge(badge); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#122 + def for_cop(cop); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#153 + def for_department(department_name); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#300 + def inspect; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#76 + def internal?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#47 + def loaded_features; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#20 + def loaded_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#81 + def make_excludes_absolute; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#232 + def path_relative_to_config(path); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#228 + def patterns_to_exclude; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#224 + def patterns_to_include; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#282 + def pending_cops; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#211 + def possibly_include_hidden?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#71 + def signature; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#266 + def smart_loaded_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#255 + def target_rails_version; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#67 + def to_s; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#58 + def validate_after_resolution; end + + private + + # source://rubocop/1.66.1/lib/rubocop/config.rb#350 + def department_of(qualified_cop_name); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#338 + def enable_cop?(qualified_cop_name, cop_options); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#312 + def read_rails_version_from_bundler_lock_file; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#307 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop/1.66.1/lib/rubocop/config.rb#22 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +class RuboCop::ConfigValidator + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#26 + def initialize(config); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#62 + def target_ruby_version; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#32 + def validate; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#58 + def validate_after_resolution; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#66 + def validate_section_presence(name); end + + private + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#103 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#253 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#76 + def check_obsoletions; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#83 + def check_target_ruby; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#194 + def each_invalid_parameter(cop_name); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#119 + def list_unknown_cops(invalid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#273 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#241 + def reject_conflicting_safe_settings; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#232 + def reject_mutually_exclusive_defaults; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#141 + def suggestion(name); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#74 + def target_ruby; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#206 + def validate_enforced_styles(valid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#168 + def validate_new_cops_parameter; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#179 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#226 + def validate_support_and_has_list(name, formats, valid); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#157 + def validate_syntax_cop; end +end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 +module RuboCop::SimpleForwardable + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 + def def_delegators(accessor, *methods); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi new file mode 100644 index 0000000..2ff0443 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-minitest` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-minitest`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi new file mode 100644 index 0000000..928bcec --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi @@ -0,0 +1,3283 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-performance` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-performance`. + + +# source://rubocop-performance//lib/rubocop/performance.rb#3 +module RuboCop; end + +# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 +module RuboCop::Cop; end + +module RuboCop::Cop::Lint; end + +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#66 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#85 + def check_argument(variable); end + + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#93 + def ignored_method?(body); end + + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#98 + def message(variable); end + + class << self + # source://rubocop-performance//lib/rubocop-performance.rb#15 + def autocorrect_incompatible_with; end + + # source://rubocop/1.66.1/lib/rubocop/cop/lint/unused_method_argument.rb#75 + def joining_forces; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#5 +module RuboCop::Cop::Performance; end + +# Identifies usages of `ancestors.include?` and change them to use `<=` instead. +# +# @example +# # bad +# A.ancestors.include?(B) +# +# # good +# A <= B +# +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#19 +class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#26 + def ancestors_include_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#30 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#43 + def range(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#23 +RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#24 +RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where slicing arrays with semi-infinite ranges +# can be replaced by `Array#take` and `Array#drop`. +# This cop was created due to a mistake in microbenchmark and hence is disabled by default. +# Refer https://github.com/rubocop/rubocop-performance/pull/175#issuecomment-731892717 +# +# @example +# # bad +# array[..2] +# array[...2] +# array[2..] +# array[2...] +# array.slice(..2) +# +# # good +# array.take(3) +# array.take(2) +# array.drop(2) +# array.drop(2) +# array.take(3) +# +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#29 +class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#45 + def endless_range?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#41 + def endless_range_slice?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#66 + def correction(receiver, range_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#36 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#39 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) + +# Identifies places where a float argument to BigDecimal should be converted to a string. +# Initializing from String is faster than from Float for BigDecimal. +# +# Also identifies places where an integer string argument to BigDecimal should be converted to +# an integer. Initializing from Integer is faster than from String for BigDecimal. +# +# @example +# # bad +# BigDecimal(1.2, 3, exception: true) +# 4.5.to_d(6, exception: true) +# +# # good +# BigDecimal('1.2', 3, exception: true) +# BigDecimal('4.5', 6, exception: true) +# +# # bad +# BigDecimal('1', 2) +# BigDecimal('4', 6) +# +# # good +# BigDecimal(1, 2) +# 4.to_d(6) +# +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 +class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#39 + def big_decimal_with_numeric_argument(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#48 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#43 + def to_d(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#35 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_FLOAT_TO_STRING = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#36 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_INTEGER_TO_STRING = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `UnboundMethod#bind_call` has been added. +# +# This cop identifies places where `bind(obj).call(args, ...)` +# can be replaced by `bind_call(obj, args, ...)`. +# +# The `bind_call(obj, args, ...)` method is faster than +# `bind(obj).call(args, ...)`. +# +# @example +# # bad +# umethod.bind(obj).call(foo, bar) +# umethod.bind(obj).(foo, bar) +# +# # good +# umethod.bind_call(obj, foo, bar) +# +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#22 +class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#32 + def bind_with_call_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#40 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#71 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#64 + def correction_range(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#58 + def message(bind_arg, call_args); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#29 +RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#30 +RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies unnecessary use of a `block_given?` where explicit check +# of block argument would suffice. +# +# NOTE: This cop produces code with significantly worse performance when a +# block is being passed to the method and as such should not be enabled. +# +# @example +# # bad +# def method(&block) +# do_something if block_given? +# end +# +# # good +# def method(&block) +# do_something if block +# end +# +# # good - block is reassigned +# def method(&block) +# block ||= -> { do_something } +# warn "Using default ..." unless block_given? +# # ... +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#38 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#36 + def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#54 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#34 +RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 +RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. +# +# @example +# # bad +# caller[1] +# caller.first +# caller_locations[1] +# caller_locations.first +# +# # good +# caller(2..2).first +# caller(1..1).first +# caller_locations(2..2).first +# caller_locations(1..1).first +# +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#20 +class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#33 + def caller_with_scope_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#40 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#26 + def slow_caller?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#61 + def int_value(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#23 +RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#24 +RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Reordering `when` conditions with a splat to the end +# of the `when` branches can improve performance. +# +# Ruby has to allocate memory for the splat expansion every time +# that the `case` `when` statement is run. Since Ruby does not support +# fall through inside of `case` `when`, like some other languages do, +# the order of the `when` branches should not matter. By placing any +# splat expansions at the end of the list of `when` branches we will +# reduce the number of times that memory has to be allocated for +# the expansion. The exception to this is if multiple of your `when` +# conditions can be true for any given condition. A likely scenario for +# this defining a higher level when condition to override a condition +# that is inside of the splat expansion. +# +# @example +# # bad +# case foo +# when *condition +# bar +# when baz +# foobar +# end +# +# case foo +# when *[1, 2, 3, 4] +# bar +# when 5 +# baz +# end +# +# # good +# case foo +# when baz +# foobar +# when *condition +# bar +# end +# +# case foo +# when 1, 2, 3, 4 +# bar +# when 5 +# baz +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#58 +class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#66 + def on_case(case_node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#83 + def autocorrect(corrector, when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#140 + def indent_for(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#100 + def inline_fix_branch(corrector, when_node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#164 + def needs_reorder?(when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#136 + def new_branch_without_then(node, new_condition); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#132 + def new_condition_with_then(node, new_condition); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#158 + def non_splat?(condition); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#91 + def range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#107 + def reorder_condition(corrector, when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#116 + def reordering_correction(when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#95 + def replacement(conditions); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#144 + def splat_offenses(when_conditions); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#126 + def when_branch_range(when_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#64 +RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#63 +RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where a case-insensitive string comparison +# can better be implemented using `casecmp`. +# +# This cop is disabled by default because `String#casecmp` only works with +# ASCII characters. See https://github.com/rubocop/rubocop/issues/9753. +# +# If you are working only with ASCII characters, then this cop can be +# safely enabled. +# +# @example +# # bad +# str.downcase == 'abc' +# str.upcase.eql? 'ABC' +# 'abc' == str.downcase +# 'ABC'.eql? str.upcase +# str.downcase == str.downcase +# +# # good +# str.casecmp('ABC').zero? +# 'abc'.casecmp(str).zero? +# +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#30 +class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#51 + def downcase_downcase(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#37 + def downcase_eq(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#44 + def eq_downcase(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#58 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#90 + def autocorrect(corrector, node, replacement); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#94 + def build_good_method(method, arg, variable); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#73 + def take_method_apart(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#35 +RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#33 +RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#34 +RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `array.compact.flatten.map { |x| x.downcase }`. +# Each of these methods (`compact`, `flatten`, `map`) will generate a new intermediate array +# that is promptly thrown away. Instead it is faster to mutate when we know it's safe. +# +# @example +# # bad +# array = ["a", "b", "c"] +# array.compact.flatten.map { |x| x.downcase } +# +# # good +# array = ["a", "b", "c"] +# array.compact! +# array.flatten! +# array.map! { |x| x.downcase } +# array +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 +class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#52 + def chain_array_allocation?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#60 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#73 + def enumerable_select_method?(node); end +end + +# These methods ALWAYS return a new array +# after they're called it's safe to mutate the resulting array +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#35 +RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) + +# These methods have a mutation alternative. For example :collect +# can be called as :collect! +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#43 +RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 +RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#46 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) + +# These methods return a new array only when called without a block. +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#31 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set) + +# These methods return a new array but only sometimes. They must be +# called with an argument. For example: +# +# [1,2].first # => 1 +# [1,2].first(1) # => [1] +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#28 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set) + +# Identifies places where Array and Hash literals are used within loops. +# It is better to extract them into a local variable or constant +# to avoid unnecessary allocations on each iteration. +# +# You can set the minimum number of elements to consider +# an offense with `MinSize`. +# +# @example +# # bad +# users.select do |user| +# %i[superadmin admin].include?(user.role) +# end +# +# # good +# admin_roles = %i[superadmin admin] +# users.select do |user| +# admin_roles.include?(user.role) +# end +# +# # good +# ADMIN_ROLES = %i[superadmin admin] +# ... +# users.select do |user| +# ADMIN_ROLES.include?(user.role) +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#34 +class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#74 + def enumerable_loop?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#68 + def kernel_loop?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#80 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#90 + def check_literal?(node, method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#128 + def enumerable_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#110 + def keyword_loop?(type); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#120 + def literal_class(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#106 + def loop?(ancestor, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#132 + def min_size; end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#114 + def node_within_enumerable_loop?(node, ancestor); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#97 + def nonmutable_method_of_array_or_hash?(node, method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#102 + def parent_is_loop?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#56 +RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#41 +RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#66 +RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#39 +RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#35 +RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#42 +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#58 +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#38 +RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort { |a, b| a.foo <=> b.foo }` +# can be replaced by `sort_by(&:foo)`. +# This cop also checks `sort!`, `min`, `max` and `minmax` methods. +# +# @example +# # bad +# array.sort { |a, b| a.foo <=> b.foo } +# array.sort! { |a, b| a.foo <=> b.foo } +# array.max { |a, b| a.foo <=> b.foo } +# array.min { |a, b| a.foo <=> b.foo } +# array.minmax { |a, b| a.foo <=> b.foo } +# array.sort { |a, b| a[:foo] <=> b[:foo] } +# +# # good +# array.sort_by(&:foo) +# array.sort_by!(&:foo) +# array.sort_by { |v| v.foo } +# array.sort_by do |var| +# var.foo +# end +# array.max_by(&:foo) +# array.min_by(&:foo) +# array.minmax_by(&:foo) +# array.sort_by { |a| a[:foo] } +# +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#30 +class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#41 + def compare?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#55 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#48 + def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#114 + def compare_range(send, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#91 + def message(send, method, var_a, var_b, args); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#76 + def slow_compare?(method, args_a, args_b); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#34 +RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#38 +RuboCop::Cop::Performance::CompareWithBlock::REPLACEMENT = T.let(T.unsafe(nil), Hash) + +# Identifies places where `Concurrent.monotonic_time` +# can be replaced by `Process.clock_gettime(Process::CLOCK_MONOTONIC)`. +# +# @example +# +# # bad +# Concurrent.monotonic_time +# +# # good +# Process.clock_gettime(Process::CLOCK_MONOTONIC) +# +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#17 +class RuboCop::Cop::Performance::ConcurrentMonotonicTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#23 + def concurrent_monotonic_time?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#28 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#20 +RuboCop::Cop::Performance::ConcurrentMonotonicTime::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#21 +RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Finds regular expressions with dynamic components that are all constants. +# +# Ruby allocates a new Regexp object every time it executes a code containing such +# a regular expression. It is more efficient to extract it into a constant, +# memoize it, or add an `/o` option to perform `#{}` interpolation only once and +# reuse that Regexp object. +# +# @example +# +# # bad +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } +# end +# +# # good +# ALL_SEPARATORS = /\A#{SEPARATORS}\Z/ +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(ALL_SEPARATORS) } +# end +# +# # good +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } +# end +# +# # good +# def separators +# @separators ||= /\A#{SEPARATORS}\Z/ +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#36 +class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#45 + def on_regexp(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#59 + def regexp_escape?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#64 + def include_interpolated_const?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#55 + def within_allowed_assignment?(node); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#39 +RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `count` on an `Enumerable` that +# follow calls to `select`, `find_all`, `filter` or `reject`. Querying logic can instead be +# passed to the `count` call. +# +# @example +# # bad +# [1, 2, 3].select { |e| e > 2 }.size +# [1, 2, 3].reject { |e| e > 2 }.size +# [1, 2, 3].select { |e| e > 2 }.length +# [1, 2, 3].reject { |e| e > 2 }.length +# [1, 2, 3].select { |e| e > 2 }.count { |e| e.odd? } +# [1, 2, 3].reject { |e| e > 2 }.count { |e| e.even? } +# array.select(&:value).count +# +# # good +# [1, 2, 3].count { |e| e > 2 } +# [1, 2, 3].count { |e| e < 2 } +# [1, 2, 3].count { |e| e > 2 && e.odd? } +# [1, 2, 3].count { |e| e < 2 && e.even? } +# Model.select('field AS field_one').count +# Model.select(:value).count +# +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#48 +class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#55 + def count_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#79 + def autocorrect(corrector, node, selector_node, selector); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#89 + def eligible_node?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#132 + def negate_block_pass_as_inline_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#111 + def negate_block_pass_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#118 + def negate_block_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#128 + def negate_expression(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#103 + def negate_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#93 + def source_starting_at(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#52 +RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 +RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.5, `String#delete_prefix` has been added. +# +# This cop identifies places where `gsub(/\Aprefix/, '')` and `sub(/\Aprefix/, '')` +# can be replaced by `delete_prefix('prefix')`. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `^prefix` is unsafe as it will behave incompatible with `delete_prefix` +# for receiver is multiline string. +# +# The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. +# +# @example +# +# # bad +# str.gsub(/\Aprefix/, '') +# str.gsub!(/\Aprefix/, '') +# +# str.sub(/\Aprefix/, '') +# str.sub!(/\Aprefix/, '') +# +# # good +# str.delete_prefix('prefix') +# str.delete_prefix!('prefix') +# @example SafeMultiline: true (default) +# +# # good +# str.gsub(/^prefix/, '') +# str.gsub!(/^prefix/, '') +# str.sub(/^prefix/, '') +# str.sub!(/^prefix/, '') +# @example SafeMultiline: false +# +# # bad +# str.gsub(/^prefix/, '') +# str.gsub!(/^prefix/, '') +# str.sub(/^prefix/, '') +# str.sub!(/^prefix/, '') +# +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#49 +class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#66 + def delete_prefix_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#56 +RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#59 +RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#57 +RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.5, `String#delete_suffix` has been added. +# +# This cop identifies places where `gsub(/suffix\z/, '')` and `sub(/suffix\z/, '')` +# can be replaced by `delete_suffix('suffix')`. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `suffix$` is unsafe as it will behave incompatible with `delete_suffix?` +# for receiver is multiline string. +# +# The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. +# +# @example +# +# # bad +# str.gsub(/suffix\z/, '') +# str.gsub!(/suffix\z/, '') +# +# str.sub(/suffix\z/, '') +# str.sub!(/suffix\z/, '') +# +# # good +# str.delete_suffix('suffix') +# str.delete_suffix!('suffix') +# @example SafeMultiline: true (default) +# +# # good +# str.gsub(/suffix$/, '') +# str.gsub!(/suffix$/, '') +# str.sub(/suffix$/, '') +# str.sub!(/suffix$/, '') +# @example SafeMultiline: false +# +# # bad +# str.gsub(/suffix$/, '') +# str.gsub!(/suffix$/, '') +# str.sub(/suffix$/, '') +# str.sub!(/suffix$/, '') +# +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#49 +class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#66 + def delete_suffix_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#56 +RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#59 +RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#57 +RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `first`, `last`, `[0]` or `[-1]` +# chained to `select`, `find_all` or `filter` and change them to use +# `detect` instead. +# +# @example +# # bad +# [].select { |item| true }.first +# [].select { |item| true }.last +# [].find_all { |item| true }.first +# [].find_all { |item| true }.last +# [].filter { |item| true }.first +# [].filter { |item| true }.last +# [].filter { |item| true }[0] +# [].filter { |item| true }[-1] +# +# # good +# [].detect { |item| true } +# [].reverse.detect { |item| true } +# +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#30 +class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#41 + def detect_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#70 + def accept_first_call?(receiver, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#102 + def autocorrect(corrector, node, replacement); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#128 + def lazy?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#113 + def message_for_method(method, index); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#124 + def preferred_method; end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#79 + def register_offense(node, receiver, second_method, index); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#94 + def replacement(method, index); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#33 +RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#37 +RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#38 +RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#35 +RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#39 +RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#36 +RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) + +# Checks for double `#start_with?` or `#end_with?` calls +# separated by `||`. In some cases such calls can be replaced +# with an single `#start_with?`/`#end_with?` call. +# +# `IncludeActiveSupportAliases` configuration option is used to check for +# `starts_with?` and `ends_with?`. These methods are defined by Active Support. +# +# @example +# # bad +# str.start_with?("a") || str.start_with?(Some::CONST) +# str.start_with?("a", "b") || str.start_with?("c") +# str.end_with?(var1) || str.end_with?(var2) +# +# # good +# str.start_with?("a", Some::CONST) +# str.start_with?("a", "b", "c") +# str.end_with?(var1, var2) +# @example IncludeActiveSupportAliases: false (default) +# # good +# str.starts_with?("a", "b") || str.starts_with?("c") +# str.ends_with?(var1) || str.ends_with?(var2) +# +# str.starts_with?("a", "b", "c") +# str.ends_with?(var1, var2) +# @example IncludeActiveSupportAliases: true +# # bad +# str.starts_with?("a", "b") || str.starts_with?("c") +# str.ends_with?(var1) || str.ends_with?(var2) +# +# # good +# str.starts_with?("a", "b", "c") +# str.ends_with?(var1, var2) +# +# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#41 +class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#96 + def check_with_active_support_aliases(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#46 + def on_or(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#90 + def two_start_end_with_calls(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#60 + def autocorrect(corrector, first_call_args, second_call_args, combined_args); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#86 + def check_for_active_support_aliases?; end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#82 + def combine_args(first_call_args, second_call_args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 + def message(node, receiver, first_call_args, method, combined_args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 + def process_source(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#44 +RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) + +# Identifies unnecessary use of a regex where `String#end_with?` would suffice. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `end$` is unsafe as it will behave incompatible with `end_with?` +# for receiver is multiline string. +# +# @example +# # bad +# 'abc'.match?(/bc\Z/) +# /bc\Z/.match?('abc') +# 'abc' =~ /bc\Z/ +# /bc\Z/ =~ 'abc' +# 'abc'.match(/bc\Z/) +# /bc\Z/.match('abc') +# +# # good +# 'abc'.end_with?('bc') +# @example SafeMultiline: true (default) +# +# # good +# 'abc'.match?(/bc$/) +# /bc$/.match?('abc') +# 'abc' =~ /bc$/ +# /bc$/ =~ 'abc' +# 'abc'.match(/bc$/) +# /bc$/.match('abc') +# @example SafeMultiline: false +# +# # bad +# 'abc'.match?(/bc$/) +# /bc$/.match?('abc') +# 'abc' =~ /bc$/ +# /bc$/ =~ 'abc' +# 'abc'.match(/bc$/) +# /bc$/.match('abc') +# +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#49 +class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#56 + def redundant_regex?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#53 +RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#54 +RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Do not compute the size of statically sized objects. +# +# @example +# # String methods +# # bad +# 'foo'.size +# %q[bar].count +# %(qux).length +# +# # Symbol methods +# # bad +# :fred.size +# :'baz'.length +# +# # Array methods +# # bad +# [1, 2, thud].count +# %W(1, 2, bar).size +# +# # Hash methods +# # bad +# { a: corge, b: grault }.length +# +# # good +# foo.size +# bar.count +# qux.length +# +# # good +# :"#{fred}".size +# CONST = :baz.length +# +# # good +# [1, 2, *thud].count +# garply = [1, 2, 3] +# garply.size +# +# # good +# { a: corge, **grault }.length +# waldo = { a: corge, b: grault } +# waldo.size +# +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#48 +class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#52 + def counter(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#73 + def allowed_argument?(arg); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#77 + def allowed_parent?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#69 + def allowed_variable?(var); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#87 + def contains_double_splat?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#81 + def contains_splat?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#93 + def non_string_argument?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#49 +RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#50 +RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `map { ... }.flatten` and +# change them to use `flat_map { ... }` instead. +# +# @example +# # bad +# [1, 2, 3, 4].map { |e| [e, e] }.flatten(1) +# [1, 2, 3, 4].collect { |e| [e, e] }.flatten(1) +# +# # good +# [1, 2, 3, 4].flat_map { |e| [e, e] } +# [1, 2, 3, 4].map { |e| [e, e] }.flatten +# [1, 2, 3, 4].collect { |e| [e, e] }.flatten +# +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#18 +class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#28 + def flat_map_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#73 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#53 + def offense_for_levels(node, map_node, first_method, flatten); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#59 + def offense_for_method(node, map_node, first_method, flatten); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#63 + def register_offense(node, map_node, first_method, flatten, message); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#24 +RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#22 +RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#23 +RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for inefficient searching of keys and values within +# hashes. +# +# `Hash#keys.include?` is less efficient than `Hash#key?` because +# the former allocates a new array and then performs an O(n) search +# through that array, while `Hash#key?` does not allocate any array and +# performs a faster O(1) search for the key. +# +# `Hash#values.include?` is less efficient than `Hash#value?`. While they +# both perform an O(n) search through all of the values, calling `values` +# allocates a new array while using `value?` does not. +# +# @example +# # bad +# { a: 1, b: 2 }.keys.include?(:a) +# { a: 1, b: 2 }.keys.include?(:z) +# h = { a: 1, b: 2 }; h.keys.include?(100) +# +# # good +# { a: 1, b: 2 }.key?(:a) +# { a: 1, b: 2 }.has_key?(:z) +# h = { a: 1, b: 2 }; h.key?(100) +# +# # bad +# { a: 1, b: 2 }.values.include?(2) +# { a: 1, b: 2 }.values.include?('garbage') +# h = { a: 1, b: 2 }; h.values.include?(nil) +# +# # good +# { a: 1, b: 2 }.value?(2) +# { a: 1, b: 2 }.has_value?('garbage') +# h = { a: 1, b: 2 }; h.value?(nil) +# +# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#42 +class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#47 + def inefficient_include?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#91 + def correct_argument(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#99 + def correct_dot(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#95 + def correct_hash_expression(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#75 + def correct_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#82 + def current_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#67 + def message(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#71 + def replacement(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#86 + def use_long_method; end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#45 +RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where inefficient `readlines` method +# can be replaced by `each_line` to avoid fully loading file content into memory. +# +# @example +# +# # bad +# File.readlines('testfile').each { |l| puts l } +# IO.readlines('testfile', chomp: true).each { |l| puts l } +# +# conn.readlines(10).map { |l| l.size } +# file.readlines.find { |l| l.start_with?('#') } +# file.readlines.each { |l| puts l } +# +# # good +# File.open('testfile', 'r').each_line { |l| puts l } +# IO.open('testfile').each_line(chomp: true) { |l| puts l } +# +# conn.each_line(10).map { |l| l.size } +# file.each_line.find { |l| l.start_with?('#') } +# file.each_line { |l| puts l } +# +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#27 +class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#42 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#34 + def readlines_on_class?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#38 + def readlines_on_instance?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#58 + def autocorrect(corrector, enumerable_call, readlines_call, receiver); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#90 + def build_bad_method(enumerable_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#106 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#82 + def build_good_method(enumerable_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#94 + def correction_range(enumerable_call, readlines_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#76 + def offense_range(enumerable_call, readlines_call); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#31 +RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#32 +RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `Enumerable#filter_map` has been added. +# +# This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`. +# +# [source,ruby] +# ---- +# [true, false, nil].compact #=> [true, false] +# [true, false, nil].filter_map(&:itself) #=> [true] +# ---- +# +# @example +# # bad +# ary.map(&:foo).compact +# ary.collect(&:foo).compact +# +# # good +# ary.filter_map(&:foo) +# ary.map(&:foo).compact! +# ary.compact.map(&:foo) +# +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#31 +class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#41 + def map_compact(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#95 + def compact_method_with_final_newline_range(compact_method_range); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#91 + def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#87 + def map_method_and_compact_method_on_same_line?(map_node, compact_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#69 + def remove_compact_method(corrector, map_node, compact_node, chained_method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#83 + def use_dot?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 +RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#37 +RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if the map method is used in a chain. +# +# Autocorrection is not supported because an appropriate block variable name cannot be determined automatically. +# +# [source,ruby] +# ---- +# class X +# def initialize +# @@num = 0 +# end +# +# def foo +# @@num += 1 +# self +# end +# +# def bar +# @@num * 2 +# end +# end +# +# [X.new, X.new].map(&:foo).map(&:bar) # => [4, 4] +# [X.new, X.new].map { |x| x.foo.bar } # => [2, 4] +# ---- +# +# @example +# +# # bad +# array.map(&:foo).map(&:bar) +# +# # good +# array.map { |item| item.foo.bar } +# +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#43 +class RuboCop::Cop::Performance::MapMethodChain < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#49 + def block_pass_with_symbol_arg?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#53 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#72 + def find_begin_of_chained_map_method(node, map_args); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#46 +RuboCop::Cop::Performance::MapMethodChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#47 +RuboCop::Cop::Performance::MapMethodChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where methods are converted to blocks, with the +# use of `&method`, and passed as arguments to method calls. +# It is faster to replace those with explicit blocks, calling those methods inside. +# +# @example +# # bad +# array.map(&method(:do_something)) +# [1, 2, 3].each(&out.method(:puts)) +# +# # good +# array.map { |x| do_something(x) } +# [1, 2, 3].each { |x| out.puts(x) } +# +# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#19 +class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#22 + def method_object_as_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#26 + def on_block_pass(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#20 +RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for `OpenStruct.new` calls. +# Instantiation of an `OpenStruct` invalidates +# Ruby global method cache as it causes dynamic method +# definition during program runtime. +# This could have an effect on performance, +# especially in case of single-threaded +# applications with multiple `OpenStruct` instantiations. +# +# @example +# # bad +# class MyClass +# def my_method +# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') +# end +# end +# +# # good +# class MyClass +# MyStruct = Struct.new(:my_key1, :my_key2) +# def my_method +# MyStruct.new('my_value1', 'my_value2') +# end +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#34 +class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#42 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#38 + def open_struct(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#35 +RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#36 +RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies uses of `Range#include?` and `Range#member?`, which iterates over each +# item in a `Range` to see if a specified item is there. In contrast, +# `Range#cover?` simply compares the target item with the beginning and +# end points of the `Range`. In a great majority of cases, this is what +# is wanted. +# +# @example +# # bad +# ('a'..'z').include?('b') # => true +# ('a'..'z').member?('b') # => true +# +# # good +# ('a'..'z').cover?('b') # => true +# +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#29 +class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#40 + def range_include(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 +RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#33 +RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies the use of a `&block` parameter and `block.call` +# where `yield` would do just as well. +# +# @example +# # bad +# def method(&block) +# block.call +# end +# def another(&func) +# func.call 1, 2, 3 +# end +# +# # good +# def method +# yield +# end +# def another +# yield 1, 2, 3 +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#25 +class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#43 + def blockarg_assigned?(param0, param1); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#39 + def blockarg_calls(param0, param1); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#34 + def blockarg_def(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + def on_def(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#99 + def args_include_block_pass?(blockcall); end + + # offenses are registered on the `block.call` nodes + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#65 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#83 + def calls_to_report(argname, body); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#93 + def shadowed_block_argument?(body, block_argument_of_method_signature); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#31 +RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#28 +RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#30 +RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#32 +RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#29 +RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) + +# Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`, +# and `Enumerable#none?` are compared with `===` or similar methods in block. +# +# By default, `Object#===` behaves the same as `Object#==`, but this +# behavior is appropriately overridden in subclass. For example, +# `Range#===` returns `true` when argument is within the range. +# +# This cop has `AllowRegexpMatch` option and it is true by default because +# `regexp.match?('string')` often used in block changes to the opposite result: +# +# [source,ruby] +# ---- +# [/pattern/].all? { |regexp| regexp.match?('pattern') } # => true +# [/pattern/].all? { |regexp| regexp =~ 'pattern' } # => true +# [/pattern/].all?('pattern') # => false +# ---- +# +# @example +# # bad +# items.all? { |item| pattern === item } +# items.all? { |item| item == other } +# items.all? { |item| item.is_a?(Klass) } +# items.all? { |item| item.kind_of?(Klass) } +# +# # good +# items.all?(pattern) +# items.all?(Klass) +# @example AllowRegexpMatch: true (default) +# +# # good +# items.all? { |item| item =~ pattern } +# items.all? { |item| item.match?(pattern) } +# @example AllowRegexpMatch: false +# +# # bad +# items.all? { |item| item =~ pattern } +# items.all? { |item| item.match?(pattern) } +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#49 +class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#62 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#131 + def allow_regexp_match?; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#104 + def new_argument(block_argument, block_body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#127 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#82 + def one_block_argument?(block_arguments); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#94 + def same_block_argument_and_is_a_argument?(block_body, block_argument); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#118 + def use_block_argument_in_method_argument_of_operand?(block_argument, operand); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#86 + def use_equality_comparison_block?(block_body); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#58 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#60 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#55 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#59 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::REGEXP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#57 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array) + +# Identifies the use of `Regexp#match` or `String#match`, which +# returns `#`/`nil`. The return value of `=~` is an integral +# index/`nil` and is more performant. +# +# @example +# # bad +# do_something if str.match(/regex/) +# while regex.match('str') +# do_something +# end +# +# # good +# method(str =~ /regex/) +# return value unless regex =~ 'str' +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#20 +class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#30 + def match_call?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#39 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#35 + def only_truthiness_matters?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#51 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#57 + def autocorrectable?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#86 + def call_like?(arg); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#63 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#73 + def requires_parentheses?(arg); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#80 + def requires_parentheses_for_call_like?(arg); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#26 +RuboCop::Cop::Performance::RedundantMatch::HIGHER_PRECEDENCE_OPERATOR_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 +RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#24 +RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `Hash#merge!` can be replaced by `Hash#[]=`. +# You can set the maximum number of key-value pairs to consider +# an offense with `MaxKeyValuePairs`. +# +# @example +# # bad +# hash.merge!(a: 1) +# hash.merge!({'key' => 'value'}) +# +# # good +# hash[:a] = 1 +# hash['key'] = 'value' +# @example MaxKeyValuePairs: 2 (default) +# # bad +# hash.merge!(a: 1, b: 2) +# +# # good +# hash[:a] = 1 +# hash[:b] = 2 +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#30 +class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#48 + def modifier_flow_control?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#52 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#44 + def redundant_merge_candidate(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#106 + def correct_multiple_elements(corrector, node, parent, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#118 + def correct_single_element(corrector, node, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#79 + def each_redundant_merge(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#98 + def kwsplat_used?(pairs); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#144 + def leading_spaces(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#148 + def max_key_value_pairs; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#71 + def message(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#87 + def non_redundant_merge?(node, receiver, pairs); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#94 + def non_redundant_pairs?(receiver, pairs); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#102 + def non_redundant_value_used?(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#132 + def rewrite_with_modifier(node, parent, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#122 + def to_assignments(receiver, pairs); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#34 +RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String) + +# A utility class for checking the use of values within an +# `each_with_object` call. +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 +class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#157 + def initialize(node, receiver); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#188 + def each_with_object_node(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#162 + def value_used?; end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + def eligible_receiver?; end + + # Returns the value of attribute node. + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 + def node; end + + # Returns the value of attribute receiver. + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 + def receiver; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 + def second_argument; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#183 + def unwind(receiver); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#35 +RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#36 +RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#38 +RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) + +# Identifies places where `sort { |a, b| a <=> b }` can be replaced with `sort`. +# +# @example +# # bad +# array.sort { |a, b| a <=> b } +# +# # good +# array.sort +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#15 +class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#21 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#29 + def on_numblock(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#40 + def register_offense(send, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#19 +RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `split` argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'a,b,c'.split(/,/) +# +# # good +# 'a,b,c'.split(',') +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#15 +class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#23 + def split_call_with_regexp?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#42 + def determinist_regexp?(regexp_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#46 + def replacement(regexp_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#20 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#18 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#19 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#21 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for redundant `String#chars`. +# +# @example +# # bad +# str.chars[0..2] +# str.chars.slice(0..2) +# str.chars.last +# +# # good +# str[0..2].chars +# +# # bad +# str.chars.first +# str.chars.first(2) +# +# # good +# str[0] +# str[0...2].chars +# str[-1] +# +# # bad +# str.chars.take(2) +# str.chars.length +# str.chars.size +# str.chars.empty? +# +# # good +# str[0...2].chars +# str.length +# str.size +# str.empty? +# +# # For example, if the receiver is an empty string, it will be incompatible. +# # If a negative value is specified for the receiver, `nil` is returned. +# str.chars.last(2) # Incompatible with `str[-2..-1].chars`. +# str.chars.drop(2) # Incompatible with `str[2..-1].chars`. +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#43 +class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#54 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#50 + def redundant_chars_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#112 + def build_bad_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#125 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#85 + def build_good_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#100 + def build_good_method_for_brackets_or_first_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#79 + def build_message(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#75 + def correction_range(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#71 + def offense_range(receiver, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#47 +RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#48 +RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.4, `String#match?`, `Regexp#match?`, and `Symbol#match?` +# have been added. The methods are faster than `match`. +# Because the methods avoid creating a `MatchData` object or saving +# backref. +# So, when `MatchData` is not used, use `match?` instead of `match`. +# +# @example +# # bad +# def foo +# if x =~ /re/ +# do_something +# end +# end +# +# # bad +# def foo +# if x !~ /re/ +# do_something +# end +# end +# +# # bad +# def foo +# if x.match(/re/) +# do_something +# end +# end +# +# # bad +# def foo +# if /re/ === x +# do_something +# end +# end +# +# # good +# def foo +# if x.match?(/re/) +# do_something +# end +# end +# +# # good +# def foo +# if !x.match?(/re/) +# do_something +# end +# end +# +# # good +# def foo +# if x =~ /re/ +# do_something(Regexp.last_match) +# end +# end +# +# # good +# def foo +# if x.match(/re/) +# do_something($~) +# end +# end +# +# # good +# def foo +# if /re/ === x +# do_something($~) +# end +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#75 +class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#125 + def last_matches(param0); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#86 + def match_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#122 + def match_node?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#97 + def match_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#101 + def match_threequals?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#93 + def match_with_int_arg_method?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#105 + def match_with_lvasgn?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#142 + def on_case(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#138 + def on_if(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#123 + def search_match_nodes(param0); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#165 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#154 + def check_condition(cond); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#250 + def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#221 + def find_last_match(body, range, scope_root); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#181 + def last_match_used?(match_node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#246 + def match_gvar?(sym); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#177 + def message(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#217 + def modifier_form?(match_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#203 + def next_match_pos(body, match_node_pos, scope_root); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#190 + def range_to_search_for_last_matches(match_node, body, scope_root); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#259 + def replace_with_match_predicate_method(corrector, recv, arg, op_range); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#228 + def scope_body(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#240 + def scope_root(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#270 + def swap_receiver_and_arg(corrector, recv, arg); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#134 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#112 +RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#84 +RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# Constants are included in this list because it is unlikely that +# someone will store `nil` as a constant and then use it for comparison +# +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#83 +RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) + +# Identifies usages of `reverse.each` and change them to use `reverse_each` instead. +# +# If the return value is used, it will not be detected because the result will be different. +# +# [source,ruby] +# ---- +# [1, 2, 3].reverse.each {} #=> [3, 2, 1] +# [1, 2, 3].reverse_each {} #=> [1, 2, 3] +# ---- +# +# @example +# # bad +# items.reverse.each +# +# # good +# items.reverse_each +# +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#22 +class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#29 + def reverse_each?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#54 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#48 + def use_return_value?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#26 +RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#27 +RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `reverse.first(n)` and `reverse.first` +# can be replaced by `last(n).reverse` and `last`. +# +# @example +# +# # bad +# array.reverse.first(5) +# array.reverse.first +# +# # good +# array.last(5).reverse +# array.last +# +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#19 +class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#26 + def reverse_first_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#56 + def build_good_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#50 + def build_message(node, range); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#46 + def correction_range(receiver, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#23 +RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#24 +RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `Enumerable#filter_map` has been added. +# +# This cop identifies places where `select.map` can be replaced by `filter_map`. +# +# @example +# # bad +# ary.select(&:foo).map(&:bar) +# ary.filter(&:foo).map(&:bar) +# +# # good +# ary.filter_map { |o| o.bar if o.foo } +# +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#18 +class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#41 + def map_method_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#51 + def offense_range(node, map_method); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#24 +RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#25 +RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `count` on an `Array` and `Hash` and change them to `size`. +# +# TODO: Add advanced detection of variables that could +# have been assigned to an array or a hash. +# +# @example +# # bad +# [1, 2, 3].count +# (1..3).to_a.count +# Array[*1..3].count +# Array(1..3).count +# +# # bad +# {a: 1, b: 2, c: 3}.count +# [[:foo, :bar], [1, 2]].to_h.count +# Hash[*('a'..'z')].count +# Hash(key: :value).count +# +# # good +# [1, 2, 3].size +# (1..3).to_a.size +# Array[*1..3].size +# Array(1..3).size +# +# # good +# {a: 1, b: 2, c: 3}.size +# [[:foo, :bar], [1, 2]].to_h.size +# Hash[*('a'..'z')].size +# Hash(key: :value).size +# +# # good +# [1, 2, 3].count { |e| e > 2 } +# +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#37 +class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#43 + def array?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#61 + def count?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#52 + def hash?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#40 +RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#41 +RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort { |a, b| b <=> a }` +# can be replaced by a faster `sort.reverse`. +# +# @example +# # bad +# array.sort { |a, b| b <=> a } +# +# # good +# array.sort.reverse +# +# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#16 +class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#22 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#30 + def on_numblock(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#42 + def register_offense(send, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#20 +RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `gsub(/a+/, 'a')` and `gsub!(/a+/, 'a')` +# can be replaced by `squeeze('a')` and `squeeze!('a')`. +# +# The `squeeze('a')` method is faster than `gsub(/a+/, 'a')`. +# +# @example +# +# # bad +# str.gsub(/a+/, 'a') +# str.gsub!(/a+/, 'a') +# +# # good +# str.squeeze('a') +# str.squeeze!('a') +# +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#21 +class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#29 + def squeeze_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#61 + def repeating_literal?(regex_str); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#24 +RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#27 +RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#25 +RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies unnecessary use of a regex where `String#start_with?` would suffice. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `^start` is unsafe as it will behave incompatible with `start_with?` +# for receiver is multiline string. +# +# @example +# # bad +# 'abc'.match?(/\Aab/) +# /\Aab/.match?('abc') +# 'abc' =~ /\Aab/ +# /\Aab/ =~ 'abc' +# 'abc'.match(/\Aab/) +# /\Aab/.match('abc') +# +# # good +# 'abc'.start_with?('ab') +# @example SafeMultiline: true (default) +# +# # good +# 'abc'.match?(/^ab/) +# /^ab/.match?('abc') +# 'abc' =~ /^ab/ +# /^ab/ =~ 'abc' +# 'abc'.match(/^ab/) +# /^ab/.match('abc') +# @example SafeMultiline: false +# +# # bad +# 'abc'.match?(/^ab/) +# /^ab/.match?('abc') +# 'abc' =~ /^ab/ +# /^ab/ =~ 'abc' +# 'abc'.match(/^ab/) +# /^ab/.match('abc') +# +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#49 +class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#56 + def redundant_regex?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#53 +RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#54 +RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where string identifier argument can be replaced +# by symbol identifier argument. +# It prevents the redundancy of the internal string-to-symbol conversion. +# +# This cop targets methods that take identifier (e.g. method name) argument +# and the following examples are parts of it. +# +# @example +# +# # bad +# send('do_something') +# attr_accessor 'do_something' +# instance_variable_get('@ivar') +# respond_to?("string_#{interpolation}") +# +# # good +# send(:do_something) +# attr_accessor :do_something +# instance_variable_get(:@ivar) +# respond_to?(:"string_#{interpolation}") +# +# # good - these methods don't support namespaced symbols +# const_get("#{module_path}::Base") +# const_source_location("#{module_path}::Base") +# const_defined?("#{module_path}::Base") +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#33 +class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#64 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#105 + def argument_replacement(node, value); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#95 + def register_offense(argument, argument_value); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#89 + def string_argument_compatible?(argument, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#77 + def string_arguments(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#38 +RuboCop::Cop::Performance::StringIdentifierArgument::COMMAND_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#43 +RuboCop::Cop::Performance::StringIdentifierArgument::INTERPOLATION_IGNORE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#36 +RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#46 +RuboCop::Cop::Performance::StringIdentifierArgument::MULTIPLE_ARGUMENTS_METHODS = T.let(T.unsafe(nil), Array) + +# NOTE: `attr` method is not included in this list as it can cause false positives in Nokogiri API. +# And `attr` may not be used because `Style/Attr` registers an offense. +# https://github.com/rubocop/rubocop-performance/issues/278 +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#54 +RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#45 +RuboCop::Cop::Performance::StringIdentifierArgument::TWO_ARGUMENTS_METHOD = T.let(T.unsafe(nil), Symbol) + +# Identifies unnecessary use of a regex where `String#include?` would suffice. +# +# @example +# # bad +# str.match?(/ab/) +# /ab/.match?(str) +# str =~ /ab/ +# /ab/ =~ str +# str.match(/ab/) +# /ab/.match(str) +# /ab/ === str +# +# # good +# str.include?('ab') +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#23 +class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#29 + def redundant_regex?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#59 + def literal?(regex_str); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#26 +RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#27 +RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `gsub` can be replaced by `tr` or `delete`. +# +# @example +# # bad +# 'abc'.gsub('b', 'd') +# 'abc'.gsub('a', '') +# 'abc'.gsub(/a/, 'd') +# 'abc'.gsub!('a', 'd') +# +# # good +# 'abc'.gsub(/.*/, 'a') +# 'abc'.gsub(/a+/, 'd') +# 'abc'.tr('b', 'd') +# 'a b c'.delete(' ') +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#20 +class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#31 + def string_replacement?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#84 + def accept_first_param?(first_param); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#79 + def accept_second_param?(second_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#60 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#100 + def first_source(first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#143 + def message(node, first_source, second_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#149 + def method_suffix(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#49 + def offense(node, first_param, second_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#129 + def range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#153 + def remove_second_param(corrector, node, first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#70 + def replace_method(corrector, node, first_source, second_source, first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#133 + def replacement_method(node, first_source, second_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#118 + def source_from_regex_constructor(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#111 + def source_from_regex_literal(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#29 +RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#27 +RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#26 +RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#24 +RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#25 +RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#28 +RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) + +# Identifies places where custom code finding the sum of elements +# in some Enumerable object can be replaced by `Enumerable#sum` method. +# +# @example OnlySumOrWithInitialValue: false (default) +# # bad +# [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe +# [1, 2, 3].inject(&:+) # and will only be performed when using the `-A` option. +# [1, 2, 3].reduce { |acc, elem| acc + elem } # They can be prohibited completely using `SafeAutoCorrect: true`. +# [1, 2, 3].reduce(10, :+) +# [1, 2, 3].map { |elem| elem ** 2 }.sum +# [1, 2, 3].collect(&:count).sum(10) +# +# # good +# [1, 2, 3].sum +# [1, 2, 3].sum(10) +# [1, 2, 3].sum { |elem| elem ** 2 } +# [1, 2, 3].sum(10, &:count) +# @example OnlySumOrWithInitialValue: true +# # bad +# [1, 2, 3].reduce(10, :+) +# [1, 2, 3].map { |elem| elem ** 2 }.sum +# [1, 2, 3].collect(&:count).sum(10) +# +# # good +# [1, 2, 3].sum(10) +# [1, 2, 3].sum { |elem| elem ** 2 } +# [1, 2, 3].sum(10, &:count) +# +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#70 +class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 + def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 + def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#115 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#82 + def sum_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#86 + def sum_map_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#95 + def sum_with_block_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#160 + def array_literal?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#165 + def autocorrect(corrector, init, range); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#173 + def autocorrect_sum_map(corrector, sum, map, init); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#250 + def build_block_bad_method(method, init, var_acc, var_elem, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#217 + def build_block_message(send, init, var_acc, var_elem, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#223 + def build_good_method(init, block_pass = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#236 + def build_method_bad_method(init, method, operation); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#198 + def build_method_message(node, method, init, operation); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#209 + def build_sum_map_message(send_node, init); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#155 + def empty_array_literal?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#130 + def handle_sum_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#143 + def handle_sum_map_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#261 + def method_call_with_args_range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#194 + def sum_block_range(send, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#190 + def sum_map_range(map, sum); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#186 + def sum_method_range(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#77 +RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#78 +RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#80 +RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for .times.map calls. +# In most cases such calls can be replaced +# with an explicit array creation. +# +# @example +# # bad +# 9.times.map do |i| +# i.to_s +# end +# +# # good +# Array.new(9) do |i| +# i.to_s +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#32 +class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#44 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#44 + def on_numblock(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#79 + def times_map_call(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#51 + def check(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#63 + def handleable_receiver?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#70 + def message(map_or_collect, count); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#35 +RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#36 +RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#37 +RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.3 or later, use unary plus operator to unfreeze a string +# literal instead of `String#dup` and `String.new`. +# Unary plus operator is faster than `String#dup`. +# +# @example +# # bad +# ''.dup # when Ruby 3.2 or lower +# "something".dup # when Ruby 3.2 or lower +# String.new +# String.new('') +# String.new('something') +# +# # good +# +'something' +# +'' +# +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 +class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#36 + def dup_string?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#47 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#40 + def string_new?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#60 + def string_value(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 +RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#34 +RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI::Parser.new` can be replaced by `URI::DEFAULT_PARSER`. +# +# @example +# # bad +# URI::Parser.new +# +# # good +# URI::DEFAULT_PARSER +# +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#15 +class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#27 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#21 + def uri_parser_new?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#18 +RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#19 +RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for handling regexp metacharacters. +# +# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#6 +module RuboCop::Cop::RegexpMetacharacter + private + + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#63 + def drop_end_metacharacter(regexp_string); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#55 + def drop_start_metacharacter(regexp_string); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#15 + def literal_at_end?(regexp); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#41 + def literal_at_end_with_backslash_z?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#48 + def literal_at_end_with_dollar?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#9 + def literal_at_start?(regexp); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#21 + def literal_at_start_with_backslash_a?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#31 + def literal_at_start_with_caret?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#71 + def safe_multiline?; end +end + +# Common functionality for cops checking `Enumerable#sort` blocks. +# +# source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#6 +module RuboCop::Cop::SortBlock + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#24 + def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#10 + def sort_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#17 + def sort_with_numblock?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#30 + def sort_range(send, node); end +end + +# RuboCop Performance project namespace +# +# source://rubocop-performance//lib/rubocop/performance.rb#5 +module RuboCop::Performance; end + +# source://rubocop-performance//lib/rubocop/performance.rb#8 +RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/performance.rb#7 +RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) + +# Because RuboCop doesn't yet support plugins, we have to monkey patch in a +# bit of our configuration. +# +# source://rubocop-performance//lib/rubocop/performance/inject.rb#7 +module RuboCop::Performance::Inject + class << self + # source://rubocop-performance//lib/rubocop/performance/inject.rb#8 + def defaults!; end + end +end + +# source://rubocop-performance//lib/rubocop/performance.rb#6 +RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + +# This module holds the RuboCop Performance version information. +# +# source://rubocop-performance//lib/rubocop/performance/version.rb#6 +module RuboCop::Performance::Version + class << self + # source://rubocop-performance//lib/rubocop/performance/version.rb#9 + def document_version; end + end +end + +# source://rubocop-performance//lib/rubocop/performance/version.rb#7 +RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails-omakase@1.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails-omakase@1.0.0.rbi new file mode 100644 index 0000000..6f4faeb --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails-omakase@1.0.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rails-omakase` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rails-omakase`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails@2.26.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails@2.26.2.rbi new file mode 100644 index 0000000..c036977 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rails@2.26.2.rbi @@ -0,0 +1,9515 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rails` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rails`. + + +# source://rubocop-rails//lib/rubocop/rails.rb#3 +module RuboCop; end + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#4 +module RuboCop::Cop; end + +# A mixin to extend cops for Active Record features +# +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#6 +module RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#11 + def active_record?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#30 + def external_dependency_checksum; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#22 + def find_belongs_to(param0); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#18 + def find_set_table_name(param0); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#84 + def foreign_key_of(belongs_to); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#105 + def in_where?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#26 + def inherit_active_record_base?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#96 + def polymorphic?(belongs_to); end + + # Resolve relation into column name. + # It just returns column_name if the column exists. + # Or it tries to resolve column_name as a relation. + # Returns an array of column names if the relation is polymorphic. + # It returns `nil` if it can't resolve. + # + # @param name [String] + # @param class_node [RuboCop::AST::Node] + # @param table [RuboCop::Rails::SchemaLoader::Table] + # @return [Array, String, nil] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#69 + def resolve_relation_into_column(name:, class_node:, table:); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#41 + def schema; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#50 + def table_name(class_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#9 +RuboCop::Cop::ActiveRecordHelper::WHERE_METHODS = T.let(T.unsafe(nil), Array) + +# A mixin to extend cops for Active Record features +# +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#6 +module RuboCop::Cop::ActiveRecordMigrationsHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#24 + def create_table_with_block?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#19 +RuboCop::Cop::ActiveRecordMigrationsHelper::MYSQL_SCHEMA_DEFINITIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#14 +RuboCop::Cop::ActiveRecordMigrationsHelper::POSTGRES_SCHEMA_DEFINITIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#9 +RuboCop::Cop::ActiveRecordMigrationsHelper::RAILS_ABSTRACT_SCHEMA_DEFINITIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/mixin/active_record_migrations_helper.rb#13 +RuboCop::Cop::ActiveRecordMigrationsHelper::RAILS_ABSTRACT_SCHEMA_DEFINITIONS_HELPERS = T.let(T.unsafe(nil), Array) + +# A mixin to return all of the class send nodes. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/class_send_node_helper.rb#6 +module RuboCop::Cop::ClassSendNodeHelper + # source://rubocop-rails//lib/rubocop/cop/mixin/class_send_node_helper.rb#7 + def class_send_nodes(class_node); end +end + +# A mixin to extend cops in order to determine the database type. +# +# This module automatically detect an adapter from `development` environment +# in `config/database.yml` or the environment variable `DATABASE_URL` +# when the `Database` option is not set. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#10 +module RuboCop::Cop::DatabaseTypeResolvable + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#14 + def database; end + + private + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#61 + def database_adapter; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#31 + def database_from_env; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#20 + def database_from_yaml; end + + # source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#43 + def database_yaml; end +end + +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#11 +RuboCop::Cop::DatabaseTypeResolvable::MYSQL = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/mixin/database_type_resolvable.rb#12 +RuboCop::Cop::DatabaseTypeResolvable::POSTGRESQL = T.let(T.unsafe(nil), String) + +# Common functionality for enforcing a specific superclass. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#6 +module RuboCop::Cop::EnforceSuperclass + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#19 + def on_class(node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#25 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#33 + def register_offense(offense_node); end + + class << self + # @private + # + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#7 + def included(base); end + end +end + +# Common functionality for Rails/IndexBy and Rails/IndexWith +# +# source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#6 +module RuboCop::Cop::IndexMethod + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#9 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#31 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#21 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#95 + def execute_correction(corrector, node, correction); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#72 + def extract_captures(match); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#59 + def handle_possible_offense(node, match, match_desc); end + + # @raise [NotImplementedError] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#77 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#40 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#55 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#50 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#45 + def on_bad_to_h(_node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#81 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#115 +class RuboCop::Cop::IndexMethod::Autocorrection < ::Struct + # Returns the value of attribute block_node + # + # @return [Object] the current value of block_node + def block_node; end + + # Sets the attribute block_node + # + # @param value [Object] the value to set the attribute block_node to. + # @return [Object] the newly set value + def block_node=(_); end + + # Returns the value of attribute leading + # + # @return [Object] the current value of leading + def leading; end + + # Sets the attribute leading + # + # @param value [Object] the value to set the attribute leading to. + # @return [Object] the newly set value + def leading=(_); end + + # Returns the value of attribute match + # + # @return [Object] the current value of match + def match; end + + # Sets the attribute match + # + # @param value [Object] the value to set the attribute match to. + # @return [Object] the newly set value + def match=(_); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#155 + def set_new_arg_name(transformed_argname, corrector); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#159 + def set_new_body_expression(transforming_body_expr, corrector); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#146 + def set_new_method_name(new_method_name, corrector); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#140 + def strip_prefix_and_suffix(node, corrector); end + + # Returns the value of attribute trailing + # + # @return [Object] the current value of trailing + def trailing; end + + # Sets the attribute trailing + # + # @param value [Object] the value to set the attribute trailing to. + # @return [Object] the newly set value + def trailing=(_); end + + class << self + def [](*_arg0); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#116 + def from_each_with_object(node, match); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#136 + def from_hash_brackets_map(node, match); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#124 + def from_map_to_h(node, match); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#120 + def from_to_h(node, match); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#105 +class RuboCop::Cop::IndexMethod::Captures < ::Struct + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#109 + def noop_transformation?; end + + # Returns the value of attribute transformed_argname + # + # @return [Object] the current value of transformed_argname + def transformed_argname; end + + # Sets the attribute transformed_argname + # + # @param value [Object] the value to set the attribute transformed_argname to. + # @return [Object] the newly set value + def transformed_argname=(_); end + + # Returns the value of attribute transforming_body_expr + # + # @return [Object] the current value of transforming_body_expr + def transforming_body_expr; end + + # Sets the attribute transforming_body_expr + # + # @param value [Object] the value to set the attribute transforming_body_expr to. + # @return [Object] the newly set value + def transforming_body_expr=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop-rails//lib/rubocop/cop/mixin/index_method.rb#7 +RuboCop::Cop::IndexMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for cops working with migrations +# +# source://rubocop-rails//lib/rubocop/cop/mixin/migrations_helper.rb#6 +module RuboCop::Cop::MigrationsHelper + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/migrations_helper.rb#19 + def in_migration?(node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/migrations_helper.rb#9 + def migration_class?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#5 +module RuboCop::Cop::Rails; end + +# Using `flash` assignment before `render` in Rails controllers will persist the message for too long. +# Check https://guides.rubyonrails.org/action_controller_overview.html#flash-now +# +# @example +# +# # bad +# class HomeController < ApplicationController +# def create +# flash[:alert] = "msg" +# render :index +# end +# end +# +# # good +# class HomeController < ApplicationController +# def create +# flash.now[:alert] = "msg" +# render :index +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#31 +class RuboCop::Cop::Rails::ActionControllerFlashBeforeRender < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#44 + def action_controller?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#36 + def flash_assignment?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#53 + def on_send(flash_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#40 + def render?(param0); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#108 + def find_ancestor(node, type:); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#69 + def followed_by_render?(flash_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#86 + def inherit_action_controller_base?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#93 + def instance_method_or_block?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#100 + def use_redirect_to?(context); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#34 +RuboCop::Cop::Rails::ActionControllerFlashBeforeRender::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#51 +RuboCop::Cop::Rails::ActionControllerFlashBeforeRender::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Using `ActionController::TestCase` is discouraged and should be replaced by +# `ActionDispatch::IntegrationTest`. Controller tests are too close to the +# internals of a controller whereas integration tests mimic the browser/user. +# +# @example +# # bad +# class MyControllerTest < ActionController::TestCase +# end +# +# # good +# class MyControllerTest < ActionDispatch::IntegrationTest +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_test_case.rb#23 +class RuboCop::Cop::Rails::ActionControllerTestCase < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_test_case.rb#31 + def action_controller_test_case?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_test_case.rb#37 + def on_class(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/action_controller_test_case.rb#27 +RuboCop::Cop::Rails::ActionControllerTestCase::MSG = T.let(T.unsafe(nil), String) + +# Enforces the consistent use of action filter methods. +# +# The cop is configurable and can enforce the use of the older +# something_filter methods or the newer something_action methods. +# +# IMPORTANT: This cop is deprecated. Because the `*_filter` methods were removed in Rails 4.2, +# and that Rails version is no longer supported by RuboCop Rails. This cop will be removed in RuboCop Rails 3.0. +# +# @example EnforcedStyle: action (default) +# # bad +# after_filter :do_stuff +# append_around_filter :do_stuff +# skip_after_filter :do_stuff +# +# # good +# after_action :do_stuff +# append_around_action :do_stuff +# skip_after_action :do_stuff +# @example EnforcedStyle: filter +# # bad +# after_action :do_stuff +# append_around_action :do_stuff +# skip_after_action :do_stuff +# +# # good +# after_filter :do_stuff +# append_around_filter :do_stuff +# skip_after_filter :do_stuff +# +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#35 +class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#75 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#79 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#96 + def bad_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#85 + def check_method_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#100 + def good_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#104 + def preferred_method(method); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#57 +RuboCop::Cop::Rails::ActionFilter::ACTION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#41 +RuboCop::Cop::Rails::ActionFilter::FILTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#39 +RuboCop::Cop::Rails::ActionFilter::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/action_filter.rb#73 +RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces consistent ordering of the standard Rails RESTful controller actions. +# +# The cop is configurable and can enforce any ordering of the standard actions. +# All other methods are ignored. So, the actions specified in `ExpectedOrder` should be +# defined before actions not specified. +# +# [source,yaml] +# ---- +# Rails/ActionOrder: +# ExpectedOrder: +# - index +# - show +# - new +# - edit +# - create +# - update +# - destroy +# ---- +# +# @example +# # bad +# def index; end +# def destroy; end +# def show; end +# +# # good +# def index; end +# def show; end +# def destroy; end +# +# source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#35 +class RuboCop::Cop::Rails::ActionOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#43 + def action_declarations(param0, param1); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#45 + def on_class(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#60 + def actions; end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#87 + def add_range(range1, range2); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#83 + def correction_target(def_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#56 + def expected_order; end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#64 + def find_index(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#94 + def range_with_comments(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#101 + def range_with_comments_and_lines(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#68 + def register_offense(previous, current); end + + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#105 + def swap_range(corrector, range1, range2); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#41 +RuboCop::Cop::Rails::ActionOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks that ActiveRecord aliases are not used. The direct method names +# are more clear and easier to read. +# +# @example +# # bad +# book.update_attributes!(author: 'Alice') +# +# # good +# book.update!(author: 'Alice') +# +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#19 +class RuboCop::Cop::Rails::ActiveRecordAliases < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#28 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#28 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#24 +RuboCop::Cop::Rails::ActiveRecordAliases::ALIASES = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#22 +RuboCop::Cop::Rails::ActiveRecordAliases::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#26 +RuboCop::Cop::Rails::ActiveRecordAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that Active Record callbacks are declared +# in the order in which they will be executed. +# +# @example +# # bad +# class Person < ApplicationRecord +# after_commit :after_commit_callback +# before_validation :before_validation_callback +# end +# +# # good +# class Person < ApplicationRecord +# before_validation :before_validation_callback +# after_commit :after_commit_callback +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#22 +class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#51 + def on_class(class_node); end + + private + + # Autocorrect by swapping between two nodes autocorrecting them + # + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#73 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#111 + def begin_pos_with_comment(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#133 + def buffer; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#95 + def callback?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#85 + def defined_callbacks(class_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#106 + def end_position_for(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#125 + def inline_comment?(comment); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#99 + def source_range_with_comment(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#129 + def start_line_position(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#27 +RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_IN_ORDER = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#49 +RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_ORDER_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#25 +RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for overriding built-in Active Record methods instead of using +# callbacks. +# +# @example +# # bad +# class Book < ApplicationRecord +# def save +# self.title = title.upcase! +# super +# end +# end +# +# # good +# class Book < ApplicationRecord +# before_save :upcase_title +# +# def upcase_title +# self.title = title.upcase! +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#27 +class RuboCop::Cop::Rails::ActiveRecordOverride < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#32 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#45 + def active_model?(parent_class_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#49 + def callback_names(method_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#63 + def find_parent_class_name(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#59 + def message(method_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#30 +RuboCop::Cop::Rails::ActiveRecordOverride::ACTIVE_RECORD_CLASSES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#29 +RuboCop::Cop::Rails::ActiveRecordOverride::BAD_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_record_override.rb#28 +RuboCop::Cop::Rails::ActiveRecordOverride::MSG = T.let(T.unsafe(nil), String) + +# Checks that ActiveSupport aliases to core ruby methods +# are not used. +# +# @example +# # good +# 'some_string'.start_with?('prefix') +# 'some_string'.end_with?('suffix') +# [1, 2, 'a'] << 'b' +# [1, 2, 'a'].unshift('b') +# +# # bad +# 'some_string'.starts_with?('prefix') +# 'some_string'.ends_with?('suffix') +# [1, 2, 'a'].append('b') +# [1, 2, 'a'].prepend('b') +# +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#22 +class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#40 + def append(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#40 + def ends_with?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#43 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#43 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#40 + def prepend(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#40 + def starts_with?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#28 +RuboCop::Cop::Rails::ActiveSupportAliases::ALIASES = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#25 +RuboCop::Cop::Rails::ActiveSupportAliases::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#26 +RuboCop::Cop::Rails::ActiveSupportAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for Rails framework classes that are patched directly instead of using Active Support load hooks. Direct +# patching forcibly loads the framework referenced, using hooks defers loading until it's actually needed. +# +# @example +# +# # bad +# ActiveRecord::Base.include(MyClass) +# +# # good +# ActiveSupport.on_load(:active_record) { include MyClass } +# +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#20 +class RuboCop::Cop::Rails::ActiveSupportOnLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#81 + def hook_for_const(const_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#71 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#25 +RuboCop::Cop::Rails::ActiveSupportOnLoad::LOAD_HOOKS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#23 +RuboCop::Cop::Rails::ActiveSupportOnLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#58 +RuboCop::Cop::Rails::ActiveSupportOnLoad::RAILS_5_2_LOAD_HOOKS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#62 +RuboCop::Cop::Rails::ActiveSupportOnLoad::RAILS_7_1_LOAD_HOOKS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#24 +RuboCop::Cop::Rails::ActiveSupportOnLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for migrations using `add_column` that have an `index` +# key. `add_column` does not accept `index`, but also does not raise an +# error for extra keys, so it is possible to mistakenly add the key without +# realizing it will not actually add an index. +# +# @example +# # bad (will not add an index) +# add_column :table, :column, :integer, index: true +# +# # good +# add_column :table, :column, :integer +# add_index :table, :column +# +# source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#19 +class RuboCop::Cop::Rails::AddColumnIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#27 + def add_column_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#34 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#55 + def index_range(pair_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#23 +RuboCop::Cop::Rails::AddColumnIndex::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/add_column_index.rb#24 +RuboCop::Cop::Rails::AddColumnIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces that there is only one call to `after_commit` +# (and its aliases - `after_create_commit`, `after_update_commit`, +# and `after_destroy_commit`) with the same callback name per model. +# +# @example +# # bad +# # This won't be triggered. +# after_create_commit :log_action +# +# # This will override the callback added by +# # after_create_commit. +# after_update_commit :log_action +# +# # bad +# # This won't be triggered. +# after_commit :log_action, on: :create +# # This won't be triggered. +# after_update_commit :log_action +# # This will override both previous callbacks. +# after_commit :log_action, on: :destroy +# +# # good +# after_save_commit :log_action +# +# # good +# after_create_commit :log_create_action +# after_update_commit :log_update_action +# +# source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#34 +class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ClassSendNodeHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#47 + def on_class(class_node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#68 + def after_commit_callback?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#62 + def each_after_commit_callback(class_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#72 + def named_callback?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#39 +RuboCop::Cop::Rails::AfterCommitOverride::AFTER_COMMIT_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/after_commit_override.rb#37 +RuboCop::Cop::Rails::AfterCommitOverride::MSG = T.let(T.unsafe(nil), String) + +# Checks that controllers subclass `ApplicationController`. +# +# @example +# +# # good +# class MyController < ApplicationController +# # ... +# end +# +# # bad +# class MyController < ActionController::Base +# # ... +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/application_controller.rb#23 +class RuboCop::Cop::Rails::ApplicationController < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#8 + def class_definition(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#12 + def class_new_definition(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/application_controller.rb#28 +RuboCop::Cop::Rails::ApplicationController::BASE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_controller.rb#26 +RuboCop::Cop::Rails::ApplicationController::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_controller.rb#27 +RuboCop::Cop::Rails::ApplicationController::SUPERCLASS = T.let(T.unsafe(nil), String) + +# Checks that jobs subclass `ApplicationJob` with Rails 5.0. +# +# @example +# +# # good +# class Rails5Job < ApplicationJob +# # ... +# end +# +# # bad +# class Rails4Job < ActiveJob::Base +# # ... +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/application_job.rb#23 +class RuboCop::Cop::Rails::ApplicationJob < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/application_job.rb#37 + def autocorrect(node); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#8 + def class_definition(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#12 + def class_new_definition(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/application_job.rb#31 +RuboCop::Cop::Rails::ApplicationJob::BASE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_job.rb#29 +RuboCop::Cop::Rails::ApplicationJob::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_job.rb#30 +RuboCop::Cop::Rails::ApplicationJob::SUPERCLASS = T.let(T.unsafe(nil), String) + +# Checks that mailers subclass `ApplicationMailer` with Rails 5.0. +# +# @example +# +# # good +# class MyMailer < ApplicationMailer +# # ... +# end +# +# # bad +# class MyMailer < ActionMailer::Base +# # ... +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/application_mailer.rb#23 +class RuboCop::Cop::Rails::ApplicationMailer < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#8 + def class_definition(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#12 + def class_new_definition(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/application_mailer.rb#31 +RuboCop::Cop::Rails::ApplicationMailer::BASE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_mailer.rb#29 +RuboCop::Cop::Rails::ApplicationMailer::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_mailer.rb#30 +RuboCop::Cop::Rails::ApplicationMailer::SUPERCLASS = T.let(T.unsafe(nil), String) + +# Checks that models subclass `ApplicationRecord` with Rails 5.0. +# +# It is a common practice to define models inside migrations in order to retain forward +# compatibility by avoiding loading any application code. And so migration files are excluded +# by default for this cop. +# +# @example +# +# # good +# class Rails5Model < ApplicationRecord +# # ... +# end +# +# # bad +# class Rails4Model < ActiveRecord::Base +# # ... +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#28 +class RuboCop::Cop::Rails::ApplicationRecord < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EnforceSuperclass + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#8 + def class_definition(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/mixin/enforce_superclass.rb#12 + def class_new_definition(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#36 +RuboCop::Cop::Rails::ApplicationRecord::BASE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#34 +RuboCop::Cop::Rails::ApplicationRecord::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#35 +RuboCop::Cop::Rails::ApplicationRecord::SUPERCLASS = T.let(T.unsafe(nil), String) + +# Prevents usage of `"*"` on an Arel::Table column reference. +# +# Using `arel_table["*"]` causes the outputted string to be a literal +# quoted asterisk (e.g. `my_model`.`*`). This causes the +# database to look for a column named `*` (or `"*"`) as opposed +# to expanding the column list as one would likely expect. +# +# @example +# # bad +# MyTable.arel_table["*"] +# +# # good +# MyTable.arel_table[Arel.star] +# +# source://rubocop-rails//lib/rubocop/cop/rails/arel_star.rb#26 +class RuboCop::Cop::Rails::ArelStar < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/arel_star.rb#37 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/arel_star.rb#33 + def star_bracket?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/arel_star.rb#29 +RuboCop::Cop::Rails::ArelStar::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/arel_star.rb#31 +RuboCop::Cop::Rails::ArelStar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use `assert_not` instead of `assert !`. +# +# @example +# # bad +# assert !x +# +# # good +# assert_not x +# +# source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#15 +class RuboCop::Cop::Rails::AssertNot < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#21 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#23 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#35 + def corrected_source(source); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#18 +RuboCop::Cop::Rails::AssertNot::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/assert_not.rb#19 +RuboCop::Cop::Rails::AssertNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for `attribute` class methods that specify a `:default` option +# which value is an array, string literal or method call without a block. +# It will accept all other values, such as string, symbol, integer and float literals +# as well as constants. +# +# @example +# # bad +# class User < ApplicationRecord +# attribute :confirmed_at, :datetime, default: Time.zone.now +# end +# +# # good +# class User < ApplicationRecord +# attribute :confirmed_at, :datetime, default: -> { Time.zone.now } +# end +# +# # bad +# class User < ApplicationRecord +# attribute :roles, :string, array: true, default: [] +# end +# +# # good +# class User < ApplicationRecord +# attribute :roles, :string, array: true, default: -> { [] } +# end +# +# # bad +# class User < ApplicationRecord +# attribute :configuration, default: {} +# end +# +# # good +# class User < ApplicationRecord +# attribute :configuration, default: -> { {} } +# end +# +# # good +# class User < ApplicationRecord +# attribute :role, :string, default: :customer +# end +# +# # good +# class User < ApplicationRecord +# attribute :activated, :boolean, default: false +# end +# +# # good +# class User < ApplicationRecord +# attribute :login_count, :integer, default: 0 +# end +# +# # good +# class User < ApplicationRecord +# FOO = 123 +# attribute :custom_attribute, :integer, default: FOO +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#62 +class RuboCop::Cop::Rails::AttributeDefaultBlockValue < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#73 + def attribute(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#69 + def default_attribute(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#75 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#65 +RuboCop::Cop::Rails::AttributeDefaultBlockValue::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#66 +RuboCop::Cop::Rails::AttributeDefaultBlockValue::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/attribute_default_block_value.rb#67 +RuboCop::Cop::Rails::AttributeDefaultBlockValue::TYPE_OFFENDERS = T.let(T.unsafe(nil), Array) + +# Looks for belongs_to associations where we control whether the +# association is required via the deprecated `required` option instead. +# +# Since Rails 5, belongs_to associations are required by default and this +# can be controlled through the use of `optional: true`. +# +# From the release notes: +# +# belongs_to will now trigger a validation error by default if the +# association is not present. You can turn this off on a +# per-association basis with optional: true. Also deprecate required +# option in favor of optional for belongs_to. (Pull Request) +# +# In the case that the developer is doing `required: false`, we +# definitely want to autocorrect to `optional: true`. +# +# However, without knowing whether they've set overridden the default +# value of `config.active_record.belongs_to_required_by_default`, we +# can't say whether it's safe to remove `required: true` or whether we +# should replace it with `optional: false` (or, similarly, remove a +# superfluous `optional: false`). Therefore, in the cases we're using +# `required: true`, we'll simply invert it to `optional: false` and the +# user can remove depending on their defaults. +# +# @example +# # bad +# class Post < ApplicationRecord +# belongs_to :blog, required: false +# end +# +# # good +# class Post < ApplicationRecord +# belongs_to :blog, optional: true +# end +# +# # bad +# class Post < ApplicationRecord +# belongs_to :blog, required: true +# end +# +# # good +# class Post < ApplicationRecord +# belongs_to :blog, optional: false +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#50 +class RuboCop::Cop::Rails::BelongsTo < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#67 + def match_belongs_to_with_options(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#73 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#65 +RuboCop::Cop::Rails::BelongsTo::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#56 +RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_FALSE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/belongs_to.rb#60 +RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_TRUE_MSG = T.let(T.unsafe(nil), String) + +# Checks for code that can be written with simpler conditionals +# using `Object#blank?` defined by Active Support. +# +# Interaction with `Style/UnlessElse`: +# The configuration of `NotPresent` will not produce an offense in the +# context of `unless else` if `Style/UnlessElse` is enabled. This is +# to prevent interference between the autocorrection of the two cops. +# +# @example NilOrEmpty: true (default) +# # Converts usages of `nil? || empty?` to `blank?` +# +# # bad +# foo.nil? || foo.empty? +# foo == nil || foo.empty? +# +# # good +# foo.blank? +# @example NotPresent: true (default) +# # Converts usages of `!present?` to `blank?` +# +# # bad +# !foo.present? +# +# # good +# foo.blank? +# @example UnlessPresent: true (default) +# # Converts usages of `unless present?` to `if blank?` +# +# # bad +# something unless foo.present? +# +# # good +# something if foo.blank? +# +# # bad +# unless foo.present? +# something +# end +# +# # good +# if foo.blank? +# something +# end +# +# # good +# def blank? +# !present? +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#61 +class RuboCop::Cop::Rails::Blank < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#90 + def defining_blank?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#73 + def nil_or_empty?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#88 + def not_present?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#123 + def on_if(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#110 + def on_or(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#96 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#92 + def unless_present?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#140 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#162 + def replacement(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#154 + def unless_condition(node, method_call); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#64 +RuboCop::Cop::Rails::Blank::MSG_NIL_OR_EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#65 +RuboCop::Cop::Rails::Blank::MSG_NOT_PRESENT = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#66 +RuboCop::Cop::Rails::Blank::MSG_UNLESS_PRESENT = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/blank.rb#67 +RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks whether alter queries are combinable. +# If combinable queries are detected, it suggests to you +# to use `change_table` with `bulk: true` instead. +# This option causes the migration to generate a single +# ALTER TABLE statement combining multiple column alterations. +# +# The `bulk` option is only supported on the MySQL and +# the PostgreSQL (5.2 later) adapter; thus it will +# automatically detect an adapter from `development` environment +# in `config/database.yml` or the environment variable `DATABASE_URL` +# when the `Database` option is not set. +# If the adapter is not `mysql2`, `trilogy`, `postgresql`, or `postgis`, +# this Cop ignores offenses. +# +# @example +# # bad +# def change +# add_column :users, :name, :string, null: false +# add_column :users, :nickname, :string +# +# # ALTER TABLE `users` ADD `name` varchar(255) NOT NULL +# # ALTER TABLE `users` ADD `nickname` varchar(255) +# end +# +# # good +# def change +# change_table :users, bulk: true do |t| +# t.string :name, null: false +# t.string :nickname +# end +# +# # ALTER TABLE `users` ADD `name` varchar(255) NOT NULL, +# # ADD `nickname` varchar(255) +# end +# @example +# # bad +# def change +# change_table :users do |t| +# t.string :name, null: false +# t.string :nickname +# end +# end +# +# # good +# def change +# change_table :users, bulk: true do |t| +# t.string :name, null: false +# t.string :nickname +# end +# end +# +# # good +# # When you don't want to combine alter queries. +# def change +# change_table :users, bulk: false do |t| +# t.string :name, null: false +# t.string :nickname +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#66 +class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DatabaseTypeResolvable + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#121 + def on_def(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#139 + def on_send(node); end + + private + + # @param node [RuboCop::AST::SendNode] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#219 + def add_offense_for_alter_methods(node); end + + # @param node [RuboCop::AST::SendNode] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#229 + def add_offense_for_change_table(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#192 + def call_to_combinable_alter_method?(child_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#196 + def combinable_alter_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#207 + def combinable_transformations; end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#160 + def count_transformations(send_nodes); end + + # @param node [RuboCop::AST::SendNode] (send nil? :change_table ...) + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#171 + def include_bulk_options?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#152 + def send_nodes_from_change_table_block(body); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#179 + def support_bulk_alter?; end +end + +# Record combinable alter methods and register offensive nodes. +# +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#234 +class RuboCop::Cop::Rails::BulkChangeTable::AlterMethodsRecorder + # @return [AlterMethodsRecorder] a new instance of AlterMethodsRecorder + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#235 + def initialize; end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#254 + def flush; end + + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#259 + def offensive_nodes; end + + # @param new_node [RuboCop::AST::SendNode] + # + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#241 + def process(new_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#102 +RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#78 +RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#76 +RuboCop::Cop::Rails::BulkChangeTable::MIGRATION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#72 +RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_ALTER_METHODS = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#69 +RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_CHANGE_TABLE = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#113 +RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#111 +RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#118 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#119 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS_SINCE_6_1 = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#115 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#116 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS_SINCE_6_1 = T.let(T.unsafe(nil), Array) + +# Checks if collection can be blank-compacted with `compact_blank`. +# +# @example +# +# # bad +# collection.reject(&:blank?) +# collection.reject { |_k, v| v.blank? } +# collection.select(&:present?) +# collection.select { |_k, v| v.present? } +# collection.filter(&:present?) +# collection.filter { |_k, v| v.present? } +# +# # good +# collection.compact_blank +# +# # bad +# collection.delete_if(&:blank?) # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` +# collection.delete_if { |_k, v| v.blank? } # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` +# collection.keep_if(&:present?) # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` +# collection.keep_if { |_k, v| v.present? } # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` +# +# # good +# collection.compact_blank! +# +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#43 +class RuboCop::Cop::Rails::CompactBlank < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#82 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#54 + def reject_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#62 + def reject_with_block_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#68 + def select_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#76 + def select_with_block_pass?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#95 + def bad_method?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#116 + def offense_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#126 + def preferred_method(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#112 + def use_hash_value_block_argument?(arguments, receiver_in_block); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#108 + def use_single_value_block_argument?(arguments, receiver_in_block); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#50 +RuboCop::Cop::Rails::CompactBlank::DESTRUCTIVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#48 +RuboCop::Cop::Rails::CompactBlank::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#49 +RuboCop::Cop::Rails::CompactBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks legacy syntax usage of `tag` +# +# NOTE: Allow `tag` when the first argument is a variable because +# `tag(name)` is simpler rather than `tag.public_send(name)`. +# And this cop will be renamed to something like `LegacyTag` in the future. (e.g. RuboCop Rails 3.0) +# +# @example +# # bad +# tag(:p) +# tag(:br, class: 'classname') +# +# # good +# tag.p +# tag.br(class: 'classname') +# tag(name, class: 'classname') +# +# source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#21 +class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#31 + def on_new_investigation; end + + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#54 + def allowed_argument?(argument); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#81 + def allowed_name?(argument); end + + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#72 + def autocorrect(corrector, node, preferred_method); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#50 + def corrected_ancestor?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#87 + def correction_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#63 + def register_offense(node, message, preferred_method); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#28 +RuboCop::Cop::Rails::ContentTag::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/content_tag.rb#29 +RuboCop::Cop::Rails::ContentTag::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks the migration for which timestamps are not included when creating a new table. +# In many cases, timestamps are useful information and should be added. +# +# NOTE: Allow `timestamps` not written when `id: false` because this emphasizes respecting +# user's editing intentions. +# +# @example +# # bad +# create_table :users +# +# # bad +# create_table :users do |t| +# t.string :name +# t.string :email +# end +# +# # good +# create_table :users do |t| +# t.string :name +# t.string :email +# +# t.timestamps +# end +# +# # good +# create_table :users do |t| +# t.string :name +# t.string :email +# +# t.datetime :created_at, default: -> { 'CURRENT_TIMESTAMP' } +# end +# +# # good +# create_table :users do |t| +# t.string :name +# t.string :email +# +# t.datetime :updated_at, default: -> { 'CURRENT_TIMESTAMP' } +# end +# +# # good +# create_table :users, articles, id: false do |t| +# t.integer :user_id +# t.integer :article_id +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#52 +class RuboCop::Cop::Rails::CreateTableWithTimestamps < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordMigrationsHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#62 + def create_table_with_timestamps_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#70 + def created_at_or_updated_at_included?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#76 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#66 + def timestamps_included?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#58 + def use_id_false_option?(param0); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#92 + def time_columns_included?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#55 +RuboCop::Cop::Rails::CreateTableWithTimestamps::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/create_table_with_timestamps.rb#56 +RuboCop::Cop::Rails::CreateTableWithTimestamps::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Avoid dangerous column names. +# +# Some column names are considered dangerous because they would overwrite methods already defined. +# +# @example +# # bad +# add_column :users, :save +# +# # good +# add_column :users, :saved +# +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#16 +class RuboCop::Cop::Rails::DangerousColumnNames < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#413 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#423 + def column_name_node_from(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#440 + def dangerous_column_name?(column_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#434 + def dangerous_column_name_node?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#17 +RuboCop::Cop::Rails::DangerousColumnNames::COLUMN_TYPE_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# Generated from `ActiveRecord::AttributeMethods.dangerous_attribute_methods` on activerecord 7.1.3. +# +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#36 +RuboCop::Cop::Rails::DangerousColumnNames::DANGEROUS_COLUMN_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#409 +RuboCop::Cop::Rails::DangerousColumnNames::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#411 +RuboCop::Cop::Rails::DangerousColumnNames::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the correct use of Date methods, +# such as Date.today, Date.current etc. +# +# Using `Date.today` is dangerous, because it doesn't know anything about +# Rails time zone. You must use `Time.zone.today` instead. +# +# The cop also reports warnings when you are using `to_time` method, +# because it doesn't know about Rails time zone either. +# +# Two styles are supported for this cop. When `EnforcedStyle` is `strict` +# then the Date methods `today`, `current`, `yesterday`, and `tomorrow` +# are prohibited and the usage of both `to_time` +# and `to_time_in_current_zone` are reported as warning. +# +# When `EnforcedStyle` is `flexible` then only `Date.today` is prohibited. +# +# And you can set a warning for `to_time` with `AllowToTime: false`. +# `AllowToTime` is `true` by default to prevent false positive on `DateTime` object. +# +# @example EnforcedStyle: flexible (default) +# # bad +# Date.today +# +# # good +# Time.zone.today +# Time.zone.today - 1.day +# Date.current +# Date.yesterday +# date.in_time_zone +# @example EnforcedStyle: strict +# # bad +# Date.current +# Date.yesterday +# Date.today +# +# # good +# Time.zone.today +# Time.zone.today - 1.day +# @example AllowToTime: true (default) +# # good +# date.to_time +# @example AllowToTime: false +# # bad +# date.to_time +# +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#56 +class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#73 + def on_const(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#81 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#81 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#153 + def allow_to_time?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#161 + def bad_days; end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#165 + def bad_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#106 + def check_date_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#94 + def check_deprecated_methods(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#123 + def extract_method_chain(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#157 + def good_days; end + + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#169 + def good_methods; end + + # checks that parent node of send_type + # and receiver is the given node + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#129 + def method_send?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#135 + def safe_chain?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/date.rb#141 + def safe_to_time?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#67 +RuboCop::Cop::Rails::Date::BAD_DAYS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#69 +RuboCop::Cop::Rails::Date::DEPRECATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#71 +RuboCop::Cop::Rails::Date::DEPRECATED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#61 +RuboCop::Cop::Rails::Date::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#63 +RuboCop::Cop::Rails::Date::MSG_SEND = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/date.rb#65 +RuboCop::Cop::Rails::Date::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `default_scope`. +# +# @example +# # bad +# default_scope -> { where(hidden: false) } +# +# # good +# scope :published, -> { where(hidden: false) } +# +# # bad +# def self.default_scope +# where(hidden: false) +# end +# +# # good +# def self.published +# where(hidden: false) +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#25 +class RuboCop::Cop::Rails::DefaultScope < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#33 + def class_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#37 + def eigenclass_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#29 + def method_call?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#47 + def on_defs(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#53 + def on_sclass(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#41 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#26 +RuboCop::Cop::Rails::DefaultScope::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/default_scope.rb#27 +RuboCop::Cop::Rails::DefaultScope::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for delegations that could have been created +# automatically with the `delegate` method. +# +# Safe navigation `&.` is ignored because Rails' `allow_nil` +# option checks not just for nil but also delegates if nil +# responds to the delegated method. +# +# The `EnforceForPrefixed` option (defaulted to `true`) means that +# using the target object as a prefix of the method name +# without using the `delegate` method will be a violation. +# When set to `false`, this case is legal. +# +# @example +# # bad +# def bar +# foo.bar +# end +# +# # good +# delegate :bar, to: :foo +# +# # bad +# def bar +# self.bar +# end +# +# # good +# delegate :bar, to: :self +# +# # good +# def bar +# foo&.bar +# end +# +# # good +# private +# def bar +# foo.bar +# end +# @example EnforceForPrefixed: true (default) +# # bad +# def foo_bar +# foo.bar +# end +# +# # good +# delegate :bar, to: :foo, prefix: true +# @example EnforceForPrefixed: false +# # good +# def foo_bar +# foo.bar +# end +# +# # good +# delegate :bar, to: :foo, prefix: true +# +# source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#63 +class RuboCop::Cop::Rails::Delegate < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#69 + def delegate?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#74 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#102 + def arguments_match?(arg_array, body); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#116 + def include_prefix_case?; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#112 + def method_name_matches?(method_name, body); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#120 + def prefixed_method_name(body); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#126 + def private_or_protected_delegation(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#130 + def private_or_protected_inline(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#83 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#96 + def trivial_delegate?(def_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/delegate.rb#67 +RuboCop::Cop::Rails::Delegate::MSG = T.let(T.unsafe(nil), String) + +# Looks for delegations that pass :allow_blank as an option +# instead of :allow_nil. :allow_blank is not a valid option to pass +# to ActiveSupport#delegate. +# +# @example +# # bad +# delegate :foo, to: :bar, allow_blank: true +# +# # good +# delegate :foo, to: :bar, allow_nil: true +# +# source://rubocop-rails//lib/rubocop/cop/rails/delegate_allow_blank.rb#16 +class RuboCop::Cop::Rails::DelegateAllowBlank < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate_allow_blank.rb#22 + def allow_blank_option(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/delegate_allow_blank.rb#26 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/delegate_allow_blank.rb#19 +RuboCop::Cop::Rails::DelegateAllowBlank::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/delegate_allow_blank.rb#20 +RuboCop::Cop::Rails::DelegateAllowBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks direct manipulation of ActiveModel#errors as hash. +# These operations are deprecated in Rails 6.1 and will not work in Rails 7. +# +# @example +# # bad +# user.errors[:name] << 'msg' +# user.errors.messages[:name] << 'msg' +# +# # good +# user.errors.add(:name, 'msg') +# +# # bad +# user.errors[:name].clear +# user.errors.messages[:name].clear +# +# # good +# user.errors.delete(:name) +# +# # bad +# user.errors.keys.include?(:attr) +# +# # good +# user.errors.attribute_names.include?(:attr) +# +# source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#35 +class RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#55 + def any_manipulation?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#81 + def errors_deprecated?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#99 + def messages_details_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#87 + def messages_details_manipulation?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#108 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#53 + def receiver_matcher_inside_model(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#52 + def receiver_matcher_outside_model(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#74 + def root_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#65 + def root_manipulation?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#129 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#162 + def model_file?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#138 + def offense_range(node, receiver); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#158 + def receiver_matcher(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#143 + def replacement(node, receiver); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#122 + def skip_autocorrect?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#40 +RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#41 +RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::INCOMPATIBLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#43 +RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::MANIPULATIVE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb#39 +RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of dot-separated locale keys instead of specifying the `:scope` option +# with an array or a single symbol in `I18n` translation methods. +# Dot-separated notation is easier to read and trace the hierarchy. +# +# @example +# # bad +# I18n.t :record_invalid, scope: [:activerecord, :errors, :messages] +# I18n.t :title, scope: :invitation +# +# # good +# I18n.t 'activerecord.errors.messages.record_invalid' +# I18n.t :record_invalid, scope: 'activerecord.errors.messages' +# +# source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#19 +class RuboCop::Cop::Rails::DotSeparatedKeys < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#32 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#26 + def translate_with_scope?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#55 + def new_key(key_node, scope_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#59 + def scopes(scope_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#51 + def should_convert_scope?(scope_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#23 +RuboCop::Cop::Rails::DotSeparatedKeys::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/dot_separated_keys.rb#24 +RuboCop::Cop::Rails::DotSeparatedKeys::TRANSLATE_METHODS = T.let(T.unsafe(nil), Array) + +# Looks for associations that have been defined multiple times in the same file. +# +# When an association is defined multiple times on a model, Active Record overrides the +# previously defined association with the new one. Because of this, this cop's autocorrection +# simply keeps the last of any duplicates and discards the rest. +# +# @example +# +# # bad +# belongs_to :foo +# belongs_to :bar +# has_one :foo +# +# # good +# belongs_to :bar +# has_one :foo +# +# # bad +# has_many :foo, class_name: 'Foo' +# has_many :bar, class_name: 'Foo' +# has_one :baz +# +# # good +# has_many :bar, class_name: 'Foo' +# has_one :foo +# +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#32 +class RuboCop::Cop::Rails::DuplicateAssociation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ClassSendNodeHelper + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#41 + def association(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#45 + def class_name(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#49 + def on_class(class_node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#75 + def association_nodes(class_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#81 + def duplicated_association_name_nodes(association_nodes); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#89 + def duplicated_class_name_nodes(association_nodes); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#105 + def leave_duplicated_association(grouped_associations); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#65 + def register_offense(name, nodes, message_template); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#38 +RuboCop::Cop::Rails::DuplicateAssociation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_association.rb#39 +RuboCop::Cop::Rails::DuplicateAssociation::MSG_CLASS_NAME = T.let(T.unsafe(nil), String) + +# Checks for multiple scopes in a model that have the same `where` clause. This +# often means you copy/pasted a scope, updated the name, and forgot to change the condition. +# +# @example +# +# # bad +# scope :visible, -> { where(visible: true) } +# scope :hidden, -> { where(visible: true) } +# +# # good +# scope :visible, -> { where(visible: true) } +# scope :hidden, -> { where(visible: false) } +# +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_scope.rb#19 +class RuboCop::Cop::Rails::DuplicateScope < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ClassSendNodeHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_scope.rb#28 + def on_class(class_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_scope.rb#24 + def scope(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/duplicate_scope.rb#36 + def offenses(class_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/duplicate_scope.rb#22 +RuboCop::Cop::Rails::DuplicateScope::MSG = T.let(T.unsafe(nil), String) + +# Checks if a duration is added to or subtracted from `Time.current`. +# +# @example +# # bad +# Time.current - 1.minute +# Time.current + 2.days +# +# # good - using relative would make it harder to express and read +# Date.yesterday + 3.days +# created_at - 1.minute +# 3.days - 1.hour +# +# # good +# 1.minute.ago +# 2.days.from_now +# +# source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#21 +class RuboCop::Cop::Rails::DurationArithmetic < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # Match a literal Duration + # + # @example source that matches + # 1.hour + # @example source that matches + # 9.5.weeks + # @param node [RuboCop::AST::Node] + # @return [Boolean] true if matches + # + # source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#58 + def duration?(param0 = T.unsafe(nil)); end + + # Match duration subtraction or addition with current time. + # + # @example source that matches + # Time.current - 1.hour + # @example source that matches + # ::Time.zone.now + 1.hour + # @param node [RuboCop::AST::Node] + # @yield operator and duration + # + # source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#43 + def duration_arithmetic_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#78 + def on_send(node); end + + # Match Time.current + # + # @example source that matches + # Time.current + # @example source that matches + # ::Time.zone.now + # @param node [RuboCop::AST::Node] + # @return [Boolean] true if matches + # + # source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#71 + def time_current?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#88 + def corrected_source(operator, duration); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#28 +RuboCop::Cop::Rails::DurationArithmetic::DURATIONS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#24 +RuboCop::Cop::Rails::DurationArithmetic::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/duration_arithmetic.rb#26 +RuboCop::Cop::Rails::DurationArithmetic::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks dynamic `find_by_*` methods. +# Use `find_by` instead of dynamic method. +# See. https://rails.rubystyle.guide#find_by +# +# @example +# # bad +# User.find_by_name(name) +# User.find_by_name_and_email(name) +# User.find_by_email!(name) +# +# # good +# User.find_by(name: name) +# User.find_by(name: name, email: email) +# User.find_by!(email: email) +# @example AllowedMethods: ['find_by_sql', 'find_by_token_for'] (default) +# # bad +# User.find_by_query(users_query) +# User.find_by_token_for(:password_reset, token) +# +# # good +# User.find_by_sql(users_sql) +# User.find_by_token_for(:password_reset, token) +# @example AllowedReceivers: ['Gem::Specification', 'page'] (default) +# # bad +# Specification.find_by_name('backend').gem_dir +# page.find_by_id('a_dom_id').click +# +# # good +# Gem::Specification.find_by_name('backend').gem_dir +# page.find_by_id('a_dom_id').click +# +# source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#42 +class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#50 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#50 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#72 + def allowed_invocation?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#76 + def allowed_method?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#82 + def allowed_receiver?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#67 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#100 + def autocorrect_argument_keywords(corrector, node, keywords); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#96 + def autocorrect_method_name(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#106 + def column_keywords(method); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#120 + def dynamic_find_by_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#124 + def dynamic_find_by_arguments_count?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#128 + def dynamic_find_by_arguments_type?(node); end + + # Returns static method name. + # If code isn't wrong, returns nil + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#113 + def static_method_name(method_name); end + + # config option `WhiteList` will be deprecated soon + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#89 + def whitelisted?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#48 +RuboCop::Cop::Rails::DynamicFindBy::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#47 +RuboCop::Cop::Rails::DynamicFindBy::METHOD_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/dynamic_find_by.rb#46 +RuboCop::Cop::Rails::DynamicFindBy::MSG = T.let(T.unsafe(nil), String) + +# Checks that blocks are used for interpolated strings passed to +# `Rails.logger.debug`. +# +# By default, Rails production environments use the `:info` log level. +# At the `:info` log level, `Rails.logger.debug` statements do not result +# in log output. However, Ruby must eagerly evaluate interpolated string +# arguments passed as method arguments. Passing a block to +# `Rails.logger.debug` prevents costly evaluation of interpolated strings +# when no output would be produced anyway. +# +# @example +# # bad +# Rails.logger.debug "The time is #{Time.zone.now}." +# +# # good +# Rails.logger.debug { "The time is #{Time.zone.now}." } +# +# source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#23 +class RuboCop::Cop::Rails::EagerEvaluationLogMessage < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#29 + def interpolated_string_passed_to_debug(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#44 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#61 + def replacement_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#72 + def replacement_source(node, arguments); end + + class << self + # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#40 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#26 +RuboCop::Cop::Rails::EagerEvaluationLogMessage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#27 +RuboCop::Cop::Rails::EagerEvaluationLogMessage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for enums written with array syntax. +# +# When using array syntax, adding an element in a +# position other than the last causes all previous +# definitions to shift. Explicitly specifying the +# value for each key prevents this from happening. +# +# @example +# # bad +# enum :status, [:active, :archived] +# +# # good +# enum :status, { active: 0, archived: 1 } +# +# # bad +# enum status: [:active, :archived] +# +# # good +# enum status: { active: 0, archived: 1 } +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#26 +class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#40 + def array_pair?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#32 + def enum_with_array?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#36 + def enum_with_old_syntax?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#44 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#89 + def build_hash(array); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#69 + def enum_name(key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#65 + def message(key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#78 + def source(elem); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#29 +RuboCop::Cop::Rails::EnumHash::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#30 +RuboCop::Cop::Rails::EnumHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for enums written with keyword arguments syntax. +# +# Defining enums with keyword arguments syntax is deprecated and will be removed in Rails 8.0. +# Positional arguments should be used instead: +# +# @example +# # bad +# enum status: { active: 0, archived: 1 }, _prefix: true +# +# # good +# enum :status, { active: 0, archived: 1 }, prefix: true +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#18 +class RuboCop::Cop::Rails::EnumSyntax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#34 + def enum?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#38 + def enum_with_options?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#42 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#49 + def check_and_correct_keyword_args(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#59 + def check_enum_options(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#71 + def correct_keyword_args(node, key, values, options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#112 + def correct_options(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#97 + def enum_name(elem); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#88 + def enum_name_value(key); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#82 + def multiple_enum_definitions?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#108 + def option_key?(pair); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#26 +RuboCop::Cop::Rails::EnumSyntax::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#27 +RuboCop::Cop::Rails::EnumSyntax::MSG_OPTIONS = T.let(T.unsafe(nil), String) + +# From https://github.com/rails/rails/blob/v7.2.1/activerecord/lib/active_record/enum.rb#L231 +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#31 +RuboCop::Cop::Rails::EnumSyntax::OPTION_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#28 +RuboCop::Cop::Rails::EnumSyntax::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#32 +RuboCop::Cop::Rails::EnumSyntax::UNDERSCORED_OPTION_NAMES = T.let(T.unsafe(nil), Array) + +# Looks for duplicate values in enum declarations. +# +# @example +# # bad +# enum :status, { active: 0, archived: 0 } +# +# # good +# enum :status, { active: 0, archived: 1 } +# +# # bad +# enum :status, [:active, :archived, :active] +# +# # good +# enum :status, [:active, :archived] +# +# # bad +# enum status: { active: 0, archived: 0 } +# +# # good +# enum status: { active: 0, archived: 1 } +# +# # bad +# enum status: [:active, :archived, :active] +# +# # good +# enum status: [:active, :archived] +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#32 +class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#38 + def enum?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#46 + def enum_values(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#42 + def enum_with_old_syntax?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#50 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#70 + def enum_name(key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#79 + def message(key, item); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#35 +RuboCop::Cop::Rails::EnumUniqueness::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#36 +RuboCop::Cop::Rails::EnumUniqueness::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usage of `Rails.env.development? || Rails.env.test?` which +# can be replaced with `Rails.env.local?`, introduced in Rails 7.1. +# +# @example +# +# # bad +# Rails.env.development? || Rails.env.test? +# +# # good +# Rails.env.local? +# +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#17 +class RuboCop::Cop::Rails::EnvLocal < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#34 + def on_or(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#27 + def rails_env_local_candidate?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#22 +RuboCop::Cop::Rails::EnvLocal::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/env_local.rb#21 +RuboCop::Cop::Rails::EnvLocal::MSG = T.let(T.unsafe(nil), String) + +# Checks that Rails.env is compared using `.production?`-like +# methods instead of equality against a string or symbol. +# +# @example +# # bad +# Rails.env == 'production' +# +# # bad, always returns false +# Rails.env == :test +# +# # good +# Rails.env.production? +# +# source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#18 +class RuboCop::Cop::Rails::EnvironmentComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#27 + def comparing_str_env_with_rails_env_on_lhs?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#35 + def comparing_str_env_with_rails_env_on_rhs?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#43 + def comparing_sym_env_with_rails_env_on_lhs?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#51 + def comparing_sym_env_with_rails_env_on_rhs?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#59 + def content(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#63 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#84 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#90 + def build_predicate_method(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#102 + def build_predicate_method_for_rails_env_on_lhs(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#108 + def build_predicate_method_for_rails_env_on_rhs(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#98 + def rails_env_on_lhs?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#21 +RuboCop::Cop::Rails::EnvironmentComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#25 +RuboCop::Cop::Rails::EnvironmentComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/environment_comparison.rb#23 +RuboCop::Cop::Rails::EnvironmentComparison::SYM_MSG = T.let(T.unsafe(nil), String) + +# Looks for direct access to environment variables through the +# `ENV` variable within the application code. This can lead to runtime +# errors due to misconfiguration that could have been discovered at boot +# time if the environment variables were loaded as part of initialization +# and copied into the application's configuration or secrets. The cop can +# be configured to allow either reads or writes if required. +# +# @example +# # good +# Rails.application.config.foo +# Rails.application.config.x.foo.bar +# Rails.application.secrets.foo +# Rails.application.config.foo = "bar" +# @example AllowReads: false (default) +# # bad +# ENV["FOO"] +# ENV.fetch("FOO") +# @example AllowReads: true +# # good +# ENV["FOO"] +# ENV.fetch("FOO") +# @example AllowWrites: false (default) +# # bad +# ENV["FOO"] = "bar" +# @example AllowWrites: true +# # good +# ENV["FOO"] = "bar" +# +# source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#37 +class RuboCop::Cop::Rails::EnvironmentVariableAccess < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#46 + def env_read?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#50 + def env_write?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#41 + def on_const(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#57 + def allow_reads?; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#61 + def allow_writes?; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#38 +RuboCop::Cop::Rails::EnvironmentVariableAccess::READ_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/environment_variable_access.rb#39 +RuboCop::Cop::Rails::EnvironmentVariableAccess::WRITE_MSG = T.let(T.unsafe(nil), String) + +# Enforces that `exit` calls are not used within a rails app. +# Valid options are instead to raise an error, break, return, or some +# other form of stopping execution of current request. +# +# There are two obvious cases where `exit` is particularly harmful: +# +# * Usage in library code for your application. Even though Rails will +# rescue from a `SystemExit` and continue on, unit testing that library +# code will result in specs exiting (potentially silently if `exit(0)` +# is used.) +# * Usage in application code outside of the web process could result in +# the program exiting, which could result in the code failing to run and +# do its job. +# +# @example +# # bad +# exit(0) +# +# # good +# raise 'a bad error has happened' +# +# source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#26 +class RuboCop::Cop::Rails::Exit < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#33 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#39 + def offending_node?(node); end + + # More than 1 argument likely means it is a different + # `exit` implementation than the one we are preventing. + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#45 + def right_argument_count?(arg_nodes); end + + # Only register if exit is being called explicitly on `Kernel`, + # `Process`, or if receiver node is nil for plain `exit` calls. + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#51 + def right_receiver?(receiver_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#31 +RuboCop::Cop::Rails::Exit::EXPLICIT_RECEIVERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#29 +RuboCop::Cop::Rails::Exit::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/exit.rb#30 +RuboCop::Cop::Rails::Exit::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for expanded date range. It only compatible `..` range is targeted. +# Incompatible `...` range is ignored. +# +# @example +# # bad +# date.beginning_of_day..date.end_of_day +# date.beginning_of_week..date.end_of_week +# date.beginning_of_month..date.end_of_month +# date.beginning_of_quarter..date.end_of_quarter +# date.beginning_of_year..date.end_of_year +# +# # good +# date.all_day +# date.all_week +# date.all_month +# date.all_quarter +# date.all_year +# +# source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#24 +class RuboCop::Cop::Rails::ExpandedDateRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#48 + def on_irange(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#67 + def allow?(begin_node, end_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#88 + def any_arguments?(begin_node, end_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#84 + def preferred_method(begin_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#74 + def receiver_source(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#92 + def register_offense(node, preferred_method); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#80 + def same_argument?(begin_node, end_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#40 +RuboCop::Cop::Rails::ExpandedDateRange::MAPPED_DATE_RANGE_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#28 +RuboCop::Cop::Rails::ExpandedDateRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/expanded_date_range.rb#32 +RuboCop::Cop::Rails::ExpandedDateRange::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# Identifies usages of file path joining process to use `Rails.root.join` clause. +# It is used to add uniformity when joining paths. +# +# @example EnforcedStyle: slashes (default) +# # bad +# Rails.root.join('app', 'models', 'goober') +# +# # good +# Rails.root.join('app/models/goober') +# +# # bad +# File.join(Rails.root, 'app/models/goober') +# "#{Rails.root}/app/models/goober" +# +# # good +# Rails.root.join('app/models/goober').to_s +# @example EnforcedStyle: arguments +# # bad +# Rails.root.join('app/models/goober') +# +# # good +# Rails.root.join('app', 'models', 'goober') +# +# # bad +# File.join(Rails.root, 'app/models/goober') +# "#{Rails.root}/app/models/goober" +# +# # good +# Rails.root.join('app', 'models', 'goober').to_s +# +# source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#37 +class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#47 + def file_join_nodes?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#59 + def on_dstr(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#67 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#55 + def rails_root_join_nodes?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#51 + def rails_root_nodes?(param0); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#223 + def append_argument(corrector, node, argument_source); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#164 + def autocorrect_extension_after_rails_root_join_in_dstr(corrector, node, rails_root_index, extension_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#172 + def autocorrect_file_join(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#204 + def autocorrect_rails_root_join_with_slash_separated_path(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#189 + def autocorrect_rails_root_join_with_string_arguments(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#153 + def autocorrect_slash_after_rails_root_in_dstr(corrector, node, rails_root_index); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#140 + def build_message(require_to_s); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#85 + def check_for_extension_after_rails_root_join_in_dstr(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#95 + def check_for_file_join_with_rails_root(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#116 + def check_for_rails_root_join_with_slash_separated_path(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#104 + def check_for_rails_root_join_with_string_arguments(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#75 + def check_for_slash_after_rails_root_in_dstr(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#147 + def dstr_separated_by_colon?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#235 + def extension_node?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#231 + def extract_rails_root_join_argument_source(node, rails_root_index); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#219 + def find_rails_root_index(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#215 + def inner_range_of(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#131 + def register_offense(node, require_to_s:, &block); end + + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#227 + def replace_with_rails_root_join(corrector, node, argument_source); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#127 + def string_with_slash?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#44 +RuboCop::Cop::Rails::FilePath::MSG_ARGUMENTS = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#43 +RuboCop::Cop::Rails::FilePath::MSG_SLASHES = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/file_path.rb#45 +RuboCop::Cop::Rails::FilePath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `where.take` and change them to use `find_by` instead. +# +# And `where(...).first` can return different results from `find_by`. +# (They order records differently, so the "first" record can be different.) +# +# If you also want to detect `where.first`, you can set `IgnoreWhereFirst` to false. +# +# @example +# # bad +# User.where(name: 'Bruce').take +# +# # good +# User.find_by(name: 'Bruce') +# @example IgnoreWhereFirst: true (default) +# # good +# User.where(name: 'Bruce').first +# @example IgnoreWhereFirst: false +# # bad +# User.where(name: 'Bruce').first +# +# source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#27 +class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#34 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#34 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#58 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#68 + def ignore_where_first?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#54 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#48 + def where_method?(receiver); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#31 +RuboCop::Cop::Rails::FindBy::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/find_by.rb#32 +RuboCop::Cop::Rails::FindBy::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces that `ActiveRecord#find` is used instead of +# `where.take!`, `find_by!`, and `find_by_id!` to retrieve a single record +# by primary key when you expect it to be found. +# +# @example +# # bad +# User.where(id: id).take! +# User.find_by_id!(id) +# User.find_by!(id: id) +# +# # good +# User.find(id) +# +# source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#19 +class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#33 + def find_by?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#40 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#40 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#26 + def where_take?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#74 + def build_good_method(id_value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#70 + def find_by_offense_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#57 + def register_offense(range, id_value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#66 + def where_take_offense_range(node, where); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#23 +RuboCop::Cop::Rails::FindById::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#24 +RuboCop::Cop::Rails::FindById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `all.each` and change them to use `all.find_each` instead. +# +# @example +# # bad +# User.all.each +# +# # good +# User.all.find_each +# @example AllowedMethods: ['order'] +# # good +# User.order(:foo).each +# @example AllowedPattern: ['order'] +# # good +# User.order(:foo).each +# +# source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#27 +class RuboCop::Cop::Rails::FindEach < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#41 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#67 + def active_model_error?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#63 + def active_model_error_where?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#55 + def ignored?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#33 +RuboCop::Cop::Rails::FindEach::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#34 +RuboCop::Cop::Rails::FindEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/find_each.rb#36 +RuboCop::Cop::Rails::FindEach::SCOPE_METHODS = T.let(T.unsafe(nil), Array) + +# Identifies usages of `travel_to` with an argument of the current time and +# change them to use `freeze_time` instead. +# +# @example +# # bad +# travel_to(Time.now) +# travel_to(Time.new) +# travel_to(DateTime.now) +# travel_to(Time.current) +# travel_to(Time.zone.now) +# travel_to(Time.now.in_time_zone) +# travel_to(Time.current.to_time) +# +# # good +# freeze_time +# +# source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#27 +class RuboCop::Cop::Rails::FreezeTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#48 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#39 + def time_now?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#44 + def zoned_time_now?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#62 + def current_time?(node, method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#68 + def current_time_with_convert?(node, method_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#35 +RuboCop::Cop::Rails::FreezeTime::CONVERT_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#33 +RuboCop::Cop::Rails::FreezeTime::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#34 +RuboCop::Cop::Rails::FreezeTime::NOW_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/freeze_time.rb#36 +RuboCop::Cop::Rails::FreezeTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of the has_and_belongs_to_many macro. +# +# @example +# # bad +# # has_and_belongs_to_many :ingredients +# +# # good +# # has_many :ingredients, through: :recipe_ingredients +# +# source://rubocop-rails//lib/rubocop/cop/rails/has_and_belongs_to_many.rb#14 +class RuboCop::Cop::Rails::HasAndBelongsToMany < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/has_and_belongs_to_many.rb#18 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/has_and_belongs_to_many.rb#15 +RuboCop::Cop::Rails::HasAndBelongsToMany::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/has_and_belongs_to_many.rb#16 +RuboCop::Cop::Rails::HasAndBelongsToMany::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for `has_many` or `has_one` associations that don't +# specify a `:dependent` option. +# +# It doesn't register an offense if `:through` or `dependent: nil` +# is specified, or if the model is read-only. +# +# @example +# # bad +# class User < ActiveRecord::Base +# has_many :comments +# has_one :avatar +# end +# +# # good +# class User < ActiveRecord::Base +# has_many :comments, dependent: :restrict_with_exception +# has_one :avatar, dependent: :destroy +# has_many :articles, dependent: nil +# has_many :patients, through: :appointments +# end +# +# class User < ActiveRecord::Base +# has_many :comments +# has_one :avatar +# +# def readonly? +# true +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#35 +class RuboCop::Cop::Rails::HasManyOrHasOneDependent < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#39 + def active_resource_class?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#66 + def association_extension_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#47 + def association_with_options?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#43 + def association_without_options?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#51 + def dependent_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#78 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#55 + def present_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#72 + def readonly?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#59 + def with_options_block(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#135 + def active_resource?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#102 + def contain_valid_options_in_with_options_block?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#127 + def extract_option_if_kwsplat(options); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#88 + def readonly_model?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#114 + def valid_options?(options); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#94 + def valid_options_in_with_options_block?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#36 +RuboCop::Cop::Rails::HasManyOrHasOneDependent::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb#37 +RuboCop::Cop::Rails::HasManyOrHasOneDependent::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of the helper methods which reference +# instance variables. +# +# Relying on instance variables makes it difficult to reuse helper +# methods. +# +# If it seems awkward to explicitly pass in each dependent +# variable, consider moving the behavior elsewhere, for +# example to a model, decorator or presenter. +# +# Provided that a class inherits `ActionView::Helpers::FormBuilder`, +# an offense will not be registered. +# +# @example +# # bad +# def welcome_message +# "Hello #{@user.name}" +# end +# +# # good +# def welcome_message(user) +# "Hello #{user.name}" +# end +# +# # good +# class MyFormBuilder < ActionView::Helpers::FormBuilder +# @template.do_something +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#34 +class RuboCop::Cop::Rails::HelperInstanceVariable < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#37 + def form_builder_class?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#43 + def on_ivar(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#49 + def on_ivasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#57 + def inherit_form_builder?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/helper_instance_variable.rb#35 +RuboCop::Cop::Rails::HelperInstanceVariable::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of http methods like `get`, `post`, +# `put`, `patch` without the usage of keyword arguments in your tests and +# change them to use keyword args. This cop only applies to Rails >= 5. +# If you are running Rails < 5 you should disable the +# Rails/HttpPositionalArguments cop or set your TargetRailsVersion in your +# .rubocop.yml file to 4.2. +# +# NOTE: It does not detect any cases where `include Rack::Test::Methods` is used +# which makes the http methods incompatible behavior. +# +# @example +# # bad +# get :new, { user_id: 1} +# +# # good +# get :new, params: { user_id: 1 } +# get :new, **options +# +# source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#23 +class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#35 + def http_request?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#43 + def include_rack_test_methods?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#39 + def kwsplat_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#50 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#109 + def convert_hash_data(data, type); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#123 + def correction(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#136 + def correction_template(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#99 + def format_arg?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#103 + def highlight_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#76 + def in_routing_block?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#86 + def needs_conversion?(data); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#95 + def special_keyword_arg?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#80 + def use_rack_test_methods?; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#29 +RuboCop::Cop::Rails::HttpPositionalArguments::KEYWORD_ARGS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#28 +RuboCop::Cop::Rails::HttpPositionalArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#31 +RuboCop::Cop::Rails::HttpPositionalArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_positional_arguments.rb#30 +RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(nil), Array) + +# Enforces use of symbolic or numeric value to define HTTP status. +# +# @example EnforcedStyle: symbolic (default) +# # bad +# render :foo, status: 200 +# render :foo, status: '200' +# render json: { foo: 'bar' }, status: 200 +# render plain: 'foo/bar', status: 304 +# redirect_to root_url, status: 301 +# head 200 +# assert_response 200 +# assert_redirected_to '/some/path', status: 301 +# +# # good +# render :foo, status: :ok +# render json: { foo: 'bar' }, status: :ok +# render plain: 'foo/bar', status: :not_modified +# redirect_to root_url, status: :moved_permanently +# head :ok +# assert_response :ok +# assert_redirected_to '/some/path', status: :moved_permanently +# @example EnforcedStyle: numeric +# # bad +# render :foo, status: :ok +# render json: { foo: 'bar' }, status: :not_found +# render plain: 'foo/bar', status: :not_modified +# redirect_to root_url, status: :moved_permanently +# head :ok +# assert_response :ok +# assert_redirected_to '/some/path', status: :moved_permanently +# +# # good +# render :foo, status: 200 +# render json: { foo: 'bar' }, status: 404 +# render plain: 'foo/bar', status: 304 +# redirect_to root_url, status: 301 +# head 200 +# assert_response 200 +# assert_redirected_to '/some/path', status: 301 +# +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#47 +class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#53 + def http_status(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#67 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#63 + def status_code(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#87 + def checker_class; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#135 +class RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker + # @return [NumericStyleChecker] a new instance of NumericStyleChecker + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#142 + def initialize(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#150 + def message; end + + # Returns the value of attribute node. + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#140 + def node; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#146 + def offensive?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#154 + def preferred_style; end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#160 + def number; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#168 + def permitted_symbol?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#164 + def symbol; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#137 +RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#136 +RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#138 +RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::PERMITTED_STATUS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#51 +RuboCop::Cop::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#97 +class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker + # @return [SymbolicStyleChecker] a new instance of SymbolicStyleChecker + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#103 + def initialize(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#111 + def message; end + + # Returns the value of attribute node. + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#101 + def node; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#107 + def offensive?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#115 + def preferred_style; end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#129 + def custom_http_status_code?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#125 + def number; end + + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#121 + def symbol; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#99 +RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#98 +RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where I18n "lazy" lookup can be used. +# +# This cop has two different enforcement modes. When the EnforcedStyle +# is `lazy` (the default), explicit lookups are added as offenses. +# +# When the EnforcedStyle is `explicit` then lazy lookups are added as +# offenses. +# +# @example EnforcedStyle: lazy (default) +# # en.yml +# # en: +# # books: +# # create: +# # success: Book created! +# +# # bad +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('books.create.success') +# end +# end +# +# # good +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('.success') +# end +# end +# @example EnforcedStyle: explicit +# # bad +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('.success') +# end +# end +# +# # good +# class BooksController < ApplicationController +# def create +# # ... +# redirect_to books_url, notice: t('books.create.success') +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#54 +class RuboCop::Cop::Rails::I18nLazyLookup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#67 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#63 + def translate_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#109 + def controller_and_action(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#127 + def controller_path(controller); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#119 + def get_scoped_key(key_node, controller, action); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#96 + def handle_explicit_style(node, key_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#80 + def handle_lazy_style(node, key_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#140 + def message(_range); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#59 +RuboCop::Cop::Rails::I18nLazyLookup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_lazy_lookup.rb#61 +RuboCop::Cop::Rails::I18nLazyLookup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `I18n.locale=` method. +# +# The `locale` attribute persists for the rest of the Ruby runtime, potentially causing +# unexpected behavior at a later time. +# Using `I18n.with_locale` ensures the code passed in the block is the only place `I18n.locale` is affected. +# It eliminates the possibility of a `locale` sticking around longer than intended. +# +# @example +# # bad +# I18n.locale = :fr +# +# # good +# I18n.with_locale(:fr) do +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_assignment.rb#21 +class RuboCop::Cop::Rails::I18nLocaleAssignment < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_assignment.rb#25 + def i18n_locale_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_assignment.rb#29 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_assignment.rb#22 +RuboCop::Cop::Rails::I18nLocaleAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_assignment.rb#23 +RuboCop::Cop::Rails::I18nLocaleAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces use of I18n and locale files instead of locale specific strings. +# +# @example +# # bad +# class User < ApplicationRecord +# validates :email, presence: { message: "must be present" } +# end +# +# # good +# # config/locales/en.yml +# # en: +# # activerecord: +# # errors: +# # models: +# # user: +# # blank: "must be present" +# +# class User < ApplicationRecord +# validates :email, presence: true +# end +# +# # bad +# class PostsController < ApplicationController +# def create +# # ... +# redirect_to root_path, notice: "Post created!" +# end +# end +# +# # good +# # config/locales/en.yml +# # en: +# # posts: +# # create: +# # success: "Post created!" +# +# class PostsController < ApplicationController +# def create +# # ... +# redirect_to root_path, notice: t(".success") +# end +# end +# +# # bad +# class UserMailer < ApplicationMailer +# def welcome(user) +# mail(to: user.email, subject: "Welcome to My Awesome Site") +# end +# end +# +# # good +# # config/locales/en.yml +# # en: +# # user_mailer: +# # welcome: +# # subject: "Welcome to My Awesome Site" +# +# class UserMailer < ApplicationMailer +# def welcome(user) +# mail(to: user.email) +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#69 +class RuboCop::Cop::Rails::I18nLocaleTexts < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#82 + def flash_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#90 + def mail_subject(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#94 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#78 + def redirect_to_flash(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#74 + def validation_message(param0); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#70 +RuboCop::Cop::Rails::I18nLocaleTexts::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/i18n_locale_texts.rb#72 +RuboCop::Cop::Rails::I18nLocaleTexts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for assignments of `ignored_columns` that may override previous +# assignments. +# +# Overwriting previous assignments is usually a mistake, since it will +# un-ignore the first set of columns. Since duplicate column names is not +# a problem, it is better to simply append to the list. +# +# @example +# +# # bad +# class User < ActiveRecord::Base +# self.ignored_columns = [:one] +# end +# +# # bad +# class User < ActiveRecord::Base +# self.ignored_columns = [:one, :two] +# end +# +# # good +# class User < ActiveRecord::Base +# self.ignored_columns += [:one, :two] +# end +# +# # good +# class User < ActiveRecord::Base +# self.ignored_columns += [:one] +# self.ignored_columns += [:two] +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_columns_assignment.rb#36 +class RuboCop::Cop::Rails::IgnoredColumnsAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_columns_assignment.rb#42 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_columns_assignment.rb#39 +RuboCop::Cop::Rails::IgnoredColumnsAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_columns_assignment.rb#40 +RuboCop::Cop::Rails::IgnoredColumnsAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `if` and `only` (or `except`) are not used together +# as options of `skip_*` action filter. +# +# The `if` option will be ignored when `if` and `only` are used together. +# Similarly, the `except` option will be ignored when `if` and `except` +# are used together. +# +# @example +# # bad +# class MyPageController < ApplicationController +# skip_before_action :login_required, +# only: :show, if: :trusted_origin? +# end +# +# # good +# class MyPageController < ApplicationController +# skip_before_action :login_required, +# if: -> { trusted_origin? && action_name == "show" } +# end +# @example +# # bad +# class MyPageController < ApplicationController +# skip_before_action :login_required, +# except: :admin, if: :trusted_origin? +# end +# +# # good +# class MyPageController < ApplicationController +# skip_before_action :login_required, +# if: -> { trusted_origin? && action_name != "admin" } +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#38 +class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#51 + def filter_options(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#59 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#89 + def if_and_except?(options); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#85 + def if_and_only?(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#79 + def options_hash(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#93 + def remove_node_with_left_space_and_comma(corrector, node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#49 +RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::FILTERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#43 +RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb#47 +RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `each_with_object({}) { ... }`, +# `map { ... }.to_h`, and `Hash[map { ... }]` that are transforming +# an enumerable into a hash where the values are the original elements. +# Rails provides the `index_by` method for this purpose. +# +# @example +# # bad +# [1, 2, 3].each_with_object({}) { |el, h| h[foo(el)] = el } +# [1, 2, 3].to_h { |el| [foo(el), el] } +# [1, 2, 3].map { |el| [foo(el), el] }.to_h +# Hash[[1, 2, 3].collect { |el| [foo(el), el] }] +# +# # good +# [1, 2, 3].index_by { |el| foo(el) } +# +# source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#20 +class RuboCop::Cop::Rails::IndexBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IndexMethod + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#24 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#47 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#38 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#31 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/index_by.rb#59 + def new_method_name; end +end + +# Looks for uses of `each_with_object({}) { ... }`, +# `map { ... }.to_h`, and `Hash[map { ... }]` that are transforming +# an enumerable into a hash where the keys are the original elements. +# Rails provides the `index_with` method for this purpose. +# +# @example +# # bad +# [1, 2, 3].each_with_object({}) { |el, h| h[el] = foo(el) } +# [1, 2, 3].to_h { |el| [el, foo(el)] } +# [1, 2, 3].map { |el| [el, foo(el)] }.to_h +# Hash[[1, 2, 3].collect { |el| [el, foo(el)] }] +# +# # good +# [1, 2, 3].index_with { |el| foo(el) } +# +# source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#20 +class RuboCop::Cop::Rails::IndexWith < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IndexMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#27 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#50 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#41 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#34 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/index_with.rb#62 + def new_method_name; end +end + +# Checks that Active Support's `inquiry` method is not used. +# +# @example +# # bad - String#inquiry +# ruby = 'two'.inquiry +# ruby.two? +# +# # good +# ruby = 'two' +# ruby == 'two' +# +# # bad - Array#inquiry +# pets = %w(cat dog).inquiry +# pets.gopher? +# +# # good +# pets = %w(cat dog) +# pets.include? 'cat' +# +# source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#25 +class RuboCop::Cop::Rails::Inquiry < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#29 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#29 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#26 +RuboCop::Cop::Rails::Inquiry::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#27 +RuboCop::Cop::Rails::Inquiry::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for has_(one|many) and belongs_to associations where +# Active Record can't automatically determine the inverse association +# because of a scope or the options used. Using the blog with order scope +# example below, traversing the a Blog's association in both directions +# with `blog.posts.first.blog` would cause the `blog` to be loaded from +# the database twice. +# +# `:inverse_of` must be manually specified for Active Record to use the +# associated object in memory, or set to `false` to opt-out. Note that +# setting `nil` does not stop Active Record from trying to determine the +# inverse automatically, and is not considered a valid value for this. +# +# @example +# # good +# class Blog < ApplicationRecord +# has_many :posts +# end +# +# class Post < ApplicationRecord +# belongs_to :blog +# end +# @example +# # bad +# class Blog < ApplicationRecord +# has_many :posts, -> { order(published_at: :desc) } +# end +# +# class Post < ApplicationRecord +# belongs_to :blog +# end +# +# # good +# class Blog < ApplicationRecord +# has_many(:posts, +# -> { order(published_at: :desc) }, +# inverse_of: :blog) +# end +# +# class Post < ApplicationRecord +# belongs_to :blog +# end +# +# # good +# class Blog < ApplicationRecord +# with_options inverse_of: :blog do +# has_many :posts, -> { order(published_at: :desc) } +# end +# end +# +# class Post < ApplicationRecord +# belongs_to :blog +# end +# +# # good +# # When you don't want to use the inverse association. +# class Blog < ApplicationRecord +# has_many(:posts, +# -> { order(published_at: :desc) }, +# inverse_of: false) +# end +# @example +# # bad +# class Picture < ApplicationRecord +# belongs_to :imageable, polymorphic: true +# end +# +# class Employee < ApplicationRecord +# has_many :pictures, as: :imageable +# end +# +# class Product < ApplicationRecord +# has_many :pictures, as: :imageable +# end +# +# # good +# class Picture < ApplicationRecord +# belongs_to :imageable, polymorphic: true +# end +# +# class Employee < ApplicationRecord +# has_many :pictures, as: :imageable, inverse_of: :imageable +# end +# +# class Product < ApplicationRecord +# has_many :pictures, as: :imageable, inverse_of: :imageable +# end +# @example +# # bad +# # However, RuboCop can not detect this pattern... +# class Physician < ApplicationRecord +# has_many :appointments +# has_many :patients, through: :appointments +# end +# +# class Appointment < ApplicationRecord +# belongs_to :physician +# belongs_to :patient +# end +# +# class Patient < ApplicationRecord +# has_many :appointments +# has_many :physicians, through: :appointments +# end +# +# # good +# class Physician < ApplicationRecord +# has_many :appointments +# has_many :patients, through: :appointments +# end +# +# class Appointment < ApplicationRecord +# belongs_to :physician, inverse_of: :appointments +# belongs_to :patient, inverse_of: :appointments +# end +# +# class Patient < ApplicationRecord +# has_many :appointments +# has_many :physicians, through: :appointments +# end +# @example IgnoreScopes: false (default) +# # bad +# class Blog < ApplicationRecord +# has_many :posts, -> { order(published_at: :desc) } +# end +# @example IgnoreScopes: true +# # good +# class Blog < ApplicationRecord +# has_many :posts, -> { order(published_at: :desc) } +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#140 +class RuboCop::Cop::Rails::InverseOf < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#165 + def as_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#145 + def association_recv_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#153 + def conditions_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#169 + def foreign_key_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#177 + def inverse_of_nil_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#173 + def inverse_of_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#181 + def on_send(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#219 + def options_contain_inverse_of?(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#149 + def options_from_argument(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#213 + def options_ignoring_inverse_of?(options); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#203 + def options_requiring_inverse_of?(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#161 + def polymorphic_option?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#230 + def same_context_in_with_options?(arg, recv); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#199 + def scope?(arguments); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#157 + def through_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#223 + def with_options_arguments(recv, node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#246 + def ignore_scopes?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#238 + def message(options); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#142 +RuboCop::Cop::Rails::InverseOf::NIL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#143 +RuboCop::Cop::Rails::InverseOf::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/inverse_of.rb#141 +RuboCop::Cop::Rails::InverseOf::SPECIFY_MSG = T.let(T.unsafe(nil), String) + +# Checks that methods specified in the filter's `only` or +# `except` options are defined within the same class or module. +# +# @example +# # bad +# class LoginController < ApplicationController +# before_action :require_login, only: %i[index settings logout] +# +# def index +# end +# end +# +# # good +# class LoginController < ApplicationController +# before_action :require_login, only: %i[index settings logout] +# +# def index +# end +# +# def settings +# end +# +# def logout +# end +# end +# @example +# # bad +# module FooMixin +# extend ActiveSupport::Concern +# +# included do +# before_action proc { authenticate }, only: :foo +# end +# end +# +# # good +# module FooMixin +# extend ActiveSupport::Concern +# +# included do +# before_action proc { authenticate }, only: :foo +# end +# +# def foo +# # something +# end +# end +# @example +# class ContentController < ApplicationController +# def update +# @content.update(content_attributes) +# end +# end +# +# class ArticlesController < ContentController +# before_action :load_article, only: [:update] +# +# # the cop requires this method, but it relies on behavior defined +# # in the superclass, so needs to invoke `super` +# def update +# super +# end +# +# private +# +# def load_article +# @content = Article.find(params[:article_id]) +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#86 +class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#118 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#107 + def only_or_except_filter_methods(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#154 + def alias_methods(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#145 + def aliased_action_methods(node, defined_methods); end + + # @param node [RuboCop::AST::Node] + # @return [Array] + # + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#171 + def array_values(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#138 + def defined_action_methods(block); end + + # @param methods [Array] + # @param parent [RuboCop::AST::Node] + # @return [String] + # + # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#194 + def message(methods, parent); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#105 +RuboCop::Cop::Rails::LexicallyScopedActionFilter::FILTERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#87 +RuboCop::Cop::Rails::LexicallyScopedActionFilter::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#89 +RuboCop::Cop::Rails::LexicallyScopedActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to `link_to`, `link_to_if`, and `link_to_unless` methods that contain a +# `target: '_blank'` but no `rel: 'noopener'`. This can be a security +# risk as the loaded page will have control over the previous page +# and could change its location for phishing purposes. +# +# The option `rel: 'noreferrer'` also blocks this behavior +# and removes the http-referrer header. +# +# @example +# # bad +# link_to 'Click here', url, target: '_blank' +# +# # good +# link_to 'Click here', url, target: '_blank', rel: 'noopener' +# +# # good +# link_to 'Click here', url, target: '_blank', rel: 'noreferrer' +# +# source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#23 +class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#29 + def blank_target?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#33 + def includes_noopener?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#41 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#37 + def rel_node?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#75 + def add_rel(send_node, offense_node, corrector); end + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#69 + def append_to_rel(rel_node, corrector); end + + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#56 + def autocorrect(corrector, send_node, node, option_nodes); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#88 + def contains_noopener?(value); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#26 +RuboCop::Cop::Rails::LinkToBlank::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/link_to_blank.rb#27 +RuboCop::Cop::Rails::LinkToBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces that mailer names end with `Mailer` suffix. +# +# Without the `Mailer` suffix it isn't immediately apparent what's a mailer +# and which views are related to the mailer. +# +# @example +# # bad +# class User < ActionMailer::Base +# end +# +# class User < ApplicationMailer +# end +# +# # good +# class UserMailer < ActionMailer::Base +# end +# +# class UserMailer < ApplicationMailer +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#30 +class RuboCop::Cop::Rails::MailerName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#42 + def class_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#46 + def class_new_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#35 + def mailer_base_class?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#50 + def on_class(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#58 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#74 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#84 + def mailer_suffix?(mailer_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/mailer_name.rb#33 +RuboCop::Cop::Rails::MailerName::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where defining routes with `match` +# can be replaced with a specific HTTP method. +# +# Don't use `match` to define any routes unless there is a need to map multiple request types +# among [:get, :post, :patch, :put, :delete] to a single action using the `:via` option. +# +# @example +# # bad +# match ':controller/:action/:id' +# match 'photos/:id', to: 'photos#show', via: :get +# +# # good +# get ':controller/:action/:id' +# get 'photos/:id', to: 'photos#show' +# match 'photos/:id', to: 'photos#show', via: [:get, :post] +# match 'photos/:id', to: 'photos#show', via: :all +# +# source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#23 +class RuboCop::Cop::Rails::MatchRoute < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#30 + def match_method_call?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#34 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#63 + def routes_draw?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#71 + def extract_via(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#90 + def http_method?(method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#111 + def http_method_and_options(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#53 + def register_offense(node, http_method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#94 + def replacement(path_node, options_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#86 + def via_pair(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#67 + def within_routes?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#28 +RuboCop::Cop::Rails::MatchRoute::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#26 +RuboCop::Cop::Rails::MatchRoute::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/match_route.rb#27 +RuboCop::Cop::Rails::MatchRoute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Makes sure that each migration file defines a migration class +# whose name matches the file name. +# (e.g. `20220224111111_create_users.rb` should define `CreateUsers` class.) +# +# @example +# # db/migrate/20220224111111_create_users.rb +# +# # bad +# class SellBooks < ActiveRecord::Migration[7.0] +# end +# +# # good +# class CreateUsers < ActiveRecord::Migration[7.0] +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#21 +class RuboCop::Cop::Rails::MigrationClassName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MigrationsHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#27 + def on_class(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#45 + def basename_without_timestamp_and_suffix(filepath); end + + # source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#57 + def camelize(word); end + + # e.g.: from `add_blobs.active_storage` to `add_blobs`. + # + # source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#53 + def remove_gem_suffix(file_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/migration_class_name.rb#25 +RuboCop::Cop::Rails::MigrationClassName::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `collection.exclude?(obj)` +# over `!collection.include?(obj)`. +# +# @example +# # bad +# !array.include?(2) +# !hash.include?(:key) +# +# # good +# array.exclude?(2) +# hash.exclude?(:key) +# +# source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#22 +class RuboCop::Cop::Rails::NegateInclude < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#28 + def negate_include_call?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#32 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#25 +RuboCop::Cop::Rails::NegateInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#26 +RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for add_column calls with a NOT NULL constraint without a default +# value. +# +# This cop only applies when adding a column to an existing table, since +# existing records will not have a value for the new column. New tables +# can freely use NOT NULL columns without defaults, since there are no +# records that could violate the constraint. +# +# If you need to add a NOT NULL column to an existing table, you must add +# it as nullable first, back-fill the data, and then use +# `change_column_null`. Alternatively, you could add the column with a +# default first to have the database automatically backfill existing rows, +# and then use `change_column_default` to remove the default. +# +# `TEXT` cannot have a default value in MySQL. +# The cop will automatically detect an adapter from `development` +# environment in `config/database.yml` or the environment variable +# `DATABASE_URL` when the `Database` option is not set. If the database +# is MySQL, this cop ignores offenses for `TEXT` columns. +# +# @example +# # bad +# add_column :users, :name, :string, null: false +# add_reference :products, :category, null: false +# change_table :users do |t| +# t.string :name, null: false +# end +# +# # good +# add_column :users, :name, :string, null: true +# add_column :users, :name, :string, null: false, default: '' +# change_table :users do |t| +# t.string :name, null: false, default: '' +# end +# add_reference :products, :category +# change_column_null :products, :category_id, false +# +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#42 +class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DatabaseTypeResolvable + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#48 + def add_not_null_column?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#60 + def add_not_null_column_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#64 + def add_not_null_column_via_shortcut_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#52 + def add_not_null_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#68 + def add_not_null_reference_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#56 + def change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#76 + def default_option?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#72 + def null_false?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#85 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#85 + def on_numblock(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#80 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#101 + def check_add_column(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#113 + def check_add_column_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#121 + def check_add_column_via_shortcut_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#107 + def check_add_reference(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#129 + def check_add_reference_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#137 + def check_change_table(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#92 + def check_column(type, pairs); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#150 + def check_pairs(pairs); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#45 +RuboCop::Cop::Rails::NotNullColumn::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#46 +RuboCop::Cop::Rails::NotNullColumn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where ordering by `id` column is used. +# +# Don't use the `id` column for ordering. The sequence of ids is not guaranteed +# to be in any particular order, despite often (incidentally) being chronological. +# Use a timestamp column to order chronologically. As a bonus the intent is clearer. +# +# NOTE: Make sure the changed order column does not introduce performance +# bottlenecks and appropriate database indexes are added. +# +# @example +# # bad +# scope :chronological, -> { order(id: :asc) } +# scope :chronological, -> { order(primary_key => :asc) } +# +# # good +# scope :chronological, -> { order(created_at: :asc) } +# +# source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#23 +class RuboCop::Cop::Rails::OrderById < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#39 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#29 + def order_by_id?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#45 + def offense_range(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#26 +RuboCop::Cop::Rails::OrderById::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/order_by_id.rb#27 +RuboCop::Cop::Rails::OrderById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of output calls like puts and print +# +# @example +# # bad +# puts 'A debug message' +# pp 'A debug message' +# print 'A debug message' +# +# # good +# Rails.logger.debug 'A debug message' +# +# source://rubocop-rails//lib/rubocop/cop/rails/output.rb#20 +class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#32 + def io_output?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#42 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#28 + def output?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#55 + def match_gvar?(sym); end + + # source://rubocop-rails//lib/rubocop/cop/rails/output.rb#59 + def offense_range(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/output.rb#26 +RuboCop::Cop::Rails::Output::ALLOWED_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/output.rb#24 +RuboCop::Cop::Rails::Output::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/output.rb#25 +RuboCop::Cop::Rails::Output::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of output safety calls like `html_safe`, +# `raw`, and `safe_concat`. These methods do not escape content. They +# simply return a SafeBuffer containing the content as is. Instead, +# use `safe_join` to join content and escape it and concat to +# concatenate content and escape it, ensuring its safety. +# +# @example +# user_content = "hi" +# +# # bad +# "

    #{user_content}

    ".html_safe +# # => ActiveSupport::SafeBuffer "

    hi

    " +# +# # good +# content_tag(:p, user_content) +# # => ActiveSupport::SafeBuffer "

    <b>hi</b>

    " +# +# # bad +# out = "" +# out << "
  • #{user_content}
  • " +# out << "
  • #{user_content}
  • " +# out.html_safe +# # => ActiveSupport::SafeBuffer "
  • hi
  • hi
  • " +# +# # good +# out = [] +# out << content_tag(:li, user_content) +# out << content_tag(:li, user_content) +# safe_join(out) +# # => ActiveSupport::SafeBuffer +# # "
  • <b>hi</b>
  • <b>hi</b>
  • " +# +# # bad +# out = "

    trusted content

    ".html_safe +# out.safe_concat(user_content) +# # => ActiveSupport::SafeBuffer "

    trusted_content

    hi" +# +# # good +# out = "

    trusted content

    ".html_safe +# out.concat(user_content) +# # => ActiveSupport::SafeBuffer +# # "

    trusted_content

    <b>hi</b>" +# +# # safe, though maybe not good style +# out = "trusted content" +# result = out.concat(user_content) +# # => String "trusted contenthi" +# # because when rendered in ERB the String will be escaped: +# # <%= result %> +# # => trusted content<b>hi</b> +# +# # bad +# (user_content + " " + content_tag(:span, user_content)).html_safe +# # => ActiveSupport::SafeBuffer "hi hi" +# +# # good +# safe_join([user_content, " ", content_tag(:span, user_content)]) +# # => ActiveSupport::SafeBuffer +# # "<b>hi</b> <b>hi</b>" +# +# source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#65 +class RuboCop::Cop::Rails::OutputSafety < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#69 + def i18n_method?(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#73 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#73 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#90 + def looks_like_rails_html_safe?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#94 + def looks_like_rails_raw?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#98 + def looks_like_rails_safe_concat?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#86 + def non_interpolated_string?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#66 +RuboCop::Cop::Rails::OutputSafety::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/output_safety.rb#67 +RuboCop::Cop::Rails::OutputSafety::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `pick` over `pluck(...).first`. +# +# Using `pluck` followed by `first` creates an intermediate array, which +# `pick` avoids. When called on an Active Record relation, `pick` adds a +# limit to the query so that only one value is fetched from the database. +# +# Note that when `pick` is added to a relation with an existing limit, it +# causes a subquery to be added. In most cases this is undesirable, and +# care should be taken while resolving this violation. +# +# @example +# # bad +# Model.pluck(:a).first +# [{ a: :b, c: :d }].pluck(:a, :b).first +# +# # good +# Model.pick(:a) +# [{ a: :b, c: :d }].pick(:a, :b) +# +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#31 +class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#44 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#44 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#40 + def pick_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#63 + def message(receiver, current); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#35 +RuboCop::Cop::Rails::Pick::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#36 +RuboCop::Cop::Rails::Pick::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `pluck` over `map`. +# +# `pluck` can be used instead of `map` to extract a single key from each +# element in an enumerable. When called on an Active Record relation, it +# results in a more efficient query that only selects the necessary key. +# +# @example +# # bad +# Post.published.map { |post| post[:title] } +# [{ a: :b, c: :d }].collect { |el| el[:a] } +# +# # good +# Post.published.pluck(:title) +# [{ a: :b, c: :d }].pluck(:a) +# +# source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#32 +class RuboCop::Cop::Rails::Pluck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#44 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#44 + def on_numblock(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#40 + def pluck_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#88 + def message(replacement, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#75 + def offense_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#79 + def register_offense(node, key); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#69 + def use_block_argument_in_key?(block_argument, key); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#63 + def use_one_block_argument?(argument); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck.rb#36 +RuboCop::Cop::Rails::Pluck::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `ids` over `pluck(:id)` and `pluck(primary_key)`. +# +# @example +# # bad +# User.pluck(:id) +# user.posts.pluck(:id) +# +# def self.user_ids +# pluck(primary_key) +# end +# +# # good +# User.ids +# user.posts.ids +# +# def self.user_ids +# ids +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#28 +class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ActiveRecordHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#40 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#40 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#36 + def pluck_id_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#54 + def offense_range(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#33 +RuboCop::Cop::Rails::PluckId::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#34 +RuboCop::Cop::Rails::PluckId::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `pluck` is used in `where` query methods +# and can be replaced with `select`. +# +# Since `pluck` is an eager method and hits the database immediately, +# using `select` helps to avoid additional database queries by running as +# a subquery. +# +# This cop has two modes of enforcement. When the `EnforcedStyle` is set +# to `conservative` (the default), only calls to `pluck` on a constant +# (e.g. a model class) within `where` are considered offenses. +# +# @example +# # bad +# Post.where(user_id: User.active.pluck(:id)) +# Post.where(user_id: User.active.ids) +# Post.where.not(user_id: User.active.pluck(:id)) +# +# # good +# Post.where(user_id: User.active.select(:id)) +# Post.where(user_id: active_users.select(:id)) +# Post.where.not(user_id: active_users.select(:id)) +# @example EnforcedStyle: conservative (default) +# # good +# Post.where(user_id: active_users.pluck(:id)) +# @example EnforcedStyle: aggressive +# # bad +# Post.where(user_id: active_users.pluck(:id)) +# +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#50 +class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#59 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#59 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#81 + def root_receiver(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#56 +RuboCop::Cop::Rails::PluckInWhere::MSG_IDS = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#55 +RuboCop::Cop::Rails::PluckInWhere::MSG_SELECT = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#57 +RuboCop::Cop::Rails::PluckInWhere::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for correct grammar when using ActiveSupport's +# core extensions to the numeric classes. +# +# @example +# # bad +# 3.day.ago +# 1.months.ago +# 5.megabyte +# 1.gigabytes +# +# # good +# 3.days.ago +# 1.month.ago +# 5.megabytes +# 1.gigabyte +# +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#21 +class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#49 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#67 + def correct_method(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#110 + def duration_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#98 + def literal_number?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#63 + def message(number, method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#75 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#82 + def plural_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#94 + def plural_receiver?(number); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#102 + def pluralize(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#86 + def singular_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#90 + def singular_receiver?(number); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#106 + def singularize(method_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#47 +RuboCop::Cop::Rails::PluralizationGrammar::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#45 +RuboCop::Cop::Rails::PluralizationGrammar::PLURAL_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#43 +RuboCop::Cop::Rails::PluralizationGrammar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#24 +RuboCop::Cop::Rails::PluralizationGrammar::SINGULAR_METHODS = T.let(T.unsafe(nil), Hash) + +# Checks code that can be written more easily using +# `Object#presence` defined by Active Support. +# +# @example +# # bad +# a.present? ? a : nil +# +# # bad +# !a.present? ? nil : a +# +# # bad +# a.blank? ? nil : a +# +# # bad +# !a.blank? ? a : nil +# +# # good +# a.presence +# @example +# # bad +# a.present? ? a : b +# +# # bad +# !a.present? ? b : a +# +# # bad +# a.blank? ? b : a +# +# # bad +# !a.blank? ? a : b +# +# # good +# a.presence || b +# +# source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#40 +class RuboCop::Cop::Rails::Presence < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#76 + def on_if(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#61 + def redundant_negative_receiver_and_other(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#46 + def redundant_receiver_and_other(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#135 + def build_source_for_or_method(other); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#114 + def current(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#100 + def ignore_if_node?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#104 + def ignore_other_node?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#108 + def message(node, receiver, other); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#146 + def method_range(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#94 + def register_offense(node, receiver, other); end + + # source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#122 + def replacement(receiver, other, left_sibling); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/presence.rb#44 +RuboCop::Cop::Rails::Presence::MSG = T.let(T.unsafe(nil), String) + +# Checks for code that can be written with simpler conditionals +# using `Object#present?` defined by Active Support. +# +# Interaction with `Style/UnlessElse`: +# The configuration of `NotBlank` will not produce an offense in the +# context of `unless else` if `Style/UnlessElse` is enabled. This is +# to prevent interference between the autocorrection of the two cops. +# +# @example NotNilAndNotEmpty: true (default) +# # Converts usages of `!nil? && !empty?` to `present?` +# +# # bad +# !foo.nil? && !foo.empty? +# +# # bad +# foo != nil && !foo.empty? +# +# # good +# foo.present? +# @example NotBlank: true (default) +# # Converts usages of `!blank?` to `present?` +# +# # bad +# !foo.blank? +# +# # bad +# not foo.blank? +# +# # good +# foo.present? +# @example UnlessBlank: true (default) +# # Converts usages of `unless blank?` to `if present?` +# +# # bad +# something unless foo.blank? +# +# # good +# something if foo.present? +# +# source://rubocop-rails//lib/rubocop/cop/rails/present.rb#46 +class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#124 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#54 + def exists_and_not_empty?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#68 + def not_blank?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#86 + def on_and(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#110 + def on_if(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#100 + def on_or(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#74 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#70 + def unless_blank?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#148 + def replacement(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#140 + def unless_condition(node, method_call); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/present.rb#50 +RuboCop::Cop::Rails::Present::MSG_EXISTS_AND_NOT_EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/present.rb#49 +RuboCop::Cop::Rails::Present::MSG_NOT_BLANK = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/present.rb#51 +RuboCop::Cop::Rails::Present::MSG_UNLESS_BLANK = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/present.rb#52 +RuboCop::Cop::Rails::Present::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for Rake tasks without the `:environment` task +# dependency. The `:environment` task loads application code for other +# Rake tasks. Without it, tasks cannot make use of application code like +# models. +# +# You can ignore the offense if the task satisfies at least one of the +# following conditions: +# +# * The task does not need application code. +# * The task invokes the `:environment` task. +# +# @example +# # bad +# task :foo do +# do_something +# end +# +# # good +# task foo: :environment do +# do_something +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#33 +class RuboCop::Cop::Rails::RakeEnvironment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#42 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#38 + def task_definition?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#62 + def correct_task_arguments_dependency(task_method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#66 + def correct_task_dependency(task_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#91 + def task_arguments(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#74 + def task_name(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#95 + def with_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#99 + def with_dependencies?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#114 + def with_hash_style_dependencies?(hash_node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/rake_environment.rb#36 +RuboCop::Cop::Rails::RakeEnvironment::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of the `read_attribute` or `write_attribute` +# methods and recommends square brackets instead. +# +# If an attribute is missing from the instance (for example, when +# initialized by a partial `select`) then `read_attribute` +# will return nil, but square brackets will raise +# an `ActiveModel::MissingAttributeError`. +# +# Explicitly raising an error in this situation is preferable, and that +# is why rubocop recommends using square brackets. +# +# When called from within a method with the same name as the attribute, +# `read_attribute` and `write_attribute` must be used to prevent an +# infinite loop: +# +# @example +# +# # bad +# x = read_attribute(:attr) +# write_attribute(:attr, val) +# +# # good +# x = self[:attr] +# self[:attr] = val +# @example +# +# # good +# def foo +# bar || read_attribute(:foo) +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#37 +class RuboCop::Cop::Rails::ReadWriteAttribute < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#50 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#43 + def read_write_attribute?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#73 + def build_message(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#85 + def multi_line_message(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#93 + def node_replacement(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#102 + def read_attribute_replacement(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#81 + def single_line_message(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#61 + def within_shadowing_method?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#106 + def write_attribute_replacement(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#40 +RuboCop::Cop::Rails::ReadWriteAttribute::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/read_write_attribute.rb#41 +RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detect redundant `all` used as a receiver for Active Record query methods. +# +# For the methods `delete_all` and `destroy_all`, this cop will only check cases where the receiver is a model. +# It will ignore cases where the receiver is an association (e.g., `user.articles.all.delete_all`). +# This is because omitting `all` from an association changes the methods +# from `ActiveRecord::Relation` to `ActiveRecord::Associations::CollectionProxy`, +# which can affect their behavior. +# +# @example +# # bad +# User.all.find(id) +# User.all.order(:created_at) +# users.all.where(id: ids) +# user.articles.all.order(:created_at) +# +# # good +# User.find(id) +# User.order(:created_at) +# users.where(id: ids) +# user.articles.order(:created_at) +# @example AllowedReceivers: ['ActionMailer::Preview', 'ActiveSupport::TimeZone'] (default) +# # good +# ActionMailer::Preview.all.first +# ActiveSupport::TimeZone.all.first +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#34 +class RuboCop::Cop::Rails::RedundantActiveRecordAllMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#155 + def followed_by_query_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#159 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#184 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#173 + def possible_enumerable_block_method?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#180 + def sensitive_association_method?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#40 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#152 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::POSSIBLE_ENUMERABLE_BLOCK_METHODS = T.let(T.unsafe(nil), Array) + +# Defined methods in `ActiveRecord::Querying::QUERYING_METHODS` on activerecord 7.1.0. +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#45 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::QUERYING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#42 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#153 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::SENSITIVE_METHODS_ON_ASSOCIATION = T.let(T.unsafe(nil), Array) + +# Checks Rails model validations for a redundant `allow_nil` when +# `allow_blank` is present. +# +# @example +# # bad +# validates :x, length: { is: 5 }, allow_nil: true, allow_blank: true +# +# # bad +# validates :x, length: { is: 5 }, allow_nil: false, allow_blank: true +# +# # bad +# validates :x, length: { is: 5 }, allow_nil: false, allow_blank: false +# +# # good +# validates :x, length: { is: 5 }, allow_blank: true +# +# # good +# validates :x, length: { is: 5 }, allow_blank: false +# +# # good +# # Here, `nil` is valid but `''` is not +# validates :x, length: { is: 5 }, allow_nil: true, allow_blank: false +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#29 +class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#39 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#70 + def find_allow_nil_and_allow_blank(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#89 + def node_beg(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#93 + def node_end(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#55 + def register_offense(allow_nil, message); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#35 +RuboCop::Cop::Rails::RedundantAllowNil::MSG_ALLOW_NIL_FALSE = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#33 +RuboCop::Cop::Rails::RedundantAllowNil::MSG_SAME = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_allow_nil.rb#37 +RuboCop::Cop::Rails::RedundantAllowNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects cases where the `:foreign_key` option on associations +# is redundant. +# +# @example +# # bad +# class Post +# has_many :comments, foreign_key: 'post_id' +# end +# +# class Comment +# belongs_to :post, foreign_key: 'post_id' +# end +# +# # good +# class Post +# has_many :comments +# end +# +# class Comment +# belongs_to :author, foreign_key: 'user_id' +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#27 +class RuboCop::Cop::Rails::RedundantForeignKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#34 + def association_with_foreign_key(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#40 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#59 + def default_foreign_key(node, association_type, association_name, options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#69 + def find_as_option(options); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#55 + def redundant?(node, association_type, association_name, options, foreign_key); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#31 +RuboCop::Cop::Rails::RedundantForeignKey::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_foreign_key.rb#32 +RuboCop::Cop::Rails::RedundantForeignKey::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Since Rails 5.0 the default for `belongs_to` is `optional: false` +# unless `config.active_record.belongs_to_required_by_default` is +# explicitly set to `false`. The presence validator is added +# automatically, and explicit presence validation is redundant. +# +# @example +# # bad +# belongs_to :user +# validates :user, presence: true +# +# # bad +# belongs_to :user +# validates :user_id, presence: true +# +# # bad +# belongs_to :author, foreign_key: :user_id +# validates :user_id, presence: true +# +# # good +# belongs_to :user +# +# # good +# belongs_to :author, foreign_key: :user_id +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#34 +class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # Match a class with `belongs_to` with no regard to `foreign_key` option + # + # @example source that matches + # belongs_to :user + # @example source that matches - regardless of `foreign_key` + # belongs_to :author, foreign_key: :user_id + # @param node [RuboCop::AST::Node] + # @param association [Symbol] + # @return [Array, nil] matching node + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#109 + def any_belongs_to?(param0 = T.unsafe(nil), association:); end + + # Match a class with a matching association, either by name or an explicit + # `foreign_key` option + # + # @example source that matches - fk matches `foreign_key` option + # belongs_to :author, foreign_key: :user_id + # @example source that matches - key matches association name + # belongs_to :user + # @example source that does not match - explicit `foreign_key` does not match + # belongs_to :user, foreign_key: :account_id + # @param node [RuboCop::AST::Node] + # @param key [Symbol] e.g. `:user` + # @param fk [Symbol] e.g. `:user_id` + # @return [Array] matching nodes + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#135 + def belongs_to?(param0 = T.unsafe(nil), key:, fk:); end + + # Match a matching `belongs_to` association with a matching explicit `foreign_key` option + # + # @example source that matches + # belongs_to :author, foreign_key: :user_id + # @param node [RuboCop::AST::Node] + # @param fk [Symbol] e.g. `:user_id` + # @return [Array] matching nodes + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#170 + def belongs_to_with_a_matching_fk?(param0 = T.unsafe(nil), param1); end + + # Match a matching `belongs_to` association, without an explicit `foreign_key` option + # + # @param node [RuboCop::AST::Node] + # @param key [Symbol] e.g. `:user` + # @return [Array] matching nodes + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#153 + def belongs_to_without_fk?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#174 + def on_send(node); end + + # Match a `belongs_to` association with an optional option in a hash + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#84 + def optional?(param0 = T.unsafe(nil)); end + + # Match an optional option in a hash + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#90 + def optional_option?(param0 = T.unsafe(nil)); end + + # Match a `validates` statement with a presence check + # + # @example source that matches - by association + # validates :user, presence: true + # @example source that matches - by association + # validates :name, :user, presence: true + # @example source that matches - by a foreign key + # validates :user_id, presence: true + # @example source that DOES NOT match - if condition + # validates :user_id, presence: true, if: condition + # @example source that DOES NOT match - unless condition + # validates :user_id, presence: true, unless: condition + # @example source that DOES NOT match - strict validation + # validates :user_id, presence: true, strict: true + # @example source that DOES NOT match - custom strict validation + # validates :user_id, presence: true, strict: MissingUserError + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#70 + def presence_validation?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#191 + def add_offense_and_correct(node, all_keys, keys, options, presence); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#219 + def belongs_to_for(model_class_node, key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#251 + def extract_validation_for_keys(corrector, node, keys, options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#207 + def message_for(keys); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#212 + def non_optional_belongs_to(node, keys); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#232 + def remove_keys_from_validation(corrector, node, keys); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#243 + def remove_presence_option(corrector, presence); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#228 + def remove_validation(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#267 + def validation_range(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#39 +RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::MSG = T.let(T.unsafe(nil), String) + +# From https://github.com/rails/rails/blob/7a0bf93b9dd291c7f61121a41b3a813ac8857e6a/activemodel/lib/active_model/validations/validates.rb#L157-L159 +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#43 +RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::NON_VALIDATION_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#40 +RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant receiver in `with_options`. +# Receiver is implicit from Rails 4.2 or higher. +# +# @example +# # bad +# class Account < ApplicationRecord +# with_options dependent: :destroy do |assoc| +# assoc.has_many :customers +# assoc.has_many :products +# assoc.has_many :invoices +# assoc.has_many :expenses +# end +# end +# +# # good +# class Account < ApplicationRecord +# with_options dependent: :destroy do +# has_many :customers +# has_many :products +# has_many :invoices +# has_many :expenses +# end +# end +# @example +# # bad +# with_options options: false do |merger| +# merger.invoke(merger.something) +# end +# +# # good +# with_options options: false do +# invoke(something) +# end +# +# # good +# client = Client.new +# with_options options: false do |merger| +# client.invoke(merger.something, something) +# end +# +# # ok +# # When `with_options` includes a block, all scoping scenarios +# # cannot be evaluated. Thus, it is ok to include the explicit +# # receiver. +# with_options options: false do |merger| +# merger.invoke +# with_another_method do |another_receiver| +# merger.invoke(another_receiver) +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#57 +class RuboCop::Cop::Rails::RedundantReceiverInWithOptions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#63 + def all_block_nodes_in(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#67 + def all_send_nodes_in(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#71 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#71 + def on_numblock(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#91 + def autocorrect(corrector, send_node, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#110 + def block_argument_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#97 + def redundant_receiver?(send_nodes, node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#132 + def same_value?(arg_node, recv_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#122 + def search_begin_pos_of_space_before_block_argument(begin_pos); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb#61 +RuboCop::Cop::Rails::RedundantReceiverInWithOptions::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `travel_back` calls. +# Since Rails 5.2, `travel_back` is automatically called at the end of the test. +# +# @example +# +# # bad +# def teardown +# do_something +# travel_back +# end +# +# # good +# def teardown +# do_something +# end +# +# # bad +# after do +# do_something +# travel_back +# end +# +# # good +# after do +# do_something +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_travel_back.rb#33 +class RuboCop::Cop::Rails::RedundantTravelBack < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_travel_back.rb#43 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_travel_back.rb#40 +RuboCop::Cop::Rails::RedundantTravelBack::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_travel_back.rb#41 +RuboCop::Cop::Rails::RedundantTravelBack::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if the value of the option `class_name`, in +# the definition of a reflection is a string. +# +# @example +# # bad +# has_many :accounts, class_name: Account +# has_many :accounts, class_name: Account.name +# +# # good +# has_many :accounts, class_name: 'Account' +# +# source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#20 +class RuboCop::Cop::Rails::ReflectionClassName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#27 + def association_with_reflection(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#37 + def const_or_string(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#41 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#33 + def reflection_class_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#76 + def autocorrect(corrector, class_config); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#68 + def reflection_class_value?(class_value); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#54 + def str_assigned?(reflection_class_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#25 +RuboCop::Cop::Rails::ReflectionClassName::ALLOWED_REFLECTION_CLASS_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#23 +RuboCop::Cop::Rails::ReflectionClassName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/reflection_class_name.rb#24 +RuboCop::Cop::Rails::ReflectionClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use `assert_not` methods instead of `refute` methods. +# +# @example EnforcedStyle: assert_not (default) +# # bad +# refute false +# refute_empty [1, 2, 3] +# refute_equal true, false +# +# # good +# assert_not false +# assert_not_empty [1, 2, 3] +# assert_not_equal true, false +# @example EnforcedStyle: refute +# # bad +# assert_not false +# assert_not_empty [1, 2, 3] +# assert_not_equal true, false +# +# # good +# refute false +# refute_empty [1, 2, 3] +# refute_equal true, false +# +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#30 +class RuboCop::Cop::Rails::RefuteMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#58 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#60 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#74 + def bad_method?(method_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#86 + def convert_good_method(bad_method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#82 + def offense_message(method_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#54 +RuboCop::Cop::Rails::RefuteMethods::ASSERT_NOT_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#36 +RuboCop::Cop::Rails::RefuteMethods::CORRECTIONS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#34 +RuboCop::Cop::Rails::RefuteMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#53 +RuboCop::Cop::Rails::RefuteMethods::REFUTE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/refute_methods.rb#56 +RuboCop::Cop::Rails::RefuteMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks whether constant value isn't relative date. +# Because the relative date will be evaluated only once. +# +# @example +# # bad +# class SomeClass +# EXPIRED_AT = 1.week.since +# end +# +# # good +# class SomeClass +# EXPIRES = 1.week +# +# def self.expired_at +# EXPIRES.since +# end +# end +# +# # good +# class SomeClass +# def self.expired_at +# 1.week.since +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#33 +class RuboCop::Cop::Rails::RelativeDateConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#40 + def on_casgn(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#48 + def on_masgn(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#64 + def on_or_asgn(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#106 + def relative_date(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#102 + def relative_date_or_assignment(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#72 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#84 + def message(method_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#92 + def nested_relative_date(node, &callback); end + + # source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#88 + def offense_range(name, value); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#37 +RuboCop::Cop::Rails::RelativeDateConstant::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/relative_date_constant.rb#38 +RuboCop::Cop::Rails::RelativeDateConstant::RELATIVE_DATE_METHODS = T.let(T.unsafe(nil), Set) + +# Looks for inline rendering within controller actions. +# +# @example +# # bad +# class ProductsController < ApplicationController +# def index +# render inline: "<% products.each do |p| %>

    <%= p.name %>

    <% end %>", type: :erb +# end +# end +# +# # good +# # app/views/products/index.html.erb +# # <% products.each do |p| %> +# #

    <%= p.name %>

    +# # <% end %> +# +# class ProductsController < ApplicationController +# def index +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/render_inline.rb#27 +class RuboCop::Cop::Rails::RenderInline < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/render_inline.rb#35 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/render_inline.rb#31 + def render_with_inline_option?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/render_inline.rb#28 +RuboCop::Cop::Rails::RenderInline::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/render_inline.rb#29 +RuboCop::Cop::Rails::RenderInline::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `render text:` can be +# replaced with `render plain:`. +# +# @example +# # bad - explicit MIME type to `text/plain` +# render text: 'Ruby!', content_type: 'text/plain' +# +# # good - short and precise +# render plain: 'Ruby!' +# +# # good - explicit MIME type not to `text/plain` +# render text: 'Ruby!', content_type: 'text/html' +# @example ContentTypeCompatibility: true (default) +# # good - sets MIME type to `text/html` +# render text: 'Ruby!' +# @example ContentTypeCompatibility: false +# # bad - sets MIME type to `text/html` +# render text: 'Ruby!' +# +# source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#27 +class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#37 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#33 + def render_plain_text?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#56 + def compatible_content_type?(pair_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#52 + def find_content_type(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#64 + def replacement(rest_options, option_value); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#30 +RuboCop::Cop::Rails::RenderPlainText::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#31 +RuboCop::Cop::Rails::RenderPlainText::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for consistent uses of `request.referer` or +# `request.referrer`, depending on the cop's configuration. +# +# @example EnforcedStyle: referer (default) +# # bad +# request.referrer +# +# # good +# request.referer +# @example EnforcedStyle: referrer +# # bad +# request.referer +# +# # good +# request.referrer +# +# source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#22 +class RuboCop::Cop::Rails::RequestReferer < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#33 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#29 + def referer?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#45 + def message(_range); end + + # source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#49 + def wrong_method_name; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#26 +RuboCop::Cop::Rails::RequestReferer::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/request_referer.rb#27 +RuboCop::Cop::Rails::RequestReferer::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the usage of `require_dependency`. +# +# `require_dependency` is an obsolete method for Rails applications running in Zeitwerk mode. +# In Zeitwerk mode, the semantics should match Ruby's and no need to be defensive with load order, +# just refer to classes and modules normally. +# If the constant name is dynamic, camelize if needed, and constantize. +# +# Applications running in Zeitwerk mode should not use `require_dependency`. +# +# NOTE: This cop is disabled by default. Please enable it if you are using Zeitwerk mode. +# +# @example +# # bad +# require_dependency 'some_lib' +# +# source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#20 +class RuboCop::Cop::Rails::RequireDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#32 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#28 + def require_dependency_call?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#25 +RuboCop::Cop::Rails::RequireDependency::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#26 +RuboCop::Cop::Rails::RequireDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer `response.parsed_body` to custom parsing logic for `response.body`. +# +# @example +# # bad +# JSON.parse(response.body) +# +# # bad +# Nokogiri::HTML.parse(response.body) +# +# # bad +# Nokogiri::HTML5.parse(response.body) +# +# # good +# response.parsed_body +# +# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#26 +class RuboCop::Cop::Rails::ResponseParsedBody < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#35 + def json_parse_response_body?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#47 + def nokogiri_html_parse_response_body(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#61 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#75 + def check_json_parse_response_body(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#86 + def check_nokogiri_html_parse_response_body(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#30 +RuboCop::Cop::Rails::ResponseParsedBody::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks whether the change method of the migration file is +# reversible. +# +# @example +# # remove_index +# +# # bad +# def change +# remove_index :users, name: :index_users_on_email +# end +# +# # good +# def change +# remove_index :users, :email +# end +# +# # good +# def change +# remove_index :users, column: :email +# end +# @example +# # drop_table +# +# # bad +# def change +# drop_table :users +# end +# +# # good +# def change +# drop_table :users do |t| +# t.string :name +# end +# end +# @example +# # change_column_default +# +# # bad +# def change +# change_column_default(:suppliers, :qualification, 'new') +# end +# +# # good +# def change +# change_column_default(:posts, :state, from: nil, to: "draft") +# end +# @example +# # remove_column +# +# # bad +# def change +# remove_column(:suppliers, :qualification) +# end +# +# # good +# def change +# remove_column(:suppliers, :qualification, :string) +# end +# @example +# # remove_foreign_key +# +# # bad +# def change +# remove_foreign_key :accounts, column: :owner_id +# end +# +# # good +# def change +# remove_foreign_key :accounts, :branches +# end +# +# # good +# def change +# remove_foreign_key :accounts, to_table: :branches +# end +# @example +# # change_table +# +# # bad +# def change +# change_table :users do |t| +# t.remove :name +# t.change_default :authorized, 1 +# t.change :price, :string +# end +# end +# +# # good +# def change +# change_table :users do |t| +# t.string :name +# end +# end +# @example +# # remove_columns +# +# # bad +# def change +# remove_columns :users, :name, :email +# end +# +# # good +# def change +# reversible do |dir| +# dir.up do +# remove_columns :users, :name, :email +# end +# +# dir.down do +# add_column :users, :name, :string +# add_column :users, :email, :string +# end +# end +# end +# +# # good (Rails >= 6.1, see https://github.com/rails/rails/pull/36589) +# def change +# remove_columns :users, :name, :email, type: :string +# end +# @example +# # bad +# def change +# change_table :users do |t| +# t.remove :name +# end +# end +# +# # good +# def change +# change_table :users do |t| +# t.remove :name, type: :string +# end +# end +# +# # good +# def change +# create_table :users do |t| +# t.string :name +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#153 +class RuboCop::Cop::Rails::ReversibleMigration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MigrationsHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#174 + def change_table_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#162 + def drop_table_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#158 + def irreversible_schema_statement_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#199 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#199 + def on_numblock(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#186 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#166 + def remove_column_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#178 + def remove_columns_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#170 + def remove_foreign_key_call(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#182 + def remove_index_call(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#314 + def all_hash_key?(args, *keys); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#245 + def check_change_table_node(node, block); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#275 + def check_change_table_offense(receiver, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#217 + def check_drop_table_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#211 + def check_irreversible_schema_statement_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#231 + def check_remove_column_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#257 + def check_remove_columns_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#237 + def check_remove_foreign_key_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#267 + def check_remove_index_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#225 + def check_reversible_hash_node(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#288 + def reversible_change_table_call?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#302 + def within_change_method?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#308 + def within_reversible_or_up_only_block?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#156 +RuboCop::Cop::Rails::ReversibleMigration::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the migration implements +# either a `change` method or both an `up` and a `down` +# method. +# +# @example +# # bad +# class SomeMigration < ActiveRecord::Migration[6.0] +# def up +# # up migration +# end +# +# # <----- missing down method +# end +# +# class SomeMigration < ActiveRecord::Migration[6.0] +# # <----- missing up method +# +# def down +# # down migration +# end +# end +# +# # good +# class SomeMigration < ActiveRecord::Migration[6.0] +# def change +# # reversible migration +# end +# end +# +# # good +# class SomeMigration < ActiveRecord::Migration[6.0] +# def up +# # up migration +# end +# +# def down +# # down migration +# end +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration_method_definition.rb#45 +class RuboCop::Cop::Rails::ReversibleMigrationMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MigrationsHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration_method_definition.rb#50 + def change_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration_method_definition.rb#58 + def on_class(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration_method_definition.rb#54 + def up_and_down_methods?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration_method_definition.rb#48 +RuboCop::Cop::Rails::ReversibleMigrationMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Use a single `#join` instead of chaining on `Rails.root` or `Rails.public_path`. +# +# @example +# # bad +# Rails.root.join('db').join('schema.rb') +# Rails.root.join('db').join(migrate).join('migration.rb') +# Rails.public_path.join('path').join('file.pdf') +# Rails.public_path.join('path').join(to).join('file.pdf') +# +# # good +# Rails.root.join('db', 'schema.rb') +# Rails.root.join('db', migrate, 'migration.rb') +# Rails.public_path.join('path', 'file.pdf') +# Rails.public_path.join('path', to, 'file.pdf') +# +# source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#21 +class RuboCop::Cop::Rails::RootJoinChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#35 + def join?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#39 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#30 + def rails_root?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#52 + def evidence(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#25 +RuboCop::Cop::Rails::RootJoinChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_join_chain.rb#27 +RuboCop::Cop::Rails::RootJoinChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Use `Rails.root` IO methods instead of passing it to `File`. +# +# `Rails.root` is an instance of `Pathname` +# so we can apply many IO methods directly. +# +# This cop works best when used together with +# `Style/FileRead`, `Style/FileWrite` and `Rails/RootJoinChain`. +# +# @example +# # bad +# File.open(Rails.root.join('db', 'schema.rb')) +# File.open(Rails.root.join('db', 'schema.rb'), 'w') +# File.read(Rails.root.join('db', 'schema.rb')) +# File.binread(Rails.root.join('db', 'schema.rb')) +# File.write(Rails.root.join('db', 'schema.rb'), content) +# File.binwrite(Rails.root.join('db', 'schema.rb'), content) +# Dir.glob(Rails.root.join('db', 'schema.rb')) +# Dir[Rails.root.join('db', 'schema.rb')] +# +# # good +# Rails.root.join('db', 'schema.rb').open +# Rails.root.join('db', 'schema.rb').open('w') +# Rails.root.join('db', 'schema.rb').read +# Rails.root.join('db', 'schema.rb').binread +# Rails.root.join('db', 'schema.rb').write(content) +# Rails.root.join('db', 'schema.rb').binwrite(content) +# Rails.root.glob("db/schema.rb") +# +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#38 +class RuboCop::Cop::Rails::RootPathnameMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#175 + def dir_glob?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#192 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#166 + def pathname_method_for_ruby_2_4_or_lower(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#156 + def pathname_method_for_ruby_2_5_or_higher(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#188 + def rails_root?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#180 + def rails_root_pathname?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#224 + def build_path_glob_replacement(path); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#232 + def build_path_replacement(path, method, args); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#266 + def enforce_double_quotes?; end + + # @yield [method, path, args, rails_root] + # + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#209 + def evidence(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#244 + def include_interpolation?(arguments); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#250 + def join_arguments(arguments); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#216 + def pathname_method(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#270 + def string_literals_config; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#44 +RuboCop::Cop::Rails::RootPathnameMethods::DIR_GLOB_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#59 +RuboCop::Cop::Rails::RootPathnameMethods::DIR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#46 +RuboCop::Cop::Rails::RootPathnameMethods::DIR_NON_GLOB_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#61 +RuboCop::Cop::Rails::RootPathnameMethods::FILE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#123 +RuboCop::Cop::Rails::RootPathnameMethods::FILE_TEST_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#151 +RuboCop::Cop::Rails::RootPathnameMethods::FILE_UTILS_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#42 +RuboCop::Cop::Rails::RootPathnameMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#153 +RuboCop::Cop::Rails::RootPathnameMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Favor `Rails.public_path` over `Rails.root` with `'public'` +# +# @example +# # bad +# Rails.root.join('public') +# Rails.root.join('public/file.pdf') +# Rails.root.join('public', 'file.pdf') +# +# # good +# Rails.public_path +# Rails.public_path.join('file.pdf') +# Rails.public_path.join('file.pdf') +# +# source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#19 +class RuboCop::Cop::Rails::RootPublicPath < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#35 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#28 + def rails_root_public(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#53 + def public_path?(string); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#22 +RuboCop::Cop::Rails::RootPublicPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#26 +RuboCop::Cop::Rails::RootPublicPath::PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/root_public_path.rb#24 +RuboCop::Cop::Rails::RootPublicPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Converts usages of `try!` to `&.`. It can also be configured +# to convert `try`. It will convert code to use safe navigation +# if the target Ruby version is set to 2.3+ +# +# @example ConvertTry: false (default) +# # bad +# foo.try!(:bar) +# foo.try!(:bar, baz) +# foo.try!(:bar) { |e| e.baz } +# +# foo.try!(:[], 0) +# +# # good +# foo.try(:bar) +# foo.try(:bar, baz) +# foo.try(:bar) { |e| e.baz } +# +# foo&.bar +# foo&.bar(baz) +# foo&.bar { |e| e.baz } +# @example ConvertTry: true +# # bad +# foo.try!(:bar) +# foo.try!(:bar, baz) +# foo.try!(:bar) { |e| e.baz } +# foo.try(:bar) +# foo.try(:bar, baz) +# foo.try(:bar) { |e| e.baz } +# +# # good +# foo&.bar +# foo&.bar(baz) +# foo&.bar { |e| e.baz } +# +# source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#40 +class RuboCop::Cop::Rails::SafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#58 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#50 + def try_call(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#85 + def replacement(method, params); end + + class << self + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#54 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#47 +RuboCop::Cop::Rails::SafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation.rb#48 +RuboCop::Cop::Rails::SafeNavigation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure safe navigation isn't used with `blank?` in +# a conditional. +# +# @example +# # bad +# do_something if foo&.blank? +# do_something unless foo&.blank? +# +# # good +# do_something if foo.blank? +# do_something unless foo.blank? +# +# source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation_with_blank.rb#31 +class RuboCop::Cop::Rails::SafeNavigationWithBlank < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation_with_blank.rb#40 + def on_if(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation_with_blank.rb#36 + def safe_navigation_blank_in_conditional?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/safe_navigation_with_blank.rb#34 +RuboCop::Cop::Rails::SafeNavigationWithBlank::MSG = T.let(T.unsafe(nil), String) + +# Identifies possible cases where Active Record save! or related +# should be used instead of save because the model might have failed to +# save and an exception is better than unhandled failure. +# +# This will allow: +# +# * update or save calls, assigned to a variable, +# or used as a condition in an if/unless/case statement. +# * create calls, assigned to a variable that then has a +# call to `persisted?`, or whose return value is checked by +# `persisted?` immediately +# * calls if the result is explicitly returned from methods and blocks, +# or provided as arguments. +# * calls whose signature doesn't look like an ActiveRecord +# persistence method. +# +# By default it will also allow implicit returns from methods and blocks. +# that behavior can be turned off with `AllowImplicitReturn: false`. +# +# You can permit receivers that are giving false positives with +# `AllowedReceivers: []` +# +# @example +# +# # bad +# user.save +# user.update(name: 'Joe') +# user.find_or_create_by(name: 'Joe') +# user.destroy +# +# # good +# unless user.save +# # ... +# end +# user.save! +# user.update!(name: 'Joe') +# user.find_or_create_by!(name: 'Joe') +# user.destroy! +# +# user = User.find_or_create_by(name: 'Joe') +# unless user.persisted? +# # ... +# end +# +# def save_user +# return user.save +# end +# @example AllowImplicitReturn: true (default) +# +# # good +# users.each { |u| u.save } +# +# def save_user +# user.save +# end +# @example AllowImplicitReturn: false +# +# # bad +# users.each { |u| u.save } +# def save_user +# user.save +# end +# +# # good +# users.each { |u| u.save! } +# +# def save_user +# user.save! +# end +# +# def save_user +# return user.save +# end +# @example AllowedReceivers: ['merchant.customers', 'Service::Mailer'] +# +# # bad +# merchant.create +# customers.builder.save +# Mailer.create +# +# module Service::Mailer +# self.create +# end +# +# # good +# merchant.customers.create +# MerchantService.merchant.customers.destroy +# Service::Mailer.update(message: 'Message') +# ::Service::Mailer.update +# Services::Service::Mailer.update(message: 'Message') +# Service::Mailer::update +# +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#120 +class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#136 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#144 + def check_assignment(assignment); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#155 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#155 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#263 + def allowed_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#321 + def argument?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#223 + def array_parent(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#204 + def assignable_node(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#198 + def call_to_persisted?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#230 + def check_used_in_condition_or_compound_boolean(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#259 + def checked_immediately?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#250 + def conditional?(parent); end + + # Const == Const + # ::Const == ::Const + # ::Const == Const + # Const == ::Const + # NameSpace::Const == Const + # NameSpace::Const == NameSpace::Const + # NameSpace::Const != ::Const + # Const != NameSpace::Const + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#296 + def const_matches?(const, allowed_const); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#254 + def deparenthesize(node); end + + # Check argument signature as no arguments or one hash + # + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#340 + def expected_signature?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#325 + def explicit_return?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#313 + def find_method_with_sibling_index(node, sibling_index = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#213 + def hash_parent(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#303 + def implicit_return?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#238 + def in_condition_or_compound_boolean?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#246 + def operator_or_single_negative?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#335 + def persist_method?(node, methods = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#190 + def persisted_referenced?(assignment); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#273 + def receiver_chain_matches?(node, allowed_receiver); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#171 + def register_offense(node, msg); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#330 + def return_value_assigned?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#182 + def right_assignment_node(assignment); end + + class << self + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#132 + def joining_forces; end + end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#126 +RuboCop::Cop::Rails::SaveBang::CREATE_CONDITIONAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#125 +RuboCop::Cop::Rails::SaveBang::CREATE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#128 +RuboCop::Cop::Rails::SaveBang::CREATE_PERSIST_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#129 +RuboCop::Cop::Rails::SaveBang::MODIFY_PERSIST_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#124 +RuboCop::Cop::Rails::SaveBang::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#130 +RuboCop::Cop::Rails::SaveBang::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of the `comment` option when adding a new table or column +# to the database during a migration. +# +# @example +# # bad (no comment for a new column or table) +# add_column :table, :column, :integer +# +# create_table :table do |t| +# t.type :column +# end +# +# # good +# add_column :table, :column, :integer, comment: 'Number of offenses' +# +# create_table :table, comment: 'Table of offenses data' do |t| +# t.type :column, comment: 'Number of offenses' +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#24 +class RuboCop::Cop::Rails::SchemaComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordMigrationsHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#45 + def add_column?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#50 + def add_column_with_comment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#40 + def comment_present?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#55 + def create_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#60 + def create_table_with_comment?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#74 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#65 + def t_column?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#70 + def t_column_with_comment?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#96 + def add_column_without_comment?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#86 + def check_column_within_create_table_block(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#100 + def create_table_without_comment?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#104 + def t_column_without_comment?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#27 +RuboCop::Cop::Rails::SchemaComment::COLUMN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#30 +RuboCop::Cop::Rails::SchemaComment::CREATE_TABLE_COLUMN_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#29 +RuboCop::Cop::Rails::SchemaComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/schema_comment.rb#28 +RuboCop::Cop::Rails::SchemaComment::TABLE_MSG = T.let(T.unsafe(nil), String) + +# Checks for scope calls where it was passed +# a method (usually a scope) instead of a lambda/proc. +# +# @example +# +# # bad +# scope :something, where(something: true) +# +# # good +# scope :something, -> { where(something: true) } +# +# source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#16 +class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#24 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#22 + def scope?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#19 +RuboCop::Cop::Rails::ScopeArgs::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/scope_args.rb#20 +RuboCop::Cop::Rails::ScopeArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `select(:column_name)` with `map(&:column_name)`. +# These can be replaced with `pluck(:column_name)`. +# +# There also should be some performance improvement since it skips instantiating the model class for matches. +# +# @example +# # bad +# Model.select(:column_name).map(&:column_name) +# +# # good +# Model.pluck(:column_name) +# +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#22 +class RuboCop::Cop::Rails::SelectMap < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#29 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#55 + def autocorrect(corrector, select_node, node, preferred_method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#46 + def find_select_node(node, column_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#62 + def match_column_name?(select_candidate, column_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#25 +RuboCop::Cop::Rails::SelectMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/select_map.rb#27 +RuboCop::Cop::Rails::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces that short forms of `I18n` methods are used: +# `t` instead of `translate` and `l` instead of `localize`. +# +# This cop has two different enforcement modes. When the EnforcedStyle +# is conservative (the default) then only `I18n.translate` and `I18n.localize` +# calls are added as offenses. +# +# When the EnforcedStyle is aggressive then all `translate` and `localize` calls +# without a receiver are added as offenses. +# +# @example +# # bad +# I18n.translate :key +# I18n.localize Time.now +# +# # good +# I18n.t :key +# I18n.l Time.now +# @example EnforcedStyle: conservative (default) +# # good +# translate :key +# localize Time.now +# t :key +# l Time.now +# @example EnforcedStyle: aggressive +# # bad +# translate :key +# localize Time.now +# +# # good +# t :key +# l Time.now +# +# source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#41 +class RuboCop::Cop::Rails::ShortI18n < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#51 + def long_i18n?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#55 + def on_send(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#45 +RuboCop::Cop::Rails::ShortI18n::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#47 +RuboCop::Cop::Rails::ShortI18n::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/short_i18n.rb#49 +RuboCop::Cop::Rails::ShortI18n::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of methods which skip +# validations which are listed in +# https://guides.rubyonrails.org/active_record_validations.html#skipping-validations +# +# Methods may be ignored from this rule by configuring a `AllowedMethods`. +# +# @example +# # bad +# Article.first.decrement!(:view_count) +# DiscussionBoard.decrement_counter(:post_count, 5) +# Article.first.increment!(:view_count) +# DiscussionBoard.increment_counter(:post_count, 5) +# person.toggle :active +# product.touch +# Billing.update_all("category = 'authorized', author = 'David'") +# user.update_attribute(:website, 'example.com') +# user.update_columns(last_request_at: Time.current) +# Post.update_counters 5, comment_count: -1, action_count: 1 +# +# # good +# user.update(website: 'example.com') +# FileUtils.touch('file') +# @example AllowedMethods: ["touch"] +# # bad +# DiscussionBoard.decrement_counter(:post_count, 5) +# DiscussionBoard.increment_counter(:post_count, 5) +# person.toggle :active +# +# # good +# user.touch +# +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#41 +class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base + # @return [SkipsModelValidations] a new instance of SkipsModelValidations + # + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#86 + def initialize(*_arg0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#68 + def good_insert?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#61 + def good_touch?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#75 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#75 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#98 + def allowed_method?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#114 + def allowed_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#102 + def forbidden_methods; end + + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#94 + def message(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#44 +RuboCop::Cop::Rails::SkipsModelValidations::METHODS_WITH_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#42 +RuboCop::Cop::Rails::SkipsModelValidations::MSG = T.let(T.unsafe(nil), String) + +# Checks SQL heredocs to use `.squish`. +# +# @example +# # bad +# <<-SQL +# SELECT * FROM posts; +# SQL +# +# <<-SQL +# SELECT * FROM posts +# WHERE id = 1 +# SQL +# +# execute(<<~SQL, "Post Load") +# SELECT * FROM posts +# WHERE post_id = 1 +# SQL +# +# # good +# <<-SQL.squish +# SELECT * FROM posts; +# SQL +# +# <<~SQL.squish +# SELECT * FROM table +# WHERE id = 1 +# SQL +# +# execute(<<~SQL.squish, "Post Load") +# SELECT * FROM posts +# WHERE post_id = 1 +# SQL +# +# source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#43 +class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#52 + def on_heredoc(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#80 + def message(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#62 + def offense_detected?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#74 + def singleline_comments_present?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#66 + def sql_heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#70 + def using_squish?(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#49 +RuboCop::Cop::Rails::SquishedSQLHeredocs::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#47 +RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#50 +RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL_IDENTIFIER_MARKERS = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/squished_sql_heredocs.rb#48 +RuboCop::Cop::Rails::SquishedSQLHeredocs::SQUISH = T.let(T.unsafe(nil), String) + +# Enforces the use of squiggly heredoc over `strip_heredoc`. +# +# @example +# +# # bad +# <= 7, where transactions +# exited using these statements are being rollbacked rather than +# committed (pre ActiveRecord 7 behavior). +# +# As alternatives, it would be more intuitive to explicitly raise an +# error when rollback is desired, and to use `next` when commit is +# desired. +# +# If you are defining custom transaction methods, you can configure it with `TransactionMethods`. +# +# @example +# # bad +# ApplicationRecord.transaction do +# return if user.active? +# end +# +# # bad +# ApplicationRecord.transaction do +# break if user.active? +# end +# +# # bad +# ApplicationRecord.transaction do +# throw if user.active? +# end +# +# # bad, as `with_lock` implicitly opens a transaction too +# user.with_lock do +# throw if user.active? +# end +# +# # bad, as `with_lock` implicitly opens a transaction too +# ApplicationRecord.with_lock do +# break if user.active? +# end +# +# # good +# ApplicationRecord.transaction do +# # Rollback +# raise "User is active" if user.active? +# end +# +# # good +# ApplicationRecord.transaction do +# # Commit +# next if user.active? +# end +# @example TransactionMethods: ["custom_transaction"] +# # bad +# CustomModel.custom_transaction do +# return if user.active? +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#62 +class RuboCop::Cop::Rails::TransactionExitStatement < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#66 + def exit_statements(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#78 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#70 + def rescue_body_return_node?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#93 + def in_transaction_block?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#110 + def nested_block?(statement_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#100 + def statement(statement_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#119 + def transaction_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#115 + def transaction_method_name?(method_name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#64 +RuboCop::Cop::Rails::TransactionExitStatement::BUILT_IN_TRANSACTION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/transaction_exit_statement.rb#63 +RuboCop::Cop::Rails::TransactionExitStatement::MSG = T.let(T.unsafe(nil), String) + +# Prefer using `distinct` before `pluck` instead of `uniq` after `pluck`. +# +# The use of distinct before pluck is preferred because it executes by +# the database. +# +# This cop has two different enforcement modes. When the EnforcedStyle +# is `conservative` (the default), then only calls to `pluck` on a constant +# (i.e. a model class) before `uniq` are added as offenses. +# +# When the EnforcedStyle is `aggressive` then all calls to `pluck` before +# distinct are added as offenses. This may lead to false positives +# as the cop cannot distinguish between calls to `pluck` on an +# ActiveRecord::Relation vs a call to pluck on an +# ActiveRecord::Associations::CollectionProxy. +# +# @example EnforcedStyle: conservative (default) +# # bad - redundantly fetches duplicate values +# Album.pluck(:band_name).uniq +# +# # good +# Album.distinct.pluck(:band_name) +# @example EnforcedStyle: aggressive +# # bad - redundantly fetches duplicate values +# Album.pluck(:band_name).uniq +# +# # bad - redundantly fetches duplicate values +# Album.where(year: 1985).pluck(:band_name).uniq +# +# # bad - redundantly fetches duplicate values +# customer.favourites.pluck(:color).uniq +# +# # good +# Album.distinct.pluck(:band_name) +# Album.distinct.where(year: 1985).pluck(:band_name) +# customer.favourites.distinct.pluck(:color) +# +# source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#47 +class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#59 + def aggressive_node_match(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#57 + def conservative_node_match(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#61 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#77 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#92 + def dot_method_begin_pos(method, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#88 + def dot_method_with_whitespace(method, node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#52 +RuboCop::Cop::Rails::UniqBeforePluck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#54 +RuboCop::Cop::Rails::UniqBeforePluck::NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#55 +RuboCop::Cop::Rails::UniqBeforePluck::PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#53 +RuboCop::Cop::Rails::UniqBeforePluck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# When you define a uniqueness validation in Active Record model, +# you also should add a unique index for the column. There are two reasons. +# First, duplicated records may occur even if Active Record's validation +# is defined. +# Second, it will cause slow queries. The validation executes a `SELECT` +# statement with the target column when inserting/updating a record. +# If the column does not have an index and the table is large, +# the query will be heavy. +# +# Note that the cop does nothing if db/schema.rb does not exist. +# +# @example +# # bad - if the schema does not have a unique index +# validates :account, uniqueness: true +# +# # good - if the schema has a unique index +# validates :account, uniqueness: true +# +# # good - even if the schema does not have a unique index +# validates :account, length: { minimum: MIN_LENGTH } +# +# source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#27 +class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#33 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#155 + def array_node_to_array(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#122 + def class_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#74 + def column_names(node, uniqueness_part); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#93 + def column_names_from_scope(uniqueness_part); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#146 + def condition_hash_part?(pairs, keys:); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#137 + def condition_part?(node, uniqueness_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#47 + def find_schema_information(node, uniqueness_part); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#109 + def find_scope(pairs); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#66 + def include_column_names_in_expression_index?(index, column_names); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#118 + def unfreeze_scope(scope); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#126 + def uniqueness_part(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#57 + def with_index?(klass, table, names); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#30 +RuboCop::Cop::Rails::UniqueValidationWithoutIndex::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/unique_validation_without_index.rb#31 +RuboCop::Cop::Rails::UniqueValidationWithoutIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that environments called with `Rails.env` predicates +# exist. +# By default the cop allows three environments which Rails ships with: +# `development`, `test`, and `production`. +# More can be added to the `Environments` config parameter. +# +# @example +# # bad +# Rails.env.proudction? +# Rails.env == 'proudction' +# +# # good +# Rails.env.production? +# Rails.env == 'production' +# +# source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#20 +class RuboCop::Cop::Rails::UnknownEnv < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#41 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#24 + def rails_env?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#34 + def unknown_environment_equal?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#30 + def unknown_environment_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#54 + def collect_variable_like_names(_scope); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#88 + def environments; end + + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#58 + def message(name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#84 + def unknown_env_name?(name); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#79 + def unknown_env_predicate?(name); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#21 +RuboCop::Cop::Rails::UnknownEnv::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/unknown_env.rb#22 +RuboCop::Cop::Rails::UnknownEnv::MSG_SIMILAR = T.let(T.unsafe(nil), String) + +# Suggests you remove a column that does not exist in the schema from `ignored_columns`. +# `ignored_columns` is necessary to drop a column from RDBMS, but you don't need it after the migration +# to drop the column. You avoid forgetting to remove `ignored_columns` by this cop. +# +# IMPORTANT: This cop can't be used to effectively check for unused columns because the development +# and production schema can be out of sync until the migration has been run on production. As such, +# this cop can cause `ignored_columns` to be removed even though the production schema still contains +# the column, which can lead to downtime when the migration is actually executed. Only enable this cop +# if you know your migrations will be run before any of your Rails applications boot with the modified code. +# +# @example +# # bad +# class User < ApplicationRecord +# self.ignored_columns = [:already_removed_column] +# end +# +# # good +# class User < ApplicationRecord +# self.ignored_columns = [:still_existing_column] +# end +# +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#27 +class RuboCop::Cop::Rails::UnusedIgnoredColumns < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ActiveRecordHelper + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#37 + def appended_ignored_columns(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#41 + def column_name(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#33 + def ignored_columns(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#45 + def on_op_asgn(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#45 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#60 + def check_column_existence(column_node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#69 + def class_node(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#73 + def table(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#30 +RuboCop::Cop::Rails::UnusedIgnoredColumns::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#31 +RuboCop::Cop::Rails::UnusedIgnoredColumns::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# If you try to render content along with a non-content status code (100-199, 204, 205, or 304), +# it will be dropped from the response. +# +# This cop checks for uses of `render` which specify both body content and a non-content status. +# +# @example +# # bad +# render 'foo', status: :continue +# render status: 100, plain: 'Ruby!' +# +# # good +# head :continue +# head 100 +# +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#19 +class RuboCop::Cop::Rails::UnusedRenderContent < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#45 + def non_content_status?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#59 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#52 + def unused_render_content?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#28 +RuboCop::Cop::Rails::UnusedRenderContent::BODY_OPTIONS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#22 +RuboCop::Cop::Rails::UnusedRenderContent::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#25 +RuboCop::Cop::Rails::UnusedRenderContent::NON_CONTENT_STATUSES = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#24 +RuboCop::Cop::Rails::UnusedRenderContent::NON_CONTENT_STATUS_CODES = T.let(T.unsafe(nil), Set) + +# source://rubocop-rails//lib/rubocop/cop/rails/unused_render_content.rb#23 +RuboCop::Cop::Rails::UnusedRenderContent::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of old-style attribute validation macros. +# +# @example +# # bad +# validates_acceptance_of :foo +# validates_comparison_of :foo +# validates_confirmation_of :foo +# validates_exclusion_of :foo +# validates_format_of :foo +# validates_inclusion_of :foo +# validates_length_of :foo +# validates_numericality_of :foo +# validates_presence_of :foo +# validates_absence_of :foo +# validates_size_of :foo +# validates_uniqueness_of :foo +# +# # good +# validates :foo, acceptance: true +# validates :foo, confirmation: true +# validates :foo, comparison: true +# validates :foo, exclusion: true +# validates :foo, format: true +# validates :foo, inclusion: true +# validates :foo, length: true +# validates :foo, numericality: true +# validates :foo, presence: true +# validates :foo, absence: true +# validates :foo, length: true +# validates :foo, uniqueness: true +# +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#37 +class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#60 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#135 + def braced_options(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#86 + def correct_validate_type(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#111 + def correct_validate_type_for_array(corrector, node, arguments, loc); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#107 + def correct_validate_type_for_hash(corrector, node, arguments); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#131 + def frozen_array_argument?(argument); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#76 + def message(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#82 + def preferred_method(method); end + + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#125 + def validate_type(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#58 +RuboCop::Cop::Rails::Validation::ALLOWLIST = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#40 +RuboCop::Cop::Rails::Validation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#57 +RuboCop::Cop::Rails::Validation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#42 +RuboCop::Cop::Rails::Validation::TYPES = T.let(T.unsafe(nil), Array) + +# Identifies places where manually constructed SQL +# in `where` and `where.not` can be replaced with +# `where(attribute: value)` and `where.not(attribute: value)`. +# +# @example +# # bad +# User.where('name = ?', 'Gabe') +# User.where.not('name = ?', 'Gabe') +# User.where('name = :name', name: 'Gabe') +# User.where('name IS NULL') +# User.where('name IN (?)', ['john', 'jane']) +# User.where('name IN (:names)', names: ['john', 'jane']) +# User.where('users.name = :name', name: 'Gabe') +# +# # good +# User.where(name: 'Gabe') +# User.where.not(name: 'Gabe') +# User.where(name: nil) +# User.where(name: ['john', 'jane']) +# User.where(users: { name: 'Gabe' }) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#30 +class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#44 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#44 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#37 + def where_method_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#101 + def build_good_method(method_name, column, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#78 + def extract_column_and_value(template_node, value_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#73 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#111 + def where_not?(node); end +end + +# column = ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#65 +RuboCop::Cop::Rails::WhereEquals::EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column = :column +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#67 +RuboCop::Cop::Rails::WhereEquals::EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# column IN (?) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#66 +RuboCop::Cop::Rails::WhereEquals::IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column IN (:column) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#68 +RuboCop::Cop::Rails::WhereEquals::IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# column IS NULL +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#69 +RuboCop::Cop::Rails::WhereEquals::IS_NULL_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#34 +RuboCop::Cop::Rails::WhereEquals::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#35 +RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces consistent style when using `exists?`. +# +# Two styles are supported for this cop. When EnforcedStyle is 'exists' +# then the cop enforces `exists?(...)` over `where(...).exists?`. +# +# When EnforcedStyle is 'where' then the cop enforces +# `where(...).exists?` over `exists?(...)`. +# +# @example EnforcedStyle: exists (default) +# # bad +# User.where(name: 'john').exists? +# User.where(['name = ?', 'john']).exists? +# User.where('name = ?', 'john').exists? +# user.posts.where(published: true).exists? +# +# # good +# User.exists?(name: 'john') +# User.where('length(name) > 10').exists? +# user.posts.exists?(published: true) +# @example EnforcedStyle: where +# # bad +# User.exists?(name: 'john') +# User.exists?(['name = ?', 'john']) +# user.posts.exists?(published: true) +# +# # good +# User.where(name: 'john').exists? +# User.where(['name = ?', 'john']).exists? +# User.where('name = ?', 'john').exists? +# user.posts.where(published: true).exists? +# User.where('length(name) > 10').exists? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#50 +class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#61 + def exists_with_args?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#65 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#65 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#57 + def where_exists_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#112 + def build_good_method(args, dot:); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#120 + def build_good_method_exists(args); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#128 + def build_good_method_where(args, dot_source); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#98 + def convertable_args?(args); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#104 + def correction_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#86 + def exists_style?; end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#90 + def find_offenses(node, &block); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#82 + def where_style?; end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#54 +RuboCop::Cop::Rails::WhereExists::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#55 +RuboCop::Cop::Rails::WhereExists::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use `where.missing(...)` to find missing relationship records. +# +# This cop is enabled in Rails 6.1 or higher. +# +# @example +# # bad +# Post.left_joins(:author).where(authors: { id: nil }) +# +# # good +# Post.where.missing(:author) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#17 +class RuboCop::Cop::Rails::WhereMissing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#34 + def missing_relationship(param0); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#38 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#29 + def where_node_and_argument(param0); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#115 + def message(node, where_argument); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#111 + def multi_condition?(where_arg); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#67 + def register_offense(node, where_node, where_argument, range); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#93 + def remove_where_method(corrector, node, where_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#84 + def replace_range(child); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#78 + def replace_where_method(corrector, where_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#54 + def root_receiver(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#107 + def same_line?(left_joins_node, where_node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#63 + def same_relationship?(where, left_joins); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#22 +RuboCop::Cop::Rails::WhereMissing::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#24 +RuboCop::Cop::Rails::WhereMissing::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where manually constructed SQL +# in `where` can be replaced with `where.not(...)`. +# +# @example +# # bad +# User.where('name != ?', 'Gabe') +# User.where('name != :name', name: 'Gabe') +# User.where('name <> ?', 'Gabe') +# User.where('name <> :name', name: 'Gabe') +# User.where('name IS NOT NULL') +# User.where('name NOT IN (?)', ['john', 'jane']) +# User.where('name NOT IN (:names)', names: ['john', 'jane']) +# User.where('users.name != :name', name: 'Gabe') +# +# # good +# User.where.not(name: 'Gabe') +# User.where.not(name: nil) +# User.where.not(name: ['john', 'jane']) +# User.where.not(users: { name: 'Gabe' }) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#26 +class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#40 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#40 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#33 + def where_method_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#95 + def build_good_method(dot, column, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#72 + def extract_column_and_value(template_node, value_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#67 + def offense_range(node); end +end + +# column IS NOT NULL +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#63 +RuboCop::Cop::Rails::WhereNot::IS_NOT_NULL_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#30 +RuboCop::Cop::Rails::WhereNot::MSG = T.let(T.unsafe(nil), String) + +# column != ?, column <> ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#59 +RuboCop::Cop::Rails::WhereNot::NOT_EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column != :column, column <> :column +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#61 +RuboCop::Cop::Rails::WhereNot::NOT_EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# column NOT IN (?) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#60 +RuboCop::Cop::Rails::WhereNot::NOT_IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column NOT IN (:column) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#62 +RuboCop::Cop::Rails::WhereNot::NOT_IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#31 +RuboCop::Cop::Rails::WhereNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies calls to `where.not` with multiple hash arguments. +# +# The behavior of `where.not` changed in Rails 6.1. Prior to the change, +# `.where.not(trashed: true, role: 'admin')` evaluated to +# `WHERE trashed != TRUE AND role != 'admin'`. +# From Rails 6.1 onwards, this executes the query +# `WHERE NOT (trashed == TRUE AND roles == 'admin')`. +# +# @example +# # bad +# User.where.not(trashed: true, role: 'admin') +# User.where.not(trashed: true, role: ['moderator', 'admin']) +# User.joins(:posts).where.not(posts: { trashed: true, title: 'Rails' }) +# +# # good +# User.where.not(trashed: true) +# User.where.not(role: ['moderator', 'admin']) +# User.where.not(trashed: true).where.not(role: ['moderator', 'admin']) +# User.where.not('trashed = ? OR role = ?', true, 'admin') +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#25 +class RuboCop::Cop::Rails::WhereNotWithMultipleConditions < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#33 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#29 + def where_not_call?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#46 + def multiple_arguments_hash?(hash); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#26 +RuboCop::Cop::Rails::WhereNotWithMultipleConditions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#27 +RuboCop::Cop::Rails::WhereNotWithMultipleConditions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where manually constructed SQL +# in `where` can be replaced with ranges. +# +# @example +# # bad +# User.where('age >= ?', 18) +# User.where.not('age >= ?', 18) +# User.where('age < ?', 18) +# User.where('age >= ? AND age < ?', 18, 21) +# User.where('age >= :start', start: 18) +# User.where('users.age >= ?', 18) +# +# # good +# User.where(age: 18..) +# User.where.not(age: 18..) +# User.where(age: ...18) +# User.where(age: 18...21) +# User.where(users: { age: 18.. }) +# +# # good +# # There are no beginless ranges in ruby. +# User.where('age > ?', 18) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#37 +class RuboCop::Cop::Rails::WhereRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#70 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#63 + def where_range_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#174 + def build_good_method(method_name, column, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#96 + def extract_column_and_value(template_node, values_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#166 + def find_pair(hash_node, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#170 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#184 + def parentheses_needed?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#188 + def parentheses_not_needed?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#197 + def parenthesized_call_node?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#162 + def range_operator(comparison_operator); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#90 + def where_not?(node); end +end + +# column >= ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#48 +RuboCop::Cop::Rails::WhereRange::GTEQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column >= :value +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#54 +RuboCop::Cop::Rails::WhereRange::GTEQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# column <[=] ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#50 +RuboCop::Cop::Rails::WhereRange::LTEQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column <[=] :value +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#56 +RuboCop::Cop::Rails::WhereRange::LTEQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#43 +RuboCop::Cop::Rails::WhereRange::MSG = T.let(T.unsafe(nil), String) + +# column >= ? AND column <[=] ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#52 +RuboCop::Cop::Rails::WhereRange::RANGE_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column >= :value1 AND column <[=] :value2 +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#58 +RuboCop::Cop::Rails::WhereRange::RANGE_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#45 +RuboCop::Cop::Rails::WhereRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +module RuboCop::Cop::Style; end + +class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#70 + def inverse_block?(param0 = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#61 + def inverse_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#92 + def on_block(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#78 + def on_csend(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#92 + def on_numblock(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#78 + def on_send(node); end + + private + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#177 + def camel_case_constant?(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#121 + def correct_inverse_block(corrector, node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#112 + def correct_inverse_method(corrector, node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#128 + def correct_inverse_selector(block, corrector); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#181 + def dot_range(loc); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#166 + def end_parentheses(node, method_call); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#150 + def inverse_blocks; end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#145 + def inverse_methods; end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#191 + def message(method, inverse); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#154 + def negated?(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#162 + def not_to_receiver(node, method_call); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#172 + def possible_class_hierarchy_check?(lhs, rhs, method); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#158 + def relational_comparison_with_safe_navigation?(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/inverse_methods.rb#185 + def remove_end_parenthesis(corrector, node, method, method_call); end + + class << self + # source://rubocop-rails//lib/rubocop-rails.rb#22 + def autocorrect_incompatible_with; end + end +end + +class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_csend(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_send(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_yield(node); end + + private + + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 + def args_begin(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 + def args_end(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 + def args_parenthesized?(node); end + + class << self + # source://rubocop-rails//lib/rubocop-rails.rb#30 + def autocorrect_incompatible_with; end + end +end + +class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#60 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#68 + def on_and_asgn(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#86 + def on_args(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#120 + def on_block(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#90 + def on_blockarg(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#81 + def on_def(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#81 + def on_defs(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#126 + def on_if(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#104 + def on_in_pattern(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#99 + def on_lvasgn(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#94 + def on_masgn(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#120 + def on_numblock(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#74 + def on_op_asgn(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#68 + def on_or_asgn(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#108 + def on_send(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#126 + def on_until(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#126 + def on_while(node); end + + private + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#196 + def add_lhs_to_local_variables_scopes(rhs, lhs); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#204 + def add_masgn_lhs_variables(rhs, lhs); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#210 + def add_match_var_scopes(in_pattern_node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#144 + def add_scope(node, local_variables = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#190 + def allow_self(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#150 + def allowed_send_node?(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#181 + def on_argument(node); end + + # source://rubocop/1.66.1/lib/rubocop/cop/style/redundant_self.rb#173 + def regular_method_call?(node); end + + class << self + # source://rubocop-rails//lib/rubocop-rails.rb#38 + def autocorrect_incompatible_with; end + end +end + +# Common functionality for checking target rails version. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#6 +module RuboCop::Cop::TargetRailsVersion + # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#11 + def minimum_target_rails_version(version); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#23 + def support_target_rails_version?(version); end +end + +# Look for `railties` instead of `rails`, to support apps that only use a subset of `rails` +# See https://github.com/rubocop/rubocop/pull/11289 +# +# source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#39 +RuboCop::Cop::TargetRailsVersion::TARGET_GEM_NAME = T.let(T.unsafe(nil), String) + +# Informs the base RuboCop gem that it the Rails version is checked via `requires_gem` API, +# without needing to call this `#support_target_rails_version` method. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#9 +RuboCop::Cop::TargetRailsVersion::USES_REQUIRES_GEM_API = T.let(T.unsafe(nil), TrueClass) + +# RuboCop Rails project namespace +# +# source://rubocop-rails//lib/rubocop/rails.rb#5 +module RuboCop::Rails; end + +# source://rubocop-rails//lib/rubocop/rails.rb#8 +RuboCop::Rails::CONFIG = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/rails.rb#7 +RuboCop::Rails::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) + +# Because RuboCop doesn't yet support plugins, we have to monkey patch in a +# bit of our configuration. +# +# source://rubocop-rails//lib/rubocop/rails/inject.rb#7 +module RuboCop::Rails::Inject + class << self + # source://rubocop-rails//lib/rubocop/rails/inject.rb#8 + def defaults!; end + end +end + +# source://rubocop-rails//lib/rubocop/rails.rb#6 +RuboCop::Rails::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + +# It loads db/schema.rb and return Schema object. +# Cops refers database schema information with this module. +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#7 +module RuboCop::Rails::SchemaLoader + extend ::RuboCop::Rails::SchemaLoader + + # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#27 + def db_schema_path; end + + # It parses `db/schema.rb` and return it. + # It returns `nil` if it can't find `db/schema.rb`. + # So a cop that uses the loader should handle `nil` properly. + # + # @return [Schema, nil] + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#15 + def load(target_ruby_version, parser_engine); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#21 + def reset!; end + + private + + # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#41 + def load!(target_ruby_version, parser_engine); end +end + +# Represent an `add_index` +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#177 +class RuboCop::Rails::SchemaLoader::AddIndex < ::RuboCop::Rails::SchemaLoader::Index + # @return [AddIndex] a new instance of AddIndex + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#180 + def initialize(node); end + + # Returns the value of attribute table_name. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#178 + def table_name; end +end + +# Represent a column +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#117 +class RuboCop::Rails::SchemaLoader::Column + # @return [Column] a new instance of Column + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#120 + def initialize(node); end + + # Returns the value of attribute name. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 + def name; end + + # Returns the value of attribute not_null. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 + def not_null; end + + # Returns the value of attribute type. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 + def type; end + + private + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#130 + def analyze_keywords!(node); end +end + +# Represent an index +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 +class RuboCop::Rails::SchemaLoader::Index + # @return [Index] a new instance of Index + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#144 + def initialize(node); end + + # Returns the value of attribute columns. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 + def columns; end + + # Returns the value of attribute expression. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 + def expression; end + + # Returns the value of attribute name. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 + def name; end + + # Returns the value of attribute unique. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 + def unique; end + + private + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#161 + def analyze_keywords!(node); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#153 + def build_columns_or_expr(columns); end +end + +# Represent db/schema.rb +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#7 +class RuboCop::Rails::SchemaLoader::Schema + # @return [Schema] a new instance of Schema + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#10 + def initialize(ast); end + + # Returns the value of attribute add_indices. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#8 + def add_indices; end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#23 + def add_indices_by(table_name:); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#17 + def table_by(name:); end + + # Returns the value of attribute tables. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#8 + def tables; end + + private + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#31 + def build!(ast); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#60 + def each_add_index(ast); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#47 + def each_table(ast); end +end + +# Represent a table +# +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#71 +class RuboCop::Rails::SchemaLoader::Table + # @return [Table] a new instance of Table + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#74 + def initialize(node); end + + # Returns the value of attribute columns. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 + def columns; end + + # Returns the value of attribute indices. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 + def indices; end + + # Returns the value of attribute name. + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 + def name; end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#80 + def with_column?(name:); end + + private + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#86 + def build_columns(node); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#95 + def build_indices(node); end + + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#104 + def each_content(node, &block); end +end + +# This module holds the RuboCop Rails version information. +# +# source://rubocop-rails//lib/rubocop/rails/version.rb#6 +module RuboCop::Rails::Version + class << self + # source://rubocop-rails//lib/rubocop/rails/version.rb#9 + def document_version; end + end +end + +# source://rubocop-rails//lib/rubocop/rails/version.rb#7 +RuboCop::Rails::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi new file mode 100644 index 0000000..fefbd9b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi @@ -0,0 +1,329 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rake` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rake`. + + +# source://rubocop-rake//lib/rubocop/rake/version.rb#3 +module RuboCop; end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#4 +module RuboCop::Cop; end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#5 +module RuboCop::Cop::Rake; end + +# This cop detects class or module definition in a task or namespace, +# because it is defined to the top level. +# It is confusing because the scope looks in the task or namespace, +# but actually it is defined to the top level. +# +# @example +# # bad +# task :foo do +# class C +# end +# end +# +# # bad +# namespace :foo do +# module M +# end +# end +# +# # good - It is also defined to the top level, +# # but it looks expected behavior. +# class C +# end +# task :foo do +# end +# +# source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#31 +class RuboCop::Cop::Rake::ClassDefinitionInTask < ::RuboCop::Cop::Base + # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34 + def on_class(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34 + def on_module(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#32 +RuboCop::Cop::Rake::ClassDefinitionInTask::MSG = T.let(T.unsafe(nil), String) + +# Rake task definition should have a description with `desc` method. +# It is useful as a documentation of task. And Rake does not display +# task that does not have `desc` by `rake -T`. +# +# Note: This cop does not require description for the default task, +# because the default task is executed with `rake` without command. +# +# @example +# # bad +# task :do_something +# +# # bad +# task :do_something do +# end +# +# # good +# desc 'Do something' +# task :do_something +# +# # good +# desc 'Do something' +# task :do_something do +# end +# +# source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#30 +class RuboCop::Cop::Rake::Desc < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Rake::Helper::OnTask + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#40 + def on_task(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#36 + def prerequisites(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#76 + def can_insert_desc_to?(parent); end + + # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#62 + def parent_and_task(task_node); end + + # @return [Boolean] + # + # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#50 + def task_with_desc?(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#34 +RuboCop::Cop::Rake::Desc::MSG = T.let(T.unsafe(nil), String) + +# If namespaces are defined with the same name, Rake executes the both namespaces +# in definition order. +# It is redundant. You should squash them into one definition. +# This cop detects it. +# +# @example +# # bad +# namespace :foo do +# task :bar do +# end +# end +# namespace :foo do +# task :hoge do +# end +# end +# +# # good +# namespace :foo do +# task :bar do +# end +# task :hoge do +# end +# end +# +# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#30 +class RuboCop::Cop::Rake::DuplicateNamespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Rake::Helper::OnNamespace + + # @return [DuplicateNamespace] a new instance of DuplicateNamespace + # + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#35 + def initialize(*_arg0); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#67 + def message_for_dup(previous:, current:, namespace:); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#53 + def namespaces(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#40 + def on_namespace(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#76 + def source_location(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#33 +RuboCop::Cop::Rake::DuplicateNamespace::MSG = T.let(T.unsafe(nil), String) + +# If tasks are defined with the same name, Rake executes the both tasks +# in definition order. +# It is misleading sometimes. You should squash them into one definition. +# This cop detects it. +# +# @example +# # bad +# task :foo do +# p 'foo 1' +# end +# task :foo do +# p 'foo 2' +# end +# +# # good +# task :foo do +# p 'foo 1' +# p 'foo 2' +# end +# +# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#26 +class RuboCop::Cop::Rake::DuplicateTask < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Rake::Helper::OnTask + + # @return [DuplicateTask] a new instance of DuplicateTask + # + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#31 + def initialize(*_arg0); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#66 + def message_for_dup(previous:, current:, task_name:); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#52 + def namespaces(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#36 + def on_task(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#75 + def source_location(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#29 +RuboCop::Cop::Rake::DuplicateTask::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#6 +module RuboCop::Cop::Rake::Helper; end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#7 +module RuboCop::Cop::Rake::Helper::ClassDefinition + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::Cop::Rake::Helper::ClassDefinition + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#11 + def class_definition?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#22 + def in_class_definition?(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#7 +module RuboCop::Cop::Rake::Helper::OnNamespace + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#10 + def namespace?(param0 = T.unsafe(nil)); end + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#14 + def on_send(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#7 +module RuboCop::Cop::Rake::Helper::OnTask + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#14 + def on_send(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#10 + def task?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#7 +module RuboCop::Cop::Rake::Helper::TaskDefinition + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::Cop::Rake::Helper::TaskDefinition + + # @return [Boolean] + # + # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#19 + def in_task_or_namespace?(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#11 + def task_or_namespace?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/helper/task_name.rb#7 +module RuboCop::Cop::Rake::Helper::TaskName + extend ::RuboCop::Cop::Rake::Helper::TaskName + + # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_name.rb#10 + def task_name(node); end +end + +# This cop detects method definition in a task or namespace, +# because it is defined to the top level. +# It is confusing because the scope looks in the task or namespace, +# but actually it is defined to the top level. +# +# @example +# # bad +# task :foo do +# def helper_method +# do_something +# end +# end +# +# # bad +# namespace :foo do +# def helper_method +# do_something +# end +# end +# +# # good - It is also defined to the top level, +# # but it looks expected behavior. +# def helper_method +# end +# task :foo do +# end +# +# source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#33 +class RuboCop::Cop::Rake::MethodDefinitionInTask < ::RuboCop::Cop::Base + # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36 + def on_def(node); end + + # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36 + def on_defs(node); end +end + +# source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#34 +RuboCop::Cop::Rake::MethodDefinitionInTask::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rake//lib/rubocop/rake/version.rb#4 +module RuboCop::Rake; end + +# source://rubocop-rake//lib/rubocop/rake.rb#12 +RuboCop::Rake::CONFIG = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rake//lib/rubocop/rake.rb#11 +RuboCop::Rake::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) + +# source://rubocop-rake//lib/rubocop/rake.rb#8 +class RuboCop::Rake::Error < ::StandardError; end + +# Because RuboCop doesn't yet support plugins, we have to monkey patch in a +# bit of our configuration. +# +# source://rubocop-rake//lib/rubocop/rake/inject.rb#9 +module RuboCop::Rake::Inject + class << self + # source://rubocop-rake//lib/rubocop/rake/inject.rb#10 + def defaults!; end + end +end + +# source://rubocop-rake//lib/rubocop/rake.rb#10 +RuboCop::Rake::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rubocop-rake//lib/rubocop/rake/version.rb#5 +RuboCop::Rake::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop@1.66.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop@1.66.1.rbi new file mode 100644 index 0000000..eae6611 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/rubocop@1.66.1.rbi @@ -0,0 +1,58273 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +class Parser::Source::Comment + include ::RuboCop::Ext::Comment +end + +class Parser::Source::Range + include ::RuboCop::Ext::Range +end + +class Regexp::Expression::Base + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet +end + +class Regexp::Expression::Quantifier + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +# source://rubocop//lib/rubocop/version.rb#3 +module RuboCop; end + +class RuboCop::AST::ProcessedSource + include ::RuboCop::Ext::ProcessedSource +end + +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + include ::RuboCop::Ext::RegexpNode +end + +# This is a class that reads optional command line arguments to rubocop from environment variable. +# +# @api private +# +# source://rubocop//lib/rubocop/arguments_env.rb#6 +class RuboCop::ArgumentsEnv + class << self + # @api private + # + # source://rubocop//lib/rubocop/arguments_env.rb#7 + def read_as_arguments; end + end +end + +# This is a class that reads optional command line arguments to rubocop from .rubocop file. +# +# @api private +# +# source://rubocop//lib/rubocop/arguments_file.rb#6 +class RuboCop::ArgumentsFile + class << self + # @api private + # + # source://rubocop//lib/rubocop/arguments_file.rb#7 + def read_as_arguments; end + end +end + +# The CLI is a class responsible of handling all the command line interface +# logic. +# +# source://rubocop//lib/rubocop/cli.rb#8 +class RuboCop::CLI + # @return [CLI] a new instance of CLI + # + # source://rubocop//lib/rubocop/cli.rb#24 + def initialize; end + + # Returns the value of attribute config_store. + # + # source://rubocop//lib/rubocop/cli.rb#22 + def config_store; end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cli.rb#22 + def options; end + + # Entry point for the application logic. Here we + # do the command line arguments processing and inspect + # the target files. + # + # + # @api public + # @param args [Array] command line arguments + # @return [Integer] UNIX exit code + # + # source://rubocop//lib/rubocop/cli.rb#39 + def run(args = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cli.rb#156 + def act_on_options; end + + # source://rubocop//lib/rubocop/cli.rb#198 + def apply_default_formatter; end + + # source://rubocop//lib/rubocop/cli.rb#125 + def execute_runners; end + + # source://rubocop//lib/rubocop/cli.rb#182 + def handle_editor_mode; end + + # @raise [Finished] + # + # source://rubocop//lib/rubocop/cli.rb#187 + def handle_exiting_options; end + + # source://rubocop//lib/rubocop/cli.rb#144 + def parallel_by_default!; end + + # source://rubocop//lib/rubocop/cli.rb#80 + def profile_if_needed; end + + # source://rubocop//lib/rubocop/cli.rb#113 + def require_gem(name); end + + # source://rubocop//lib/rubocop/cli.rb#121 + def run_command(name); end + + # source://rubocop//lib/rubocop/cli.rb#174 + def set_options_to_config_loader; end + + # source://rubocop//lib/rubocop/cli.rb#133 + def suggest_extensions; end + + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/cli.rb#137 + def validate_options_vs_config; end +end + +# Home of subcommands in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command.rb#7 +module RuboCop::CLI::Command + class << self + # Find the command with a given name and run it in an environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#10 + def run(env, name); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#16 + def class_for(name); end + end +end + +# Generate a configuration file acting as a TODO list. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#8 +class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 + def add_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 + def add_inheritance_from_auto_generated_file(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 + def execute_runner; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 + def existing_configuration(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 + def line_length_cop(config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 + def line_length_enabled?(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 + def max_line_length(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 + def maybe_run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 + def only_exclude?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#162 + def options_config_in_root?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#69 + def options_has_only_flag?; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 + def relative_path_to_todo_from_options_config; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#100 + def reset_config_and_auto_gen_file; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 + def run_all_cops(line_length_contents); end + + # Do an initial run with only Layout/LineLength so that cops that + # depend on Layout/LineLength:Max get the correct value for that + # parameter. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 + def run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 + def same_max_line_length?(config1, config2); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 + def skip_line_length_cop(reason); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 + def write_config_file(file_name, file_string, rubocop_yml_contents); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#11 +RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 +RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) + +# A subcommand in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/base.rb#8 +class RuboCop::CLI::Command::Base + # @api private + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cli/command/base.rb#26 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#9 + def env; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#21 + def by_command_name(name); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name=(_arg0); end + + # @api private + # @private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#16 + def inherited(subclass); end + end +end + +# Run all the selected cops and report the result. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#8 +class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base + include ::RuboCop::Formatter::TextUtil + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#16 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#85 + def bug_tracker_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#69 + def display_error_summary(errors); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#56 + def display_summary(runner); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#61 + def display_warning_summary(warnings); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#22 + def execute_runner(paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#91 + def maybe_print_corrected_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#42 + def with_redirect; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#12 +RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Generate a .rubocop.yml file in the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#8 +class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#13 + def run; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 +RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) + +# Start Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + def run; end +end + +# Shows the given cops, or all cops by default, and their configurations +# for the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#9 +class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowCops] a new instance of ShowCops + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#67 + def config_lines(cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#63 + def cops_of_department(cops, department); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#25 + def print_available_cops; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#48 + def print_cop_details(cops); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#36 + def print_cops_of_department(registry, department, show_all); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#57 + def selected_cops_of_department(cops, department); end +end + +# Prints out url to documentation of provided cops +# or documentation base url by default. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#9 +class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowDocsUrl] a new instance of ShowDocsUrl + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#12 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#18 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#38 + def cops_array; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#24 + def print_documentation_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#42 + def registry_hash; end +end + +# Suggest RuboCop extensions to install based on Gemfile dependencies. +# Only primary dependencies are evaluated, so if a dependency depends on a +# gem with an extension, it is not suggested. However, if an extension is +# a transitive dependency, it will not be suggested. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 +class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#17 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#73 + def all_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#69 + def current_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#111 + def dependent_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#87 + def extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#103 + def installed_and_not_loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#91 + def installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#115 + def installed_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#99 + def loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#107 + def lockfile; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#95 + def not_installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#41 + def print_install_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#51 + def print_load_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#60 + def print_opt_out_instruction; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#119 + def puts(*args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#30 + def skip?; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#13 +RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Display version. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/version.rb#8 +class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/version.rb#11 + def run; end +end + +# source://rubocop//lib/rubocop/cli.rb#13 +RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Execution environment for a CLI command. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/environment.rb#7 +class RuboCop::CLI::Environment + # @api private + # @return [Environment] a new instance of Environment + # + # source://rubocop//lib/rubocop/cli/environment.rb#10 + def initialize(options, config_store, paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def config_store; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def options; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def paths; end + + # Run a command in this environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#17 + def run(name); end +end + +# source://rubocop//lib/rubocop/cli.rb#20 +class RuboCop::CLI::Finished < ::StandardError; end + +# source://rubocop//lib/rubocop/cli.rb#11 +RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#12 +RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#10 +RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#9 +RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) + +# This class represents the cache config of the caching RuboCop runs. +# +# @api private +# +# source://rubocop//lib/rubocop/cache_config.rb#6 +class RuboCop::CacheConfig + class << self + # @api private + # + # source://rubocop//lib/rubocop/cache_config.rb#7 + def root_dir; end + end +end + +# Converts RuboCop objects to and from the serialization format JSON. +# +# @api private +# +# source://rubocop//lib/rubocop/cached_data.rb#8 +class RuboCop::CachedData + # @api private + # @return [CachedData] a new instance of CachedData + # + # source://rubocop//lib/rubocop/cached_data.rb#9 + def initialize(filename); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#13 + def from_json(text); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#17 + def to_json(offenses); end + + private + + # Restore an offense object loaded from a JSON file. + # + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#47 + def deserialize_offenses(offenses); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#56 + def location_from_source_buffer(offense, source_buffer); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#40 + def message(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#23 + def serialize_offense(offense); end +end + +# and provides a way to check if each cop is enabled at arbitrary line. +# +# source://rubocop//lib/rubocop/comment_config.rb#6 +class RuboCop::CommentConfig + extend ::RuboCop::SimpleForwardable + + # @return [CommentConfig] a new instance of CommentConfig + # + # source://rubocop//lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop//lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop//lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop//lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop//lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop//lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop//lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # Collect cops that have been disabled or enabled by name in a directive comment + # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. + # + # source://rubocop//lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop//lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop//lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop//lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop//lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +# source://rubocop//lib/rubocop/comment_config.rb#9 +RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) + +# This class provides an API compatible with RuboCop::DirectiveComment +# to be used for cops that are disabled in the config file +# +# source://rubocop//lib/rubocop/comment_config.rb#13 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment + include ::RuboCop::Ext::Comment + + # @return [ConfigDisabledCopDirectiveComment] a new instance of ConfigDisabledCopDirectiveComment + # + # source://rubocop//lib/rubocop/comment_config.rb#21 + def initialize(cop_name); end + + # Returns the value of attribute line_number. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def line_number; end + + # Returns the value of attribute loc. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def loc; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def text; end +end + +# source://rubocop//lib/rubocop/comment_config.rb#19 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#18 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct + # Returns the value of attribute expression + # + # @return [Object] the current value of expression + def expression; end + + # Sets the attribute expression + # + # @param value [Object] the value to set the attribute expression to. + # @return [Object] the newly set value + def expression=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#28 +class RuboCop::CommentConfig::CopAnalysis < ::Struct + # Returns the value of attribute line_ranges + # + # @return [Object] the current value of line_ranges + def line_ranges; end + + # Sets the attribute line_ranges + # + # @param value [Object] the value to set the attribute line_ranges to. + # @return [Object] the newly set value + def line_ranges=(_); end + + # Returns the value of attribute start_line_number + # + # @return [Object] the current value of start_line_number + def start_line_number; end + + # Sets the attribute start_line_number + # + # @param value [Object] the value to set the attribute start_line_number to. + # @return [Object] the newly set value + def start_line_number=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# source://rubocop//lib/rubocop/config.rb#12 +class RuboCop::Config + include ::RuboCop::PathUtil + include ::RuboCop::FileFinder + extend ::RuboCop::SimpleForwardable + + # @return [Config] a new instance of Config + # + # source://rubocop//lib/rubocop/config.rb#30 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#170 + def active_support_extensions_enabled?; end + + # source://rubocop//lib/rubocop/config.rb#96 + def add_excludes_from_higher_level(highest_config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#197 + def allowed_camel_case_file?(file); end + + # Paths specified in configuration files starting with .rubocop are + # relative to the directory where that file is. Paths in other config files + # are relative to the current directory. This is so that paths in + # config/default.yml, for example, are not relative to RuboCop's config + # directory since that wouldn't work. + # + # source://rubocop//lib/rubocop/config.rb#241 + def base_dir_for_path_parameters; end + + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#271 + def bundler_lock_file_path; end + + # source://rubocop//lib/rubocop/config.rb#51 + def check; end + + # @api private + # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys + # + # source://rubocop//lib/rubocop/config.rb#142 + def clusivity_config_for_badge?(badge); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#108 + def deprecation_check; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#162 + def disabled_new_cops?; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#166 + def enabled_new_cops?; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#219 + def file_to_exclude?(file); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#178 + def file_to_include?(file); end + + # source://rubocop//lib/rubocop/config.rb#158 + def for_all_cops; end + + # Note: the 'Enabled' attribute is same as that returned by `for_cop` + # + # @return [Config] for the given cop merged with that of its department (if any) + # + # source://rubocop//lib/rubocop/config.rb#128 + def for_badge(badge); end + + # Note: the 'Enabled' attribute is calculated according to the department's + # and 'AllCops' configuration; other attributes are not inherited. + # + # @return [Config] for the given cop / cop name. + # + # source://rubocop//lib/rubocop/config.rb#122 + def for_cop(cop); end + + # Note: the 'Enabled' attribute will be present only if specified + # at the department's level + # + # @return [Config] for the given department name. + # + # source://rubocop//lib/rubocop/config.rb#153 + def for_department(department_name); end + + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#300 + def inspect; end + + # True if this is a config file that is shipped with RuboCop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#76 + def internal?; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#47 + def loaded_features; end + + # Returns the value of attribute loaded_path. + # + # source://rubocop//lib/rubocop/config.rb#20 + def loaded_path; end + + # source://rubocop//lib/rubocop/config.rb#81 + def make_excludes_absolute; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop//lib/rubocop/config.rb#232 + def path_relative_to_config(path); end + + # source://rubocop//lib/rubocop/config.rb#228 + def patterns_to_exclude; end + + # source://rubocop//lib/rubocop/config.rb#224 + def patterns_to_include; end + + # source://rubocop//lib/rubocop/config.rb#282 + def pending_cops; end + + # Returns true if there's a chance that an Include pattern matches hidden + # files, false if that's definitely not possible. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#211 + def possibly_include_hidden?; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#71 + def signature; end + + # source://rubocop//lib/rubocop/config.rb#266 + def smart_loaded_path; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#255 + def target_rails_version; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#67 + def to_s; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#58 + def validate_after_resolution; end + + private + + # source://rubocop//lib/rubocop/config.rb#350 + def department_of(qualified_cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#338 + def enable_cop?(qualified_cop_name, cop_options); end + + # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # source://rubocop//lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#312 + def read_rails_version_from_bundler_lock_file; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#307 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop//lib/rubocop/config.rb#22 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/config.rb#17 +class RuboCop::Config::CopConfig < ::Struct + # Returns the value of attribute metadata + # + # @return [Object] the current value of metadata + def metadata; end + + # Sets the attribute metadata + # + # @param value [Object] the value to set the attribute metadata to. + # @return [Object] the newly set value + def metadata=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/config.rb#19 +RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) + +# This class has methods related to finding configuration path. +# +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#8 +class RuboCop::ConfigFinder + extend ::RuboCop::FileFinder + + class << self + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#19 + def find_config_path(target_dir); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#26 + def project_root; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#17 + def project_root=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#69 + def expand_path(path); end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#40 + def find_project_dotfile(target_dir); end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#32 + def find_project_root; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#44 + def find_project_root_dot_config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#54 + def find_user_dotfile; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#62 + def find_user_xdg_config; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#12 +RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#9 +RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#11 +RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#10 +RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# source://rubocop//lib/rubocop/config_loader.rb#17 +class RuboCop::ConfigLoader + extend ::RuboCop::FileFinder + + class << self + # source://rubocop//lib/rubocop/config_loader.rb#137 + def add_excludes_from_files(config, config_file); end + + # Used to add features that were required inside a config or from + # the CLI using `--require`. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#198 + def add_loaded_features(loaded_features); end + + # source://rubocop//lib/rubocop/config_loader.rb#80 + def add_missing_namespaces(path, hash); end + + # source://rubocop//lib/rubocop/config_loader.rb#41 + def clear_options; end + + # Returns the path of .rubocop.yml searching upwards in the + # directory structure starting at the given directory where the + # inspected file is. If no .rubocop.yml is found there, the + # user's home directory is checked. If there's no .rubocop.yml + # there either, the path to the default file is returned. + # + # source://rubocop//lib/rubocop/config_loader.rb#104 + def configuration_file_for(target_dir); end + + # source://rubocop//lib/rubocop/config_loader.rb#108 + def configuration_from_file(config_file, check: T.unsafe(nil)); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def debug; end + + # Sets the attribute debug + # + # @param value the value to set the attribute debug to. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def debug=(_arg0); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def debug?; end + + # source://rubocop//lib/rubocop/config_loader.rb#147 + def default_configuration; end + + # Sets the attribute default_configuration + # + # @param value the value to set the attribute default_configuration to. + # + # source://rubocop//lib/rubocop/config_loader.rb#35 + def default_configuration=(_arg0); end + + # Returns the value of attribute disable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def disable_pending_cops; end + + # Sets the attribute disable_pending_cops + # + # @param value the value to set the attribute disable_pending_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def disable_pending_cops=(_arg0); end + + # Returns the value of attribute enable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def enable_pending_cops; end + + # Sets the attribute enable_pending_cops + # + # @param value the value to set the attribute enable_pending_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def enable_pending_cops=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def ignore_parent_exclusion; end + + # Sets the attribute ignore_parent_exclusion + # + # @param value the value to set the attribute ignore_parent_exclusion to. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def ignore_parent_exclusion=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def ignore_parent_exclusion?; end + + # Returns the value of attribute ignore_unrecognized_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def ignore_unrecognized_cops; end + + # Sets the attribute ignore_unrecognized_cops + # + # @param value the value to set the attribute ignore_unrecognized_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#33 + def ignore_unrecognized_cops=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#155 + def inject_defaults!(project_root); end + + # source://rubocop//lib/rubocop/config_loader.rb#47 + def load_file(file, check: T.unsafe(nil)); end + + # @raise [TypeError] + # + # source://rubocop//lib/rubocop/config_loader.rb#67 + def load_yaml_configuration(absolute_path); end + + # Returns the value of attribute loaded_features. + # + # source://rubocop//lib/rubocop/config_loader.rb#36 + def loaded_features; end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # source://rubocop//lib/rubocop/config_loader.rb#95 + def merge(base_hash, derived_hash); end + + # Merges the given configuration with the default one. + # + # source://rubocop//lib/rubocop/config_loader.rb#191 + def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_loader.rb#128 + def pending_cops_only_qualified(pending_cops); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader.rb#132 + def possible_new_cops?(config); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. + # + # source://rubocop//lib/rubocop/config_loader.rb#166 + def project_root; end + + # source://rubocop//lib/rubocop/config_loader.rb#175 + def warn_on_pending_cops(pending_cops); end + + # source://rubocop//lib/rubocop/config_loader.rb#183 + def warn_pending_cop(cop); end + + private + + # source://rubocop//lib/rubocop/config_loader.rb#212 + def check_duplication(yaml_code, absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#204 + def file_path(file); end + + # Read the specified file, or exit with a friendly, concise message on + # stderr. Care is taken to use the standard OS exit code for a "file not + # found" error. + # + # source://rubocop//lib/rubocop/config_loader.rb#232 + def read_file(absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#208 + def resolver; end + + # source://rubocop//lib/rubocop/config_loader.rb#238 + def yaml_tree_to_hash(yaml_tree); end + + # source://rubocop//lib/rubocop/config_loader.rb#248 + def yaml_tree_to_hash!(yaml_tree); end + end +end + +# source://rubocop//lib/rubocop/config_loader.rb#20 +RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/config_loader.rb#18 +RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/config_loader.rb#19 +RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# A help class for ConfigLoader that handles configuration resolution. +# +# @api private +# +# source://rubocop//lib/rubocop/config_loader_resolver.rb#9 +class RuboCop::ConfigLoaderResolver + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the + # base configuration are relative to the directory where the base configuration file is. For the + # derived configuration, we need to make those paths relative to where the derived configuration + # file is. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 + def fix_include_paths(base_config_path, hash, path, key, value); end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 + def merge(base_hash, derived_hash, **opts); end + + # Merges the given configuration with the default one. If + # AllCops:DisabledByDefault is true, it changes the Enabled params so that + # only cops from user configuration are enabled. If + # AllCops:EnabledByDefault is true, it changes the Enabled params so that + # only cops explicitly disabled in user configuration are disabled. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 + def merge_with_default(config, config_file, unset_nil:); end + + # An `Enabled: true` setting in user configuration for a cop overrides an + # `Enabled: false` setting for its department. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 + def override_department_setting_for_cops(base_hash, derived_hash); end + + # If a cop was previously explicitly enabled, but then superseded by the + # department being disabled, disable it. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 + def override_enabled_for_disabled_departments(base_hash, derived_hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#19 + def resolve_inheritance(path, hash, file, debug); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 + def resolve_inheritance_from_gems(hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#10 + def resolve_requires(path, hash); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 + def base_configs(path, inherit_from, file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#176 + def determine_inherit_mode(hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 + def disabled?(hash, department); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 + def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 + def gem_config_path(gem_name, relative_config_path); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 + def handle_disabled_by_default(config, new_default_configuration); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#220 + def inherited_file(path, inherit_from, file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#204 + def merge_hashes?(base_hash, derived_hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#241 + def remote_file?(uri); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 + def should_merge?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#200 + def should_override?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#182 + def should_union?(derived_hash, base_hash, root_mode, key); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 + def transform(config, &block); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 + def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end +end + +# Raised when a RuboCop configuration file is not found. +# +# source://rubocop//lib/rubocop/config_loader.rb#9 +class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end + +# This class handles obsolete configuration. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#4 +class RuboCop::ConfigObsoletion + # @api private + # @return [ConfigObsoletion] a new instance of ConfigObsoletion + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#35 + def initialize(config); end + + # @api private + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#41 + def reject_obsolete!; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 + def rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 + def warnings; end + + private + + # Cop rules are keyed by the name of the original cop + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#72 + def load_cop_rules(rules); end + + # Parameter rules may apply to multiple cops and multiple parameters + # and are given as an array. Each combination is turned into a separate + # rule object. + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#85 + def load_parameter_rules(rules); end + + # Default rules for obsoletions are in config/obsoletion.yml + # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#52 + def load_rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#98 + def obsoletions; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + def files; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + def files=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#26 + def legacy_cop_names; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#8 +RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#7 +class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#14 + def message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#10 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#28 + def value; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#8 +RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#7 +class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#10 + def message; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#8 +RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for ConfigObsoletion rules relating to cops +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#7 +class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [CopRule] a new instance of CopRule + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#10 + def initialize(config, old_name); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#15 + def cop_rule?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#19 + def message; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#8 + def old_name; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#28 + def violated?; end + + # Cop rules currently can only be failures, not warnings + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#24 + def warning?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#7 +RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#8 +class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [ExtractedCop] a new instance of ExtractedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#11 + def initialize(config, old_name, gem); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def department; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def gem; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#23 + def rule_message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#17 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#32 + def affected_cops; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#41 + def feature_loaded?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#14 +RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Base class for ConfigObsoletion rules relating to parameters +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#7 +class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [ParameterRule] a new instance of ParameterRule + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#10 + def initialize(config, cop, parameter, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def cop; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def parameter; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#17 + def parameter_rule?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#21 + def violated?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#25 + def warning?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + def alternative; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + def alternatives; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 + def reason; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 + def severity; end +end + +# Encapsulation of a ConfigObsoletion rule for removing +# a previously defined cop. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#8 +class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RemovedCop] a new instance of RemovedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#13 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def old_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#18 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#36 + def alternatives; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#32 + def reason; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#11 +RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for renaming +# a cop or moving it to a new department. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#8 +class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RenamedCop] a new instance of RenamedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 + def initialize(config, old_name, new_name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 + def new_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#16 + def rule_message; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#22 + def moved?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#29 + def verb; end +end + +# Abstract base class for ConfigObsoletion rules +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#7 +class RuboCop::ConfigObsoletion::Rule + # @api private + # @return [Rule] a new instance of Rule + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#8 + def initialize(config); end + + # Does this rule relate to cops? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#13 + def cop_rule?; end + + # Does this rule relate to parameters? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#18 + def parameter_rule?; end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#22 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#28 + def config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#36 + def smart_loaded_path; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#30 + def to_sentence(collection, connector: T.unsafe(nil)); end +end + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#8 +class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [SplitCop] a new instance of SplitCop + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#11 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#16 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#22 + def alternatives; end +end + +# This class handles collecting the options for regenerating a TODO file. +# +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#6 +class RuboCop::ConfigRegeneration + # Get options from the comment in the TODO file, and parse them as options + # + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#12 + def options; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#29 + def generation_command; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_regeneration.rb#25 + def todo_exists?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#7 +RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#8 +RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#9 +RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Handles caching of configurations and association of inspected +# ruby files to configurations. +# +# source://rubocop//lib/rubocop/config_store.rb#6 +class RuboCop::ConfigStore + # @return [ConfigStore] a new instance of ConfigStore + # + # source://rubocop//lib/rubocop/config_store.rb#10 + def initialize; end + + # If type (file/dir) is known beforehand, + # prefer using #for_file or #for_dir for improved performance + # + # source://rubocop//lib/rubocop/config_store.rb#52 + def for(file_or_dir); end + + # source://rubocop//lib/rubocop/config_store.rb#61 + def for_dir(dir); end + + # source://rubocop//lib/rubocop/config_store.rb#42 + def for_file(file); end + + # source://rubocop//lib/rubocop/config_store.rb#46 + def for_pwd; end + + # source://rubocop//lib/rubocop/config_store.rb#33 + def force_default_config!; end + + # source://rubocop//lib/rubocop/config_store.rb#28 + def options_config=(options_config); end + + # source://rubocop//lib/rubocop/config_store.rb#37 + def unvalidated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#7 + def validated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#7 + def validated?; end +end + +# Handles validation of configuration, for example cop names, parameter +# names, and Ruby versions. +# +# source://rubocop//lib/rubocop/config_validator.rb#6 +class RuboCop::ConfigValidator + extend ::RuboCop::SimpleForwardable + + # @return [ConfigValidator] a new instance of ConfigValidator + # + # source://rubocop//lib/rubocop/config_validator.rb#26 + def initialize(config); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config_validator.rb#62 + def target_ruby_version; end + + # source://rubocop//lib/rubocop/config_validator.rb#32 + def validate; end + + # Validations that should only be run after all config resolving has + # taken place: + # * The target ruby version is only checked once the entire inheritance + # chain has been loaded so that only the final value is validated, and + # any obsolete but overridden values are ignored. + # + # source://rubocop//lib/rubocop/config_validator.rb#58 + def validate_after_resolution; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#66 + def validate_section_presence(name); end + + private + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#103 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#253 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_validator.rb#76 + def check_obsoletions; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#83 + def check_target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#194 + def each_invalid_parameter(cop_name); end + + # source://rubocop//lib/rubocop/config_validator.rb#119 + def list_unknown_cops(invalid_cop_names); end + + # FIXME: Handling colors in exception messages like this is ugly. + # + # source://rubocop//lib/rubocop/config_validator.rb#273 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop//lib/rubocop/config_validator.rb#241 + def reject_conflicting_safe_settings; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#232 + def reject_mutually_exclusive_defaults; end + + # source://rubocop//lib/rubocop/config_validator.rb#141 + def suggestion(name); end + + # Returns the value of attribute target_ruby. + # + # source://rubocop//lib/rubocop/config_validator.rb#74 + def target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#206 + def validate_enforced_styles(valid_cop_names); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#168 + def validate_new_cops_parameter; end + + # source://rubocop//lib/rubocop/config_validator.rb#179 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#226 + def validate_support_and_has_list(name, formats, valid); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#157 + def validate_syntax_cop; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#10 +RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/config_validator.rb#21 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/config_validator.rb#20 +RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#19 +RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#12 +RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#16 +RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/util.rb#4 +module RuboCop::Cop; end + +# This module checks for nodes that should be aligned to the left or right. +# This amount is determined by the instance variable @column_delta. +# +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#7 +module RuboCop::Cop::Alignment + private + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#26 + def check_alignment(items, base_column = T.unsafe(nil)); end + + # Returns the value of attribute column_delta. + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#12 + def column_delta; end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#14 + def configured_indentation_width; end + + # @api public + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#58 + def display_column(range); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 + def each_bad_alignment(items, base_column); end + + # @deprecated Use processed_source.line_with_comment?(line) + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 + def end_of_line_comment(line); end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#18 + def indentation(node); end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#22 + def offset(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 + def register_offense(offense_node, message_node); end + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#64 + def within?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#10 +RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) + +# This class does autocorrection of nodes that should just be moved to +# the left or to the right, amount being determined by the instance +# variable column_delta. +# +# source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#8 +class RuboCop::Cop::AlignmentCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::Alignment + + class << self + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#29 + def align_end(corrector, processed_source, node, align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#15 + def correct(corrector, processed_source, node, column_delta); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#124 + def alignment_column(align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#40 + def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#81 + def block_comment_within?(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#87 + def calculate_range(expr, line_begin_pos, column_delta); end + + # Some special kinds of string literals are not composed of literal + # characters between two delimiters: + # - The source map of `?a` responds to :begin and :end but its end is + # nil. + # - The source map of `__FILE__` responds to neither :begin nor :end. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#75 + def delimited_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#110 + def each_line(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#60 + def inside_string_range(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#54 + def inside_string_ranges(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#99 + def remove(range, corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#118 + def whitespace_range(node); end + end +end + +# This module encapsulates the ability to allow certain identifiers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#6 +module RuboCop::Cop::AllowedIdentifiers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#9 + def allowed_identifier?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#13 + def allowed_identifiers; end +end + +# if a variable starts with a sigil it will be removed +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#7 +RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to allow certain methods when +# parsing. Even if the code is in offense, if it contains methods +# that are allowed. This module is equivalent to the IgnoredMethods module, +# which will be deprecated in RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#9 +module RuboCop::Cop::AllowedMethods + private + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 + def allowed_method?(name); end + + # @api public + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35 + def cop_config_allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 + def cop_config_deprecated_values; end + + # @deprecated Use allowed_method? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18 + def ignored_method?; end +end + +# This module encapsulates the ability to ignore certain lines when +# parsing. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#7 +module RuboCop::Cop::AllowedPattern + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 + def allowed_line?(line); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58 + def cop_config_deprecated_methods_values; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52 + def cop_config_patterns_values; end + + # @deprecated Use allowed_line? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 + def ignored_line?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 + def matches_allowed_pattern?(line); end + + # @deprecated Use matches_allowed_pattern? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 + def matches_ignored_pattern?; end +end + +# This module encapsulates the ability to allow certain receivers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6 +module RuboCop::Cop::AllowedReceivers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7 + def allowed_receiver?(receiver); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29 + def allowed_receivers; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13 + def receiver_name(receiver); end +end + +# Error raised when an unqualified cop name is used that could +# refer to two or more cops under different departments +# +# source://rubocop//lib/rubocop/cop/registry.rb#7 +class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error + # @return [AmbiguousCopName] a new instance of AmbiguousCopName + # + # source://rubocop//lib/rubocop/cop/registry.rb#11 + def initialize(name, origin, badges); end +end + +# source://rubocop//lib/rubocop/cop/registry.rb#8 +RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) + +# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). +# +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 +class RuboCop::Cop::AnnotationComment + # @param comment [Parser::Source::Comment] + # @param keywords [Array] + # @return [AnnotationComment] a new instance of AnnotationComment + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 + def initialize(comment, keywords); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 + def annotation?; end + + # Returns the range bounds for just the annotation + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 + def bounds; end + + # Returns the value of attribute colon. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def colon; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def comment; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 + def correct?(colon:); end + + # Returns the value of attribute keyword. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def keyword; end + + # Returns the value of attribute margin. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def margin; end + + # Returns the value of attribute note. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def note; end + + # Returns the value of attribute space. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def space; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 + def just_keyword_of_sentence?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 + def keyword_appearance?; end + + # Returns the value of attribute keywords. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 + def keywords; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 + def regex; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + def split_comment(comment); end +end + +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 +RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Handles the `MinSize` configuration option for array-based cops +# `Style/SymbolArray` and `Style/WordArray`, which check for use of the +# relevant percent literal syntax such as `%i[...]` and `%w[...]` +# +# source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#8 +module RuboCop::Cop::ArrayMinSize + private + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#19 + def array_style_detected(style, ary_size); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#11 + def below_array_length?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#38 + def largest_brackets_size(style, ary_size); end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#15 + def min_size_config; end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#48 + def smallest_percent_size(style, ary_size); end +end + +# Common code for ordinary arrays with [] that can be written with % +# syntax. +# +# source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#7 +module RuboCop::Cop::ArraySyntax + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#10 + def bracketed_array_of?(element_type, node); end +end + +# extend this module to signal autocorrection support +# +# source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#6 +module RuboCop::Cop::AutoCorrector + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#7 + def support_autocorrect?; end +end + +# This module encapsulates the logic for autocorrect behavior for a cop. +# +# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#6 +module RuboCop::Cop::AutocorrectLogic + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#7 + def autocorrect?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#31 + def autocorrect_enabled?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#15 + def autocorrect_requested?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#11 + def autocorrect_with_disable_uncorrectable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#19 + def correctable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#23 + def disable_uncorrectable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#27 + def safe_autocorrect?; end + + private + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 + def disable_offense(offense_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#118 + def disable_offense_at_end_of_line(range, eol_comment); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#122 + def disable_offense_before_and_after(range_by_lines); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#61 + def disable_offense_with_eol_or_surround_comment(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#114 + def max_line_length; end + + # Expand the given range to include all of any lines it covers. Does not + # include newline at end of the last line. + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 + def range_by_lines(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#95 + def range_of_first_line(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#72 + def surrounding_heredoc(offense_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#83 + def surrounding_percent_array(offense_range); end +end + +# Identifier of all cops containing a department and cop name. +# +# All cops are identified by their badge. For example, the badge for +# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. +# Badges can be parsed as either `Department/CopName` or just `CopName` to +# allow for badge references in source files that omit the department for +# RuboCop to infer. +# +# source://rubocop//lib/rubocop/cop/badge.rb#12 +class RuboCop::Cop::Badge + # @return [Badge] a new instance of Badge + # + # source://rubocop//lib/rubocop/cop/badge.rb#34 + def initialize(class_name_parts); end + + # source://rubocop//lib/rubocop/cop/badge.rb#41 + def ==(other); end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def cop_name; end + + # Returns the value of attribute department. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department; end + + # Returns the value of attribute department_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department_name; end + + # source://rubocop//lib/rubocop/cop/badge.rb#41 + def eql?(other); end + + # source://rubocop//lib/rubocop/cop/badge.rb#46 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#51 + def match?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#59 + def qualified?; end + + # source://rubocop//lib/rubocop/cop/badge.rb#55 + def to_s; end + + # source://rubocop//lib/rubocop/cop/badge.rb#63 + def with_department(department); end + + class << self + # source://rubocop//lib/rubocop/cop/badge.rb#27 + def camel_case(name_part); end + + # source://rubocop//lib/rubocop/cop/badge.rb#15 + def for(class_name); end + + # source://rubocop//lib/rubocop/cop/badge.rb#23 + def parse(identifier); end + end +end + +# A scaffold for concrete cops. +# +# The Cop::Base class is meant to be extended. +# +# Cops track offenses and can autocorrect them on the fly. +# +# A commissioner object is responsible for traversing the AST and invoking +# the specific callbacks on each cop. +# +# First the callback `on_new_investigation` is called; +# if a cop needs to do its own processing of the AST or depends on +# something else. +# +# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called +# with their respective nodes. +# +# Finally the callback `on_investigation_end` is called. +# +# Within these callbacks, cops are meant to call `add_offense` or +# `add_global_offense`. Use the `processed_source` method to +# get the currently processed source being investigated. +# +# In case of invalid syntax / unparsable content, +# the callback `on_other_file` is called instead of all the other +# `on_...` callbacks. +# +# Private methods are not meant for custom cops consumption, +# nor are any instance variables. +# +# source://rubocop//lib/rubocop/cop/base.rb#34 +class RuboCop::Cop::Base + include ::RuboCop::AST::Sexp + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + include ::RuboCop::Cop::IgnoredNode + include ::RuboCop::Cop::AutocorrectLogic + extend ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cop/base.rb#156 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#272 + def active_support_extensions_enabled?; end + + # Adds an offense that has no particular location. + # No correction can be applied to global offenses + # + # source://rubocop//lib/rubocop/cop/base.rb#189 + def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end + + # Adds an offense on the specified range (or node with an expression) + # Unless that offense is disabled for this range, a corrector will be yielded + # to provide the cop the opportunity to autocorrect the offense. + # If message is not specified, the method `message` will be called. + # + # source://rubocop//lib/rubocop/cop/base.rb#201 + def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#347 + def always_autocorrect?; end + + # Called before any investigation + # + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#333 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#318 + def callbacks_needed; end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/base.rb#43 + def config; end + + # source://rubocop//lib/rubocop/cop/base.rb#252 + def config_to_allow_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#256 + def config_to_allow_offenses=(hash); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#353 + def contextual_autocorrect?; end + + # Configuration Helpers + # + # source://rubocop//lib/rubocop/cop/base.rb#246 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/base.rb#238 + def cop_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#289 + def excluded_file?(file); end + + # This method should be overridden when a cop's behavior depends + # on state that lives outside of these locations: + # + # (1) the file under inspection + # (2) the cop's source code + # (3) the config (eg a .rubocop.yml file) + # + # For example, some cops may want to look at other parts of + # the codebase being inspected to find violations. A cop may + # use the presence or absence of file `foo.rb` to determine + # whether a certain violation exists in `bar.rb`. + # + # Overriding this method allows the cop to indicate to RuboCop's + # ResultCache system when those external dependencies change, + # ie when the ResultCache should be invalidated. + # + # source://rubocop//lib/rubocop/cop/base.rb#234 + def external_dependency_checksum; end + + # source://rubocop//lib/rubocop/cop/base.rb#357 + def inspect; end + + # Gets called if no message is specified when calling `add_offense` or + # `add_global_offense` + # Cops are discouraged to override this; instead pass your message directly + # + # source://rubocop//lib/rubocop/cop/base.rb#183 + def message(_range = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/base.rb#238 + def name; end + + # @deprecated Make potential errors with previous API more obvious + # + # source://rubocop//lib/rubocop/cop/base.rb#309 + def offenses; end + + # Called after all on_... have been called + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#170 + def on_investigation_end; end + + # Called before all on_... have been called + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#164 + def on_new_investigation; end + + # Called instead of all on_... callbacks for unrecognized files / syntax errors + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#176 + def on_other_file; end + + # There should be very limited reasons for a Cop to do it's own parsing + # + # source://rubocop//lib/rubocop/cop/base.rb#294 + def parse(source, path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/base.rb#264 + def parser_engine; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/base.rb#43 + def processed_source; end + + # Called between investigations + # + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#300 + def ready; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#280 + def relevant_file?(file); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#276 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/cop/base.rb#268 + def target_rails_version; end + + # source://rubocop//lib/rubocop/cop/base.rb#260 + def target_ruby_version; end + + private + + # source://rubocop//lib/rubocop/cop/base.rb#475 + def annotate(message); end + + # source://rubocop//lib/rubocop/cop/base.rb#369 + def apply_correction(corrector); end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#439 + def attempt_correction(range, corrector); end + + # Reserved for Cop::Cop + # + # source://rubocop//lib/rubocop/cop/base.rb#365 + def callback_argument(range); end + + # Called to complete an investigation + # + # source://rubocop//lib/rubocop/cop/base.rb#398 + def complete_investigation; end + + # @return [Symbol, Corrector] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#413 + def correct(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#383 + def current_corrector; end + + # Reserved for Commissioner: + # + # source://rubocop//lib/rubocop/cop/base.rb#375 + def current_offense_locations; end + + # source://rubocop//lib/rubocop/cop/base.rb#387 + def current_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#379 + def currently_disabled_lines; end + + # source://rubocop//lib/rubocop/cop/base.rb#503 + def custom_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#499 + def default_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#453 + def disable_uncorrectable(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#489 + def enabled_line?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#481 + def file_name_matches_any?(file, parameter, default_result); end + + # source://rubocop//lib/rubocop/cop/base.rb#471 + def find_message(range, message); end + + # source://rubocop//lib/rubocop/cop/base.rb#495 + def find_severity(_range, severity); end + + # source://rubocop//lib/rubocop/cop/base.rb#516 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#460 + def range_from_node_or_range(node_or_range); end + + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#408 + def reset_investigation; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#524 + def target_satisfies_all_gem_version_requirements?; end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#428 + def use_corrector(range, corrector); end + + class << self + # List of cops that should not try to autocorrect at the same + # time as this cop + # + # @api public + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/base.rb#59 + def autocorrect_incompatible_with; end + + # Naming + # + # source://rubocop//lib/rubocop/cop/base.rb#93 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#323 + def callbacks_needed; end + + # source://rubocop//lib/rubocop/cop/base.rb#97 + def cop_name; end + + # source://rubocop//lib/rubocop/cop/base.rb#101 + def department; end + + # Returns an url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. + # + # @api public + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/base.rb#70 + def documentation_url(config = T.unsafe(nil)); end + + # Call for abstract Cop classes + # + # source://rubocop//lib/rubocop/cop/base.rb#81 + def exclude_from_registry; end + + # Returns the value of attribute gem_requirements. + # + # source://rubocop//lib/rubocop/cop/base.rb#138 + def gem_requirements; end + + # @private + # + # source://rubocop//lib/rubocop/cop/base.rb#74 + def inherited(subclass); end + + # Override and return the Force class(es) you need to join + # + # source://rubocop//lib/rubocop/cop/base.rb#118 + def joining_forces; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#105 + def lint?; end + + # Returns true if the cop name or the cop namespace matches any of the + # given names. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#111 + def match?(given_names); end + + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # + # @api public + # @param gem_name [String] + # @param version_requirements [Array] The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # source://rubocop//lib/rubocop/cop/base.rb#151 + def requires_gem(gem_name, *version_requirements); end + + # Returns if class supports autocorrect. + # It is recommended to extend AutoCorrector instead of overriding + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#87 + def support_autocorrect?; end + + # Override if your cop should be called repeatedly for multiple investigations + # Between calls to `on_new_investigation` and `on_investigation_end`, + # the result of `processed_source` will remain constant. + # You should invalidate any caches that depend on the current `processed_source` + # in the `on_new_investigation` callback. + # If your cop does autocorrections, be aware that your instance may be called + # multiple times with the same `processed_source.path` but different content. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#129 + def support_multiple_source?; end + + private + + # source://rubocop//lib/rubocop/cop/base.rb#391 + def restrict_on_send; end + end +end + +# source://rubocop//lib/rubocop/cop/base.rb#395 +RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) + +# Reports of an investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/base.rb#48 +class RuboCop::Cop::Base::InvestigationReport < ::Struct + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + def cop=(_); end + + # Returns the value of attribute corrector + # + # @return [Object] the current value of corrector + def corrector; end + + # Sets the attribute corrector + # + # @param value [Object] the value to set the attribute corrector to. + # @return [Object] the newly set value + def corrector=(_); end + + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + def offenses=(_); end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + def processed_source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# List of methods names to restrict calls for `on_send` / `on_csend` +# +# source://rubocop//lib/rubocop/cop/base.rb#51 +RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#5 +module RuboCop::Cop::Bundler; end + +# A Gem's requirements should be listed only once in a Gemfile. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rubocop' +# +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :test do +# gem 'rubocop' +# end +# +# # good +# group :development, :test do +# gem 'rubocop' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# +# # good - conditional declaration +# if Dir.exist?(local) +# gem 'rubocop', path: local +# elsif ENV['RUBOCOP_VERSION'] == 'master' +# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' +# else +# gem 'rubocop', '~> 0.90.0' +# end +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 +class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 + def conditional_declaration?(nodes); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 + def duplicated_gem_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 + def register_offense(node, gem_name, line_of_first_occurrence); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 + def within_conditional?(node, conditional_node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 +RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) + +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + +# Each gem in the Gemfile should have a comment explaining +# its purpose in the project, or the reason for its version +# or source. +# +# The optional "OnlyFor" configuration array +# can be used to only register offenses when the gems +# use certain options or have version specifiers. +# +# When "version_specifiers" is included, a comment +# will be enforced if the gem has any version specifier. +# +# When "restrictive_version_specifiers" is included, a comment +# will be enforced if the gem has a version specifier that +# holds back the version of the gem. +# +# For any other value in the array, a comment will be enforced for +# a gem if an option by the same name is present. +# A useful use case is to enforce a comment when using +# options that change the source of a gem: +# +# - `bitbucket` +# - `gist` +# - `git` +# - `github` +# - `source` +# +# For a full list of options supported by bundler, +# see https://bundler.io/man/gemfile.5.html +# . +# +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: ['restrictive_version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# gem 'foo', '>= 1.0' +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: ['version_specifiers', 'github'] +# # bad +# +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# gem 'bar', '< 2.1' +# +# # good +# +# # Using this fork because baz +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# # Version 2.1 introduces breaking change baz +# gem 'bar', '< 2.1' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 +class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#94 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#135 + def checked_options_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#109 + def commented?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#105 + def commented_any_descendant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#159 + def contains_checked_options?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#163 + def gem_options(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#130 + def ignored_gem?(node); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#116 + def precede?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#126 + def preceding_comment?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#120 + def preceding_lines(node); end + + # Version specifications that restrict all updates going forward. This excludes versions + # like ">= 1.0" or "!= 2.0.3". + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#152 + def restrictive_version_specified_gem?(node); end + + # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, + # as long as it has one we know there's at least one version specifier. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#145 + def version_specified_gem?(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#88 +RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#87 +RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#91 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#90 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#92 +RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#89 +RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# Verifies that a project contains Gemfile or gems.rb file and correct +# associated lock file based on the configuration. +# +# @example EnforcedStyle: Gemfile (default) +# # bad +# Project contains gems.rb and gems.locked files +# +# # bad +# Project contains Gemfile and gems.locked file +# +# # good +# Project contains Gemfile and Gemfile.lock +# @example EnforcedStyle: gems.rb +# # bad +# Project contains Gemfile and Gemfile.lock files +# +# # bad +# Project contains gems.rb and Gemfile.lock file +# +# # good +# Project contains gems.rb and gems.locked files +# +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 +class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#43 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#88 + def expected_gemfile?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#80 + def gemfile_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#93 + def gemfile_required?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#84 + def gems_rb_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#97 + def gems_rb_required?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#58 + def register_gemfile_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#69 + def register_gems_rb_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#53 + def register_offense(file_path, basename); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 +RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#41 +RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#36 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#32 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#38 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#34 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) + +# Enforce that Gem version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# # bad +# gem 'rubocop' +# +# # good +# gem 'rubocop', '~> 1.12' +# +# # good +# gem 'rubocop', '>= 1.10.0' +# +# # good +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # good +# gem 'rubocop', branch: 'feature-branch' +# +# # good +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # good +# gem 'rubocop', tag: 'v1.17.0' +# @example EnforcedStyle: forbidden +# # good +# gem 'rubocop' +# +# # bad +# gem 'rubocop', '~> 1.12' +# +# # bad +# gem 'rubocop', '>= 1.10.0' +# +# # bad +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # bad +# gem 'rubocop', branch: 'feature-branch' +# +# # bad +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # bad +# gem 'rubocop', tag: 'v1.17.0' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 +class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#67 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#62 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#71 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#85 + def allowed_gem?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#89 + def allowed_gems; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 + def forbidden_style?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#58 +RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#57 +RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Passing symbol arguments to `source` (e.g. `source :rubygems`) is +# deprecated because they default to using HTTP requests. Instead, specify +# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. +# +# When autocorrecting, this cop will replace symbol arguments with +# `'https://rubygems.org'`. +# +# This cop will not replace existing sources that use `http://`. This may +# be necessary where HTTPS is not available. For example, where using an +# internal gem server via an intranet, or where HTTPS is prohibited. +# However, you should strongly prefer `https://` where possible, as it is +# more secure. +# +# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. +# This option is `true` by default for safe autocorrection. +# +# @example +# # bad +# source :gemcutter +# source :rubygems +# source :rubyforge +# +# # good +# source 'https://rubygems.org' # strongly recommended +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable +# @example AllowHttpProtocol: false +# +# # bad +# source 'http://rubygems.org' +# +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 +class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#54 + def insecure_protocol_source?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#59 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#80 + def allow_http_protocol?; end +end + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#45 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#49 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#51 +RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Gems should be alphabetically sorted within groups. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rspec' +# +# # good +# gem 'rspec' +# gem 'rubocop' +# +# # good +# gem 'rubocop' +# +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 +class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 +RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking assignment nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#6 +module RuboCop::Cop::CheckAssignment + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#19 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + def extract_rhs(node); end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + def extract_rhs(node); end + end +end + +# This mixin detects collections that are safe to "break" +# by inserting new lines. This is useful for breaking +# up long lines. +# +# Let's look at hashes as an example: +# +# We know hash keys are safe to break across lines. We can add +# linebreaks into hashes on lines longer than the specified maximum. +# Then in further passes cops can clean up the multi-line hash. +# For example, say the maximum line length is as indicated below: +# +# | +# v +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# In a LineLength autocorrection pass, a line is added before +# the first key that exceeds the column limit: +# +# {foo: "0000000000", bar: "0000000000", +# baz: "0000000000"} +# +# In a MultilineHashKeyLineBreaks pass, lines are inserted +# before all keys: +# +# {foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000"} +# +# Then in future passes FirstHashElementLineBreak, +# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will +# manipulate as well until we get: +# +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# (Note: Passes may not happen exactly in this sequence.) +# +# source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#44 +module RuboCop::Cop::CheckLineBreakable + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#45 + def extract_breakable_node(node, max); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#200 + def all_on_same_line?(nodes); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#220 + def already_on_multiple_lines?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#133 + def breakable_collection?(node, elements); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#187 + def children_could_be_broken_up?(children); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#150 + def contained_by_breakable_collection_on_same_line?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#170 + def contained_by_multiline_collection_that_could_be_broken_up?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#60 + def extract_breakable_node_from_elements(node, elements, max); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#72 + def extract_first_element_over_column_limit(node, elements, max); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#92 + def first_argument_is_heredoc?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#207 + def process_args(args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#117 + def safe_to_ignore?(node); end + + # If a send node contains a heredoc argument, splitting cannot happen + # after the heredoc or else it will cause a syntax error. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#101 + def shift_elements_for_heredoc_arg(node, elements, index); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#112 + def within_column_limit?(element, max, line); end +end + +# Common functionality for checking length of code segments. +# +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 +module RuboCop::Cop::CodeLength + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#49 + def build_code_length_calculator(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#31 + def check_code_length(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#27 + def count_as_one; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#23 + def count_comments?; end + + # Returns true for lines that shall not be included in the count. + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 + def irrelevant_line(source_line); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 + def location(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 + def max_length; end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#15 + def message(length, max_length); end +end + +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#9 +RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) + +# Help methods for working with nodes containing comments. +# +# source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#6 +module RuboCop::Cop::CommentsHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#25 + def comments_contain_disables?(node, cop_name); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#18 + def comments_in_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#14 + def contains_comments?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#7 + def source_range_with_comment(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#44 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#58 + def buffer; end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#39 + def end_position_for(node); end + + # Returns the end line of a node, which might be a comment and not part of the AST + # End line is considered either the line at which another node starts, or + # the line at which the parent node ends. + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#66 + def find_end_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#54 + def start_line_position(node); end +end + +# Commissioner class is responsible for processing the AST and delegating +# work to the specified cops. +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#7 +class RuboCop::Cop::Commissioner + include ::RuboCop::AST::Traversal + + # @return [Commissioner] a new instance of Commissioner + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#44 + def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#42 + def errors; end + + # @return [InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#79 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___ENCODING__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___FILE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___LINE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_arg_expr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array_pattern_with_tail(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cbase(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_complex(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_const_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_eflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_empty_else(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_false(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_find_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forward_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forward_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_hash_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_iflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_in_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_indexasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_int(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ivar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwargs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwnilarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwsplat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lambda(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_alt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_as(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_current_line(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_nil_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_rest(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_var(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_mlhs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_nil(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_not(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_pin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_procarg0(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_rational(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_redo(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_regopt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_retry(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_self(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_shadowarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_splat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_true(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_undef(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_while_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_xstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_zsuper(node); end + + private + + # source://rubocop//lib/rubocop/cop/commissioner.rb#98 + def begin_investigation(processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#121 + def build_callbacks(cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#116 + def initialize_callbacks; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#159 + def invoke(callback, cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#163 + def invoke_with_argument(callback, cops, arg); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#112 + def reset; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#131 + def restrict_callbacks(callbacks); end + + # NOTE: mutates `callbacks` in place + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#149 + def restricted_map(callbacks); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#104 + def trigger_responding_cops(callback, node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#139 + def trigger_restricted_cops(event, node); end + + # Allow blind rescues here, since we're absorbing and packaging or + # re-raising exceptions that can be raised from within the individual + # cops' `#investigate` methods. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#170 + def with_cop_error_handling(cop, node = T.unsafe(nil)); end +end + +# How a Commissioner returns the results of the investigation +# as a list of Cop::InvestigationReport and any errors caught +# during the investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#18 +class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct + # Returns the value of attribute cop_reports + # + # @return [Object] the current value of cop_reports + def cop_reports; end + + # Sets the attribute cop_reports + # + # @param value [Object] the value to set the attribute cop_reports to. + # @return [Object] the newly set value + def cop_reports=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#19 + def cops; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#27 + def correctors; end + + # Returns the value of attribute errors + # + # @return [Object] the current value of errors + def errors; end + + # Sets the attribute errors + # + # @param value [Object] the value to set the attribute errors to. + # @return [Object] the newly set value + def errors=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#35 + def merge(investigation); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#31 + def offenses; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#23 + def offenses_per_cop; end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + def processed_source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/commissioner.rb#10 +RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) + +# This class does condition autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#6 +class RuboCop::Cop::ConditionCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#8 + def correct_negative_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#17 + def negated_condition(node); end + end +end + +# Handles `EnforcedStyle` configuration parameters. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#6 +module RuboCop::Cop::ConfigurableEnforcedStyle + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#88 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#96 + def alternative_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#19 + def ambiguous_style_detected(*possibilities); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def conflicting_styles_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#11 + def correct_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#64 + def detected_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#68 + def detected_style=(style); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def no_acceptable_style!; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#56 + def no_acceptable_style?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#7 + def opposite_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#79 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#75 + def style_configured?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#29 + def style_detected(detected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#107 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#100 + def supported_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#15 + def unexpected_style_detected(unexpected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def unrecognized_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#23 +RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) + +# Shared functionality between mixins that enforce naming conventions +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#6 +module RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#9 + def check_name(node, name, name_range); end + + # A class emitter method is a singleton method in a class/module, where + # the method has the same name as a class defined in the class/module. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#30 + def class_emitter_method?(node, name); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#17 + def report_opposing_styles(node, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 + def valid_name?(node, name, given_style = T.unsafe(nil)); end +end + +# Handles `Max` configuration parameters, especially setting them to an +# appropriate value with --auto-gen-config. +# +# @deprecated Use `exclude_limit ` instead. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 +module RuboCop::Cop::ConfigurableMax + private + + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 + def max_parameter_name; end +end + +# This module provides functionality for checking if names match the +# configured EnforcedStyle. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#7 +module RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#10 +RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) + +# This module provides functionality for checking if numbering match the +# configured EnforcedStyle. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#7 +module RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#11 +RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) + +# Monkey-patch Cop for tests to provide easy access to messages and +# highlights. +# +# source://rubocop//lib/rubocop/cop/cop.rb#11 +class RuboCop::Cop::Cop < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/cop.rb#65 + def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # Called before any investigation + # + # @api private + # + # source://rubocop//lib/rubocop/cop/cop.rb#121 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/cop.rb#97 + def corrections; end + + # source://rubocop//lib/rubocop/cop/cop.rb#82 + def find_location(node, loc); end + + # Returns the value of attribute offenses. + # + # source://rubocop//lib/rubocop/cop/cop.rb#12 + def offenses; end + + # Called after all on_... have been called + # + # source://rubocop//lib/rubocop/cop/cop.rb#114 + def on_investigation_end; end + + # Called before all on_... have been called + # + # source://rubocop//lib/rubocop/cop/cop.rb#108 + def on_new_investigation; end + + # @deprecated Use class method + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#88 + def support_autocorrect?; end + + private + + # source://rubocop//lib/rubocop/cop/cop.rb#139 + def apply_correction(corrector); end + + # Override Base + # + # source://rubocop//lib/rubocop/cop/cop.rb#135 + def callback_argument(_range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#156 + def correction_lambda; end + + # source://rubocop//lib/rubocop/cop/cop.rb#162 + def dedupe_on_node(node); end + + # Just for legacy + # + # @yield [corrector] + # + # source://rubocop//lib/rubocop/cop/cop.rb#144 + def emulate_v0_callsequence(corrector); end + + # source://rubocop//lib/rubocop/cop/cop.rb#175 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#169 + def suppress_clobbering; end + + class << self + # @deprecated Use Registry.all + # + # source://rubocop//lib/rubocop/cop/cop.rb#48 + def all; end + + # source://rubocop//lib/rubocop/cop/cop.rb#29 + def joining_forces; end + + # @deprecated Use Registry.qualified_cop_name + # + # source://rubocop//lib/rubocop/cop/cop.rb#57 + def qualified_cop_name(name, origin); end + + # @deprecated Use Registry.global + # + # source://rubocop//lib/rubocop/cop/cop.rb#39 + def registry; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#25 + def support_autocorrect?; end + end +end + +# @deprecated +# +# source://rubocop//lib/rubocop/cop/cop.rb#17 +class RuboCop::Cop::Cop::Correction < ::Struct + # source://rubocop//lib/rubocop/cop/cop.rb#18 + def call(corrector); end + + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + def cop=(_); end + + # Returns the value of attribute lambda + # + # @return [Object] the current value of lambda + def lambda; end + + # Sets the attribute lambda + # + # @param value [Object] the value to set the attribute lambda to. + # @return [Object] the newly set value + def lambda=(_); end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This class takes a source buffer and rewrite its source +# based on the different correction rules supplied. +# +# Important! +# The nodes modified by the corrections should be part of the +# AST of the source_buffer. +# +# source://rubocop//lib/rubocop/cop/corrector.rb#11 +class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter + # corrector = Corrector.new(cop) + # + # @param source [Parser::Source::Buffer, or anything + # leading to one via `(processed_source.)buffer`] + # @return [Corrector] a new instance of Corrector + # + # source://rubocop//lib/rubocop/cop/corrector.rb#32 + def initialize(source); end + + # Removes `size` characters from the beginning of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the end of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#63 + def remove_leading(node_or_range, size); end + + # Removes `size` characters prior to the source range. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#51 + def remove_preceding(node_or_range, size); end + + # Removes `size` characters from the end of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the beginning of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#75 + def remove_trailing(node_or_range, size); end + + # Legacy + # + # source://parser/3.3.5.0/lib/parser/source/tree_rewriter.rb#252 + def rewrite; end + + # Swaps sources at the given ranges. + # + # @param node_or_range1 [Parser::Source::Range, RuboCop::AST::Node] + # @param node_or_range2 [Parser::Source::Range, RuboCop::AST::Node] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#85 + def swap(node_or_range1, node_or_range2); end + + private + + # source://rubocop//lib/rubocop/cop/corrector.rb#119 + def check_range_validity(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#104 + def to_range(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#123 + def validate_buffer(buffer); end + + class << self + # Duck typing for get to a ::Parser::Source::Buffer + # + # source://rubocop//lib/rubocop/cop/corrector.rb#15 + def source_buffer(source); end + end +end + +# noop +# +# source://rubocop//lib/rubocop/cop/corrector.rb#12 +RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) + +# Common functionality for checking def nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/def_node.rb#6 +module RuboCop::Cop::DefNode + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#21 + def non_public_modifier?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#12 + def non_public?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#16 + def preceding_non_public_modifier?(node); end +end + +# Helpers for builtin documentation +# +# source://rubocop//lib/rubocop/cop/documentation.rb#6 +module RuboCop::Cop::Documentation + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#25 + def base_url_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#47 + def default_base_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#10 + def department_to_basename(department); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#15 + def url_for(cop_class, config = T.unsafe(nil)); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#25 + def base_url_for(cop_class, config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#47 + def default_base_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#10 + def department_to_basename(department); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#15 + def url_for(cop_class, config = T.unsafe(nil)); end + end +end + +# Common functionality for checking documentation. +# +# source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#6 +module RuboCop::Cop::DocumentationComment + extend ::RuboCop::AST::NodePattern::Macros + + private + + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#47 + def annotation_keywords; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#11 + def documentation_comment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#39 + def interpreter_directive_comment?(comment); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#31 + def precede?(node1, node2); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#25 + def preceding_comment?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#35 + def preceding_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#43 + def rubocop_directive_comment?(comment); end +end + +# Common functionality for dealing with duplication. +# +# source://rubocop//lib/rubocop/cop/mixin/duplication.rb#6 +module RuboCop::Cop::Duplication + private + + # Returns the consecutive duplicates, leaving out the first instance of + # the duplicated elements. + # + # @param collection [Array] an array to return consecutive duplicates for + # @return [Array] the consecutive duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#31 + def consecutive_duplicates(collection); end + + # Returns all duplicates, including the first instance of the duplicated + # elements. + # + # @param collection [Array] an array to return duplicates for + # @return [Array] all the duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#22 + def duplicates(collection); end + + # Whether the `collection` contains any duplicates. + # + # @param collection [Array] an array to check for duplicates + # @return [Boolean] whether the array contains any duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#13 + def duplicates?(collection); end + + # Returns a hash of grouped duplicates. The key will be the first + # instance of the element, and the value an `array` of the initial + # element and all duplicate instances. + # + # @param collection [Array] an array to group duplicates for + # @return [Array] the grouped duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#41 + def grouped_duplicates(collection); end +end + +# This class autocorrects `#each` enumeration to `for` iteration. +# +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#6 +class RuboCop::Cop::EachToForCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [EachToForCorrector] a new instance of EachToForCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#12 + def initialize(block_node); end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#18 + def call(corrector); end + + private + + # Returns the value of attribute argument_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def argument_node; end + + # Returns the value of attribute block_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def block_node; end + + # Returns the value of attribute collection_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def collection_node; end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#26 + def correction; end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 + def offending_range; end +end + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#9 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) + +# This class does empty line autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#6 +class RuboCop::Cop::EmptyLineCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#8 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#19 + def insert_before(corrector, node); end + end +end + +# Common code for empty parameter cops. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#6 +module RuboCop::Cop::EmptyParameter + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#12 + def empty_arguments?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#16 + def check(node); end +end + +# Functions for checking the alignment of the `end` keyword. +# +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#6 +module RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#60 + def accept_end_kw_alignment?(end_loc); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#50 + def add_offense_for_misalignment(node, align_with); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#19 + def check_end_kw_alignment(node, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#15 + def check_end_kw_in_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#75 + def line_break_before_keyword?(whole_expression, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#35 + def matching_ranges(end_loc, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#41 + def start_line_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#65 + def style_parameter_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#69 + def variable_alignment?(whole_expression, rhs, end_alignment_style); end +end + +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#10 +RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for enforcing a specific superclass. +# +# IMPORTANT: RuboCop core depended on this module when it supported Rails department. +# Rails department has been extracted to RuboCop Rails gem. +# +# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility +# with existing RuboCop Rails 2.8 or lower. +# +# @api private +# @deprecated This module is deprecated and will be removed by RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#15 +module RuboCop::Cop::EnforceSuperclass + # @api private + # + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#19 + def on_class(node); end + + # @api private + # + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#25 + def on_send(node); end + + private + + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#33 + def register_offense(offense_node); end + + class << self + # @api private + # @private + # + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#7 + def included(base); end + end +end + +# Common functionality for checking for a line break before the first +# element in a multi-line collection. +# +# source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#7 +module RuboCop::Cop::FirstElementLineBreak + private + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#23 + def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#10 + def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#37 + def first_by_line(nodes); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#41 + def last_line(nodes, ignore_last:); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#18 + def method_uses_parens?(node, limit); end +end + +# This class autocorrects `for` iteration to `#each` enumeration. +# +# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#6 +class RuboCop::Cop::ForToEachCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [ForToEachCorrector] a new instance of ForToEachCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#11 + def initialize(for_node); end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#17 + def call(corrector); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#57 + def collection_end; end + + # Returns the value of attribute collection_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def collection_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#31 + def collection_source; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#27 + def correction; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#45 + def end_range; end + + # Returns the value of attribute for_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def for_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#53 + def keyword_begin; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#39 + def requires_parentheses?; end + + # Returns the value of attribute variable_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def variable_node; end +end + +# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 +RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) + +# A scaffold for concrete forces. +# +# source://rubocop//lib/rubocop/cop/force.rb#6 +class RuboCop::Cop::Force + # @return [Force] a new instance of Force + # + # source://rubocop//lib/rubocop/cop/force.rb#32 + def initialize(cops); end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/force.rb#17 + def cops; end + + # source://rubocop//lib/rubocop/cop/force.rb#50 + def investigate(_processed_source); end + + # source://rubocop//lib/rubocop/cop/force.rb#36 + def name; end + + # source://rubocop//lib/rubocop/cop/force.rb#40 + def run_hook(method_name, *args); end + + class << self + # source://rubocop//lib/rubocop/cop/force.rb#19 + def all; end + + # source://rubocop//lib/rubocop/cop/force.rb#28 + def force_name; end + + # @private + # + # source://rubocop//lib/rubocop/cop/force.rb#23 + def inherited(subclass); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/force.rb#8 +class RuboCop::Cop::Force::HookError < ::StandardError + # @api private + # @return [HookError] a new instance of HookError + # + # source://rubocop//lib/rubocop/cop/force.rb#11 + def initialize(joining_cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/force.rb#9 + def joining_cop; end +end + +# Common functionality for dealing with frozen string literals. +# +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 +module RuboCop::Cop::FrozenStringLiteral + private + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def frozen_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#21 + def frozen_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 + def frozen_string_literal_comment_exists?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + def frozen_string_literal_specified?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#70 + def frozen_string_literals_disabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#42 + def frozen_string_literals_enabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#86 + def leading_comment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#82 + def leading_magic_comments; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def uninterpolated_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 + def uninterpolated_string?(node); end + + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 + def frozen_string_literal_comment_exists?; end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#11 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#6 +module RuboCop::Cop::GemDeclaration + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#10 + def gem_declaration?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5 +module RuboCop::Cop::Gemspec; end + +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforce that gem dependency version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# @example EnforcedStyle: forbidden +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 +class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#67 + def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#78 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#73 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#82 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 + def add_dependency_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#96 + def allowed_gem?(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#100 + def allowed_gems; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 + def forbidden_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 + def match_block_variable_name?(receiver_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#61 +RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#58 +RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#57 +RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#64 +RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#59 +RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that deprecated attributes are not set in a gemspec file. +# Removing deprecated attributes allows the user to receive smaller packed gems. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files = Dir.glob('test/**/*') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files += Dir.glob('test/**/*') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#28 +class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#35 + def gem_specification(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#43 + def on_block(block_node); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#86 + def format_message_from; end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 + def node_and_method_name(node, attribute); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#72 + def use_deprecated_attributes?(node, block_parameter); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#32 +RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that development dependencies for a gem are specified in +# `Gemfile`, rather than in the `gemspec` using +# `add_development_dependency`. Alternatively, using `EnforcedStyle: +# gemspec`, enforce that all dependencies are specified in `gemspec`, +# rather than in `Gemfile`. +# +# @example EnforcedStyle: Gemfile (default) +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gems.rb +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# # +# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. +# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gemspec +# # Specify all dependencies in your gemspec. +# +# # bad +# # Gemfile +# gem "foo" +# +# # good +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good (with AllowedGems: ["bar"]) +# # Gemfile +# gem "bar" +# +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#70 +class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#77 + def add_development_dependency?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#82 + def gem?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#86 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#97 + def forbidden_gem?(gem_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#101 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#73 +RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#74 +RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# An attribute assignment method calls should be listed only once +# in a gemspec. +# +# Assigning to an attribute with the same name using `spec.foo =` will be +# an unintended usage. On the other hand, duplication of methods such +# as `spec.requirements`, `spec.add_runtime_dependency`, and others are +# permitted because it is the intended use of appending values. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# spec.name = 'rubocop2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.requirements << 'libmagick, v6.0' +# spec.requirements << 'A good graphics card' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 +class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#45 + def assignment_method_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#50 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#68 + def duplicated_assignment_method_nodes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#62 + def match_block_variable_name?(receiver_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#76 + def register_offense(node, assignment, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#41 +RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) + +# Dependencies in the gemspec should be alphabetically sorted. +# +# @example +# # bad +# spec.add_dependency 'rubocop' +# spec.add_dependency 'rspec' +# +# # good +# spec.add_dependency 'rspec' +# spec.add_dependency 'rubocop' +# +# # good +# spec.add_dependency 'rubocop' +# +# spec.add_dependency 'rspec' +# +# # bad +# spec.add_development_dependency 'rubocop' +# spec.add_development_dependency 'rspec' +# +# # good +# spec.add_development_dependency 'rspec' +# spec.add_development_dependency 'rubocop' +# +# # good +# spec.add_development_dependency 'rubocop' +# +# spec.add_development_dependency 'rspec' +# +# # bad +# spec.add_runtime_dependency 'rubocop' +# spec.add_runtime_dependency 'rspec' +# +# # good +# spec.add_runtime_dependency 'rspec' +# spec.add_runtime_dependency 'rubocop' +# +# # good +# spec.add_runtime_dependency 'rubocop' +# +# spec.add_runtime_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 +class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 + def dependency_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 + def get_dependency_name(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 +RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) + +# Requires a gemspec to have `rubygems_mfa_required` metadata set. +# +# This setting tells RubyGems that MFA (Multi-Factor Authentication) is +# required for accounts to be able perform privileged operations, such as +# (see RubyGems' documentation for the full list of privileged +# operations): +# +# * `gem push` +# * `gem yank` +# * `gem owner --add/remove` +# * adding or removing owners using gem ownership page +# +# This helps make your gem more secure, as users can be more +# confident that gem updates were pushed by maintainers. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# # no `rubygems_mfa_required` metadata specified +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'false' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'false' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#63 +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#70 + def metadata(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#87 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#78 + def rubygems_mfa_required(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#83 + def true_string?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#115 + def autocorrect(corrector, node, block_var, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#139 + def change_value(corrector, value); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#125 + def correct_metadata(corrector, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#133 + def insert_mfa_required(corrector, node, block_var); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#108 + def mfa_value(metadata_value); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#67 +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + +# Checks that `required_ruby_version` in a gemspec file is set to a valid +# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's +# configuration for the gem. +# +# This ensures that RuboCop is using the same Ruby version as the gem. +# +# @example +# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. +# +# # bad +# Gem::Specification.new do |spec| +# # no `required_ruby_version` specified +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.4.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.6.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5' +# end +# +# # accepted but not recommended +# Gem::Specification.new do |spec| +# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] +# end +# +# # accepted but not recommended, since +# # Ruby does not really follow semantic versioning +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '~> 2.5' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 +class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#70 + def defined_ruby_version(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#84 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 + def required_ruby_version?(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#96 + def dynamic_version?(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#102 + def extract_ruby_version(required_ruby_version); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#120 + def not_equal_message(required_ruby_version, target_ruby_version); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#62 +RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#59 +RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#58 +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `RUBY_VERSION` constant is not used in gemspec. +# Using `RUBY_VERSION` is dangerous because value of the +# constant is determined by `rake release`. +# It's possible to have dependency based on ruby version used +# to execute `rake release` and not user's ruby version. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# if RUBY_VERSION >= '3.0' +# spec.add_dependency 'gem_a' +# else +# spec.add_dependency 'gem_b' +# end +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'gem_a' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 +class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#36 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#34 + def ruby_version?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#44 + def gem_spec_with_ruby_version?(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#31 +RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#6 +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#20 + def gem_specification(param0); end + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#10 + def gem_specification?(param0 = T.unsafe(nil)); end +end + +# Source and spec generator for new cops +# +# This generator will take a cop name and generate a source file +# and spec file when given a valid qualified cop name. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#10 +class RuboCop::Cop::Generator + # @api private + # @raise [ArgumentError] + # @return [Generator] a new instance of Generator + # + # source://rubocop//lib/rubocop/cop/generator.rb#113 + def initialize(name, output: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#133 + def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#129 + def inject_require(root_file_path: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#146 + def todo; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#121 + def write_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#125 + def write_spec; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#160 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#183 + def generate(template); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#175 + def generated_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#179 + def generated_spec; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#160 + def output; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#208 + def snake_case(camel_case_string); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#198 + def source_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#188 + def spec_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#162 + def write_unless_file_exists(path, contents); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#109 +RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#9 +class RuboCop::Cop::Generator::ConfigurationInjector + # @return [ConfigurationInjector] a new instance of ConfigurationInjector + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#17 + def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#24 + def inject; end + + private + + # Returns the value of attribute badge. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def badge; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#41 + def configuration_entries; end + + # Returns the value of attribute configuration_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def configuration_file_path; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#59 + def cop_name_line?(yaml); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#49 + def find_target_line; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#45 + def new_configuration_entry; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def output; end + + # Returns the value of attribute version_added. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def version_added; end +end + +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#10 +RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#9 +class RuboCop::Cop::Generator::RequireFileInjector + # @return [RequireFileInjector] a new instance of RequireFileInjector + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#12 + def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#19 + def inject; end + + private + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#64 + def injectable_require_directive; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def output; end + + # Returns the value of attribute require_entries. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def require_entries; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#31 + def require_exists?; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#68 + def require_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#58 + def require_path_fragments(require_directive); end + + # Returns the value of attribute root_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def root_file_path; end + + # Returns the value of attribute source_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def source_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#39 + def target_line; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#35 + def updated_directives; end +end + +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#10 +RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#11 +RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#85 +RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) + +# Common functionality for checking hash alignment. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#6 +module RuboCop::Cop::HashAlignmentStyles; end + +# Handles calculation of deltas when the enforced style is 'key'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#8 +class RuboCop::Cop::HashAlignmentStyles::KeyAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#9 + def checkable_layout?(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#20 + def deltas(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#13 + def deltas_for_first_pair(first_pair, _node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#34 + def separator_delta(pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#45 + def value_delta(pair); end +end + +# Handles calculation of deltas for `kwsplat` nodes. +# This is a special case that just ensures the kwsplat is aligned with the rest of the hash +# since a `kwsplat` does not have a key, separator or value. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#145 +class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#146 + def deltas(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'separator'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#120 +class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#123 + def deltas_for_first_pair(*_nodes); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#133 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#129 + def key_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#137 + def value_delta(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'table'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#81 +class RuboCop::Cop::HashAlignmentStyles::TableAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # @return [TableAlignment] a new instance of TableAlignment + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#84 + def initialize; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#88 + def deltas_for_first_pair(first_pair, node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#106 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#102 + def key_delta(first_pair, current_pair); end + + # Returns the value of attribute max_key_width. + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 + def max_key_width; end + + # Sets the attribute max_key_width + # + # @param value the value to set the attribute max_key_width to. + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 + def max_key_width=(_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#110 + def value_delta(first_pair, current_pair); end +end + +# Common functionality for checking alignment of hash values. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#56 +module RuboCop::Cop::HashAlignmentStyles::ValueAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#57 + def checkable_layout?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#61 + def deltas(first_pair, current_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#71 + def separator_delta(first_pair, current_pair, key_delta); end +end + +# This module checks for Ruby 3.1's hash value omission syntax. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 +module RuboCop::Cop::HashShorthandSyntax + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def on_hash_for_mixed_shorthand(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#26 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 + def brackets?(method_dispatch_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 + def breakdown_value_types_of_hash(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 + def def_node_that_require_parentheses(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 + def each_omittable_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 + def each_omitted_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 + def enforced_shorthand_syntax; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 + def find_ancestor_method_dispatch_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 + def ignore_hash_shorthand_syntax?(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69 + def ignore_mixed_hash_shorthand_syntax?(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 + def last_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 + def method_dispatch_as_argument?(method_dispatch_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 + def mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 + def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 + def register_offense(node, message, replacement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 + def require_hash_value?(hash_key_source, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 + def require_hash_value_for_around_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 + def use_element_of_hash_literal_as_receiver?(ancestor, parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 + def use_modifier_form_without_parenthesized_method_call?(ancestor); end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#12 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#10 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 +class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 + def first_argument; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 + def last_argument; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 + def selector; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#9 +RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 +RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for Style/HashTransformKeys and +# Style/HashTransformValues +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#7 +module RuboCop::Cop::HashTransformMethod + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 + def array_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#17 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#27 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 + def execute_correction(corrector, node, correction); end + + # @abstract + # @raise [NotImplementedError] + # @return [Captures] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#83 + def extract_captures(_match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#60 + def handle_possible_offense(node, match, match_desc); end + + # @abstract + # @raise [NotImplementedError] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#90 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#41 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#46 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#51 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 + def on_bad_to_h(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#94 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#136 +class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct + # Returns the value of attribute block_node + # + # @return [Object] the current value of block_node + def block_node; end + + # Sets the attribute block_node + # + # @param value [Object] the value to set the attribute block_node to. + # @return [Object] the newly set value + def block_node=(_); end + + # Returns the value of attribute leading + # + # @return [Object] the current value of leading + def leading; end + + # Sets the attribute leading + # + # @param value [Object] the value to set the attribute leading to. + # @return [Object] the newly set value + def leading=(_); end + + # Returns the value of attribute match + # + # @return [Object] the current value of match + def match; end + + # Sets the attribute match + # + # @param value [Object] the value to set the attribute match to. + # @return [Object] the newly set value + def match=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#177 + def set_new_arg_name(transformed_argname, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#181 + def set_new_body_expression(transforming_body_expr, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#167 + def set_new_method_name(new_method_name, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#161 + def strip_prefix_and_suffix(node, corrector); end + + # Returns the value of attribute trailing + # + # @return [Object] the current value of trailing + def trailing; end + + # Sets the attribute trailing + # + # @param value [Object] the value to set the attribute trailing to. + # @return [Object] the newly set value + def trailing=(_); end + + class << self + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#137 + def from_each_with_object(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#141 + def from_hash_brackets_map(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#145 + def from_map_to_h(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 + def from_to_h(node, match); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#118 +class RuboCop::Cop::HashTransformMethod::Captures < ::Struct + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#119 + def noop_transformation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#124 + def transformation_uses_both_args?; end + + # Returns the value of attribute transformed_argname + # + # @return [Object] the current value of transformed_argname + def transformed_argname; end + + # Sets the attribute transformed_argname + # + # @param value [Object] the value to set the attribute transformed_argname to. + # @return [Object] the newly set value + def transformed_argname=(_); end + + # Returns the value of attribute transforming_body_expr + # + # @return [Object] the current value of transforming_body_expr + def transforming_body_expr; end + + # Sets the attribute transforming_body_expr + # + # @param value [Object] the value to set the attribute transforming_body_expr to. + # @return [Object] the newly set value + def transforming_body_expr=(_); end + + # Returns the value of attribute unchanged_body_expr + # + # @return [Object] the current value of unchanged_body_expr + def unchanged_body_expr; end + + # Sets the attribute unchanged_body_expr + # + # @param value [Object] the value to set the attribute unchanged_body_expr to. + # @return [Object] the newly set value + def unchanged_body_expr=(_); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#128 + def use_transformed_argname?; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#10 +RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for working with heredoc strings. +# +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#6 +module RuboCop::Cop::Heredoc + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_dstr(node); end + + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#17 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 + def delimiter_string(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 + def heredoc_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 + def indent_level(str); end +end + +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#7 +RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# This class autocorrects `if...then` structures to a multiline `if` statement +# +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#6 +class RuboCop::Cop::IfThenCorrector + # @return [IfThenCorrector] a new instance of IfThenCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#9 + def initialize(if_node, indentation: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#14 + def call(corrector); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#50 + def branch_body_indentation; end + + # Returns the value of attribute if_node. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def if_node; end + + # Returns the value of attribute indentation. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def indentation; end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#22 + def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#36 + def rewrite_else_branch(else_branch, indentation); end +end + +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#7 +RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) + +# @deprecated IgnoredMethods class has been replaced with AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 +RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods + +# Handles adding and checking ignored nodes. +# +# source://rubocop//lib/rubocop/cop/ignored_node.rb#6 +module RuboCop::Cop::IgnoredNode + # source://rubocop//lib/rubocop/cop/ignored_node.rb#7 + def ignore_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/ignored_node.rb#24 + def ignored_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/ignored_node.rb#11 + def part_of_ignored_node?(node); end + + private + + # source://rubocop//lib/rubocop/cop/ignored_node.rb#31 + def ignored_nodes; end +end + +# @deprecated IgnoredPattern class has been replaced with AllowedPattern. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 +RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern + +# Common functionality for checking integer nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#6 +module RuboCop::Cop::IntegerNode + private + + # source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#9 + def integer_part(node); end +end + +# Common functionality for working with string interpolations. +# +# @abstract Subclasses are expected to implement {#on_interpolation}. +# +# source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#8 +module RuboCop::Cop::Interpolation + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#17 + def on_node_with_interpolations(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_xstr(node); end +end + +# This class autocorrects lambda literal to method notation. +# +# source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#6 +class RuboCop::Cop::LambdaLiteralToMethodCorrector + # @return [LambdaLiteralToMethodCorrector] a new instance of LambdaLiteralToMethodCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#7 + def initialize(block_node); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#13 + def call(corrector); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 + def arg_to_unparenthesized_call?; end + + # Returns the value of attribute arguments. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def arguments; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 + def arguments_begin_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 + def arguments_end_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 + def block_begin; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 + def block_end; end + + # Returns the value of attribute block_node. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def block_node; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 + def insert_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 + def insert_separating_space(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 + def lambda_arg_string; end + + # Returns the value of attribute method. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def method; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 + def needs_separating_space?; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 + def remove_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 + def remove_leading_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 + def remove_trailing_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 + def remove_unparenthesized_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 + def replace_delimiters(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 + def replace_selector(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 + def selector_end; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 + def separating_space?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#5 +module RuboCop::Cop::Layout; end + +# Bare access modifiers (those not applying to specific methods) should be +# indented as deep as method definitions, or as deep as the class/module +# keyword, depending on configuration. +# +# @example EnforcedStyle: indent (default) +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# @example EnforcedStyle: outdent +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#35 +class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#54 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 + def check_body(body, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#65 + def check_modifier(send_node, end_range); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + def expected_indent_offset; end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#84 + def message(range); end + + # An offset that is not expected, but correct if the configuration is + # changed. + # + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#94 + def unexpected_indent_offset; end +end + +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 +RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) + +# Here we check if the arguments on a multi-line method +# definition are aligned. +# +# @example EnforcedStyle: with_first_argument (default) +# # good +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# foo :bar, +# :baz, +# key: value +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#46 +class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#92 + def arguments_or_first_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#80 + def arguments_with_last_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#108 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#68 + def autocorrect_incompatible_with_other_cops?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#124 + def base_column(node, first_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#144 + def enforce_hash_argument_with_separator?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#116 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#72 + def flattened_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#152 + def hash_argument_config; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#112 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#101 + def multiple_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#135 + def target_method_lineno(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#120 + def with_first_argument_style?; end +end + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#50 +RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#52 +RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Here we check if the elements of a multi-line array literal are +# aligned. +# +# @example EnforcedStyle: with_first_element (default) +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#36 +class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#46 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#55 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#67 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#63 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#59 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#78 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#40 +RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#43 +RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first line of the +# right-hand-side of a multi-line assignment. +# +# The indentation of the remaining lines can be corrected with +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. +# +# @example +# # bad +# value = +# if foo +# 'bar' +# end +# +# # good +# value = +# if foo +# 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 +class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + private + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 + def leftmost_multiple_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 +RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keyword of `begin` is aligned properly. +# +# Two modes are supported through the `EnforcedStyleAlignWith` configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `begin` +# keyword is. If it's set to `begin`, the `end` shall be aligned with the +# `begin` keyword. +# +# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `||= begin` that this cop targets tends to +# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# @example EnforcedStyleAlignWith: begin +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#41 +class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#48 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#63 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#59 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#54 + def check_begin_alignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#46 +RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly for do +# end blocks. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# `start_of_block` : the `end` shall be aligned with the +# start of the line where the `do` appeared. +# +# `start_of_line` : the `end` shall be aligned with the +# start of the line where the expression started. +# +# `either` (which is the default) : the `end` is allowed to be in either +# location. The autocorrect will default to `start_of_line`. +# +# @example EnforcedStyleAlignWith: either (default) +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_block +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#66 +class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 + def block_end_align_target?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#89 + def style_parameter_name; end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 + def add_space_before(corrector, loc, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 + def alt_start_msg(start_loc, source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + def block_end_align_target(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 + def check_block_alignment(start_node, block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 + def compute_do_source_line_column(node, end_loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 + def compute_start_col(ancestor_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 + def disqualified_parent?(parent, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + def end_align_target?(node, parent); end + + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 + def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#233 + def format_source_line_column(source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 + def loc_to_source_line_column(loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 + def register_offense(block_node, start_loc, end_loc, do_source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 + def remove_space_before(corrector, end_pos, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 + def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + def start_for_line_node(block_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 +RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end statement of a do..end block +# is on its own line. +# +# @example +# # bad +# blah do |i| +# foo(i) end +# +# # good +# blah do |i| +# foo(i) +# end +# +# # bad +# blah { |i| +# foo(i) } +# +# # good +# blah { |i| +# foo(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#27 +class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#66 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#62 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#76 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#49 + def register_offense(node, offense_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#31 +RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) + +# Checks how the `when` and ``in``s of a `case` expression +# are indented in relation to its `case` or `end` keyword. +# +# It will register a separate offense for each misaligned `when` and `in`. +# +# @example +# # If Layout/EndAlignment is set to keyword style (default) +# # *case* and *end* should always be aligned to same depth, +# # and therefore *when* should always be aligned to both - +# # regardless of configuration. +# +# # bad for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: case (default) +# # if EndAlignment is set to other style such as +# # start_of_line (as shown below), then *when* alignment +# # configuration does have an effect. +# +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: end +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#112 +class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#120 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#127 + def on_case_match(case_match_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#193 + def base_column(case_node, base); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#150 + def check_when(when_node, branch_type); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#182 + def detect_incorrect_style(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#136 + def end_and_last_conditional_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#146 + def enforced_style_end?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#169 + def incorrect_style(when_node, branch_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#161 + def indent_one_step?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#165 + def indentation_width; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#207 + def replacement(node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#200 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 +RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks if the code style follows the ExpectedOrder configuration: +# +# `Categories` allows us to map macro names into a category. +# +# Consider an example of code style that covers the following order: +# +# * Module inclusion (include, prepend, extend) +# * Constants +# * Associations (has_one, has_many) +# * Public attribute macros (attr_accessor, attr_writer, attr_reader) +# * Other macros (validates, validate) +# * Public class methods +# * Initializer +# * Public instance methods +# * Protected attribute macros (attr_accessor, attr_writer, attr_reader) +# * Protected instance methods +# * Private attribute macros (attr_accessor, attr_writer, attr_reader) +# * Private instance methods +# +# You can configure the following order: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - module_inclusion +# - constants +# - association +# - public_attribute_macros +# - public_delegate +# - macros +# - public_class_methods +# - initializer +# - public_methods +# - protected_attribute_macros +# - protected_methods +# - private_attribute_macros +# - private_delegate +# - private_methods +# ---- +# +# Instead of putting all literals in the expected order, is also +# possible to group categories of macros. Visibility levels are handled +# automatically. +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Categories: +# association: +# - has_many +# - has_one +# attribute_macros: +# - attr_accessor +# - attr_reader +# - attr_writer +# macros: +# - validates +# - validate +# module_inclusion: +# - include +# - prepend +# - extend +# ---- +# +# @example +# # bad +# # Expect extend be before constant +# class Person < ApplicationRecord +# has_many :orders +# ANSWER = 42 +# +# extend SomeModule +# include AnotherModule +# end +# +# # good +# class Person +# # extend and include go first +# extend SomeModule +# include AnotherModule +# +# # inner classes +# CustomError = Class.new(StandardError) +# +# # constants are next +# SOME_CONSTANT = 20 +# +# # afterwards we have public attribute macros +# attr_reader :name +# +# # followed by other macros (if any) +# validates :name +# +# # then we have public delegate macros +# delegate :to_s, to: :name +# +# # public class methods are next in line +# def self.some_method +# end +# +# # initialization goes between class methods and instance methods +# def initialize +# end +# +# # followed by other public instance methods +# def some_method +# end +# +# # protected attribute macros and methods go next +# protected +# +# attr_reader :protected_name +# +# def some_protected_method +# end +# +# # private attribute macros, delegate macros and methods +# # are grouped near the end +# private +# +# attr_reader :private_name +# +# delegate :some_private_delegate, to: :name +# +# def some_private_method +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#142 +class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 + def on_class(class_node); end + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 + def on_sclass(class_node); end + + private + + # Autocorrect by swapping between two nodes autocorrecting them + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#174 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#305 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#328 + def buffer; end + + # Setting categories hash allow you to group methods in group to match + # in the {expected_order}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#340 + def categories; end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#234 + def class_elements(class_node); end + + # Classifies a node to match with something in the {expected_order} + # + # @param node to be analysed + # @return String when the node type is a `:block` then + # {classify} recursively with the first children + # @return String when the node type is a `:send` then {find_category} + # by method name + # @return String otherwise trying to {humanize_node} of the current node + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#194 + def classify(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 + def dynamic_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 + def end_position_for(node); end + + # Load expected order from `ExpectedOrder` config. + # Define new terms in the expected order by adding new {categories}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#334 + def expected_order; end + + # Categorize a node according to the {expected_order} + # Try to match {categories} values against the node's method_name given + # also its visibility. + # + # @param node to be analysed. + # @return [String] with the key category or the `method_name` as string + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#212 + def find_category(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 + def find_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#262 + def humanize_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 + def ignore?(node, classification); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#253 + def ignore_for_autocorrect?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#289 + def marked_as_private_constant?(node, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 + def private_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 + def start_line_position(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#225 + def walk_over_nested_class_definition(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 + def whole_line_comment_at_line?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 +RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#154 +RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of here document closings. +# +# @example +# +# # bad +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # good +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # bad +# +# # heredoc contents is before closing heredoc. +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48 +class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74 + def argument_indentation_correct?(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82 + def closing_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101 + def find_node_used_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90 + def heredoc_closing(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86 + def heredoc_opening(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117 + def indent_level(source_line); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94 + def indented_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70 + def opening_indentation(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52 +RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) + +# Checks the indentation of hanging closing parentheses in +# method calls, method definitions, and grouped expressions. A hanging +# closing parenthesis means `)` preceded by a line break. +# +# @example +# +# # bad +# some_method( +# a, +# b +# ) +# +# some_method( +# a, b +# ) +# +# some_method(a, b, c +# ) +# +# some_method(a, +# b, +# c +# ) +# +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# # Scenario 1: When First Parameter Is On Its Own Line +# +# # good: when first param is on a new line, right paren is *always* +# # outdented by IndentationWidth +# some_method( +# a, +# b +# ) +# +# # good +# some_method( +# a, b +# ) +# +# # Scenario 2: When First Parameter Is On The Same Line +# +# # good: when all other params are also on the same line, outdent +# # right paren by IndentationWidth +# some_method(a, b, c +# ) +# +# # good: when all other params are on multiple lines, but are lined +# # up, align right paren with left paren +# some_method(a, +# b, +# c +# ) +# +# # good: when other params are not lined up on multiple lines, outdent +# # right paren by IndentationWidth +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#71 +class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#84 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#157 + def all_elements_aligned?(elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#99 + def check(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#107 + def check_for_elements(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#125 + def check_for_no_elements(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#171 + def correct_column_candidates(node, left_paren); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#144 + def expected_column(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#167 + def first_argument_line(elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#187 + def line_break_after_left_paren?(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#179 + def message(correct_column, left_paren, right_paren); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#77 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#75 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# Checks the indentation of comments. +# +# @example +# # bad +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# # good +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# @example AllowForAlignment: false (default) +# # bad +# a = 1 # A really long comment +# # spanning two lines. +# +# # good +# # A really long comment spanning one line. +# a = 1 +# @example AllowForAlignment: true +# # good +# a = 1 # A really long comment +# # spanning two lines. +# +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#48 +class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#55 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#61 + def autocorrect(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#88 + def autocorrect_one(corrector, comment); end + + # Corrects all comment lines that occur immediately before the given + # comment and have the same indentation. This is to avoid a long chain + # of correcting, saving the file, parsing and inspecting again, and + # then correcting one more line, and so on. + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#71 + def autocorrect_preceding_comments(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#92 + def check(comment, comment_index); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#145 + def correct_indentation(next_line); end + + # Returns true if: + # a) the cop is configured to allow extra indentation for alignment, and + # b) the currently inspected comment is aligned with the nearest preceding end-of-line + # comment. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#121 + def correctly_aligned_with_preceding_comment?(comment_index, column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#156 + def less_indented?(line); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#140 + def line_after_comment(comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#131 + def message(column, correct_comment_indentation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#135 + def own_line_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#82 + def should_correct?(preceding_comment, reference_comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#162 + def two_alternatives?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#52 +RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for conditions that are not on the same line as +# if/while/until. +# +# @example +# +# # bad +# if +# some_condition +# do_something +# end +# +# # good +# if some_condition +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 +class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 + def message(condition); end +end + +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords of method definitions are +# aligned properly. +# +# Two modes are supported through the EnforcedStyleAlignWith configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `def` +# keyword is. If it's set to `def`, the `end` shall be aligned with the +# `def` keyword. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# @example EnforcedStyleAlignWith: def +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#36 +class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#48 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#63 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#41 +RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks the . position in multi-line method calls. +# +# @example EnforcedStyle: leading (default) +# # bad +# something. +# method +# +# # good +# something +# .method +# @example EnforcedStyle: trailing +# # bad +# something +# .method +# +# # good +# something. +# method +# +# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#25 +class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 + def autocorrect(corrector, dot, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#99 + def correct_dot_position_style?(dot_line, selector_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#126 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#122 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#114 + def last_heredoc_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#95 + def line_between?(first_line, second_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#64 + def message(dot); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#74 + def proper_dot_position?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#106 + def receiver_end_line(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#130 + def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#30 + def autocorrect_incompatible_with; end + end +end + +# Checks the alignment of else keywords. Normally they should +# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there +# are special cases when they should follow the same rules as the +# alignment of end. +# +# @example +# # bad +# if something +# code +# else +# code +# end +# +# # bad +# if something +# code +# elsif something +# code +# end +# +# # good +# if something +# code +# else +# code +# end +# +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#32 +class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#57 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#63 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#40 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#51 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#147 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#106 + def base_for_method_definition(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#80 + def base_range_of_if(node, base); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#89 + def base_range_of_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#131 + def check_alignment(base_range, else_range); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#115 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#75 + def check_nested(node, base); end +end + +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#38 +RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks empty comment. +# +# @example +# # bad +# +# # +# class Foo +# end +# +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowBorderComment: true (default) +# # good +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowBorderComment: false +# # bad +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowMarginComment: true (default) +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowMarginComment: false +# # bad +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#63 +class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#69 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 + def allow_border_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 + def allow_margin_comment?; end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 + def comment_text(comment); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 + def concat_consecutive_comments(comments); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 + def current_token(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 + def empty_comment_only?(comment_text); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 + def investigate(comments); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 + def previous_token(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 +RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code +# +# @example +# +# # bad +# def foo +# return if need_return? +# bar +# end +# +# # good +# def foo +# return if need_return? +# +# bar +# end +# +# # good +# def foo +# return if something? +# return if something_different? +# +# bar +# end +# +# # also good +# def foo +# if something? +# do_something +# return if need_return? +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 +class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 + def contains_guard_clause?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 + def correct_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174 + def heredoc_line(node, heredoc_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 + def last_heredoc_argument_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199 + def multiple_statements_on_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 + def next_line_allowed_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 + def next_line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 + def next_line_empty_or_allowed_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 + def next_line_rescue_or_ensure?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 + def next_sibling_empty_or_guard_clause?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 + def next_sibling_parent_empty_or_else?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 + def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208 + def simplecov_directive_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185 + def use_heredoc_in_condition?(condition); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for a newline after the final magic comment. +# +# @example +# # good +# # frozen_string_literal: true +# +# # Some documentation for Person +# class Person +# # Some code +# end +# +# # bad +# # frozen_string_literal: true +# # Some documentation for Person +# class Person +# # Some code +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#23 +class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#29 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#61 + def comments_before_code(source); end + + # Find the last magic comment in the source file. + # + # Take all comments that precede the first line of code (or just take + # them all in the case when there is no code), select the + # magic comments, and return the last magic comment in the file. + # + # @return [Parser::Source::Comment] if magic comments exist before code + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#55 + def last_magic_comment(source); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 + def offending_range(last_magic_comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#27 +RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after multiline condition. +# +# @example +# # bad +# if multiline && +# condition +# do_something +# end +# +# # good +# if multiline && +# condition +# +# do_something +# end +# +# # bad +# case x +# when foo, +# bar +# do_something +# end +# +# # good +# case x +# when foo, +# bar +# +# do_something +# end +# +# # bad +# begin +# do_something +# rescue FooError, +# BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, +# BarError +# +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#54 +class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#82 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#60 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#93 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#127 + def autocorrect(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#105 + def check_condition(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#120 + def multiline_rescue_exceptions?(exception_nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#116 + def multiline_when_condition?(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#112 + def next_line_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#58 +RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether class/module/method definitions are +# separated by one or more empty lines. +# +# `NumberOfEmptyLines` can be an integer (default is 1) or +# an array (e.g. [1, 2]) to specify a minimum and maximum +# number of empty lines permitted. +# +# `AllowAdjacentOneLineDefs` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example AllowAdjacentOneLineDefs: false +# +# # bad +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# @example +# +# # good +# def a +# end +# +# def b +# end +# @example EmptyLineBetweenClassDefs: true (default) +# # checks for empty lines between class definitions. +# +# # bad +# class A +# end +# class B +# end +# def b +# end +# @example +# +# # good +# class A +# end +# +# class B +# end +# +# def b +# end +# @example EmptyLineBetweenModuleDefs: true (default) +# # checks for empty lines between module definitions. +# +# # bad +# module A +# end +# module B +# end +# def b +# end +# @example +# +# # good +# module A +# end +# +# module B +# end +# +# def b +# end +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 +class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 + def autocorrect(corrector, prev_def, node, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 + def check_defs(nodes); end + + # We operate on `begin` nodes, instead of using `OnMethodDef`, + # so that we can walk over pairs of consecutive nodes and + # efficiently access a node's predecessor; #prev_node ends up + # doing a linear scan over siblings, so we don't want to call + # it on each def. + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#123 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 + def allowance_range?; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 + def autocorrect_insert_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 + def autocorrect_remove_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 + def blank_lines_count_between(first_def_node, second_def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 + def candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 + def class_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 + def def_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 + def def_location(correction_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 + def def_start(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 + def empty_line_between_macros; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 + def end_loc(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 + def expected_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 + def line_count_allowed?(count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 + def lines_between_defs(first_def_node, second_def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 + def macro_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 + def maximum_empty_lines; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 + def message(node, count: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 + def method_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 + def minimum_empty_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 + def module_candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 + def multiple_blank_lines_groups?(first_def_node, second_def_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 + def node_type(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#114 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#112 +RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) + +# Checks for two or more consecutive blank lines. +# +# @example +# +# # bad - It has two empty lines. +# some_method +# # one empty line +# # two empty lines +# some_method +# +# # good +# some_method +# # one empty line +# some_method +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#21 +class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#45 + def each_extra_empty_line(lines); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#63 + def exceeds_line_offset?(line_diff); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#67 + def previous_and_current_lines_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#26 +RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#25 +RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Access modifiers should be surrounded by blank lines. +# +# @example EnforcedStyle: around (default) +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# +# def baz; end +# end +# @example EnforcedStyle: only_before +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# def baz; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#43 +class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [EmptyLinesAroundAccessModifier] a new instance of EmptyLinesAroundAccessModifier + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#56 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#87 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#115 + def allowed_only_before_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#164 + def block_start?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#170 + def body_end?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#158 + def class_def?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#124 + def correct_next_line_if_denied_style(corrector, node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#154 + def empty_lines_around?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#104 + def expected_empty_lines?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#180 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#189 + def message_for_around_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#199 + def message_for_only_before_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#176 + def next_empty_line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#148 + def next_line_empty?(last_send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#141 + def previous_line_empty?(send_line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#137 + def previous_line_ignoring_comments(processed_source, send_line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#48 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#52 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#49 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#51 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#54 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the arguments +# of a method invocation. +# +# @example +# # bad +# do_something( +# foo +# +# ) +# +# process(bar, +# +# baz: qux, +# thud: fred) +# +# some_method( +# +# [1,2,3], +# x: y +# ) +# +# # good +# do_something( +# foo +# ) +# +# process(bar, +# baz: qux, +# thud: fred) +# +# some_method( +# [1,2,3], +# x: y +# ) +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#41 +class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#65 + def empty_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#71 + def extra_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#93 + def inner_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#84 + def line_numbers(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#97 + def outer_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#78 + def processed_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#61 + def receiver_and_method_call_on_different_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#45 +RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for a newline after an attribute accessor or a group of them. +# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed +# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. +# +# @example +# # bad +# attr_accessor :foo +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# attr_reader :bar +# attr_writer :baz +# attr :qux +# +# def do_something +# end +# @example AllowAliasSyntax: true (default) +# # good +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# @example AllowAliasSyntax: false +# # bad +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# alias :foo? :foo +# +# def do_something +# end +# @example AllowedMethods: ['private'] +# # good +# attr_accessor :foo +# private :foo +# +# def do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#63 +class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#123 + def allow_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#133 + def allow_alias_syntax?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#127 + def attribute_or_allowed_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#83 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#107 + def next_line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#94 + def next_line_empty_or_enable_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#101 + def next_line_enable_directive_comment?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#117 + def next_line_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#111 + def require_empty_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#68 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of begin-end +# blocks. +# +# @example +# +# # good +# +# begin +# # ... +# end +# +# # bad +# +# begin +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#24 +class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#30 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#36 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#28 +RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of blocks match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# foo do |bar| +# # ... +# end +# @example EnforcedStyle: empty_lines +# # good +# +# foo do |bar| +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#24 +class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#28 +RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) + +# Common functionality for checking if presence/absence of empty lines +# around some kind of body matches the configuration. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#8 +module RuboCop::Cop::Layout::EmptyLinesAroundBody + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#20 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#23 + def empty_line_required?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#26 + def check(node, body, adjusted_first_line: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#81 + def check_beginning(style, first_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#67 + def check_both(style, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#108 + def check_deferred_empty_line(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#43 + def check_empty_lines_except_namespace(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#51 + def check_empty_lines_special(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#85 + def check_ending(style, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#98 + def check_line(style, line, msg); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#89 + def check_source(style, line_no, desc); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#159 + def deferred_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#132 + def first_child_requires_empty_line?(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#140 + def first_empty_line_required_child(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#155 + def message(type, desc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#122 + def namespace?(body, with_one_child: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#148 + def previous_line_ignoring_comments(send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#163 + def valid_body_style?(body); end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#15 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#13 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#14 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of classes match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# class Foo +# def bar +# # ... +# end +# end +# @example EnforcedStyle: empty_lines +# # good +# +# class Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# class Foo +# class Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# class Foo +# +# def bar; end +# +# end +# @example EnforcedStyle: beginning_only +# # good +# +# class Foo +# +# def bar +# # ... +# end +# end +# @example EnforcedStyle: ending_only +# # good +# +# class Foo +# def bar +# # ... +# end +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#67 +class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#73 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#79 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#71 +RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of `begin` +# sections. This cop doesn't check empty lines at `begin` body +# beginning/end and around method definition body. +# `Style/EmptyLinesAroundBeginBody` or `Style/EmptyLinesAroundMethodBody` +# can be used for this purpose. +# +# @example +# +# # good +# +# begin +# do_something +# rescue +# do_something2 +# else +# do_something3 +# ensure +# do_something4 +# end +# +# # good +# +# def foo +# do_something +# rescue +# do_something2 +# end +# +# # bad +# +# begin +# do_something +# +# rescue +# +# do_something2 +# +# else +# +# do_something3 +# +# ensure +# +# do_something4 +# end +# +# # bad +# +# def foo +# do_something +# +# rescue +# +# do_something2 +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#61 +class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 + def check_body(body, line_of_def_or_kwbegin); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 + def keyword_locations(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 + def keyword_locations_in_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 + def keyword_locations_in_rescue(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 + def last_body_and_end_on_same_line?(body); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 + def message(location, keyword); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#65 +RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of methods. +# +# @example +# +# # good +# +# def foo +# # ... +# end +# +# # bad +# +# def bar +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#23 +class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#36 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#27 +RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of modules match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# module Foo +# def bar +# # ... +# end +# end +# @example EnforcedStyle: empty_lines +# # good +# +# module Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# module Foo +# module Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# module Foo +# +# def bar; end +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#47 +class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#53 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#51 +RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# If it's set to `keyword` (which is the default), the `end` +# shall be aligned with the start of the keyword (if, class, etc.). +# +# If it's set to `variable` the `end` shall be aligned with the +# left-hand-side of the variable assignment, if there is one. +# +# If it's set to `start_of_line`, the `end` shall be aligned with the +# start of the line where the matching keyword appears. +# +# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with +# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends +# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with +# `EnforcedStyleAlignWith: start_of_line` by default. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: keyword (default) +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: variable +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# variable = if true +# end +# +# puts(if true +# end) +# +# # good +# +# variable = if true +# end +# +# puts(if true +# end) +# +# variable = +# if true +# end +# +# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#77 +class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#103 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#167 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#184 + def alignment_node_for_variable_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#148 + def asgn_variable_align_with(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#202 + def assignment_or_operator_method(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#137 + def check_asgn_alignment(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#126 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#158 + def check_other_alignment(node); end +end + +# Checks for Windows-style line endings in the source code. +# +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. +# +# # bad +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. +# +# # good +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. +# @example EnforcedStyle: lf +# # The `lf` style means that LF (Line Feed) is enforced on +# # all platforms. +# +# # bad +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# # good +# puts 'Hello' # Return character is LF on all platforms. +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. +# +# # bad +# puts 'Hello' # Return character is LF on all platforms. +# +# # good +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 +class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#71 + def offense_message(line); end + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#47 + def on_new_investigation; end + + # If there is no LF on the last line, we don't care if there's no CR. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#67 + def unimportant_missing_cr?(index, last_line, line); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#85 + def last_line(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#44 +RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#45 +RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks for extra/unnecessary whitespace. +# +# @example +# +# # good if AllowForAlignment is true +# name = "RuboCop" +# # Some comment and an empty line +# +# website += "/rubocop/rubocop" unless cond +# puts "rubocop" if debug +# +# # bad for any configuration +# set_app("RuboCop") +# website = "https://github.com/rubocop/rubocop" +# +# # good only if AllowBeforeTrailingComments is true +# object.method(arg) # this is a comment +# +# # good even if AllowBeforeTrailingComments is false or not set +# object.method(arg) # this is a comment +# +# # good with either AllowBeforeTrailingComments or AllowForAlignment +# object.method(arg) # this is a comment +# another_object.method(arg) # this is another comment +# some_object.method(arg) # this is some comment +# +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#31 +class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170 + def align_column(asgn_token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147 + def align_equal_sign(corrector, token, align_to); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137 + def align_equal_signs(range, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52 + def aligned_locations(locs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 + def aligned_tok?(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159 + def all_relevant_assignment_lines(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179 + def allow_for_trailing_comments?; end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 + def check_assignment(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81 + def check_other(token1, token2, ast); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62 + def check_tokens(ast, token1, token2); end + + # @yield [range_between(start_pos, end_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91 + def extra_space_range(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111 + def ignored_range?(ast, start_pos); end + + # Returns an array of ranges that should not be reported. It's the + # extra spaces between the keys and values in a multiline hash, + # since those are handled by the Layout/HashAlignment cop. + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118 + def ignored_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#37 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#36 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first argument in a method call. +# Arguments after the first one are checked by `Layout/ArgumentAlignment`, +# not by this cop. +# +# For indenting the first parameter of method _definitions_, check out +# `Layout/FirstParameterIndentation`. +# +# This cop will respect `Layout/ArgumentAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. +# +# @example +# +# # bad +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_params +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument +# # should be indented relative to the inner method. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#147 +class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#222 + def eligible_method_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_super(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#281 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#174 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#178 + def bare_operator?(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#198 + def base_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#226 + def base_range(send_node, arg_node); end + + # Returns the column of the given range. For single line ranges, this + # is simple. For ranges with line breaks, we look a the last code line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#238 + def column_of(range); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#259 + def comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#277 + def enable_layout_first_method_argument_line_break?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#271 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#182 + def message(arg_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#267 + def on_new_investigation; end + + # Takes the line number of a given code line and returns a string + # containing the previous line that's not a comment line or a blank + # line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#250 + def previous_code_line(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#170 + def should_check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#206 + def special_inner_call_indentation?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#153 +RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first element in an array literal +# where the opening bracket and the first element are on separate lines. +# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. +# +# This cop will respect `Layout/ArrayAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. +# +# By default, array literals that are arguments in a method call with +# parentheses, and where the opening square bracket of the array is on the +# same line as the opening parenthesis of the method call, shall have +# their first element indented one step (two spaces) more than the +# position inside the opening parenthesis. +# +# Other array literals shall have their first element indented one step +# more than the start of the line where the opening square bracket is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_brackets'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. +# +# # bad +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# # good +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first element in an array +# # literal where the opening bracket and the first element are on +# # separate lines is indented the same as an array literal which is not +# # defined inside a method call. +# +# # bad +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# # good +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. +# +# # bad +# and_now_for_something = [ +# :completely_different +# ] +# +# # good +# and_now_for_something = [ +# :completely_different +# ] +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 +class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#188 + def array_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 + def check(array_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 + def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 + def message_for_right_bracket(indent_base_type); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line array. +# +# @example +# +# # bad +# [ :a, +# :b] +# +# # good +# [ +# :a, +# :b] +# +# # good +# [:a, :b] +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [ :a, { +# :b => :c +# }] +# +# # good +# [ +# :a, { +# :b => :c +# }] +# @example AllowMultilineFinalElement: true +# +# # good +# [:a, { +# :b => :c +# }] +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#43 +class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#49 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#57 + def assignment_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#62 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#47 +RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first key in a hash literal +# where the opening brace and the first key are on separate lines. The +# other keys' indentations are handled by the HashAlignment cop. +# +# By default, Hash literals that are arguments in a method call with +# parentheses, and where the opening curly brace of the hash is on the +# same line as the opening parenthesis of the method call, shall have +# their first key indented one step (two spaces) more than the position +# inside the opening parenthesis. +# +# Other hash literals shall have their first key indented one step more +# than the start of the line where the opening curly brace is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_braces'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. +# +# # bad +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# special_inside_parentheses +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first key in a hash +# # literal where the opening brace and the first key are on +# # separate lines is indented the same as a hash literal which is not +# # defined inside a method call. +# +# # bad +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# +# # good +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. +# +# # bad +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#113 +class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#122 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#233 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#137 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#191 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#141 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#145 + def check(hash_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#184 + def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#164 + def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#227 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#204 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#212 + def message_for_right_brace(indent_base_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#178 + def separator_style?(first_pair); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#119 +RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line hash. +# +# @example +# +# # bad +# { a: 1, +# b: 2} +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { +# a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: true +# +# # bad +# { a: 1, +# b: { +# c: 3 +# }} +# +# # good +# { a: 1, b: { +# c: 3 +# }} +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#46 +class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#50 +RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first argument in a +# multi-line method call. +# +# @example +# +# # bad +# method(foo, bar, +# baz) +# +# # good +# method( +# foo, bar, +# baz) +# +# # ignored +# method foo, bar, +# baz +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, bar, { +# baz: "a", +# qux: "b", +# }) +# @example AllowMultilineFinalElement: true +# +# # bad +# method(foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# # good +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 +class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_super(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 +RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first parameter in a +# multi-line method parameter definition. +# +# @example +# +# # bad +# def method(foo, bar, +# baz) +# do_something +# end +# +# # good +# def method( +# foo, bar, +# baz) +# do_something +# end +# +# # ignored +# def method foo, +# bar +# do_something +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# # good +# def method( +# foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#56 +class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#69 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#60 +RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first parameter in a method +# definition. Parameters after the first one are checked by +# Layout/ParameterAlignment, not by this cop. +# +# For indenting the first argument of method _calls_, check out +# Layout/FirstArgumentIndentation, which supports options related to +# nesting that are irrelevant for method _definitions_. +# +# @example +# +# # bad +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: consistent (default) +# # The first parameter should always be indented one step more than the +# # preceding line. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: align_parentheses +# # The first parameter should always be indented one step more than the +# # opening parenthesis. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#44 +class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#63 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#83 + def base_description(_); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#67 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#71 + def check(def_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#91 + def message(base_description); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#50 +RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) + +# Check that the keys, separators, and values of a multi-line hash +# literal are aligned according to configuration. The configuration +# options are: +# +# * key (left align keys, one space before hash rockets and values) +# * separator (align hash rockets and colons, right align keys) +# * table (left align keys, hash rockets, and values) +# +# The treatment of hashes passed as the last argument to a method call +# can also be configured. The options are: +# +# * always_inspect +# * always_ignore +# * ignore_implicit (without curly braces) +# +# Alternatively you can specify multiple allowed styles. That's done by +# passing a list of styles to EnforcedStyles. +# +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# @example EnforcedHashRocketStyle: separator +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# @example EnforcedHashRocketStyle: table +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# @example EnforcedColonStyle: key (default) +# # bad +# { +# foo: bar, +# ba: baz +# } +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: separator +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: table +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedLastArgumentHashStyle: always_inspect (default) +# # Inspect both implicit and explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something( +# foo: 1, +# bar: 2 +# ) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something({ +# foo: 1, +# bar: 2 +# }) +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# @example EnforcedLastArgumentHashStyle: ignore_implicit +# # Ignore only implicit hashes. +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# @example EnforcedHashRocketStyle: key (default) +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 +class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashAlignmentStyles + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Returns the value of attribute column_deltas. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def column_deltas; end + + # Sets the attribute column_deltas + # + # @param value the value to set the attribute column_deltas to. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def column_deltas=(_arg0); end + + # Returns the value of attribute offenses_by. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def offenses_by; end + + # Sets the attribute offenses_by + # + # @param value the value to set the attribute offenses_by to. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def offenses_by=(_arg0); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#208 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#265 + def add_offenses; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#371 + def adjust(corrector, delta, range); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#300 + def alignment_for(pair); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#314 + def alignment_for_colons; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#310 + def alignment_for_hash_rockets; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#390 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#233 + def argument_before_hash(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#222 + def autocorrect_incompatible_with_other_cops?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#283 + def check_delta(delta, node:, alignment:); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#246 + def check_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#337 + def correct_key_value(corrector, delta, key, value, separator); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#333 + def correct_no_value(corrector, key_delta, key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#318 + def correct_node(corrector, node, delta); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#242 + def double_splat?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#384 + def enforce_first_argument_with_fixed_indentation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#380 + def good_alignment?(column_deltas); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#291 + def ignore_hash_argument?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#353 + def new_alignment(key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#273 + def register_offenses_with_format(offenses, format); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#237 + def reset!; end +end + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#183 +RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#193 +RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for the placement of the closing parenthesis +# in a method call that passes a HEREDOC string as an argument. +# It should be placed at the end of the line containing the +# opening HEREDOC tag. +# +# @example +# # bad +# +# foo(<<-SQL +# bar +# SQL +# ) +# +# foo(<<-SQL, 123, <<-NOSQL, +# bar +# SQL +# baz +# NOSQL +# ) +# +# foo( +# bar(<<-SQL +# baz +# SQL +# ), +# 123, +# ) +# +# # good +# +# foo(<<-SQL) +# bar +# SQL +# +# foo(<<-SQL, 123, <<-NOSQL) +# bar +# SQL +# baz +# NOSQL +# +# foo( +# bar(<<-SQL), +# baz +# SQL +# 123, +# ) +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#53 +class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#184 + def add_correct_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#271 + def add_correct_external_trailing_comma(node, corrector); end + + # Autocorrection note: + # + # Commas are a bit tricky to handle when the method call is + # embedded in another expression. Here's an example: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456, + # SELECT * FROM db + # SQL + # ), + # third_array_value, + # ] + # + # The "internal" trailing comma is after `456`. + # The "external" trailing comma is after `)`. + # + # To autocorrect, we remove the latter, and move the former up: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456), + # SELECT * FROM db + # SQL + # third_array_value, + # ] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#107 + def autocorrect(corrector, node); end + + # Closing parenthesis helpers. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#162 + def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#222 + def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#289 + def external_trailing_comma?(node); end + + # Returns nil if no trailing external comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#294 + def external_trailing_comma_offset_from_loc_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#137 + def extract_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#133 + def extract_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#230 + def find_most_bottom_of_heredoc_end(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#179 + def fix_closing_parenthesis(node, corrector); end + + # External trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#266 + def fix_external_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#149 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#197 + def incorrect_parenthesis_removal_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#213 + def incorrect_parenthesis_removal_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#244 + def internal_trailing_comma?(node); end + + # Returns nil if no trailing internal comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#249 + def internal_trailing_comma_offset_from_last_arg(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#115 + def outermost_send_on_same_line(heredoc); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#188 + def remove_incorrect_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#277 + def remove_incorrect_external_trailing_comma(node, corrector); end + + # Internal trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#238 + def remove_internal_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#207 + def safe_to_remove_line_containing_closing_paren?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#126 + def send_missing_closing_parens?(parent, child, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#153 + def single_line_send_with_heredoc_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#305 + def space?(pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#168 + def subsequent_closing_parentheses_in_same_line?(outermost_send); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#60 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#57 +RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the here document bodies. The bodies +# are indented one step. +# +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# this cop does not add any offenses for long here documents to +# avoid ``Layout/LineLength``'s offenses. +# +# @example +# # bad +# <<-RUBY +# something +# RUBY +# +# # good +# <<~RUBY +# something +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#24 +class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 + def on_heredoc(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 + def adjust_minus(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 + def adjust_squiggly(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 + def base_indent_level(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 + def heredoc_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 + def heredoc_end(node); end + + # Returns '~', '-' or nil + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 + def heredoc_indent_type(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 + def indented_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 + def indented_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 + def line_too_long?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 + def longest_line(lines); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 + def message(heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 + def register_offense(node, heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 + def type_message(indentation_width, current_indent_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 + def unlimited_heredoc_length?; end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 + def width_message(indentation_width); end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 +RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 +RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) + +# Checks for inconsistent indentation. +# +# The difference between `indented_internal_methods` and `normal` is +# that the `indented_internal_methods` style prescribes that in +# classes and modules the `protected` and `private` modifier keywords +# shall be indented the same as public methods and that protected and +# private members shall be indented one step more than the modifiers. +# Other than that, both styles mean that entities on the same logical +# depth shall have the same indentation. +# +# @example EnforcedStyle: normal (default) +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# @example EnforcedStyle: indented_internal_methods +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#121 +class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#128 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#132 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#138 + def autocorrect(corrector, node); end + + # Not all nodes define `bare_access_modifier?` (for example, + # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first + # to avoid a NoMethodError. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#145 + def bare_access_modifier?(node); end + + # Returns an integer representing the correct indentation, or nil to + # indicate that the correct indentation is that of the first child that + # is not an access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#152 + def base_column_for_normal_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#172 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#187 + def check_indented_internal_methods_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#180 + def check_normal_style(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#126 +RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks that the indentation method is consistent. +# Either tabs only or spaces only are used for indentation. +# +# @example EnforcedStyle: spaces (default) +# # bad +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# @example EnforcedStyle: tabs +# # bad +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#34 +class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#58 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#82 + def autocorrect_lambda_for_spaces(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#77 + def autocorrect_lambda_for_tabs(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#66 + def find_offense(line, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#88 + def in_string_literal?(ranges, tabs_range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#109 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#92 + def string_literal_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 +RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation that doesn't use the specified number +# of spaces. +# +# See also the IndentationConsistency cop which is the companion to this +# one. +# +# @example +# # bad +# class A +# def test +# puts 'hello' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# end +# end +# @example AllowedPatterns: ['^\s*module'] +# # bad +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# # good +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#45 +class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#57 + def access_modifier?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 + def on_case_match(case_match); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#61 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + def on_until(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + def on_while(node, base = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 + def access_modifier_indentation_style; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 + def check_if(node, body, else_clause, base_loc); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 + def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 + def check_members(base, members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 + def check_members_for_indented_internal_methods_style(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 + def check_members_for_normal_style(base, members); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 + def check_rescue?(rescue_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 + def configured_indentation_width; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 + def each_member(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 + def indentation_consistency_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 + def indentation_to_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 + def indented_internal_methods_style?; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 + def leftmost_modifier_of(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 + def message(configured_indentation_width, indentation, name); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 + def offending_range(body_node, indentation); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 + def offense(body_node, indentation, style); end + + # Returns true if the given node is within another node that has + # already been marked for autocorrection by this cop. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 + def other_offense_in_same_range?(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 + def select_check_member(member); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 + def skip_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 + def special_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 + def starts_with_access_modifier?(body_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#53 +RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation of the first non-blank non-comment +# line in a file. +# +# @example +# # bad +# class A +# def foo; end +# end +# +# # good +# class A +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#20 +class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#26 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#36 + def first_token; end + + # @yield [range_between(space_range.begin_pos, token.begin_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#40 + def space_before(token); end +end + +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#24 +RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether comments have a leading space after the +# `#` denoting the start of the comment. The leading space is not +# required for some RDoc special syntax, like `#++`, `#--`, +# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, +# or rackup options. +# +# @example +# +# # bad +# #Some comment +# +# # good +# # Some comment +# @example AllowDoxygenCommentStyle: false (default) +# +# # bad +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowDoxygenCommentStyle: true +# +# # good +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowGemfileRubyComment: false (default) +# +# # bad +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# @example AllowGemfileRubyComment: true +# +# # good +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#52 +class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#58 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 + def allow_doxygen_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#103 + def allow_gemfile_ruby_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#79 + def allowed_on_first_line?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#99 + def doxygen_comment_style?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 + def gemfile?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 + def gemfile_ruby_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#75 + def hash_mark(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#91 + def rackup_config_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#87 + def rackup_options?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#111 + def ruby_comment_in_gemfile?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#83 + def shebang?(comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#56 +RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary leading blank lines at the beginning +# of a file. +# +# @example +# +# # bad +# # (start of file) +# +# class Foo +# end +# +# # bad +# # (start of file) +# +# # a comment +# +# # good +# # (start of file) +# class Foo +# end +# +# # good +# # (start of file) +# # a comment +# +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#30 +class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#35 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#33 +RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks that strings broken over multiple lines (by a backslash) contain +# trailing spaces instead of leading spaces (default) or leading spaces +# instead of trailing spaces. +# +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' +# @example EnforcedStyle: leading +# # bad +# 'this text contains a lot of ' \ +# 'spaces' +# +# # good +# 'this text contains a lot of' \ +# ' spaces' +# +# # bad +# 'this text is too ' \ +# 'long' +# +# # good +# 'this text is too' \ +# ' long' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 +class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#54 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 + def autocorrect(corrector, offense_range, insert_pos, spaces); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 + def continuation?(line, line_num, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 + def enforced_style_leading?; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 + def investigate_leading_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 + def investigate_trailing_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 + def leading_offense_range(end_of_first_line, matches); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 + def raw_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 + def trailing_offense_range(end_of_first_line, matches); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#49 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#47 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#48 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#50 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# Checks that the backslash of a line continuation is separated from +# preceding text by exactly one space (default) or zero spaces. +# +# @example EnforcedStyle: space (default) +# # bad +# 'a'\ +# 'b' \ +# 'c' +# +# # good +# 'a' \ +# 'b' \ +# 'c' +# @example EnforcedStyle: no_space +# # bad +# 'a' \ +# 'b' \ +# 'c' +# +# # good +# 'a'\ +# 'b'\ +# 'c' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 +class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#34 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#81 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#111 + def comment_ranges(comments); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#65 + def find_offensive_spacing(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#121 + def ignore_range?(backtick_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#91 + def ignored_literal_ranges(ast); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#125 + def ignored_ranges; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#49 + def investigate(line, line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#115 + def last_line(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#73 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#130 + def no_space_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#134 + def space_style?; end +end + +# Checks the indentation of the next line after a line that ends with a string +# literal and a backslash. +# +# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the +# first part. There are some exceptions, such as implicit return values, where the +# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. +# +# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step +# more than the first line. Lines 3 and forward shall be aligned with line 2. +# +# @example +# # bad +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# @example EnforcedStyle: aligned (default) +# # bad +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# @example EnforcedStyle: indented +# # bad +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#74 +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 + def add_offense_and_correction(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 + def always_indented?(dstr_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 + def base_column(child); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 + def check_aligned(children, start_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 + def check_indented(children); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 + def strings_concatenated_with_backslash?(dstr_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#79 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#80 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#81 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + +# Checks the length of lines in the source code. +# The maximum length is configurable. +# The tab size is configured in the `IndentationWidth` +# of the `Layout/IndentationStyle` cop. +# It also ignores a shebang line by default. +# +# This cop has some autocorrection capabilities. +# It can programmatically shorten certain long lines by +# inserting line breaks into expressions that can be safely +# split across lines. These include arrays, hashes, and +# method calls with argument lists. +# +# If autocorrection is enabled, the following cops +# are recommended to further format the broken lines. +# (Many of these are enabled by default.) +# +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout//ParameterAlignment` +# * `Style/BlockDelimiters` +# +# Together, these cops will pretty print hashes, arrays, +# method calls, etc. For example, let's say the max columns +# is 25: +# +# @example +# +# # bad +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# # good +# {foo: "0000000000", +# bar: "0000000000", baz: "0000000000"} +# +# # good (with recommended cops enabled) +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#63 +class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckLineBreakable + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#94 + def on_investigation_end; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_potential_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#219 + def allow_heredoc?; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#223 + def allowed_heredoc; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#183 + def allowed_line?(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 + def breakable_block_range(block_node); end + + # Returns the value of attribute breakable_range. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + def breakable_range; end + + # Sets the attribute breakable_range + # + # @param value the value to set the attribute breakable_range to. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + def breakable_range=(_arg0); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 + def breakable_range_after_semicolon(semicolon_token); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#156 + def breakable_range_by_line_index; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#250 + def check_directive_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 + def check_for_breakable_block(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 + def check_for_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#117 + def check_for_breakable_semicolons(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#171 + def check_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#267 + def check_uri_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#204 + def excess_range(uri_range, line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#227 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#160 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#164 + def highlight_start(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#246 + def line_in_heredoc?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 + def line_in_permitted_heredoc?(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#215 + def max; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#193 + def register_offense(loc, line, line_index, length: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#189 + def shebang?(line, line_index); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 +RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in an array literal is either +# on the same line as the last array element or on a new line. +# +# When using the `symmetrical` (default) style: +# +# If an array's opening brace is on the same line as the first element +# of the array, then the closing brace should be on the same line as +# the last element of the array. +# +# If an array's opening brace is on the line above the first element +# of the array, then the closing brace should be on the line below +# the last element of the array. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line array literal must be on the line +# after the last element of the array. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line array literal must be on the same +# line as the last element of the array. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] +# @example EnforcedStyle: new_line +# # bad +# [ +# :a, +# :b ] +# +# # bad +# [ :a, +# :b ] +# +# # good +# [ :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b +# ] +# @example EnforcedStyle: same_line +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#109 + def on_array(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each item in a multi-line array +# starts on a separate line. +# +# @example +# +# # bad +# [ +# a, b, +# c +# ] +# +# # good +# [ +# a, +# b, +# c +# ] +# +# # good +# [ +# a, +# b, +# foo( +# bar +# ) +# ] +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [a, b, foo( +# bar +# )] +# @example AllowMultilineFinalElement: true +# +# # good +# [a, b, foo( +# bar +# )] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#47 +class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#53 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#59 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#51 +RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the multiline assignments have a newline +# after the assignment operator. +# +# @example EnforcedStyle: new_line (default) +# # bad +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# begin +# compute +# rescue => e +# nil +# end +# @example EnforcedStyle: same_line +# # good +# foo = if expression +# 'bar' +# end +# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# i + 1 +# end +# @example SupportedTypes: ['block'] +# # good +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# 'bar' * i +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#60 +class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#72 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#81 + def check_by_enforced_style(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#90 + def check_new_line_offense(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#98 + def check_same_line_offense(node, rhs); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#111 + def supported_types; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#66 +RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#69 +RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# Checks whether the multiline do end blocks have a newline +# after the start of the block. Additionally, it checks whether the block +# arguments, if any, are on the same line as the start of the +# block. Putting block arguments on separate lines, because the whole +# line would otherwise be too long, is accepted. +# +# @example +# # bad +# blah do |i| foo(i) +# bar(i) +# end +# +# # bad +# blah do +# |i| foo(i) +# bar(i) +# end +# +# # good +# blah do |i| +# foo(i) +# bar(i) +# end +# +# # bad +# blah { |i| foo(i) +# bar(i) +# } +# +# # good +# blah { |i| +# foo(i) +# bar(i) +# } +# +# # good +# blah { | +# long_list, +# of_parameters, +# that_would_not, +# fit_on_one_line +# | +# foo(i) +# bar(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#51 +class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#98 + def add_offense_for_expression(node, expr, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#75 + def args_on_beginning_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#105 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#120 + def autocorrect_arguments(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#130 + def autocorrect_body(corrector, node, block_body); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#142 + def block_arg_string(node, args); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#90 + def characters_needed_for_space_and_pipes(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#154 + def include_trailing_comma?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#79 + def line_break_necessary_in_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#83 + def needed_length_for_args(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#56 +RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#55 +RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#57 +RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) + +# Checks that the closing brace in a hash literal is either +# on the same line as the last hash element, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a hash's opening brace is on the same line as the first element +# of the hash, then the closing brace should be on the same line as +# the last element of the hash. +# +# If a hash's opening brace is on the line above the first element +# of the hash, then the closing brace should be on the line below +# the last element of the hash. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line hash literal must be on the line +# after the last element of the hash. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line hash literal must be on the same +# line as the last element of the hash. +# +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: new_line +# # bad +# { +# a: 1, +# b: 2 } +# +# # bad +# { a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: same_line +# # bad +# { a: 1, +# b: 2 +# } +# +# # bad +# { +# a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#109 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each key in a multi-line hash +# starts on a separate line. +# +# @example +# +# # bad +# { +# a: 1, b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: { +# c: 3, +# } +# } +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3, +# }} +# @example AllowMultilineFinalElement: true +# +# # good +# { a: 1, b: { +# c: 3, +# }} +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#46 +class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#68 + def ignore_last_element?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#64 + def starts_with_curly_brace?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#50 +RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Ensures that each argument in a multi-line method call +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. +# +# @example +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo(a, b, { +# foo: "bar", +# }) +# +# # good +# foo( +# a, +# b, +# c +# ) +# +# # good +# foo(a, b, c) +# @example AllowMultilineFinalElement: false (default) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# @example AllowMultilineFinalElement: true +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#56 +class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#62 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#81 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#60 +RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in a method call is either +# on the same line as the last method argument, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method call's opening brace is on the same line as the first +# argument of the call, then the closing brace should be on the same +# line as the last argument of the call. +# +# If an method call's opening brace is on the line above the first +# argument of the call, then the closing brace should be on the line +# below the last argument of the call. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method call must be on the line +# after the last argument of the call. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method call must be on the same +# line as the last argument of the call. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) +# @example EnforcedStyle: new_line +# # bad +# foo( +# a, +# b) +# +# # bad +# foo(a, +# b) +# +# # good +# foo(a, +# b +# ) +# +# # good +# foo( +# a, +# b +# ) +# @example EnforcedStyle: same_line +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#115 + def children(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#119 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#123 + def single_line_ignoring_receiver?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Checks the indentation of the method name part in method calls +# that span more than one line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# while myvariable +# .b +# # do something +# end +# +# # good +# while myvariable +# .b +# # do something +# end +# +# # good +# Thing.a +# .b +# .c +# @example EnforcedStyle: indented +# # good +# while myvariable +# .b +# +# # do something +# end +# @example EnforcedStyle: indented_relative_to_receiver +# # good +# while myvariable +# .a +# .b +# +# # do something +# end +# +# # good +# myvariable = Thing +# .a +# .b +# .c +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#49 +class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#55 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#136 + def align_with_base_message(rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#152 + def alignment_base(node, rhs, given_style); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#67 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#140 + def base_source; end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101 + def extra_indentation(given_style, parent); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226 + def find_multiline_block_chain_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237 + def first_call_has_a_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217 + def get_dot_right_above(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 + def message(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#144 + def no_base_message(lhs, rhs, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#87 + def offending_range(node, lhs, rhs, given_style); end + + # @yield [operation_rhs.first_argument] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247 + def operation_rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257 + def operator_rhs?(node, receiver); end + + # a + # .b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#193 + def receiver_alignment_base(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#131 + def relative_to_receiver_message(rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#71 + def relevant_node?(send_node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#75 + def right_hand_side(send_node); end + + # a.b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#181 + def semantic_alignment_base(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#201 + def semantic_alignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#127 + def should_align_with_base?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#123 + def should_indent_relative_to_receiver?; end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#163 + def syntactic_alignment_base(lhs, rhs); end +end + +# Checks that the closing brace in a method definition is either +# on the same line as the last method parameter, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method definition's opening brace is on the same line as the +# first parameter of the definition, then the closing brace should be +# on the same line as the last parameter of the definition. +# +# If an method definition's opening brace is on the line above the first +# parameter of the definition, then the closing brace should be on the +# line below the last parameter of the definition. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method definition must be on the line +# after the last parameter of the definition. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method definition must be on the same +# line as the last parameter of the definition. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# @example EnforcedStyle: new_line +# # bad +# def foo( +# a, +# b) +# end +# +# # bad +# def foo(a, +# b) +# end +# +# # good +# def foo(a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# @example EnforcedStyle: same_line +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 +class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#115 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#118 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#111 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#107 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each parameter in a multi-line method definition +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. +# +# @example +# +# # bad +# def foo(a, b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b = { +# foo: "bar", +# } +# ) +# end +# +# # good +# def foo(a, b, c) +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def foo(a, b = { +# foo: "bar", +# }) +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#57 +class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#71 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#61 +RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the right hand side operand in binary operations that +# span more than one line. +# +# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` +# condition, an explicit `return` statement, etc. In other contexts, the second operand should +# be indented regardless of enforced style. +# +# @example EnforcedStyle: aligned (default) +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# @example EnforcedStyle: indented +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#43 +class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#49 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#53 + def on_or(node); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#57 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#68 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#78 + def check_and_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#110 + def message(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#84 + def offending_range(node, lhs, rhs, given_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#72 + def relevant_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#121 + def right_hand_side(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#97 + def should_align?(node, rhs, given_style); end +end + +# Here we check if the parameters on a multi-line method call or +# definition are aligned. +# +# To set the alignment of the first argument, use the cop +# FirstParameterIndentation. +# +# @example EnforcedStyle: with_first_parameter (default) +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#71 +class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#90 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#102 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#98 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#94 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#113 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#75 +RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#78 +RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks whether certain expressions, e.g. method calls, that could fit +# completely on a single line, are broken up into multiple lines unnecessarily. +# +# @example any configuration +# # bad +# foo( +# a, +# b +# ) +# +# puts 'string that fits on ' \ +# 'a single line' +# +# things +# .select { |thing| thing.cond? } +# .join('-') +# +# # good +# foo(a, b) +# +# puts 'string that fits on a single line' +# +# things.select { |thing| thing.cond? }.join('-') +# @example InspectBlocks: false (default) +# # good +# foo(a) do |x| +# puts x +# end +# @example InspectBlocks: true +# # bad +# foo(a) do |x| +# puts x +# end +# +# # good +# foo(a) { |x| puts x } +# +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 +class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#73 + def check_assignment(node, _rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 + def comment_within?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 + def configured_to_not_be_inspected?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#127 + def convertible_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#69 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 + def index_access_call_chained?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#155 + def max_line_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#86 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#110 + def other_cop_takes_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#93 + def require_backslash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#116 + def single_line_block_chain_enabled?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 + def suitable_as_single_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#146 + def to_single_line(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#141 + def too_long?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 +RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the rescue and ensure keywords are aligned +# properly. +# +# @example +# +# # bad +# begin +# something +# rescue +# puts 'error' +# end +# +# # good +# begin +# something +# rescue +# puts 'error' +# end +# +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#24 +class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#40 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#44 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#36 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#186 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#163 + def access_modifier_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#149 + def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#136 + def aligned_with_line_break_method?(ancestor_node, node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#195 + def alignment_location(alignment_node); end + + # We will use ancestor or wrapper with access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#116 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#95 + def alignment_source(node, starting_loc); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#132 + def ancestor_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#155 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#73 + def autocorrect(corrector, node, alignment_location); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#203 + def begin_end_alignment_style; end + + # Check alignment of node with rescue or ensure modifiers. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#57 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#83 + def format_message(alignment_node, alignment_loc, kw_loc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#173 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#179 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#34 +RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#32 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#33 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#29 +RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks if method calls are chained onto single line blocks. It considers that a +# line break before the dot improves the readability of the code. +# +# @example +# # bad +# example.select { |item| item.cond? }.join('-') +# +# # good +# example.select { |item| item.cond? } +# .join('-') +# +# # good (not a concern for this cop) +# example.select do |item| +# item.cond? +# end.join('-') +# +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#22 +class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#56 + def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#40 + def offending_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#62 + def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 +RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for colon (:) not followed by some kind of space. +# N.B. this cop does not handle spaces after a ternary operator, which are +# instead handled by Layout/SpaceAroundOperators. +# +# @example +# # bad +# def f(a:, b:2); {a:3}; end +# +# # good +# def f(a:, b: 2); {a: 3}; end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#16 +class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#29 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#21 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#43 + def followed_by_space?(colon); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#39 + def register_offense(colon); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 +RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) + +# Checks for comma (,) not followed by some kind of space. +# +# @example +# +# # bad +# [1,2] +# { foo:bar,} +# +# # good +# [1, 2] +# { foo:bar, } +# +# source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#17 +class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#26 + def kind(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 + def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 + def before_semicolon?(token); end +end + +# Checks for space between a method name and a left parenthesis in defs. +# +# @example +# +# # bad +# def func (x) end +# def method= (y) end +# +# # good +# def func(x) end +# def method=(y) end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#17 +class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#21 +RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks for space after `!`. +# +# @example +# # bad +# ! something +# +# # good +# !something +# +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#14 +class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#21 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#33 + def whitespace_after_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#18 +RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 +RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for semicolon (;) not followed by some kind of space. +# +# @example +# # bad +# x = 1;y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#23 + def kind(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#18 + def space_style_before_rcurly; end +end + +# Checks the spacing inside and after block parameters pipes. Line breaks +# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and +# not by this cop. +# +# @example EnforcedStyleInsidePipes: no_space (default) +# # bad +# {}.each { | x, y |puts x } +# ->( x, y ) { puts x } +# +# # good +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# @example EnforcedStyleInsidePipes: space +# # bad +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# # good +# {}.each { | x, y | puts x } +# ->( x, y ) { puts x } +# +# source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#27 +class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#32 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#65 + def check_after_closing_pipe(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#125 + def check_arg(arg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#103 + def check_closing_pipe_space(arguments, closing_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#121 + def check_each_arg(args); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#56 + def check_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#150 + def check_no_space(space_begin_pos, space_end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#73 + def check_no_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#92 + def check_opening_pipe_space(arguments, opening_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#136 + def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#85 + def check_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#113 + def last_end_pos_inside_pipes(arguments, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#44 + def pipes(arguments); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#48 + def pipes?(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#52 + def style_parameter_name; end +end + +# Checks that the equals signs in parameter default assignments +# have or don't have surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# # good +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# @example EnforcedStyle: no_space +# # bad +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# # good +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#30 +class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#38 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#67 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#46 + def check_optarg(arg, equals, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#58 + def incorrect_style_detected(arg, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#83 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#79 + def no_surrounding_space?(arg, equals); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#75 + def space_on_both_sides?(arg, equals); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#36 +RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) + +# Checks the spacing around the keywords. +# +# @example +# +# # bad +# something 'test'do|x| +# end +# +# while(something) +# end +# +# something = 123if test +# +# # good +# something 'test' do |x| +# end +# +# while (something) +# end +# +# something = 123 if test +# +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#27 +class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#40 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#44 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#48 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#52 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#56 + def on_case_match(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#156 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#60 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#64 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#68 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#72 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#76 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#80 + def on_kwbegin(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#85 + def on_match_pattern(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#92 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#96 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#100 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#104 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#108 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#112 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#116 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#120 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#124 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#128 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#136 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#140 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#144 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#148 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#152 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#132 + def on_zsuper(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#235 + def accept_left_parenthesis?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#239 + def accept_left_square_bracket?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#243 + def accept_namespace_operator?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#228 + def accepted_opening_delimiter?(range, char); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#162 + def check(node, locations, begin_keyword = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#177 + def check_begin(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#183 + def check_end(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#196 + def check_keyword(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#192 + def do?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#251 + def namespace_operator?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#255 + def preceded_by_operator?(node, _range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#247 + def safe_navigation_call?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#217 + def space_after_missing?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#210 + def space_before_missing?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#36 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#37 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#38 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#33 +RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#31 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#30 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 +RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#34 +RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) + +# Checks method call operators to not have spaces around them. +# +# @example +# # bad +# foo. bar +# foo .bar +# foo . bar +# foo. bar .buzz +# foo +# . bar +# . buzz +# foo&. bar +# foo &.bar +# foo &. bar +# foo &. bar&. buzz +# RuboCop:: Cop +# RuboCop:: Cop:: Base +# :: RuboCop::Cop +# +# # good +# foo.bar +# foo.bar.buzz +# foo +# .bar +# .buzz +# foo&.bar +# foo&.bar&.buzz +# RuboCop::Cop +# RuboCop::Cop::Base +# ::RuboCop::Cop +# +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 +class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#53 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#87 + def check_space(begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#67 + def check_space_after_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#81 + def check_space_after_double_colon(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#61 + def check_space_before_dot(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#43 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#41 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks that operators have space around them, except for ** which +# should or shouldn't have surrounding space depending on configuration. +# It allows vertical alignment consisting of one or more whitespace +# around operators. +# +# This cop has `AllowForAlignment` option. When `true`, allows most +# uses of extra spacing if the intent is to align with an operator on +# the previous or next line, not counting empty lines or comment lines. +# +# @example +# # bad +# total = 3*4 +# "apple"+"juice" +# my_number = 38/4 +# +# # good +# total = 3 * 4 +# "apple" + "juice" +# my_number = 38 / 4 +# @example AllowForAlignment: true (default) +# # good +# { +# 1 => 2, +# 11 => 3 +# } +# @example AllowForAlignment: false +# # bad +# { +# 1 => 2, +# 11 => 3 +# } +# @example EnforcedStyleForExponentOperator: no_space (default) +# # bad +# a ** b +# +# # good +# a**b +# @example EnforcedStyleForExponentOperator: space +# # bad +# a**b +# +# # good +# a ** b +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r +# +# # good +# 1/48r +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 +class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_assignment(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + def on_binary(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 + def on_special_asgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259 + def align_hash_cop_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198 + def autocorrect(corrector, range, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 + def check_operator(type, operator, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212 + def enclose_operator_with_space(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239 + def excess_leading_space?(type, operator, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 + def excess_trailing_space?(right_operand, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263 + def hash_table_style?; end + + # @yield [msg] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193 + def offense(type, operator, with_space, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225 + def offense_message(type, operator, with_space, right_operand); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175 + def operator_with_regular_syntax?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 + def regular_operator?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 + def should_not_have_surrounding_space?(operator, right_operand); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267 + def space_around_exponent_operator?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271 + def space_around_slash_operator?(right_operand); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 +RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 +RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that block braces have or don't have a space before the opening +# brace depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# foo.map{ |a| +# a.bar.to_s +# } +# +# # good +# foo.map { |a| +# a.bar.to_s +# } +# @example EnforcedStyle: no_space +# # bad +# foo.map { |a| +# a.bar.to_s +# } +# +# # good +# foo.map{ |a| +# a.bar.to_s +# } +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} +# @example EnforcedStyleForEmptyBraces: no_space +# # bad +# 7.times {} +# +# # good +# 7.times{} +# +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 +class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#133 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#153 + def block_delimiters_style; end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 + def check_empty(left_brace, space_plus_brace, used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#109 + def check_non_empty(left_brace, space_plus_brace, used_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#149 + def conflict_with_block_delimiters?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#157 + def empty_braces?(loc); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#101 + def handle_different_styles_for_empty_braces(used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 + def space_detected(left_brace, space_plus_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#117 + def space_missing(left_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 + def style_for_empty_braces; end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#52 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#50 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#49 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) + +# Checks for space between the name of a receiver and a left +# brackets. +# +# @example +# +# # bad +# collection [index_or_key] +# +# # good +# collection[index_or_key] +# +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#17 +class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#48 + def dot_before_brackets?(node, receiver_end_pos, selector_begin_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#35 + def offense_range(node, begin_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#54 + def offense_range_for_assignment(node, begin_pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#67 + def reference_variable_with_brackets?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#63 + def register_offense(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#21 +RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 +RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for comma (,) preceded by space. +# +# @example +# # bad +# [1 , 2 , 3] +# a(1 , 2) +# each { |a , b| } +# +# # good +# [1, 2, 3] +# a(1, 2) +# each { |a, b| } +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#19 +class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#23 + def kind(token); end +end + +# Checks for missing space between a token and a comment on the +# same line. +# +# @example +# # bad +# 1 + 1# this operation does ... +# +# # good +# 1 + 1 # this operation does ... +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#15 +class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#20 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#18 +RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that exactly one space is used between a method name and the +# first argument for method calls without parentheses. +# +# Alternatively, extra spaces can be added to align the argument with +# something on a preceding or following line, if the AllowForAlignment +# config parameter is true. +# +# @example +# # bad +# something x +# something y, z +# something'hello' +# +# # good +# something x +# something y, z +# something 'hello' +# +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#24 +class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#55 + def expect_params_after_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#64 + def no_space_between_method_name_and_first_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#51 + def regular_method_call_with_arguments?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 +RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) + +# Checks for semicolon (;) preceded by space. +# +# @example +# # bad +# x = 1 ; y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#18 + def kind(token); end +end + +# Checks for spaces between `->` and opening parameter +# parenthesis (`(`) in lambda literals. +# +# @example EnforcedStyle: require_no_space (default) +# # bad +# a = -> (x, y) { x + y } +# +# # good +# a = ->(x, y) { x + y } +# @example EnforcedStyle: require_space +# # bad +# a = ->(x, y) { x + y } +# +# # good +# a = -> (x, y) { x + y } +# +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#22 +class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#30 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#50 + def arrow_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#72 + def lambda_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#65 + def range_of_offense(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#58 + def space_after_arrow(lambda_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#54 + def space_after_arrow?(lambda_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#28 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#27 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) + +# Checks that brackets used for array literals have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that array literals have +# # no surrounding space. +# +# # bad +# array = [ a, b, c, d ] +# +# # good +# array = [a, b, c, d] +# @example EnforcedStyle: space +# # The `space` style enforces that array literals have +# # surrounding space. +# +# # bad +# array = [a, b, c, d] +# +# # good +# array = [ a, b, c, d ] +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets do not contain spaces. +# +# # bad +# foo = [ ] +# bar = [ ] +# +# # good +# foo = [] +# bar = [] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets contain exactly one space. +# +# # bad +# foo = [] +# bar = [ ] +# +# # good +# foo = [ ] +# bar = [ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#70 +class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#78 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#109 + def array_brackets(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#217 + def compact(corrector, bracket, side); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#203 + def compact_corrections(corrector, node, left, right); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 + def compact_offense(node, token, side: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#157 + def compact_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#118 + def empty_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#126 + def end_has_own_line?(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#133 + def index_for(node, token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#141 + def issue_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#137 + def line_and_column_for(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#178 + def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#189 + def next_to_bracket?(token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#153 + def next_to_comment?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#122 + def next_to_newline?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#170 + def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#75 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside array percent literals +# (i.e. %i/%w). +# +# Note that blank percent literals (e.g. `%i( )`) are checked by +# `Layout/SpaceInsidePercentLiteralDelimiters`. +# +# @example +# +# # bad +# %w(foo bar baz) +# # good +# %i(foo bar baz) +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#18 +class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#26 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#30 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#40 + def each_unnecessary_space_match(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#24 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that block braces have or don't have surrounding space inside +# them on configuration. For blocks taking parameters, it checks that the +# left brace has or doesn't have trailing space depending on +# configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that block braces don't +# # have surrounding space. +# +# # bad +# some_array.each { puts e } +# +# # good +# some_array.each {puts e} +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # block braces don't have a space in between when empty. +# +# # bad +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# # good +# some_array.each {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # block braces have at least a space in between when empty. +# +# # bad +# some_array.each {} +# +# # good +# some_array.each { } +# some_array.each { } +# some_array.each { } +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } +# @example SpaceBeforeBlockParameters: false +# # The SpaceBeforeBlockParameters style set to `false` enforces that +# # there is no space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each { |n| n * 2 } +# +# # good +# [1, 2, 3].each {|n| n * 2 } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 +class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#122 + def adjacent_braces(left_brace, right_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#161 + def aligned_braces?(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#130 + def braces_with_contents_inside(node, inner); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#105 + def check_inside(node, left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#137 + def check_left_brace(inner, left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#145 + def check_right_brace(node, inner, left_brace, right_brace, single_line); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#165 + def inner_last_space_count(inner); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#157 + def multiline_block?(left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#222 + def no_space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#169 + def no_space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#238 + def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#201 + def pipe?(args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#230 + def space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#186 + def space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 + def space_inside_right_brace(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#253 + def style_for_empty_braces; end +end + +# Checks that braces used for hash literals have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. +# +# # bad +# h = {a: 1, b: 2} +# +# # good +# h = { a: 1, b: 2 } +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that hash literals have +# # no surrounding space. +# +# # bad +# h = { a: 1, b: 2 } +# +# # good +# h = {a: 1, b: 2} +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. +# +# # bad +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# # good +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces do not contain spaces. +# +# # bad +# foo = { } +# bar = { } +# baz = { +# } +# +# # good +# foo = {} +# bar = {} +# baz = {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces contain space. +# +# # bad +# foo = {} +# +# # good +# foo = { } +# foo = { } +# foo = { +# } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#70 +class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#78 + def on_hash(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#137 + def ambiguous_or_unexpected_style_detected(style, is_match); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#129 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#89 + def check(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#184 + def check_whitespace_only_hash(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#202 + def enforce_no_space_style_for_empty_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#104 + def expect_space?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#117 + def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#150 + def message(brace, is_empty_braces, expect_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#145 + def offense?(token1, expect_space); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#196 + def range_inside_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#176 + def range_of_space_to_the_left(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#168 + def range_of_space_to_the_right(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#160 + def space_range(token_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#76 +RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside ordinary round parentheses. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that parentheses do not have spaces. +# +# # bad +# f( 3) +# g = (a + 3 ) +# f( ) +# +# # good +# f(3) +# g = (a + 3) +# f() +# @example EnforcedStyle: space +# # The `space` style enforces that parentheses have a space at the +# # beginning and end. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 +class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#66 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#161 + def can_be_ignored?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#99 + def correct_extraneous_space(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#115 + def correct_extraneous_space_between_consecutive_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#124 + def correct_extraneous_space_in_empty_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#135 + def correct_missing_space(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#153 + def left_parens?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#149 + def parens?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#88 + def process_with_compact_style(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#81 + def process_with_space_style(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#157 + def right_parens?(token1, token2); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#63 +RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#64 +RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside the delimiters of +# %i/%w/%x literals. +# +# @example +# +# # bad +# %i( foo bar baz ) +# +# # good +# %i(foo bar baz) +# +# # bad +# %w( foo bar baz ) +# +# # good +# %w(foo bar baz) +# +# # bad +# %x( ls -l ) +# +# # good +# %x(ls -l) +# +# # bad +# %w( ) +# %w( +# ) +# +# # good +# %w() +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#36 +class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#45 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#53 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#49 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#60 + def add_offenses_for_blank_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#69 + def add_offenses_for_unnecessary_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#85 + def body_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#79 + def regex_matches(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#42 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#43 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#41 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside range literals. +# +# @example +# # bad +# 1 .. 3 +# +# # good +# 1..3 +# +# # bad +# 'a' .. 'z' +# +# # good +# 'a'..'z' +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#20 +class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#29 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#25 + def on_irange(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#35 + def check(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that reference brackets have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that reference brackets have +# # no surrounding space. +# +# # bad +# hash[ :key ] +# array[ index ] +# +# # good +# hash[:key] +# array[index] +# @example EnforcedStyle: space +# # The `space` style enforces that reference brackets have +# # surrounding space. +# +# # bad +# hash[:key] +# array[index] +# +# # good +# hash[ :key ] +# array[ index ] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets do not contain spaces. +# +# # bad +# foo[ ] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets contain exactly one space. +# +# # bad +# foo[] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#60 +class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#92 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#121 + def closing_bracket(tokens, opening_bracket); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#137 + def empty_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#110 + def left_ref_bracket(node, tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#132 + def previous_token(current_token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#104 + def reference_brackets(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#66 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#65 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#68 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for whitespace within string interpolations. +# +# @example EnforcedStyle: no_space (default) +# # bad +# var = "This is the #{ space } example" +# +# # good +# var = "This is the #{no_space} example" +# @example EnforcedStyle: space +# # bad +# var = "This is the #{no_space} example" +# +# # good +# var = "This is the #{ space } example" +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#21 +class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 + def autocorrect(corrector, begin_node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 + def delimiters(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Looks for trailing blank lines and a final newline in the +# source code. +# +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. +# +# # bad +# class Foo; end +# +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# # EOF +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. +# +# # bad +# class Foo; end +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# +# # EOF +# +# source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 +class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 + def ends_in_end?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 + def message(wanted_blank_lines, blank_lines); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 + def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end +end + +# Looks for trailing whitespace in the source code. +# +# @example +# # The line in this example contains spaces after the 0. +# # bad +# x = 0 +# +# # The line in this example ends directly after the 0. +# # good +# x = 0 +# @example AllowInHeredoc: false (default) +# # The line in this example contains spaces after the 0. +# # bad +# code = <<~RUBY +# x = 0 +# RUBY +# +# # ok +# code = <<~RUBY +# x = 0 #{} +# RUBY +# +# # good +# trailing_whitespace = ' ' +# code = <<~RUBY +# x = 0#{trailing_whitespace} +# RUBY +# @example AllowInHeredoc: true +# # The line in this example contains spaces after the 0. +# # good +# code = <<~RUBY +# x = 0 +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#42 +class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#57 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#49 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#112 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#103 + def find_heredoc(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#108 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#125 + def offense_range(lineno, line); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#61 + def process_line(line, lineno); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#75 + def process_line_in_heredoc(corrector, range, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#99 + def skip_heredoc?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#95 + def static?(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#86 + def whitespace_is_indentation?(range, level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#90 + def whitespace_only?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#47 +RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#5 +module RuboCop::Cop::Legacy; end + +# Legacy support for Corrector#corrections +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#8 +class RuboCop::Cop::Legacy::CorrectionsProxy + # @return [CorrectionsProxy] a new instance of CorrectionsProxy + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#9 + def initialize(corrector); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#13 + def <<(callable); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#21 + def concat(corrections); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#17 + def empty?; end + + protected + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#31 + def corrector; end + + private + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#35 + def suppress_clobbering; end +end + +# This class handles autocorrection for code that needs to be moved +# to new lines. +# +# source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#7 +class RuboCop::Cop::LineBreakCorrector + extend ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::TrailingBody + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#27 + def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#15 + def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#35 + def move_comment(eol_comment:, node:, corrector:); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#45 + def remove_semicolon(node, corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#51 + def semicolon(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 + def trailing_class_definition?(token, body); end + end +end + +# Help methods for determining if a line is too long. +# +# source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#6 +module RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Alignment + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#24 + def allow_uri?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#28 + def allowed_uri_position?(line, uri_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#15 + def directive_on_source_line?(line_index); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#72 + def extend_uri_end_position(line, end_position); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#36 + def find_excessive_uri_range(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#11 + def ignore_cop_directives?; end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#59 + def indentation_difference(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 + def line_length(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#110 + def line_length_without_directive(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 + def match_uris(string); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#88 + def tab_indentation_width; end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#93 + def uri_regexp; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#103 + def valid_uri?(uri_ish_string); end +end + +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#5 +module RuboCop::Cop::Lint; end + +# Checks for mistyped shorthand assignments. +# +# @example +# # bad +# x =- y +# x =+ y +# x =* y +# x =! y +# +# # good +# x -= y # or x = -y +# x += y # or x = +y +# x *= y # or x = *y +# x != y # or x = !y +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#21 +class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#44 + def rhs(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#28 +RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#24 +RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#26 +RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous block association with method +# when param passed without parentheses. +# +# This cop can customize allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# @example +# +# # bad +# some_method a { |val| puts val } +# +# # good +# # With parentheses, there's no ambiguity. +# some_method(a { |val| puts val }) +# # or (different meaning) +# some_method(a) { |val| puts val } +# +# # good +# # Operator methods require no disambiguation +# foo == bar { |b| b.baz } +# +# # good +# # Lambda arguments require no disambiguation +# foo = ->(bar) { bar.baz } +# @example AllowedMethods: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# @example AllowedMethods: [change] +# +# # good +# expect { do_something }.to change { object.attribute } +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# @example AllowedPatterns: ['change'] +# +# # good +# expect { do_something }.to change { object.attribute } +# expect { do_something }.to not_change { object.attribute } +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 +class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 + def allowed_method_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 + def ambiguous_block_association?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 + def wrap_in_parentheses(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous operators in the first argument of a +# method invocation without parentheses. +# +# @example +# +# # bad +# +# # The `*` is interpreted as a splat operator but it could possibly be +# # a `*` method invocation (i.e. `do_something.*(some_array)`). +# do_something *some_array +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(*some_array) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 +class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 + def find_offense_node_by(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 + def message(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 + def offense_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 + def offense_position?(node, diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 + def unary_operator?(node, diagnostic); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 +RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 +RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for expressions containing multiple binary operators +# where precedence is ambiguous due to lack of parentheses. For example, +# in `1 + 2 * 3`, the multiplication will happen before the addition, but +# lexically it appears that the addition will happen first. +# +# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison +# operators (ie. `a =~ b`) because those are not ambiguous. +# +# NOTE: Ranges are handled by `Lint/AmbiguousRange`. +# +# @example +# # bad +# a + b * c +# a || b && c +# a ** b + c +# +# # good (different precedence) +# a + (b * c) +# a || (b && c) +# (a ** b) + c +# +# # good (same precedence) +# a + b + c +# a * b / c % d +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#30 +class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#54 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#65 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#105 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#89 + def greater_precedence?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#85 + def operator?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#97 + def operator_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#79 + def precedence(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#45 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) + +# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#34 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#44 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous ranges. +# +# Ranges have quite low precedence, which leads to unexpected behavior when +# using a range with other operators. This cop avoids that by making ranges +# explicit by requiring parenthesis around complex range boundaries (anything +# that is not a literal: numerics, strings, symbols, etc.). +# +# This cop can be configured with `RequireParenthesesForMethodChains` in order to +# specify whether method chains (including `self.foo`) should be wrapped in parens +# by this cop. +# +# NOTE: Regardless of this configuration, if a method receiver is a basic literal +# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. +# +# @example +# # bad +# x || 1..2 +# (x || 1..2) +# 1..2.to_a +# +# # good, unambiguous +# 1..2 +# 'a'..'z' +# :bar..:baz +# MyClass::MIN..MyClass::MAX +# @min..@max +# a..b +# -a..b +# +# # good, ambiguity removed +# x || (1..2) +# (x || 1)..2 +# (x || 1)..(y || 2) +# (1..2).to_a +# @example RequireParenthesesForMethodChains: false (default) +# # good +# a.foo..b.bar +# (a.foo)..(b.bar) +# @example RequireParenthesesForMethodChains: true +# # bad +# a.foo..b.bar +# +# # good +# (a.foo)..(b.bar) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 +class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + def on_irange(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#82 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#89 + def acceptable_call?(node); end + + # @yield [range.begin] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 + def each_boundary(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#99 + def require_parentheses_for_method_chain?; end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 +RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous regexp literals in the first argument of +# a method invocation without parentheses. +# +# @example +# +# # bad +# +# # This is interpreted as a method invocation with a regexp literal, +# # but it could possibly be `/` method invocations. +# # (i.e. `do_something./(pattern)./(i)`) +# do_something /pattern/i +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(/pattern/i) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 +class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 + def find_offense_node(node, regexp_receiver); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 + def find_offense_node_by(diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 + def first_argument_is_regexp?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 + def method_chain_to_regexp_receiver?(node, regexp_receiver); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 +RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for assignments in the conditions of +# if/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# if some_var = value +# do_something +# end +# +# # good +# if some_var == value +# do_something +# end +# @example AllowSafeAssignment: true (default) +# # good +# if (some_var = value) +# do_something +# end +# @example AllowSafeAssignment: false +# # bad +# if (some_var = value) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#41 +class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#82 + def allowed_construct?(asgn_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#86 + def conditional_assignment?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#74 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#90 + def skip_children?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#96 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#53 +RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#50 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#46 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. +# This cop identifies places where `BigDecimal.new()` +# can be replaced by `BigDecimal()`. +# +# @example +# # bad +# BigDecimal.new(123.456, 3) +# +# # good +# BigDecimal(123.456, 3) +# +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#17 +class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#25 + def big_decimal_new(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#30 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 +RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#22 +RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where binary operator has identical operands. +# +# It covers arithmetic operators: `-`, `/`, `%`; +# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; +# bitwise operators: `|`, `^`, `&`; +# boolean operators: `&&`, `||` +# and "spaceship" operator - ``<=>``. +# +# Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. +# Although these can be rewritten in a different way, it should not be necessary to +# do so. This does not include operations such as `-` or `/` where the result will +# always be the same (`x - x` will always be 0; `x / x` will always be 1), and +# thus are legitimate offenses. +# +# @example +# # bad +# x / x +# x.top >= x.top +# +# if a.x != 0 && a.x != 0 +# do_something +# end +# +# def child? +# left_child || left_child +# end +# +# # good +# x + x +# 1 << 1 +# +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 +class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#52 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#49 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) + +# Checks for `:true` and `:false` symbols. +# In most cases it would be a typo. +# +# @example +# +# # bad +# :true +# +# # good +# true +# +# # bad +# :false +# +# # good +# false +# +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 +class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 + def boolean_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 +RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) + +# Checks for circular argument references in optional keyword +# arguments and optional ordinal arguments. +# +# This cop mirrors a warning produced by MRI since 2.2. +# +# @example +# +# # bad +# def bake(pie: pie) +# pie.heat_up +# end +# +# # good +# def bake(pie:) +# pie.refrigerate +# end +# +# # good +# def bake(pie: self.pie) +# pie.feed_to(user) +# end +# +# # bad +# def cook(dry_ingredients = dry_ingredients) +# dry_ingredients.reduce(&:+) +# end +# +# # good +# def cook(dry_ingredients = self.dry_ingredients) +# dry_ingredients.combine +# end +# +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37 +class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 + def check_for_circular_argument_references(arg_name, arg_value); end +end + +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38 +RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) + +# Do not define constants within a block, since the block's scope does not +# isolate or namespace the constant in any way. +# +# If you are trying to define that constant once, define it outside of +# the block instead, or use a variable or method if defining the constant +# in the outer scope would be problematic. +# +# For meta-programming, use `const_set`. +# +# @example +# # bad +# task :lint do +# FILES_TO_LINT = Dir['lib/*.rb'] +# end +# +# # bad +# describe 'making a request' do +# class TestRequest; end +# end +# +# # bad +# module M +# extend ActiveSupport::Concern +# included do +# LIST = [] +# end +# end +# +# # good +# task :lint do +# files_to_lint = Dir['lib/*.rb'] +# end +# +# # good +# describe 'making a request' do +# let(:test_request) { Class.new } +# # see also `stub_const` for RSpec +# end +# +# # good +# module M +# extend ActiveSupport::Concern +# included do +# const_set(:LIST, []) +# end +# end +# @example AllowedMethods: ['enums'] (default) +# # good +# +# # `enums` for Typed Enums via `T::Enum` in Sorbet. +# # https://sorbet.org/docs/tenum +# class TestEnum < T::Enum +# enums do +# Foo = new("foo") +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#64 +class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#70 + def constant_assigned_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#75 + def module_defined_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#79 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#94 + def method_name(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 +RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for overwriting an exception with an exception result by use ``rescue =>``. +# +# You intended to write as `rescue StandardError`. +# However, you have written `rescue => StandardError`. +# In that case, the result of `rescue` will overwrite `StandardError`. +# +# @example +# +# # bad +# begin +# something +# rescue => StandardError +# end +# +# # good +# begin +# something +# rescue StandardError +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#26 +class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#41 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#33 + def overwritten_constant(param0 = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#37 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#30 +RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) + +# Check that certain constants are fully qualified. +# +# This is not enabled by default because it would mark a lot of offenses +# unnecessarily. +# +# Generally, gems should fully qualify all constants to avoid conflicts with +# the code that uses the gem. Enable this cop without using `Only`/`Ignore` +# +# Large projects will over time end up with one or two constant names that +# are problematic because of a conflict with a library or just internally +# using the same name a namespace and a class. To avoid too many unnecessary +# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` +# +# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# this cop which is disabled by default. +# +# @example +# # By default checks every constant +# +# # bad +# User +# +# # bad +# User::Login +# +# # good +# ::User +# +# # good +# ::User::Login +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants +# +# # bad +# Login +# +# # good +# ::Login +# +# # good +# User::Login +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants +# +# # bad +# User +# +# # good +# ::User::Login +# +# # good +# Login +# +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 +class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#70 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#66 + def unqualified_const?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#83 + def allowed_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#78 + def const_name?(name); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#87 + def ignored_names; end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 +RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) + +# Checks for debug calls (such as `debugger` or `binding.pry`) that should +# not be kept for production code. +# +# The cop can be configured using `DebuggerMethods`. By default, a number of gems +# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, +# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. +# +# Specific default groups can be disabled if necessary: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# WebConsole: ~ +# ---- +# +# You can also add your own methods by adding a new category: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# MyDebugger: +# MyDebugger.debug_this +# ---- +# +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# +# @example +# +# # bad (ok during development) +# +# # using pry +# def some_method +# binding.pry +# do_something +# end +# +# # bad (ok during development) +# +# # using byebug +# def some_method +# byebug +# do_something +# end +# +# # good +# +# def some_method +# do_something +# end +# @example DebuggerMethods: [my_debugger] +# +# # bad (ok during development) +# +# def some_method +# my_debugger +# end +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) +# +# require 'my_debugger/start' +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 +class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138 + def assumed_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 + def assumed_usage_context?(node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127 + def chained_method_name(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 + def debugger_method?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + def debugger_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 +RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the deprecated class method usages. +# +# @example +# +# # bad +# File.exists?(some_path) +# Dir.exists?(some_path) +# iterator? +# attr :name, true +# attr :name, false +# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. +# ENV.clone +# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. +# Socket.gethostbyname(host) +# Socket.gethostbyaddr(host) +# +# # good +# File.exist?(some_path) +# Dir.exist?(some_path) +# block_given? +# attr_accessor :name +# attr_reader :name +# ENV # `ENV.freeze` cannot prohibit changes to environment variables. +# ENV.to_h +# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. +# Addrinfo.getaddrinfo(nodename, service) +# Addrinfo.tcp(host, port).getnameinfo +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#33 +class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#53 + def deprecated_class_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#63 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#112 + def dir_env_file_const?(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#83 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#93 + def preferred_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#108 + def socket_const?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#50 +RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#36 +RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#41 +RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#37 +RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for deprecated constants. +# +# It has `DeprecatedConstants` config. If there is an alternative method, you can set +# alternative value as `Alternative`. And you can set the deprecated version as +# `DeprecatedVersion`. These options can be omitted if they are not needed. +# +# DeprecatedConstants: +# 'DEPRECATED_CONSTANT': +# Alternative: 'alternative_value' +# DeprecatedVersion: 'deprecated_version' +# +# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, `Random::DEFAULT`, +# `Struct::Group`, and `Struct::Passwd` are configured. +# +# @example +# +# # bad +# NIL +# TRUE +# FALSE +# Net::HTTPServerException +# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. +# Struct::Group +# Struct::Passwd +# +# # good +# nil +# true +# false +# Net::HTTPClientException +# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. +# Etc::Group +# Etc::Passwd +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#40 +class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#46 + def on_const(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#66 + def constant_name(node, nested_constant_name); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#82 + def deprecated_constants; end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#72 + def message(good, bad, deprecated_version); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#44 +RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#43 +RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) + +# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` +# deprecated since OpenSSL version 2.2.0. Prefer passing a string +# instead. +# +# @example +# +# # bad +# OpenSSL::Cipher::AES.new(128, :GCM) +# +# # good +# OpenSSL::Cipher.new('aes-128-gcm') +# +# # bad +# OpenSSL::Digest::SHA256.new +# +# # good +# OpenSSL::Digest.new('SHA256') +# +# # bad +# OpenSSL::Digest::SHA256.digest('foo') +# +# # good +# OpenSSL::Digest.digest('SHA256', 'foo') +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 +class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#39 + def algorithm_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 + def digest_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#53 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#100 + def algorithm_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#65 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#129 + def build_cipher_arguments(node, algorithm_name, no_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#92 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#77 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#96 + def openssl_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#118 + def replacement_args(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 + def sanitize_arguments(arguments); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) + +# Checks constructors for disjunctive assignments (`||=`) that should +# be plain assignments. +# +# So far, this cop is only concerned with disjunctive assignment of +# instance variables. +# +# In ruby, an instance variable is nil until a value is assigned, so the +# disjunction is unnecessary. A plain assignment has the same effect. +# +# @example +# # bad +# def initialize +# @x ||= 1 +# end +# +# # good +# def initialize +# @x = 1 +# end +# +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#48 +class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#53 + def on_def(node); end + + private + + # @param node [DefNode] a constructor definition + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#60 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#66 + def check_body(body); end + + # @param lines [Array] the logical lines of the constructor + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#78 + def check_body_lines(lines); end + + # Add an offense if the LHS of the given disjunctive assignment is + # an instance variable. + # + # For now, we only care about assignments to instance variables. + # + # @param node [Node] a disjunctive assignment + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#99 + def check_disjunctive_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#51 +RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated bodies +# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. +# +# With `IgnoreLiteralBranches: true`, branches are not registered +# as offenses if they return a basic literal value (string, symbol, +# integer, float, rational, complex, `true`, `false`, or `nil`), or +# return an array, hash, regexp or range that only contains one of +# the above basic literal values. +# +# With `IgnoreConstantBranches: true`, branches are not registered +# as offenses if they return a constant value. +# +# @example +# # bad +# if foo +# do_foo +# do_something_else +# elsif bar +# do_foo +# do_something_else +# end +# +# # good +# if foo || bar +# do_foo +# do_something_else +# end +# +# # bad +# case x +# when foo +# do_foo +# when bar +# do_foo +# else +# do_something_else +# end +# +# # good +# case x +# when foo, bar +# do_foo +# else +# do_something_else +# end +# +# # bad +# begin +# do_something +# rescue FooError +# handle_error +# rescue BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, BarError +# handle_error +# end +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end +# @example IgnoreConstantBranches: true +# # good +# case size +# when "small" then SMALL_SIZE +# when "medium" then MEDIUM_SIZE +# when "large" then LARGE_SIZE +# else MEDIUM_SIZE +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#86 +class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_branching_statement(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#117 + def branches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#121 + def consider_branch?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#147 + def const_branch?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#132 + def ignore_constant_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#128 + def ignore_literal_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#136 + def literal_branch?(branch); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#103 + def offense_range(duplicate_branch); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#87 +RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions +# used in case 'when' expressions. +# +# @example +# +# # bad +# case x +# when 'first' +# do_something +# when 'first' +# do_something_else +# end +# +# # good +# case x +# when 'first' +# do_something +# when 'second' +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 +class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 + def on_case(case_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 +RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions used in if 'elsif'. +# +# @example +# # bad +# if x == 1 +# do_something +# elsif x == 1 +# do_something_else +# end +# +# # good +# if x == 1 +# do_something +# elsif x == 2 +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#23 +class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#26 + def on_if(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#24 +RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated keys in hash literals. +# This cop considers both primitive types and constants for the hash keys. +# +# This cop mirrors a warning in Ruby 2.2. +# +# @example +# +# # bad +# hash = { food: 'apple', food: 'orange' } +# +# # good +# hash = { food: 'apple', other_food: 'orange' } +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 +class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 +RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated magic comments. +# +# @example +# +# # bad +# +# # encoding: ascii +# # encoding: ascii +# +# # good +# +# # encoding: ascii +# +# # bad +# +# # frozen_string_literal: true +# # frozen_string_literal: true +# +# # good +# +# # frozen_string_literal: true +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#28 +class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#35 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#51 + def magic_comment_lines; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#65 + def register_offense(range); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#33 +RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated patterns used in `in` keywords. +# +# @example +# +# # bad +# case x +# in 'first' +# do_something +# in 'first' +# do_something_else +# end +# +# # good +# case x +# in 'first' +# do_something +# in 'second' +# do_something_else +# end +# +# # bad - repeated alternate patterns with the same conditions don't depend on the order +# case x +# in foo | bar +# first_method +# in bar | foo +# second_method +# end +# +# # good +# case x +# in foo | bar +# first_method +# in bar | baz +# second_method +# end +# +# # bad - repeated hash patterns with the same conditions don't depend on the order +# case x +# in foo: a, bar: b +# first_method +# in bar: b, foo: a +# second_method +# end +# +# # good +# case x +# in foo: a, bar: b +# first_method +# in bar: b, baz: c +# second_method +# end +# +# # bad - repeated array patterns with elements in the same order +# case x +# in [foo, bar] +# first_method +# in [foo, bar] +# second_method +# end +# +# # good +# case x +# in [foo, bar] +# first_method +# in [bar, foo] +# second_method +# end +# +# # bad - repeated the same patterns and guard conditions +# case x +# in foo if bar +# first_method +# in foo if bar +# second_method +# end +# +# # good +# case x +# in foo if bar +# first_method +# in foo if baz +# second_method +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#97 + def on_case_match(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#108 + def pattern_identity(pattern); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#93 +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated instance (or singleton) method +# definitions. +# +# @example +# +# # bad +# def foo +# 1 +# end +# +# def foo +# 2 +# end +# +# # bad +# def foo +# 1 +# end +# +# alias foo bar +# +# # good +# def foo +# 1 +# end +# +# def bar +# 2 +# end +# +# # good +# def foo +# 1 +# end +# +# alias bar foo +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42 +class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base + # @return [DuplicateMethods] a new instance of DuplicateMethods + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#88 + def alias_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#75 + def method_alias?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#79 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#62 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#94 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#93 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#107 + def check_const_receiver(node, name, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#114 + def check_self_receiver(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198 + def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#126 + def found_instance_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 + def found_method(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#139 + def found_sclass_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#176 + def location(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 + def lookup_constant(node, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121 + def message_for_dup(node, method_name, key); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#168 + def method_key(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#184 + def on_attr(node, attr_name, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#240 + def possible_dsl?(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#226 + def qualified_name(enclosing, namespace, mod_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + def source_location(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45 +RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43 +RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44 +RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for duplicate elements in Regexp character classes. +# +# @example +# +# # bad +# r = /[xyx]/ +# +# # bad +# r = /[0-9x0-9]/ +# +# # good +# r = /[xy]/ +# +# # good +# r = /[0-9x]/ +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#21 +class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#37 + def each_repeated_character_class_element_loc(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#29 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#102 + def escaped_octal?(string); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#54 + def group_expressions(node, expressions); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#110 + def interpolation_locs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#106 + def octal?(char); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#71 + def pop_octal_digits(current_child, expressions); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#89 + def skip_expression?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#80 + def source_range(children); end + + # Since we blank interpolations with a space for every char of the interpolation, we would + # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes + # that are within an interpolation. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#96 + def within_interpolation?(node, child); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::OCTAL_DIGITS_AFTER_ESCAPE = T.let(T.unsafe(nil), Integer) + +# Checks for duplicate ``require``s and ``require_relative``s. +# +# @example +# # bad +# require 'foo' +# require 'bar' +# require 'foo' +# +# # good +# require 'foo' +# require 'bar' +# +# # good +# require 'foo' +# require_relative 'foo' +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#26 +class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#39 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#45 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#30 +RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#31 +RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#32 +RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks that there are no repeated exceptions +# used in 'rescue' expressions. +# +# @example +# # bad +# begin +# something +# rescue FirstException +# handle_exception +# rescue FirstException +# handle_other_exception +# end +# +# # good +# begin +# something +# rescue FirstException +# handle_exception +# rescue SecondException +# handle_other_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#28 +class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + + # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#33 + def on_rescue(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 +RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks if each_with_object is called with an immutable +# argument. Since the argument is the object that the given block shall +# make calls on to build something based on the enumerable that +# each_with_object iterates over, an immutable argument makes no sense. +# It's definitely a bug. +# +# @example +# +# # bad +# sum = numbers.each_with_object(0) { |e, a| a += e } +# +# # good +# num = 0 +# sum = numbers.each_with_object(num) { |e, a| a += e } +# +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 +class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 + def each_with_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 +RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 +RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for odd `else` block layout - like +# having an expression on the same line as the `else` keyword, +# which is usually a mistake. +# +# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection +# is compatible correction for bad case syntax, but if your code makes a mistake +# with `elsif` and `else`, you will have to correct it manually. +# +# @example +# +# # bad +# +# if something +# # ... +# else do_this +# do_that +# end +# +# # good +# +# # This code is compatible with the bad case. It will be autocorrected like this. +# if something +# # ... +# else +# do_this +# do_that +# end +# +# # This code is incompatible with the bad case. +# # If `do_this` is a condition, `elsif` should be used instead of `else`. +# if something +# # ... +# elsif do_this +# do_that +# end +# +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41 +class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79 + def autocorrect(corrector, node, first_else); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69 + def check_else(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46 +RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) + +# Checks for blocks without a body. +# Such empty blocks are typically an oversight or we should provide a comment +# to clarify what we're aiming for. +# +# Empty lambdas and procs are ignored by default. +# +# NOTE: For backwards compatibility, the configuration that allows/disallows +# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also +# applies to procs. +# +# @example +# # bad +# items.each { |item| } +# +# # good +# items.each { |item| puts item } +# @example AllowComments: true (default) +# # good +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowComments: false +# # bad +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowEmptyLambdas: true (default) +# # good +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# @example AllowEmptyLambdas: false +# # bad +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#63 +class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#66 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#76 + def allow_comment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#83 + def allow_empty_lambdas?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#87 + def comment_disables_cop?(comment); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#64 +RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for classes and metaclasses without a body. +# Such empty classes and metaclasses are typically an oversight or we should provide a comment +# to be clearer what we're aiming for. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# class << self +# end +# end +# +# class << obj +# end +# +# # good +# class Foo +# def do_something +# # ... code +# end +# end +# +# class Bar +# class << self +# attr_reader :bar +# end +# end +# +# class << obj +# attr_reader :bar +# end +# @example AllowComments: false (default) +# # bad +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# @example AllowComments: true +# # good +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#72 +class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#76 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#81 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#87 + def body_or_allowed_comment_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#73 +RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#74 +RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `if`, `elsif` and `unless` branches without a body. +# +# NOTE: empty `else` branches are handled by `Style/EmptyElse`. +# +# @example +# # bad +# if condition +# end +# +# # bad +# unless condition +# end +# +# # bad +# if condition +# do_something +# elsif other_condition +# end +# +# # good +# if condition +# do_something +# end +# +# # good +# unless condition +# do_something +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# do_something_else +# end +# @example AllowComments: true (default) +# # good +# if condition +# do_something +# elsif other_condition +# # noop +# end +# @example AllowComments: false +# # bad +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#63 +class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#177 + def all_branches_body_missing?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#163 + def branch_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 + def correct_other_branches(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#183 + def deletion_range(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#158 + def else_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#152 + def empty_elsif_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#144 + def empty_if_branch?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#87 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#101 + def remove_comments(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#109 + def remove_empty_branch(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + def require_other_branches_correction?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 +RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty `ensure` blocks. +# +# @example +# +# # bad +# def some_method +# do_something +# ensure +# end +# +# # bad +# begin +# do_something +# ensure +# end +# +# # good +# def some_method +# do_something +# ensure +# do_something_else +# end +# +# # good +# begin +# do_something +# ensure +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 +class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 +RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of empty expressions. +# +# @example +# +# # bad +# +# foo = () +# if () +# bar +# end +# @example +# +# # good +# +# foo = (some_expression) +# if (some_expression) +# bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#25 +class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#28 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#36 + def empty_expression?(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 +RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) + +# Enforces that Ruby source files are not empty. +# +# @example +# # bad +# # Empty file +# +# # good +# # File containing non commented source lines +# @example AllowComments: true (default) +# # good +# # File consisting only of comments +# @example AllowComments: false +# # bad +# # File consisting only of comments +# +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 +class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#28 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#42 + def contains_only_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#38 + def empty_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#34 + def offending?; end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 +RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `in` pattern branches without a body. +# +# @example +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# end +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# nil +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# @example AllowComments: false +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#45 +class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#53 + def on_case_match(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#49 +RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty interpolation. +# +# @example +# +# # bad +# "result is #{}" +# +# # good +# "result is #{some_result}" +# +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 +class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 + def on_interpolation(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `when` branches without a body. +# +# @example +# +# # bad +# case foo +# when bar +# do_something +# when baz +# end +# +# # good +# case condition +# when foo +# do_something +# when bar +# nil +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# when foo +# do_something +# when bar +# # noop +# end +# @example AllowComments: false +# +# # bad +# case condition +# when foo +# do_something +# when bar +# # do nothing +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 +class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 + def on_case(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 +RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) + +# Checks for `return` from an `ensure` block. +# `return` from an ensure block is a dangerous code smell as it +# will take precedence over any exception being raised, +# and the exception will be silently thrown away as if it were rescued. +# +# If you want to rescue some (or all) exceptions, best to do it explicitly +# +# @example +# +# # bad +# def foo +# do_something +# ensure +# cleanup +# return self +# end +# +# # good +# def foo +# do_something +# self +# ensure +# cleanup +# end +# +# # good +# def foo +# begin +# do_something +# rescue SomeException +# # Let's ignore this exception +# end +# self +# ensure +# cleanup +# end +# +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 +class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46 +RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warnings in Ruby 2.6. +# +# [source,console] +# ---- +# $ cat example.rb +# ERB.new('hi', nil, '-', '@output_buffer') +# $ ruby -rerb example.rb +# example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is +# deprecated. Do not use it, and specify other arguments as keyword arguments. +# example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. +# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. +# ---- +# +# Now non-keyword arguments other than first one are softly deprecated +# and will be removed when Ruby 2.5 becomes EOL. +# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. +# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. +# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can +# be replaced by `ERB.new(str, :trim_mode: trim_mode, eoutvar: eoutvar)`. +# +# @example +# # Target codes supports Ruby 2.6 and higher only +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# +# # Target codes supports Ruby 2.5 and lower only +# # good +# ERB.new(str, nil, '-', '@output_buffer') +# +# # Target codes supports Ruby 2.6, 2.5 and lower +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# # Ruby standard library style +# # https://github.com/ruby/ruby/commit/3406c5d +# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# # good +# # Use `RUBY_VERSION` style +# if RUBY_VERSION >= '2.6' +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61 +class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 + def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#160 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 + def build_kwargs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 + def correct_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 + def message(positional_argument_index, arg_value); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 + def override_by_legacy_args(kwargs, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 +RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of flip-flop operator +# based on the Ruby Style Guide. +# +# Here is the history of flip-flops in Ruby. +# flip-flop operator is deprecated in Ruby 2.6.0 and +# the deprecation has been reverted by Ruby 2.7.0 and +# backported to Ruby 2.6. +# See: https://bugs.ruby-lang.org/issues/5400 +# +# @example +# # bad +# (1..20).each do |x| +# puts x if (x == 5) .. (x == 10) +# end +# +# # good +# (1..20).each do |x| +# puts x if (x >= 5) && (x <= 10) +# end +# +# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#25 +class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#32 + def on_eflipflop(node); end + + # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#28 + def on_iflipflop(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#26 +RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of precise comparison of floating point numbers. +# +# Floating point values are inherently inaccurate, and comparing them for exact equality +# is almost never the desired semantics. Comparison via the `==/!=` operators checks +# floating-point value representation to be exactly the same, which is very unlikely +# if you perform any arithmetic operations involving precision loss. +# +# # good - comparing against zero +# x == 0.0 +# x != 0.0 +# +# # good +# (x - 0.1).abs < Float::EPSILON +# +# # good +# tolerance = 0.0001 +# (x - 0.1).abs < tolerance +# +# # Or some other epsilon based type of comparison: +# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ +# +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 +class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 + def check_numeric_returning_method(node); end + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 + def check_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53 + def float?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68 + def literal_zero?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 +RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 +RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 +RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 +RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 +RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies Float literals which are, like, really really really +# really really really really really big. Too big. No-one needs Floats +# that big. If you need a float that big, something is wrong with you. +# +# @example +# +# # bad +# float = 3.0e400 +# +# # good +# float = 42.9 +# +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 +class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 + def on_float(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 +RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) + +# This lint sees if there is a mismatch between the number of +# expected fields for format/sprintf/#% and what is actually +# passed as arguments. +# +# In addition it checks whether different formats are used in the same +# format string. Do not mix numbered, unnumbered, and named formats in +# the same format string. +# +# @example +# +# # bad +# format('A value: %s and another: %i', a_value) +# +# # good +# format('A value: %s and another: %i', a_value, another) +# +# # bad +# format('Unnumbered format: %s and numbered: %2$s', a_value, another) +# +# # good +# format('Numbered format: %1$s and numbered %2$s', a_value, another) +# +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 +class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 + def called_on_string?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 + def count_format_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + def count_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 + def count_percent_matches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + def countable_format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 + def countable_percent?(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 + def expected_fields_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 + def format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 + def format_method?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 + def format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 + def invalid_format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 + def matched_arguments_count?(expected, passed); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 + def method_with_format_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 + def offending_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 + def percent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 + def splat_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 + def sprintf?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 + def string_type?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 +RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) + +# http://rubular.com/r/CvpbxkcTzy +# +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 +RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 +RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) + +# Prefer using `Hash#compare_by_identity` rather than using `object_id` +# for hash keys. +# +# This cop looks for hashes being keyed by objects' `object_id`, using +# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. +# +# @example +# # bad +# hash = {} +# hash[foo.object_id] = :bar +# hash.key?(baz.object_id) +# +# # good +# hash = {}.compare_by_identity +# hash[foo] = :bar +# hash.key?(baz) +# +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#31 +class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 + def id_as_hash_key?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#34 +RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 +RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of a method call where +# the receiver of the call is a HEREDOC. +# +# @example +# # bad +# <<-SQL +# bar +# SQL +# .strip_indent +# +# <<-SQL +# bar +# SQL +# .strip_indent +# .trim +# +# # good +# <<~SQL +# bar +# SQL +# +# <<~SQL.trim +# bar +# SQL +# +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#31 +class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#97 + def all_on_same_line?(nodes); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#50 + def autocorrect(corrector, node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#77 + def call_after_heredoc_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#107 + def call_end_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#116 + def call_line_range(node); end + + # Returns nil if no range can be safely repositioned. + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#122 + def call_range_to_safely_reposition(node, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#86 + def calls_on_multiple_lines?(node, _heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#82 + def correctly_positioned?(node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#111 + def heredoc_begin_line_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#103 + def heredoc_end_pos(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#73 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#59 + def heredoc_node_descendent_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#67 + def send_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#146 + def trailing_comma?(call_source, call_line_source); end +end + +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#35 +RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) + +# Prefer `equal?` over `==` when comparing `object_id`. +# +# `Object#equal?` is provided to compare objects for identity, and in contrast +# `Object#==` is provided for the purpose of doing value comparison. +# +# @example +# # bad +# foo.object_id == bar.object_id +# +# # good +# foo.equal?(bar) +# +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18 +class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40 + def compare_between_object_id_by_double_equal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44 + def object_id_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21 +RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22 +RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for implicit string concatenation of string literals +# which are on the same line. +# +# @example +# +# # bad +# array = ['Item 1' 'Item 2'] +# +# # good +# array = ['Item 1Item 2'] +# array = ['Item 1' + 'Item 2'] +# array = [ +# 'Item 1' \ +# 'Item 2' +# ] +# +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 +class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + def display_str(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 + def each_bad_cons(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 + def ending_delimiter(str); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 + def str_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 + def string_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + def string_literals?(node1, node2); end +end + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 +RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. +# +# When an array of IO objects waiting for an exception (the third argument of `IO.select`) +# is used as an argument, there is no alternative API, so offenses are not registered. +# +# NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`, +# and the return value of `io.wait_readable` and `io.wait_writable` are `self`. +# They are not autocorrected when assigning a return value because these types are different. +# It's up to user how to handle the return value. +# +# @example +# +# # bad +# IO.select([io], [], [], timeout) +# +# # good +# io.wait_readable(timeout) +# +# # bad +# IO.select([], [io], [], timeout) +# +# # good +# io.wait_writable(timeout) +# +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#34 +class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#41 + def io_select(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#46 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#69 + def preferred_method(read, write, timeout); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#63 + def scheduler_compatible?(io1, io2); end +end + +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#37 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `private` or `protected` access modifiers which are +# applied to a singleton method. These access modifiers do not make +# singleton methods private/protected. `private_class_method` can be +# used for that. +# +# @example +# +# # bad +# class C +# private +# +# def self.method +# puts 'hi' +# end +# end +# +# # good +# class C +# def self.method +# puts 'hi' +# end +# +# private_class_method :method +# end +# +# # good +# class C +# class << self +# private +# +# def method +# puts 'hi' +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 +class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 + def private_class_methods(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + def check_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 + def correct_visibility?(node, modifier, ignored_methods); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 + def format_message(modifier); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 + def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 + def private_class_method_names(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 +RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Looks for error classes inheriting from `Exception`. +# It is configurable to suggest using either `StandardError` (default) or +# `RuntimeError` instead. +# +# @example EnforcedStyle: standard_error (default) +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < StandardError; end +# +# C = Class.new(StandardError) +# @example EnforcedStyle: runtime_error +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < RuntimeError; end +# +# C = Class.new(RuntimeError) +# +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 +class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#53 + def class_new_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87 + def exception_class?(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99 + def preferred_base_class; end +end + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#44 +RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#45 +RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#50 +RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for interpolation in a single quoted string. +# +# @example +# +# # bad +# foo = 'something with #{interpolation} inside' +# +# # good +# foo = "something with #{interpolation} inside" +# +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 +class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49 + def heredoc?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 +RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warning in Ruby 3.3. +# +# [source,ruby] +# ---- +# $ ruby -e '0.times { it }' +# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; +# use it() or self.it +# ---- +# +# `it` calls without arguments will refer to the first block param in Ruby 3.4. +# So use `it()` or `self.it` to ensure compatibility. +# +# @example +# +# # bad +# do_something { it } +# +# # good +# do_something { it() } +# do_something { self.it } +# +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 +class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base + include ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + def deprecated_it_method?(node); end + + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 + def on_block(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks uses of lambda without a literal block. +# It emulates the following warning in Ruby 3.0: +# +# $ ruby -vwe 'lambda(&proc {})' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: warning: lambda without a literal block is deprecated; use the proc without +# lambda instead +# +# This way, proc object is never converted to lambda. +# Autocorrection replaces with compatible proc argument. +# +# @example +# +# # bad +# lambda(&proc { do_something }) +# lambda(&Proc.new { do_something }) +# +# # good +# proc { do_something } +# Proc.new { do_something } +# lambda { do_something } # If you use lambda. +# +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#28 +class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#35 + def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#39 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#31 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#32 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literals used as the conditions or as +# operands in and/or expressions serving as the conditions of +# if/while/until/case-when/case-in. +# +# NOTE: Literals in `case-in` condition where the match variable is used in +# `in` are accepted as a pattern matching. +# +# @example +# +# # bad +# if 20 +# do_something +# end +# +# # bad +# if some_var && true +# do_something +# end +# +# # good +# if some_var && some_condition +# do_something +# end +# +# # good +# # When using a boolean value for an infinite loop. +# while true +# break if condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#93 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#58 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#73 + def on_case_match(case_match_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#40 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#87 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#108 + def basic_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#138 + def check_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#99 + def check_for_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#120 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#147 + def condition(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#130 + def handle_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#116 + def primitive_array?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#155 + def when_conditions_range(when_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 +RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for literal assignments in the conditions of `if`, `while`, and `until`. +# It emulates the following Ruby warning: +# +# [source,console] +# ---- +# $ ruby -we 'if x = true; end' +# -e:1: warning: found `= literal' in conditional, should be == +# ---- +# +# As a lint cop, it cannot be determined if `==` is appropriate as intended, +# therefore this cop does not provide autocorrection. +# +# @example +# +# # bad +# if x = 42 +# do_something +# end +# +# # good +# if x == 42 +# do_something +# end +# +# # good +# if x = y +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#62 + def all_literals?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#79 + def offense_range(asgn_node, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#75 + def parallel_assignment_with_splat_operator?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36 +RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for interpolated literals. +# +# @example +# +# # bad +# "result is #{10}" +# +# # good +# "result is 10" +# +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15 +class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58 + def autocorrected_value(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104 + def autocorrected_value_for_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110 + def autocorrected_value_for_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80 + def autocorrected_value_for_string(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88 + def autocorrected_value_for_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 + def autocorrected_value_in_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95 + def autocorrected_value_in_hash_for_symbol(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + def ends_heredoc_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159 + def in_array_percent_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44 + def offending?(node); end + + # Does node print its own source when converted to a string? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142 + def prints_as_self?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147 + def space_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52 + def special_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22 +RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21 +RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `begin...end while/until something`. +# +# @example +# +# # bad +# +# # using while +# begin +# do_something +# end while some_condition +# +# # good +# +# # while replacement +# loop do +# do_something +# break unless some_condition +# end +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition +# +# # good +# +# # until replacement +# loop do +# do_something +# break if some_condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 +class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 + def build_break_line(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 + def keyword_and_condition_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + def register_offense(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 +RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) + +# cop disables on wide ranges of code, that latter contributors to +# a file wouldn't be aware of. +# +# @example +# # Lint/MissingCopEnableDirective: +# # MaximumRangeSize: .inf +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # rubocop:enable Layout/SpaceAroundOperators +# # y = 1 +# # EOF +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # EOF +# @example +# # Lint/MissingCopEnableDirective: +# # MaximumRangeSize: 2 +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # With the previous, there are 2 lines on which cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# x += 1 +# # Including this, that's 3 lines on which the cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#45 +class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#51 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#70 + def acceptable_range?(cop, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#104 + def department_enabled?(cop, comment); end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#64 + def each_missing_enable; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#87 + def max_range; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#91 + def message(cop, comment, type = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#48 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#49 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) + +# Checks for the presence of constructors and lifecycle callbacks +# without calls to `super`. +# +# This cop does not consider `method_missing` (and `respond_to_missing?`) +# because in some cases it makes sense to overtake what is considered a +# missing method. In other cases, the theoretical ideal handling could be +# challenging or verbose for no actual gain. +# +# Autocorrection is not supported because the position of `super` cannot be +# determined automatically. +# +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# +# @example +# # bad +# class Employee < Person +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# class Employee < Person +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# Employee = Class.new(Person) do +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# Employee = Class.new(Person) do +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# class Parent +# def self.inherited(base) +# do_something +# end +# end +# +# # good +# class Parent +# def self.inherited(base) +# super +# do_something +# end +# end +# +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 +class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 + def class_new_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 + def allowed_classes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 + def callback_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 + def contains_super?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 + def inside_class_with_stateful_parent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 + def offender?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 +RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 +RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 +RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 +RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 +RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 +RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) + +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: Range objects cannot be autocorrected. +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 + def each_unsafe_regexp_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 + def build_source_range(range_start, range_end); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 + def range_for(char); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 + def range_pairs(expr); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 + def regexp_range(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 + def skip_expression?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 + def skip_range?(range_start, range_end); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 + def unsafe_range?(range_start, range_end); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 +RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) + +# Do not mix named captures and numbered captures in a Regexp literal +# because numbered capture is ignored if they're mixed. +# Replace numbered captures with non-capturing groupings or +# named captures. +# +# @example +# # bad +# /(?FOO)(BAR)/ +# +# # good +# /(?FOO)(?BAR)/ +# +# # good +# /(?FOO)(?:BAR)/ +# +# # good +# /(FOO)(BAR)/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#24 +class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#27 + def on_regexp(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#25 +RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) + +# In math and Python, we can use `x < y < z` style comparison to compare +# multiple value. However, we can't use the comparison in Ruby. However, +# the comparison is not syntax error. This cop checks the bad usage of +# comparison operators. +# +# @example +# +# # bad +# x < y < z +# 10 <= x <= 20 +# +# # good +# x < y && y < z +# 10 <= x && x <= 20 +# +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#20 +class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#29 + def multiple_compare?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#24 +RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#23 +RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#26 +RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#25 +RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for nested method definitions. +# +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo +# def bar +# end +# end +# +# # good +# +# def foo +# bar = -> { puts 'hello' } +# bar.call +# end +# +# # good +# +# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and +# # `module_exec` blocks are allowed by default. +# +# def foo +# self.class.class_eval do +# def bar +# end +# end +# end +# +# def foo +# self.class.module_exec do +# def bar +# end +# end +# end +# +# # good +# +# def foo +# class << self +# def bar +# end +# end +# end +# @example AllowedMethods: [] (default) +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedMethods: ['has_many'] +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedPatterns: [] (default) +# # bad +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 +class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#127 + def eval_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#132 + def exec_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 + def allowed_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 + def scoping_method_call?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 +RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested percent literals. +# +# @example +# +# # bad +# +# # The percent literal for nested_attributes is parsed as four tokens, +# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: %i[name content %i[incorrectly nested]] +# } +# +# # good +# +# # Neither is incompatible with the bad case, but probably the intended code. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, %i[incorrectly nested]] +# } +# +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, [:incorrectly, :nested]] +# } +# +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#32 +class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#44 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#48 + def on_percent_literal(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#54 + def contains_percent_literals?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#35 +RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# The array of regular expressions representing percent literals that, +# if found within a percent literal expression, will cause a +# NestedPercentLiteral violation to be emitted. +# +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#41 +RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#42 +RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) + +# Don't omit the accumulator when calling `next` in a `reduce` block. +# +# @example +# +# # bad +# result = (1..4).reduce(0) do |acc, i| +# next if i.odd? +# acc + i +# end +# +# # good +# result = (1..4).reduce(0) do |acc, i| +# next acc if i.odd? +# acc + i +# end +# +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 +class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 + def on_block_body_of_reduce(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45 + def parent_block_node(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 +RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of a `return` inside a `begin..end` block +# in assignment contexts. +# In this situation, the `return` will result in an exit from the current +# method, possibly leading to unexpected behavior. +# +# @example +# +# # bad +# @some_variable ||= begin +# return some_value if some_condition_is_met +# +# do_something +# end +# +# # good +# @some_variable ||= begin +# if some_condition_is_met +# some_value +# else +# do_something +# end +# end +# +# # good +# some_variable = if some_condition_is_met +# return if another_condition_is_met +# +# some_value +# else +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 +class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 +RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-atomic file operation. +# And then replace it with a nearly equivalent and atomic method. +# +# These can cause problems that are difficult to reproduce, +# especially in cases of frequent file operations in parallel, +# such as test runs with parallel_rspec. +# +# For examples: creating a directory if there is none, has the following problems +# +# An exception occurs when the directory didn't exist at the time of `exist?`, +# but someone else created it before `mkdir` was executed. +# +# Subsequent processes are executed without the directory that should be there +# when the directory existed at the time of `exist?`, +# but someone else deleted it shortly afterwards. +# +# @example +# # bad - race condition with another process may result in an error in `mkdir` +# unless Dir.exist?(path) +# FileUtils.mkdir(path) +# end +# +# # good - atomic and idempotent creation +# FileUtils.mkdir_p(path) +# +# # bad - race condition with another process may result in an error in `remove` +# if File.exist?(path) +# FileUtils.remove(path) +# end +# +# # good - atomic and idempotent removal +# FileUtils.rm_f(path) +# +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 +class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76 + def explicit_not_force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71 + def force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66 + def receiver_and_method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61 + def send_exist_node(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97 + def allowable_use_with_if?(if_node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121 + def autocorrect(corrector, node, range); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132 + def autocorrect_replace_method(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151 + def force_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159 + def force_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155 + def force_option?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91 + def if_node_child?(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112 + def message_change_force_method(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116 + def message_remove_file_exist_check(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101 + def register_offense(node, exist_node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139 + def replacement_method(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 +RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about +# the order in which files are returned. The final order is +# determined by the operating system and file system. +# This means that using them in cases where the order matters, +# such as requiring files, can lead to intermittent failures +# that are hard to debug. To ensure this doesn't happen, +# always sort the list. +# +# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. +# So all bad cases are acceptable when Ruby 3.0 or higher are used. +# +# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. +# +# @example +# +# # bad +# Dir["./lib/**/*.rb"].each do |file| +# require file +# end +# +# # good +# Dir["./lib/**/*.rb"].sort.each do |file| +# require file +# end +# +# # bad +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| +# require file +# end +# +# # good +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| +# require file +# end +# +# # bad +# Dir['./lib/**/*.rb'].each(&method(:require)) +# +# # good +# Dir['./lib/**/*.rb'].sort.each(&method(:require)) +# +# # bad +# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) +# +# # good +# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) +# +# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) +# +# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#60 +class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#172 + def loop_variable(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#155 + def method_require?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#89 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#145 + def unsorted_dir_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#150 + def unsorted_dir_each?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#166 + def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#160 + def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177 + def var_is_required?(param0, param1); end + + private + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#107 + def correct_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#117 + def correct_block_pass(corrector, node); end + + # Returns range of last argument including comma and whitespace. + # + # @return [Parser::Source::Range] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#132 + def last_arg_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#136 + def unsorted_dir_loop?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#140 + def unsorted_dir_pass?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#63 +RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-local exits from iterators without a return +# value. It registers an offense under these conditions: +# +# * No value is returned, +# * the block is preceded by a method chain, +# * the block has arguments, +# * the method which receives the block is not `define_method` +# or `define_singleton_method`, +# * the return is not contained in an inner scope, e.g. a lambda or a +# method definition. +# +# @example +# +# class ItemApi +# rescue_from ValidationError do |e| # non-iteration block with arg +# return { message: 'validation error' } unless e.errors # allowed +# error_array = e.errors.map do |error| # block with method chain +# return if error.suppress? # warned +# return "#{error.param}: invalid" unless error.message # allowed +# "#{error.param}: #{error.message}" +# end +# { message: 'validation error', errors: error_array } +# end +# +# def update_items +# transaction do # block without arguments +# return unless update_necessary? # allowed +# find_each do |item| # block without method chain +# return if item.stock == 0 # false-negative... +# item.update!(foobar: true) +# end +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#41 +class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#77 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#80 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#46 + def on_return(return_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#72 + def return_value?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#68 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#42 +RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) + +# Warns the usage of unsafe number conversions. Unsafe +# number conversion can cause unexpected error if auto type conversion +# fails. Cop prefer parsing with number class instead. +# +# Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` +# if given input that is not numeric (eg. an empty string), whereas +# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). +# As such, this cop is disabled by default because it's not necessarily +# always correct to raise if a value is not numeric. +# +# NOTE: Some values cannot be converted properly using one of the `Kernel` +# method (for instance, `Time` and `DateTime` values are allowed by this +# cop by default). Similarly, Rails' duration methods do not work well +# with `Integer()` and can be allowed with `AllowedMethods`. By default, +# there are no methods to allowed. +# +# @example +# +# # bad +# +# '10'.to_i +# '10.2'.to_f +# '10'.to_c +# '1/3'.to_r +# ['1', '2', '3'].map(&:to_i) +# foo.try(:to_f) +# bar.send(:to_c) +# +# # good +# +# Integer('10', 10) +# Float('10.2') +# Complex('10') +# Rational('1/3') +# ['1', '2', '3'].map { |i| Integer(i, 10) } +# foo.try { |i| Float(i) } +# bar.send { |i| Complex(i) } +# @example AllowedMethods: [] (default) +# +# # bad +# 10.minutes.to_i +# @example AllowedMethods: [minutes] +# +# # good +# 10.minutes.to_i +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i +# @example AllowedPatterns: ['min*'] +# +# # good +# 10.minutes.to_i +# @example IgnoredClasses: [Time, DateTime] (default) +# +# # good +# Time.now.to_datetime.to_i +# +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#73 +class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 + def to_method(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 + def to_method_symbol(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#165 + def allow_receiver?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#187 + def conversion_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#151 + def correct_method(node, receiver); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + def correct_sym_method(to_method); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#134 + def handle_as_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#115 + def handle_conversion_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#195 + def ignored_class?(name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#191 + def ignored_classes; end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 + def top_receiver(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 +RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 +RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of numbered parameter assignment. +# It emulates the following warning in Ruby 2.7: +# +# $ ruby -ve '_1 = :value' +# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] +# -e:1: warning: `_1' is reserved for numbered parameter; consider another name +# +# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. +# +# $ ruby -ve '_1 = :value' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: _1 is reserved for numbered parameter +# +# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` +# as well to prevent confusion. +# +# @example +# +# # bad +# _1 = :value +# +# # good +# non_numbered_parameter_name = :value +# +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#30 +class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#35 + def on_lvasgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#32 +RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#33 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) + +# Checks for unintended or-assignment to a constant. +# +# Constants should always be assigned in the same location. And its value +# should always be the same. If constants are assigned in multiple +# locations, the result may vary depending on the order of `require`. +# +# @example +# +# # bad +# CONST ||= 1 +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#24 +class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#29 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#27 +RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) + +# Checks the proper ordering of magic comments and whether +# a magic comment is not placed before a shebang. +# +# @example +# # bad +# +# # frozen_string_literal: true +# # encoding: ascii +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# #!/usr/bin/env ruby +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32 +class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55 + def autocorrect(corrector, encoding_line, frozen_string_literal_line); end + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63 + def magic_comment_lines; end +end + +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 +RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) + +# Looks for references of Regexp captures that are out of range +# and thus always returns nil. +# +# @example +# +# /(foo)bar/ =~ 'foobar' +# +# # bad - always returns nil +# +# puts $2 # => nil +# +# # good +# +# puts $1 # => foo +# +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 +class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 + def after_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#71 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#77 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#65 + def on_when(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#102 + def check_regexp(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#122 + def nth_ref_receiver?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#113 + def regexp_first_argument?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#93 + def regexp_patterns(in_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#118 + def regexp_receiver?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#39 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#42 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#44 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#41 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#45 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for space between the name of a called method and a left +# parenthesis. +# +# @example +# +# # bad +# do_something (foo) +# +# # good +# do_something(foo) +# do_something (2 + 3) * 4 +# do_something (foo * bar).baz +# +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#18 +class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + def chained_calls?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 + def first_argument_block_type?(first_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 + def first_argument_starts_with_left_parenthesis?(node); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 + def space_range(expr, space_length); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 + def spaces_before_left_parenthesis(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 + def ternary_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#39 + def valid_context?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 + def valid_first_argument?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#22 +RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) + +# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting strings. +# +# @example +# +# # bad +# %w('foo', "bar") +# +# # good +# %w(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 +class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 + def on_percent_literal(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 + def contains_quotes_or_commas?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 +RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 +RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting symbols. +# +# @example +# +# # bad +# %i(:foo, :bar) +# +# # good +# %i(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 +class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 + def contains_colons_or_commas?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 + def non_alphanumeric_literal?(literal); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which are +# raising `Exception` class. +# +# You can specify a module name that will be an implicit namespace +# using `AllowedImplicitNamespaces` option. The cop cause a false positive +# for namespaced `Exception` when a namespace is omitted. This option can +# prevent the false positive by specifying a namespace to be omitted for +# `Exception`. Alternatively, make `Exception` a fully qualified class +# name with an explicit namespace. +# +# @example +# # bad +# raise Exception, 'Error message here' +# +# # good +# raise StandardError, 'Error message here' +# @example AllowedImplicitNamespaces: ['Gem'] +# # good +# module Gem +# def self.foo +# raise Exception # This exception means `Gem::Exception`. +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#34 +class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#41 + def exception?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#46 + def exception_new_with_message?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#51 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#85 + def allow_implicit_namespaces; end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#73 + def implicit_namespace?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#37 +RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#38 +RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rand(1)` calls. +# Such calls always return `0`. +# +# @example +# +# # bad +# rand 1 +# Kernel.rand(-1) +# rand 1.0 +# rand(-1.0) +# +# # good +# 0 # just use 0 instead +# +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 +class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 + def rand_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 +RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 +RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# removed without causing any offenses to be reported. It's implemented +# as a cop in that it inherits from the Cop base class and calls +# add_offense. The unusual part of its implementation is that it doesn't +# have any on_* methods or an investigate method. This means that it +# doesn't take part in the investigation phase when the other cops do +# their work. Instead, it waits until it's called in a later stage of the +# execution. The reason it can't be implemented as a normal cop is that +# it depends on the results of all other cops to do its work. +# +# @example +# # bad +# # rubocop:disable Layout/LineLength +# x += 1 +# # rubocop:enable Layout/LineLength +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#28 +class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [RedundantCopDisableDirective] a new instance of RedundantCopDisableDirective + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#37 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end + + # Returns the value of attribute offenses_to_check. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check; end + + # Sets the attribute offenses_to_check + # + # @param value the value to set the attribute offenses_to_check to. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check=(_arg0); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#323 + def add_department_marker(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#229 + def add_offense_for_entire_comment(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#244 + def add_offense_for_some_cops(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#219 + def add_offenses(redundant_cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#306 + def all_cop_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#190 + def all_disabled?(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#69 + def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#57 + def cop_disabled_line_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#264 + def cop_range(comment, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#210 + def department_disabled?(cop, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#315 + def department_marker?(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#293 + def describe(cop); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#215 + def directive_count(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#92 + def directive_range_in_list(range, ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#61 + def disabled_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#132 + def each_already_disabled(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#113 + def each_line_range(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#106 + def each_redundant_disable(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#310 + def ends_its_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#202 + def expected_final_disable?(cop, line_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#166 + def find_redundant_all(range, next_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#161 + def find_redundant_cop(cop, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#176 + def find_redundant_department(cop, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#182 + def followed_ranges?(range, next_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#194 + def ignore_offense?(line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#258 + def leave_free_comment?(comment, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#271 + def matching_range(haystack, needle); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#302 + def message(cop_names); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#65 + def previous_line_blank?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#186 + def range_with_offense?(range, offenses = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#319 + def remove_department_marker(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#279 + def trailing_range?(ranges, range); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#32 +RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#33 +RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#287 +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) + +# removed. +# +# that cop checks whether any cop was actually enabled. +# +# @example +# +# # bad +# foo = 1 +# # rubocop:enable Layout/LineLength +# +# # good +# foo = 1 +# +# # bad +# # rubocop:disable Style/StringLiterals +# foo = "1" +# # rubocop:enable Style/StringLiterals +# baz +# # rubocop:enable all +# +# # good +# # rubocop:disable Style/StringLiterals +# foo = "1" +# # rubocop:enable all +# baz +# +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39 +class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122 + def all_or_name(name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78 + def comment_start(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82 + def cop_name_indention(comment, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126 + def department?(directive, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73 + def range_of_offense(comment, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97 + def range_to_remove(begin_pos, end_pos, comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 + def range_with_comma(comment, name); end + + # If the list of cops is comma-separated, but without a empty space after the comma, + # we should **not** remove the prepending empty space, thus begin_pos += 1 + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 + def range_with_comma_after(comment, start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 + def range_with_comma_before(start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55 + def register_offense(comment, cop_names); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# Sort globbed results by default in Ruby 3.0. +# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. +# +# @example +# +# # bad +# Dir.glob('./lib/**/*.rb').sort.each do |file| +# end +# +# Dir['./lib/**/*.rb'].sort.each do |file| +# end +# +# # good +# Dir.glob('./lib/**/*.rb').each do |file| +# end +# +# Dir['./lib/**/*.rb'].each do |file| +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#30 +class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#56 + def multiple_argument?(glob_method); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#38 +RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#36 +RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 +RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant quantifiers inside Regexp literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 + def character_set?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 + def each_redundantly_quantified_pair(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 + def mergeable_quantifier(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 + def merged_quantifier(exp1, exp2); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 + def message(group, child, replacement); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 + def quantifier_range(group, child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 + def redundant_group?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 + def redundantly_quantifiable?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + +# Checks for unnecessary `require` statement. +# +# The following features are unnecessary `require` statement because +# they are already loaded. e.g. Ruby 2.2: +# +# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' +# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] +# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] +# +# Below are the features that each `TargetRubyVersion` targets. +# +# * 2.0+ ... `enumerator` +# * 2.1+ ... `thread` +# * 2.2+ ... Add `rational` and `complex` above +# * 2.5+ ... Add `pp` above +# * 2.7+ ... Add `ruby2_keywords` above +# * 3.1+ ... Add `fiber` above +# * 3.2+ ... `set` +# +# This cop target those features. +# +# @example +# # bad +# require 'unloaded_feature' +# require 'thread' +# +# # good +# require 'unloaded_feature' +# +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 +class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 + def pp_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51 + def redundant_require_statement?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91 + def need_to_require_pp?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80 + def redundant_feature?(feature_name); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42 +RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45 +RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43 +RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44 +RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) + +# Checks for redundant safe navigation calls. +# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, +# and an offense is not detected when the receiver is a constant. The detection also applies +# to literal receivers, except for `nil`. +# +# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, +# and `equal?` methods are checked by default. +# These are customizable with `AllowedMethods` option. +# +# The `AllowedMethods` option specifies nil-safe methods, +# in other words, it is a method that is allowed to skip safe navigation. +# Note that the `AllowedMethod` option is not an option that specifies methods +# for which to suppress (allow) this cop's check. +# +# In the example below, the safe navigation operator (`&.`) is unnecessary +# because `NilClass` has methods like `respond_to?` and `is_a?`. +# +# @example +# # bad +# CamelCaseConst&.do_something +# +# # bad +# do_something if attrs&.respond_to?(:[]) +# +# # good +# do_something if attrs.respond_to?(:[]) +# +# # bad +# while node&.is_a?(BeginNode) +# node = node.parent +# end +# +# # good +# CamelCaseConst.do_something +# +# # good +# while node.is_a?(BeginNode) +# node = node.parent +# end +# +# # good - without `&.` this will always return `true` +# foo&.respond_to?(:to_a) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s +# @example AllowedMethods: [nil_safe_method] +# # bad +# do_something if attrs&.nil_safe_method(:[]) +# +# # good +# do_something if attrs.nil_safe_method(:[]) +# do_something if attrs&.not_nil_safe_method(:[]) +# +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 +class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 + def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#133 + def assume_receiver_instance_exists?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 + def check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#149 + def condition?(parent, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 +RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks for unneeded usages of splat expansion. +# +# @example +# +# # bad +# a = *[1, 2, 3] +# a = *'a' +# a = *1 +# ['a', 'b', *%w(c d e), 'f', 'g'] +# +# # good +# c = [1, 2, 3] +# a = *c +# a, b = *c +# a, *b = *c +# a = *1..10 +# a = ['a'] +# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +# +# # bad +# do_something(*['foo', 'bar', 'baz']) +# +# # good +# do_something('foo', 'bar', 'baz') +# +# # bad +# begin +# foo +# rescue *[StandardError, ApplicationError] +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, ApplicationError +# bar +# end +# +# # bad +# case foo +# when *[1, 2, 3] +# bar +# else +# baz +# end +# +# # good +# case foo +# when 1, 2, 3 +# bar +# else +# baz +# end +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) +# @example AllowPercentLiteralArrayArgument: false +# +# # bad +# do_something(*%w[foo bar baz]) +# +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 +class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#83 + def array_new?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#91 + def literal_expansion(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#95 + def on_splat(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#203 + def allow_percent_literal_array_argument?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#131 + def array_new_inside_array_literal?(array_new_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#155 + def array_splat?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#159 + def method_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#163 + def part_of_an_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#170 + def redundant_brackets?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 + def redundant_splat_expansion(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#178 + def remove_brackets(array); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#138 + def replacement_range_and_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#196 + def use_percent_literal_array_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#75 +RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#80 +RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#74 +RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#79 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#77 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#78 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#76 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) + +# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, +# which is redundant. +# +# @example +# +# # bad +# "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s +# +# # good +# "result is #{something}" +# print something +# puts something +# warn something +# +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 +class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34 + def on_interpolation(begin_node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 + def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 + def register_offense(node, context); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant `with_index`. +# +# @example +# # bad +# ary.each_with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#29 +class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 + def redundant_with_index?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 + def with_index_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#33 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#34 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# Checks for redundant `with_object`. +# +# @example +# # bad +# ary.each_with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#29 +class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#56 + def redundant_with_object?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#65 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#73 + def with_object_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#33 +RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#34 +RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# Checks if `include` or `prepend` is called in `refine` block. +# These methods are deprecated and should be replaced with `Refinement#import_methods`. +# +# It emulates deprecation warnings in Ruby 3.1. +# +# @example +# +# # bad +# refine Foo do +# include Bar +# end +# +# # bad +# refine Foo do +# prepend Bar +# end +# +# # good +# refine Foo do +# import_methods Bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#34 +class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#42 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#37 +RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#38 +RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for regexp literals used as `match-current-line`. +# If a regexp literal is in condition, the regexp matches `$_` implicitly. +# +# @example +# # bad +# if /foo/ +# do_something +# end +# +# # good +# if /foo/ =~ $_ +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#19 +class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#26 + def on_match_current_line(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#23 +RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for expressions where there is a call to a predicate +# method with at least one argument, where no parentheses are used around +# the parameter list, and a boolean operator, && or ||, is used in the +# last argument. +# +# The idea behind warning for these constructs is that the user might +# be under the impression that the return value from the method call is +# an operand of &&/||. +# +# @example +# +# # bad +# if day.is? :tuesday && month == :jan +# # ... +# end +# +# # good +# if day.is?(:tuesday) && month == :jan +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 +class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 + def check_predicate(predicate, node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 + def check_ternary(ternary, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 +RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks that a range literal is enclosed in parentheses when the end of the range is +# at a line break. +# +# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. +# So, this cop does not provide autocorrection because it is left to user. +# +# [source,ruby] +# ---- +# case condition +# when 42.. +# do_something +# end +# ---- +# +# @example +# +# # bad - Represents `(1..42)`, not endless range. +# 1.. +# 42 +# +# # good - It's incompatible, but your intentions when using endless range may be: +# (1..) +# 42 +# +# # good +# 1..42 +# +# # good +# (1..42) +# +# # good +# (1.. +# 42) +# +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#40 +class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 + def on_irange(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#41 +RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a file requiring itself with `require_relative`. +# +# @example +# +# # bad +# +# # foo.rb +# require_relative 'foo' +# require_relative 'bar' +# +# # good +# +# # foo.rb +# require_relative 'bar' +# +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#21 +class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#44 + def remove_ext(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#40 + def same_file?(file_path, required_feature); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#25 +RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 +RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks targeting the Exception class. +# +# @example +# +# # bad +# begin +# do_something +# rescue Exception +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue ArgumentError +# handle_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 +class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 + def on_resbody(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35 + def targets_exception?(rescue_arg_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 +RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) + +# Check for arguments to `rescue` that will result in a `TypeError` +# if an exception is raised. +# +# @example +# # bad +# begin +# bar +# rescue nil +# baz +# end +# +# # bad +# def foo +# bar +# rescue 1, 'a', "#{b}", 0.0, [], {} +# baz +# end +# +# # good +# begin +# bar +# rescue +# baz +# end +# +# # good +# def foo +# bar +# rescue NameError +# baz +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#37 +class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#60 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#69 + def correction(*exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#80 + def invalid_exceptions(exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 + def valid_exceptions(exceptions); end +end + +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#42 +RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#40 +RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a return with a value in a context +# where the value will be ignored. (initialize and setter methods) +# +# @example +# +# # bad +# def initialize +# foo +# return :qux if bar? +# baz +# end +# +# def foo=(bar) +# return 42 +# end +# +# # good +# def initialize +# foo +# return if bar? +# baz +# end +# +# def foo=(bar) +# return +# end +# +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 +class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 + def on_return(return_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#51 + def non_void_context(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 +RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) + +# The safe navigation operator returns nil if the receiver is +# nil. If you chain an ordinary method call after a safe +# navigation operator, it raises NoMethodError. We should use a +# safe navigation operator after a safe navigation operator. +# This cop checks for the problem outlined above. +# +# @example +# +# # bad +# x&.foo.bar +# x&.foo + bar +# x&.foo[bar] +# +# # good +# x&.foo&.bar +# x&.foo || bar +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 +class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 + def on_send(node); end + + private + + # @param offense_range [Parser::Source::Range] + # @param send_node [RuboCop::AST::SendNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#58 + def add_safe_navigation_operator(offense_range:, send_node:); end + + # @param corrector [RuboCop::Cop::Corrector] + # @param offense_range [Parser::Source::Range] + # @param send_node [RuboCop::AST::SendNode] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#77 + def autocorrect(corrector, offense_range:, send_node:); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86 + def brackets?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 + def require_parentheses?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 +RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 +RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) + +# Check to make sure that if safe navigation is used for a method +# call in an `&&` or `||` condition that safe navigation is used for all +# method calls on that same object. +# +# @example +# # bad +# foo&.bar && foo.baz +# +# # bad +# foo.bar || foo&.baz +# +# # bad +# foo&.bar && (foobar.baz || foo.baz) +# +# # good +# foo.bar && foo.baz +# +# # good +# foo&.bar || foo&.baz +# +# # good +# foo&.bar && (foobar.baz || foo&.baz) +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 +class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 + def on_csend(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 + def location(node, unsafe_method_call); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 + def top_conditional_ancestor(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 + def unsafe_method_calls(method_calls, safe_nav_receiver); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 +RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks to make sure safe navigation isn't used with `empty?` in +# a conditional. +# +# While the safe navigation operator is generally a good idea, when +# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# do the opposite of what the author intends. +# +# @example +# # bad +# return if foo&.empty? +# return unless foo&.empty? +# +# # good +# return if foo && foo.empty? +# return unless foo && foo.empty? +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#22 +class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#32 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#28 + def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#25 +RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) + +# Checks if a file which has a shebang line as +# its first line is granted execute permission. +# +# @example +# # bad +# +# # A file which has a shebang line as its first line is not +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has a shebang line as its first line is +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has not a shebang line as its first line is not +# # granted execute permission. +# +# puts 'hello, world' +# +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#33 +class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 + def autocorrect; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#59 + def executable?(processed_source); end + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#66 + def format_message_from(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#36 +RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#37 +RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for self-assignments. +# +# @example +# # bad +# foo = foo +# foo, bar = foo, bar +# Foo = Foo +# hash['foo'] = hash['foo'] +# obj.attr = obj.attr +# +# # good +# foo = bar +# foo, bar = bar, foo +# Foo = Bar +# hash['foo'] = hash['bar'] +# obj.attr = obj.attr2 +# +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] +# +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 +class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103 + def handle_attribute_assignment(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92 + def handle_key_assignment(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77 + def multiple_self_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87 + def rhs_matches_lhs?(rhs, lhs); end +end + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 +RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#27 +RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for `send`, `public_send`, and `__send__` methods +# when using mix-in. +# +# `include` and `prepend` methods were private methods until Ruby 2.0, +# they were mixed-in via `send` method. This cop uses Ruby 2.1 or +# higher style that can be called by public methods. +# And `extend` method that was originally a public method is also targeted +# for style unification. +# +# @example +# # bad +# Foo.send(:include, Bar) +# Foo.send(:prepend, Bar) +# Foo.send(:extend, Bar) +# +# # bad +# Foo.public_send(:include, Bar) +# Foo.public_send(:prepend, Bar) +# Foo.public_send(:extend, Bar) +# +# # bad +# Foo.__send__(:include, Bar) +# Foo.__send__(:prepend, Bar) +# Foo.__send__(:extend, Bar) +# +# # good +# Foo.include Bar +# Foo.prepend Bar +# Foo.extend Bar +# +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36 +class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46 + def send_with_mixin_argument?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67 + def bad_location(node); end + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73 + def message(method, module_name, bad_method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77 + def mixin_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41 +RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40 +RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43 +RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42 +RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for shadowed arguments. +# +# This cop has `IgnoreImplicitReferences` configuration option. +# It means argument shadowing is used in order to pass parameters +# to zero arity `super` when `IgnoreImplicitReferences` is `true`. +# +# @example +# +# # bad +# do_something do |foo| +# foo = 42 +# puts foo +# end +# +# def do_something(foo) +# foo = 42 +# puts foo +# end +# +# # good +# do_something do |foo| +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# puts foo +# end +# @example IgnoreImplicitReferences: false (default) +# +# # bad +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# @example IgnoreImplicitReferences: true +# +# # good +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#66 +class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#76 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#70 + def uses_var?(param0, param1); end + + private + + # Get argument references without assignments' references + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#161 + def argument_references(argument); end + + # Find the first argument assignment, which doesn't reference the + # argument at the rhs. If the assignment occurs inside a branch or + # block, it is impossible to tell whether it's executed, so precise + # shadowing location is not known. + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#120 + def assignment_without_argument_usage(argument); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#82 + def check_argument(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#171 + def ignore_implicit_references?; end + + # Check whether the given node is nested into block or conditional. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#152 + def node_within_block_or_conditional?(node, stop_search_node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#144 + def reference_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 + def shadowing_assignment(argument); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#72 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#67 +RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for a rescued exception that get shadowed by a +# less specific exception being rescued before a more specific +# exception is rescued. +# +# An exception is considered shadowed if it is rescued after its +# ancestor is, or if it and its ancestor are both rescued in the +# same `rescue` statement. In both cases, the more specific rescue is +# unnecessary because it is covered by rescuing the less specific +# exception. (ie. `rescue Exception, StandardError` has the same behavior +# whether `StandardError` is included or not, because all ``StandardError``s +# are rescued by `rescue Exception`). +# +# @example +# +# # bad +# +# begin +# something +# rescue Exception +# handle_exception +# rescue StandardError +# handle_standard_error +# end +# +# # bad +# begin +# something +# rescue Exception, StandardError +# handle_error +# end +# +# # good +# +# begin +# something +# rescue StandardError +# handle_standard_error +# rescue Exception +# handle_exception +# end +# +# # good, however depending on runtime environment. +# # +# # This is a special case for system call errors. +# # System dependent error code depends on runtime environment. +# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are +# # the same error code or different error code depends on environment. +# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with +# # the same error code. +# begin +# something +# rescue Errno::EAGAIN, Errno::EWOULDBLOCK +# handle_standard_error +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#61 +class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#67 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#101 + def compare_exceptions(exception, other_exception); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#94 + def contains_multiple_levels_of_exceptions?(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 + def evaluate_exceptions(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152 + def find_shadowing_rescue(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84 + def offense_range(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#90 + def rescued_groups_for(rescues); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 + def sorted?(rescued_groups); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#115 + def system_call_err?(error); end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#65 +RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of local variable names from an outer scope +# in block arguments or block-local variables. This mirrors the warning +# given by `ruby -cw` prior to Ruby 2.6: +# "shadowing outer local variable - foo". +# +# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed +# because `Ractor` should not access outer variables. +# eg. following style is encouraged: +# +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- +# +# @example +# +# # bad +# def some_method +# foo = 1 +# +# 2.times do |foo| # shadowing outer `foo` +# do_something(foo) +# end +# end +# +# # good +# def some_method +# foo = 1 +# +# 2.times do |bar| +# do_something(bar) +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41 +class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 + def before_declaring_variable(variable, variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89 + def find_conditional_node_from_ascendant(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 + def node_or_its_ascendant_conditional?(node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 + def ractor_block?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65 + def same_conditions_node_different_branch?(variable, outer_local_variable); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 + def variable_node(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 +RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) + +# Checks unexpected overrides of the `Struct` built-in methods +# via `Struct.new`. +# +# @example +# # bad +# Bad = Struct.new(:members, :clone, :count) +# b = Bad.new([], true, 1) +# b.members #=> [] (overriding `Struct#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.count #=> 1 (overriding `Enumerable#count`) +# +# # good +# Good = Struct.new(:id, :name) +# g = Good.new(1, "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# g.count #=> 2 +# +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#24 +class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#38 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#33 + def struct_new(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#25 +RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#27 +RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#30 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#29 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks with no body. +# +# @example +# +# # bad +# def some_method +# do_something +# rescue +# end +# +# # bad +# begin +# do_something +# rescue +# end +# +# # good +# def some_method +# do_something +# rescue +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue +# handle_exception +# end +# @example AllowComments: true (default) +# +# # good +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowComments: false +# +# # bad +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # bad +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowNil: true (default) +# +# # good +# def some_method +# do_something +# rescue +# nil +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# # good +# do_something rescue nil +# @example AllowNil: false +# +# # bad +# def some_method +# do_something +# rescue +# nil +# end +# +# # bad +# begin +# do_something +# rescue +# nil +# end +# +# # bad +# do_something rescue nil +# +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 +class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#108 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#118 + def comment_between_rescue_and_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#126 + def nil_body?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 +RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of literal strings converted to +# a symbol where a literal symbol could be used instead. +# +# There are two possible styles for this cop. +# `strict` (default) will register an offense for any incorrect usage. +# `consistent` additionally requires hashes to use the same style for +# every symbol key (ie. if any symbol key needs to be quoted it requires +# all keys to be quoted). +# +# @example +# # bad +# 'string'.to_sym +# :symbol.to_sym +# 'underscored_string'.to_sym +# :'underscored_symbol' +# 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym +# +# # good +# :string +# :symbol +# :underscored_string +# :underscored_symbol +# :'hyphenated-string' +# :"string_#{interpolation}" +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } +# @example EnforcedStyle: consistent +# +# # bad +# { +# a: 1, +# 'b-c': 2 +# } +# +# # good (quote all keys if any need quoting) +# { +# 'a': 1, +# 'b-c': 2 +# } +# +# # good (no quoting required) +# { +# a: 1, +# b: 2 +# } +# +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 +class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147 + def correct_hash_key(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166 + def correct_inconsistent_hash_keys(keys); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139 + def in_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143 + def in_percent_literal_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126 + def properly_quoted?(source, value); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122 + def register_offense(node, correction:, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135 + def requires_quotes?(sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73 +RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 +RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 +RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Repacks Parser's diagnostics/errors +# into RuboCop's offenses. +# +# source://rubocop//lib/rubocop/cop/lint/syntax.rb#8 +class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#9 + def on_other_file; end + + private + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#19 + def add_offense_from_diagnostic(diagnostic, ruby_version); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#29 + def add_offense_from_error(error); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#34 + def beautify_message(message); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#40 + def find_severity(_range, _severity); end +end + +# Ensures that `to_enum`/`enum_for`, called for the current method, +# has correct arguments. +# +# @example +# # bad +# def foo(x, y = 1) +# return to_enum(__callee__, x) # `y` is missing +# end +# +# # good +# def foo(x, y = 1) +# # Alternatives to `__callee__` are `__method__` and `:foo`. +# return to_enum(__callee__, x, y) +# end +# +# # good +# def foo(x, y = 1) +# # It is also allowed if it is wrapped in some method like Sorbet. +# return to_enum(T.must(__callee__), x, y) +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#27 +class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#33 + def enum_conversion_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#38 + def method_name?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#43 + def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76 + def argument_match?(send_arg, def_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 + def arguments_match?(arguments, def_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#28 +RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#30 +RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure `#to_json` includes an optional argument. +# When overriding `#to_json`, callers may invoke JSON +# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows +# for an optional argument, your method should too. +# +# @example +# class Point +# attr_reader :x, :y +# +# # bad, incorrect arity +# def to_json +# JSON.generate([x, y]) +# end +# +# # good, preserving args +# def to_json(*args) +# JSON.generate([x, y], *args) +# end +# +# # good, discarding args +# def to_json(*_args) +# JSON.generate([x, y]) +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#31 +class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/to_json.rb#36 + def on_def(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#34 +RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) + +# Checks for top level return with arguments. If there is a +# top-level return statement with an argument, then the argument is +# always ignored. This is detected automatically since Ruby 2.7. +# +# @example +# # bad +# return 1 +# +# # good +# return +# +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16 +class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21 + def on_return(return_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35 + def remove_arguments(corrector, return_node); end + + # This cop works by validating the ancestors of the return node. A + # top-level return node's ancestors should not be of block, def, or + # defs type. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42 + def top_level_return?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31 + def top_level_return_with_any_argument?(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 +RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing commas in attribute declarations, such as +# `#attr_reader`. Leaving a trailing comma will nullify the next method +# definition by overriding it with a getter method. +# +# @example +# +# # bad +# class Foo +# attr_reader :foo, +# +# def bar +# puts "Unreachable." +# end +# end +# +# # good +# class Foo +# attr_reader :foo +# +# def bar +# puts "No problem!" +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#30 +class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#46 + def trailing_comma_range(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#34 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) + +# Checks for "triple quotes" (strings delimited by any odd number +# of quotes greater than 1). +# +# Ruby allows multiple strings to be implicitly concatenated by just +# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes +# gives the impression that there is something special about triple quotes, but +# in fact it is just extra unnecessary quotes and produces the same string. Each +# pair of quotes produces an additional concatenated empty string, so the result +# is still only the "actual" string within the delimiters. +# +# NOTE: Although this cop is called triple quotes, the same behavior is present +# for strings delimited by 5, 7, etc. quotation marks. +# +# @example +# # bad +# """ +# A string +# """ +# +# # bad +# ''' +# A string +# ''' +# +# # good +# " +# A string +# " +# +# # good +# < b } +# values.sort { |*x| x[0] <=> x[1] } +# +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#41 +class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#63 + def acceptable?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#75 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#71 + def expected_arity(method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#67 + def included_method?(name); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#59 + def methods; end +end + +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#42 +RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) + +# Checks for using Fixnum or Bignum constant. +# +# @example +# +# # bad +# 1.is_a?(Fixnum) +# 1.is_a?(Bignum) +# +# # good +# 1.is_a?(Integer) +# +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 +class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 + def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + def on_const(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 +RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) + +# Looks for `reduce` or `inject` blocks where the value returned (implicitly or +# explicitly) does not include the accumulator. A block is considered valid as +# long as at least one return value includes the accumulator. +# +# If the accumulator is not included in the return value, then the entire +# block will just return a transformation of the last element value, and +# could be rewritten as such without a loop. +# +# Also catches instances where an index of the accumulator is returned, as +# this may change the type of object being retained. +# +# NOTE: For the purpose of reducing false positives, this cop only flags +# returns in `reduce` blocks where the element is the only variable in +# the expression (since we will not be able to tell what other variables +# relate to via static analysis). +# +# @example +# +# # bad +# (1..4).reduce(0) do |acc, el| +# el * 2 +# end +# +# # bad, may raise a NoMethodError after the first iteration +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# end +# +# # good +# (1..4).reduce(0) do |acc, el| +# acc + el * 2 +# end +# +# # good, element is returned but modified using the accumulator +# values.reduce do |acc, el| +# el << acc +# el +# end +# +# # good, returns the accumulator instead of the index +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# acc +# end +# +# # good, at least one branch returns the accumulator +# values.reduce(nil) do |result, value| +# break result if something? +# value +# end +# +# # good, recursive +# keys.reduce(self) { |result, key| result[key] } +# +# # ignored as the return value cannot be determined +# enum.reduce do |acc, el| +# x = foo(acc, el) +# bar(x) +# end +# +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#65 +class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#78 + def accumulator_index?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#83 + def element_modified?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#104 + def expression_values(param0); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#93 + def lvar_used?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#70 + def reduce_with_block?(param0 = T.unsafe(nil)); end + + private + + # Determine if a return value is acceptable for the purposes of this cop + # If it is an expression containing the accumulator, it is acceptable + # Otherwise, it is only unacceptable if it contains the iterated element, since we + # otherwise do not have enough information to prevent false positives. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#191 + def acceptable_return?(return_val, element_name); end + + # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#199 + def allowed_type?(parent_node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#159 + def block_arg_name(node, index); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#142 + def check_return_values(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#176 + def potential_offense?(return_values, block_body, element_name, accumulator_name); end + + # Return values in a block are either the value given to next, + # the last line of a multiline block, or the only line of the block + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#128 + def return_values(block_body_node); end + + # Look for an index of the accumulator being returned, except where the index + # is the element. + # This is always an offense, in order to try to catch potential exceptions + # due to type mismatches + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#167 + def returned_accumulator_index(return_values, accumulator_name, element_name); end + + # If the accumulator is used in any return value, the node is acceptable since + # the accumulator has a chance to change each iteration + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183 + def returns_accumulator_anywhere?(return_values, accumulator_name); end +end + +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#66 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#67 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) + +# Checks for unreachable code. +# The check are based on the presence of flow of control +# statement in non-final position in `begin` (implicit) blocks. +# +# @example +# +# # bad +# def some_method +# return +# do_something +# end +# +# # bad +# def some_method +# if cond +# return +# else +# return +# end +# do_something +# end +# +# # good +# def some_method +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 +class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#50 + def flow_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#76 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#60 + def flow_expression?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 +RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) + +# Checks for loops that will have at most one iteration. +# +# A loop that can never reach the second iteration is a possible error in the code. +# In rare cases where only one iteration (or at most one iteration) is intended behavior, +# the code should be refactored to use `if` conditionals. +# +# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. +# +# `AllowedPatterns` can be used to match against the block receiver in order to allow +# code that would otherwise be registered as an offense (eg. `times` used not in an +# `Enumerable` context). +# +# @example +# # bad +# while node +# do_something(node) +# node = node.parent +# break +# end +# +# # good +# while node +# do_something(node) +# node = node.parent +# end +# +# # bad +# def verify_list(head) +# item = head +# begin +# if verify(item) +# return true +# else +# return false +# end +# end while(item) +# end +# +# # good +# def verify_list(head) +# item = head +# begin +# if verify(item) +# item = item.next +# else +# return false +# end +# end while(item) +# +# true +# end +# +# # bad +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# else +# raise NotFoundError +# end +# end +# end +# +# # good +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# end +# end +# raise NotFoundError +# end +# +# # bad +# 2.times { raise ArgumentError } +# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) +# +# # good +# exactly(2).times { raise StandardError } +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#86 +class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#143 + def break_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#153 + def break_statement?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#119 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#176 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#170 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 + def conditional_continue_keyword?(break_statement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#110 + def loop_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 + def preceded_by_continue_statement?(break_statement); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 + def statements(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#90 +RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#89 +RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops handling unused arguments. +# +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#7 +module RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#10 + def after_leaving_scope(scope, _variable_table); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#16 + def check_argument(variable); end +end + +# Checks for unused block arguments. +# +# @example +# # bad +# do_something do |used, unused| +# puts used +# end +# +# do_something do |bar| +# puts :foo +# end +# +# define_method(:foo) do |bar| +# puts :baz +# end +# +# # good +# do_something do |used, _unused| +# puts used +# end +# +# do_something do +# puts :foo +# end +# +# define_method(:foo) do |_bar| +# puts :baz +# end +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# do_something do |unused: 42| +# foo +# end +# @example AllowUnusedKeywordArguments: true +# # good +# do_something do |unused: 42| +# foo +# end +# +# source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 +class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#162 + def allow_unused_keyword_arguments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#81 + def allowed_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#85 + def allowed_keyword_argument?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#99 + def augment_message(message, variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#65 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#69 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#149 + def define_method_call?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#156 + def empty_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#166 + def ignore_empty_blocks?; end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#89 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#132 + def message_for_lambda(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#120 + def message_for_normal_block(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#144 + def message_for_underscore_prefix(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#77 + def used_block_local?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#112 + def variable_type(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#59 + def joining_forces; end + end +end + +# Checks for unused method arguments. +# +# @example +# # bad +# def some_method(used, unused, _unused_but_allowed) +# puts used +# end +# +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used +# end +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# def do_something(used, unused: 42) +# used +# end +# @example AllowUnusedKeywordArguments: true +# # good +# def do_something(used, unused: 42) +# used +# end +# @example IgnoreEmptyMethods: true (default) +# # good +# def do_something(unused) +# end +# @example IgnoreEmptyMethods: false +# # bad +# def do_something(unused) +# end +# @example IgnoreNotImplementedMethods: true (default) +# # good +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#61 +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#66 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#85 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#93 + def ignored_method?(body); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#98 + def message(variable); end + + class << self + # source://rubocop-performance/1.22.1/lib/rubocop-performance.rb#15 + def autocorrect_incompatible_with; end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 + def joining_forces; end + end +end + +# Identifies places where `URI.escape` can be replaced by +# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` +# depending on your specific use case. +# Also this cop identifies places where `URI.unescape` can be replaced by +# `CGI.unescape`, `URI.decode_www_form`, +# or `URI.decode_www_form_component` depending on your specific use case. +# +# @example +# # bad +# URI.escape('http://example.com') +# URI.encode('http://example.com') +# +# # good +# CGI.escape('http://example.com') +# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) +# URI.encode_www_form(page: 10, locale: 'en') +# URI.encode_www_form_component('http://example.com') +# +# # bad +# URI.unescape(enc_uri) +# URI.decode(enc_uri) +# +# # good +# CGI.unescape(enc_uri) +# URI.decode_www_form(enc_uri) +# URI.decode_www_form_component(enc_uri) +# +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#32 +class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#57 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#51 + def uri_escape_unescape?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#33 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#38 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#47 +RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#44 +RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 +RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI.regexp` is obsolete and should +# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. +# +# @example +# # bad +# URI.regexp('http://example.com') +# +# # good +# URI::DEFAULT_PARSER.make_regexp('http://example.com') +# +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#16 +class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#19 +RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#21 +RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#20 +RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) + +# Checks for redundant access modifiers, including those with no +# code, those which are repeated, and leading `public` modifiers in a +# class or module body. Conditionally-defined methods are considered as +# always being defined, and thus access modifiers guarding such methods +# are not redundant. +# +# This cop has `ContextCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create its own context in the module's current access context. +# +# It also has `MethodCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create other methods in the module's current access context. +# +# @example +# # bad +# class Foo +# public # this is redundant (default access is public) +# +# def method +# end +# end +# +# # bad +# class Foo +# # The following is redundant (methods defined on the class' +# # singleton class are not affected by the private modifier) +# private +# +# def self.method3 +# end +# end +# +# # bad +# class Foo +# protected +# +# define_method(:method2) do +# end +# +# protected # this is redundant (repeated from previous modifier) +# +# [1,2,3].each do |i| +# define_method("foo#{i}") do +# end +# end +# end +# +# # bad +# class Foo +# private # this is redundant (no following methods are defined) +# end +# +# # good +# class Foo +# private # this is not redundant (a method is defined) +# +# def method2 +# end +# end +# +# # good +# class Foo +# # The following is not redundant (conditionally defined methods are +# # considered as always defining a method) +# private +# +# if condition? +# def method +# end +# end +# end +# +# # good +# class Foo +# protected # this is not redundant (a method is defined) +# +# define_method(:method2) do +# end +# end +# @example ContextCreatingMethods: concerning +# # Lint/UselessAccessModifier: +# # ContextCreatingMethods: +# # - concerning +# +# # good +# require 'active_support/concern' +# class Foo +# concerning :Bar do +# def some_public_method +# end +# +# private +# +# def some_private_method +# end +# end +# +# # this is not redundant because `concerning` created its own context +# private +# +# def some_other_private_method +# end +# end +# @example MethodCreatingMethods: delegate +# # Lint/UselessAccessModifier: +# # MethodCreatingMethods: +# # - delegate +# +# # good +# require 'active_support/core_ext/module/delegation' +# class Foo +# # this is not redundant because `delegate` creates methods +# private +# +# delegate :method_a, to: :method_b +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#127 +class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#166 + def class_or_instance_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#161 + def dynamic_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#156 + def static_method_definition?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#182 + def access_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#280 + def any_context_creating_methods?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#257 + def any_method_definition?(child); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#149 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#196 + def check_child_nodes(node, unused, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#226 + def check_new_visibility(node, unused, new_vis, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#170 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#186 + def check_scope(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#215 + def check_send_node(node, cur_vis, unused); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#274 + def eval_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#247 + def included_block?(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#251 + def method_definition?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#270 + def start_of_new_scope?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#131 +RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for every useless assignment to local variable in every +# scope. +# The basic idea for this cop was from the warning of `ruby -cw`: +# +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- +# +# Currently this cop has advanced logic that detects unreferenced +# reassignments and properly handles varied cases such as branch, loop, +# rescue, ensure, etc. +# +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause NameError if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# +# @example +# +# # bad +# def some_method +# some_var = 1 +# do_something +# end +# +# # good +# def some_method +# some_var = 1 +# do_something(some_var) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 +class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 + def autocorrect(corrector, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#106 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 + def check_for_unused_assignments(variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#149 + def collect_variable_like_names(scope); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#82 + def message_for_useless_assignment(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 + def message_specification(assignment, variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 + def multiple_assignment_message(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#88 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 + def operator_assignment_message(scope, assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#182 + def remove_exception_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#206 + def remove_local_variable_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#195 + def remove_trailing_character_from_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 + def rename_variable_with_underscore(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + + # TODO: More precise handling (rescue, ensure, nested begin, etc.) + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#139 + def return_value_node_of_scope(scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#96 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 + def similar_name_message(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 + def variable_like_method_invocation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless `else` in `begin..end` without `rescue`. +# +# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. +# +# @example +# +# # bad +# begin +# do_something +# else +# do_something_else # This will never be run. +# end +# +# # good +# begin +# do_something +# rescue +# handle_errors +# else +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 +class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#28 +RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless method definitions, specifically: empty constructors +# and methods just delegating to `super`. +# +# @example +# # bad +# def initialize +# super +# end +# +# def method +# super +# end +# +# # good - with default arguments +# def initialize(x = Object.new) +# super +# end +# +# # good +# def initialize +# super +# initialize_internals +# end +# +# def method(*args) +# super(:extra_arg, *args) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#38 +class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#65 + def delegating?(node, def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#57 + def method_definition_with_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#61 + def use_rest_or_optional_args?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 +RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for useless `rescue`s, which only reraise rescued exceptions. +# +# @example +# # bad +# def foo +# do_something +# rescue +# raise +# end +# +# # bad +# def foo +# do_something +# rescue => e +# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' +# end +# +# # good +# def foo +# do_something +# rescue +# do_cleanup +# raise +# end +# +# # bad (latest rescue) +# def foo +# do_something +# rescue ArgumentError +# # noop +# rescue +# raise +# end +# +# # good (not the latest rescue) +# def foo +# do_something +# rescue ArgumentError +# raise +# rescue +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#49 +class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#52 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#83 + def exception_objects(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#60 + def only_reraising?(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#75 + def use_exception_variable_in_ensure?(resbody_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#50 +RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) + +# Looks for `ruby2_keywords` calls for methods that do not need it. +# +# `ruby2_keywords` should only be called on methods that accept an argument splat +# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or +# a keyword splat (`**kwargs`). +# +# @example +# # good (splat argument without keyword arguments) +# ruby2_keywords def foo(*args); end +# +# # bad (no arguments) +# ruby2_keywords def foo; end +# +# # good +# def foo; end +# +# # bad (positional argument) +# ruby2_keywords def foo(arg); end +# +# # good +# def foo(arg); end +# +# # bad (double splatted argument) +# ruby2_keywords def foo(**args); end +# +# # good +# def foo(**args); end +# +# # bad (keyword arguments) +# ruby2_keywords def foo(i:, j:); end +# +# # good +# def foo(i:, j:); end +# +# # bad (splat argument with keyword arguments) +# ruby2_keywords def foo(*args, i:, j:); end +# +# # good +# def foo(*args, i:, j:); end +# +# # bad (splat argument with double splat) +# ruby2_keywords def foo(*args, **kwargs); end +# +# # good +# def foo(*args, **kwargs); end +# +# # bad (ruby2_keywords given a symbol) +# def foo; end +# ruby2_keywords :foo +# +# # good +# def foo; end +# +# # bad (ruby2_keywords with dynamic method) +# define_method(:foo) { |arg| } +# ruby2_keywords :foo +# +# # good +# define_method(:foo) { |arg| } +# +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#66 +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + # Looks for statically or dynamically defined methods with a given name + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#72 + def method_definition(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#79 + def on_send(node); end + + private + + # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#118 + def allowed_arguments(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#109 + def find_method_definition(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#91 + def inspect_def(node, def_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#97 + def inspect_sym(node, sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#67 +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#68 +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for setter call to local variable as the final +# expression of a function definition. +# +# @example +# +# # bad +# def something +# x = Something.new +# x.attr = 5 +# end +# +# # good +# def something +# x = Something.new +# x.attr = 5 +# x +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 +class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 + def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + def last_expression(body); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 +RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) + +# This class tracks variable assignments in a method body +# and if a variable contains object passed as argument at the end of +# the method. +# +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 +class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker + # @return [MethodVariableTracker] a new instance of MethodVariableTracker + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 + def initialize(body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159 + def constructor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 + def contain_local_object?(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 + def process_assignment(asgn_node, rhs_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 + def process_assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138 + def process_binary_operator_assignment(op_asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129 + def process_logical_operator_assignment(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110 + def process_multiple_assignment(masgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 + def scan(node, &block); end +end + +# Checks for uses of `Integer#times` that will never yield +# (when the integer ``<= 0``) or that will only ever yield once +# (`1.times`). +# +# @example +# # bad +# -5.times { do_something } +# 0.times { do_something } +# 1.times { do_something } +# 1.times { |i| do_something(i) } +# +# # good +# do_something +# do_something(1) +# +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#24 +class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#37 + def block_arg(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#42 + def block_reassigns_arg?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#32 + def times_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#62 + def autocorrect(corrector, count, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#84 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#80 + def autocorrect_block_pass(corrector, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#94 + def fix_indentation(source, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#72 + def never_process?(count, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#106 + def own_line?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#76 + def remove_node(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#28 +RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#29 +RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for operators, variables, literals, lambda, proc and nonmutating +# methods used in void context. +# +# `each` blocks are allowed to prevent false positives. +# For example, the expression inside the `each` block below. +# It's not void, especially when the receiver is an `Enumerator`: +# +# [source,ruby] +# ---- +# enumerator = [1, 2, 3].filter +# enumerator.each { |item| item >= 2 } #=> [2, 3] +# ---- +# +# @example CheckForMethodsWithNoSideEffects: false (default) +# # bad +# def some_method +# some_num * 10 +# do_something +# end +# +# def some_method(some_var) +# some_var +# do_something +# end +# @example CheckForMethodsWithNoSideEffects: true +# # bad +# def some_method(some_array) +# some_array.sort +# do_something(some_array) +# end +# +# # good +# def some_method +# do_something +# some_num * 10 +# end +# +# def some_method(some_var) +# do_something +# some_var +# end +# +# def some_method(some_array) +# some_array.sort! +# do_something(some_array) +# end +# +# source://rubocop//lib/rubocop/cop/lint/void.rb#53 +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#236 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#230 + def autocorrect_void_expression(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#218 + def autocorrect_void_op(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 + def check_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#115 + def check_expression(expr); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#156 + def check_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 + def check_nonmutating(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 + def check_self(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#138 + def check_var(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 + def check_void_expression(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 + def check_void_op(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#245 + def entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#211 + def in_void_context?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/void.rb#66 +RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#60 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#63 +RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#61 +RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#76 +RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#78 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#64 +RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#68 +RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#58 +RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#62 +RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#67 +RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#59 +RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for obtaining source ranges from regexp matches +# +# source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 +module RuboCop::Cop::MatchRange + include ::RuboCop::Cop::RangeHelp + + private + + # Return a new `Range` covering the first matching group number for each + # match of `regex` inside `range` + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#13 + def each_match_range(range, regex); end + + # For a `match` inside `range`, return a new `Range` covering the match + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#18 + def match_range(range, match); end +end + +# Message Annotator class annotates a basic offense message +# based on params passed into initializer. +# +# #=> 'Cop/CopName: message (http://example.org/styleguide)' +# +# @example +# RuboCop::Cop::MessageAnnotator.new( +# config, cop_name, cop_config, @options +# ).annotate('message') +# @see #initialize +# +# source://rubocop//lib/rubocop/cop/message_annotator.rb#15 +class RuboCop::Cop::MessageAnnotator + # @option cop_config + # @option cop_config + # @option cop_config + # @option options + # @option options + # @option options + # @option options + # @param config [RuboCop::Config] Check configs for all cops + # @note Message Annotator specifically checks the + # following config options for_all_cops + # :StyleGuideBaseURL [String] URL for styleguide + # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs + # :ExtraDetails [Boolean] Include cop details + # :DisplayCopNames [Boolean] Include cop name + # @param cop_name [String] for specific cop name + # @param cop_config [Hash] configs for specific cop, from config#for_cop + # @param options [Hash, nil] optional + # @return [MessageAnnotator] a new instance of MessageAnnotator + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#47 + def initialize(config, cop_name, cop_config, options); end + + # Returns the annotated message, + # based on params passed into initializer + # + # @return [String] annotated message + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#58 + def annotate(message); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def config; end + + # Returns the value of attribute cop_config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_config; end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_name; end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def options; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#68 + def urls; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#111 + def debug?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#124 + def details; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#115 + def display_cop_names?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#98 + def display_style_guide?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#107 + def extra_details?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#102 + def reference_urls; end + + # Returns the base style guide URL from AllCops or the specific department + # + # @return [String] style guide URL + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#91 + def style_guide_base_url; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#74 + def style_guide_url; end + + class << self + # Returns the value of attribute style_guide_urls. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#21 + def style_guide_urls; end + end +end + +# This module handles measurement and reporting of complexity in methods. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#8 +module RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#37 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_block(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 + def on_def(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 + def on_defs(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_numblock(node); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#42 + def check_complexity(node, method_name); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 + def complexity(body); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 + def location(node); end +end + +# Common code for cops that deal with preferred methods. +# +# source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#6 +module RuboCop::Cop::MethodPreference + private + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#25 + def default_cop_config; end + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#9 + def preferred_method(method); end + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#13 + def preferred_methods; end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#5 +module RuboCop::Cop::Metrics; end + +# Checks that the ABC size of methods is not higher than the +# configured maximum. The ABC size is based on assignments, branches +# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric +# and https://en.wikipedia.org/wiki/ABC_Software_Metric. +# +# Interpreting ABC size: +# +# * ``<= 17`` satisfactory +# * `18..30` unsatisfactory +# * `>` 30 dangerous +# +# You can have repeated "attributes" calls count as a single "branch". +# For this purpose, attributes are any method with no argument; no attempt +# is meant to distinguish actual `attr_reader` from other methods. +# +# This cop also takes into account `AllowedMethods` (defaults to `[]`) +# And `AllowedPatterns` (defaults to `[]`) +# +# @example CountRepeatedAttributes: false (default is true) +# +# # `model` and `current_user`, referenced 3 times each, +# # are each counted as only 1 branch each if +# # `CountRepeatedAttributes` is set to 'false' +# +# def search +# @posts = model.active.visible_by(current_user) +# .search(params[:q]) +# @posts = model.some_process(@posts, current_user) +# @posts = model.another_process(@posts, current_user) +# +# render 'pages/search/page' +# end +# +# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#39 +class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + + private + + # source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#47 + def complexity(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#42 +RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a block exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# The cop can be configured to ignore blocks passed to certain methods. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop does not apply for `Struct` definitions. +# +# NOTE: The `ExcludedMethods` configuration is deprecated and only kept +# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` +# instead. By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# something do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 +class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 + def cop_label; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 + def method_receiver_excluded?(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 +RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for excessive nesting of conditional and looping constructs. +# +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. +# +# The maximum level of nesting allowed is configurable. +# +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#14 +class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#19 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#28 + def check_nesting_level(node, max, current_level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#52 + def consider_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62 + def count_blocks?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + def count_if_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#66 + def count_modifier_forms?; end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#58 + def message(max); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#15 +RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) + +# Checks if the length of a class exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop also applies for `Struct` definitions. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# class Foo +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 +class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#71 + def message(length, max_length); end +end + +# Checks for literals with extremely many entries. This is indicative of +# configuration or data that may be better extracted somewhere else, like +# a database, fetched from an API, or read from a non-code file (CSV, +# JSON, YAML, etc.). +# +# @example +# # bad +# # Huge Array literal +# [1, 2, '...', 999_999_999] +# +# # bad +# # Huge Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} +# +# # bad +# # Huge Set "literal" +# Set[1, 2, '...', 999_999_999] +# +# # good +# # Reasonably sized Array literal +# [1, 2, '...', 10] +# +# # good +# # Reading huge Array from external data source +# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) +# +# # good +# # Reasonably sized Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} +# +# # good +# # Reading huge Hash from external data source +# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| +# hash[row["key"].to_i] = row["value"].to_i +# end +# +# # good +# # Reasonably sized Set "literal" +# Set[1, 2, '...', 10] +# +# # good +# # Reading huge Set from external data source +# SomeFramework.config_for(:something)[:numbers].to_set +# +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 +class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#70 + def collection_threshold; end +end + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#51 +RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#53 +RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that the cyclomatic complexity of methods is not higher +# than the configured maximum. The cyclomatic complexity is the number of +# linearly independent paths through a method. The algorithm counts +# decision points and adds one. +# +# An if statement (or unless or ?:) increases the complexity by one. An +# else branch does not, since it doesn't add a decision point. The && +# operator (or keyword and) can be converted to a nested if statement, +# and ||/or is shorthand for a sequence of ifs, so they also add one. +# Loops can be said to have an exit condition, so they add one. +# Blocks that are calls to builtin iteration methods +# (e.g. `ary.map{...}) also add one, others are ignored. +# +# def each_child_node(*types) # count begins: 1 +# unless block_given? # unless: +1 +# return to_enum(__method__, *types) +# +# children.each do |child| # each{}: +1 +# next unless child.is_a?(Node) # unless: +1 +# +# yield child if types.empty? || # if: +1, ||: +1 +# types.include?(child.type) +# end +# +# self +# end # total: 6 +# +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#32 +class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + + private + + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#42 + def complexity_score_for(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#49 + def count_block?(block); end +end + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#37 +RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#36 +RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a method exceeds some maximum value. +# Comment lines can optionally be allowed. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is +# deprecated and only kept for backwards compatibility. +# Please use `AllowedMethods` and `AllowedPatterns` instead. +# By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# def m +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 +class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 + def cop_label; end +end + +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 +RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks if the length of a module exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# module M +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 +class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 + def message(length, max_length); end +end + +# Checks for methods with too many parameters. +# +# The maximum number of parameters is configurable. +# Keyword arguments can optionally be excluded from the total count, +# as they add less complexity than positional or optional parameters. +# +# Any number of arguments for `initialize` method inside a block of +# `Struct.new` and `Data.define` like this is always allowed: +# +# [source,ruby] +# ---- +# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do +# def initialize(one:, two:, three:, four:, five:) +# end +# end +# ---- +# +# This is because checking the number of arguments of the `initialize` method +# does not make sense. +# +# NOTE: Explicit block argument `&block` is not counted to prevent +# erroneous change that is avoided by making block argument implicit. +# +# This cop also checks for the maximum number of optional parameters. +# This can be configured using the `MaxOptionalParameters` config option. +# +# @example Max: 3 +# # good +# def foo(a, b, c = 1) +# end +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) +# end +# @example CountKeywordArgs: true (default) +# # counts keyword args towards the maximum +# +# # bad (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# # good (assuming Max is 3) +# def foo(a, b, c: 1) +# end +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end +# @example MaxOptionalParameters: 2 +# # bad +# def foo(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 +class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#121 + def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max_optional_parameters=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#104 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#81 + def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#125 + def args_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#141 + def count_keyword_args?; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#137 + def max_optional_parameters; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#133 + def max_params; end +end + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#74 +RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#77 +RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#75 +RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) + +# Tries to produce a complexity score that's a measure of the +# complexity the reader experiences when looking at a method. For that +# reason it considers `when` nodes as something that doesn't add as much +# complexity as an `if` or a `&&`. Except if it's one of those special +# `case`/`when` constructs where there's no expression after `case`. Then +# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` +# nodes count. In contrast to the CyclomaticComplexity cop, this cop +# considers `else` nodes as adding complexity. +# +# @example +# +# def my_method # 1 +# if cond # 1 +# case var # 2 (0.8 + 4 * 0.2, rounded) +# when 1 then func_one +# when 2 then func_two +# when 3 then func_three +# when 4..10 then func_other +# end +# else # 1 +# do_something until a && b # 2 +# end # === +# end # 7 complexity points +# +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#29 +class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity + private + + # source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#36 + def complexity_score_for(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#32 +RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#30 +RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#6 +module RuboCop::Cop::Metrics::Utils; end + +# > ABC is .. a software size metric .. computed by counting the number +# > of assignments, branches and conditions for a section of code. +# > http://c2.com/cgi/wiki?AbcMetric +# +# We separate the *calculator* from the *cop* so that the calculation, +# the formula itself, is easier to test. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#13 +class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator + include ::RuboCop::AST::Sexp + include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + + # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 + def calculate; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + def calculate_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 + def else_branch?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 + def evaluate_condition_node(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127 + def argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#86 + def assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123 + def branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#119 + def capturing_variable?(name); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#95 + def compound_assignment(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131 + def condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#108 + def simple_assignment?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#71 + def visit_depth_last(node, &block); end + + class << self + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#30 + def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end + end +end + +# > Branch -- an explicit forward program branch out of scope -- a +# > function call, class method call .. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#21 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# > Condition -- a logical/Boolean test, == != <= >= < > else case +# > default try catch ? and unary conditionals. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#26 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) + +# Helps to calculate code length for the provided node. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#8 +class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + extend ::RuboCop::AST::NodePattern::Macros + + # @return [CodeLengthCalculator] a new instance of CodeLengthCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#16 + def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#24 + def calculate; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 + def another_args?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 + def build_foldable_checks(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 + def classlike_code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 + def classlike_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 + def code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 + def count_comments?; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 + def each_top_level_descendant(node, types, &block); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 + def extract_body(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 + def foldable_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 + def heredoc_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 + def heredoc_node?(node); end + + # Returns true for lines that shall not be included in the count. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 + def irrelevant_line?(source_line); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 + def line_numbers_of_inner_nodes(node, *types); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 + def namespace_module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 + def node_with_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 + def normalize_foldable_types(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 + def omit_length(descendant); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 + def parenthesized?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 + def source_from_node_with_heredoc(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#12 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) + +# Used to identify iterating blocks like `.map{}` and `.map(&:...)` +# +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#8 +module RuboCop::Cop::Metrics::Utils::IteratingBlock + # Returns the name of the method called with a block + # if node is a block node, or a block-pass node. + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#37 + def block_method_name(node); end + + # Returns nil if node is neither a block node or a block-pass node. + # Otherwise returns true/false if method call is a known iterating call + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#53 + def iterating_block?(node); end + + # Returns true iff name is a known iterating type (e.g. :each, :transform_values) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#47 + def iterating_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#33 +RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) + +# Identifies repetitions `{c}send` calls with no arguments: +# +# foo.bar +# foo.bar # => repeated +# foo.bar.baz.qux # => inner send repeated +# foo.bar.baz.other # => both inner send repeated +# foo.bar(2) # => not repeated +# +# It also invalidates sequences if a receiver is reassigned: +# +# xx.foo.bar +# xx.foo.baz # => inner send repeated +# self.xx = any # => invalidates everything so far +# xx.foo.baz # => no repetition +# self.xx.foo.baz # => all repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#25 +module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + + # Plug into the calculator + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#61 + def attribute_call?(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + def calculate_node(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#43 + def discount_repeated_attributes?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#92 + def root_node?(param0 = T.unsafe(nil)); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#66 + def discount_repeated_attribute?(send_node); end + + # Returns the "known_attributes" for the `node` by walking the receiver tree + # If at any step the subdirectory does not exist, it is yielded with the + # associated key (method_name) + # If the node is not a series of `(c)send` calls with no arguments, + # then `nil` is yielded + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#103 + def find_attributes(node, &block); end + + # or `nil` if it is not a setter. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#126 + def setter_to_getter(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#80 + def update_repeated_attribute(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#117 +RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) + +# Identifies repetitions `&.` on the same variable: +# +# my_var&.foo +# my_var&.bar # => repeated +# my_var = baz # => reset +# my_var&.qux # => not repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#15 +module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#20 + def discount_for_repeated_csend?(csend_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#34 + def reset_on_lvasgn(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#16 + def reset_repeated_csend; end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#5 +module RuboCop::Cop::Migration; end + +# department name. +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#8 +class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#21 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#47 + def check_cop_name(name, comment, offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#69 + def contain_unexpected_character_for_department_name?(name); end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#43 + def disable_comment_offset; end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#73 + def qualified_legacy_cop_name(cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#63 + def valid_content_token?(content_token); end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#14 +RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# The token that makes up a disable comment. +# `DepartmentName/CopName` or` all`. +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#19 +RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#12 +RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking minimum body length. +# +# source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#6 +module RuboCop::Cop::MinBodyLength + private + + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#13 + def min_body_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#9 + def min_body_length?(node); end +end + +# Common functionality for checking minimum branches count. +# +# source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#6 +module RuboCop::Cop::MinBranchesCount + private + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#29 + def if_conditional_branches(node, branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#22 + def min_branches_count; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#9 + def min_branches_count?(node); end +end + +# Common code for indenting the first elements in multiline +# array literals, hash literals, and method definitions. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#7 +module RuboCop::Cop::MultilineElementIndentation + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#42 + def check_expected_style(styles); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#26 + def check_first(first, left_brace, left_parenthesis, offset); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#80 + def detected_styles(actual_column, offset, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#85 + def detected_styles_for_column(column, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#10 + def each_argument_node(node, type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#66 + def hash_pair_where_value_beginning_with(left_brace, first); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#98 + def incorrect_style_detected(styles, first, base_column_type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#50 + def indent_base(left_brace, first, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#72 + def key_and_value_begin_on_same_line?(pair); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#76 + def right_sibling_begins_on_subsequent_line?(pair); end +end + +# Common functionality for checking for a line break before each +# element in a multi-line collection. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#7 +module RuboCop::Cop::MultilineElementLineBreaks + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#23 + def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#10 + def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end +end + +# Common functionality for checking multiline method calls and binary +# operations. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 +module RuboCop::Cop::MultilineExpressionIndentation + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 + def argument_in_method_call(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 + def assignment_rhs(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65 + def check(range, node, lhs, rhs); end + + # The correct indentation of `node` is usually `IndentationWidth`, with + # one exception: prefix keywords. + # + # ``` + # while foo && # Here, `while` is called a "prefix keyword" + # bar # This is called "special indentation" + # baz + # end + # ``` + # + # Note that *postfix conditionals* do *not* get "special indentation". + # + # ``` + # next if foo && + # bar # normal indentation, not special + # ``` + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55 + def correct_indentation(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 + def disqualified_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 + def grouped_expression?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73 + def incorrect_style_detected(range, node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85 + def indentation(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122 + def indented_keyword_expression(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208 + def inside_arg_list_parentheses?(node, ancestor); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99 + def keyword_message_tail(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107 + def kw_node_with_special_indentation(node); end + + # In a chain of method calls, we regard the top call node as the base + # for indentation of all lines following the first. For example: + # a. + # b c { block }. <-- b is indented relative to a + # d <-- d is indented relative to a + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32 + def left_hand_side(lhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198 + def not_for_this_cop?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89 + def operation_description(node, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 + def part_of_assignment_rhs(node, candidate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 + def part_of_block_body?(candidate, block_node); end + + # Returns true if `node` is a conditional whose `body` and `condition` + # begin on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 + def postfix_conditional?(node); end + + # The []= operator and setters (a.b = c) are parsed as :send nodes. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 + def valid_method_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 + def valid_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 + def valid_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221 + def within_node?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#11 +RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#10 +RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#8 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#12 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#9 +RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) + +# Autocorrection logic for the closing brace of a literal either +# on the same line as the last contained elements, or a new line. +# +# source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#7 +class RuboCop::Cop::MultilineLiteralBraceCorrector + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::RangeHelp + + # @return [MultilineLiteralBraceCorrector] a new instance of MultilineLiteralBraceCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#15 + def initialize(corrector, node, processed_source); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#21 + def call; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#61 + def content_if_comment_present(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#51 + def correct_heredoc_argument_method_chain(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#46 + def correct_next_line_brace(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#42 + def correct_same_line_brace(corrector); end + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def corrector; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#94 + def last_element_range_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#103 + def last_element_trailing_comma_range(node); end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def node; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#90 + def remove_trailing_content_of_comment(corrector, range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#80 + def select_content_to_be_inserted_after_last_element(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#73 + def use_heredoc_argument_method_chain?(parent); end + + class << self + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#11 + def correct(corrector, node, processed_source); end + end +end + +# Common functionality for checking the closing brace of a literal is +# either on the same line as the last contained elements or a new line. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#7 +module RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#34 + def check(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#12 + def check_brace_layout(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#42 + def check_new_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#50 + def check_same_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#58 + def check_symmetrical(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#86 + def children(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#98 + def closing_brace_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#74 + def empty_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#82 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#78 + def implicit_literal?(node); end + + # Starting with the parent node and recursively for the parent node's + # children, check if the node is a HEREDOC and if the HEREDOC ends below + # or on the last line of the parent node. + # + # Example: + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => false + # foo(a, + # b: { + # a: 1, + # c: <<-EOM + # baz + # EOM + # } + # ) + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => true + # foo(a, + # b: <<-EOM + # baz + # EOM + # ) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#126 + def last_line_heredoc?(node, parent = T.unsafe(nil)); end + + # Returns true for the case + # [a, + # b # comment + # ].some_method + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#26 + def new_line_needed_before_closing_brace?(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#92 + def opening_brace_on_same_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#5 +module RuboCop::Cop::Naming; end + +# Makes sure that accessor methods are named properly. Applies +# to both instance and class methods. +# +# NOTE: Offenses are only registered for methods with the expected +# arity. Getters (`get_attribute`) must have no arguments to be +# registered, and setters (`set_attribute(value)`) must have exactly +# one. +# +# @example +# # bad +# def set_attribute(value) +# end +# +# # good +# def attribute=(value) +# end +# +# # bad +# def get_attribute +# end +# +# # good +# def attribute +# end +# +# # accepted, incorrect arity for getter +# def get_value(attr) +# end +# +# # accepted, incorrect arity for setter +# def set_value +# end +# +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#38 +class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 + def bad_reader_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 + def bad_writer_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 +RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#40 +RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) + +# Checks for non-ascii characters in identifier and constant names. +# Identifiers are always checked and whether constants are checked +# can be controlled using AsciiConstants config. +# +# @example +# # bad +# def καλημερα # Greek alphabet (non-ascii) +# end +# +# # bad +# def こんにちはと言う # Japanese character (non-ascii) +# end +# +# # bad +# def hello_🍣 # Emoji (non-ascii) +# end +# +# # good +# def say_hello +# end +# +# # bad +# 신장 = 10 # Hangul character (non-ascii) +# +# # good +# height = 10 +# +# # bad +# params[:عرض_gteq] # Arabic character (non-ascii) +# +# # good +# params[:width_gteq] +# @example AsciiConstants: true (default) +# # bad +# class Foö +# end +# +# FOÖ = "foo" +# @example AsciiConstants: false +# # good +# class Foö +# end +# +# FOÖ = "foo" +# +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#53 +class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#59 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#84 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#74 + def first_offense_range(identifier); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#70 + def should_check?(token); end +end + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#57 +RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#56 +RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) + +# Makes sure that certain binary operator methods have their +# sole parameter named `other`. +# +# @example +# +# # bad +# def +(amount); end +# +# # good +# def +(other); end +# +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#16 +class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#25 + def op_method_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#45 + def op_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#22 +RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#19 +RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#21 +RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`. +# +# It also supports the opposite style by alternative `explicit` option. +# You can specify the block variable name for autocorrection with `BlockForwardingName`. +# The default variable name is `block`. If the name is already in use, it will not be +# autocorrected. +# +# @example EnforcedStyle: anonymous (default) +# +# # bad +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# @example EnforcedStyle: explicit +# +# # bad +# def foo(&) +# bar(&) +# end +# +# # good +# def foo(&block) +# bar(&block) +# end +# +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#40 +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 + def anonymous_block_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 + def block_forwarding_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 + def expected_block_forwarding_style?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 + def explicit_block_argument?(node); end + + # Prevents the following syntax error: + # + # # foo.rb + # def foo(&) + # block_method do + # bar(&) + # end + # end + # + # $ ruby -vc foo.rb + # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] + # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 + def invalidates_syntax?(block_pass_node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 + def register_offense(block_argument, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 + def use_block_argument_as_local_variable?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 + def use_kwarg_in_method_definition?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#50 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#48 +RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) + +# Checks block parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 1. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# bar do |varOne, varTwo| +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# foo { |num1, num2| num1 * num2 } +# +# # With `MinNameLength` set to number greater than 1 +# baz { |a, b, c| do_stuff(a, b, c) } +# +# # good +# bar do |thud, fred| +# thud + fred +# end +# +# foo { |speed, distance| speed * distance } +# +# baz { |age, height, gender| do_stuff(age, height, gender) } +# +# source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#38 +class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#41 + def on_block(node); end +end + +# Checks for class and module names with +# an underscore in them. +# +# `AllowedNames` config takes an array of permitted names. +# Its default value is `['module_parent']`. +# These names can be full class/module names or part of the name. +# eg. Adding `my_class` to the `AllowedNames` config will allow names like +# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. +# +# @example +# # bad +# class My_Class +# end +# module My_Module +# end +# +# # good +# class MyClass +# end +# module MyModule +# end +# class module_parent::MyModule +# end +# +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#29 +class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#30 +RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) + +# Checks whether constant names are written using +# SCREAMING_SNAKE_CASE. +# +# To avoid false positives, it ignores cases in which we cannot know +# for certain the type of value that would be assigned to a constant. +# +# @example +# # bad +# InchInCm = 2.54 +# INCHinCM = 2.54 +# Inch_In_Cm = 2.54 +# +# # good +# INCH_IN_CM = 2.54 +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#20 +class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 + def class_or_struct_return_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#68 + def literal_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 + def on_casgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#56 + def allowed_assignment?(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#73 + def allowed_conditional_expression_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#63 + def allowed_method_call_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#77 + def contains_constant?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#21 +RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) + +# Use POSIX character classes, so we allow accented characters rather +# than just standard ASCII characters +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#24 +RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Makes sure that Ruby source files have snake_case +# names. Ruby scripts (i.e. source files with a shebang in the +# first line) are ignored. +# +# The cop also ignores `.gemspec` files, because Bundler +# recommends using dashes to separate namespaces in nested gems +# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the +# gemspec is supposed to be named `bundler-console.gemspec`. +# +# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires +# each file to have a class, module or `Struct` defined in it that matches +# the filename. This can be further configured using +# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the +# path should match the namespace of the above definition. +# +# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start +# with a shebang line are not considered by the cop. +# +# When `Regex` is set, the cop will flag any filename that does not match +# the regular expression. +# +# @example +# # bad +# lib/layoutManager.rb +# +# anything/usingCamelCase +# +# # good +# lib/layout_manager.rb +# +# anything/using_snake_case.rake +# +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 +class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#56 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#49 + def struct_definition(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#134 + def allowed_acronyms; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#96 + def bad_filename_allowed?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#122 + def check_definition_path_hierarchy?; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#169 + def defined_struct(node); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#126 + def definition_path_hierarchy_roots; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#118 + def expect_matching_definition?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#138 + def filename_good?(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#147 + def find_class_or_module(node, namespace); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 + def find_definition(node); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 + def for_bad_filename(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#114 + def ignore_executable_scripts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#202 + def match?(expected); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#206 + def match_acronym?(expected, name); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#174 + def match_namespace(node, namespace, expected); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#92 + def matching_class?(file_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#88 + def matching_definition?(file_path); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#100 + def no_definition_message(basename, file_path); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#106 + def other_message(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#188 + def partial_matcher!(expected); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#77 + def perform_class_and_module_naming_checks(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#130 + def regex; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#240 + def to_module_name(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#213 + def to_namespace(path); end +end + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#43 +RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 +RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 +RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#46 +RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks that your heredocs are using the configured case. +# By default it is configured to enforce uppercase heredocs. +# +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# @example EnforcedStyle: lowercase +# # bad +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # good +# <<-sql +# SELECT * FROM foo +# sql +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 +class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#37 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#54 + def correct_case_delimiters?(node); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#58 + def correct_delimiters(source); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#50 + def message(_node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#35 +RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) + +# Checks that your heredocs are using meaningful delimiters. +# By default it disallows `END` and `EO*`, and can be configured through +# forbidden listing additional delimiters. +# +# @example +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # bad +# <<-END +# SELECT * FROM foo +# END +# +# # bad +# <<-EOS +# SELECT * FROM foo +# EOS +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#26 +class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#31 + def on_heredoc(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 + def forbidden_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 + def meaningful_delimiters?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#29 +RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) + +# Recommends the use of inclusive language instead of problematic terms. +# The cop can check the following locations for offenses: +# +# - identifiers +# - constants +# - variables +# - strings +# - symbols +# - comments +# - file paths +# +# Each of these locations can be individually enabled/disabled via configuration, +# for example CheckIdentifiers = true/false. +# +# Flagged terms are configurable for the cop. For each flagged term an optional +# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can +# be configured and will be displayed as part of the offense message. +# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. +# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when +# a term matches the whole word (partial matches will not be offenses). +# +# The cop supports autocorrection when there is only one suggestion. When there are multiple +# suggestions, the best suggestion cannot be identified and will not be autocorrected. +# +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist +# +# # bad +# whitelist_users = %w(user1 user1) +# +# # good +# allowlist_users = %w(user1 user2) +# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } +# # Suggest replacing master in an instance variable name with main, primary, or leader +# +# # bad +# @master_node = 'node1.example.com' +# +# # good +# @primary_node = 'node1.example.com' +# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } +# # Identify problematic terms using a Regexp +# +# # bad +# white_list = %w(user1 user2) +# +# # good +# allow_list = %w(user1 user2) +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. +# +# # bad +# # They had a masters +# +# # good +# # They had a master's degree +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle +# +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [InclusiveLanguage] a new instance of InclusiveLanguage + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#84 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#93 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 + def add_offenses_for_token(token, word_locations); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#167 + def add_to_flagged_term_hash(regex_string, term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#193 + def array_to_ignorecase_regex(strings); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 + def check_token?(type); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 + def create_message(word, message = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 + def create_multiple_word_message_for_file(words); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 + def create_single_word_message_for_file(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 + def ensure_regex_string(regex); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + def extract_regexp(term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 + def find_flagged_term(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 + def format_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 + def investigate_filepath; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 + def investigate_tokens; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 + def mask_input(str); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 + def offense_range(token, word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 + def preprocess_check_config; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 + def preprocess_flagged_terms; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 + def preprocess_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 + def process_allowed_regex(allowed); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 + def scan_for_words(input); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 + def set_regexes(flagged_term_strings, allowed_strings); end +end + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#78 +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#79 +RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#80 +RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + # Returns the value of attribute position + # + # @return [Object] the current value of position + def position; end + + # Sets the attribute position + # + # @param value [Object] the value to set the attribute position to. + # @return [Object] the newly set value + def position=(_); end + + # Returns the value of attribute word + # + # @return [Object] the current value of word + def word; end + + # Sets the attribute word + # + # @param value [Object] the value to set the attribute word to. + # @return [Object] the newly set value + def word=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Checks for memoized methods whose instance variable name +# does not match the method name. Applies to both regular methods +# (defined with `def`) and dynamic methods (defined with +# `define_method` or `define_singleton_method`). +# +# This cop can be configured with the EnforcedStyleForLeadingUnderscores +# directive. It can be configured to allow for memoized instance variables +# prefixed with an underscore. Prefixing ivars with an underscore is a +# convention that is used to implicitly indicate that an ivar should not +# be set or referenced outside of the memoization method. +# +# @example EnforcedStyleForLeadingUnderscores: disallowed (default) +# # bad +# # Method foo is memoized using an instance variable that is +# # not `@foo`. This can cause confusion and bugs. +# def foo +# @something ||= calculate_expensive_thing +# end +# +# def foo +# return @something if defined?(@something) +# @something = calculate_expensive_thing +# end +# +# # good +# def _foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= begin +# calculate_expensive_thing +# end +# end +# +# # good +# def foo +# helper_variable = something_we_need_to_calculate_foo +# @foo ||= calculate_expensive_thing(helper_variable) +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores: required +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # bad +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# def foo +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores :optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 +class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 + def defined_memoized?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160 + def method_definition?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170 + def on_or_asgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242 + def find_definition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 + def matches?(method_name, ivar_assign); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271 + def suggested_var(method_name); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277 + def variable_name_candidates(method_name); end +end + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) + +# Makes sure that all methods use the configured style, +# snake_case or camelCase, for their names. +# +# This cop has `AllowedPatterns` configuration option. +# +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# +# Method names matching patterns are always allowed. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# def fooBar; end +# +# # good +# def foo_bar; end +# @example EnforcedStyle: camelCase +# # bad +# def foo_bar; end +# +# # good +# def fooBar; end +# +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#31 +class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#44 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#42 + def str_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#39 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#64 + def attr_name(name_item); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 + def message(style); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#68 + def range_position(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#36 +RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks method parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 3. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# def bar(varOne, varTwo) +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# def foo(num1, num2) +# num1 * num2 +# end +# +# # With `MinNameLength` set to number greater than 1 +# def baz(a, b, c) +# do_stuff(a, b, c) +# end +# +# # good +# def bar(thud, fred) +# thud + fred +# end +# +# def foo(speed, distance) +# speed * distance +# end +# +# def baz(age_a, height_b, gender_c) +# do_stuff(age_a, height_b, gender_c) +# end +# +# source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#46 +class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 + def on_defs(node); end +end + +# Checks that predicate method names end with a question mark and +# do not start with a forbidden prefix. +# +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. +# +# Predicate methods must end with a question mark. +# +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. +# +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) +# # bad +# def is_even(value) +# end +# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def seems_to_be_even?(value) +# end +# @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed +# # good +# def is_a?(value) +# end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } +# +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 +class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79 + def dynamic_method_define(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112 + def validate_config; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + def allowed_method_name?(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132 + def expected_name(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146 + def forbidden_prefixes; end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142 + def message(method_name, new_name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 + def method_definition_macros(macro_name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150 + def predicate_prefixes; end +end + +# Makes sure that rescued exceptions variables are named as +# expected. +# +# The `PreferredName` config option takes a `String`. It represents +# the required name of the variable. Its default is `e`. +# +# NOTE: This cop does not consider nested rescues because it cannot +# guarantee that the variable from the outer rescue is not used within +# the inner rescue (in which case, changing the inner variable would +# shadow the outer variable). +# +# @example PreferredName: e (default) +# # bad +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _e +# # do something +# end +# @example PreferredName: exception +# # bad +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _exception +# # do something +# end +# +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#61 +class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#66 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117 + def correct_node(corrector, node, offending_name, preferred_name); end + + # If the exception variable is reassigned, that assignment needs to be corrected. + # Further `lvar` nodes will not be corrected though since they now refer to a + # different variable. + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 + def correct_reassignment(corrector, node, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168 + def message(node); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 + def offense_range(resbody); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + def preferred_name(variable_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174 + def shadowed_variable_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161 + def variable_name(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 + def variable_name_matches?(node, name); end +end + +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#64 +RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) + +# Makes sure that all variables use the configured style, +# snake_case or camelCase, for their names. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# fooBar = 1 +# +# # good +# foo_bar = 1 +# @example EnforcedStyle: camelCase +# # bad +# foo_bar = 1 +# +# # good +# fooBar = 1 +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# :release_v1 +# +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31 +class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_restarg(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 + def message(style); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36 +RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) + +# Makes sure that all numbered variables use the +# configured style, snake_case, normalcase, or non_integer, +# for their numbering. +# +# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options +# can be used to specify whether method names and symbols should be checked. +# Both are enabled by default. +# +# @example AllowedPatterns: ['_v\d+\z'] +# # good +# :some_sym_v1 +# @example EnforcedStyle: snake_case +# # bad +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method_1(arg1); end +# +# # good +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method_1(arg_1); end +# @example EnforcedStyle: non_integer +# # bad +# :some_sym1 +# :some_sym_1 +# +# variable1 = 1 +# variable_1 = 1 +# +# def some_method1; end +# +# def some_method_1; end +# +# def some_methodone(arg1); end +# def some_methodone(arg_1); end +# +# # good +# :some_symone +# :some_sym_one +# +# variableone = 1 +# variable_one = 1 +# +# def some_methodone; end +# +# def some_method_one; end +# +# def some_methodone(argone); end +# def some_methodone(arg_one); end +# +# # In the following examples, we assume `EnforcedStyle: normalcase` (default). +# @example CheckMethodNames: true (default) +# # bad +# def some_method_1; end +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 +# @example CheckSymbols: false +# # good +# :some_sym_1 +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# +# # good +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end +# +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 +class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#134 + def on_sym(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#110 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#143 + def message(style); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#108 +RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) + +# Some common code shared between `NegatedIf` and +# `NegatedWhile` cops. +# +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#7 +module RuboCop::Cop::NegativeConditional + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#18 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#15 + def single_negative?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#20 + def check_negative_conditional(node, message:, &block); end +end + +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#10 +RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) + +# This module provides a list of methods that are: +# 1. In the NilClass by default +# 2. Added to NilClass by explicitly requiring any standard libraries +# 3. Cop's configuration parameter AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#9 +module RuboCop::Cop::NilMethods + include ::RuboCop::Cop::AllowedMethods + + private + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#14 + def nil_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#18 + def other_stdlib_methods; end +end + +# An offense represents a style violation detected by RuboCop. +# +# source://rubocop//lib/rubocop/cop/offense.rb#6 +class RuboCop::Cop::Offense + include ::Comparable + + # @api private + # @return [Offense] a new instance of Offense + # + # source://rubocop//lib/rubocop/cop/offense.rb#84 + def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end + + # Returns `-1`, `0`, or `+1` + # if this offense is less than, equal to, or greater than `other`. + # + # @api public + # @return [Integer] comparison result + # + # source://rubocop//lib/rubocop/cop/offense.rb#230 + def <=>(other); end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#211 + def ==(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#160 + def column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#170 + def column_length; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#194 + def column_range; end + + # @api public + # @example + # 'LineLength' + # @return [String] a cop class name without department. + # i.e. type of the violation. + # + # source://rubocop//lib/rubocop/cop/offense.rb#51 + def cop_name; end + + # @api public + # @return [Boolean] whether this offense can be automatically corrected via + # autocorrect or a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#102 + def correctable?; end + + # @api public + # @return [Boolean] whether this offense is automatically corrected via + # autocorrect or a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#113 + def corrected?; end + + # @api public + # @return [Boolean] whether this offense is automatically disabled via a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#123 + def corrected_with_todo?; end + + # @api public + # @return [Corrector | nil] the autocorrection for this offense, or `nil` when not available + # + # source://rubocop//lib/rubocop/cop/offense.rb#62 + def corrector; end + + # @api public + # @return [Boolean] whether this offense was locally disabled with a + # disable or todo where it occurred. + # + # source://rubocop//lib/rubocop/cop/offense.rb#134 + def disabled?; end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#211 + def eql?(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#179 + def first_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#219 + def hash; end + + # @api public + # @return [Parser::Source::Range] the range of the code that is highlighted + # + # source://rubocop//lib/rubocop/cop/offense.rb#142 + def highlighted_area; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#189 + def last_column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#184 + def last_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#155 + def line; end + + # @api public + # @return [Parser::Source::Range] the location where the violation is detected. + # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range Parser::Source::Range + # + # source://rubocop//lib/rubocop/cop/offense.rb#28 + def location; end + + # @api public + # @example + # 'Line is too long. [90/80]' + # @return [String] human-readable message + # + # source://rubocop//lib/rubocop/cop/offense.rb#39 + def message; end + + # Internally we use column number that start at 0, but when + # outputting column numbers, we want them to start at 1. One + # reason is that editors, such as Emacs, expect this. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#203 + def real_column; end + + # @api public + # @return [RuboCop::Cop::Severity] + # + # source://rubocop//lib/rubocop/cop/offense.rb#17 + def severity; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#165 + def source_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#54 + def status; end + + # This is just for debugging purpose. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#148 + def to_s; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/offense.rb#10 +RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/offense.rb#81 +RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) + +# source://rubocop//lib/rubocop/cop/offense.rb#64 +class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct + # Returns the value of attribute begin_pos + # + # @return [Object] the current value of begin_pos + def begin_pos; end + + # Sets the attribute begin_pos + # + # @param value [Object] the value to set the attribute begin_pos to. + # @return [Object] the newly set value + def begin_pos=(_); end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + def column=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#70 + def column_range; end + + # Returns the value of attribute end_pos + # + # @return [Object] the current value of end_pos + def end_pos; end + + # Sets the attribute end_pos + # + # @param value [Object] the value to set the attribute end_pos to. + # @return [Object] the newly set value + def end_pos=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def first_line; end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + def last_column; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def last_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#74 + def length; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#74 + def size; end + + # Returns the value of attribute source_line + # + # @return [Object] the current value of source_line + def source_line; end + + # Sets the attribute source_line + # + # @param value [Object] the value to set the attribute source_line to. + # @return [Object] the newly set value + def source_line=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Common functionality for cops checking if and unless expressions. +# +# source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#6 +module RuboCop::Cop::OnNormalIfUnless + # source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#7 + def on_if(node); end +end + +# This autocorrects gem dependency order +# +# source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#6 +class RuboCop::Cop::OrderedGemCorrector + extend ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::RangeHelp + + class << self + # Returns the value of attribute comments_as_separators. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def comments_as_separators; end + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#13 + def correct(processed_source, node, previous_declaration, comments_as_separators); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#26 + def declaration_with_comment(node); end + end +end + +# Common functionality for Bundler/OrderedGems and +# Gemspec/OrderedDependencies. +# +# source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#7 +module RuboCop::Cop::OrderedGemNode + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#23 + def case_insensitive_out_of_order?(string_a, string_b); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#27 + def consecutive_lines(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#55 + def find_gem_name(gem_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#18 + def gem_canonical_name(name); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#49 + def gem_name(declaration_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#10 + def get_source_range(node, comments_as_separators); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#32 + def register_offense(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#61 + def treat_comments_as_separators; end +end + +# Common functionality for handling parentheses. +# +# source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#6 +module RuboCop::Cop::Parentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#9 + def parens_required?(node); end +end + +# This autocorrects parentheses +# +# source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#6 +class RuboCop::Cop::ParenthesesCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#12 + def correct(corrector, node); end + + private + + # Add a comma back after the heredoc identifier + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#74 + def add_heredoc_comma(corrector, node); end + + # If the node contains a heredoc, remove the comma too + # It'll be added back in the right place later + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#64 + def extend_range_for_heredoc(node, range); end + + # If removing parentheses leaves a comma on its own line, remove all the whitespace + # preceding it to prevent a syntax error. + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#41 + def handle_orphaned_comma(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#80 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#28 + def next_char_is_question_mark?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#32 + def only_closing_paren_before_comma?(node); end + + # Get a range for the closing parenthesis and all whitespace to the left of it + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#51 + def parens_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#24 + def ternary_condition?(node); end + end +end + +# Common functionality for handling percent arrays. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#6 +module RuboCop::Cop::PercentArray + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 + def allowed_bracket_array?(node); end + + # @param node [RuboCop::AST::ArrayNode] + # @param elements [Array] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 + def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end + + # @param preferred_array_code [String] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#56 + def build_message_for_bracketed_array(preferred_array_code); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#67 + def check_bracketed_array(node, literal_prefix); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#36 + def check_percent_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#31 + def comments_in_array?(node); end + + # Override to determine values that are invalid in a percent array + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#22 + def invalid_percent_array_contents?(_node); end + + # Ruby does not allow percent arrays in an ambiguous block context. + # + # @example + # + # foo %i[bar baz] { qux } + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#14 + def invalid_percent_array_context?(node); end + + # Provides whitespace between elements for building a bracketed array. + # %w[ a b c ] + # ^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#98 + def whitespace_between(node); end + + # Provides leading whitespace for building a bracketed array. + # %w[ a b c ] + # ^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#111 + def whitespace_leading(node); end + + # Provides trailing whitespace for building a bracketed array. + # %w[ a b c ] + # ^^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#120 + def whitespace_trailing(node); end +end + +# Common functionality for handling percent literals. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#6 +module RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#23 + def begin_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#11 + def percent_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#17 + def process(node, *types); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#27 + def type(node); end +end + +# This autocorrects percent literals +# +# source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#6 +class RuboCop::Cop::PercentLiteralCorrector + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # @return [PercentLiteralCorrector] a new instance of PercentLiteralCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#11 + def initialize(config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def config; end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#16 + def correct(corrector, node, char); end + + # Returns the value of attribute preferred_delimiters. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def preferred_delimiters; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#46 + def autocorrect_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#52 + def autocorrect_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#34 + def delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#100 + def end_content(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#30 + def escape_words?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#78 + def first_line?(node, previous_line_num); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#89 + def fix_escaped_content(word_node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#69 + def line_breaks(node, source, previous_line_num, base_line_num, node_index); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#38 + def new_contents(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#82 + def process_lines(node, previous_line_num, base_line_num, source_in_lines); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#58 + def process_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#96 + def substitute_escaped_delimiters(content, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#26 + def wrap_contents(corrector, node, contents, char, delimiters); end +end + +# Common functionality for checking whether an AST node/token is aligned +# with something on a preceding or following line +# +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#7 +module RuboCop::Cop::PrecedingFollowingAlignment + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 + def aligned_assignment?(range, line); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 + def aligned_comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 + def aligned_identical?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 + def aligned_operator?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#77 + def aligned_token?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#34 + def aligned_with_adjacent_line?(range, predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#52 + def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#42 + def aligned_with_any_line_range?(line_ranges, range, &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 + def aligned_with_append_operator?(range, line); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 + def aligned_with_assignment(token, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#56 + def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#18 + def aligned_with_operator?(range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#22 + def aligned_with_preceding_assignment(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#14 + def aligned_with_something?(range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#28 + def aligned_with_subsequent_assignment(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 + def aligned_words?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 + def allow_for_alignment?; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 + def assignment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 + def assignment_tokens; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 + def relevant_assignment_lines(line_range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 + def remove_optarg_equals(asgn_tokens, processed_source); end +end + +# Common functionality for handling percent literal delimiters. +# +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#6 +class RuboCop::Cop::PreferredDelimiters + # @return [PreferredDelimiters] a new instance of PreferredDelimiters + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#11 + def initialize(type, config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def config; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#17 + def delimiters; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def type; end + + private + + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#23 + def ensure_valid_preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#30 + def preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#45 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#9 +RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# This autocorrects punctuation +# +# source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#6 +class RuboCop::Cop::PunctuationCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#12 + def add_space(corrector, token); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#8 + def remove_space(corrector, space_before); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#16 + def swap_comma(corrector, range); end + end +end + +# Methods that calculate and return Parser::Source::Ranges +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 +module RuboCop::Cop::RangeHelp + private + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 + def add_range(range1, range2); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#82 + def column_offset_between(base_range, range); end + + # A range containing only the contents of a literal with delimiters (e.g. in + # `%i{1 2 3}` this will be the range covering `1 2 3` only). + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#32 + def contents_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#100 + def directions(side); end + + # Returns the column attribute of the range, except if the range is on + # the first line and there's a byte order mark at the beginning of that + # line, in which case 1 is subtracted from the column value. This gives + # the column as it appears when viewing the file in an editor. + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#92 + def effective_column(range); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#109 + def final_pos(src, pos, increment, continuations, newlines, whitespace); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#117 + def move_pos(src, pos, step, condition, regexp); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#123 + def move_pos_str(src, pos, step, condition, needle); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#36 + def range_between(start_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#73 + def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 + def range_with_comments(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#130 + def range_with_comments_and_lines(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#40 + def range_with_surrounding_comma(range, side = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#55 + def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#11 + def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end +end + +# The Unicode codepoint +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#9 +RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#54 +module RuboCop::Cop::RangeHelp::NOT_GIVEN; end + +# Common functionality for handling Rational literals. +# +# source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#6 +module RuboCop::Cop::RationalLiteral + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#12 + def rational_literal?(param0 = T.unsafe(nil)); end +end + +# Registry that tracks all cops by their badge and department. +# +# source://rubocop//lib/rubocop/cop/registry.rb#19 +class RuboCop::Cop::Registry + include ::Enumerable + + # @return [Registry] a new instance of Registry + # + # source://rubocop//lib/rubocop/cop/registry.rb#51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#232 + def ==(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#97 + def contains_cop_matching?(names); end + + # source://rubocop//lib/rubocop/cop/registry.rb#179 + def cops; end + + # source://rubocop//lib/rubocop/cop/registry.rb#224 + def cops_for_department(department); end + + # @return [Boolean] Checks if given name is department + # + # source://rubocop//lib/rubocop/cop/registry.rb#93 + def department?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#147 + def department_missing?(badge, name); end + + # @return [Array] list of departments for current cops. + # + # source://rubocop//lib/rubocop/cop/registry.rb#72 + def departments; end + + # source://rubocop//lib/rubocop/cop/registry.rb#193 + def disabled(config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#67 + def dismiss(cop); end + + # source://rubocop//lib/rubocop/cop/registry.rb#247 + def each(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#189 + def enabled(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#197 + def enabled?(cop, config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#213 + def enabled_pending_cop?(cop_cfg, config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#63 + def enlist(cop); end + + # @param cop_name [String] + # @return [Class, nil] + # + # source://rubocop//lib/rubocop/cop/registry.rb#253 + def find_by_cop_name(cop_name); end + + # When a cop name is given returns a single-element array with the cop class. + # When a department name is given returns an array with all the cop classes + # for that department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#260 + def find_cops_by_directive(directive); end + + # source://rubocop//lib/rubocop/cop/registry.rb#265 + def freeze; end + + # source://rubocop//lib/rubocop/cop/registry.rb#184 + def length; end + + # source://rubocop//lib/rubocop/cop/registry.rb#220 + def names; end + + # source://rubocop//lib/rubocop/cop/registry.rb#228 + def names_for_department(department); end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/registry.rb#49 + def options; end + + # source://rubocop//lib/rubocop/cop/registry.rb#151 + def print_warning(name, path); end + + # Convert a user provided cop name into a properly namespaced name + # + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' + # @example fixes incorrect namespaces + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # @example namespaces bare cop identifiers + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' + # @example passes back unrecognized cop names + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('NotACop', '') # => 'NotACop' + # @note Emits a warning if the provided name has an incorrect namespace + # @param name [String] Cop name extracted from config + # @param path [String, nil] Path of file that `name` was extracted from + # @param warn [Boolean] Print a warning if no department given for `name` + # @raise [AmbiguousCopName] if a bare identifier with two possible namespaces is provided + # @return [String] Qualified cop name + # + # source://rubocop//lib/rubocop/cop/registry.rb#133 + def qualified_cop_name(name, path, warn: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#166 + def qualify_badge(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#243 + def select(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#236 + def sort!; end + + # @return [Hash{String => Array}] + # + # source://rubocop//lib/rubocop/cop/registry.rb#174 + def to_h; end + + # source://rubocop//lib/rubocop/cop/registry.rb#159 + def unqualified_cop_names; end + + # @return [Registry] Cops for that specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#78 + def with_department(department); end + + # @return [Registry] Cops not for a specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#84 + def without_department(department); end + + private + + # source://rubocop//lib/rubocop/cop/registry.rb#283 + def clear_enrollment_queue; end + + # source://rubocop//lib/rubocop/cop/registry.rb#279 + def initialize_copy(reg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#309 + def registered?(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#299 + def resolve_badge(given_badge, real_badge, source_path); end + + # source://rubocop//lib/rubocop/cop/registry.rb#295 + def with(cops); end + + class << self + # source://rubocop//lib/rubocop/cop/registry.rb#22 + def all; end + + # Returns the value of attribute global. + # + # source://rubocop//lib/rubocop/cop/registry.rb#274 + def global; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#44 + def qualified_cop?(name); end + + # source://rubocop//lib/rubocop/cop/registry.rb#26 + def qualified_cop_name(name, origin); end + + # source://rubocop//lib/rubocop/cop/registry.rb#40 + def reset!; end + + # Changes momentarily the global registry + # Intended for testing purposes + # + # source://rubocop//lib/rubocop/cop/registry.rb#32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# Ensure a require statement is present for a standard library determined +# by variable library_name +# +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#7 +module RuboCop::Cop::RequireLibrary + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#12 + def ensure_required(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#24 + def remove_subsequent_requires(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#51 + def require_any_library?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#56 + def require_library_name?(param0 = T.unsafe(nil), param1); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#44 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#10 +RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class ensures a require statement is present for a standard library +# determined by the variable library_name +# +# source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#7 +class RuboCop::Cop::RequireLibraryCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#11 + def correct(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#17 + def require_statement(library_name); end + end +end + +# Common functionality for checking `rescue` nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#6 +module RuboCop::Cop::RescueNode + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#7 + def modifier_locations; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#13 + def rescue_modifier?(node); end + + # @deprecated Use ResbodyNode#exceptions instead + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#20 + def rescued_exceptions(resbody); end +end + +# Common functionality for safe assignment. By safe assignment we mean +# putting parentheses around an assignment to indicate "I know I'm using an +# assignment as a condition. It's not a mistake." +# +# source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#8 +module RuboCop::Cop::SafeAssignment + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#14 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#20 + def safe_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#17 + def setter_method?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#22 + def safe_assignment_allowed?; end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#5 +module RuboCop::Cop::Security; end + +# Checks for implementations of the `hash` method which combine +# values using custom logic instead of delegating to `Array#hash`. +# +# Manually combining hashes is error prone and hard to follow, especially +# when there are many values. Poor implementations may also introduce +# performance or security concerns if they are prone to collisions. +# Delegating to `Array#hash` is clearer and safer, although it might be slower +# depending on the use case. +# +# @example +# +# # bad +# def hash +# @foo ^ @bar +# end +# +# # good +# def hash +# [@foo, @bar].hash +# end +# +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#30 +class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#58 + def bad_hash_combinator?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#75 + def contained_in_hash_method?(node, &block); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#42 + def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#37 + def hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#63 + def monuple_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 + def on_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#81 + def outer_bad_hash_combinator?(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#68 + def redundant_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#51 + def static_hash_method_definition?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#31 +RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#32 +RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#34 +RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of `Kernel#eval` and `Binding#eval`. +# +# @example +# +# # bad +# +# eval(something) +# binding.eval(something) +# +# source://rubocop//lib/rubocop/cop/security/eval.rb#14 +class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/eval.rb#19 + def eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/eval.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/eval.rb#15 +RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/eval.rb#16 +RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, +# `IO.foreach`, and `IO.readlines`. +# +# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, +# a subprocess is created in the same way as `Kernel#open`, and its output is returned. +# `Kernel#open` may allow unintentional command injection, which is the reason these +# `IO` methods are a security risk. +# Consider to use `File.read` to disable the behavior of subprocess invocation. +# +# @example +# +# # bad +# IO.read(path) +# IO.read('path') +# +# # good +# File.read(path) +# File.read('path') +# IO.read('| command') # Allow intentional command invocation. +# +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#30 +class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/io_methods.rb#36 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#33 +RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#34 +RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of JSON class methods which have potential +# security issues. +# +# @example +# # bad +# JSON.load("{}") +# JSON.restore("{}") +# +# # good +# JSON.parse("{}") +# +# source://rubocop//lib/rubocop/cop/security/json_load.rb#26 +class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#33 + def json_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#37 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#29 +RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#30 +RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of Marshal class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# @example +# # bad +# Marshal.load("{}") +# Marshal.restore("{}") +# +# # good +# Marshal.dump("{}") +# +# # okish - deep copy hack +# Marshal.load(Marshal.dump({})) +# +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#21 +class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#26 + def marshal_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#22 +RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#23 +RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#open` and `URI.open` with dynamic +# data. +# +# `Kernel#open` and `URI.open` enable not only file access but also process +# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). +# So, it may lead to a serious security risk by using variable input to +# the argument of `Kernel#open` and `URI.open`. It would be better to use +# `File.open`, `IO.popen` or `URI.parse#open` explicitly. +# +# NOTE: `open` and `URI.open` with literal strings are not flagged by this +# cop. +# +# @example +# # bad +# open(something) +# open("| #{something}") +# open("| foo") +# URI.open(something) +# +# # good +# File.open(something) +# IO.popen(something) +# URI.parse(something).open +# +# # good (literal strings) +# open("foo.text") +# URI.open("http://example.com") +# +# source://rubocop//lib/rubocop/cop/security/open.rb#37 +class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/open.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/open.rb#42 + def open?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#75 + def composite_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#83 + def concatenated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#79 + def interpolated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#57 + def safe?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#67 + def safe_argument?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#71 + def simple_string?(node); end +end + +# source://rubocop//lib/rubocop/cop/security/open.rb#38 +RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/open.rb#39 +RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of YAML class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. +# +# @example +# # bad +# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default +# +# # good +# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) +# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) +# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) +# YAML.dump(foo) +# +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#26 +class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#37 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#33 + def yaml_load(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#29 +RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#30 +RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Severity class is simple value object about severity +# +# source://rubocop//lib/rubocop/cop/severity.rb#6 +class RuboCop::Cop::Severity + include ::Comparable + + # @api private + # @raise [ArgumentError] + # @return [Severity] a new instance of Severity + # + # source://rubocop//lib/rubocop/cop/severity.rb#30 + def initialize(name_or_code); end + + # source://rubocop//lib/rubocop/cop/severity.rb#62 + def <=>(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#50 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#42 + def code; end + + # source://rubocop//lib/rubocop/cop/severity.rb#58 + def hash; end + + # source://rubocop//lib/rubocop/cop/severity.rb#46 + def level; end + + # @api public + # @return [Symbol] severity. + # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. + # + # source://rubocop//lib/rubocop/cop/severity.rb#22 + def name; end + + # source://rubocop//lib/rubocop/cop/severity.rb#38 + def to_s; end + + class << self + # source://rubocop//lib/rubocop/cop/severity.rb#24 + def name_from_code(code); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/severity.rb#12 +RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/severity.rb#9 +RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) + +# Common functionality for cops checking for missing space after +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#7 +module RuboCop::Cop::SpaceAfterPunctuation + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#10 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#38 + def allowed_type?(token); end + + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#20 + def each_missing_space(tokens); end + + # The normal offset, i.e., the distance from the punctuation + # token where a space should be, is 1. + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#49 + def offset; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#42 + def space_forbidden_before_rcurly?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#30 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#34 + def space_required_before?(token); end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#8 +RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops checking for space before +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#7 +module RuboCop::Cop::SpaceBeforePunctuation + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#12 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#22 + def each_missing_space(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#34 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#38 + def space_required_after?(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#42 + def space_required_after_lcurly?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#10 +RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) + +# This autocorrects whitespace +# +# source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#6 +class RuboCop::Cop::SpaceCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::SurroundingSpace + + class << self + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#36 + def add_space(processed_source, corrector, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#12 + def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#10 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#24 + def remove_space(processed_source, corrector, left_token, right_token); end + end +end + +# Common functionality for modifier cops. +# +# source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#6 +module RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#79 + def code_after(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 + def comment_disables_cop?(comment); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 + def first_line_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#58 + def if_body_source(if_body); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#44 + def length_in_modifier_form(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#97 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#67 + def method_source(if_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#38 + def modifier_fits_on_single_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#27 + def non_eligible_body?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#34 + def non_eligible_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#20 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 + def parenthesize?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#12 + def single_line_as_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#51 + def to_modifier_form(node); end +end + +# Classes that include this module just implement functions to determine +# what is an offense and how to do autocorrection. They get help with +# adding offenses for the faulty string nodes, and with filtering out +# nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_help.rb#9 +module RuboCop::Cop::StringHelp + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#26 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#10 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#32 + def inside_interpolation?(node); end +end + +# This autocorrects string literals +# +# source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#6 +class RuboCop::Cop::StringLiteralCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#10 + def correct(corrector, node, style); end + end +end + +# Common functionality for cops checking single/double quotes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#6 +module RuboCop::Cop::StringLiteralsHelp + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 + def wrong_quotes?(src_or_node); end +end + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#5 +module RuboCop::Cop::Style; end + +# Access modifiers should be declared to apply to a group of methods +# or inline before each method, depending on configuration. +# EnforcedStyle config covers only method definitions. +# Applications of visibility methods to symbols can be controlled +# using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. +# +# @example EnforcedStyle: group (default) +# # bad +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# # good +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# @example AllowModifiersOnSymbols: true (default) +# # good +# class Foo +# +# private :bar, :baz +# +# end +# @example AllowModifiersOnSymbols: false +# # bad +# class Foo +# +# private :bar, :baz +# +# end +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end +# +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 +class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 + def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 + def access_modifier_is_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 + def access_modifier_is_not_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 + def allow_modifiers_on_symbols?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 + def def_source(node, def_node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 + def find_argument_less_modifier_node(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + def find_corresponding_def_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 + def group_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 + def inline_style?; end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 + def insert_inline_modifier(corrector, node, modifier_name); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 + def remove_node(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 + def replace_def(corrector, node, def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 + def right_siblings_same_inline_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 + def select_grouped_def_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 +RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 +RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 +RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 +RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for grouping of accessors in `class` and `module` bodies. +# By default it enforces accessors to be placed in grouped declarations, +# but it can be configured to enforce separating them in multiple declarations. +# +# NOTE: If there is a method call before the accessor method it is always allowed +# as it might be intended like Sorbet. +# +# @example EnforcedStyle: grouped (default) +# # bad +# class Foo +# attr_reader :bar +# attr_reader :bax +# attr_reader :baz +# end +# +# # good +# class Foo +# attr_reader :bar, :bax, :baz +# end +# +# # good +# class Foo +# # may be intended comment for bar. +# attr_reader :bar +# +# sig { returns(String) } +# attr_reader :bax +# +# may_be_intended_annotation :baz +# attr_reader :baz +# end +# @example EnforcedStyle: separated +# # bad +# class Foo +# attr_reader :bar, :baz +# end +# +# # good +# class Foo +# attr_reader :bar +# attr_reader :baz +# end +# +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#50 +class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#82 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 + def class_send_elements(class_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 + def group_accessors(node, accessors); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 + def groupable_accessor?(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 + def groupable_sibling_accessors(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 + def preferred_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 + def previous_line_comment?(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 + def separate_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 + def separated_style?; end +end + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#56 +RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#57 +RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `#alias` or `#alias_method` +# depending on configuration. +# It also flags uses of `alias :symbol` rather than `alias bareword`. +# +# However, it will always enforce `method_alias` when used `alias` +# in an instance method definition and in a singleton method definition. +# If used in a block, always enforce `alias_method` +# unless it is an `instance_eval` block. +# +# @example EnforcedStyle: prefer_alias (default) +# # bad +# alias_method :bar, :foo +# alias :bar :foo +# +# # good +# alias bar foo +# @example EnforcedStyle: prefer_alias_method +# # bad +# alias :bar :foo +# alias bar foo +# +# # good +# alias_method :bar, :foo +# +# source://rubocop//lib/rubocop/cop/style/alias.rb#31 +class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/alias.rb#52 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#41 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/alias.rb#86 + def add_offense_for_args(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#76 + def alias_keyword_possible?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#80 + def alias_method_possible?(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#66 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#125 + def bareword?(sym_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#129 + def correct_alias_method_to_alias(corrector, send_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#136 + def correct_alias_to_alias_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#143 + def correct_alias_with_symbol_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#148 + def identifier(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#114 + def lexical_scope_type(node); end + + # In this expression, will `self` be the same as the innermost enclosing + # class or module block (:lexical)? Or will it be something else + # (:dynamic)? If we're in an instance_eval block, return that. + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#97 + def scope_type(node); end +end + +# source://rubocop//lib/rubocop/cop/style/alias.rb#35 +RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#36 +RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#37 +RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#39 +RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `and` and `or`, and suggests using `&&` and +# `||` instead. It can be configured to check only in conditions or in +# all contexts. +# +# @example EnforcedStyle: conditionals (default) +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# foo.save and return +# +# # good +# if foo && bar +# end +# @example EnforcedStyle: always +# # bad +# foo.save and return +# +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# if foo && bar +# end +# +# source://rubocop//lib/rubocop/cop/style/and_or.rb#44 +class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_while_post(node); end + + private + + # ! is a special case: + # 'x and !obj.method arg' can be autocorrected if we + # recurse down a level and add parens to 'obj.method arg' + # however, 'not x' also parses as (send x :!) + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#117 + def correct_not(node, receiver, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#129 + def correct_other(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#95 + def correct_send(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#108 + def correct_setter(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#143 + def correctable_send?(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#135 + def keep_operator_precedence(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#91 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#85 + def on_conditionals(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#66 + def process_logical_operator(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#147 + def whitespace_before_arg(node); end +end + +# source://rubocop//lib/rubocop/cop/style/and_or.rb#49 +RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) + +# In Ruby 2.7, arguments forwarding has been added. +# +# This cop identifies places where `do_something(*args, &block)` +# can be replaced by `do_something(...)`. +# +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be +# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, +# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names +# that are sufficient for anonymizing meaningless naming. +# +# Meaningless names that are commonly used can be anonymized by default: +# e.g., `*args`, `**options`, `&block`, and so on. +# +# Names not on this list are likely to be meaningful and are allowed by default. +# +# This cop handles not only method forwarding but also forwarding to `super`. +# +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# # good +# def foo(*, **, &) +# args_only(*) +# kwargs_only(**) +# block_only(&) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) +# # bad +# # The following code can replace the arguments with `...`, +# # but it will change the behavior. Because `...` forwards block also. +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end +# +# # good +# def foo(*) +# bar(*) +# end +# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) +# # bad +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# # good +# def foo(**) +# bar(**) +# end +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end +# +# # good +# def foo(...) +# bar(...) +# end +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 +class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#338 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 + def explicit_block_name?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 + def extract_forwardable_args(args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 + def non_splat_or_block_pass_lvar_references(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 + def only_forwards_all?(send_classifications); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 + def outside_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 + def redundant_named_arg(arg, config_name, keyword); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354 + def use_anonymous_forwarding?; end + + class << self + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 +RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#377 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#405 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#399 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#375 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#393 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#369 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#473 + def additional_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 + def additional_kwargs_or_forwarded_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#483 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 + def any_arg_referenced?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 + def arguments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#417 + def can_forward_all?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#477 + def forward_additional_kwargs?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 + def forwarded_rest_and_kwrest_args; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#496 + def missing_rest_arg_or_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#487 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 + def offensive_block_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 + def referenced_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 + def referenced_rest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 + def ruby_32_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + def target_ruby_version; end +end + +# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# paths = [paths] unless paths.is_a?(Array) +# paths.each { |path| do_something(path) } +# +# # bad (always creates a new Array instance) +# [*paths].each { |path| do_something(path) } +# +# # good (and a bit more readable) +# Array(paths).each { |path| do_something(path) } +# +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#41 +class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#48 + def array_splat?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#63 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#74 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#53 + def unless_array?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#45 +RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44 +RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change +# them to use `arr.first` and `arr.last` instead. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# arr[0] +# arr[-1] +# +# # good +# arr.first +# arr.last +# arr[0] = 2 +# arr[0][-2] +# +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28 +class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58 + def brace_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53 + def innermost_braces_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 +RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32 +RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, `Array#intersect?` has been added. +# +# This cop identifies places where `(array1 & array2).any?` +# can be replaced by `array1.intersect?(array2)`. +# +# The `array1.intersect?(array2)` method is faster than +# `(array1 & array2).any?` and is more readable. +# +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# +# @example +# # bad +# (array1 & array2).any? +# (array1 & array2).empty? +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# (array1 & array2).present? +# (array1 & array2).blank? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# (array1 & array2).present? +# (array1 & array2).blank? +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 +class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 + def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + def bad_intersection_check?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 + def message(receiver, argument, method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 + def straight?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 +RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 +RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 +RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 +RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for uses of "*" as a substitute for _join_. +# +# Not all cases can reliably checked, due to Ruby's dynamic +# types, so we consider only cases when the first argument is an +# array literal or the second is a string literal. +# +# @example +# +# # bad +# %w(foo bar baz) * "," +# +# # good +# %w(foo bar baz).join(",") +# +# source://rubocop//lib/rubocop/cop/style/array_join.rb#20 +class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#27 + def join_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#23 +RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#24 +RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#16 +class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#21 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#51 + def allowed_non_ascii_chars; end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#42 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#32 + def first_offense_range(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#46 + def only_allowed_non_ascii_chars?(string); end +end + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#19 +RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of Module#attr. +# +# @example +# # bad - creates a single attribute accessor (deprecated in Ruby 1.9) +# attr :something, true +# attr :one, :two, :three # behaves as attr_reader +# +# # good +# attr_accessor :something +# attr_reader :one, :two, :three +# +# source://rubocop//lib/rubocop/cop/style/attr.rb#17 +class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/attr.rb#74 + def class_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#37 + def allowed_context?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#47 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#43 + def define_attr_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#59 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#63 + def replacement_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/attr.rb#21 +RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/attr.rb#22 +RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for cases when you could use a block +# accepting version of a method that does automatic +# resource cleanup. +# +# @example +# +# # bad +# f = File.open('file') +# +# # good +# File.open('file') do |f| +# # ... +# end +# +# # bad +# f = Tempfile.open('temp') +# +# # good +# Tempfile.open('temp') do |f| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27 +class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32 + def file_open_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46 + def cleanup?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28 +RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29 +RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if usage of %() or %Q() matches configuration. +# +# @example EnforcedStyle: bare_percent (default) +# # bad +# %Q(He said: "#{greeting}") +# %q{She said: 'Hi'} +# +# # good +# %(He said: "#{greeting}") +# %{She said: 'Hi'} +# @example EnforcedStyle: percent_q +# # bad +# %|He said: "#{greeting}"| +# %/She said: 'Hi'/ +# +# # good +# %Q|He said: "#{greeting}"| +# %q/She said: 'Hi'/ +# +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#26 +class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#32 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#36 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#63 + def add_offense_for_wrong_style(node, good, bad); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#42 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#59 + def requires_bare_percent?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#55 + def requires_percent_q?(source); end +end + +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30 +RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for BEGIN blocks. +# +# @example +# # bad +# BEGIN { test } +# +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#12 +class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/begin_block.rb#15 + def on_preexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13 +RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where `attr_reader` and `attr_writer` +# for the same method can be combined into single `attr_accessor`. +# +# @example +# # bad +# class Foo +# attr_reader :bar +# attr_writer :bar +# end +# +# # good +# class Foo +# attr_accessor :bar +# end +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#21 +class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_class(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_module(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_sclass(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_class(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_module(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#29 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_sclass(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#102 + def correct_reader(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#114 + def correct_writer(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#91 + def find_bisection(macros); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#74 + def find_macros(class_def); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#98 + def register_offense(attr); end +end + +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#27 +RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) + +# Representation of an `attr_reader`, `attr_writer` or `attr` macro +# for use by `Style/BisectedAttrAccessor`. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#10 +class RuboCop::Cop::Style::BisectedAttrAccessor::Macro + include ::RuboCop::Cop::VisibilityHelp + + # @api private + # @return [Macro] a new instance of Macro + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#19 + def initialize(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#49 + def all_bisected?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#29 + def attr_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def attrs; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#25 + def bisect(*names); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#33 + def bisected_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def bisection; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def node; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#41 + def reader?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#53 + def rest; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#37 + def visibility; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#45 + def writer?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#15 + def macro?(node); end + end +end + +# Looks for uses of block comments (=begin...=end). +# +# @example +# # bad +# =begin +# Multiple lines +# of comments... +# =end +# +# # good +# # Multiple lines +# # of comments... +# +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#19 +class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#27 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#56 + def eq_end_part(comment, expr); end + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#48 + def parts(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#24 +RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#25 +RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#23 +RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) + +# Check for uses of braces or do/end around single line or +# multi-line blocks. +# +# Methods that can be either procedural or functional and cannot be +# categorised from their usage alone is ignored. +# `lambda`, `proc`, and `it` are their defaults. +# Additional methods can be added to the `AllowedMethods`. +# +# @example AllowedPatterns: ['map'] +# +# # good +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example EnforcedStyle: semantic +# # Prefer `do...end` over `{...}` for procedural blocks. +# +# # return value is used/assigned +# # bad +# foo = map do |x| +# x +# end +# puts (map do |x| +# x +# end) +# +# # return value is not used out of scope +# # good +# map do |x| +# x +# end +# +# # Prefer `{...}` over `do...end` for functional blocks. +# +# # return value is not used out of scope +# # bad +# each { |x| +# x +# } +# +# # return value is used/assigned +# # good +# foo = map { |x| +# x +# } +# map { |x| +# x +# }.inspect +# +# # The AllowBracesOnProceduralOneLiners option is allowed unless the +# # EnforcedStyle is set to `semantic`. If so: +# +# # If the AllowBracesOnProceduralOneLiners option is unspecified, or +# # set to `false` or any other falsey value, then semantic purity is +# # maintained, so one-line procedural blocks must use do-end, not +# # braces. +# +# # bad +# collection.each { |element| puts element } +# +# # good +# collection.each do |element| puts element end +# +# # If the AllowBracesOnProceduralOneLiners option is set to `true`, or +# # any other truthy value, then one-line procedural blocks may use +# # either style. (There is no setting for requiring braces on them.) +# +# # good +# collection.each { |element| puts element } +# +# # also good +# collection.each do |element| puts element end +# @example EnforcedStyle: braces_for_chaining +# # bad +# words.each do |word| +# word.flip.flop +# end.join("-") +# +# # good +# words.each { |word| +# word.flip.flop +# }.join("-") +# @example EnforcedStyle: always_braces +# # bad +# words.each do |word| +# word.flip.flop +# end +# +# # good +# words.each { |word| +# word.flip.flop +# } +# @example BracesRequiredMethods: ['sig'] +# +# # Methods listed in the BracesRequiredMethods list, such as 'sig' +# # in this example, will require `{...}` braces. This option takes +# # precedence over all other configurations except AllowedMethods. +# +# # bad +# sig do +# params( +# foo: string, +# ).void +# end +# def bar(foo) +# puts foo +# end +# +# # good +# sig { +# params( +# foo: string, +# ).void +# } +# def bar(foo) +# puts foo +# end +# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) +# +# # good +# foo = lambda do |x| +# puts "Hello, #{x}" +# end +# +# foo = lambda do |x| +# x * 100 +# end +# @example AllowedPatterns: [] (default) +# +# # bad +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end +# +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end +# +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 +class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 + def array_or_range?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 + def begin_required?(block_node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 + def braces_for_chaining_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 + def braces_for_chaining_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 + def braces_required_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 + def braces_required_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 + def braces_required_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 + def braces_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 + def conditional?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 + def correction_would_break_code?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 + def end_of_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 + def functional_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 + def functional_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 + def get_blocks(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 + def line_count_based_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 + def line_count_based_message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 + def move_comment_before_block(corrector, comment, block_node, closing_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 + def procedural_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 + def procedural_oneliners_may_have_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 + def proper_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#316 + def remove_trailing_whitespace(corrector, range, comment); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#263 + def replace_braces_with_do_end(corrector, loc); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#279 + def replace_do_end_with_braces(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#356 + def require_braces?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 + def return_value_of_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 + def return_value_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 + def semantic_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 + def semantic_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#364 + def special_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + def special_method_proper_block_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 + def whitespace_after?(range, length = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#292 + def whitespace_before?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 + def with_block?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 +RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#177 +RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) + +# Corrector to correct conditional assignment in `case` statements. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 +class RuboCop::Cop::Style::CaseCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#609 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 + def extract_branches(case_node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# If `AllowOnSelfClass` option is enabled, the cop will ignore violations when the receiver of +# the case equality operator is `self.class`. Note intermediate variables are not accepted. +# +# @example +# # bad +# (1..100) === 7 +# /something/ === some_string +# +# # good +# something.is_a?(Array) +# (1..100).include?(7) +# /something/.match?(some_string) +# @example AllowOnConstant: false (default) +# # bad +# Array === something +# @example AllowOnConstant: true +# # good +# Array === something +# @example AllowOnSelfClass: false (default) +# # bad +# self.class === something +# @example AllowOnSelfClass: true +# # good +# self.class === something +# +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#40 +class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#47 + def case_equality?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#52 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#50 + def self_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#90 + def begin_replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#96 + def const_replacement(lhs, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#65 + def offending_receiver?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#72 + def replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#100 + def send_replacement(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#43 +RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#44 +RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `if-elsif` constructions +# can be replaced with `case-when`. +# +# @example MinBranchesCount: 3 (default) +# # bad +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# # good +# case status +# when :active +# perform_action +# when :inactive, :hibernating +# check_timeout +# when :invalid +# report_invalid +# else +# final_action +# end +# @example MinBranchesCount: 4 +# # good +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#50 +class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBranchesCount + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#57 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#231 + def branch_conditions(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#249 + def class_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 + def collect_conditions(node, target, conditions); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#220 + def condition_from_binary_op(lhs, rhs, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#202 + def condition_from_equality_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#213 + def condition_from_include_or_cover_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#208 + def condition_from_match_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 + def condition_from_send_node(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#240 + def const_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#258 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#253 + def deparenthesize(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 + def find_target(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#136 + def find_target_in_equality_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#148 + def find_target_in_include_or_cover_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#154 + def find_target_in_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#121 + def find_target_in_send_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#274 + def regexp_with_named_captures?(node); end + + # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#263 + def regexp_with_working_captures?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#96 + def should_check?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#55 +RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the character literal ?x. +# Starting with Ruby 1.9 character literals are +# essentially one-character strings, so this syntax +# is mostly redundant at this point. +# +# ? character literal can be used to express meta and control character. +# That's a good use case of ? literal so it doesn't count it as an offense. +# +# @example +# # bad +# ?x +# +# # good +# 'x' +# +# # good - control & meta escapes +# ?\C-\M-d +# "\C-\M-d" # same as above +# +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#24 +class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#35 + def autocorrect(corrector, node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#53 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#30 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#49 + def opposite_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#28 +RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks the style of children definitions at classes and +# modules. Basically there are two different styles: +# +# The compact style is only forced for classes/modules with one child. +# +# @example EnforcedStyle: nested (default) +# # good +# # have each child on its own line +# class Foo +# class Bar +# end +# end +# @example EnforcedStyle: compact +# # good +# # combine definitions as much as possible +# class Foo::Bar +# end +# +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#33 +class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#42 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#48 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#89 + def add_trailing_end(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#170 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#159 + def check_compact_style(node, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#151 + def check_nested_style(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#141 + def check_style(node, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#94 + def compact_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#115 + def compact_identifier_name(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#100 + def compact_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#180 + def compact_node_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#105 + def compact_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#137 + def leading_spaces(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#176 + def needs_compacting?(body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#62 + def nest_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#54 + def nest_or_compact(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#120 + def remove_end(corrector, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#71 + def replace_namespace_keyword(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#80 + def split_on_double_colon(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#128 + def unindent(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#40 +RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#39 +RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) + +# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. +# +# @example EnforcedStyle: is_a? (default) +# # bad +# var.kind_of?(Date) +# var.kind_of?(Integer) +# +# # good +# var.is_a?(Date) +# var.is_a?(Integer) +# @example EnforcedStyle: kind_of? +# # bad +# var.is_a?(Time) +# var.is_a?(String) +# +# # good +# var.kind_of?(Time) +# var.kind_of?(String) +# +# source://rubocop//lib/rubocop/cop/style/class_check.rb#26 +class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#45 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#30 +RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#31 +RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Object#instance_of?` instead of class comparison +# for equality. +# `==`, `equal?`, and `eql?` custom method definitions are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# var.class == Date +# var.class.equal?(Date) +# var.class.eql?(Date) +# var.class.name == 'Date' +# +# # good +# var.instance_of?(Date) +# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) +# # good +# def ==(other) +# self.class == other.class && name == other.name +# end +# +# def equal?(other) +# self.class.equal?(other.class) && name.equal?(other.name) +# end +# +# def eql?(other) +# self.class.eql?(other.class) && name.eql?(other.name) +# end +# @example AllowedPatterns: [] (default) +# # bad +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# @example AllowedPatterns: ['eq'] +# # good +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52 +class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64 + def class_comparison_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92 + def class_name(class_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112 + def class_name_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128 + def offense_range(receiver_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116 + def require_cbase?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124 + def trim_string_quotes(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120 + def unable_to_determine_type?(class_node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61 +RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58 +RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60 +RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the class/module name instead of +# self, when defining class/module methods. +# +# @example +# # bad +# class SomeClass +# def SomeClass.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#23 +class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#41 + def check_defs(name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#26 +RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `def self.method_name` or `class << self` to define class methods. +# +# @example EnforcedStyle: def_self (default) +# # bad +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# def class_method +# # ... +# end +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# +# class << self +# attr_accessor :class_accessor +# end +# end +# +# # good - contains private method +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# private +# +# def private_class_method +# # ... +# end +# end +# end +# @example EnforcedStyle: self_class +# # bad +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# class << self +# def class_method +# # ... +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#61 +class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#81 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#71 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#95 + def all_methods_public?(sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#115 + def autocorrect_sclass(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#102 + def def_nodes(sclass_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#91 + def def_self_style?; end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#141 + def extract_def_from_sclass(def_node, sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#152 + def indentation_diff(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#137 + def sclass_only_has_methods?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#68 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#69 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) + +# Checks for uses of class variables. Offenses +# are signaled only on assignment to class variables to +# reduce the number of offenses that would be reported. +# +# You have to be careful when setting a value for a class +# variable; if a class has been inherited, changing the +# value of a class variable also affects the inheriting +# classes. This means that it's almost always better to +# use a class instance variable instead. +# +# @example +# # bad +# class A +# @@test = 10 +# end +# +# class A +# def self.test(name, value) +# class_variable_set("@@#{name}", value) +# end +# end +# +# class A; end +# A.class_variable_set(:@@test, 10) +# +# # good +# class A +# @test = 10 +# end +# +# class A +# def test +# @@test # you can access class variable without offense +# end +# end +# +# class A +# def self.test(name) +# class_variable_get("@@#{name}") # you can access without offense +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#48 +class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#52 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#56 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#49 +RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#50 +RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where custom logic on rejection nils from arrays +# and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. +# +# @example +# # bad +# array.reject(&:nil?) +# array.reject { |e| e.nil? } +# array.select { |e| !e.nil? } +# array.grep_v(nil) +# array.grep_v(NilClass) +# +# # good +# array.compact +# +# # bad +# hash.reject!(&:nil?) +# array.delete_if(&:nil?) +# hash.reject! { |k, v| v.nil? } +# array.delete_if { |e| e.nil? } +# hash.select! { |k, v| !v.nil? } +# +# # good +# hash.compact! +# @example AllowedReceivers: ['params'] +# # good +# params.reject(&:nil?) +# +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#44 +class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 + def grep_v_with_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 + def reject_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 + def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 + def select_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#129 + def good_method_name(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#137 + def range(begin_pos_node, end_pos_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#123 + def to_enum_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 +RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#51 +RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#52 +RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array) + +# Enforces the use of consistent method names +# from the Enumerable module. +# +# You can customize the mapping from undesired method to desired method. +# +# e.g. to use `detect` over `find`: +# +# Style/CollectionMethods: +# PreferredMethods: +# find: detect +# +# @example +# # These examples are based on the default mapping for `PreferredMethods`. +# +# # bad +# items.collect +# items.collect! +# items.collect_concat +# items.inject +# items.detect +# items.find_all +# items.member? +# +# # good +# items.map +# items.map! +# items.flat_map +# items.reduce +# items.find +# items.select +# items.include? +# +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43 +class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63 + def check_method_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72 + def implicit_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80 + def message(node); end + + # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead + # of a block. + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86 + def methods_accepting_symbol; end +end + +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 +RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) + +# Checks for methods invoked via the `::` operator instead +# of the `.` operator (like `FileUtils::rmdir` instead of `FileUtils.rmdir`). +# +# @example +# # bad +# Timeout::timeout(500) { do_something } +# FileUtils::rmdir(dir) +# Marshal::dump(obj) +# +# # good +# Timeout.timeout(500) { do_something } +# FileUtils.rmdir(dir) +# Marshal.dump(obj) +# +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#20 +class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#26 + def java_type_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#35 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#23 +RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) + +# Checks for class methods that are defined using the `::` +# operator instead of the `.` operator. +# +# @example +# # bad +# class Foo +# def self::bar +# end +# end +# +# # good +# class Foo +# def self.bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#22 +class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#27 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#25 +RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where multiple consecutive loops over the same data +# can be combined into a single loop. It is very likely that combining them +# will make the code more efficient and more concise. +# +# @example +# # bad +# def method +# items.each do |item| +# do_something(item) +# end +# +# items.each do |item| +# do_something_else(item) +# end +# end +# +# # good +# def method +# items.each do |item| +# do_something(item) +# do_something_else(item) +# end +# end +# +# # bad +# def method +# for item in items do +# do_something(item) +# end +# +# for item in items do +# do_something_else(item) +# end +# end +# +# # good +# def method +# for item in items do +# do_something(item) +# do_something_else(item) +# end +# end +# +# # good +# def method +# each_slice(2) { |slice| do_something(slice) } +# each_slice(3) { |slice| do_something(slice) } +# end +# +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 +class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 + def collection_looping_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + def combine_with_left_sibling(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + def correct_end_of_block(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 + def same_collection_looping_block?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + def same_collection_looping_for?(node, sibling); end +end + +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 +RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `` or %x around command literals. +# +# @example EnforcedStyle: backticks (default) +# # bad +# folders = %x(find . -type d).split +# +# # bad +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# +# # good +# folders = `find . -type d`.split +# +# # good +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# @example EnforcedStyle: mixed +# # bad +# folders = %x(find . -type d).split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = `find . -type d`.split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# @example EnforcedStyle: percent_x +# # bad +# folders = `find . -type d`.split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = %x(find . -type d).split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# @example AllowInnerBackticks: false (default) +# # If `false`, the cop will always recommend using `%x` if one or more +# # backticks are found in the command string. +# +# # bad +# `echo \`ls\`` +# +# # good +# %x(echo `ls`) +# @example AllowInnerBackticks: true +# # good +# `echo \`ls\`` +# +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 +class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#85 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#146 + def allow_inner_backticks?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#122 + def allowed_backtick_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#131 + def allowed_percent_x_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#109 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#159 + def backtick_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#97 + def check_backtick_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#103 + def check_percent_x_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#167 + def command_delimiter; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#150 + def contains_backtick?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#142 + def contains_disallowed_backtick?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#171 + def default_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#154 + def node_body(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#163 + def preferred_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#175 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#82 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#83 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) + +# Checks that comment annotation keywords are written according +# to guidelines. +# +# Annotation keywords can be specified by overriding the cop's `Keywords` +# configuration. Keywords are allowed to be single words or phrases. +# +# NOTE: With a multiline comment block (where each line is only a +# comment), only the first line will be able to register an offense, even +# if an annotation keyword starts another line. This is done to prevent +# incorrect registering of keywords (eg. `review`) inside a paragraph as an +# annotation. +# +# @example RequireColon: true (default) +# # bad +# # TODO make better +# +# # good +# # TODO: make better +# +# # bad +# # TODO:make better +# +# # good +# # TODO: make better +# +# # bad +# # fixme: does not work +# +# # good +# # FIXME: does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE: does not work +# @example RequireColon: false +# # bad +# # TODO: make better +# +# # good +# # TODO make better +# +# # bad +# # fixme does not work +# +# # good +# # FIXME does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE does not work +# +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 +class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#73 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#110 + def annotation_range(annotation); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#114 + def correct_offense(corrector, range, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#102 + def first_comment_line?(comments, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#106 + def inline_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#124 + def keywords; end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#87 + def register_offense(annotation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#120 + def requires_colon?; end +end + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#71 +RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#65 +RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#68 +RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) + +# Checks for comments put on the same line as some keywords. +# These keywords are: `class`, `module`, `def`, `begin`, `end`. +# +# Note that some comments +# are allowed. +# +# Autocorrection removes comments from `end` keyword and keeps comments +# for `class`, `module`, `def` and `begin` above the keyword. +# +# @example +# # bad +# if condition +# statement +# end # end if +# +# # bad +# class X # comment +# statement +# end +# +# # bad +# def x; end # comment +# +# # good +# if condition +# statement +# end +# +# # good +# class X # :nodoc: +# y +# end +# +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#45 +class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 + def offensive?(comment); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 + def register_offense(comment, matched_keyword); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 + def source_line(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#54 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#51 +RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 +RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 +RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 +RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) + +# Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. +# +# This cop supports autocorrection for `if/elsif/else` bad style only. +# Because `ArgumentError` occurs if the minimum and maximum of `clamp` arguments are reversed. +# When these are variables, it is not possible to determine which is the minimum and maximum: +# +# [source,ruby] +# ---- +# [1, [2, 3].max].min # => 1 +# 1.clamp(3, 1) # => min argument must be smaller than max argument (ArgumentError) +# ---- +# +# @example +# +# # bad +# [[x, low].max, high].min +# +# # bad +# if x < low +# low +# elsif high < x +# high +# else +# x +# end +# +# # good +# x.clamp(low, high) +# +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#35 +class RuboCop::Cop::Style::ComparableClamp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#61 + def array_min_max?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#47 + def if_elsif_else_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#78 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#100 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#108 + def autocorrect(corrector, node, prefer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#117 + def min_condition?(if_condition, else_body); end +end + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#42 +RuboCop::Cop::Style::ComparableClamp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#43 +RuboCop::Cop::Style::ComparableClamp::MSG_MIN_MAX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#44 +RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Array#push(item)` instead of `Array#concat([item])` +# to avoid redundant array literals. +# +# @example +# +# # bad +# list.concat([foo]) +# list.concat([bar, baz]) +# list.concat([qux, quux], [corge]) +# +# # good +# list.push(foo) +# list.push(bar, baz) +# list.push(qux, quux, corge) +# +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#25 +class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#70 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#87 + def percent_literals_includes_only_basic_literals?(node); end + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#74 + def preferred_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#28 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#29 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#31 +RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for `if` and `case` statements where each branch is used for +# both the assignment and comparison of the same variable +# when using the return of the condition can be used instead. +# +# @example EnforcedStyle: assign_to_condition (default) +# # bad +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# +# # good +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# @example EnforcedStyle: assign_inside_condition +# # bad +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# +# # good +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#210 +class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::ConditionalAssignmentHelper + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # The shovel operator `<<` does not have its own type. It is a `send` + # type. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#228 + def assignment_type?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#309 + def candidate_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#264 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#274 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#250 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#244 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 + def allowed_single_line?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#386 + def allowed_statements?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 + def allowed_ternary?(assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#319 + def assignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#363 + def assignment_types_match?(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#378 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#304 + def candidate_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#286 + def check_assignment_to_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#369 + def check_node(node, branches); end + + # If `Layout/LineLength` is enabled, we do not want to introduce an + # offense by autocorrecting this cop. Find the max configured line + # length. Find the longest line of condition. Remove the assignment + # from lines that contain the offending assignment because after + # correcting, this will not be on the line anymore. Check if the length + # of the longest line + the length of the corrected assignment is + # greater than the max configured line length + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#402 + def correction_exceeds_line_limit?(node, branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#433 + def include_ternary?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#356 + def lhs_all_match?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#421 + def line_length_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#414 + def longest_line(node, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#410 + def longest_line_exceeds_line_limit?(node, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#425 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#340 + def move_assignment_inside_condition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#330 + def move_assignment_outside_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#429 + def single_line_conditions_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#352 + def ternary_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#221 +RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#220 +RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#222 +RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 +RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#223 +RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 +RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Helper module to provide common methods to classes needed for the +# ConditionalAssignment Cop. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#8 +module RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#64 + def end_with_eq?(sym); end + + # `elsif` branches show up in the `node` as an `else`. We need + # to recursively iterate over all `else` branches and consider all + # but the last `node` an `elsif` branch and consider the last `node` + # the actual `else` branch. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#20 + def expand_elses(branch); end + + # `when` nodes contain the entire branch including the condition. + # We only need the contents of the branch, not the condition. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 + def expand_when_branches(when_branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#55 + def indent(cop, source); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#37 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 + def tail(branch); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#109 + def assignment_rhs_exist?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#70 + def expand_elsif(node, elsif_branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#96 + def lhs_for_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#83 + def lhs_for_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#105 + def setter_method?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#13 +RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#12 +RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#11 +RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#14 +RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) + +# Helper module to provide common methods to ConditionalAssignment +# correctors +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 +module RuboCop::Cop::Style::ConditionalCorrectorHelper + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 + def assignment(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 + def correct_branches(corrector, branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 + def correct_if_branches(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 + def remove_whitespace_in_branches(corrector, branch, condition, column); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 + def replace_branch_assignment(corrector, branch); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 + def white_space_range(node, column); end +end + +# Checks that constants defined in classes and modules have +# an explicit visibility declaration. By default, Ruby makes all class- +# and module constants public, which litters the public API of the +# class or module. Explicitly declaring a visibility makes intent more +# clear, and prevents outside actors from touching private state. +# +# @example +# +# # bad +# class Foo +# BAR = 42 +# BAZ = 43 +# end +# +# # good +# class Foo +# BAR = 42 +# private_constant :BAR +# +# BAZ = 43 +# public_constant :BAZ +# end +# @example IgnoreModules: false (default) +# # bad +# class Foo +# MyClass = Struct.new() +# end +# +# # good +# class Foo +# MyClass = Struct.new() +# public_constant :MyClass +# end +# @example IgnoreModules: true +# # good +# class Foo +# MyClass = Struct.new() +# end +# +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#47 +class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#51 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#96 + def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#76 + def class_or_module_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#62 + def ignore_modules?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#100 + def match_name?(name, constant_name); end + + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#70 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#66 + def module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 + def visibility_declaration?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48 +RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#21 +class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 + def autocorrect(corrector); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 + def autocorrect_notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 + def encoding_token?(processed_source, token_index); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 + def insert_notice_before(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 + def notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 + def notice_found?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 + def shebang_token?(processed_source, token_index); end + + # @raise [Warning] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 + def verify_autocorrect_notice!; end +end + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#26 +RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#25 +RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) + +# Checks for inheritance from `Data.define` to avoid creating the anonymous parent class. +# +# @example +# # bad +# class Person < Data.define(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# # good +# Person = Data.define(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#26 +class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#48 + def data_define?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#36 + def on_class(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#55 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#65 + def range_for_empty_class_body(class_node, data_define); end +end + +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#31 +RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of the `DateTime` class over the +# `Time` class. This cop is disabled by default since these classes, +# although highly overlapping, have particularities that make them not +# replaceable in certain situations when dealing with multiple timezones +# and/or DST. +# +# @example +# +# # bad - uses `DateTime` for current time +# DateTime.now +# +# # good - uses `Time` for current time +# Time.now +# +# # bad - uses `DateTime` for modern date +# DateTime.iso8601('2016-06-29') +# +# # good - uses `Time` for modern date +# Time.iso8601('2016-06-29') +# +# # good - uses `DateTime` with start argument for historical date +# DateTime.iso8601('1751-04-23', Date::ENGLAND) +# @example AllowCoercion: false (default) +# +# # bad - coerces to `DateTime` +# something.to_datetime +# +# # good - coerces to `Time` +# something.to_time +# @example AllowCoercion: true +# +# # good +# something.to_datetime +# +# # good +# something.to_time +# +# source://rubocop//lib/rubocop/cop/style/date_time.rb#49 +class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#56 + def date_time?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 + def historic_date?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#66 + def to_datetime?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#86 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/date_time.rb#82 + def disallow_coercion?; end +end + +# source://rubocop//lib/rubocop/cop/style/date_time.rb#52 +RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/date_time.rb#53 +RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses in the definition of a method, +# that does not take any arguments. Both instance and +# class/singleton methods are checked. +# +# @example +# +# # bad +# def foo() +# do_something +# end +# +# # good +# def foo +# do_something +# end +# +# # bad +# def foo() = do_something +# +# # good +# def foo = do_something +# +# # good (without parentheses it's a syntax error) +# def foo() do_something end +# +# # bad +# def Baz.foo() +# do_something +# end +# +# # good +# def Baz.foo +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40 +class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 +RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where the `#\_\_dir\_\_` method can replace more +# complex constructs to retrieve a canonicalized absolute path to the +# current file. +# +# @example +# # bad +# path = File.expand_path(File.dirname(__FILE__)) +# +# # bad +# path = File.dirname(File.realpath(__FILE__)) +# +# # good +# path = __dir__ +# +# source://rubocop//lib/rubocop/cop/style/dir.rb#19 +class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir.rb#29 + def dir_replacement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir.rb#34 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/dir.rb#44 + def file_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir.rb#25 +RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir.rb#26 +RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty. +# +# @example +# # bad +# Dir.entries('path/to/dir').size == 2 +# Dir.children('path/to/dir').empty? +# Dir.children('path/to/dir').size == 0 +# Dir.each_child('path/to/dir').none? +# +# # good +# Dir.empty?('path/to/dir') +# +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#18 +class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#22 +RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#23 +RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects comments to enable/disable RuboCop. +# This is useful if want to make sure that every RuboCop error gets fixed +# and not quickly disabled with a comment. +# +# Specific cops can be allowed with the `AllowedCops` configuration. Note that +# +# @example +# # bad +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# # good +# def foo +# end +# @example AllowedCops: [Metrics/AbcSize] +# # good +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#33 +class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#40 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#77 + def allowed_cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#81 + def any_cops_allowed?; end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#72 + def directive_cops(comment); end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#53 + def register_offense(comment, directive_cops, disallowed_cops); end +end + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#37 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#38 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) + +# When using `class_eval` (or other `eval`) with string interpolation, +# add a comment block showing its appearance if interpolated (a practice used in Rails code). +# +# @example +# # from activesupport/lib/active_support/core_ext/string/output_safety.rb +# +# # bad +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) +# to_str.#{unsafe_method}(*params, &block) +# end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# end +# end +# +# # good, inline comments in heredoc +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) # def capitalize(*params, &block) +# to_str.#{unsafe_method}(*params, &block) # to_str.capitalize(*params, &block) +# end # end +# +# def #{unsafe_method}!(*params) # def capitalize!(*params) +# @dirty = true # @dirty = true +# super # super +# end # end +# EOT +# end +# end +# +# # good, block comments in heredoc +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# +# # good, block comments before heredoc +# class_eval( +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# ) +# +# # bad - interpolated string without comment +# class_eval("def #{unsafe_method}!(*params); end") +# +# # good - with inline comment or replace it with block comment using heredoc +# class_eval("def #{unsafe_method}!(*params); end # def capitalize!(*params); end") +# +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#77 +class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#84 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#107 + def comment_block_docs?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#147 + def comment_regexp(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#126 + def heredoc_comment_blocks(heredoc_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#100 + def inline_comment_docs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#96 + def interpolated?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#136 + def merge_adjacent_comments(line, index, hash); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#117 + def preceding_comment_blocks(node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#156 + def source_to_regexp(source); end +end + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#78 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#79 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#80 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#82 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for missing top-level documentation of classes and +# modules. Classes with no body are exempt from the check and so are +# namespace modules - modules that have nothing in their bodies except +# classes, other modules, constant definitions or constant visibility +# declarations. +# +# The documentation requirement is annulled if the class or module has +# same for all its children. +# +# @example +# # bad +# class Person +# # ... +# end +# +# module Math +# end +# +# # good +# # Description/Explanation of Person class +# class Person +# # ... +# end +# +# # allowed +# # Class without body +# class Person +# end +# +# # Namespace - A namespace can be a class or a module +# # Containing a class +# module Namespace +# # Description/Explanation of Person class +# class Person +# # ... +# end +# end +# +# # Containing constant visibility declaration +# module Namespace +# class Private +# end +# +# private_constant :Private +# end +# +# # Containing constant definition +# module Namespace +# Public = Class.new +# end +# +# # Macro calls +# module Namespace +# extend Foo +# end +# @example AllowedConstants: ['ClassMethods'] +# +# # good +# module A +# module ClassMethods +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation.rb#72 +class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DocumentationComment + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#79 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#85 + def constant_visibility_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#90 + def include_statement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#94 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#100 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#82 + def outer_module(param0); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#174 + def allowed_constants; end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#106 + def check(node, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#147 + def compact_namespace?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#143 + def constant_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#139 + def constant_declaration?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#178 + def identifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#123 + def include_statement_only?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#129 + def namespace?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#170 + def nodoc(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#166 + def nodoc?(comment, require_all: T.unsafe(nil)); end + + # Note: How end-of-line comments are associated with code changed in + # parser-2.2.0.4. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#156 + def nodoc_comment?(node, require_all: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#118 + def nodoc_self_or_outer_module?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#186 + def qualify_const(node); end +end + +# source://rubocop//lib/rubocop/cop/style/documentation.rb#76 +RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for missing documentation comment for public methods. +# It can optionally be configured to also require documentation for +# non-public methods. +# +# NOTE: This cop allows `initialize` method because `initialize` is +# a special method called from `new`. In some programming languages +# they are called constructor to distinguish it from method. +# +# @example +# +# # bad +# +# class Foo +# def bar +# puts baz +# end +# end +# +# module Foo +# def bar +# puts baz +# end +# end +# +# def foo.bar +# puts baz +# end +# +# # good +# +# class Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# module Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# # Documentation +# def foo.bar +# puts baz +# end +# @example RequireForNonPublicMethods: false (default) +# # good +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# @example RequireForNonPublicMethods: true +# # bad +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# +# # good +# class Foo +# protected +# # Documentation +# def do_something +# end +# end +# +# class Foo +# private +# # Documentation +# def do_something +# end +# end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end +# +# def respond_to_missing?(symbol, include_private) +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 +class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DocumentationComment + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 + def modifier_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 + def method_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 + def require_for_non_public_methods?; end +end + +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 +RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) + +# Detects double disable comments on one line. This is mostly to catch +# automatically generated comments that need to be regenerated. +# +# @example +# # bad +# def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize +# end +# +# # good +# # rubocop:disable Metrics/AbcSize +# def f # rubocop:disable Style/For +# end +# # rubocop:enable Metrics/AbcSize +# +# # if both fit on one line +# def f # rubocop:disable Style/For, Metrics/AbcSize +# end +# +# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#27 +class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#34 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#32 +RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of double negation (`!!`) to convert something to a boolean value. +# +# When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts +# that use boolean as a return value. When using `EnforcedStyle: forbidden`, double negation +# should be forbidden always. +# +# NOTE: when `something` is a boolean value +# `!!something` and `!something.nil?` are not the same thing. +# As you're unlikely to write code that can accept values of any type +# this is rarely a problem in practice. +# +# @example +# # bad +# !!something +# +# # good +# !something.nil? +# @example EnforcedStyle: allowed_in_returns (default) +# # good +# def foo? +# !!return_value +# end +# +# define_method :foo? do +# !!return_value +# end +# +# define_singleton_method :foo? do +# !!return_value +# end +# @example EnforcedStyle: forbidden +# # bad +# def foo? +# !!return_value +# end +# +# define_method :foo? do +# !!return_value +# end +# +# define_singleton_method :foo? do +# !!return_value +# end +# +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#61 +class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#69 + def double_negative?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#71 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#84 + def allowed_in_returns?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#111 + def define_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#138 + def double_negative_condition_return_value?(node, last_child, conditional_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#88 + def end_of_method_definition?(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#120 + def find_conditional_node_from_ascendant(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#103 + def find_def_node_from_ascendant(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#127 + def find_last_child(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#147 + def find_parent_not_enumerable(node); end +end + +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#65 +RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#66 +RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for loops which iterate a constant number of times, +# using a Range literal and `#each`. This can be done more readably using +# `Integer#times`. +# +# This check only applies if the block takes no parameters. +# +# @example +# # bad +# (1..5).each { } +# +# # good +# 5.times { } +# +# # bad +# (0...10).each {} +# +# # good +# 10.times {} +# +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 +class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 + def each_range(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#64 + def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#76 + def each_range_without_block_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 + def offending?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 +RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) + +# Looks for inject / reduce calls where the passed in object is +# returned at the end and so could be replaced by each_with_object without +# the need to return the object at the end. +# +# However, we can't replace with each_with_object if the accumulator +# parameter is assigned to within the block. +# +# @example +# # bad +# [1, 2].inject({}) { |a, e| a[e] = e; a } +# +# # good +# [1, 2].each_with_object({}) { |e, a| a[e] = e } +# +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#19 +class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#60 + def each_with_object_block_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#65 + def each_with_object_numblock_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#26 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#43 + def on_numblock(node); end + + private + + # if the accumulator parameter is assigned to in the block, + # then we can't convert to each_with_object + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#102 + def accumulator_param_assigned_to?(body, args); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#69 + def autocorrect_block(corrector, node, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#84 + def autocorrect_numblock(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#121 + def first_argument_returned?(args, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#114 + def return_value(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#129 + def return_value_occupies_whole_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#96 + def simple_method_arg?(method_arg); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#133 + def whole_line_expression(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#24 +RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#23 +RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) + +# Checks for pipes for empty block parameters. Pipes for empty +# block parameters do not cause syntax errors, but they are redundant. +# +# @example +# # bad +# a do || +# do_something +# end +# +# # bad +# a { || do_something } +# +# # good +# a do +# end +# +# # good +# a { do_something } +# +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#24 +class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#31 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#38 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#29 +RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for case statements with an empty condition. +# +# @example +# +# # bad: +# case +# when x == 0 +# puts 'x is 0' +# when y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: +# if x == 0 +# puts 'x is 0' +# elsif y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: (the case condition node is not empty) +# case n +# when 0 +# puts 'zero' +# when 1 +# puts 'one' +# else +# puts 'more' +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#38 +class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 + def on_case(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 + def autocorrect(corrector, case_node); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 + def correct_case_when(corrector, case_node, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 + def correct_when_conditions(corrector, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 + def keep_first_when_comment(case_range, corrector); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 + def replace_then_with_line_break(corrector, conditions, when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 +RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for empty else-clauses, possibly including comments and/or an +# explicit `nil` depending on the EnforcedStyle. +# +# @example EnforcedStyle: both (default) +# # warn on empty else and else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: empty +# # warn only on empty else +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: nil +# # warn on else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example AllowComments: false (default) +# +# # bad +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # bad +# if condition +# statement +# else +# # something comment +# end +# @example AllowComments: true +# +# # good +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # good +# if condition +# statement +# else +# # something comment +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 +class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#139 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#135 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#172 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#194 + def autocorrect_forbidden?(type); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#187 + def base_node(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 + def comment_in_else?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 + def empty_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 + def empty_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#198 + def missing_else_style; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 + def nil_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#152 + def nil_style?; end +end + +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#133 +RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for using empty heredoc to reduce redundancy. +# +# @example +# +# # bad +# <<~EOS +# EOS +# +# <<-EOS +# EOS +# +# < () { do_something } +# +# # good +# -> { do_something } +# +# # good +# -> (arg) { do_something(arg) } +# +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#19 +class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#26 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#35 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#24 +RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a method, the result of which +# would be a literal, like an empty array, hash, or string. +# +# @example +# # bad +# a = Array.new +# a = Array[] +# h = Hash.new +# h = Hash[] +# s = String.new +# +# # good +# a = [] +# h = {} +# s = '' +# +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 +class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 + def array_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 + def array_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 + def array_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + def hash_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 + def hash_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + def str_node(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + def first_argument_unparenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 + def frozen_strings?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 + def offense_array_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 + def offense_hash_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 + def offense_message(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 + def replacement_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 +RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 +RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 +RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) + +# Checks for the formatting of empty method definitions. +# By default it enforces empty method definitions to go on a single +# line (compact style), but it can be configured to enforce the `end` +# to go on its own line (expanded style). +# +# NOTE: A method definition is not considered empty if it contains +# comments. +# +# NOTE: Autocorrection will not be applied for the `compact` style +# if the resulting code is longer than the `Max` configuration for +# `Layout/LineLength`, but an offense will still be registered. +# +# @example EnforcedStyle: compact (default) +# # bad +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# # good +# def foo(bar); end +# +# def foo(bar) +# # baz +# end +# +# def self.foo(bar); end +# @example EnforcedStyle: expanded +# # bad +# def foo(bar); end +# +# def self.foo(bar); end +# +# # good +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#47 +class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#95 + def compact?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#103 + def compact_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#73 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#77 + def corrected(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#99 + def expanded?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#107 + def expanded_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#89 + def joint(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#111 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#69 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#51 +RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#52 +RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) + +# Checks ensures source files have no utf-8 encoding comments. +# +# @example +# # bad +# # encoding: UTF-8 +# # coding: UTF-8 +# # -*- coding: UTF-8 -*- +# +# source://rubocop//lib/rubocop/cop/style/encoding.rb#12 +class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#20 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#32 + def comments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/encoding.rb#43 + def offense?(comment); end + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#47 + def register_offense(line_number, comment); end +end + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#17 +RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#16 +RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#18 +RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for END blocks. +# +# @example +# # bad +# END { puts 'Goodbye!' } +# +# # good +# at_exit { puts 'Goodbye!' } +# +# source://rubocop//lib/rubocop/cop/style/end_block.rb#15 +class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/end_block.rb#20 + def on_postexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/end_block.rb#18 +RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for endless methods. +# +# It can enforce either the use of endless methods definitions +# for single-lined method bodies, or disallow endless methods. +# +# Other method definition types are not considered by this cop. +# +# The supported styles are: +# +# * allow_single_line (default) - only single line endless method definitions are allowed. +# * allow_always - all endless method definitions are allowed. +# * disallow - all endless method definitions are disallowed. +# +# NOTE: Incorrect endless method definitions will always be +# corrected to a multi-line definition. +# +# @example EnforcedStyle: allow_single_line (default) +# # good +# def my_method() = x +# +# # bad, multi-line endless method +# def my_method() = x.foo +# .bar +# .baz +# @example EnforcedStyle: allow_always +# # good +# def my_method() = x +# +# # good +# def my_method() = x.foo +# .bar +# .baz +# @example EnforcedStyle: disallow +# # bad +# def my_method() = x +# +# # bad +# def my_method() = x.foo +# .bar +# .baz +# +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#49 +class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#60 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#95 + def arguments(node, missing = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#85 + def correct_to_multiline(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#70 + def handle_allow_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#79 + def handle_disallow_style(node); end +end + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#56 +RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#57 +RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#58 +RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of `ENV['HOME']`. If `nil` is used as +# the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. +# +# @example +# +# # bad +# ENV['HOME'] +# ENV.fetch('HOME', nil) +# +# # good +# Dir.home +# +# # good +# ENV.fetch('HOME', default) +# +# source://rubocop//lib/rubocop/cop/style/env_home.rb#31 +class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#38 + def env_home?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#45 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#34 +RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#35 +RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures that eval methods (`eval`, `instance_eval`, `class_eval` +# and `module_eval`) are given filename and line number values (`\_\_FILE\_\_` +# and `\_\_LINE\_\_`). This data is used to ensure that any errors raised +# within the evaluated code will be given the correct identification +# in a backtrace. +# +# The cop also checks that the line number given relative to `\_\_LINE\_\_` is +# correct. +# +# This cop will autocorrect incorrect or missing filename and line number +# values. However, if `eval` is called without a binding argument, the cop +# will not attempt to automatically add a binding, or add filename and +# line values. +# +# NOTE: This cop works only when a string literal is given as a code string. +# No offense is reported if a string variable is given as below: +# +# [source,ruby] +# ---- +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code # not checked. +# ---- +# +# @example +# # bad +# eval <<-RUBY +# def do_something +# end +# RUBY +# +# # bad +# C.class_eval <<-RUBY +# def do_something +# end +# RUBY +# +# # good +# eval <<-RUBY, binding, __FILE__, __LINE__ + 1 +# def do_something +# end +# RUBY +# +# # good +# C.class_eval <<-RUBY, __FILE__, __LINE__ + 1 +# def do_something +# end +# RUBY +# +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 +class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 + def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 + def valid_eval_receiver?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 + def add_offense_for_different_line(node, line_node, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 + def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + def add_offense_for_missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 + def add_offense_for_missing_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + def add_offense_for_same_line(node, line_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 + def check_file(node, file_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 + def check_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 + def check_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 + def expected_line(sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 + def file_and_line(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 + def line_difference(line_node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 + def missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 + def register_offense(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 + def special_file_keyword?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 + def special_line_keyword?(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 + def string_first_line(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 + def with_binding?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 +RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `Integer#even?` or `Integer#odd?` +# can be used. +# +# @example +# +# # bad +# if x % 2 == 0 +# end +# +# # good +# if x.even? +# end +# +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#18 +class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#25 + def even_odd_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#45 + def replacement_method(arg, method); end +end + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#21 +RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 +RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for exact regexp match inside Regexp literals. +# +# @example +# +# # bad +# string =~ /\Astring\z/ +# string === /\Astring\z/ +# string.match(/\Astring\z/) +# string.match?(/\Astring\z/) +# +# # good +# string == 'string' +# +# # bad +# string !~ /\Astring\z/ +# +# # good +# string != 'string' +# +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25 +class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32 + def exact_regexp_match(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57 + def exact_match_pattern?(parsed_regexp); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64 + def new_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28 +RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29 +RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of the `File.expand_path` arguments. +# Likewise, it also checks for the `Pathname.new` argument. +# +# Contrastive bad case and good case are alternately shown in +# the following examples. +# +# @example +# # bad +# File.expand_path('..', __FILE__) +# +# # good +# File.expand_path(__dir__) +# +# # bad +# File.expand_path('../..', __FILE__) +# +# # good +# File.expand_path('..', __dir__) +# +# # bad +# File.expand_path('.', __FILE__) +# +# # good +# File.expand_path(__FILE__) +# +# # bad +# Pathname(__FILE__).parent.expand_path +# +# # good +# Pathname(__dir__).expand_path +# +# # bad +# Pathname.new(__FILE__).parent.expand_path +# +# # good +# Pathname.new(__dir__).expand_path +# +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#43 +class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#58 + def file_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#74 + def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#66 + def pathname_parent_expand_path(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#189 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#100 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#135 + def autocorrect_expand_path(corrector, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#162 + def depth(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#113 + def inspect_offense_for_expand_path(node, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#168 + def parent_path(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#182 + def remove_parent_method(corrector, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#155 + def strip_surrounded_quotes!(path_string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#109 + def unrecommended_argument?(default_dir); end +end + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#47 +RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#49 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#51 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#55 +RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of explicit block argument to avoid writing +# block literal that just passes its arguments to another block. +# +# NOTE: This cop only registers an offense if the block args match the +# yield args exactly. +# +# @example +# # bad +# def with_tmp_dir +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir) { |dir| yield dir } # block just passes arguments +# end +# end +# +# # bad +# def nine_times +# 9.times { yield } +# end +# +# # good +# def with_tmp_dir(&block) +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir, &block) +# end +# end +# +# with_tmp_dir do |dir| +# puts "dir is accessible as a parameter and pwd is set: #{dir}" +# end +# +# # good +# def nine_times(&block) +# 9.times(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#41 +class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [ExplicitBlockArgument] a new instance of ExplicitBlockArgument + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#57 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#62 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#49 + def yielding_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 + def add_block_argument(node, corrector, block_name); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#147 + def block_body_range(block_node, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 + def call_like?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#137 + def correct_call_node(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#120 + def empty_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#87 + def extract_block_name(def_node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#129 + def insert_argument(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#95 + def yielding_arguments?(block_args, yield_args); end + + class << self + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#53 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#45 +RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) + +# Enforces consistency when using exponential notation +# for numbers in the code (eg 1.2e4). Different styles are supported: +# +# * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# * `engineering` which enforces the exponent to be a multiple of 3 and the mantissa +# to be between 0.1 (inclusive) and 10 (exclusive). +# * `integral` which enforces the mantissa to always be a whole number without +# trailing zeroes. +# +# @example EnforcedStyle: scientific (default) +# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# +# # bad +# 10e6 +# 0.3e4 +# 11.7e5 +# 3.14e0 +# +# # good +# 1e7 +# 3e3 +# 1.17e6 +# 3.14 +# @example EnforcedStyle: engineering +# # Enforces using multiple of 3 exponents, +# # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) +# +# # bad +# 3.2e7 +# 0.1e5 +# 12e5 +# 1232e6 +# +# # good +# 32e6 +# 10e3 +# 1.2e6 +# 1.232e9 +# @example EnforcedStyle: integral +# # Enforces the mantissa to have no decimal part and no +# # trailing zeroes. +# +# # bad +# 3.2e7 +# 0.1e5 +# 120e4 +# +# # good +# 32e6 +# 1e4 +# 12e5 +# +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 +class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#68 + def on_float(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#79 + def engineering?(node); end + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#90 + def integral(node); end + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#110 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#95 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#74 + def scientific?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#62 +RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Suggests `ENV.fetch` for the replacement of `ENV[]`. +# `ENV[]` silently fails and returns `nil` when the environment variable is unset, +# which may cause unexpected behaviors when the developer forgets to set it. +# On the other hand, `ENV.fetch` raises KeyError or returns the explicitly +# specified default value. +# +# @example +# # bad +# ENV['X'] +# x = ENV['X'] +# +# # good +# ENV.fetch('X') +# x = ENV.fetch('X') +# +# # also good +# !ENV['X'] +# ENV['X'].some_method # (e.g. `.nil?`) +# +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#25 +class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#31 + def env_with_bracket?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#35 + def on_send(node); end + + private + + # The following are allowed cases: + # + # - Used as a flag (e.g., `if ENV['X']` or `!ENV['X']`) because + # it simply checks whether the variable is set. + # - Receiving a message with dot syntax, e.g. `ENV['X'].nil?`. + # - `ENV['key']` assigned by logical AND/OR assignment. + # - `ENV['key']` is the LHS of a `||`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#105 + def allowable_use?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#48 + def allowed_var?(node); end + + # The following are allowed cases: + # + # - `ENV['key']` is a receiver of `||=`, e.g. `ENV['X'] ||= y`. + # - `ENV['key']` is a receiver of `&&=`, e.g. `ENV['X'] &&= y`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#113 + def assigned?(node); end + + # Check if the node is a receiver and receives a message with dot syntax. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#89 + def message_chained_with_dot?(node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#126 + def new_code(name_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#84 + def offensive?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#120 + def or_lhs?(node); end + + # Avoid offending in the following cases: + # `ENV['key'] if ENV['key'] = x` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#80 + def partial_matched?(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#53 + def used_as_flag?(node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#60 + def used_if_condition_in_body(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#69 + def used_in_condition?(node, condition); end +end + +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#28 +RuboCop::Cop::Style::FetchEnvVar::MSG = T.let(T.unsafe(nil), String) + +# Prefer to use `File.empty?('path/to/file')` when checking if a file is empty. +# +# @example +# # bad +# File.zero?('path/to/file') +# File.size('path/to/file') == 0 +# File.size('path/to/file') >= 0 +# File.size('path/to/file').zero? +# File.read('path/to/file').empty? +# File.binread('path/to/file') == '' +# FileTest.zero?('path/to/file') +# +# # good +# File.empty?('path/to/file') +# FileTest.empty?('path/to/file') +# +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#27 +class RuboCop::Cop::Style::FileEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#37 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#49 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#62 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#31 +RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 +RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)read` convenience methods. +# +# @example +# # bad - text mode +# File.open(filename).read +# File.open(filename, &:read) +# File.open(filename) { |f| f.read } +# File.open(filename) do |f| +# f.read +# end +# File.open(filename, 'r').read +# File.open(filename, 'r', &:read) +# File.open(filename, 'r') do |f| +# f.read +# end +# +# # good +# File.read(filename) +# +# # bad - binary mode +# File.open(filename, 'rb').read +# File.open(filename, 'rb', &:read) +# File.open(filename, 'rb') do |f| +# f.read +# end +# +# # good +# File.binread(filename) +# +# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 +class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 + def block_read?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 + def send_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 + def evidence(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 + def file_open_read?(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 + def read_method(mode); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 + def read_node?(node, block_pass); end +end + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 +RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 +RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 +RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)write` convenience methods. +# +# NOTE: There are different method signatures between `File.write` (class method) +# and `File#write` (instance method). The following case will be allowed because +# static analysis does not know the contents of the splat argument: +# +# [source,ruby] +# ---- +# File.open(filename, 'w') do |f| +# f.write(*objects) +# end +# ---- +# +# @example +# # bad - text mode +# File.open(filename, 'w').write(content) +# File.open(filename, 'w') do |f| +# f.write(content) +# end +# +# # good +# File.write(filename, content) +# +# # bad - binary mode +# File.open(filename, 'wb').write(content) +# File.open(filename, 'wb') do |f| +# f.write(content) +# end +# +# # good +# File.binwrite(filename, content) +# +# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 +class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 + def block_write?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 + def evidence(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 + def send_write?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # @yield [content] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 + def file_open_write?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 + def heredoc?(write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 + def heredoc_range(first_argument); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 + def replacement(mode, filename, content, write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 + def write_method(mode); end +end + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 +RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 +RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 +RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) + +# Checks for division with integers coerced to floats. +# It is recommended to either always use `fdiv` or coerce one side only. +# This cop also provides other options for code consistency. +# +# @example EnforcedStyle: single_coerce (default) +# # bad +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# a / b.to_f +# @example EnforcedStyle: left_coerce +# # bad +# a / b.to_f +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# @example EnforcedStyle: right_coerce +# # bad +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a / b.to_f +# @example EnforcedStyle: fdiv +# # bad +# a / b.to_f +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a.fdiv(b) +# +# source://rubocop//lib/rubocop/cop/style/float_division.rb#53 +class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#79 + def any_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#75 + def both_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#71 + def left_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#83 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#67 + def right_coerce?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#121 + def add_to_f_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#130 + def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#141 + def extract_receiver_source(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#117 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/float_division.rb#102 + def offense_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#125 + def remove_to_f_method(corrector, send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#57 +RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#64 +RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of the `for` keyword or `each` method. The +# preferred alternative is set in the EnforcedStyle configuration +# parameter. An `each` call with a block on a single line is always +# allowed. +# +# @example EnforcedStyle: each (default) +# # bad +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# # good +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# @example EnforcedStyle: for +# # bad +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# +# # good +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/for.rb#45 +class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/for.rb#65 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#54 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#65 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/for.rb#84 + def suspect_enumerable?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/for.rb#50 +RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/for.rb#51 +RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/for.rb#52 +RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) + +# Enforces the use of a single string formatting utility. +# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`. +# +# The detection of `String#%` cannot be implemented in a reliable +# manner for all cases, so only two scenarios are considered - +# if the first argument is a string literal and if the second +# argument is an array literal. +# +# Autocorrection will be applied when using argument is a literal or known built-in conversion +# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables, +# provided that their return value is not an array. For example, when using `to_s`, +# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility: +# +# [source,ruby] +# ---- +# '%s' % [1, 2, 3] #=> '1' +# format('%s', [1, 2, 3]) #=> '[1, 2, 3]' +# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]' +# ---- +# +# @example EnforcedStyle: format (default) +# # bad +# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' +# +# # good +# puts format('%10s', 'foo') +# @example EnforcedStyle: sprintf +# # bad +# puts format('%10s', 'foo') +# puts '%10s' % 'foo' +# +# # good +# puts sprintf('%10s', 'foo') +# @example EnforcedStyle: percent +# # bad +# puts format('%10s', 'foo') +# puts sprintf('%10s', 'foo') +# +# # good +# puts '%10s' % 'foo' +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#50 +class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#61 + def formatter(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#70 + def variable_argument?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#102 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#118 + def autocorrect_from_percent(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#132 + def autocorrect_to_percent(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string.rb#88 + def autocorrectable?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#145 + def format_single_parameter(arg); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#94 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 + def method_name(style_name); end +end + +# Known conversion methods whose return value is not an array. +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#58 +RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#54 +RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#55 +RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use a consistent style for named format string tokens. +# +# NOTE: `unannotated` style cop only works for strings +# which are passed as arguments to those methods: +# `printf`, `sprintf`, `format`, `%`. +# The reason is that _unannotated_ format is very similar +# to encoded URLs or Date/Time formatting strings. +# +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. +# +# It is allowed to contain unannotated token +# if the number of them is less than or equals to +# `MaxUnannotatedPlaceholdersAllowed`. +# +# @example AllowedPatterns: ['redirect'] +# +# # good +# redirect('foo/%{bar_id}') +# @example EnforcedStyle: template +# +# # bad +# format('%s', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%{greeting}', greeting: 'Hello') +# @example EnforcedStyle: unannotated +# +# # bad +# format('%s', greeting: 'Hello') +# format('%{greeting}', greeting: 'Hello') +# +# # good +# format('%s', 'Hello') +# @example MaxUnannotatedPlaceholdersAllowed: 0 +# +# # bad +# format('%06d', 10) +# format('%s %s.', 'Hello', 'world') +# +# # good +# format('%06d', number: 10) +# @example MaxUnannotatedPlaceholdersAllowed: 1 (default) +# +# # bad +# format('%s %s.', 'Hello', 'world') +# +# # good +# format('%06d', 10) +# @example AllowedMethods: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example AllowedMethods: [redirect] +# +# # good +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%s', greeting: 'Hello') +# +# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 +class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#106 + def format_string_in_typical_context?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#91 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#213 + def allowed_unannotated?(detections); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#139 + def autocorrect_sequence(corrector, detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#124 + def check_sequence(detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#203 + def collect_detections(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#135 + def correctable_sequence?(detected_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#113 + def format_string_token?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#222 + def max_unannotated_placeholders_allowed; end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#160 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#165 + def message_text(style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#180 + def str_contents(source_map); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#190 + def token_ranges(contents); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#174 + def tokens(str_node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#156 + def unannotated_format?(node, detected_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#117 + def use_allowed_method?(node); end +end + +# Helps you transition from mutable string literals +# to frozen string literals. +# of files to enable frozen string literals. Frozen string literals may be +# default in future Ruby. The comment will be added below a shebang and +# encoding comment. The frozen string literal comment is only valid in Ruby 2.3+. +# +# Note that the cop will accept files where the comment exists but is set +# to `false` instead of `true`. +# +# To require a blank line after this comment, please see +# `Layout/EmptyLineAfterMagicComment` cop. +# +# @example EnforcedStyle: always (default) +# # The `always` style will always add the frozen string literal comment +# # to a file, regardless of the Ruby version or if `freeze` or `<<` are +# # called on a string literal. +# # bad +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# @example EnforcedStyle: never +# # The `never` will enforce that the frozen string literal comment does +# # not exist in a file. +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# module Baz +# # ... +# end +# @example EnforcedStyle: always_true +# # The `always_true` style enforces that the frozen string literal +# # comment is set to `true`. This is a stricter option than `always` +# # and forces projects to use frozen string literals. +# # bad +# # frozen_string_literal: false +# +# module Baz +# # ... +# end +# +# # bad +# module Baz +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 +class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#99 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 + def disabled_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 + def enable_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 + def ensure_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#126 + def ensure_enabled_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 + def ensure_no_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 + def following_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 + def frozen_string_literal_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 + def insert_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 + def last_special_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 + def line_range(line); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 + def missing_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 + def missing_true_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 + def preceding_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 + def remove_comment(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 + def unnecessary_comment_offense(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#96 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#94 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#93 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#95 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#97 +RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) + +# Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. +# `STDOUT/STDERR/STDIN` are constants, and while you can actually +# reassign (possibly to redirect some stream) constants in Ruby, you'll get +# an interpreter warning if you do so. +# +# @example +# # bad +# STDOUT.puts('hello') +# +# hash = { out: STDOUT, key: value } +# +# def m(out = STDOUT) +# out.puts('hello') +# end +# +# # good +# $stdout.puts('hello') +# +# hash = { out: $stdout, key: value } +# +# def m(out = $stdout) +# out.puts('hello') +# end +# +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#34 +class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#42 + def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#46 + def on_const(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70 + def gvar_name(const_name); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62 + def message(const_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66 + def namespaced?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 +RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#39 +RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) + +# Looks for uses of global variables. +# It does not report offenses for built-in global variables. +# Built-in global variables are allowed by default. Additionally +# users can allow additional variables via the AllowedVariables option. +# +# Note that backreferences like $1, $2, etc are not global variables. +# +# @example +# # bad +# $foo = 2 +# bar = $foo + 5 +# +# # good +# FOO = 2 +# foo = 2 +# $stdin.read +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#22 +class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#60 + def allowed_var?(global_var); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#72 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#64 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#68 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#56 + def user_vars; end +end + +# built-in global variables and their English aliases +# https://www.zenspider.com/ruby/quickref.html +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#27 +RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#23 +RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) + +# Use a guard clause instead of wrapping the code inside a conditional +# expression +# +# A condition with an `elsif` or `else` branch is allowed unless +# one of `return`, `break`, `next`, `raise`, or `fail` is used +# in the body of the conditional expression. +# +# NOTE: Autocorrect works in most cases except with if-else statements +# that contain logical operators such as `foo || raise('exception')` +# +# @example +# # bad +# def test +# if something +# work +# end +# end +# +# # good +# def test +# return unless something +# +# work +# end +# +# # also good +# def test +# work if something +# end +# +# # bad +# if something +# raise 'exception' +# else +# ok +# end +# +# # good +# raise 'exception' if something +# ok +# +# # bad +# if something +# foo || raise('exception') +# else +# ok +# end +# +# # good +# foo || raise('exception') if something +# ok +# +# # bad +# define_method(:test) do +# if something +# work +# end +# end +# +# # good +# define_method(:test) do +# return unless something +# +# work +# end +# +# # also good +# define_method(:test) do +# work if something +# end +# @example AllowConsecutiveConditionals: false (default) +# # bad +# def test +# if foo? +# work +# end +# +# if bar? # <- reports an offense +# work +# end +# end +# @example AllowConsecutiveConditionals: true +# # good +# def test +# if foo? +# work +# end +# +# if bar? +# work +# end +# end +# +# # bad +# def test +# if foo? +# work +# end +# +# do_something +# +# if bar? # <- reports an offense +# work +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 +class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275 + def accepted_form?(node, ending: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 + def accepted_if?(node, ending); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 + def allowed_consecutive_conditionals?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 + def and_or_guard_clause?(guard_clause); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 + def autocorrect(corrector, node, condition, replacement, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236 + def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159 + def check_ending_body(body); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 + def check_ending_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180 + def consecutive_conditionals?(parent, node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 + def guard_clause_source(guard_clause); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 + def heredoc?(argument); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248 + def range_of_branch_to_remove(node, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 + def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#295 + def remove_whole_lines(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270 + def too_long_for_single_line?(node, example); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279 + def trivial?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120 +RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) + +# Checks for presence or absence of braces around hash literal as a last +# array item depending on configuration. +# +# NOTE: This cop will ignore arrays where all items are hashes, regardless of +# EnforcedStyle. +# +# @example EnforcedStyle: braces (default) +# # bad +# [1, 2, one: 1, two: 2] +# +# # good +# [1, 2, { one: 1, two: 2 }] +# +# # good +# [{ one: 1 }, { two: 2 }] +# @example EnforcedStyle: no_braces +# # bad +# [1, 2, { one: 1, two: 2 }] +# +# # good +# [1, 2, one: 1, two: 2] +# +# # good +# [{ one: 1 }, { two: 2 }] +# +# source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#31 +class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#36 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#85 + def braces_style?; end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#66 + def check_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#74 + def check_no_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#50 + def containing_array(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#61 + def explicit_array?(array); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#55 + def last_array_item?(array, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#89 + def remove_last_element_trailing_comma(corrector, node); end +end + +# Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and +# sequences of values to hashes. +# +# Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, +# `Hash[*ary]` can be replaced with `ary.each_slice(2).to_h` but it will be complicated. +# So, `AllowSplatArgument` option is true by default to allow splat argument for simple code. +# +# @example +# # bad +# Hash[ary] +# +# # good +# ary.to_h +# +# # bad +# Hash[key1, value1, key2, value2] +# +# # good +# {key1 => value1, key2 => value2} +# @example AllowSplatArgument: true (default) +# # good +# Hash[*ary] +# @example AllowSplatArgument: false +# # bad +# Hash[*ary] +# +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 +class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 + def hash_from_array?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 + def allowed_splat_argument?; end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 + def args_to_hash(args); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 + def multi_argument(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 + def register_offense_for_hash(node, hash_argument); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 + def register_offense_for_zip_method(node, zip_method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 + def single_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 + def use_zip_method_without_argument?(first_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 +RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 +RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 +RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `each_key` and `each_value` Hash methods. +# +# NOTE: If you have an array of two-element arrays, you can put +# parentheses around the block arguments to indicate that you're not +# working with a hash, and suppress RuboCop offenses. +# +# @example +# # bad +# hash.keys.each { |k| p k } +# hash.each { |k, unused_value| p k } +# +# # good +# hash.each_key { |k| p k } +# +# # bad +# hash.values.each { |v| p v } +# hash.each { |unused_key, v| p v } +# +# # good +# hash.each_value { |v| p v } +# @example AllowedReceivers: ['execute'] +# # good +# execute(sql).keys.each { |v| p v } +# execute(sql).values.each { |v| p v } +# +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36 +class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 + def check_unused_block_args(node, key, value); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 + def each_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 + def kv_each(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 + def kv_each_with_block_pass(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 + def check_argument(variable); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 + def correct_args(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 + def correct_implicit(node, corrector, method_name); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 + def correct_key_value_each(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 + def format_message(method_name, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 + def handleable?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 + def kv_range(outer_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 + def message(prefer, method_name, unused_code); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + def register_each_args_offense(node, message, prefer, unused_range); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 + def register_kv_offense(target, method); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 + def register_kv_with_block_pass_offense(node, target, method); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 + def root_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 + def unused_block_arg_exist?(node, block_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 + def use_array_converter_method_as_preceding?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 + def used?(arg); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 +RuboCop::Cop::Style::HashEachMethods::ARRAY_CONVERTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#41 +RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42 +RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil), String) + +# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods +# that can be replaced with `Hash#except` method. +# +# This cop should only be enabled on Ruby version 3.0 or higher. +# (`Hash#except` was added in Ruby 3.0.) +# +# For safe detection, it is limited to commonly used string and symbol comparisons +# when used `==`. +# And do not check `Hash#delete_if` and `Hash#keep_if` to change receiver object. +# +# @example +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.except(:bar) +# +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#33 +class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#60 + def bad_method_with_active_support?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#44 + def bad_method_with_poro?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#95 + def bad_method?(method_name, block); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169 + def decorate_source(value); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177 + def except_key(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156 + def except_key_source(key); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#150 + def extract_body_if_negated(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 + def included?(negated, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 + def not_included?(negated, body); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#186 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#139 + def safe_to_register_offense?(block, except_key); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#115 + def semantically_except_method?(send, block); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#40 +RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#41 +RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `case-when` represents a simple 1:1 +# mapping and can be replaced with a hash lookup. +# +# @example MinBranchesCount: 3 (default) +# # bad +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# # good +# SITES = { +# 'europe' => 'http://eu.example.com', +# 'america' => 'http://us.example.com', +# 'australia' => 'http://au.example.com' +# } +# SITES[country] +# @example MinBranchesCount: 4 +# # good +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#39 +class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MinBranchesCount + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#45 + def hash_like_case?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#53 + def on_case(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#65 + def nodes_of_same_type?(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 +RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) + +# Checks hash literal syntax. +# +# It can enforce either the use of the class hash rocket syntax or +# the use of the newer Ruby 1.9 syntax (when applicable). +# +# A separate offense is registered for each problematic pair. +# +# The supported styles are: +# +# * ruby19 - forces use of the 1.9 syntax (e.g. `{a: 1}`) when hashes have +# all symbols for keys +# * hash_rockets - forces use of hash rockets for all hashes +# * no_mixed_keys - simply checks for hashes with mixed syntaxes +# * ruby19_no_mixed_keys - forces use of ruby 1.9 syntax and forbids mixed +# syntax hashes +# +# This cop has `EnforcedShorthandSyntax` option. +# It can enforce either the use of the explicit hash value syntax or +# the use of Ruby 3.1's hash value shorthand syntax. +# +# The supported styles are: +# +# * always - forces use of the 3.1 syntax (e.g. {foo:}) +# * never - forces use of explicit hash literal value +# * either - accepts both shorthand and explicit use of hash literal value +# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# * either_consistent - accepts both shorthand and explicit use of hash literal value, +# but they must be consistent +# +# @example EnforcedShorthandSyntax: either_consistent +# +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# @example EnforcedStyle: hash_rockets +# # bad +# {a: 1, b: 2} +# {c: 1, 'd' => 5} +# +# # good +# {:a => 1, :b => 2} +# @example EnforcedStyle: no_mixed_keys +# # bad +# {:a => 1, b: 2} +# {c: 1, 'd' => 2} +# +# # good +# {:a => 1, :b => 2} +# {c: 1, d: 2} +# @example EnforcedStyle: ruby19_no_mixed_keys +# # bad +# {:a => 1, :b => 2} +# {c: 2, 'd' => 3} # should just use hash rockets +# +# # good +# {a: 1, b: 2} +# {:c => 3, 'd' => 4} +# @example EnforcedShorthandSyntax: always (default) +# +# # bad +# {foo: foo, bar: bar} +# +# # good +# {foo:, bar:} +# @example EnforcedShorthandSyntax: never +# +# # bad +# {foo:, bar:} +# +# # good +# {foo: foo, bar: bar} +# @example EnforcedShorthandSyntax: either +# +# # good +# {foo: foo, bar: bar} +# +# # good +# {foo: foo, bar:} +# +# # good +# {foo:, bar:} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} +# +# # good +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden +# +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 +class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::HashShorthandSyntax + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 + def hash_rockets_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 + def no_mixed_keys_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + def ruby19_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 + def ruby19_no_mixed_keys_check(pairs); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 + def acceptable_19_syntax_symbol?(sym_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 + def argument_without_space?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 + def autocorrect_hash_rockets(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 + def autocorrect_no_mixed_keys(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 + def autocorrect_ruby19(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 + def check(pairs, delim, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 + def force_hash_rockets?(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 + def range_for_autocorrect_ruby19(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 + def sym_indices?(pairs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 + def word_symbol_pair?(pair); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 +RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 +RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 +RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) + +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just +# transforming the keys of a hash, and tries to use a simpler & faster +# call to `transform_keys` instead. +# It should only be enabled on Ruby version 2.5 or newer. +# (`transform_keys` was added in Ruby 2.5.) +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[foo(k)] = v } +# Hash[{a: 1, b: 2}.collect { |k, v| [foo(k), v] }] +# {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k.to_s, v] } +# +# # good +# {a: 1, b: 2}.transform_keys { |k| foo(k) } +# {a: 1, b: 2}.transform_keys { |k| k.to_s } +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#28 +class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#36 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#48 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#61 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#73 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#84 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#89 + def new_method_name; end +end + +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just +# transforming the values of a hash, and tries to use a simpler & faster +# call to `transform_values` instead. +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[k] = foo(v) } +# Hash[{a: 1, b: 2}.collect { |k, v| [k, foo(v)] }] +# {a: 1, b: 2}.map { |k, v| [k, v * v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k, v * v] } +# +# # good +# {a: 1, b: 2}.transform_values { |v| foo(v) } +# {a: 1, b: 2}.transform_values { |v| v * v } +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#26 +class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#34 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#46 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#59 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#71 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#82 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#87 + def new_method_name; end +end + +# Checks for identical expressions at the beginning or end of +# each branch of a conditional expression. Such expressions should normally +# be placed outside the conditional expression - before or after it. +# +# NOTE: The cop is poorly named and some people might think that it actually +# checks for duplicated conditional branches. The name will probably be changed +# in a future major RuboCop release. +# +# @example +# # bad +# if condition +# do_x +# do_z +# else +# do_y +# do_z +# end +# +# # good +# if condition +# do_x +# else +# do_y +# end +# do_z +# +# # bad +# if condition +# do_z +# do_x +# else +# do_z +# do_y +# end +# +# # good +# do_z +# if condition +# do_x +# else +# do_y +# end +# +# # bad +# case foo +# when 1 +# do_x +# when 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# when 1 +# do_x +# do_y +# when 2 +# # nothing +# else +# do_x +# do_z +# end +# +# # bad +# case foo +# in 1 +# do_x +# in 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# in 1 +# do_x +# do_y +# in 2 +# # nothing +# else +# do_x +# do_z +# end +# +# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#110 +class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#123 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#130 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#116 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#184 + def assignable_condition_value(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 + def check_branches(node, branches); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 + def check_expressions(node, expressions, insert_position); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 + def duplicated_expressions?(node, expressions); end + + # `elsif` branches show up in the if node as nested `else` branches. We + # need to recursively iterate over all `else` branches. + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233 + def expand_elses(branch); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#248 + def head(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#217 + def last_child_of_parent?(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#227 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 + def single_child_branch?(branch_node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 + def tail(node); end +end + +# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#114 +RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) + +# Corrector to correct conditional assignment in `if` statements. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 +class RuboCop::Cop::Style::IfCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#564 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# If the `else` branch of a conditional consists solely of an `if` node, +# it can be combined with the `else` to become an `elsif`. +# This helps to keep the nesting level from getting too deep. +# +# @example +# # bad +# if condition_a +# action_a +# else +# if condition_b +# action_b +# else +# action_c +# end +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# else +# action_c +# end +# @example AllowIfModifier: false (default) +# # bad +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# @example AllowIfModifier: true +# # good +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#61 +class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150 + def allow_if_modifier?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 + def allow_if_modifier_in_else_branch?(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#117 + def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109 + def correct_to_elsif_from_modifier_form(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135 + def find_end_range(node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 + def if_condition_range(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 + def then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66 +RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` and `unless` statements that would fit on one line if +# written as modifier `if`/`unless`. The cop also checks for modifier +# `if`/`unless` lines that exceed the maximum line length. +# +# The maximum line length is configured in the `Layout/LineLength` +# cop. The tab size is configured in the `IndentationWidth` of the +# `Layout/IndentationStyle` cop. +# +# One-line pattern matching is always allowed. To ensure that there are few cases +# where the match variable is not used, and to prevent oversights. The variable `x` +# becomes undefined and raises `NameError` when the following example is changed to +# the modifier form: +# +# [source,ruby] +# ---- +# if [42] in [x] +# x # `x` is undefined when using modifier form. +# end +# ---- +# +# NOTE: It is allowed when `defined?` argument has an undefined value, +# because using the modifier form causes the following incompatibility: +# +# [source,ruby] +# ---- +# unless defined?(undefined_foo) +# undefined_foo = 'default_value' +# end +# undefined_foo # => 'default_value' +# +# undefined_bar = 'default_value' unless defined?(undefined_bar) +# undefined_bar # => nil +# ---- +# +# @example +# # bad +# if condition +# do_stuff(bar) +# end +# +# unless qux.empty? +# Foo.do_something +# end +# +# do_something_with_a_long_name(arg) if long_condition_that_prevents_code_fit_on_single_line +# +# # good +# do_stuff(bar) if condition +# Foo.do_something unless qux.empty? +# +# if long_condition_that_prevents_code_fit_on_single_line +# do_something_with_a_long_name(arg) +# end +# +# if short_condition # a long comment that makes it too long if it were just a single line +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#63 +class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#80 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#171 + def allowed_patterns; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#231 + def another_statement_on_same_line?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#132 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#285 + def comment_on_node_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#104 + def defined_argument_is_undefined?(if_node, defined_node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#96 + def defined_nodes(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#272 + def extract_heredoc_from(last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#215 + def line_length_enabled_at_line?(line); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#124 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#219 + def named_capture_in_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#223 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#227 + def non_simple_if_unless?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#114 + def pattern_matching_nodes(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#289 + def remove_comment(corrector, _node, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#279 + def remove_heredoc(corrector, heredoc); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#141 + def replacement_for_modifier_form(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#265 + def to_modifier_form_with_move_comment(node, indentation, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#245 + def to_normal_form(node, indentation); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#253 + def to_normal_form_with_heredoc(node, indentation, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#165 + def too_long_due_to_comment_after_modifier?(node, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160 + def too_long_due_to_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#206 + def too_long_line_based_on_allow_uri?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#189 + def too_long_line_based_on_config?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#198 + def too_long_line_based_on_ignore_cop_directives?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#176 + def too_long_single_line?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#76 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#71 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#74 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) + +# Checks for if and unless statements used as modifiers of other if or +# unless statements. +# +# @example +# +# # bad +# tired? ? 'stop' : 'go faster' if running? +# +# # bad +# if tired? +# "please stop" +# else +# "keep going" +# end if running? +# +# # good +# if running? +# tired? ? 'stop' : 'go faster' +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#25 +class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#31 + def on_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#29 +RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `if` with boolean literal branches. +# It checks only conditions to return boolean value (`true` or `false`) for safe detection. +# The conditions to be checked are comparison methods, predicate methods, and +# double negation (!!). +# `nonzero?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# This cop targets only `if`s with a single `elsif` or `else` branch. The following +# code will be allowed, because it has two `elsif` branches: +# +# [source,ruby] +# ---- +# if foo +# true +# elsif bar > baz +# true +# elsif qux > quux # Single `elsif` is warned, but two or more `elsif`s are not. +# true +# else +# false +# end +# ---- +# +# @example +# # bad +# if foo == bar +# true +# else +# false +# end +# +# # bad +# foo == bar ? true : false +# +# # good +# foo == bar +# +# # bad +# if foo.do_something? +# true +# else +# false +# end +# +# # good (but potentially an unsafe correction) +# foo.do_something? +# @example AllowedMethods: ['nonzero?'] (default) +# # good +# num.nonzero? ? true : false +# +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61 +class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73 + def double_negative?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 + def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135 + def assume_boolean_value?(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113 + def message(node, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95 + def multiple_elsif?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101 + def offense_range_with_keyword(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152 + def opposite_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142 + def replacement_condition(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157 + def require_parentheses?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121 + def return_boolean_value?(condition); end +end + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65 +RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 +RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) + +# Checks for uses of semicolon in if statements. +# +# @example +# +# # bad +# result = if some_condition; something else another_thing end +# +# # good +# result = some_condition ? something : another_thing +# +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#16 +class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#95 + def build_else_branch(second_condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#85 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 + def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + def use_block_in_branches?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 +RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 +RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which do not specify an +# explicit exception class. (This raises a `RuntimeError`. Some projects +# might prefer to use exception classes which more precisely identify the +# nature of the error.) +# +# @example +# # bad +# raise 'Error message here' +# +# # good +# raise ArgumentError, 'Error message here' +# +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#17 +class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#23 + def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#26 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#18 +RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#20 +RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `in;` uses in `case` expressions. +# +# @example +# # bad +# case expression +# in pattern_a; foo +# in pattern_b; bar +# end +# +# # good +# case expression +# in pattern_a then foo +# in pattern_b then bar +# end +# +# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#21 +class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#29 + def on_in_pattern(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 + def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end +end + +# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 +RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Use `Kernel#loop` for infinite loops. +# +# @example +# # bad +# while true +# work +# end +# +# # good +# loop do +# work +# end +# +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#23 +class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#35 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#84 + def assigned_before_loop?(var, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#80 + def assigned_inside_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#103 + def modifier_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#114 + def non_modifier_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#89 + def referenced_after_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#94 + def replace_begin_end_with_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#99 + def replace_source(corrector, range, replacement); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#53 + def while_or_until(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#31 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#27 +RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#29 +RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing inline comments. +# +# @example +# +# # good +# foo.each do |f| +# # Standalone comment +# f.bar +# end +# +# # bad +# foo.each do |f| +# f.bar # Trailing inline comment +# end +# +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#20 +class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/inline_comment.rb#23 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#21 +RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) + +# Check for usages of not (`not` or `!`) called on a method +# when an inverse of that method can be used instead. +# +# Methods that can be inverted by a not (`not` or `!`) should be defined +# in `InverseMethods`. +# +# Methods that are inverted by inverting the return +# of the block that is passed to the method should be defined in +# `InverseBlocks`. +# +# @example +# # bad +# !foo.none? +# !foo.any? { |f| f.even? } +# !foo.blank? +# !(foo == bar) +# foo.select { |f| !f.even? } +# foo.reject { |f| f != 7 } +# +# # good +# foo.none? +# foo.blank? +# foo.any? { |f| f.even? } +# foo != bar +# foo == bar +# !!('foo' =~ /^\w+$/) +# !(foo.class < Numeric) # Checking class hierarchy is allowed +# # Blocks with guard clauses are ignored: +# foo.select do |f| +# next if f.zero? +# f != 1 +# end +# +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#43 +class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 + def inverse_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 + def inverse_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177 + def camel_case_constant?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121 + def correct_inverse_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112 + def correct_inverse_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128 + def correct_inverse_selector(block, corrector); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 + def dot_range(loc); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 + def end_parentheses(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 + def inverse_blocks; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 + def inverse_methods; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191 + def message(method, inverse); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 + def not_to_receiver(node, method_call); end + + # When comparing classes, `!(Integer < Numeric)` is not the same as + # `Integer > Numeric`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 + def possible_class_hierarchy_check?(lhs, rhs, method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + def relational_comparison_with_safe_navigation?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 + def remove_end_parenthesis(corrector, node, method, method_call); end + + class << self + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#22 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#52 +RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 +RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 +RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 +RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 +RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 +RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `unless` which can be replaced by `if` with inverted condition. +# Code without `unless` is easier to read, but that is subjective, so this cop +# is disabled by default. +# +# Methods that can be inverted should be defined in `InverseMethods`. Note that +# the relationship of inverse methods needs to be defined in both directions. +# For example, +# +# [source,yaml] +# ---- +# InverseMethods: +# :!=: :== +# :even?: :odd? +# :odd?: :even? +# ---- +# +# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). +# +# @example +# # bad (simple condition) +# foo unless !bar +# foo unless x != y +# foo unless x >= 10 +# foo unless x.even? +# foo unless odd? +# +# # good +# foo if bar +# foo if x == y +# foo if x < 10 +# foo if x.odd? +# foo if even? +# +# # bad (complex condition) +# foo unless x != y || x.even? +# +# # good +# foo if x == y && x.odd? +# +# # good (if) +# foo if !condition +# +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#53 +class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#58 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#133 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#146 + def autocorrect_send_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#90 + def inheritance_check?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#154 + def inverse_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#75 + def invertible?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#96 + def preferred_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#126 + def preferred_logical_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 + def preferred_send_condition(node); end +end + +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 +RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for hardcoded IP addresses, which can make code +# brittle. IP addresses are likely to need to be changed when code +# is deployed to a different server or environment, which may break +# a deployment if forgotten. Prefer setting IP addresses in ENV or +# other configuration. +# +# @example +# +# # bad +# ip_address = '127.59.241.29' +# +# # good +# ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#21 +class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#46 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#27 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#42 + def opposite_style_detected; end + + private + + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#50 + def allowed_addresses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 + def could_be_ip?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#68 + def starts_with_hex_or_colon?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#64 + def too_long?(str); end +end + +# IPv4-mapped IPv6 is the longest +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#24 +RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#25 +RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) + +# Enforces that optional keyword parameters are placed at the +# end of the parameters list. +# +# This improves readability, because when looking through the source, +# it is expected to find required parameters at the beginning of parameters list +# and optional parameters at the end. +# +# @example +# # bad +# def some_method(first: false, second:, third: 10) +# # body omitted +# end +# +# # good +# def some_method(second:, first: false, third: 10) +# # body omitted +# end +# +# # bad +# do_something do |first: false, second:, third: 10| +# # body omitted +# end +# +# # good +# do_something do |second:, first: false, third: 10| +# # body omitted +# end +# +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#34 +class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#40 + def on_kwoptarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#58 + def append_newline_to_last_kwoptarg(arguments, corrector); end + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#66 + def remove_kwargs(kwarg_nodes, corrector); end +end + +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#38 +RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) + +# (by default) checks for uses of the lambda literal syntax for +# single line lambdas, and the method call syntax for multiline lambdas. +# It is configurable to enforce one of the styles for both single line +# and multiline lambdas as well. +# +# @example EnforcedStyle: line_count_dependent (default) +# # bad +# f = lambda { |x| x } +# f = ->(x) do +# x +# end +# +# # good +# f = ->(x) { x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: lambda +# # bad +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# # good +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: literal +# # bad +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# +# # good +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# source://rubocop//lib/rubocop/cop/style/lambda.rb#49 +class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#115 + def arguments_with_whitespace(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#104 + def autocorrect_method_to_literal(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#119 + def lambda_arg_string(args); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#89 + def message(node, selector); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#95 + def message_line_modifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda.rb#83 + def offending_selector?(node, selector); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#53 +RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#54 +RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#56 +RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# Checks for use of the lambda.(args) syntax. +# +# @example EnforcedStyle: call (default) +# # bad +# lambda.(x, y) +# +# # good +# lambda.call(x, y) +# @example EnforcedStyle: braces +# # bad +# lambda.call(x, y) +# +# # good +# lambda.(x, y) +# +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 +class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 + def explicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 + def implicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 + def prefer(node); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 +RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for string literal concatenation at +# the end of a line. +# +# @example +# +# # bad +# some_str = 'ala' + +# 'bala' +# +# some_str = 'ala' << +# 'bala' +# +# # good +# some_str = 'ala' \ +# 'bala' +# +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#35 +class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#51 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#74 + def autocorrect(corrector, operator_range); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#57 + def check_token_set(index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#101 + def eligible_next_successor?(next_successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#97 + def eligible_operator?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#105 + def eligible_predecessor?(predecessor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#93 + def eligible_successor?(successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#87 + def eligible_token_set?(predecessor, operator, successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#124 + def standard_string_literal?(token); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#109 + def token_after_last_string(successor, base_index); end + + class << self + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#47 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#42 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#43 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#40 +RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#44 +RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#39 +RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#45 +RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#41 +RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) + +# Ensures magic comments are written consistently throughout your code base. +# Looks for discrepancies in separators (`-` vs `_`) and capitalization for +# both magic comment directives and values. +# +# Required capitalization can be set with the `DirectiveCapitalization` and +# `ValueCapitalization` configuration keys. +# +# NOTE: If one of these configuration is set to nil, any capitalization is allowed. +# +# @example ValueCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # frozen-string-literal: TRUE +# @example EnforcedStyle: kebab_case +# # The `kebab_case` style will enforce that the frozen string literal +# # comment is written in kebab case. (Words separated by hyphens) +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# # frozen-string-literal: true +# +# module Baz +# # ... +# end +# @example DirectiveCapitalization: lowercase (default) +# # bad +# # FROZEN-STRING-LITERAL: true +# +# # good +# # frozen-string-literal: true +# @example DirectiveCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example DirectiveCapitalization: nil +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example ValueCapitalization: nil (default) +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # frozen-string-literal: TRUE +# @example ValueCapitalization: lowercase +# # when a value is not given, any capitalization is accepted +# +# # bad +# # frozen-string-literal: TRUE +# +# # good +# # frozen-string-literal: TRUE +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) +# # bad +# # frozen-string-literal: true +# +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 +class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#156 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#241 + def correct_separator; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#279 + def directive_capitalization; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#197 + def directive_offends?(directive); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#233 + def expected_style; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#183 + def find_issues(comment); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#207 + def fix_directives(issues); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#221 + def fix_values(issues); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#245 + def incorrect_separator?(text); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#173 + def leading_comment_lines; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#275 + def line_range(line); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#167 + def magic_comments; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#202 + def register_offenses(issues); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#264 + def replace_capitalization(text, style); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#260 + def replace_separator(text); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#301 + def supported_capitalizations; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#295 + def valid_capitalization?(style); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#287 + def value_capitalization; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#249 + def wrong_capitalization?(text, expected_case); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#237 + def wrong_separator; end +end + +# Value object to extract source ranges for the different parts of a magic comment +# +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 +class RuboCop::Cop::Style::MagicCommentFormat::CommentRange + extend ::RuboCop::SimpleForwardable + + # @return [CommentRange] a new instance of CommentRange + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#119 + def initialize(comment); end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#117 + def comment; end + + # A magic comment can contain one directive (normal style) or + # multiple directives (emacs style) + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 + def directives; end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def loc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def text(*_arg0, **_arg1, &_arg2); end + + # A magic comment can contain one value (normal style) or + # multiple directives (emacs style) + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#141 + def values; end +end + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#110 +RuboCop::Cop::Style::MagicCommentFormat::CommentRange::DIRECTIVE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#114 +RuboCop::Cop::Style::MagicCommentFormat::CommentRange::VALUE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#102 +RuboCop::Cop::Style::MagicCommentFormat::KEBAB_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#103 +RuboCop::Cop::Style::MagicCommentFormat::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#104 +RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#101 +RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) + +# Prefer `select` or `reject` over `map { ... }.compact`. +# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`. +# +# @example +# +# # bad +# array.map { |e| some_condition? ? e : next }.compact +# +# # bad +# array.filter_map { |e| some_condition? ? e : next } +# +# # bad +# array.map do |e| +# if some_condition? +# e +# else +# next +# end +# end.compact +# +# # bad +# array.map do |e| +# next if some_condition? +# +# e +# end.compact +# +# # bad +# array.map do |e| +# e if some_condition? +# end.compact +# +# # good +# array.select { |e| some_condition? } +# +# # good +# array.reject { |e| some_condition? } +# +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44 +class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51 + def conditional_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148 + def current(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162 + def filter_map_range(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + def inspect(node, block_argument_node, condition_node, return_value_node, range); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158 + def map_with_compact_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114 + def returns_block_argument?(block_argument_node, return_value_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#118 + def truthy_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138 + def truthy_branch_for_guard?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128 + def truthy_branch_for_if?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `each` with `<<`, `push`, or `append` which +# can be replaced by `map`. +# +# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, +# this cop uses the specified method for replacement. +# +# NOTE: The return value of `Enumerable#each` is `self`, whereas the +# return value of `Enumerable#map` is an `Array`. They are not autocorrected +# when a return value could be used because these types differ. +# +# NOTE: It only detects when the mapping destination is a local variable +# initialized as an empty array and referred to only by the pushing operation. +# This is because, if not, it's challenging to statically guarantee that the +# mapping destination variable remains an empty array: +# +# [source,ruby] +# ---- +# ret = [] +# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` +# +# dest = [] +# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` +# ---- +# +# @example +# # bad +# dest = [] +# src.each { |e| dest << e * 2 } +# dest +# +# # good +# dest = src.map { |e| e * 2 } +# +# # good - contains another operation +# dest = [] +# src.each { |e| dest << e * 2; puts e } +# dest +# +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 +class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#84 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + def each_block_with_push?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + def empty_array_asgn?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#78 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#162 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#170 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#117 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#111 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#103 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#136 + def new_method_name; end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#125 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + def remove_assignment(corrector, asgn); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#142 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#80 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of `map.to_h` or `collect.to_h` that could be +# written with just `to_h` in Ruby >= 2.6. +# +# NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will +# also change this pattern if only hash keys or hash values are being +# transformed. +# +# @example +# # bad +# something.map { |v| [v, v * 2] }.to_h +# +# # good +# something.to_h { |v| [v, v * 2] } +# +# # bad +# {foo: bar}.collect { |k, v| [k.to_s, v.do_something] }.to_h +# +# # good +# {foo: bar}.to_h { |k, v| [k.to_s, v.do_something] } +# +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#30 +class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 + def map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#68 + def autocorrect(corrector, to_h, map); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 +RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#38 +RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `map.to_set` or `collect.to_set` that could be +# written with just `to_set`. +# +# @example +# # bad +# something.map { |i| i * 2 }.to_set +# +# # good +# something.to_set { |i| i * 2 } +# +# # bad +# [1, 2, 3].collect { |i| i.to_s }.to_set +# +# # good +# [1, 2, 3].to_set { |i| i.to_s } +# +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#26 +class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 + def map_to_set?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#55 + def autocorrect(corrector, to_set, map); end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#30 +RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#31 +RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the presence (default) or absence of parentheses in +# method calls containing arguments. +# +# In the default style (require_parentheses), macro methods are allowed. +# Additional methods can be added to the `AllowedMethods` or +# `AllowedPatterns` list. These options are valid only in the default +# style. Macros can be included by either setting `IgnoreMacros` to false +# or adding specific macros to the `IncludedMacros` list. +# +# Precedence of options is as follows: +# +# 1. `AllowedMethods` +# 2. `AllowedPatterns` +# 3. `IncludedMacros` +# +# If a method is listed in both `IncludedMacros` and `AllowedMethods`, +# then the latter takes precedence (that is, the method is allowed). +# +# In the alternative style (omit_parentheses), there are three additional +# options. +# +# 1. `AllowParenthesesInChaining` is `false` by default. Setting it to +# `true` allows the presence of parentheses in the last call during +# method chaining. +# +# 2. `AllowParenthesesInMultilineCall` is `false` by default. Setting it +# to `true` allows the presence of parentheses in multi-line method +# calls. +# +# 3. `AllowParenthesesInCamelCaseMethod` is `false` by default. This +# allows the presence of parentheses when calling a method whose name +# begins with a capital letter and which has no arguments. Setting it +# to `true` allows the presence of parentheses in such a method call +# even with arguments. +# +# NOTE: The style of `omit_parentheses` allows parentheses in cases where +# omitting them results in ambiguous or syntactically incorrect code. +# +# Non-exhaustive list of examples: +# +# - Parentheses are required allowed in method calls with arguments inside +# literals, logical operators, setting default values in position and +# keyword arguments, chaining and more. +# - Parentheses are allowed in method calls with arguments inside +# operators to avoid ambiguity. +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are allowed when forwarding arguments with the +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are required in calls with arguments when inside an +# endless method definition introduced in Ruby 3.0. +# - Ruby 3.1's hash omission syntax allows parentheses if the method call +# is in conditionals and requires parentheses if the call +# is not the value-returning expression. See +# https://bugs.ruby-lang.org/issues/18396. +# - Parentheses are required in anonymous arguments, keyword arguments +# and block passing in Ruby 3.2. +# +# @example AllowParenthesesInStringInterpolation: true +# +# # good +# "#{t('this.is.good')}" +# +# # good +# "#{t 'this.is.also.good'}" +# @example EnforcedStyle: omit_parentheses +# +# # bad +# array.delete(e) +# +# # good +# array.delete e +# +# # bad +# action.enforce(strict: true) +# +# # good +# action.enforce strict: true +# +# # good +# # Parentheses are allowed for code that can be ambiguous without +# # them. +# action.enforce(condition) || other_condition +# +# # good +# # Parentheses are allowed for calls that won't produce valid Ruby +# # without them. +# yield path, File.basename(path) +# +# # good +# # Omitting the parentheses in Ruby 3.1 hash omission syntax can lead +# # to ambiguous code. We allow them in conditionals and non-last +# # expressions. See https://bugs.ruby-lang.org/issues/18396 +# if meets(criteria:, action:) +# safe_action(action) || dangerous_action(action) +# end +# @example IgnoreMacros: true (default) +# +# # good +# class Foo +# bar :baz +# end +# @example IgnoreMacros: false +# +# # bad +# class Foo +# bar :baz +# end +# @example AllowParenthesesInMultilineCall: false (default) +# +# # bad +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInMultilineCall: true +# +# # good +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInChaining: false (default) +# +# # bad +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInChaining: true +# +# # good +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInCamelCaseMethod: false (default) +# +# # bad +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInCamelCaseMethod: true +# +# # good +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInStringInterpolation: false (default) +# +# # bad +# "#{t('this.is.bad')}" +# +# # good +# "#{t 'this.is.better'}" +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e +# +# # good +# array.delete(e) +# +# # good +# # Operators don't need parens +# foo == bar +# +# # good +# # Setter methods don't need parens +# foo.bar = baz +# +# # okay with `puts` listed in `AllowedMethods` +# puts 'test' +# +# # okay with `^assert` listed in `AllowedPatterns` +# assert_equal 'test', x +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 +class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 + def args_parenthesized?(node); end + + class << self + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#30 + def autocorrect_incompatible_with; end + end +end + +# Style omit_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + def allowed_camel_case_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + def allowed_chained_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + def allowed_multiline_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + def allowed_string_interpolation_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 + def ambiguous_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 + def assigned_before?(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 + def assignment_in_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 + def call_as_argument_or_chain?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 + def call_in_argument_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 + def call_in_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 + def call_in_logical_operators?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 + def call_in_match_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 + def call_in_optional_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 + def call_in_single_line_inheritance?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 + def call_with_ambiguous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 + def call_with_braced_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 + def forwards_anonymous_rest_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + def hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 + def hash_literal_in_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 + def inside_endless_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + def inside_string_interpolation?(node); end + + # Require hash value omission be enclosed in parentheses to prevent the following issue: + # https://bugs.ruby-lang.org/issues/18396. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 + def last_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 + def legitimate_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + def logical_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + def method_call_before_constant_resolution?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 + def omit_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 + def parentheses_at_the_end_of_multiline_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 + def regexp_slash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 + def require_parentheses_for_hash_value_omission?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 + def splat?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 + def super_call_without_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 + def syntax_like_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + def ternary_if?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + def unary_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Style require_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#8 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#27 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#31 + def eligible_for_parentheses_omission?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#39 + def ignored_macro?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#35 + def included_macros_list; end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#14 + def require_parentheses(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#9 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) + +# Checks for unwanted parentheses in parameterless method calls. +# +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. +# +# NOTE: This cop allows the use of `it()` without arguments in blocks, +# as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# +# @example +# # bad +# object.some_method() +# +# # good +# object.some_method +# @example AllowedMethods: [] (default) +# # bad +# object.foo() +# @example AllowedMethods: [foo] +# # good +# object.foo() +# +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#29 +class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#66 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#94 + def any_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#62 + def default_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 + def ineligible_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#117 + def offense_range(node); end + + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#86 + def parenthesized_it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#70 + def same_name_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 + def variable_in_mass_assignment?(variable_name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#34 +RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for methods called on a do...end block. The point of +# this check is that it's easy to miss the call tacked on to the block +# when reading code. +# +# @example +# # bad +# a do +# b +# end.c +# +# # good +# a { b }.c +# +# # good +# foo = a do +# b +# end +# foo.c +# +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#24 +class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#27 +RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses around the arguments in method +# definitions. Both instance and class/singleton methods are checked. +# +# Regardless of style, parentheses are necessary for: +# +# 1. Endless methods +# 2. Argument lists containing a `forward-arg` (`...`) +# 3. Argument lists containing an anonymous rest arguments forwarding (`*`) +# 4. Argument lists containing an anonymous keyword rest arguments forwarding (`**`) +# 5. Argument lists containing an anonymous block forwarding (`&`) +# +# Removing the parens would be a syntax error here. +# +# @example EnforcedStyle: require_parentheses (default) +# # The `require_parentheses` style requires method definitions +# # to always use parentheses +# +# # bad +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# @example EnforcedStyle: require_no_parentheses +# # The `require_no_parentheses` style requires method definitions +# # to never use parentheses +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# @example EnforcedStyle: require_no_parentheses_except_multiline +# # The `require_no_parentheses_except_multiline` style prefers no +# # parentheses when method definition arguments fit on single line, +# # but prefers parentheses when arguments span multiple lines. +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#97 +class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#169 + def anonymous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#147 + def arguments_without_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#126 + def correct_arguments(arg_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#131 + def forced_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#151 + def missing_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#142 + def require_parentheses?(args); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#161 + def unwanted_parentheses(args); end +end + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#103 +RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#102 +RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) + +# Checks for potential uses of `Enumerable#minmax`. +# +# @example +# +# # bad +# bar = [foo.min, foo.max] +# return foo.min, foo.max +# +# # good +# bar = foo.minmax +# return foo.minmax +# +# source://rubocop//lib/rubocop/cop/style/min_max.rb#17 +class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#38 + def min_max_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 + def on_return(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#55 + def argument_range(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#42 + def message(offender, receiver); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#46 + def offending_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max.rb#20 +RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `max` or `min` instead of comparison for greater or less. +# +# NOTE: It can be used if you want to present limit or threshold in Ruby 2.7+. +# That it is slow though. So autocorrection will apply generic `max` or `min`: +# +# [source,ruby] +# ---- +# a.clamp(b..) # Same as `[a, b].max` +# a.clamp(..b) # Same as `[a, b].min` +# ---- +# +# @example +# +# # bad +# a > b ? a : b +# a >= b ? a : b +# +# # good +# [a, b].max +# +# # bad +# a < b ? a : b +# a <= b ? a : b +# +# # good +# [a, b].min +# +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#37 +class RuboCop::Cop::Style::MinMaxComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#46 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#72 + def autocorrect(corrector, node, replacement); end + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#64 + def preferred_method(operator, lhs, rhs, if_branch, else_branch); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#44 +RuboCop::Cop::Style::MinMaxComparison::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#42 +RuboCop::Cop::Style::MinMaxComparison::GRATER_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#43 +RuboCop::Cop::Style::MinMaxComparison::LESS_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#41 +RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` expressions that do not have an `else` branch. +# +# NOTE: Pattern matching is allowed to have no `else` branch because unlike `if` and `case`, +# it raises `NoMatchingPatternError` if the pattern doesn't match and without having `else`. +# +# Supported styles are: if, case, both. +# +# @example EnforcedStyle: both (default) +# # warn when an `if` or `case` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: if +# # warn when an `if` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: case +# # warn when a `case` expression is missing an `else` branch. +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#99 +class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#115 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#121 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#108 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#146 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#159 + def case_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#177 + def empty_else_config; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 + def empty_else_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#155 + def if_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#135 + def message_template; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#167 + def unless_else_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#163 + def unless_else_cop_enabled?; end +end + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#104 +RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#106 +RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#105 +RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) + +# Checks for the presence of `method_missing` without also +# defining `respond_to_missing?`. +# +# @example +# # bad +# def method_missing(name, *args) +# # ... +# end +# +# # good +# def respond_to_missing?(name, include_private) +# # ... +# end +# +# def method_missing(name, *args) +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#24 +class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#37 + def implements_respond_to_missing?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#25 +RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) + +# Checks for grouping of mixins in `class` and `module` bodies. +# By default it enforces mixins to be placed in separate declarations, +# but it can be configured to enforce grouping them in one declaration. +# +# @example EnforcedStyle: separated (default) +# # bad +# class Foo +# include Bar, Qox +# end +# +# # good +# class Foo +# include Qox +# include Bar +# end +# @example EnforcedStyle: grouped +# # bad +# class Foo +# extend Bar +# extend Qox +# end +# +# # good +# class Foo +# extend Qox, Bar +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 +class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#64 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#72 + def check_grouped_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#91 + def check_separated_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#127 + def group_mixins(node, mixins); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#110 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#53 + def range_to_remove_for_subsequent_mixin(mixins, node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#118 + def separate_mixins(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#114 + def separated_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#104 + def sibling_mixins(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#37 +RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#38 +RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) + +# Checks that `include`, `extend` and `prepend` statements appear +# inside classes and modules, not at the top level, so as to not affect +# the behavior of `Object`. +# +# @example +# # bad +# include M +# +# class C +# end +# +# # bad +# extend M +# +# class C +# end +# +# # bad +# prepend M +# +# class C +# end +# +# # good +# class C +# include M +# end +# +# # good +# class C +# extend M +# end +# +# # good +# class C +# prepend M +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#43 +class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#54 + def in_top_level_scope?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#48 + def include_statement(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#62 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#44 +RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#45 +RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of `extend self` or `module_function` in a module. +# +# Supported styles are: `module_function` (default), `extend_self` and `forbidden`. +# +# A couple of things to keep in mind: +# +# - `forbidden` style prohibits the usage of both styles +# - in default mode (`module_function`), the cop won't be activated when the module +# contains any private methods +# +# @example EnforcedStyle: module_function (default) +# # bad +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: extend_self +# # bad +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: forbidden +# # bad +# module Test +# module_function +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/module_function.rb#95 +class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#107 + def extend_self_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#104 + def module_function_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#112 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#110 + def private_directive?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#149 + def check_extend_self(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#155 + def check_forbidden(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#141 + def check_module_function(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#130 + def each_wrong_style(nodes, &block); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#162 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#100 +RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#101 +RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#99 +RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) + +# Checks for chaining of a block after another block that spans +# multiple lines. +# +# @example +# +# # bad +# Thread.list.select do |t| +# t.alive? +# end.map do |t| +# t.object_id +# end +# +# # good +# alive_threads = Thread.list.select do |t| +# t.alive? +# end +# alive_threads.map do |t| +# t.object_id +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#25 +class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#28 +RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of if/unless modifiers with multiple-lines bodies. +# +# @example +# +# # bad +# { +# result: 'this should not happen' +# } unless cond +# +# # good +# { result: 'ok' } if cond +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#17 +class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#25 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#43 + def indented_body(body, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#35 + def to_normal_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#22 +RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the `then` keyword in multi-line if statements. +# +# @example +# # bad +# # This is considered bad practice. +# if cond then +# end +# +# # good +# # If statements can contain `then` on the same line. +# if cond then a +# elsif cond then b +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#19 +class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#28 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#38 + def non_modifier_then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#26 +RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#24 +RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) + +# Checks uses of the `then` keyword in multi-line `in` statement. +# +# @example +# # bad +# case expression +# in pattern then +# end +# +# # good +# case expression +# in pattern +# end +# +# # good +# case expression +# in pattern then do_something +# end +# +# # good +# case expression +# in pattern then do_something(arg1, +# arg2) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#30 +class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#39 + def on_in_pattern(node); end + + private + + # Requires `then` for write `in` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#51 + def require_then?(in_pattern_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#37 +RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Checks expressions wrapping styles for multiline memoization. +# +# @example EnforcedStyle: keyword (default) +# # bad +# foo ||= ( +# bar +# baz +# ) +# +# # good +# foo ||= begin +# bar +# baz +# end +# @example EnforcedStyle: braces +# # bad +# foo ||= begin +# bar +# baz +# end +# +# # good +# foo ||= ( +# bar +# baz +# ) +# +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 +class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#56 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#41 + def on_or_asgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#62 + def bad_rhs?(rhs); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#72 + def keyword_autocorrect(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#78 + def keyword_begin_str(node, node_buf); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#86 + def keyword_end_str(node, node_buf); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#39 +RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#38 +RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) + +# Checks for method signatures that span multiple lines. +# +# @example +# +# # good +# +# def foo(bar, baz) +# end +# +# # bad +# +# def foo(bar, +# baz) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#21 +class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#42 + def autocorrect(corrector, node, begin_of_arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 + def closing_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 + def correction_exceeds_max_line_length?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#93 + def definition_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#89 + def indentation_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 + def last_line_source_of_arguments(arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#97 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 + def opening_line(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#25 +RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) + +# Checks for multi-line ternary op expressions. +# +# NOTE: `return if ... else ... end` is syntax error. If `return` is used before +# multiline ternary operator expression, it will be autocorrected to single-line +# ternary operator. The same is true for `break`, `next`, and method call. +# +# @example +# # bad +# a = cond ? +# b : c +# a = cond ? b : +# c +# a = cond ? +# b : +# c +# +# return cond ? +# b : +# c +# +# # good +# a = cond ? b : c +# a = if cond +# b +# else +# c +# end +# +# return cond ? b : c +# +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#36 +class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#44 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#64 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#86 + def comments_in_condition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 + def enforce_single_line_ternary_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#72 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 + def use_assignment_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#40 +RuboCop::Cop::Style::MultilineTernaryOperator::MSG_IF = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#41 +RuboCop::Cop::Style::MultilineTernaryOperator::MSG_SINGLE_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#42 +RuboCop::Cop::Style::MultilineTernaryOperator::SINGLE_LINE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks uses of the `then` keyword +# in multi-line when statements. +# +# @example +# # bad +# case foo +# when bar then +# end +# +# # good +# case foo +# when bar +# end +# +# # good +# case foo +# when bar then do_something +# end +# +# # good +# case foo +# when bar then do_something(arg1, +# arg2) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#31 +class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#37 + def on_when(node); end + + private + + # Requires `then` for write `when` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#49 + def require_then?(when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#35 +RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks against comparing a variable with multiple items, where +# `Array#include?`, `Set#include?` or a `case` could be used instead +# to avoid code repetition. +# It accepts comparisons of multiple method calls to avoid unnecessary method calls +# by default. It can be configured by `AllowMethodComparison` option. +# +# @example +# # bad +# a = 'a' +# foo if a == 'a' || a == 'b' || a == 'c' +# +# # good +# a = 'a' +# foo if ['a', 'b', 'c'].include?(a) +# +# VALUES = Set['a', 'b', 'c'].freeze +# # elsewhere... +# foo if VALUES.include?(a) +# +# case foo +# when 'a', 'b', 'c' then foo +# # ... +# end +# +# # accepted (but consider `case` as above) +# foo if a == b.lightweight || a == b.heavyweight +# @example AllowMethodComparison: true (default) +# # good +# foo if a == b.lightweight || a == b.heavyweight +# @example AllowMethodComparison: false +# # bad +# foo if a == b.lightweight || a == b.heavyweight +# +# # good +# foo if [b.lightweight, b.heavyweight].include?(a) +# @example ComparisonsThreshold: 2 (default) +# # bad +# foo if a == 'a' || a == 'b' +# @example ComparisonsThreshold: 3 +# # good +# foo if a == 'a' || a == 'b' +# +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52 +class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#86 + def simple_comparison_lhs?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#91 + def simple_comparison_rhs?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 + def simple_double_comparison?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#153 + def allow_method_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#134 + def comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#157 + def comparisons_threshold; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 + def nested_comparison?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#95 + def nested_variable_comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#148 + def reset_comparison; end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#138 + def root_of_or_node(or_node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#122 + def variable_name(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 + def variables_in_node(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#109 + def variables_in_simple_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55 +RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks whether some constant value isn't a +# mutable literal (e.g. array or hash). +# +# Strict mode can be used to freeze all constants, rather than +# just literals. +# Strict mode is considered an experimental feature. It has not been +# updated with an exhaustive list of all methods that will produce +# frozen objects so there is a decent chance of getting some false +# positives. Luckily, there is no harm in freezing an already +# frozen object. +# +# From Ruby 3.0, this cop honours the magic comment +# 'shareable_constant_value'. When this magic comment is set to any +# acceptable value other than none, it will suppress the offenses +# raised by this cop. It enforces frozen state. +# +# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, interpolated strings are not frozen when +# `# frozen-string-literal: true` is used, so this cop enforces explicit +# freezing for such strings. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when +# the `shareable_constant_value` directive is used. +# +# @example EnforcedStyle: literals (default) +# # bad +# CONST = [1, 2, 3] +# +# # good +# CONST = [1, 2, 3].freeze +# +# # good +# CONST = <<~TESTING.freeze +# This is a heredoc +# TESTING +# +# # good +# CONST = Something.new +# @example EnforcedStyle: strict +# # bad +# CONST = Something.new +# +# # bad +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end +# +# # good +# CONST = Something.new.freeze +# +# # good +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end.freeze +# @example +# # Magic comment - shareable_constant_value: literal +# +# # bad +# CONST = [1, 2, 3] +# +# # good +# # shareable_constant_value: literal +# CONST = [1, 2, 3] +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 +class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 + def on_casgn(node); end + + # Some of these patterns may not actually return an immutable object, + # but we want to consider them immutable for this cop. + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#224 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#241 + def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 + def splat_value(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#169 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#158 + def check(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#208 + def correct_splat_expansion(corrector, expr, splat_value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#200 + def frozen_regexp_or_range_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#190 + def immutable_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#184 + def mutable_literal?(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#141 + def on_assignment(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#204 + def requires_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#194 + def shareable_constant_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#149 + def strict_check(value); end +end + +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#125 +RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) + +# Handles magic comment shareable_constant_value with O(n ^ 2) complexity +# n - number of lines in the source +# Iterates over all lines before a CONSTANT +# until it reaches shareable_constant_value +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#88 +module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + private + + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#110 + def processed_source_till_node(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#114 + def shareable_constant_value_enabled?(value); end + + class << self + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + end +end + +# Checks for uses of if with a negated condition. Only ifs +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `unless` for `prefix` and `postfix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# @example EnforcedStyle: prefix +# # enforces `unless` for just `prefix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # good +# +# bar if !foo +# @example EnforcedStyle: postfix +# # enforces `unless` for just `postfix` conditionals +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# +# # good +# +# if !foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 +class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#76 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#92 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#88 + def message(node); end +end + +# Checks for uses of `if-else` and ternary operators with a negated condition +# which can be simplified by inverting condition and swapping branches. +# +# @example +# # bad +# if !x +# do_something +# else +# do_something_else +# end +# +# # good +# if x +# do_something_else +# else +# do_something +# end +# +# # bad +# !x ? do_something : do_something_else +# +# # good +# x ? do_something_else : do_something +# +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#30 +class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 + def double_negation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#49 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#94 + def correct_negated_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#90 + def corrected_ancestor?(node); end + + # Collect the entire else branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#125 + def else_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#68 + def if_else?(node); end + + # Collect the entire if branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#116 + def if_range(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#84 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#79 + def negated_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#107 + def swap_branches(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#73 + def unwrap_begin_nodes(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#34 +RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#36 +RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for uses of unless with a negated condition. Only unless +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `if` for `prefix` and `postfix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# @example EnforcedStyle: prefix +# # enforces `if` for just `prefix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # good +# bar unless !foo +# @example EnforcedStyle: postfix +# # enforces `if` for just `postfix` conditionals +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# +# # good +# unless !foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 +class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#66 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#82 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#78 + def message(node); end +end + +# Checks for uses of while with a negated condition. +# +# @example +# # bad +# while !foo +# bar +# end +# +# # good +# until foo +# bar +# end +# +# # bad +# bar until !foo +# +# # good +# bar while foo +# bar while !foo && baz +# +# source://rubocop//lib/rubocop/cop/style/negated_while.rb#25 +class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 + def on_while(node); end +end + +# Checks for nested `File.dirname`. +# It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. +# +# @example +# +# # bad +# File.dirname(File.dirname(path)) +# +# # good +# File.dirname(path, 2) +# +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#17 +class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#28 + def file_dirname?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#60 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#49 + def path_with_dir_level(node, level); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#22 +RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#23 +RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for nested use of if, unless, while and until in their +# modifier form. +# +# @example +# +# # bad +# something if a if b +# +# # good +# something if b && a +# +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#16 +class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#85 + def add_parentheses_to_method_arguments(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#42 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#30 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#65 + def left_hand_operand(node, operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#38 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#51 + def new_expression(inner_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#61 + def replacement_operator(keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#94 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#71 + def right_hand_operand(node, left_hand_keyword); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#20 +RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for unparenthesized method calls in the argument list +# of a parenthesized method call. +# `be`, `be_a`, `be_an`, `be_between`, `be_falsey`, `be_kind_of`, `be_instance_of`, +# `be_truthy`, `be_within`, `eq`, `eql`, `end_with`, `include`, `match`, `raise_error`, +# `respond_to`, and `start_with` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # good +# method1(method2(arg)) +# +# # bad +# method1(method2 arg) +# @example AllowedMethods: [foo] +# # good +# method1(foo arg) +# +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#24 +class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#71 + def allowed?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#65 + def allowed_omission?(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#51 + def autocorrect(corrector, nested); end + + class << self + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#29 +RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested ternary op expressions. +# +# @example +# # bad +# a ? (b ? b1 : b2) : a2 +# +# # good +# if a +# b ? b1 : b2 +# else +# a2 +# end +# +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#18 +class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#25 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40 + def autocorrect(corrector, if_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47 + def remove_parentheses(source); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53 + def replace_loc_and_whitespace(corrector, range, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#23 +RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) + +# Use `next` to skip iteration instead of a condition at the end. +# +# @example EnforcedStyle: skip_modifier_ifs (default) +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# +# # good +# [1, 2].each do |a| +# puts a if a == 1 +# end +# @example EnforcedStyle: always +# # With `always` all conditions at the end of an iteration needs to be +# # replaced by next - with `skip_modifier_ifs` the modifier if like +# # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }` +# +# # bad +# [1, 2].each do |a| +# puts a if a == 1 +# end +# +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# +# source://rubocop//lib/rubocop/cop/style/next.rb#49 +class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/next.rb#68 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#62 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/next.rb#68 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/next.rb#213 + def actual_indent(lines, buffer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#112 + def allowed_modifier_if?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#155 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#145 + def autocorrect_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#84 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#170 + def cond_range(node, cond); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#189 + def end_followed_by_whitespace_only?(source_buffer, end_pos); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#180 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#98 + def ends_with_condition?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#128 + def exit_body_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#217 + def heredoc_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#120 + def if_else_children?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#124 + def if_without_else?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#140 + def offense_location(offense_node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#134 + def offense_node(body); end + + # Adjust indentation of `lines` to match `node` + # + # source://rubocop//lib/rubocop/cop/style/next.rb#204 + def reindent(lines, node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#224 + def reindent_line(corrector, lineno, delta, buffer); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#193 + def reindentable_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#104 + def simple_if_without_break?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/next.rb#58 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/next.rb#56 +RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/next.rb#55 +RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) + +# Checks for comparison of something with nil using `==` and +# `nil?`. +# +# Supported styles are: predicate, comparison. +# +# @example EnforcedStyle: predicate (default) +# +# # bad +# if x == nil +# end +# +# # good +# if x.nil? +# end +# @example EnforcedStyle: comparison +# +# # bad +# if x.nil? +# end +# +# # good +# if x == nil +# end +# +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#31 +class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#44 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#41 + def nil_comparison?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#46 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#67 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#79 + def prefer_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#71 + def style_check?(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#36 +RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#35 +RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#38 +RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for lambdas and procs that always return nil, +# which can be replaced with an empty lambda or proc instead. +# +# @example +# # bad +# -> { nil } +# +# lambda do +# next nil +# end +# +# proc { nil } +# +# Proc.new do +# break nil +# end +# +# # good +# -> {} +# +# lambda do +# end +# +# -> (x) { nil if x } +# +# proc {} +# +# Proc.new { nil if x } +# +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#35 +class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#42 + def nil_return?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#46 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#58 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#39 +RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-nil checks, which are usually redundant. +# +# With `IncludeSemanticChanges` set to `false` by default, this cop +# does not report offenses for `!x.nil?` and does no changes that might +# change behavior. +# Also `IncludeSemanticChanges` set to `false` with `EnforcedStyle: comparison` of +# `Style/NilComparison` cop, this cop does not report offenses for `x != nil` and +# does no changes to `!x.nil?` style. +# +# With `IncludeSemanticChanges` set to `true`, this cop reports offenses +# for `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which +# is *usually* OK, but might change behavior. +# +# @example +# # bad +# if x != nil +# end +# +# # good +# if x +# end +# +# # Non-nil checks are allowed if they are the final nodes of predicate. +# # good +# def signed_in? +# !current_user.nil? +# end +# @example IncludeSemanticChanges: false (default) +# # good +# if !x.nil? +# end +# @example IncludeSemanticChanges: true +# # bad +# if !x.nil? +# end +# +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#44 +class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#59 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#62 + def not_and_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#53 + def not_equal_to_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#64 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#56 + def unless_check?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#93 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#123 + def autocorrect_comparison(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#137 + def autocorrect_non_nil(corrector, node, inner_node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#145 + def autocorrect_unless_nil(corrector, node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#119 + def include_semantic_changes?; end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#110 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#150 + def nil_comparison_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#88 + def register_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#104 + def unless_and_nil_check?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#48 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#47 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#50 +RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the keyword `not` instead of `!`. +# +# @example +# +# # bad - parentheses are required because of op precedence +# x = (not something) +# +# # good +# x = !something +# +# source://rubocop//lib/rubocop/cop/style/not.rb#16 +class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/not.rb#32 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/not.rb#60 + def correct_opposite_method(corrector, range, child); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#65 + def correct_with_parens(corrector, range, node); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#70 + def correct_without_parens(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#50 + def opposite_method?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#54 + def requires_parens?(child); end +end + +# source://rubocop//lib/rubocop/cop/style/not.rb#20 +RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/not.rb#23 +RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/not.rb#21 +RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numbered parameters. +# +# It can either restrict the use of numbered parameters to +# single-lined blocks, or disallow completely numbered parameters. +# +# @example EnforcedStyle: allow_single_line (default) +# # bad +# collection.each do +# puts _1 +# end +# +# # good +# collection.each { puts _1 } +# @example EnforcedStyle: disallow +# # bad +# collection.each { puts _1 } +# +# # good +# collection.each { |item| puts item } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#27 +class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#36 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#31 +RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#32 +RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# Detects use of an excessive amount of numbered parameters in a +# single block. Having too many numbered parameters can make code too +# cryptic and hard to read. +# +# The cop defaults to registering an offense if there is more than 1 numbered +# parameter but this maximum can be configured by setting `Max`. +# +# @example Max: 1 (default) +# # bad +# use_multiple_numbered_parameters { _1.call(_2, _3, _4) } +# +# # good +# array.each { use_array_element_as_numbered_parameter(_1) } +# hash.each { use_only_hash_value_as_numbered_parameter(_2) } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#20 +class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#32 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#49 + def max_count; end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#43 + def numbered_parameter_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#24 +RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#29 +RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#30 +RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for octal, hex, binary, and decimal literals using +# uppercase prefixes and corrects them to lowercase prefix +# or no prefix (in case of decimals). +# +# @example EnforcedOctalStyle: zero_with_o (default) +# # bad - missing octal prefix +# num = 01234 +# +# # bad - uppercase prefix +# num = 0O1234 +# num = 0X12AB +# num = 0B10101 +# +# # bad - redundant decimal prefix +# num = 0D1234 +# num = 0d1234 +# +# # good +# num = 0o1234 +# num = 0x12AB +# num = 0b10101 +# num = 1234 +# @example EnforcedOctalStyle: zero_only +# # bad +# num = 0o1234 +# num = 0O1234 +# +# # good +# num = 01234 +# +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 +class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#52 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#109 + def format_binary(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#113 + def format_decimal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#105 + def format_hex(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#97 + def format_octal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#101 + def format_octal_zero_only(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#82 + def hex_bin_dec_literal_type(literal); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#68 + def literal_type(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#64 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#74 + def octal_literal_type(literal); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#93 + def octal_zero_only?; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#49 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#43 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#50 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#44 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#48 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#42 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#47 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#41 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#46 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#40 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks for big numeric literals without `_` between groups +# of digits in them. +# +# Additional allowed patterns can be added by adding regexps to +# the `AllowedPatterns` configuration. All regexps are treated +# as anchored even if the patterns do not contain anchors (so +# `\d{4}_\d{4}` will allow `1234_5678` but not `1234_5678_9012`). +# +# NOTE: Even if `AllowedPatterns` are given, autocorrection will +# only correct to the standard pattern of an `_` every 3 digits. +# +# @example +# +# # bad +# 1000000 +# 1_00_000 +# 1_0000 +# +# # good +# 1_000_000 +# 1000 +# @example Strict: false (default) +# +# # good +# 10_000_00 # typical representation of $10,000 in cents +# @example Strict: true +# +# # bad +# 10_000_00 # typical representation of $10,000 in cents +# @example AllowedNumbers: [3000] +# +# # good +# 3000 # You can specify allowed numbers. (e.g. port number) +# +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#43 +class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def min_digits=(value); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#60 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#56 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#118 + def allowed_numbers; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#122 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#66 + def check(node); end + + # @param int_part [String] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#107 + def format_int_part(int_part); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#93 + def format_number(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#114 + def min_digits; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#82 + def register_offense(node, &_block); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#89 + def short_group_regex; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#49 +RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#48 +RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of comparison operators (`==`, +# `>`, `<`) to test numbers as zero, positive, or negative. +# These can be replaced by their respective predicate methods. +# This cop can also be configured to do the reverse. +# +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. +# +# This cop disregards `#nonzero?` as its value is truthy or falsey, +# but not `true` and `false`, and thus not always interchangeable with +# `!= 0`. +# +# This cop allows comparisons to global variables, since they are often +# populated with objects which can be compared with integers, but are +# not themselves `Integer` polymorphic. +# +# @example EnforcedStyle: predicate (default) +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# +# # good +# foo.zero? +# foo.negative? +# bar.baz.positive? +# @example EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# +# # good +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [] (default) with EnforcedStyle: predicate +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [==] with EnforcedStyle: predicate +# # good +# foo == 0 +# +# # bad +# 0 > foo +# bar.baz > 0 +# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate +# # good +# # bad +# foo.zero? +# +# # bad +# foo.negative? +# bar.baz.positive? +# +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#78 +class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 + def comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 + def inverted_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 + def predicate(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#107 + def allowed_method_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 + def invert; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 + def parenthesized_source(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 + def replacement(node, numeric, operation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 + def replacement_supported?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 + def require_parentheses?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#84 +RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#86 +RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#88 +RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of consistent method names +# `Object#yield_self` or `Object#then`. +# +# @example EnforcedStyle: then (default) +# +# # bad +# obj.yield_self { |x| x.do_something } +# +# # good +# obj.then { |x| x.do_something } +# @example EnforcedStyle: yield_self +# +# # bad +# obj.then { |x| x.do_something } +# +# # good +# obj.yield_self { |x| x.do_something } +# +# source://rubocop//lib/rubocop/cop/style/object_then.rb#25 +class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#40 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 + def check_method_node(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/object_then.rb#59 + def preferred_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/object_then.rb#32 +RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of if/then/else/end constructs on a single line. +# AlwaysCorrectToMultiline config option can be set to true to auto-convert all offenses to +# multi-line constructs. When AlwaysCorrectToMultiline is false (default case) the +# autocorrect will first try converting them to ternary operators. +# +# @example +# # bad +# if foo then bar else baz end +# +# # bad +# unless foo then baz else bar end +# +# # good +# foo ? bar : baz +# +# # good +# bar if foo +# +# # good +# if foo then bar end +# +# # good +# if foo +# bar +# else +# baz +# end +# +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#33 +class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::OnNormalIfUnless + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#42 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#77 + def always_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + def cannot_replace_to_ternary?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#93 + def expr_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#114 + def keyword_with_changed_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#55 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#107 + def method_call_with_changed_precedence?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 + def requires_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#67 + def ternary_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + def ternary_replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#39 +RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) + +# Flags uses of OpenStruct, as it is now officially discouraged +# to be used for performance, version compatibility, and potential security issues. +# +# @example +# +# # bad +# point = OpenStruct.new(x: 0, y: 1) +# +# # good +# Point = Struct.new(:x, :y) +# point = Point.new(0, 1) +# +# # also good +# point = { x: 0, y: 1 } +# +# # bad +# test_double = OpenStruct.new(a: 'b') +# +# # good (assumes test using rspec-mocks) +# test_double = double +# allow(test_double).to receive(:a).and_return('b') +# +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#44 +class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#52 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#48 + def uses_open_struct?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#61 + def custom_class_or_module_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#45 +RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant dot before operator method call. +# The target operator methods are `|`, `^`, `&`, ``<=>``, `==`, `===`, `=~`, `>`, `>=`, `<`, +# ``<=``, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. +# +# @example +# +# # bad +# foo.+ bar +# foo.& bar +# +# # good +# foo + bar +# foo & bar +# +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#20 +class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 + def anonymous_forwarding?(argument); end + + # Checks for an acceptable case of `foo.+(bar).baz`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 + def method_call_with_parenthesized_arg?(argument); end + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 + def wrap_in_parentheses_if_chained(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 +RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#24 +RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for options hashes and discourages them if the +# current Ruby version supports keyword arguments. +# +# @example +# +# # bad +# def fry(options = {}) +# temperature = options.fetch(:temperature, 300) +# # ... +# end +# +# # good +# def fry(temperature: 300) +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#22 +class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#30 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#26 + def option_hash(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#39 + def allowlist; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#48 + def super_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#43 + def suspicious_name?(arg_name); end +end + +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#23 +RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) + +# Checks for optional arguments to methods +# that do not come at the end of the argument list. +# +# @example +# # bad +# def foo(a = 1, b, c) +# end +# +# # good +# def baz(a, b, c = 1) +# end +# +# def foobar(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#24 +class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#27 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#45 + def argument_positions(arguments); end + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#33 + def each_misplaced_optional_arg(arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#25 +RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where keyword arguments can be used instead of +# boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# def some_method(bar = false) +# puts bar +# end +# +# # bad - common hack before keyword args were introduced +# def some_method(options = {}) +# bar = options.fetch(:bar, false) +# puts bar +# end +# +# # good +# def some_method(bar: false) +# puts bar +# end +# @example AllowedMethods: ['some_method'] +# # good +# def some_method(bar = false) +# puts bar +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#37 +class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#56 + def format_message(argument); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#40 +RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for potential usage of the `||=` operator. +# +# @example +# # bad +# name = name ? name : 'Bozhidar' +# +# # bad +# name = if name +# name +# else +# 'Bozhidar' +# end +# +# # bad +# unless name +# name = 'Bozhidar' +# end +# +# # bad +# name = 'Bozhidar' unless name +# +# # good - set name to 'Bozhidar', only if it's nil or false +# name ||= 'Bozhidar' +# +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#29 +class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#51 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#35 + def ternary_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#44 + def unless_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 + def take_variable_and_default_from_ternary(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#85 + def take_variable_and_default_from_unless(node); end +end + +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#32 +RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for simple usages of parallel assignment. +# This will only complain when the number of variables +# being assigned matched the number of assigning variables. +# +# @example +# # bad +# a, b, c = 1, 2, 3 +# a, b, c = [1, 2, 3] +# +# # good +# one, two = *foo +# a, b = foo() +# a, b = b, a +# +# a = 1 +# b = 2 +# c = 3 +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#25 +class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 + def implicit_self_getter?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 + def on_masgn(node); end + + private + + # Converts (send nil :something) nodes to (send (:self) :something). + # This makes the sorting algorithm work for expressions such as + # `self.a, self.b = b, a`. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#117 + def add_self_to_getters(right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#64 + def allowed_lhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#58 + def allowed_masign?(lhs_elements, rhs_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 + def allowed_rhs?(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#84 + def assignment_corrector(node, rhs, order); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#49 + def autocorrect(corrector, node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#100 + def find_valid_order(left_elements, right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#183 + def modifier_statement?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 + def return_of_method_call?(node); end +end + +# Helper class necessitated by silly design of TSort prior to Ruby 2.1 +# Newer versions have a better API, but that doesn't help us +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 +class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter + include ::TSort + extend ::RuboCop::AST::NodePattern::Macros + + # @return [AssignmentSorter] a new instance of AssignmentSorter + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#141 + def initialize(assignments); end + + # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. + # Does `rhs` access the same value which is assigned by `lhs`? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 + def accesses?(rhs, lhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#163 + def dependency?(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#139 + def matching_calls(param0, param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#149 + def tsort_each_child(assignment); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 + def tsort_each_node(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 + def uses_var?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#133 + def var_name(param0 = T.unsafe(nil)); end +end + +# An internal class for correcting parallel assignment +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 +class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + include ::RuboCop::Cop::Alignment + + # @return [GenericCorrector] a new instance of GenericCorrector + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#195 + def initialize(node, rhs, modifier, config, new_elements); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#203 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#207 + def correction_range; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def node; end + + # Returns the value of attribute rescue_result. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rescue_result; end + + # Returns the value of attribute rhs. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rhs; end + + protected + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#213 + def assignment; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 + def extract_sources(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 + def source(node, loc); end +end + +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 +RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) + +# An internal class for correcting parallel assignment +# guarded by if, unless, while, or until +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 +class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 + def modifier_range(node); end +end + +# An internal class for correcting parallel assignment +# protected by rescue +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 +class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 + def begin_correction(rescue_result); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 + def def_correction(rescue_result); end +end + +# Checks for the presence of superfluous parentheses around the +# condition of if/unless/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# x += 1 while (x < 10) +# foo unless (bar || baz) +# +# if (x > 10) +# elsif (x < 3) +# end +# +# # good +# x += 1 while x < 10 +# foo unless bar || baz +# +# if x > 10 +# elsif x < 3 +# end +# @example AllowSafeAssignment: true (default) +# # good +# foo unless (bar = baz) +# @example AllowSafeAssignment: false +# # bad +# foo unless (bar = baz) +# @example AllowInMultilineConditions: false (default) +# # bad +# if (x > 10 && +# y > 10) +# end +# +# # good +# if x > 10 && +# y > 10 +# end +# @example AllowInMultilineConditions: true +# # good +# if (x > 10 && +# y > 10) +# end +# +# source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 +class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::Parentheses + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#76 + def control_op_condition(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#62 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#130 + def allow_multiline_conditions?; end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#118 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#111 + def modifier_op?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#124 + def parens_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 + def process_control_op(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#96 + def require_parentheses?(node, condition_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 + def semicolon_separated_expressions?(first_exp, rest_exps); end +end + +# Enforces the consistent usage of `%`-literal delimiters. +# +# Specify the 'default' key to set all preferred delimiters at once. You +# can continue to specify individual preferred delimiters to override the +# default. +# +# @example +# # Style/PercentLiteralDelimiters: +# # PreferredDelimiters: +# # default: '[]' +# # '%i': '()' +# +# # good +# %w[alpha beta] + %i(gamma delta) +# +# # bad +# %W(alpha #{beta}) +# +# # bad +# %I(alpha beta) +# +# source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#26 +class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#30 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#34 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#43 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#47 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#93 + def contains_delimiter?(node, delimiters); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#82 + def contains_preferred_delimiter?(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#86 + def include_same_character_as_used_for_delimiter?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#107 + def matchpairs(begin_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#67 + def message(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#53 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#74 + def preferred_delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#99 + def string_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#78 + def uses_preferred_delimiter?(node, type); end +end + +# Checks for usage of the %Q() syntax when %q() would do. +# +# @example EnforcedStyle: lower_case_q (default) +# # The `lower_case_q` style prefers `%q` unless +# # interpolation is needed. +# # bad +# %Q[Mix the foo into the baz.] +# %Q(They all said: 'Hooray!') +# +# # good +# %q[Mix the foo into the baz] +# %q(They all said: 'Hooray!') +# @example EnforcedStyle: upper_case_q +# # The `upper_case_q` style requires the sole use of `%Q`. +# # bad +# %q/Mix the foo into the baz./ +# %q{They all said: 'Hooray!'} +# +# # good +# %Q/Mix the foo into the baz./ +# %Q{They all said: 'Hooray!'} +# +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#28 +class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#36 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#55 + def correct_literal_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#64 + def corrected(src); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#60 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#42 + def on_percent_literal(node); end +end + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#33 +RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#34 +RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style regexp match +# backreferences and their English versions like +# $1, $2, $&, &+, $MATCH, $PREMATCH, etc. +# +# @example +# # bad +# puts $1 +# +# # good +# puts Regexp.last_match(1) +# +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#16 +class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#21 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#25 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#29 + def on_nth_ref(node); end + + private + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#99 + def constant_prefix(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#38 + def derived_from_braceless_interpolation?(node); end + + # @param node [RuboCop::AST::Node] + # @param preferred_expression [String] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#46 + def format_message(node:, preferred_expression:); end + + # @param node [RuboCop::AST::Node] + # @private + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#109 + def on_back_ref_or_gvar_or_nth_ref(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#58 + def original_expression_of(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#70 + def preferred_expression_to(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#89 + def preferred_expression_to_node_with_constant_prefix(node); end +end + +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#19 +RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) + +# Checks for uses of methods `Hash#has_key?` and +# `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. +# +# It is configurable to enforce the verbose method names, by using the +# `EnforcedStyle: verbose` configuration. +# +# @example EnforcedStyle: short (default) +# # bad +# Hash#has_key? +# Hash#has_value? +# +# # good +# Hash#key? +# Hash#value? +# @example EnforcedStyle: verbose +# # bad +# Hash#key? +# Hash#value? +# +# # good +# Hash#has_key? +# Hash#has_value? +# +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#33 +class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#56 + def message(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#68 + def offending_selector?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#60 + def proper_method_name(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#37 +RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#39 +RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#41 +RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of Proc.new where Kernel#proc +# would be more appropriate. +# +# @example +# # bad +# p = Proc.new { |n| puts n } +# +# # good +# p = proc { |n| puts n } +# +# source://rubocop//lib/rubocop/cop/style/proc.rb#16 +class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#22 + def proc_new?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/proc.rb#19 +RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) + +# Checks if the quotes used for quoted symbols match the configured defaults. +# By default uses the same configuration as `Style/StringLiterals`; if that +# cop is not enabled, the default `EnforcedStyle` is `single_quotes`. +# +# String interpolation is always kept in double quotes. +# +# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# are not quoted that don't need to be. This cop is for configuring the quoting +# style to use for symbols that require quotes. +# +# @example EnforcedStyle: same_as_string_literals (default) / single_quotes +# # bad +# :"abc-def" +# +# # good +# :'abc-def' +# :"#{str}" +# :"a\'b" +# @example EnforcedStyle: double_quotes +# # bad +# :'abc-def' +# +# # good +# :"abc-def" +# :"#{str}" +# :"a\'b" +# +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#33 +class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#44 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#88 + def correct_quotes(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#83 + def hash_colon_key?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#61 + def invalid_double_quotes?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 + def quoted?(sym_node); end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 + def wrong_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#41 +RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#39 +RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) + +# Checks the args passed to `fail` and `raise`. For exploded +# style (default), it recommends passing the exception class and message +# to `raise`, rather than construct an instance of the error. It will +# still allow passing just a message, or the construction of an error +# with more than one argument. +# +# The exploded style works identically, but with the addition that it +# will also suggest constructing error objects when the exception is +# passed multiple arguments. +# +# The exploded style has an `AllowedCompactTypes` configuration +# option that takes an Array of exception name Strings. +# +# @example EnforcedStyle: exploded (default) +# # bad +# raise StandardError.new('message') +# +# # good +# raise StandardError, 'message' +# fail 'message' +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# raise MyKwArgError.new(key1: val1, key2: val2) +# +# # With `AllowedCompactTypes` set to ['MyWrappedError'] +# raise MyWrappedError.new(obj) +# raise MyWrappedError.new(obj), 'message' +# @example EnforcedStyle: compact +# # bad +# raise StandardError, 'message' +# raise RuntimeError, arg1, arg2, arg3 +# +# # good +# raise StandardError.new('message') +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# fail 'message' +# +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 +class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#132 + def acceptable_exploded_args?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#146 + def allowed_non_exploded_type?(arg); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#95 + def check_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#111 + def check_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#69 + def correction_compact_to_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#81 + def correction_exploded_to_compact(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#152 + def requires_parens?(parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#128 + def use_new_method?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#52 +RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 +RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#54 +RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of randomly generated numbers, +# added/subtracted with integer literals, as well as those with +# Integer#succ and Integer#pred methods. Prefer using ranges instead, +# as it clearly states the intentions. +# +# @example +# # bad +# rand(6) + 1 +# 1 + rand(6) +# rand(6) - 1 +# 1 - rand(6) +# rand(6).succ +# rand(6).pred +# Random.rand(6) + 1 +# Kernel.rand(6) + 1 +# rand(0..5) + 1 +# +# # good +# rand(1..6) +# rand(1...7) +# +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#26 +class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#33 + def integer_op_rand?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#63 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#54 + def rand_modified?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#43 + def rand_op_integer?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#73 + def random_call(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#147 + def to_int(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#78 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#135 + def boundaries_from_random_node(random_node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#88 + def corrected_integer_op_rand(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#118 + def corrected_rand_modified(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#103 + def corrected_rand_op_integer(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#131 + def prefix_from_prefix_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#29 +RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#30 +RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for a redundant argument passed to certain methods. +# +# NOTE: This cop is limited to methods with single parameter. +# +# Method names and their redundant arguments can be configured like this: +# +# [source,yaml] +# ---- +# Methods: +# join: '' +# sum: 0 +# split: ' ' +# chomp: "\n" +# chomp!: "\n" +# foo: 2 +# ---- +# +# @example +# # bad +# array.join('') +# [1, 2, 3].join("") +# array.sum(0) +# exit(true) +# exit!(false) +# string.split(" ") +# "first\nsecond".split(" ") +# string.chomp("\n") +# string.chomp!("\n") +# A.foo(2) +# +# # good +# array.join +# [1, 2, 3].join +# array.sum +# exit +# exit! +# string.split +# "first second".split +# string.chomp +# string.chomp! +# A.foo +# +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 +class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108 + def argument_matched?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100 + def argument_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120 + def exclude_cntrl_character?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 + def redundant_arg_for_method(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#80 + def redundant_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 +RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of array using redundant `Array` constructor. +# Autocorrect replaces to array literal which is the simplest and fastest. +# +# @example +# +# # bad +# Array.new([]) +# Array[] +# Array([]) +# Array.new(['foo', 'foo', 'foo']) +# Array['foo', 'foo', 'foo'] +# Array(['foo', 'foo', 'foo']) +# +# # good +# [] +# ['foo', 'foo', 'foo'] +# Array.new(3, 'foo') +# Array.new(3) { 'foo' } +# +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25 +class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33 + def redundant_array_constructor(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69 + def register_offense(range, node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28 +RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30 +RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant assignment before returning. +# +# @example +# # bad +# def test +# x = foo +# x +# end +# +# # bad +# def test +# if x +# z = foo +# z +# elsif y +# z = bar +# z +# end +# end +# +# # good +# def test +# foo +# end +# +# # good +# def test +# if x +# foo +# elsif y +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#40 +class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#46 + def redundant_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#99 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#79 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#74 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#95 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#84 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 + def check_rescue_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#43 +RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `begin` blocks. +# +# Currently it checks for code like this: +# +# @example +# +# # bad +# def redundant +# begin +# ala +# bala +# rescue StandardError => e +# something +# end +# end +# +# # good +# def preferred +# ala +# bala +# rescue StandardError => e +# something +# end +# +# # bad +# begin +# do_something +# end +# +# # good +# do_something +# +# # bad +# # When using Ruby 2.5 or later. +# do_something do +# begin +# something +# rescue => ex +# anything +# end +# end +# +# # good +# # In Ruby 2.5 or later, you can omit `begin` in `do-end` block. +# do_something do +# something +# rescue => ex +# anything +# end +# +# # good +# # Stabby lambdas don't support implicit `begin` in `do-end` blocks. +# -> do +# begin +# foo +# rescue Bar +# baz +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#65 +class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#72 + def offensive_kwbegins(param0); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#95 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#103 + def allowable_kwbegin?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 + def begin_block_has_multiline_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + def condition_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 + def contain_rescue_or_ensure?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 + def correct_modifier_form_after_multiline_begin_block(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + def empty_begin?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 + def register_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 + def remove_begin(corrector, offense_range, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 + def replace_begin_with_statement(corrector, offense_range, node); end + + # Restore comments that occur between "begin" and "first_child". + # These comments will be moved to above the assignment line. + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 + def restore_removed_comments(corrector, offense_range, node, first_child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 + def use_modifier_form_after_multiline_begin_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 + def valid_begin_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 + def valid_context_using_only_begin?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 +RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of the %W() syntax when %w() would do. +# +# @example +# # bad +# %W(cat dog pig) +# %W[door wall floor] +# +# # good +# %w/swim run bike/ +# %w[shirt pants shoes] +# %W(apple #{fruit} grape) +# +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#17 +class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#23 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#29 + def on_percent_literal(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#38 + def requires_interpolation?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#21 +RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary conditional expressions. +# +# @example +# # bad +# a = b ? b : c +# +# # good +# a = b || c +# +# # bad +# if b +# b +# else +# c +# end +# +# # good +# b || c +# +# # good +# if b +# b +# elsif cond +# c +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32 +class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 + def on_if(node); end + + private + + # If the argument is using an operator, it is an invalid syntax. + # e.g. `foo || *bar`, `foo || **bar`, and `foo || &bar`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 + def argument_with_operator?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 + def asgn_type?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 + def branches_have_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 + def branches_have_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 + def correct_ternary(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 + def else_source(else_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 + def else_source_if_has_assignment(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 + def else_source_if_has_method(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 + def if_source(if_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 + def make_ternary_form(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 + def range_of_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 + def redundant_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 + def require_braces?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 + def same_method?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 + def single_argument_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 + def synonymous_condition_and_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 + def use_arithmetic_operation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 + def use_hash_key_access?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 + def use_hash_key_assignment?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 + def use_if_branch?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 + def without_argument_parentheses_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36 +RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) + +# Checks for redundant returning of true/false in conditionals. +# +# @example +# # bad +# x == y ? true : false +# +# # bad +# if x == y +# true +# else +# false +# end +# +# # good +# x == y +# +# # bad +# x == y ? false : true +# +# # good +# x != y +# +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#27 +class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#36 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#56 + def redundant_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#61 + def redundant_condition_inverted?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 + def indented_else_node(expression, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#65 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#71 + def replacement_condition(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#32 +RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#34 +RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) + +# Avoid redundant `::` prefix on constant. +# +# How Ruby searches constant is a bit complicated, and it can often be difficult to +# understand from the code whether the `::` is intended or not. Where `Module.nesting` +# is empty, there is no need to prepend `::`, so it would be nice to consistently +# avoid such meaningless `::` prefix to avoid confusion. +# +# NOTE: This cop is disabled if `Lint/ConstantResolution` cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# `Lint/ConstantResolution` cop which is disabled by default. +# +# @example +# # bad +# ::Const +# +# # good +# Const +# +# # bad +# class << self +# ::Const +# end +# +# # good +# class << self +# Const +# end +# +# # good +# class A +# ::Const +# end +# +# # good +# module A +# ::Const +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#43 +class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#48 + def on_cbase(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#67 + def bad?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#63 + def lint_constant_resolution_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#59 + def lint_constant_resolution_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#71 + def module_nesting_ancestors_of(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#77 + def used_in_super_class_part?(node, class_node:); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 +RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a redundant current directory in path. +# +# @example +# +# # bad +# require_relative './path/to/feature' +# +# # good +# require_relative 'path/to/feature' +# +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#16 +class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of double splat hash braces. +# +# @example +# +# # bad +# do_something(**{foo: bar, baz: qux}) +# +# # good +# do_something(foo: bar, baz: qux) +# +# # bad +# do_something(**{foo: bar, baz: qux}.merge(options)) +# +# # good +# do_something(foo: bar, baz: qux, **options) +# +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22 +class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45 + def allowed_double_splat_receiver?(kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55 + def autocorrect(corrector, node, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89 + def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 + def closing_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111 + def convert_to_new_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 + def extract_send_methods(kwsplat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123 + def mergeable?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 + def opening_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100 + def range_of_merge_methods(merge_methods); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66 + def root_receiver(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75 + def select_merge_method_nodes(kwsplat); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `each`. +# +# @example +# +# # bad +# array.each.each { |v| do_something(v) } +# +# # good +# array.each { |v| do_something(v) } +# +# # bad +# array.each.each_with_index { |v, i| do_something(v, i) } +# +# # good +# array.each.with_index { |v, i| do_something(v, i) } +# array.each_with_index { |v, i| do_something(v, i) } +# +# # bad +# array.each.each_with_object { |v, o| do_something(v, o) } +# +# # good +# array.each.with_object { |v, o| do_something(v, o) } +# array.each_with_object { |v, o| do_something(v, o) } +# +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#34 +class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#96 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 + def range(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#64 + def redundant_each_method(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#107 + def remove_redundant_each(corrector, range, redundant_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#37 +RuboCop::Cop::Style::RedundantEach::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#38 +RuboCop::Cop::Style::RedundantEach::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#39 +RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#41 +RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for RuntimeError as the argument of raise/fail. +# +# @example +# # bad +# raise RuntimeError, 'message' +# raise RuntimeError.new('message') +# +# # good +# raise 'message' +# +# # bad - message is not a string +# raise RuntimeError, Object.new +# raise RuntimeError.new(Object.new) +# +# # good +# raise Object.new.to_s +# +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 +class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79 + def compact?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 + def exploded?(param0 = T.unsafe(nil)); end + + # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and + # `raise RuntimeError.new('message')` to `raise 'message'`. + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57 + def fix_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39 + def fix_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65 + def replaced_compact(message); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47 + def replaced_exploded(node, command, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53 + def string_message?(message); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26 +RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27 +RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 +RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. +# +# In such cases `fetch(key, value)` method is faster than `fetch(key) { value }`. +# +# NOTE: The block string `'value'` in `hash.fetch(:key) { 'value' }` is detected +# but not when disabled. +# +# @example SafeForConstants: false (default) +# # bad +# hash.fetch(:key) { 5 } +# hash.fetch(:key) { true } +# hash.fetch(:key) { nil } +# array.fetch(5) { :value } +# ENV.fetch(:key) { 'value' } +# +# # good +# hash.fetch(:key, 5) +# hash.fetch(:key, true) +# hash.fetch(:key, nil) +# array.fetch(5, :value) +# ENV.fetch(:key, 'value') +# @example SafeForConstants: true +# # bad +# ENV.fetch(:key) { VALUE } +# +# # good +# ENV.fetch(:key, VALUE) +# +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#40 +class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#55 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#89 + def rails_cache?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#48 + def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#74 + def basic_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#104 + def build_bad_method(send, body); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#97 + def build_good_method(send, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#111 + def check_for_constant?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#115 + def check_for_string?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#78 + def const_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#93 + def fetch_range(send, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#82 + def should_not_check?(send, body); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#45 +RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of superfluous `.rb` extension in +# the filename provided to `require` and `require_relative`. +# +# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so', +# and so on to the name until found. If the file named cannot be found, +# a `LoadError` will be raised. +# There is an edge case where `foo.so` file is loaded instead of a `LoadError` +# if `foo.so` file exists when `require 'foo.rb'` will be changed to `require 'foo'`, +# but that seems harmless. +# +# @example +# # bad +# require 'foo.rb' +# require_relative '../foo.rb' +# +# # good +# require 'foo' +# require 'foo.so' +# require_relative '../foo' +# require_relative '../foo.so' +# +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#27 +class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#39 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#53 + def extension_range(name_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#31 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `any?`, `empty?` or `none?` predicate methods +# chained to `select`/`filter`/`find_all` and change them to use predicate method instead. +# +# @example +# # bad +# arr.select { |x| x > 1 }.any? +# +# # good +# arr.any? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.empty? +# arr.select { |x| x > 1 }.none? +# +# # good +# arr.none? { |x| x > 1 } +# +# # good +# relation.select(:name).any? +# arr.select { |x| x > 1 }.any?(&:odd?) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.select { |x| x > 1 }.present? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.many? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.present? +# +# # good +# arr.any? { |x| x > 1 } +# +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53 +class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62 + def select_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108 + def offense_range(select_node, predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112 + def predicate_range(predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94 + def register_offense(select_node, predicate_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 +RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58 +RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71 +RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 +RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for uses of `Object#freeze` on immutable objects. +# +# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated +# string literals when `# frozen-string-literal: true` is used. +# +# @example +# # bad +# CONST = 1.freeze +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#19 +class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#26 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#57 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#39 + def immutable_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#48 + def strip_parenthesis(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#23 +RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#24 +RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant heredoc delimiter quotes. +# +# @example +# +# # bad +# do_something(<<~'EOS') +# no string interpolation style text +# EOS +# +# # good +# do_something(<<~EOS) +# no string interpolation style text +# EOS +# +# do_something(<<~'EOS') +# #{string_interpolation_style_text_not_evaluated} +# EOS +# +# do_something(<<~'EOS') +# Preserve \ +# newlines +# EOS +# +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#29 +class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#36 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#48 + def need_heredoc_delimiter_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#33 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#34 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for `initialize` methods that are redundant. +# +# An initializer is redundant if it does not do anything, or if it only +# calls `super` with the same arguments given to it. If the initializer takes +# an argument that accepts multiple values (`restarg`, `kwrestarg`, etc.) it +# will not register an offense, because it allows the initializer to take a different +# number of arguments as its superclass potentially does. +# +# NOTE: If an initializer argument has a default value, RuboCop assumes it +# to *not* be redundant. +# +# NOTE: Empty initializers are registered as offenses, but it is possible +# to purposely create an empty `initialize` method to override a superclass's +# initializer. +# +# @example +# # bad +# def initialize +# end +# +# # bad +# def initialize +# super +# end +# +# # bad +# def initialize(a, b) +# super +# end +# +# # bad +# def initialize(a, b) +# super(a, b) +# end +# +# # good +# def initialize +# do_something +# end +# +# # good +# def initialize +# do_something +# super +# end +# +# # good (different number of parameters) +# def initialize(a, b) +# super(a) +# end +# +# # good (default value) +# def initialize(a, b = 5) +# super +# end +# +# # good (default value) +# def initialize(a, b: 5) +# super +# end +# +# # good (changes the parameter requirements) +# def initialize(*) +# end +# +# # good (changes the parameter requirements) +# def initialize(**) +# end +# +# # good (changes the parameter requirements) +# def initialize(...) +# end +# @example AllowComments: true (default) +# +# # good +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# @example AllowComments: false +# +# # bad +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#97 +class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#106 + def initialize_forwards?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#110 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#134 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#142 + def allow_comments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#138 + def forwards?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#128 + def register_offense(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#148 + def same_args?(super_node, args); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#102 +RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#103 +RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# Checks for strings that are just an interpolated expression. +# +# @example +# +# # bad +# "#{@var}" +# +# # good +# @var.to_s +# +# # good if @var is already a String +# @var +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#39 +class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#49 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#122 + def autocorrect_other(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#105 + def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#99 + def autocorrect_variable_interpolation(corrector, embedded_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#95 + def embedded_in_percent_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#91 + def implicit_concatenation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#83 + def interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#132 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#67 + def single_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#74 + def single_variable_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#87 + def variable_interpolation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#45 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 +RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for redundant line continuation. +# +# This cop marks a line continuation as redundant if removing the backslash +# does not result in a syntax error. +# However, a backslash at the end of a comment or +# for string concatenation is not redundant and is not considered an offense. +# +# @example +# # bad +# foo. \ +# bar +# foo \ +# &.bar \ +# .baz +# +# # good +# foo. +# bar +# foo +# &.bar +# .baz +# +# # bad +# [foo, \ +# bar] +# {foo: \ +# bar} +# +# # good +# [foo, +# bar] +# {foo: +# bar} +# +# # bad +# foo(bar, \ +# baz) +# +# # good +# foo(bar, +# baz) +# +# # also good - backslash in string concatenation is not redundant +# foo('bar' \ +# 'baz') +# +# # also good - backslash at the end of a comment is not redundant +# foo(bar, # \ +# baz) +# +# # also good - backslash at the line following the newline begins with a + or -, +# # it is not redundant +# 1 \ +# + 2 \ +# - 3 +# +# # also good - backslash with newline between the method name and its arguments, +# # it is not redundant. +# some_method \ +# (argument) +# +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#67 +class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#183 + def argument_is_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#147 + def argument_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 + def ends_with_backslash_without_comment?(source_line); end + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 + def find_node_for_line(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132 + def inside_string_literal?(range, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 + def inside_string_literal_or_method_with_argument?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#118 + def leading_dot_method_chain_with_blank_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#190 + def method_call_with_arguments?(node); end + + # A method call without parentheses such as the following cannot remove `\`: + # + # do_something \ + # argument + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#140 + def method_with_argument?(current_token, next_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 + def redundant_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 + def require_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 + def same_line?(node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#194 + def start_with_arithmetic_operator?(source_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 + def string_concatenation?(source_line); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 +RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#77 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 +RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant parentheses. +# +# @example +# +# # bad +# (x) if ((y.z).nil?) +# +# # good +# x if y.z.nil? +# +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#16 +class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Parentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32 + def allowed_pin_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#35 + def arg_in_call_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#269 + def first_send_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#274 + def first_super_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#279 + def first_yield_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 + def interpolation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26 + def method_node_and_args(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#37 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29 + def rescue?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 + def square_brackets?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + def allow_in_multiline_conditions?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68 + def allowed_ancestor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#60 + def allowed_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#73 + def allowed_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#78 + def allowed_multiple_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#87 + def allowed_ternary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#283 + def call_chain_starts_with_int?(begin_node, send_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#136 + def check(begin_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#184 + def check_send(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 + def check_unary(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 + def disallowed_literal?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114 + def empty_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#147 + def find_offense_message(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 + def first_arg_begins_with_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#258 + def first_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#53 + def ignore_syntax?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 + def keyword_ancestor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 + def keyword_with_redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#100 + def like_method_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#245 + def method_call_with_redundant_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#128 + def method_chain_begins_with_hash_literal(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 + def multiline_control_flow_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 + def offense(node, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#254 + def only_begin_arg?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#45 + def parens_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 + def raised_to_power_negative_numeric?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 + def suspect_unary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#93 + def ternary_parentheses_required?; end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 +RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for usage of the %q/%Q syntax when '' or "" would do. +# +# @example +# +# # bad +# name = %q(Bruce Wayne) +# time = %q(8 o'clock) +# question = %q("What did you say?") +# +# # good +# name = 'Bruce Wayne' +# time = "8 o'clock" +# question = '"What did you say?"' +# +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#20 +class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#34 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#40 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#99 + def acceptable_capital_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#91 + def acceptable_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#67 + def allowed_percent_q?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#51 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#63 + def interpolated_quotes?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#72 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#87 + def start_with_percent_q_variant?(string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#82 + def string_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#25 +RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#28 +RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#32 +RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#23 +RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#30 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#29 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#27 +RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#26 +RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 +RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Identifies places where argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'foo'.byteindex(/f/) +# 'foo'.byterindex(/f/) +# 'foo'.gsub(/f/, 'x') +# 'foo'.gsub!(/f/, 'x') +# 'foo'.partition(/f/) +# 'foo'.rpartition(/f/) +# 'foo'.scan(/f/) +# 'foo'.split(/f/) +# 'foo'.start_with?(/f/) +# 'foo'.sub(/f/, 'x') +# 'foo'.sub!(/f/, 'x') +# +# # good +# 'foo'.byteindex('f') +# 'foo'.byterindex('f') +# 'foo'.gsub('f', 'x') +# 'foo'.gsub!('f', 'x') +# 'foo'.partition('f') +# 'foo'.rpartition('f') +# 'foo'.scan('f') +# 'foo'.split('f') +# 'foo'.start_with?('f') +# 'foo'.sub('f', 'x') +# 'foo'.sub!('f', 'x') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 +class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 + def determinist_regexp?(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 + def preferred_argument(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 + def replacement(regexp_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 +RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 +RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for unnecessary single-element Regexp character classes. +# +# @example +# +# # bad +# r = /[x]/ +# +# # good +# r = /x/ +# +# # bad +# r = /[\s]/ +# +# # good +# r = /\s/ +# +# # bad +# r = %r{/[b]} +# +# # good +# r = %r{/b} +# +# # good +# r = /[ab]/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#30 +class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#37 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#101 + def backslash_b?(elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#53 + def each_redundant_character_class(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#61 + def each_single_element_character_class(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#83 + def multiple_codepoints?(expression); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#107 + def octal_requiring_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#72 + def redundant_single_element_character_class?(node, char_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#113 + def requires_escape_outside_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#95 + def whitespace_in_free_space_mode?(node, elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#87 + def without_character_class(loc); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#34 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`. +# Autocorrect replaces to regexp literal which is the simplest and fastest. +# +# @example +# +# # bad +# Regexp.new(/regexp/) +# Regexp.compile(/regexp/) +# +# # good +# /regexp/ +# Regexp.new('regexp') +# Regexp.compile('regexp') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20 +class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27 + def redundant_regexp_constructor(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23 +RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 +RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant escapes inside Regexp literals. +# +# @example +# # bad +# %r{foo\/bar} +# +# # good +# %r{foo/bar} +# +# # good +# /foo\/bar/ +# +# # good +# %r/foo\/bar/ +# +# # good +# %r!foo\!bar! +# +# # bad +# /a\-b/ +# +# # good +# /a-b/ +# +# # bad +# /[\+\-]\d/ +# +# # good +# /[+\-]\d/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#35 +class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#45 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#60 + def allowed_escape?(node, char, index, within_character_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#76 + def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 + def delimiter?(node, char); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 + def each_escape(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110 + def escape_range_at_index(node, index); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#41 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#43 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#42 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#39 +RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) + +# Checks for redundant `return` expressions. +# +# @example +# # These bad cases should be extended to handle methods whose body is +# # if/else or a case expression with a default branch. +# +# # bad +# def test +# return something +# end +# +# # bad +# def test +# one +# two +# three +# return something +# end +# +# # bad +# def test +# return something if something_else +# end +# +# # good +# def test +# something if something_else +# end +# +# # good +# def test +# if x +# elsif y +# else +# end +# end +# @example AllowMultipleReturnValues: false (default) +# # bad +# def test +# return x, y +# end +# @example AllowMultipleReturnValues: true +# # good +# def test +# return x, y +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 +class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 + def add_braces(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 + def add_brackets(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#175 + def allow_multiple_return_values?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#170 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#144 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#139 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#165 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#149 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#161 + def check_resbody_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#156 + def check_rescue_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#127 + def check_return_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 + def correct_with_arguments(return_node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 + def correct_without_arguments(return_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 + def hash_without_braces?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#179 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 +RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 +RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 +RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `self`. +# +# The usage of `self` is only needed when: +# +# * Sending a message to same object with zero arguments in +# presence of a method name clash with an argument or a local +# variable. +# +# * Calling an attribute writer to prevent a local variable assignment. +# +# Note, with using explicit self you can only send messages with public or +# protected scope, you cannot send private messages this way. +# +# Note we allow uses of `self` with operators because it would be awkward +# otherwise. Also allows the use of `self.it` without arguments in blocks, +# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# +# @example +# +# # bad +# def foo(bar) +# self.baz +# end +# +# # good +# def foo(bar) +# self.bar # Resolves name clash with the argument. +# end +# +# def foo +# bar = 1 +# self.bar # Resolves name clash with the local variable. +# end +# +# def foo +# %w[x y z].select do |bar| +# self.bar == bar # Resolves name clash with argument of the block. +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 +class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # @return [RedundantSelf] a new instance of RedundantSelf + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 + def on_blockarg(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 + def on_def(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 + def on_op_asgn(node); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 + def add_lhs_to_local_variables_scopes(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 + def add_masgn_lhs_variables(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 + def add_match_var_scopes(in_pattern_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 + def add_scope(node, local_variables = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 + def allow_self(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 + def allowed_send_node?(node); end + + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + def on_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 + def regular_method_call?(node); end + + class << self + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#38 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 +RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where redundant assignments are made for in place +# modification methods. +# +# @example +# # bad +# args = args.concat(ary) +# hash = hash.merge!(other) +# +# # good +# args.concat(foo) +# args += foo +# hash.merge!(other) +# +# # bad +# self.foo = foo.concat(ary) +# +# # good +# foo.concat(ary) +# self.foo += ary +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 +class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#96 + def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#86 + def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#112 + def correction_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#81 + def method_returning_self?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#105 + def redundant_assignment?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#45 +RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#38 +RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#35 +RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where conditional branch makes redundant self-assignment. +# +# It only detects local variable because it may replace state of instance variable, +# class variable, and global variable that have state across methods with `nil`. +# +# @example +# +# # bad +# foo = condition ? bar : foo +# +# # good +# foo = bar if condition +# +# # bad +# foo = condition ? foo : bar +# +# # good +# foo = bar unless condition +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 +class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#32 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#36 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#59 + def inconvertible_to_modifier?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 + def multiple_statements?(branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 + def register_offense(if_node, offense_branch, opposite_branch, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 + def self_assign?(variable, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#53 + def use_if_and_else_branch?(expression); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#29 +RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) + +# Identifies instances of sorting and then +# taking only the first or last element. The same behavior can +# be accomplished without a relatively expensive sort by using +# `Enumerable#min` instead of sorting and taking the first +# element and `Enumerable#max` instead of sorting and taking the +# last element. Similarly, `Enumerable#min_by` and +# `Enumerable#max_by` can replace `Enumerable#sort_by` calls +# after which only the first or last element is used. +# +# @example +# # bad +# [2, 1, 3].sort.first +# [2, 1, 3].sort[0] +# [2, 1, 3].sort.at(0) +# [2, 1, 3].sort.slice(0) +# +# # good +# [2, 1, 3].min +# +# # bad +# [2, 1, 3].sort.last +# [2, 1, 3].sort[-1] +# [2, 1, 3].sort.at(-1) +# [2, 1, 3].sort.slice(-1) +# +# # good +# [2, 1, 3].max +# +# # bad +# arr.sort_by(&:foo).first +# arr.sort_by(&:foo)[0] +# arr.sort_by(&:foo).at(0) +# arr.sort_by(&:foo).slice(0) +# +# # good +# arr.min_by(&:foo) +# +# # bad +# arr.sort_by(&:foo).last +# arr.sort_by(&:foo)[-1] +# arr.sort_by(&:foo).at(-1) +# arr.sort_by(&:foo).slice(-1) +# +# # good +# arr.max_by(&:foo) +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#79 +class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#88 + def redundant_sort?(param0 = T.unsafe(nil)); end + + private + + # This gets the start of the accessor whether it has a dot + # (e.g. `.first`) or doesn't (e.g. `[0]`) + # + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#193 + def accessor_start(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 + def arg_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 + def arg_value(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#148 + def autocorrect(corrector, node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#166 + def base(accessor, arg); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#115 + def find_redundant_sort(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#136 + def message(node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#132 + def offense_range(sort_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#125 + def register_offense(node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#157 + def replace_with_logical_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#174 + def suffix(sorter); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#162 + def suggestion(sorter, accessor, arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#201 + def with_logical_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#83 +RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#85 +RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort_by { ... }` can be replaced by +# `sort`. +# +# @example +# # bad +# array.sort_by { |x| x } +# array.sort_by do |var| +# var +# end +# +# # good +# array.sort +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#18 +class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#25 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#35 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#48 + def redundant_sort_by_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#53 + def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#57 + def sort_by_range(send, node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 +RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 +RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) + +# Checks for redundant escapes in string literals. +# +# @example +# # bad - no need to escape # without following {/$/@ +# "\#foo" +# +# # bad - no need to escape single quotes inside double quoted string +# "\'foo\'" +# +# # bad - heredocs are also checked for unnecessary escapes +# <<~STR +# \#foo \"foo\" +# STR +# +# # good +# "#foo" +# +# # good +# "\#{no_interpolation}" +# +# # good +# "'foo'" +# +# # good +# "foo\ +# bar" +# +# # good +# <<~STR +# #foo "foo" +# STR +# +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#37 +class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#43 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#79 + def allowed_escape?(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#119 + def array_literal?(node, prefix); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#73 + def begin_loc_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#153 + def delimiter?(node, char); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 + def disabling_interpolation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#149 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#139 + def heredoc_with_disabled_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#100 + def interpolation_not_enabled?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 + def literal_in_interpolated_or_multiline_string?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#135 + def percent_array_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#111 + def percent_q_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#127 + def percent_w_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#131 + def percent_w_upper_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#107 + def single_quoted?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#63 + def str_contents_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41 +RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `//` or `%r` around regular expressions. +# +# NOTE: The following `%r` cases using a regexp starts with a blank or `=` +# as a method argument allowed to prevent syntax errors. +# +# [source,ruby] +# ---- +# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax. +# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. +# ---- +# +# @example EnforcedStyle: slashes (default) +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = / +# foo +# (bar) +# (baz) +# /x +# @example EnforcedStyle: percent_r +# # bad +# snake_case = /^[\dA-Z_]+$/ +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = %r{^[\dA-Z_]+$} +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example EnforcedStyle: mixed +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example AllowInnerSlashes: false (default) +# # If `false`, the cop will always recommend using `%r` if one or more +# # slashes are found in the regexp string. +# +# # bad +# x =~ /home\// +# +# # good +# x =~ %r{home/} +# @example AllowInnerSlashes: true +# # good +# x =~ /home\// +# +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 +class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 + def allow_inner_slashes?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132 + def allowed_mixed_percent_r?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122 + def allowed_mixed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 + def allowed_omit_parentheses_with_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126 + def allowed_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118 + def allowed_slash_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221 + def calculate_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136 + def contains_disallowed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 + def contains_slash?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170 + def correct_delimiters(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176 + def correct_inner_slashes(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209 + def inner_slash_after_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205 + def inner_slash_before_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213 + def inner_slash_for(opening_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192 + def inner_slash_indices(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 + def node_body(node, include_begin_nodes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157 + def preferred_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153 + def slash_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) + +# Sort `require` and `require_relative` in alphabetical order. +# +# @example +# # bad +# require 'b' +# require 'a' +# +# # good +# require 'a' +# require 'b' +# +# # bad +# require_relative 'b' +# require_relative 'a' +# +# # good +# require_relative 'a' +# require_relative 'b' +# +# # good (sorted within each section separated by a blank line) +# require 'a' +# require 'd' +# +# require 'b' +# require 'c' +# +# # good +# require 'b' +# require_relative 'c' +# require 'a' +# +# # bad +# require 'a' +# require 'c' if foo +# require 'b' +# +# # good +# require 'a' +# require 'b' +# require 'c' if foo +# +# # bad +# require 'c' +# if foo +# require 'd' +# require 'b' +# end +# require 'a' +# +# # good +# require 'c' +# if foo +# require 'b' +# require 'd' +# end +# require 'a' +# +# source://rubocop//lib/rubocop/cop/style/require_order.rb#66 +class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#76 + def if_inside_only_require(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#83 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#115 + def autocorrect(corrector, node, previous_older_sibling); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#101 + def find_previous_older_sibling(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#133 + def in_same_section?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#97 + def not_modifier_form?(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#123 + def search_node(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 + def sibling_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#73 +RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#71 +RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `rescue` in its modifier form is added for following +# reasons: +# +# * The syntax of modifier form `rescue` can be misleading because it +# might lead us to believe that `rescue` handles the given exception +# but it actually rescue all exceptions to return the given rescue +# block. In this case, value returned by handle_error or +# SomeException. +# +# * Modifier form `rescue` would rescue all the exceptions. It would +# silently skip all exception or errors and handle the error. +# Example: If `NoMethodError` is raised, modifier form rescue would +# handle the exception. +# +# @example +# # bad +# some_method rescue handle_error +# +# # bad +# some_method rescue SomeException +# +# # good +# begin +# some_method +# rescue +# handle_error +# end +# +# # good +# begin +# some_method +# rescue SomeException +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40 +class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 + def correct_rescue_block(corrector, node, parenthesized); end + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 + def indentation_and_offset(node, parenthesized); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66 + def parenthesized?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46 +RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for rescuing `StandardError`. There are two supported +# styles `implicit` and `explicit`. This cop will not register an offense +# if any error other than `StandardError` is specified. +# +# @example EnforcedStyle: explicit (default) +# # `explicit` will enforce using `rescue StandardError` +# # instead of `rescue`. +# +# # bad +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# @example EnforcedStyle: implicit +# # `implicit` will enforce using `rescue` instead of +# # `rescue StandardError`. +# +# # bad +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#73 +class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#92 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#88 + def rescue_standard_error?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#83 + def rescue_without_error_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#118 + def offense_for_explicit_enforced_style(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#107 + def offense_for_implicit_enforced_style(node, error); end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#80 +RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 +RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) + +# Enforces consistency between `return nil` and `return`. +# +# This cop is disabled by default. Because there seems to be a perceived semantic difference +# between `return` and `return nil`. The former can be seen as just halting evaluation, +# while the latter might be used when the return value is of specific concern. +# +# Supported styles are `return` and `return_nil`. +# +# @example EnforcedStyle: return (default) +# # bad +# def foo(arg) +# return nil if arg +# end +# +# # good +# def foo(arg) +# return if arg +# end +# @example EnforcedStyle: return_nil +# # bad +# def foo(arg) +# return if arg +# end +# +# # good +# def foo(arg) +# return nil if arg +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 +class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46 + def return_nil_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43 + def return_node?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 +RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 +RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) + +# Checks if `return` or `return nil` is used in predicate method definitions. +# +# @example +# # bad +# def foo? +# return if condition +# +# do_something? +# end +# +# # bad +# def foo? +# return nil if condition +# +# do_something? +# end +# +# # good +# def foo? +# return false if condition +# +# do_something? +# end +# @example AllowedMethods: ['foo?'] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# @example AllowedPatterns: [/foo/] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 + def nil_node_at_the_end_of_method_body(body); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + def register_offense(offense_node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Transforms usages of a method call safeguarded by a non `nil` +# check for the variable whose method is being called to +# safe navigation (`&.`). If there is a method chain, all of the methods +# in the chain need to be checked for safety, and all of the methods will +# need to be changed to use safe navigation. +# +# The default for `ConvertCodeThatCanStartToReturnNil` is `false`. +# When configured to `true`, this will +# check for code in the format `!foo.nil? && foo.bar`. As it is written, +# the return of this code is limited to `false` and whatever the return +# of the method is. If this is converted to safe navigation, +# `foo&.bar` can start returning `nil` as well as what the method +# returns. +# +# The default for `MaxChainLength` is `2`. +# We have limited the cop to not register an offense for method chains +# that exceed this option's value. +# +# @example +# # bad +# foo.bar if foo +# foo.bar.baz if foo +# foo.bar(param1, param2) if foo +# foo.bar { |e| e.something } if foo +# foo.bar(param) { |e| e.something } if foo +# +# foo.bar if !foo.nil? +# foo.bar unless !foo +# foo.bar unless foo.nil? +# +# foo && foo.bar +# foo && foo.bar.baz +# foo && foo.bar(param1, param2) +# foo && foo.bar { |e| e.something } +# foo && foo.bar(param) { |e| e.something } +# +# foo ? foo.bar : nil +# foo.nil? ? nil : foo.bar +# !foo.nil? ? foo.bar : nil +# !foo ? nil : foo.bar +# +# # good +# foo&.bar +# foo&.bar&.baz +# foo&.bar(param1, param2) +# foo&.bar { |e| e.something } +# foo&.bar(param) { |e| e.something } +# foo && foo.bar.baz.qux # method chain with more than 2 methods +# foo && foo.nil? # method that `nil` responds to +# +# # Method calls that do not use `.` +# foo && foo < bar +# foo < bar if foo +# +# # When checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# # do the opposite of what the author intends. +# foo && foo.empty? +# +# # This could start returning `nil` as well as the return of the method +# foo.nil? || foo.bar +# !foo || foo.bar +# +# # Methods that are used on assignment, arithmetic operation or +# # comparison should not be converted to use safe navigation +# foo.baz = bar if foo +# foo.baz + bar if foo +# foo.bar > 2 if foo +# +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#84 +class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # if format: (if checked_variable body nil) + # unless format: (if checked_variable nil body) + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#99 + def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#125 + def not_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#127 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#114 + def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#307 + def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#200 + def allowed_if_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#154 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#299 + def begin_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#261 + def chain_length(method_chain, method); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 + def comments(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#303 + def end_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#166 + def extract_body(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 + def extract_common_parts(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#209 + def extract_parts(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#233 + def extract_parts_from_and(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#218 + def extract_parts_from_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 + def find_matching_receiver_invocation(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#174 + def handle_comments(corrector, node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#320 + def max_chain_length; end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 + def method_call(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#295 + def method_called?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#287 + def negated?(send_node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#187 + def relevant_comment_ranges(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 + def unsafe_method?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 + def unsafe_method_used?(method_chain, method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#150 + def use_var_only_in_unless_modifier?(node, variable); end +end + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#92 +RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#90 +RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `shuffle.first`, +# `shuffle.last`, and `shuffle[]` and change them to use +# `sample` instead. +# +# @example +# # bad +# [1, 2, 3].shuffle.first +# [1, 2, 3].shuffle.first(2) +# [1, 2, 3].shuffle.last +# [2, 1, 3].shuffle.at(0) +# [2, 1, 3].shuffle.slice(0) +# [1, 2, 3].shuffle[2] +# [1, 2, 3].shuffle[0, 2] # sample(2) will do the same +# [1, 2, 3].shuffle[0..2] # sample(3) will do the same +# [1, 2, 3].shuffle(random: Random.new).first +# +# # good +# [1, 2, 3].shuffle +# [1, 2, 3].sample +# [1, 2, 3].sample(3) +# [1, 2, 3].shuffle[1, 3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[1..3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[foo, bar] +# [1, 2, 3].shuffle(random: Random.new) +# +# source://rubocop//lib/rubocop/cop/style/sample.rb#30 +class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#37 + def sample_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/sample.rb#122 + def correction(shuffle_arg, method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#138 + def extract_source(args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#116 + def message(shuffle_arg, method, method_args, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sample.rb#59 + def offensive?(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#96 + def range_size(range_node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#129 + def sample_arg(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#70 + def sample_size(method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#79 + def sample_size_for_one_arg(arg); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#89 + def sample_size_for_two_args(first, second); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#112 + def source_range(shuffle_node, node); end +end + +# source://rubocop//lib/rubocop/cop/style/sample.rb#33 +RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/sample.rb#34 +RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for places where an subset of an Enumerable (array, +# range, set, etc.; see note below) is calculated based on a `Regexp` +# match, and suggests `grep` or `grep_v` instead. +# +# NOTE: Hashes do not behave as you may expect with `grep`, which +# means that `hash.grep` is not equivalent to `hash.select`. Although +# RuboCop is limited by static analysis, this cop attempts to avoid +# registering an offense when the receiver is a hash (hash literal, +# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). +# +# NOTE: `grep` and `grep_v` were optimized when used without a block +# in Ruby 3.0, but may be slower in previous versions. +# See https://bugs.ruby-lang.org/issues/17030 +# +# @example +# # bad (select or find_all) +# array.select { |x| x.match? /regexp/ } +# array.select { |x| /regexp/.match?(x) } +# array.select { |x| x =~ /regexp/ } +# array.select { |x| /regexp/ =~ x } +# +# # bad (reject) +# array.reject { |x| x.match? /regexp/ } +# array.reject { |x| /regexp/.match?(x) } +# array.reject { |x| x =~ /regexp/ } +# array.reject { |x| /regexp/ =~ x } +# +# # good +# array.grep(regexp) +# array.grep_v(regexp) +# +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#45 +class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#79 + def calls_lvar?(param0 = T.unsafe(nil), param1); end + + # Returns true if a node appears to return a hash + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#65 + def creates_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 + def env_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 + def regexp_match?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 + def find_regexp(node, block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 + def match_predicate_without_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 + def opposite?(regexp_method_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 + def receiver_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 + def register_offense(node, block_node, regexp, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 + def replacement(regexp_method_send_node, node); end +end + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49 +RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 +RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 +RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 +RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#50 +RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use the shorthand for self-assignment. +# +# @example +# +# # bad +# x = x + 1 +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#15 +class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#33 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#29 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#25 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#94 + def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#74 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#89 + def autocorrect_boolean_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 + def autocorrect_send_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 + def check(node, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#62 + def check_boolean_node(node, rhs, var_name, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#50 + def check_send_node(node, rhs, var_name, var_type); end + + class << self + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#21 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#18 +RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#19 +RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) + +# Checks for multiple expressions placed on the same line. +# It also checks for lines terminated with a semicolon. +# +# This cop has `AllowAsExpressionSeparator` configuration option. +# It allows `;` to separate several expressions on the same line. +# +# @example +# # bad +# foo = 1; bar = 2; +# baz = 3; +# +# # good +# foo = 1 +# bar = 2 +# baz = 3 +# @example AllowAsExpressionSeparator: false (default) +# # bad +# foo = 1; bar = 2 +# @example AllowAsExpressionSeparator: true +# # good +# foo = 1; bar = 2 +# +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#29 +class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#45 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 + def check_for_line_terminator_or_opener; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 + def each_semicolon; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 + def exist_semicolon_after_left_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 + def exist_semicolon_after_left_lambda_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#118 + def exist_semicolon_after_left_string_interpolation_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 + def exist_semicolon_before_right_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 + def exist_semicolon_before_right_string_interpolation_brace?(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#142 + def expressions_per_line(exprs); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#156 + def find_range_node(token_before_semicolon); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 + def find_semicolon_positions(line); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162 + def range_nodes; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#122 + def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#84 + def semicolon_position(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 + def tokens_for_lines; end + + class << self + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#35 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#33 +RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of the send method. +# +# @example +# # bad +# Foo.send(bar) +# quuz.send(fred) +# +# # good +# Foo.__send__(bar) +# quuz.public_send(fred) +# +# source://rubocop//lib/rubocop/cop/style/send.rb#16 +class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/send.rb#20 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/send.rb#20 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/send.rb#17 +RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send.rb#18 +RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects the use of the `public_send` method with a literal method name argument. +# Since the `send` method can be used to call private methods, by default, +# only the `public_send` method is detected. +# +# NOTE: Writer methods with names ending in `=` are always permitted because their +# behavior differs as follows: +# +# [source,ruby] +# ---- +# def foo=(foo) +# @foo = foo +# 42 +# end +# +# self.foo = 1 # => 1 +# send(:foo=, 1) # => 42 +# ---- +# +# @example +# # bad +# obj.public_send(:method_name) +# obj.public_send('method_name') +# +# # good +# obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# @example AllowSend: false +# # bad +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# # good +# obj.method_name +# +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 +class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#90 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#94 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#98 + def removal_argument_range(first_argument, second_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60 +RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57 +RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59 +RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for uses of `fail` and `raise`. +# +# @example EnforcedStyle: only_raise (default) +# # The `only_raise` style enforces the sole use of `raise`. +# # bad +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# +# # good +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# @example EnforcedStyle: only_fail +# # The `only_fail` style enforces the sole use of `fail`. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# @example EnforcedStyle: semantic +# # The `semantic` style enforces the use of `fail` to signal an +# # exception, then will use `raise` to trigger an offense after +# # it has been rescued. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# # Error thrown +# rescue Exception +# fail +# end +# +# Kernel.fail +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# raise 'Preferably with descriptive message' +# end +# +# explicit_receiver.fail +# explicit_receiver.raise +# +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#107 +class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#120 + def custom_fail_methods(param0); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#117 + def kernel_call?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#134 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#206 + def allow(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#188 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#167 + def check_scope(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#180 + def check_send(method_name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#200 + def command_or_kernel_call?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#149 + def custom_fail_defined?; end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#210 + def each_command_or_kernel_call(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#156 + def message(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#111 +RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#112 +RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 +RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Sometimes using `dig` method ends up with just a single +# argument. In such cases, dig should be replaced with `[]`. +# +# Since replacing `hash&.dig(:key)` with `hash[:key]` could potentially lead to error, +# calls to the `dig` method using safe navigation will be ignored. +# +# @example +# # bad +# { key: 'value' }.dig(:key) +# [1, 2, 3].dig(0) +# +# # good +# { key: 'value' }[:key] +# [1, 2, 3][0] +# +# # good +# { key1: { key2: 'value' } }.dig(:key1, :key2) +# [1, [2, [3]]].dig(1, 1) +# +# # good +# keys = %i[key1 key2] +# { key1: { key2: 'value' } }.dig(*keys) +# +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 + def single_argument_dig?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 +RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 +RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 +RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks whether the block parameters of a single-line +# method accepting a block match the names specified via configuration. +# +# For instance one can configure `reduce`(`inject`) to use |a, e| as +# parameters. +# +# Configuration option: Methods +# Should be set to use this cop. Array of hashes, where each key is the +# method name and value - array of argument names. +# +# @example Methods: [{reduce: %w[a b]}] +# # bad +# foo.reduce { |c, d| c + d } +# foo.reduce { |_, _d| 1 } +# +# # good +# foo.reduce { |a, b| a + b } +# foo.reduce { |a, _b| a } +# foo.reduce { |a, (id, _)| a + id } +# foo.reduce { true } +# +# # good +# foo.reduce do |c, d| +# c + d +# end +# +# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#31 +class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#36 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#105 + def args_match?(method_name, args); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#69 + def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#57 + def build_preferred_arguments_map(node, preferred_arguments); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#79 + def eligible_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#83 + def eligible_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#95 + def method_name(method); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#91 + def method_names; end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#87 + def methods; end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#99 + def target_args(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34 +RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) + +# Checks for single-line `do`...`end` block. +# +# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` +# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to +# preserve semantics and does not change it to `{`...`}` block. +# +# @example +# +# # bad +# foo do |arg| bar(arg) end +# +# # good +# foo do |arg| +# bar(arg) +# end +# +# # bad +# ->(arg) do bar(arg) end +# +# # good +# ->(arg) { bar(arg) } +# +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28 +class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#55 + def do_line(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 + def x(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31 +RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for single-line method definitions that contain a body. +# It will accept single-line methods with no body. +# +# Endless methods added in Ruby 3.0 are also accepted by this cop. +# +# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line` or +# `allow_always`, single-line methods will be autocorrected to endless +# methods if there is only one statement in the body. +# +# @example +# # bad +# def some_method; body end +# def link_to(url); {:name => url}; end +# def @table.columns; super; end +# +# # good +# def self.resource_class=(klass); end +# def @table.columns; end +# def some_method() = body +# @example AllowIfMethodIsEmpty: true (default) +# # good +# def no_op; end +# @example AllowIfMethodIsEmpty: false +# # bad +# def no_op; end +# +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#34 +class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#60 + def allow_empty?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#52 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#97 + def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#88 + def correct_to_endless(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#64 + def correct_to_endless?(body_node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#74 + def correct_to_multiline(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#136 + def disallow_endless_method_style?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#104 + def each_part(body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#121 + def method_body_source(method_body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#114 + def move_comment(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#132 + def require_parentheses?(method_body); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#38 +RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#39 +RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) + +# Checks that arrays are not sliced with the redundant `ary[0..-1]`, replacing it with `ary`, +# and ensures arrays are sliced with endless ranges instead of `ary[start..-1]` on Ruby 2.6+, +# and with beginless ranges instead of `ary[nil..end]` on Ruby 2.7+. +# +# @example +# # bad +# items[0..-1] +# items[0..nil] +# items[0...nil] +# +# # good +# items +# +# # bad +# items[1..-1] # Ruby 2.6+ +# items[1..nil] # Ruby 2.6+ +# +# # good +# items[1..] # Ruby 2.6+ +# +# # bad +# items[nil..42] # Ruby 2.7+ +# +# # good +# items[..42] # Ruby 2.7+ +# items[0..42] # Ruby 2.7+ +# +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 +class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#77 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#73 + def range_from_zero?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#57 + def range_from_zero_till_minus_one?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#65 + def range_till_minus_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#111 + def beginless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#107 + def endless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#93 + def offense_message_with_removal_range(range_node, selector); end +end + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#52 +RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#53 +RuboCop::Cop::Style::SlicingWithRange::MSG_USELESS_RANGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#54 +RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# If the branch of a conditional consists solely of a conditional node, +# its conditions can be combined with the conditions of the outer branch. +# This helps to keep the nesting level from getting too deep. +# +# @example +# # bad +# if condition_a +# if condition_b +# do_something +# end +# end +# +# # bad +# if condition_b +# do_something +# end if condition_a +# +# # good +# if condition_a && condition_b +# do_something +# end +# @example AllowModifier: false (default) +# # bad +# if condition_a +# do_something if condition_b +# end +# +# # bad +# if condition_b +# do_something +# end if condition_a +# @example AllowModifier: true +# # good +# if condition_a +# do_something if condition_b +# end +# +# # good +# if condition_b +# do_something +# end if condition_a +# +# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#49 +class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#59 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261 + def allow_modifier?; end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 + def assigned_variables(condition); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 + def autocorrect(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#110 + def autocorrect_outer_condition_basic(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#125 + def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 + def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 + def correct_for_comment(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 + def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171 + def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 + def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#190 + def correct_outer_condition(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203 + def insert_bang(corrector, node, is_modify_form); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216 + def insert_bang_for_and(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#89 + def offending_branch?(node, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265 + def outer_condition_modify_form?(node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + def parenthesized_method_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 + def replace_condition(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 + def require_parentheses?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 + def use_variable_assignment_in_condition?(condition, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#155 + def wrap_condition(corrector, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#239 + def wrap_condition?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 +RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style global variables. +# Correcting to global variables in the 'English' library +# will add a require statement to the top of the file if +# enabled by RequireEnglish config. +# +# @example EnforcedStyle: use_english_names (default) +# # good +# require 'English' # or this could be in another file. +# +# puts $LOAD_PATH +# puts $LOADED_FEATURES +# puts $PROGRAM_NAME +# puts $ERROR_INFO +# puts $ERROR_POSITION +# puts $FIELD_SEPARATOR # or $FS +# puts $OUTPUT_FIELD_SEPARATOR # or $OFS +# puts $INPUT_RECORD_SEPARATOR # or $RS +# puts $OUTPUT_RECORD_SEPARATOR # or $ORS +# puts $INPUT_LINE_NUMBER # or $NR +# puts $LAST_READ_LINE +# puts $DEFAULT_OUTPUT +# puts $DEFAULT_INPUT +# puts $PROCESS_ID # or $PID +# puts $CHILD_STATUS +# puts $LAST_MATCH_INFO +# puts $IGNORECASE +# puts $ARGV # or ARGV +# @example EnforcedStyle: use_perl_names +# # good +# puts $: +# puts $" +# puts $0 +# puts $! +# puts $@ +# puts $; +# puts $, +# puts $/ +# puts $\ +# puts $. +# puts $_ +# puts $> +# puts $< +# puts $$ +# puts $? +# puts $~ +# puts $= +# puts $* +# @example EnforcedStyle: use_builtin_english_names +# +# # good +# # Like `use_perl_names` but allows builtin global vars. +# puts $LOAD_PATH +# puts $LOADED_FEATURES +# puts $PROGRAM_NAME +# puts ARGV +# puts $: +# puts $" +# puts $0 +# puts $! +# puts $@ +# puts $; +# puts $, +# puts $/ +# puts $\ +# puts $. +# puts $_ +# puts $> +# puts $< +# puts $$ +# puts $? +# puts $~ +# puts $= +# puts $* +# +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86 +class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RequireLibrary + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#175 + def autocorrect(corrector, node, global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167 + def message(global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246 + def add_require_english?; end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240 + def english_name_replacement(preferred_name, node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189 + def format_english_message(global_var); end + + # For now, we assume that lists are 2 items or less. Easy grammar! + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#211 + def format_list(items); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197 + def format_message(english, regular, global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234 + def matching_styles(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226 + def preferred_names(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215 + def replacement(node, global_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250 + def should_require_english?(global_var); end +end + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127 +RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 +RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144 +RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) + +# Anything *not* in this set is provided by the English library. +# +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#121 +RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 +RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138 +RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) + +# Check for parentheses around stabby lambda arguments. +# There are two different styles. Defaults to `require_parentheses`. +# +# @example EnforcedStyle: require_parentheses (default) +# # bad +# ->a,b,c { a + b + c } +# +# # good +# ->(a,b,c) { a + b + c} +# @example EnforcedStyle: require_no_parentheses +# # bad +# ->(a,b,c) { a + b + c } +# +# # good +# ->a,b,c { a + b + c} +# +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 +class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#54 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#46 + def missing_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#58 + def missing_parentheses_corrector(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#73 + def parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#50 + def redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#69 + def stabby_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#62 + def unwanted_parentheses_corrector(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#27 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#26 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) + +# Checks for places where classes with only class methods can be +# replaced with a module. Classes should be used only when it makes sense to create +# instances out of them. +# +# @example +# # bad +# class SomeClass +# def self.some_method +# # body omitted +# end +# +# def self.some_other_method +# # body omitted +# end +# end +# +# # good +# module SomeModule +# module_function +# +# def some_method +# # body omitted +# end +# +# def some_other_method +# # body omitted +# end +# end +# +# # good - has instance method +# class SomeClass +# def instance_method; end +# def self.class_method; end +# end +# +# source://rubocop//lib/rubocop/cop/style/static_class.rb#46 +class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#53 + def on_class(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#64 + def autocorrect(corrector, class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#77 + def autocorrect_def(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#83 + def autocorrect_sclass(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#90 + def class_convertible_to_module?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#114 + def class_elements(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#102 + def extend_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#106 + def sclass_convertible_to_module?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/static_class.rb#51 +RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `$stderr.puts` can be replaced by +# `warn`. The latter has the advantage of easily being disabled by, +# the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. +# +# @example +# # bad +# $stderr.puts('hello') +# +# # good +# warn('hello') +# +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#17 +class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#32 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#25 + def stderr_puts?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#43 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#47 + def stderr_gvar?(sym); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#51 + def stderr_puts_range(send); end +end + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#21 +RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#22 +RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `String#split` with empty string or regexp literal argument. +# +# @example +# # bad +# string.split(//) +# string.split('') +# +# # good +# string.chars +# +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#21 +class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#27 +RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#25 +RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#26 +RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where string concatenation +# can be replaced with string interpolation. +# +# The cop can autocorrect simple cases but will skip autocorrecting +# more complex cases where the resulting code would be harder to read. +# In those cases, it might be useful to extract statements to local +# variables or methods which you can then interpolate in a string. +# +# NOTE: When concatenation between two strings is broken over multiple +# lines, this cop does not register an offense; instead, +# `Style/LineEndConcatenation` will pick up the offense if enabled. +# +# Two modes are supported: +# 1. `aggressive` style checks and corrects all occurrences of `+` where +# either the left or right side of `+` is a string literal. +# 2. `conservative` style on the other hand, checks and corrects only if +# left side (receiver of `+` method call) is a string literal. +# This is useful when the receiver is some expression that returns string like `Pathname` +# instead of a string literal. +# +# @example Mode: aggressive (default) +# # bad +# email_with_name = user.name + ' <' + user.email + '>' +# Pathname.new('/') + 'test' +# +# # good +# email_with_name = "#{user.name} <#{user.email}>" +# email_with_name = format('%s <%s>', user.name, user.email) +# "#{Pathname.new('/')}test" +# +# # accepted, line-end concatenation +# name = 'First' + +# 'Last' +# @example Mode: conservative +# # bad +# 'Hello' + user.name +# +# # good +# "Hello #{user.name}" +# user.name + '!!' +# Pathname.new('/') + 'test' +# +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#53 +class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#69 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#73 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#62 + def string_concatenation?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#116 + def collect_parts(node, parts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#141 + def corrected_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#108 + def find_topmost_plus_node(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#162 + def handle_quotes(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#135 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#98 + def line_end_concatenation?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#172 + def mode; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#127 + def plus_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#86 + def register_offense(topmost_plus_node, parts); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#145 + def replacement(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#168 + def single_quoted?(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#131 + def uncorrectable?(part); end +end + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 +RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#59 +RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of strings as keys in hashes. The use of +# symbols is preferred instead. +# +# @example +# # bad +# { 'one' => 1, 'two' => 2, 'three' => 3 } +# +# # good +# { one: 1, two: 2, three: 3 } +# +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#19 +class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#42 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#30 + def receive_environments_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#25 + def string_hash_key?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#22 +RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) + +# Checks if uses of quotes match the configured preference. +# +# @example EnforcedStyle: single_quotes (default) +# # bad +# "No special symbols" +# "No string interpolation" +# "Just text" +# +# # good +# 'No special symbols' +# 'No string interpolation' +# 'Just text' +# "Wait! What's #{this}!" +# @example EnforcedStyle: double_quotes +# # bad +# 'Just some text' +# 'No special chars or interpolation' +# +# # good +# "Just some text" +# "No special chars or interpolation" +# "Every string in #{project} uses double_quotes" +# +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 +class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#37 + def on_dstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#123 + def accept_child_double_quotes?(nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#71 + def all_string_literals?(nodes); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#61 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#105 + def check_multiline_quote_style(node, quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#101 + def consistent_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#75 + def detect_quote_styles(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#87 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#97 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#65 + def register_offense(node, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#119 + def unexpected_double_quotes?(quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#115 + def unexpected_single_quotes?(quote); end +end + +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 +RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) + +# Checks that quotes inside string, symbol, and regexp interpolations +# match the configured preference. +# +# @example EnforcedStyle: single_quotes (default) +# # bad +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# # good +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# @example EnforcedStyle: double_quotes +# # bad +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# +# # good +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 +class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 + def autocorrect(corrector, node); end + + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 + def offense?(node); end +end + +# Enforces the use of consistent method names +# from the String class. +# +# @example +# # bad +# 'name'.intern +# 'var'.unfavored_method +# +# # good +# 'name'.to_sym +# 'var'.preferred_method +# +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#17 +class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#21 +RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `lstrip.rstrip` can be replaced by +# `strip`. +# +# @example +# # bad +# 'abc'.lstrip.rstrip +# 'abc'.rstrip.lstrip +# +# # good +# 'abc'.strip +# +# source://rubocop//lib/rubocop/cop/style/strip.rb#16 +class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/strip.rb#24 + def lstrip_rstrip(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/strip.rb#20 +RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/strip.rb#21 +RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for inheritance from Struct.new. +# +# @example +# # bad +# class Person < Struct.new(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# # good +# Person = Struct.new(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#26 +class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#33 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#45 + def struct_constructor?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#52 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#62 + def range_for_empty_class_body(class_node, struct_new); end +end + +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 +RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant argument forwarding when calling super with arguments identical to +# the method definition. +# +# Using zero arity `super` within a `define_method` block results in `RuntimeError`: +# +# [source,ruby] +# ---- +# def m +# define_method(:foo) { super() } # => OK +# end +# +# def m +# define_method(:foo) { super } # => RuntimeError +# end +# ---- +# +# Furthermore, any arguments accompanied by a block may potentially be delegating to +# `define_method`, therefore, `super` used within these blocks will be allowed. +# This approach might result in false negatives, yet ensuring safe detection takes precedence. +# +# @example +# # bad +# def method(*args, **kwargs) +# super(*args, **kwargs) +# end +# +# # good - implicitly passing all arguments +# def method(*args, **kwargs) +# super +# end +# +# # good - forwarding a subset of the arguments +# def method(*args, **kwargs) +# super(*args) +# end +# +# # good - forwarding no arguments +# def method(*args, **kwargs) +# super() +# end +# +# # good - assigning to the block variable before calling super +# def method(&block) +# # Assigning to the block variable would pass the old value to super, +# # under this circumstance the block must be referenced explicitly. +# block ||= proc { 'fallback behavior' } +# super(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#54 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#81 + def arguments_identical?(def_node, def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#136 + def block_arg_same?(def_node, def_arg, super_arg); end + + # Reassigning the block argument will still pass along the original block to super + # https://bugs.ruby-lang.org/issues/20505 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#147 + def block_reassigned?(def_node, block_arg_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#158 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#116 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#99 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#106 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#162 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#58 +RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#57 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#60 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + +# Enforces the presence of parentheses in `super` containing arguments. +# +# `super` is a keyword and is provided as a distinct cop from those designed for method call. +# +# @example +# +# # bad +# super name, age +# +# # good +# super(name, age) +# +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 +class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 + def on_super(node); end +end + +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 +RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of shorthand-style swapping of 2 variables. +# +# @example +# # bad +# tmp = x +# x = y +# y = tmp +# +# # good +# x, y = y, x +# +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#21 +class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 + def allowed_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#104 + def correction_range(tmp_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#66 + def message(x_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 + def replacement(x_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#95 + def rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#60 + def simple_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#51 + def swapping_values?(tmp_assign, x_assign, y_assign); end +end + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#25 +RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#28 +RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) + +# Checks for array literals made up of symbols that are not +# using the %i() syntax. +# +# Alternatively, it checks for symbol arrays using the %i() syntax on +# projects which do not want to use that syntax, perhaps because they +# support a version of Ruby lower than 2.0. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: percent (default) +# # good +# %i[foo bar baz] +# +# # bad +# [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) +# @example EnforcedStyle: brackets +# # good +# [:foo, :bar, :baz] +# +# # bad +# %i[foo bar baz] +# +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 +class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 + def to_symbol_literal(string); end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 +RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 +RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + +# Checks symbol literal syntax. +# +# @example +# +# # bad +# :"symbol" +# +# # good +# :symbol +# +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#15 +class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#20 + def on_sym(node); end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#18 +RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) + +# Use symbols as procs when possible. +# +# If you prefer a style that allows block for method with arguments, +# please set `true` to `AllowMethodsWithArguments`. +# `define_method?` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # good +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# @example AllowMethodsWithArguments: false (default) +# # bad +# something.do_something(foo) { |o| o.bar } +# +# # good +# something.do_something(foo, &:bar) +# @example AllowMethodsWithArguments: true +# # good +# something.do_something(foo) { |o| o.bar } +# @example AllowComments: false (default) +# # bad +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowComments: true +# # good - if there are comment in either position +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowedMethods: [define_method] (default) +# # good +# define_method(:foo) { |foo| foo.bar } +# @example AllowedPatterns: [] (default) +# # bad +# something.map { |s| s.upcase } +# @example AllowedPatterns: ['map'] (default) +# # good +# something.map { |s| s.upcase } +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# +# # good +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) +# @example +# # bad +# something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) +# +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 +class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 + def destructuring_block_argument?(argument_node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + def proc_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 + def symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 + def symbol_proc_receiver?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274 + def allow_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270 + def allow_if_method_has_argument?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 + def allowed_method_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247 + def autocorrect_lambda_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238 + def autocorrect_with_args(corrector, node, args, method_name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 + def autocorrect_without_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260 + def begin_pos_for_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255 + def block_range_with_space(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 + def register_offense(node, method_name, block_method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + def unsafe_array_usage?(node); end + + # See: https://github.com/rubocop/rubocop/issues/10864 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 + def unsafe_hash_usage?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 +RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 +RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 +RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) + +# Corrector to correct conditional assignment in ternary conditions. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#499 +class RuboCop::Cop::Style::TernaryCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 + def element_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 + def extract_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 + def move_branch_inside_condition(corrector, branch, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 + def ternary(node); end + end +end + +# Checks for the presence of parentheses around ternary +# conditions. It is configurable to enforce inclusion or omission of +# parentheses using `EnforcedStyle`. Omission is only enforced when +# removing the parentheses won't cause a different behavior. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example EnforcedStyle: require_no_parentheses (default) +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# @example EnforcedStyle: require_parentheses +# # bad +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# @example EnforcedStyle: require_parentheses_when_complex +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = (bar && baz) ? a : b +# @example AllowSafeAssignment: true (default) +# # good +# foo = (bar = baz) ? a : b +# @example AllowSafeAssignment: false +# # bad +# foo = (bar = baz) ? a : b +# +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 +class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#193 + def method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#69 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#100 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#183 + def below_ternary_precedence?(child); end + + # If the condition is parenthesized we recurse and check for any + # complex expressions within it. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#131 + def complex_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#89 + def condition_as_parenthesized_one_line_pattern_matching?(condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#198 + def correct_parenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#208 + def correct_unparenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#151 + def message(node); end + + # Anything that is not a variable, constant, or method/.method call + # will be counted as a complex expression. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#141 + def non_complex_expression?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#145 + def non_complex_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#113 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#85 + def only_closing_parenthesis_is_last_line?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#169 + def parenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#161 + def require_parentheses?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#165 + def require_parentheses_when_complex?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#179 + def unparenthesized_method_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#173 + def unsafe_autocorrect?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#212 + def whitespace_after?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#66 +RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#67 +RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#64 +RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#63 +RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) + +# Newcomers to ruby applications may write top-level methods, +# when ideally they should be organized in appropriate classes or modules. +# This cop looks for definitions of top-level methods and warns about them. +# +# However for ruby scripts it is perfectly fine to use top-level methods. +# Hence this cop is disabled by default. +# +# @example +# # bad +# def some_method +# end +# +# # bad +# def self.some_method +# end +# +# # bad +# define_method(:foo) { puts 1 } +# +# # good +# module Foo +# def some_method +# end +# end +# +# # good +# class Foo +# def self.some_method +# end +# end +# +# # good +# Struct.new do +# def some_method +# end +# end +# +# # good +# class Foo +# define_method(:foo) { puts 1 } +# end +# +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 +class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#79 + def define_method_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#70 + def top_level_method_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#48 +RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#50 +RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for trailing code after the class definition. +# +# @example +# # bad +# class Foo; def foo; end +# end +# +# # good +# class Foo +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#23 +RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the method definition. +# +# NOTE: It always accepts endless method definitions that are basically on the same line. +# +# @example +# # bad +# def some_method; do_stuff +# end +# +# def f(x); b = foo +# b[c: x] +# end +# +# # good +# def some_method +# do_stuff +# end +# +# def f(x) +# b = foo +# b[c: x] +# end +# +# def endless_method = do_stuff +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#31 +class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#36 +RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the module definition. +# +# @example +# # bad +# module Foo extend self +# end +# +# # good +# module Foo +# extend self +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#25 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#23 +RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in argument lists. +# The supported styles are: +# +# * `consistent_comma`: Requires a comma after the last argument, +# for all parenthesized method calls with arguments. +# * `comma`: Requires a comma after the last argument, but only for +# parenthesized method calls where each argument is on its own line. +# * `no_comma`: Requires that there is no comma after the last +# argument. +# +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # bad +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, +# 3 +# ) +# +# # bad +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, 2, 3 +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, +# 2 +# ) +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#87 +class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#91 + def autocorrect_incompatible_with; end + end +end + +# Checks for trailing comma in array literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the +# last item of all non-empty, multiline array literals. +# * `comma`: Requires a comma after last item in an array, +# but only when each item is on its own line. +# * `no_comma`: Does not require a comma after the +# last item in an array +# +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # good +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# @example EnforcedStyleForMultiline: comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # bad +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, +# 3 +# ] +# +# # bad +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, 2, 3 +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# a = [1, 2,] +# +# # good +# a = [ +# 1, +# 2 +# ] +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#84 +class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#88 + def on_array(node); end +end + +# Checks whether trailing commas in block arguments are +# required. Blocks with only one argument and a trailing comma require +# that comma to be present. Blocks with more than one argument never +# require a trailing comma. +# +# @example +# # bad +# add { |foo, bar,| foo + bar } +# +# # good +# add { |foo, bar| foo + bar } +# +# # good +# add { |foo,| foo } +# +# # good +# add { foo } +# +# # bad +# add do |foo, bar,| +# foo + bar +# end +# +# # good +# add do |foo, bar| +# foo + bar +# end +# +# # good +# add do |foo,| +# foo +# end +# +# # good +# add do +# foo + bar +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#62 +class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#67 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#83 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#95 + def argument_tokens(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#91 + def last_comma(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#87 + def trailing_comma?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#79 + def useless_trailing_comma?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#65 +RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in hash literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the +# last item of all non-empty, multiline hash literals. +# * `comma`: Requires a comma after the last item in a hash, +# but only when each item is on its own line. +# * `no_comma`: Does not require a comma after the +# last item in a hash +# +# @example EnforcedStyleForMultiline: consistent_comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # bad +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3 +# } +# +# # bad +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3 +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: no_comma (default) +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { +# foo: 1, +# bar: 2 +# } +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#87 +class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#91 + def on_hash(node); end +end + +# Checks for trailing code after the method definition. +# +# @example +# # bad +# def some_method +# do_stuff; end +# +# def do_this(x) +# baz.map { |b| b.this(x) } end +# +# def foo +# block do +# bar +# end end +# +# # good +# def some_method +# do_stuff +# end +# +# def do_this(x) +# baz.map { |b| b.this(x) } +# end +# +# def foo +# block do +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#36 +class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#41 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#55 + def body_and_end_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#51 + def trailing_end?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#39 +RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) + +# Checks for extra underscores in variable assignment. +# +# @example +# # bad +# a, b, _ = foo() +# a, b, _, = foo() +# a, _, _ = foo() +# a, _, _, = foo() +# +# # good +# a, b, = foo() +# a, = foo() +# *a, b, _ = foo() +# # => We need to know to not include 2 variables in a +# a, *b, _ = foo() +# # => The correction `a, *b, = foo()` is a syntax error +# @example AllowNamedUnderscoreVariables: true (default) +# # good +# a, b, _something = foo() +# @example AllowNamedUnderscoreVariables: false +# # bad +# a, b, _something = foo() +# +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 +class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#41 + def on_masgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#92 + def allow_named_underscore_variables; end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#125 + def children_offenses(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#57 + def find_first_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#66 + def find_first_possible_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#108 + def main_node_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#146 + def range_for_parentheses(offense, left); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#88 + def reverse_index(collection, item); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#80 + def splat_variable_before?(first_offense, variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#96 + def unneeded_ranges(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#133 + def unused_range(node_type, mlhs_node, right); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#129 + def unused_variables_only?(offense, variables); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#38 +RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#36 +RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#37 +RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) + +# Looks for trivial reader/writer methods, that could +# have been created with the attr_* family of functions automatically. +# `to_ary`, `to_a`, `to_c`, `to_enum`, `to_h`, `to_hash`, `to_i`, `to_int`, `to_io`, +# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods +# are allowed by default. These are customizable with `AllowedMethods` option. +# +# @example AllowedMethods: ['allowed_method'] +# # good +# def allowed_method +# @foo +# end +# @example ExactNameMatch: true (default) +# # good +# def name +# @other_name +# end +# @example ExactNameMatch: false +# # bad +# def name +# @other_name +# end +# @example AllowPredicates: true (default) +# # good +# def foo? +# @foo +# end +# @example AllowPredicates: false +# # bad +# def foo? +# @foo +# end +# +# # good +# attr_reader :foo +# @example AllowDSLWriters: true (default) +# # good +# def on_exception(action) +# @on_exception=action +# end +# @example AllowDSLWriters: false +# # bad +# def on_exception(action) +# @on_exception=action +# end +# +# # good +# attr_writer :on_exception +# @example IgnoreClassMethods: false (default) +# # bad +# def self.foo +# @foo +# end +# +# # good +# class << self +# attr_reader :foo +# end +# @example IgnoreClassMethods: true +# # good +# def self.foo +# @foo +# end +# @example +# # bad +# def foo +# @foo +# end +# +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# +# # good +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz +# end +# +# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 +class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#190 + def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#222 + def accessor(kind, method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#161 + def allow_dsl_writers?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#157 + def allow_predicates?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#195 + def allowed_method_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#169 + def allowed_method_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#204 + def allowed_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#200 + def allowed_writer?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#142 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#234 + def autocorrect_class(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#226 + def autocorrect_instance(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#173 + def dsl_writer?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#153 + def exact_name_match?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#165 + def ignore_class_methods?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#115 + def in_module_or_instance_eval?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#181 + def looks_like_trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#208 + def names_match?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#129 + def on_method_def(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#248 + def top_level_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#214 + def trivial_accessor_kind(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#177 + def trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#185 + def trivial_writer?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#102 +RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) + +# Looks for `unless` expressions with `else` clauses. +# +# @example +# # bad +# unless foo_bar.nil? +# # do something... +# else +# # do a different thing... +# end +# +# # good +# if foo_bar.present? +# # do something... +# else +# # do a different thing... +# end +# +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#22 +class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#28 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#45 + def range_between_condition_and_else(node, condition); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#49 + def range_between_else_and_end(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#26 +RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of logical operators in an `unless` condition. +# It discourages such code, as the condition becomes more difficult +# to read and understand. +# +# This cop supports two styles: +# +# - `forbid_mixed_logical_operators` (default) +# - `forbid_logical_operators` +# +# `forbid_mixed_logical_operators` style forbids the use of more than one type +# of logical operators. This makes the `unless` condition easier to read +# because either all conditions need to be met or any condition need to be met +# in order for the expression to be truthy or falsey. +# +# `forbid_logical_operators` style forbids any use of logical operator. +# This makes it even more easy to read the `unless` condition as +# there is only one condition in the expression. +# +# @example EnforcedStyle: forbid_mixed_logical_operators (default) +# # bad +# return unless a || b && c +# return unless a && b || c +# return unless a && b and c +# return unless a || b or c +# return unless a && b or c +# return unless a || b and c +# +# # good +# return unless a && b && c +# return unless a || b || c +# return unless a and b and c +# return unless a or b or c +# return unless a? +# @example EnforcedStyle: forbid_logical_operators +# # bad +# return unless a || b +# return unless a && b +# return unless a or b +# return unless a and b +# +# # good +# return unless a +# return unless a? +# +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 +class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#62 + def and_with_or?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#67 + def logical_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#71 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#57 + def or_with_and?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#83 + def mixed_logical_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#90 + def mixed_precedence_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#97 + def mixed_precedence_or?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#54 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#53 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# Checks for accessing the first element of `String#unpack` +# which can be replaced with the shorter method `unpack1`. +# +# @example +# +# # bad +# 'foo'.unpack('h*').first +# 'foo'.unpack('h*')[0] +# 'foo'.unpack('h*').slice(0) +# 'foo'.unpack('h*').at(0) +# +# # good +# 'foo'.unpack1('h*') +# +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#20 +class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#30 + def unpack_and_first_element?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#53 + def first_element_range(node, unpack_call); end +end + +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#26 +RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#27 +RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for variable interpolation (like "#@ivar"). +# +# @example +# # bad +# "His name is #$name" +# /check #$pattern/ +# "Let's go to the #@store" +# +# # good +# "His name is #{$name}" +# /check #{$pattern}/ +# "Let's go to the #{@store}" +# +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#18 +class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#25 + def on_node_with_interpolations(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#35 + def message(range); end + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#39 + def var_nodes(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#22 +RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `when;` uses in `case` expressions. +# +# @example +# # bad +# case foo +# when 1; 'baz' +# when 2; 'bar' +# end +# +# # good +# case foo +# when 1 then 'baz' +# when 2 then 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/style/when_then.rb#20 +class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/when_then.rb#25 + def on_when(node); end +end + +# source://rubocop//lib/rubocop/cop/style/when_then.rb#23 +RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `do` in multi-line `while/until` statements. +# +# @example +# +# # bad +# while x.any? do +# do_something(x.pop) +# end +# +# # good +# while x.any? +# do_something(x.pop) +# end +# +# # bad +# until x.empty? do +# do_something(x.pop) +# end +# +# # good +# until x.empty? +# do_something(x.pop) +# end +# +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 +class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 +RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) + +# Checks for while and until statements that would fit on one line +# if written as a modifier while/until. The maximum line length is +# configured in the `Layout/LineLength` cop. +# +# @example +# # bad +# while x < 10 +# x += 1 +# end +# +# # good +# x += 1 while x < 10 +# +# # bad +# until x > 10 +# x += 1 +# end +# +# # good +# x += 1 until x > 10 +# @example +# # bad +# x += 100 while x < 500 # a long comment that makes code too long if it were a single line +# +# # good +# while x < 500 # a long comment that makes code too long if it were a single line +# x += 100 +# end +# +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35 +class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39 +RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for array literals made up of word-like +# strings, that are not using the %w() syntax. +# +# Alternatively, it can check for uses of the %w() syntax, in projects +# which do not want to include that syntax. +# +# NOTE: When using the `percent` style, %w() arrays containing a space +# will be registered as offenses. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: percent (default) +# # good +# %w[foo bar baz] +# +# # bad +# ['foo', 'bar', 'baz'] +# +# # bad (contains spaces) +# %w[foo\ bar baz\ quux] +# +# # bad +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # good +# [ +# %w[one One], +# %w[two Two] +# ] +# +# # good (2d array containing spaces) +# [ +# ['one', 'One'], +# ['two', 'Two'], +# ['forty two', 'Forty Two'] +# ] +# @example EnforcedStyle: brackets +# # good +# ['foo', 'bar', 'baz'] +# +# # bad +# %w[foo bar baz] +# +# # good (contains spaces) +# ['foo bar', 'baz quux'] +# +# # good +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # bad +# [ +# %w[one One], +# %w[two Two] +# ] +# +# source://rubocop//lib/rubocop/cop/style/word_array.rb#71 +class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#94 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#85 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#138 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#118 + def complex_content?(strings, complex_regex: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#129 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#113 + def matrix_of_complex_content?(array); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#107 + def within_matrix_of_complex_content?(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#134 + def word_regex; end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#79 +RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#78 +RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with +# `File.read` argument. +# +# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. +# +# @example +# +# # bad +# YAML.load(File.read(path)) +# YAML.parse(File.read(path)) +# +# # good +# YAML.load_file(path) +# YAML.parse_file(path) +# +# # bad +# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer +# +# # good +# YAML.safe_load_file(path) # Ruby 3.0 and newer +# +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 +class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 + def yaml_file_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 +RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 +RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces or forbids Yoda conditions, +# i.e. comparison operations where the order of expression is reversed. +# eg. `5 == x` +# +# @example EnforcedStyle: forbid_for_all_comparison_operators (default) +# # bad +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# 99 == CONST +# +# # good +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# CONST == 99 +# "#{interpolation}" == foo +# /#{interpolation}/ == foo +# @example EnforcedStyle: forbid_for_equality_operators_only +# # bad +# 99 == foo +# "bar" != foo +# +# # good +# 99 >= foo +# 3 < a && a < 5 +# @example EnforcedStyle: require_for_all_comparison_operators +# # bad +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# +# # good +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# @example EnforcedStyle: require_for_equality_operators_only +# # bad +# 99 >= foo +# 3 < a && a < 5 +# +# # good +# 99 == foo +# "bar" != foo +# +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#77 +class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#90 + def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#94 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 + def actual_code_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#145 + def constant_portion?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 + def corrected_code(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#107 + def enforce_yoda?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#112 + def equality_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 + def interpolation?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#134 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 + def non_equality_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 + def noncommutative_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 + def program_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 + def reverse_comparison(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 + def source_file_path_constant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#122 + def valid_yoda?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#117 + def yoda_compatible_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#84 +RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#82 +RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#85 +RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#86 +RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#87 +RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#83 +RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) + +# Forbids Yoda expressions, i.e. binary operations (using `*`, `+`, `&`, `|`, +# and `^` operators) where the order of expression is reversed, eg. `1 + x`. +# This cop complements `Style/YodaCondition` cop, which has a similar purpose. +# +# This cop is disabled by default to respect user intentions such as: +# +# [source,ruby] +# ---- +# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i +# ---- +# +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) +# # bad +# 10 * y +# 1 + x +# 1 & z +# 1 | x +# 1 ^ x +# 1 + CONST +# +# # good +# y * 10 +# x + 1 +# z & 1 +# x | 1 +# x ^ 1 +# CONST + 1 +# 60 * 24 +# +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 +class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 + def constant_portion?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 + def offended_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 + def offended_nodes; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 + def supported_operators; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 + def yoda_expression_constant?(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 +RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 +RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numeric comparisons that can be replaced +# by a predicate method, such as `receiver.length == 0`, +# `receiver.length > 0`, and `receiver.length != 0`, +# `receiver.length < 1` and `receiver.size == 0` that can be +# replaced by `receiver.empty?` and `!receiver.empty?`. +# +# NOTE: `File`, `Tempfile`, and `StringIO` do not have `empty?` +# so allow `size == 0` and `size.zero?`. +# +# @example +# # bad +# [1, 2, 3].length == 0 +# 0 == "foobar".length +# array.length < 1 +# {a: 1, b: 2}.length != 0 +# string.length > 0 +# hash.size > 0 +# +# # good +# [1, 2, 3].empty? +# "foobar".empty? +# array.empty? +# !{a: 1, b: 2}.empty? +# !string.empty? +# !hash.empty? +# +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#37 +class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # Some collection like objects in the Ruby standard library + # implement `#size`, but not `#empty`. We ignore those to + # reduce false positives. + # + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 + def non_polymorphic_collection?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + def nonzero_length_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 + def other_length_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 + def zero_length_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 + def zero_length_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + def zero_length_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 + def check_nonzero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 + def check_zero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 + def check_zero_length_predicate(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 + def replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#41 +RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#43 +RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#40 +RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking and correcting surrounding whitespace. +# +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#6 +module RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#110 + def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#104 + def empty_offense(node, range, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#94 + def empty_offenses(node, left, right, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#68 + def extra_space?(token, side); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#129 + def no_character_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#38 + def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#120 + def offending_empty_no_space?(config, left_token, right_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#116 + def offending_empty_space?(config, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#33 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#78 + def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#16 + def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#124 + def space_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#85 + def space_offense(node, token, side, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#53 + def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#9 +RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#12 +RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#10 +RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# Classes that include this module just implement functions for working +# with symbol nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#7 +module RuboCop::Cop::SymbolHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#8 + def hash_key?(node); end +end + +# Common functionality for checking target ruby version. +# +# source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 +module RuboCop::Cop::TargetRubyVersion + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 + def minimum_target_ruby_version(version); end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 + def required_minimum_ruby_version; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 + def support_target_ruby_version?(version); end +end + +# A group of cops, ready to be called on duty to inspect files. +# Team is responsible for selecting only relevant cops to be sent on duty, +# as well as insuring that the needed forces are sent along with them. +# +# For performance reasons, Team will first dispatch cops & forces in two groups, +# first the ones needed for autocorrection (if any), then the rest +# (unless autocorrections happened). +# +# source://rubocop//lib/rubocop/cop/team.rb#12 +class RuboCop::Cop::Team + # @return [Team] a new instance of Team + # + # source://rubocop//lib/rubocop/cop/team.rb#55 + def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#66 + def autocorrect?; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#70 + def debug?; end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def errors; end + + # source://rubocop//lib/rubocop/cop/team.rb#122 + def external_dependency_checksum; end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/team.rb#114 + def forces; end + + # source://rubocop//lib/rubocop/cop/team.rb#76 + def inspect_file(processed_source); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#85 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def updated_source_file; end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def updated_source_file?; end + + # Returns the value of attribute warnings. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def warnings; end + + private + + # source://rubocop//lib/rubocop/cop/team.rb#133 + def autocorrect(processed_source, report, original:, offset:); end + + # source://rubocop//lib/rubocop/cop/team.rb#197 + def autocorrect_report(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#152 + def be_ready; end + + # source://rubocop//lib/rubocop/cop/team.rb#203 + def collate_corrections(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#219 + def each_corrector(report); end + + # source://rubocop//lib/rubocop/cop/team.rb#271 + def handle_error(error, location, cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#263 + def handle_warning(error, location); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#166 + def investigate_partial(cops, processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#246 + def process_errors(file, errors); end + + # source://rubocop//lib/rubocop/cop/team.rb#160 + def reset; end + + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/team.rb#172 + def roundup_relevant_cops(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#188 + def support_target_rails_version?(cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#182 + def support_target_ruby_version?(cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#234 + def suppress_clobbering; end + + # source://rubocop//lib/rubocop/cop/team.rb#240 + def validate_config; end + + class << self + # @return [Array] needed for the given cops + # + # source://rubocop//lib/rubocop/cop/team.rb#37 + def forces_for(cops); end + + # @return [Team] with cops assembled from the given `cop_classes` + # + # source://rubocop//lib/rubocop/cop/team.rb#22 + def mobilize(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/team.rb#28 + def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Team] + # + # source://rubocop//lib/rubocop/cop/team.rb#14 + def new(cop_or_classes, config, options = T.unsafe(nil)); end + end +end + +# Common methods shared by TrailingBody cops +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#6 +module RuboCop::Cop::TrailingBody + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#12 + def body_on_first_line?(node, body); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#16 + def first_part_of(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#7 + def trailing_body?(node); end +end + +# Common methods shared by Style/TrailingCommaInArguments and +# Style/TrailingCommaInLiteral +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#7 +module RuboCop::Cop::TrailingComma + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # A single argument with the closing bracket on the same line as the end + # of the argument is not considered multiline, even if the argument + # itself might span multiple lines. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#104 + def allowed_multiline_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#167 + def any_heredoc?(items); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#159 + def autocorrect_range(item); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#133 + def avoid_comma(kind, comma_begin_pos, extra_info); end + + # Returns true if the node has round/square/curly brackets. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#82 + def brackets?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#19 + def check(node, items, kind, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#37 + def check_comma(node, kind, comma_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#43 + def check_literal(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#30 + def comma_offset(items, range); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#108 + def elements(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#54 + def extra_avoid_comma_info; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#171 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#189 + def heredoc_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#76 + def inside_comment?(range, comma_offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#93 + def method_name_and_arguments_on_same_line?(node); end + + # Returns true if the round/square/curly brackets of the given node are + # on different lines, each item within is on its own line, and the + # closing bracket is on its own line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#89 + def multiline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#123 + def no_elements_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#129 + def on_same_line?(range1, range2); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#147 + def put_comma(items, kind); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#65 + def should_have_comma?(style, node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#15 + def style_parameter_name; end +end + +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#11 +RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) + +# Common functionality shared by Uncommunicative cops +# +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#6 +module RuboCop::Cop::UncommunicativeName + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#12 + def check(node, args); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#95 + def allow_nums; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#87 + def allowed_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#78 + def arg_range(arg, length); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#45 + def case_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#64 + def ends_with_num?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#91 + def forbidden_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#83 + def forbidden_offense(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#36 + def issue_offenses(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#68 + def length_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#74 + def long_enough?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#99 + def min_length; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#53 + def name_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#60 + def num_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#49 + def uppercase?(name); end +end + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#7 +RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#10 +RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#9 +RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#8 +RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) + +# This autocorrects unused arguments. +# +# source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#6 +class RuboCop::Cop::UnusedArgCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#12 + def correct(corrector, processed_source, node); end + + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#31 + def correct_for_blockarg_type(corrector, node); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#10 + def processed_source; end + end +end + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/cop/util.rb#7 +module RuboCop::Cop::Util + include ::RuboCop::PathUtil + + private + + # source://rubocop//lib/rubocop/cop/util.rb#39 + def add_parentheses(node, corrector); end + + # source://rubocop//lib/rubocop/cop/util.rb#60 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#75 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#87 + def args_end(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#108 + def begins_its_line?(range); end + + # This is a bad API + # + # source://rubocop//lib/rubocop/cop/util.rb#17 + def comment_line?(line_source); end + + # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar + # + # source://rubocop//lib/rubocop/cop/util.rb#22 + def comment_lines?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#198 + def compatible_external_encoding_for?(src); end + + # If converting a string to Ruby string literal source code, must + # double quotes be used? + # + # source://rubocop//lib/rubocop/cop/util.rb#134 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#148 + def escape_string(string); end + + # Returns, for example, a bare `if` node if the given node is an `if` + # with calls chained to the end of it. + # + # source://rubocop//lib/rubocop/cop/util.rb#118 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#203 + def include_or_equal?(source, target); end + + # source://rubocop//lib/rubocop/cop/util.rb#185 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#165 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#169 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#30 + def line_range(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#144 + def needs_escaping?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#91 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/util.rb#34 + def parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#177 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#152 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#191 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#161 + def trim_string_interpolation_escape_character(str); end + + class << self + # source://rubocop//lib/rubocop/cop/util.rb#39 + def add_parentheses(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#60 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#75 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#87 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#108 + def begins_its_line?(range); end + + # This is a bad API + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#17 + def comment_line?(line_source); end + + # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#22 + def comment_lines?(node); end + + # If converting a string to Ruby string literal source code, must + # double quotes be used? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#134 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#148 + def escape_string(string); end + + # Returns, for example, a bare `if` node if the given node is an `if` + # with calls chained to the end of it. + # + # source://rubocop//lib/rubocop/cop/util.rb#118 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#185 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#165 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#169 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#30 + def line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#144 + def needs_escaping?(string); end + + # @yield [sexp] + # + # source://rubocop//lib/rubocop/cop/util.rb#91 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#34 + def parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#177 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#152 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#191 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#161 + def trim_string_interpolation_escape_character(str); end + end +end + +# source://rubocop//lib/rubocop/cop/util.rb#103 +RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Match literal regex characters, not including anchors, character +# classes, alternatives, groups, repetitions, references, etc +# +# source://rubocop//lib/rubocop/cop/util.rb#12 +RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# Arbitrarily chosen value, should be enough to cover +# the most nested source code in real world projects. +# +# source://rubocop//lib/rubocop/cop/util.rb#102 +RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 +module RuboCop::Cop::Utils; end + +# Parses {Kernel#sprintf} format strings. +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#7 +class RuboCop::Cop::Utils::FormatString + # @return [FormatString] a new instance of FormatString + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#89 + def initialize(string); end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#93 + def format_sequences; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#105 + def max_digit_dollar_num; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#101 + def named_interpolation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#97 + def valid?; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#117 + def mixed_formats?; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#111 + def parse; end +end + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#8 +RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#9 +RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) + +# The syntax of a format sequence is as follows. +# +# ``` +# %[flags][width][.precision]type +# ``` +# +# A format sequence consists of a percent sign, followed by optional +# flags, width, and precision indicators, then terminated with a field +# type character. +# +# For more complex formatting, Ruby supports a reference by name. +# +# @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#43 +class RuboCop::Cop::Utils::FormatString::FormatSequence + # @return [FormatSequence] a new instance of FormatSequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#46 + def initialize(match); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#61 + def annotated?; end + + # Number of arguments required for the format sequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 + def arity; end + + # Returns the value of attribute begin_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def begin_pos; end + + # Returns the value of attribute end_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def end_pos; end + + # Returns the value of attribute flags. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def flags; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#74 + def max_digit_dollar_num; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#57 + def percent?; end + + # Returns the value of attribute precision. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def precision; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#78 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#65 + def template?; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def type; end + + # Returns the value of attribute width. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def width; end +end + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 +RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 +RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#10 +RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 +RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 +RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 +RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 +RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 +RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) + +# Helper to abstract complexity of building range pairs +# with octal escape reconstruction (needed for regexp_parser < 2.7). +# +# source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#8 +class RuboCop::Cop::Utils::RegexpRanges + # @return [RegexpRanges] a new instance of RegexpRanges + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 + def initialize(root); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 + def compound_token; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 + def pairs; end + + # Returns the value of attribute root. + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 + def root; end + + private + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 + def compose_range(expressions, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 + def escaped_octal?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 + def octal_digit?(char); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 + def pop_octal_digits(expressions); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 + def populate(expr); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 + def populate_all; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 + def process_set(expressions, current); end +end + +# This force provides a way to track local variables and scopes of Ruby. +# Cops interact with this force need to override some of the hook methods. +# +# def before_entering_scope(scope, variable_table) +# end +# +# def after_entering_scope(scope, variable_table) +# end +# +# def before_leaving_scope(scope, variable_table) +# end +# +# def after_leaving_scope(scope, variable_table) +# end +# +# def before_declaring_variable(variable, variable_table) +# end +# +# def after_declaring_variable(variable, variable_table) +# end +# +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#27 +class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force + # Starting point. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#79 + def investigate(processed_source); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#88 + def process_node(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#74 + def variable_table; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def after_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def after_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def after_leaving_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def before_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def before_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 + def before_leaving_scope(arg); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + def descendant_reference(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#341 + def each_descendant_reference(loop_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#326 + def find_variables_in_loop(loop_node); end + + # This is called for each scope recursively. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#97 + def inspect_variables_in_scope(scope_node); end + + # Mark all assignments which are referenced in the same loop + # as referenced by ignoring AST order since they would be referenced + # in next iteration. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#307 + def mark_assignments_as_referenced_in_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 + def node_handler_method_name(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#103 + def process_children(origin_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#243 + def process_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#182 + def process_pattern_match_variable(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#164 + def process_regexp_named_captures(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#258 + def process_rescue(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#277 + def process_scope(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#296 + def process_send(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#146 + def process_variable_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#134 + def process_variable_declaration(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + def process_variable_multiple_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#196 + def process_variable_operator_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#238 + def process_variable_referencing(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#269 + def process_zero_arity_super(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#190 + def regexp_captured_names(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#363 + def scanned_node?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + def scanned_nodes; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#111 + def skip_children!; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#290 + def twisted_nodes(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#35 +RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# This class represents each assignment of a variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#7 +class RuboCop::Cop::VariableForce::Assignment + include ::RuboCop::Cop::VariableForce::Branchable + + # @return [Assignment] a new instance of Assignment + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#16 + def initialize(node, variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 + def exception_assignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72 + def for_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83 + def meta_assignment_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#60 + def multiple_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#29 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78 + def operator; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 + def operator_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#37 + def reference!(node); end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def referenced; end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def references; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46 + def regexp_named_capture?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66 + def rest_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#42 + def used?; end + + # Returns the value of attribute variable. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def variable; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 + def for_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 + def multiple_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 + def operator_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 + def rest_assignment_node; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 +RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#68 +class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#69 + def assignment?; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Namespace for branch classes for each control structure. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#7 +module RuboCop::Cop::VariableForce::Branch + class << self + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#8 + def of(target_node, scope: T.unsafe(nil)); end + end +end + +# left_body && right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#265 +class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# Abstract base class for branch classes. +# A branch represents a conditional branch in a scope. +# +# @example +# def some_scope +# do_something # no branch +# +# if foo +# do_something # branch A +# do_something # branch A +# else +# do_something # branch B +# if bar +# do_something # branch C (whose parent is branch B) +# end +# end +# +# do_something # no branch +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 +class RuboCop::Cop::VariableForce::Branch::Base < ::Struct + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 + def ==(other); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#92 + def always_run?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#88 + def branched?; end + + # Returns the value of attribute child_node + # + # @return [Object] the current value of child_node + def child_node; end + + # Sets the attribute child_node + # + # @param value [Object] the value to set the attribute child_node to. + # @return [Object] the newly set value + def child_node=(_); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#70 + def control_node; end + + # @yield [_self] + # @yieldparam _self [RuboCop::Cop::VariableForce::Branch::Base] the object that the method was called on + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#80 + def each_ancestor(include_self: T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 + def eql?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#104 + def exclusive_with?(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#129 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#96 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#100 + def may_run_incompletely?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#74 + def parent; end + + # Returns the value of attribute scope + # + # @return [Object] the current value of scope + def scope; end + + # Sets the attribute scope + # + # @param value [Object] the value to set the attribute scope to. + # @return [Object] the newly set value + def scope=(_); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#135 + def scan_ancestors; end + + class << self + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#43 + def classes; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#56 + def define_predicate(name, child_index: T.unsafe(nil)); end + + # @private + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#47 + def inherited(subclass); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#52 + def type; end + end +end + +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#325 +RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) + +# case target +# when /pattern/ # when_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#219 +class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#224 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def when_clause?; end +end + +# case target +# in pattern # in_pattern +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#234 +class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#239 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def in_pattern?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end +end + +# begin +# main_body +# ensure +# ensure_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#314 +class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#320 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def ensure_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end +end + +# Mix-in module for exception handling control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#281 +module RuboCop::Cop::VariableForce::Branch::ExceptionHandler + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#282 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#286 + def may_run_incompletely?; end +end + +# for element in collection +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#247 +class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#252 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def collection?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def element?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# if conditional_clause +# truthy_body +# else +# falsey_body +# end +# +# unless conditional_clause +# falsey_body +# else +# truthy_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#166 +class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def falsey_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def truthy_body?; end +end + +# Mix-in module for logical operator control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#258 +module RuboCop::Cop::VariableForce::Branch::LogicalOperator + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#259 + def always_run?; end +end + +# left_body || right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#273 +class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# begin +# main_body +# rescue StandardError => error # rescue_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#297 +class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#304 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def rescue_clause?; end +end + +# Mix-in module for simple conditional control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#145 +module RuboCop::Cop::VariableForce::Branch::SimpleConditional + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#150 + def always_run?; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#146 + def conditional_clause?; end +end + +# until conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#187 +class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end until conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#207 +class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# while conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#177 +class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end while conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#197 +class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# Mix-in module for classes which own a node and need branch information +# of the node. The user classes must implement #node and #scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#8 +module RuboCop::Cop::VariableForce::Branchable + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#9 + def branch; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#15 + def run_exclusively_with?(other); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#51 +RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#115 +RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 +RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#29 +RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#53 +RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#46 +RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# This class represents each reference of a variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7 +class RuboCop::Cop::VariableForce::Reference + include ::RuboCop::Cop::VariableForce::Branchable + + # @return [Reference] a new instance of Reference + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#16 + def initialize(node, scope); end + + # There's an implicit variable reference by the zero-arity `super`: + # + # def some_method(foo) + # super + # end + # + # Another case is `binding`: + # + # def some_method(foo) + # do_something(binding) + # end + # + # In these cases, the variable `foo` is not explicitly referenced, + # but it can be considered used implicitly by the `super` or `binding`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#41 + def explicit?; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 + def node; end + + # Returns the value of attribute scope. + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 + def scope; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#10 +RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#58 +RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#60 +RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Scope represents a context of local variable visibility. +# This is a place where local variables belong to. +# A scope instance holds a scope node and variable entries. +# +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#9 +class RuboCop::Cop::VariableForce::Scope + # @return [Scope] a new instance of Scope + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#22 + def initialize(node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#35 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#43 + def body_node; end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#61 + def each_node(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#57 + def include?(target_node); end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def naked_top_level; end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def naked_top_level?; end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#39 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def node; end + + # Returns the value of attribute variables. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def variables; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#100 + def ancestor_node?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#90 + def belong_to_inner_scope?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#79 + def belong_to_outer_scope?(target_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#70 + def scan_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#10 +RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#28 +RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#31 +RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Variable represents existence of a local variable. +# This holds a variable declaration node and some states of the variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 +class RuboCop::Cop::VariableForce::Variable + # @return [Variable] a new instance of Variable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 + def initialize(name, declaration_node, scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#94 + def argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 + def assign(node); end + + # Returns the value of attribute assignments. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def assignments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 + def block_argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#74 + def capture_with_block!; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def captured_by_block; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def captured_by_block?; end + + # Returns the value of attribute declaration_node. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def declaration_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 + def explicit_block_local_variable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#66 + def in_modifier_conditional?(assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 + def keyword_argument?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#98 + def method_argument?; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def name; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#40 + def reference!(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#35 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def references; end + + # Returns the value of attribute scope. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 + def should_be_unused?; end + + # This is a convenient way to check whether the variable is used + # in its entire variable lifetime. + # For more precise usage check, refer Assignment#used?. + # + # Once the variable is captured by a block, we have no idea + # when, where, and how many times the block would be invoked. + # This means we cannot track the usage of the variable. + # So we consider it's used to suppress false positive offenses. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#86 + def used?; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 +RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#62 +class RuboCop::Cop::VariableForce::VariableReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#63 + def assignment?; end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A VariableTable manages the lifetime of all scopes and local variables +# in a program. +# This holds scopes as stack structure, provides a way to add local +# variables to current scope, and find local variables by considering +# variable visibility of the current scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#11 +class RuboCop::Cop::VariableForce::VariableTable + # @return [VariableTable] a new instance of VariableTable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#12 + def initialize(hook_receiver = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#113 + def accessible_variables; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#56 + def assign_to_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#40 + def current_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#44 + def current_scope_level; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#48 + def declare_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#94 + def find_variable(name); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#16 + def invoke_hook(hook_name, *args); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#32 + def pop_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#24 + def push_scope(scope_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#68 + def reference_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#20 + def scope_stack; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#109 + def variable_exist?(name); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#122 + def mark_variable_as_captured_by_block_if_so(variable); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 +RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) + +# Help methods for determining node visibility. +# +# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#8 +module RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#57 + def visibility_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#62 + def visibility_inline_on_def?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#67 + def visibility_inline_on_method_name?(param0 = T.unsafe(nil), method_name:); end + + private + + # Navigate to find the last protected method + # + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#48 + def find_visibility_end(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#43 + def find_visibility_start(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#15 + def node_visibility(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#39 + def node_visibility_from_visibility_block(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#21 + def node_visibility_from_visibility_inline(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#28 + def node_visibility_from_visibility_inline_on_def(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#33 + def node_visibility_from_visibility_inline_on_method_name(node); end +end + +# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#11 +RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) + +# This class wraps the `Parser::Source::Comment` object that represents a +# cops it contains. +# +# source://rubocop//lib/rubocop/directive_comment.rb#7 +class RuboCop::DirectiveComment + # @return [DirectiveComment] a new instance of DirectiveComment + # + # source://rubocop//lib/rubocop/directive_comment.rb#32 + def initialize(comment, cop_registry = T.unsafe(nil)); end + + # Checks if all cops specified in this directive + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#82 + def all_cops?; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/directive_comment.rb#30 + def comment; end + + # Returns array of specified in this directive cop names + # + # source://rubocop//lib/rubocop/directive_comment.rb#87 + def cop_names; end + + # Returns the value of attribute cop_registry. + # + # source://rubocop//lib/rubocop/directive_comment.rb#30 + def cop_registry; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/directive_comment.rb#30 + def cops; end + + # Returns array of specified in this directive department names + # when all department disabled + # + # source://rubocop//lib/rubocop/directive_comment.rb#93 + def department_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#107 + def directive_count; end + + # Checks if this directive disables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#62 + def disabled?; end + + # Checks if this directive disables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#77 + def disabled_all?; end + + # Checks if this directive enables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#67 + def enabled?; end + + # Checks if this directive enables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#72 + def enabled_all?; end + + # Checks if directive departments include cop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#98 + def in_directive_department?(cop); end + + # Returns line number for directive + # + # source://rubocop//lib/rubocop/directive_comment.rb#112 + def line_number; end + + # Checks if this directive contains all the given cop names + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#44 + def match?(cop_names); end + + # Returns match captures to directive comment pattern + # + # source://rubocop//lib/rubocop/directive_comment.rb#57 + def match_captures; end + + # Returns the value of attribute mode. + # + # source://rubocop//lib/rubocop/directive_comment.rb#30 + def mode; end + + # Checks if cop department has already used in directive comment + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#103 + def overridden_by_department?(cop); end + + # source://rubocop//lib/rubocop/directive_comment.rb#48 + def range; end + + # Checks if this directive relates to single line + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#39 + def single_line?; end + + private + + # source://rubocop//lib/rubocop/directive_comment.rb#133 + def all_cop_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#137 + def cop_names_for_department(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#129 + def department?(name); end + + # source://rubocop//lib/rubocop/directive_comment.rb#142 + def exclude_lint_department_cops(cops); end + + # source://rubocop//lib/rubocop/directive_comment.rb#122 + def parsed_cop_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#118 + def splitted_cops_string; end + + class << self + # source://rubocop//lib/rubocop/directive_comment.rb#26 + def before_comment(line); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#19 +RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#17 +RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#15 +RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#21 +RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#9 +RuboCop::DirectiveComment::LINT_DEPARTMENT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#11 +RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#13 +RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) + +# An Error exception is different from an Offense with severity 'error' +# When this exception is raised, it means that RuboCop is unable to perform +# a requested action (probably due to misconfiguration) and must stop +# immediately, rather than carrying on +# +# source://rubocop//lib/rubocop/error.rb#8 +class RuboCop::Error < ::StandardError; end + +# A wrapper to display errored location of analyzed file. +# +# source://rubocop//lib/rubocop/error.rb#13 +class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error + # @return [ErrorWithAnalyzedFileLocation] a new instance of ErrorWithAnalyzedFileLocation + # + # source://rubocop//lib/rubocop/error.rb#14 + def initialize(cause:, node:, cop:); end + + # Returns the value of attribute cause. + # + # source://rubocop//lib/rubocop/error.rb#21 + def cause; end + + # source://rubocop//lib/rubocop/error.rb#27 + def column; end + + # Returns the value of attribute cop. + # + # source://rubocop//lib/rubocop/error.rb#21 + def cop; end + + # source://rubocop//lib/rubocop/error.rb#23 + def line; end + + # source://rubocop//lib/rubocop/error.rb#31 + def message; end +end + +# Allows specified configuration options to have an exclude limit +# ie. a maximum value tracked that it can be used by `--auto-gen-config`. +# +# source://rubocop//lib/rubocop/cop/exclude_limit.rb#6 +module RuboCop::ExcludeLimit + # Sets up a configuration option to have an exclude limit tracked. + # The parameter name given is transformed into a method name (eg. `Max` + # becomes `self.max=` and `MinDigits` becomes `self.min_digits=`). + # + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#10 + def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#22 + def transform(parameter_name); end +end + +# source://rubocop//lib/rubocop/ext/comment.rb#4 +module RuboCop::Ext; end + +# Extensions to `Parser::Source::Comment`. +# +# source://rubocop//lib/rubocop/ext/comment.rb#6 +module RuboCop::Ext::Comment + # source://rubocop//lib/rubocop/ext/comment.rb#7 + def source; end + + # source://rubocop//lib/rubocop/ext/comment.rb#11 + def source_range; end +end + +# Extensions to AST::ProcessedSource for our cached comment_config +# +# source://rubocop//lib/rubocop/ext/processed_source.rb#6 +module RuboCop::Ext::ProcessedSource + # source://rubocop//lib/rubocop/ext/processed_source.rb#9 + def comment_config; end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def config=(_arg0); end + + # source://rubocop//lib/rubocop/ext/processed_source.rb#13 + def disabled_line_ranges; end + + # Returns the value of attribute registry. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def registry; end + + # Sets the attribute registry + # + # @param value the value to set the attribute registry to. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def registry=(_arg0); end +end + +# Extensions to Parser::Source::Range +# +# source://rubocop//lib/rubocop/ext/range.rb#6 +module RuboCop::Ext::Range + # Adds `Range#single_line?` to parallel `Node#single_line?` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/range.rb#8 + def single_line?; end +end + +# Extensions to AST::RegexpNode for our cached parsed regexp info +# +# source://rubocop//lib/rubocop/ext/regexp_node.rb#6 +module RuboCop::Ext::RegexpNode + # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 + def assign_properties(*_arg0); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 + def each_capture(named: T.unsafe(nil)); end + + # Note: we extend Regexp nodes to provide `loc` and `expression` + # see `ext/regexp_parser`. + # + # @return [Regexp::Expression::Root, nil] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#16 + def parsed_tree; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 + def named_capturing?(exp, event, named); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#51 + def with_interpolations_blanked; end +end + +# source://rubocop//lib/rubocop/ext/regexp_node.rb#7 +RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) + +# Extensions for `regexp_parser` gem +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#6 +module RuboCop::Ext::RegexpParser; end + +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#20 +module RuboCop::Ext::RegexpParser::Expression; end + +# Add `expression` and `loc` to all `regexp_parser` nodes +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#22 +module RuboCop::Ext::RegexpParser::Expression::Base + # Shortcut to `loc.expression` + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 + def expression; end + + # E.g. + # [a-z]{2,} + # ^^^^^^^^^ expression + # ^^^^ quantifier + # ^^^^^ body + # ^ begin + # ^ end + # + # Please open issue if you need other locations + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 + def loc; end + + # Returns the value of attribute origin. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 + def origin; end + + # Sets the attribute origin + # + # @param value the value to set the attribute origin to. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 + def origin=(_arg0); end + + private + + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50 + def build_location; end +end + +# Provide `CharacterSet` with `begin` and `end` locations. +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 +module RuboCop::Ext::RegexpParser::Expression::CharacterSet + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 + def build_location; end +end + +# Source map for RegexpParser nodes +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#8 +class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map + # @return [Map] a new instance of Map + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#11 + def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end + + # Returns the value of attribute begin. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def begin; end + + # Returns the value of attribute body. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def body; end + + # Returns the value of attribute end. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def end; end + + # Returns the value of attribute quantifier. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def quantifier; end +end + +# This class handles loading files (a.k.a. features in Ruby) specified +# by `--require` command line option and `require` directive in the config. +# +# Normally, the given string is directly passed to `require`. If a string +# beginning with `.` is given, it is assumed to be relative to the given +# directory. +# +# If a string containing `-` is given, it will be used as is, but if we +# cannot find the file to load, we will replace `-` with `/` and try it +# again as when Bundler loads gems. +# +# @api private +# +# source://rubocop//lib/rubocop/feature_loader.rb#16 +class RuboCop::FeatureLoader + # @api private + # @param config_directory_path [String] + # @param feature [String] + # @return [FeatureLoader] a new instance of FeatureLoader + # + # source://rubocop//lib/rubocop/feature_loader.rb#27 + def initialize(config_directory_path:, feature:); end + + # @api private + # + # source://rubocop//lib/rubocop/feature_loader.rb#32 + def load; end + + private + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#55 + def namespaced_feature; end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#60 + def namespaced_target; end + + # @api private + # @param [String] + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#70 + def relative(feature); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#75 + def relative?; end + + # @api private + # @param error [LoadError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#81 + def seems_cannot_load_such_file_error?(error); end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#86 + def target; end + + class << self + # @api private + # @param config_directory_path [String] + # @param feature [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#20 + def load(config_directory_path:, feature:); end + end +end + +# Common methods for finding files. +# +# @api private +# +# source://rubocop//lib/rubocop/file_finder.rb#8 +module RuboCop::FileFinder + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#13 + def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#20 + def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#28 + def traverse_files_upwards(filename, start_dir, stop_dir); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end + end +end + +# A wrapper around patterns array to perform optimized search. +# +# For projects with a large set of rubocop todo files, most items in `Exclude`/`Include` +# are exact file names. It is wasteful to linearly check the list of patterns over and over +# to check if the file is relevant to the cop. +# +# This class partitions an array of patterns into a set of exact match strings and the rest +# of the patterns. This way we can firstly do a cheap check in the set and then proceed via +# the costly patterns check, if needed. +# +# @api private +# +# source://rubocop//lib/rubocop/file_patterns.rb#14 +class RuboCop::FilePatterns + # @api private + # @return [FilePatterns] a new instance of FilePatterns + # + # source://rubocop//lib/rubocop/file_patterns.rb#21 + def initialize(patterns); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/file_patterns.rb#27 + def match?(path); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#33 + def partition_patterns(patterns); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#17 + def from(patterns); end + end +end + +# The bootstrap module for formatter. +# +# source://rubocop//lib/rubocop/formatter.rb#5 +module RuboCop::Formatter; end + +# Does not show individual offenses in the console. +# +# source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#6 +class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter + # source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#7 + def finished(inspected_files); end +end + +# Abstract base class for formatter, implements all public API methods. +# +# ## Creating Custom Formatter +# +# You can create a custom formatter by subclassing +# `RuboCop::Formatter::BaseFormatter` and overriding some methods +# or by implementing all the methods by duck typing. +# +# ## Using Custom Formatter in Command Line +# +# You can tell RuboCop to use your custom formatter with a combination of +# `--format` and `--require` option. +# For example, when you have defined `MyCustomFormatter` in +# `./path/to/my_custom_formatter.rb`, you would type this command: +# +# rubocop --require ./path/to/my_custom_formatter --format MyCustomFormatter +# +# Note: The path passed to `--require` is directly passed to +# `Kernel.require`. +# If your custom formatter file is not in `$LOAD_PATH`, +# you need to specify the path as relative path prefixed with `./` +# explicitly or absolute path. +# +# ## Method Invocation Order +# +# For example, when RuboCop inspects 2 files, +# the invocation order should be like this: +# +# * `#initialize` +# * `#started` +# * `#file_started` +# * `#file_finished` +# * `#file_started` +# * `#file_finished` +# * `#finished` +# +# source://rubocop//lib/rubocop/formatter/base_formatter.rb#41 +class RuboCop::Formatter::BaseFormatter + # @api public + # @param output [IO] `$stdout` or opened file + # @return [BaseFormatter] a new instance of BaseFormatter + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#63 + def initialize(output, options = T.unsafe(nil)); end + + # Invoked at the end of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param offenses [Array(RuboCop::Cop::Offense)] all detected offenses for the file + # @return [void] + # @see RuboCop::Cop::Offense + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#104 + def file_finished(file, offenses); end + + # Invoked at the beginning of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param options [Hash] file specific information, currently this is always empty. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#89 + def file_started(file, options); end + + # Invoked after all files are inspected or interrupted by user. + # + # @api public + # @param inspected_files [Array(String)] the inspected file paths. + # This would be same as `target_files` passed to `#started` + # unless RuboCop is interrupted by user. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#116 + def finished(inspected_files); end + + # @api public + # @return [Hash] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#57 + def options; end + + # @api public + # @return [IO] the IO object passed to `#initialize` + # @see #initialize + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#50 + def output; end + + # Invoked once before any files are inspected. + # + # @api public + # @param target_files [Array(String)] all target file paths to be inspected + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#76 + def started(target_files); end +end + +# This formatter formats report data in clang style. +# The precise location of the problem is shown together with the +# relevant source code. +# +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#8 +class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#11 + def report_file(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 + def report_offense(file, offense); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 + def valid_line?(offense); end +end + +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#9 +RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This mix-in module provides string coloring methods for terminals. +# It automatically disables coloring if coloring is disabled in the process +# globally or the formatter's output is not a terminal. +# +# source://rubocop//lib/rubocop/formatter/colorizable.rb#8 +module RuboCop::Formatter::Colorizable + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def black(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def blue(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#21 + def colorize(string, *args); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def cyan(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def green(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def magenta(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#9 + def rainbow; end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def red(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def white(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def yellow(string); end +end + +# This formatter displays a YAML configuration file where all cops that +# detected any offenses are configured to not detect the offense. +# +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#7 +class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::PathUtil + + # @return [DisabledConfigFormatter] a new instance of DisabledConfigFormatter + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#40 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 + def file_started(_file, options); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#48 + def finished(_inspected_files); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#69 + def auto_gen_enforced_style?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 + def command; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 + def cop_config_params(default_cfg, cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 + def excludes(offending_files, cop_name, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 + def filtered_config(cfg); end + + # Returns true if the given arr include the given elm or if any of the + # given arr is a regexp that matches the given elm. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#277 + def include_or_match?(arr, elm); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 + def merge_mode_for_exclude?(cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 + def no_exclude_limit?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 + def output_cop(cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 + def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 + def output_cop_config(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 + def output_cop_param_comments(output_buffer, params, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 + def output_exclude_list(output_buffer, offending_files, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 + def output_exclude_path(output_buffer, exclude_path, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 + def output_offending_files(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 + def output_offenses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 + def safe_autocorrect?(config); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 + def set_max(cfg, cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#125 + def should_set_max?(cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 + def show_offense_counts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#61 + def show_timestamp?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 + def supports_safe_autocorrect?(cop_class, default_cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 + def supports_unsafe_autocorrect?(cop_class, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 + def timestamp; end + + class << self + # Returns the value of attribute config_to_allow_offenses. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def config_to_allow_offenses; end + + # Sets the attribute config_to_allow_offenses + # + # @param value the value to set the attribute config_to_allow_offenses to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def config_to_allow_offenses=(_arg0); end + + # Returns the value of attribute detected_styles. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def detected_styles; end + + # Sets the attribute detected_styles + # + # @param value the value to set the attribute detected_styles to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def detected_styles=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#10 +RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) + +# This formatter displays the report data in format that's +# easy to process in the Emacs text editor. +# The output is machine-parsable. +# +# source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#8 +class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#9 + def file_finished(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#24 + def message(offense); end +end + +# This formatter displays just a list of the files with offenses in them, +# separated by newlines. The output is machine-parsable. +# +# Here's the format: +# +# /some/file +# /some/other/file +# +# source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#12 +class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#13 + def file_finished(file, offenses); end +end + +# This is a collection of formatters. A FormatterSet can hold multiple +# formatter instances and provides transparent formatter API methods +# which invoke same method of each formatters. +# +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#10 +class RuboCop::Formatter::FormatterSet < ::Array + # @return [FormatterSet] a new instance of FormatterSet + # + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 + def initialize(options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 + def add_formatter(formatter_type, output_path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 + def close_output_files; end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 + def file_started(file, options); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 + def finished(*args); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 + def started(*args); end + + private + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 + def builtin_formatter_class(specified_key); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 + def custom_formatter_class(specified_class_name); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 + def formatter_class(formatter_type); end +end + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 +RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) + +# This formatter displays a progress bar and shows details of offenses as +# soon as they are detected. +# This is inspired by the Fuubar formatter for RSpec by Jeff Kreeftmeijer. +# https://github.com/jeffkreeftmeijer/fuubar +# +# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#11 +class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter + # @return [FuubarStyleFormatter] a new instance of FuubarStyleFormatter + # + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#14 + def initialize(*output); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#51 + def count_stats(offenses); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#40 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#71 + def progressbar_color; end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#20 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#61 + def with_color; end +end + +# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#12 +RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) + +# This formatter formats report data as GitHub Workflow commands resulting +# in GitHub check annotations when run within GitHub Actions. +# +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 +class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 + def finished(_inspected_files); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 + def github_escape(string); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 + def github_severity(offense); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 + def report_offense(file, offense); end +end + +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 +RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# This formatter saves the output as an html file. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 +class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [HTMLFormatter] a new instance of HTMLFormatter + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 + def render_html; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 + def summary; end +end + +# This class provides helper methods used in the ERB CSS template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137 +class RuboCop::Formatter::HTMLFormatter::CSSContext + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148 + def binding; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138 +RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +RuboCop::Formatter::HTMLFormatter::CSS_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 +class RuboCop::Formatter::HTMLFormatter::Color < ::Struct + # Returns the value of attribute alpha + # + # @return [Object] the current value of alpha + def alpha; end + + # Sets the attribute alpha + # + # @param value [Object] the value to set the attribute alpha to. + # @return [Object] the newly set value + def alpha=(_); end + + # Returns the value of attribute blue + # + # @return [Object] the current value of blue + def blue; end + + # Sets the attribute blue + # + # @param value [Object] the value to set the attribute blue to. + # @return [Object] the newly set value + def blue=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 + def fade_out(amount); end + + # Returns the value of attribute green + # + # @return [Object] the current value of green + def green; end + + # Sets the attribute green + # + # @param value [Object] the value to set the attribute green to. + # @return [Object] the newly set value + def green=(_); end + + # Returns the value of attribute red + # + # @return [Object] the current value of red + def red; end + + # Sets the attribute red + # + # @param value [Object] the value to set the attribute red to. + # @return [Object] the newly set value + def red=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 + def to_s; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 +RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This class provides helper methods used in the ERB template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#63 +class RuboCop::Formatter::HTMLFormatter::ERBContext + include ::RuboCop::PathUtil + include ::RuboCop::Formatter::TextUtil + + # @return [ERBContext] a new instance of ERBContext + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71 + def initialize(files, summary); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118 + def base64_encoded_logo_image; end + + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 + def binding; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 + def decorated_message(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114 + def escape(string); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + def highlight_source_tag(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 + def highlighted_source_line(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126 + def render_css; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 + def source_after_highlight(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 + def source_before_highlight(offense); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 + def summary; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 +RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 +class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + def offenses=(_); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + def path=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 +class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct + # Returns the value of attribute inspected_files + # + # @return [Object] the current value of inspected_files + def inspected_files; end + + # Sets the attribute inspected_files + # + # @param value [Object] the value to set the attribute inspected_files to. + # @return [Object] the newly set value + def inspected_files=(_); end + + # Returns the value of attribute offense_count + # + # @return [Object] the current value of offense_count + def offense_count; end + + # Sets the attribute offense_count + # + # @param value [Object] the value to set the attribute offense_count to. + # @return [Object] the newly set value + def offense_count=(_); end + + # Returns the value of attribute target_files + # + # @return [Object] the current value of target_files + def target_files; end + + # Sets the attribute target_files + # + # @param value [Object] the value to set the attribute target_files to. + # @return [Object] the newly set value + def target_files=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 +RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) + +# This formatter formats the report data in JSON format. +# +# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 +class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::PathUtil + + # @return [JSONFormatter] a new instance of JSONFormatter + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 + def hash_for_file(file, offenses); end + + # TODO: Consider better solution for Offense#real_column. + # The minimum value of `start_column: real_column` is 1. + # So, the minimum value of `last_column` should be 1. + # And non-zero value of `last_column` should be used as is. + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#64 + def hash_for_location(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 + def hash_for_offense(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#32 + def metadata_hash; end + + # Returns the value of attribute output_hash. + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#11 + def output_hash; end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 + def started(target_files); end +end + +# This formatter formats the report data in JUnit format. +# +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 +class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [JUnitFormatter] a new instance of JUnitFormatter + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + def finished(_inspected_files); end + + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 + def offenses_for_cop(all_offenses, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 + def relevant_for_output?(options, target_offenses); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 + def reset_count; end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end +end + +# This formatter displays the report data in markdown +# +# source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#6 +class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::TextUtil + include ::RuboCop::PathUtil + + # @return [MarkdownFormatter] a new instance of MarkdownFormatter + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#11 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#21 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 + def files; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#26 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#17 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#73 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#33 + def render_markdown; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#67 + def write_code(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#61 + def write_context(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#42 + def write_file_messages; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#54 + def write_heading(file); end +end + +# This formatter displays the list of offended cops with a count of how +# many offenses of their kind were found. Ordered by desc offense count +# +# Here's the format: +# +# 26 LineLength +# 3 OneLineConditional +# -- +# 29 Total in 5 files +# +# source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 +class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#81 + def cop_information(cop_name); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#42 + def file_finished(_file, offenses); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#51 + def finished(_inspected_files); end + + # Returns the value of attribute offense_counts. + # + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 + def offense_counts; end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#73 + def ordered_offense_counts(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#56 + def report_summary(offense_counts, offending_files_count); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 + def total_offense_count(offense_counts); end +end + +# This formatter prints a PACDOT per every file to be analyzed. +# Pacman will "eat" one PACDOT per file when no offense is detected. +# Otherwise it will print a Ghost. +# This is inspired by the Pacman formatter for RSpec by Carlos Rojas. +# https://github.com/go-labs/rspec_pacman_formatter +# +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#10 +class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [PacmanFormatter] a new instance of PacmanFormatter + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#19 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#50 + def cols; end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#37 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#33 + def file_started(_file, _options); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#43 + def next_step(offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#64 + def pacdots(number); end + + # Returns the value of attribute progress_line. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 + def progress_line; end + + # Sets the attribute progress_line + # + # @param value the value to set the attribute progress_line to. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 + def progress_line=(_arg0); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#26 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#68 + def step(character); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#57 + def update_progress_line; end +end + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#14 +RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#15 +RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) + +# This formatter display dots for files with no offenses and +# letters for files with problems in the them. In the end it +# appends the regular report data in the clang style format. +# +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#8 +class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [ProgressFormatter] a new instance of ProgressFormatter + # + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#13 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#33 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#50 + def report_file_as_mark(offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#18 + def started(target_files); end +end + +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#11 +RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) + +# If no offenses are found, no output is displayed. +# Otherwise, SimpleTextFormatter's output is displayed. +# +# source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#7 +class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#8 + def report_summary(file_count, offense_count, correction_count, correctable_count); end +end + +# A basic formatter that displays only files with offenses. +# Offenses are displayed at compact form - just the +# location of the problem and the associated message. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#10 +class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::PathUtil + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#29 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#36 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#43 + def report_file(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#57 + def report_summary(file_count, offense_count, correction_count, correctable_count); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#23 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#85 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#80 + def colored_severity_code(offense); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#73 + def count_stats(offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#89 + def message(offense); end +end + +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#14 +RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) + +# A helper class for building the report summary text. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#105 +class RuboCop::Formatter::SimpleTextFormatter::Report + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::Formatter::TextUtil + + # @return [Report] a new instance of Report + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#110 + def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#123 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#160 + def correctable; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#153 + def corrections; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#142 + def files; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#146 + def offenses; end + + # Returns the value of attribute rainbow. + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#140 + def rainbow; end +end + +# This formatter formats report data using the Test Anything Protocol. +# TAP allows for to communicate tests results in a language agnostics way. +# +# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#7 +class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#8 + def started(target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 + def message(offense); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#29 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#46 + def report_offense(file, offense); end +end + +# Common logic for UI texts. +# +# source://rubocop//lib/rubocop/formatter/text_util.rb#6 +module RuboCop::Formatter::TextUtil + private + + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + end +end + +# This formatter displays the list of offensive files, sorted by number of +# offenses with the worst offenders first. +# +# Here's the format: +# +# 26 this/file/is/really/bad.rb +# 3 just/ok.rb +# -- +# 29 Total in 2 files +# +# source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#16 +class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#31 + def finished(_inspected_files); end + + # Returns the value of attribute offense_counts. + # + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#17 + def offense_counts; end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#55 + def ordered_offense_counts(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#36 + def report_summary(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#19 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#59 + def total_offense_count(offense_counts); end +end + +# source://rubocop//lib/rubocop/options.rb#8 +class RuboCop::IncorrectCopNameError < ::StandardError; end + +# The RuboCop's built-in LSP module. +# +# source://rubocop//lib/rubocop/lsp.rb#5 +module RuboCop::LSP + private + + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end + + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end + + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + + class << self + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end + + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end + + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + end +end + +# Log for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/logger.rb#16 +class RuboCop::LSP::Logger + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/logger.rb#17 + def log(message); end + end +end + +# Routes for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/routes.rb#18 +class RuboCop::LSP::Routes + # @api private + # @return [Routes] a new instance of Routes + # + # source://rubocop//lib/rubocop/lsp/routes.rb#25 + def initialize(server); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#31 + def for(name); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#38 + def handle_initialize(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#57 + def handle_initialized(_request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#167 + def handle_method_missing(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#64 + def handle_shutdown(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#156 + def handle_unsupported_method(request, method = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#205 + def diagnostic(file_uri, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#175 + def extract_initialization_options_from(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#185 + def format_file(file_uri, command: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#219 + def remove_file_protocol_from(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#223 + def to_diagnostic(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#235 + def to_range(location); end + + class << self + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#19 + def handle(name, &block); end + end +end + +# Runtime for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/runtime.rb#16 +class RuboCop::LSP::Runtime + # @api private + # @return [Runtime] a new instance of Runtime + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#19 + def initialize(config_store); end + + # This abuses the `--stdin` option of rubocop and reads the formatted text + # from the `options[:stdin]` that rubocop mutates. This depends on + # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup + # or reassign that options object. Risky business! + # + # Reassigning `options[:stdin]` is done here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 + # Printing `options[:stdin]` + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 + # Setting `parallel: true` would break this here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 + # + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#38 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def layout_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def lint_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#55 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def safe_autocorrect=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#77 + def config_only_options; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#84 + def redirect_stdout(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#92 + def run_rubocop(options, path); end +end + +# Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/server.rb#22 +class RuboCop::LSP::Server + # @api private + # @return [Server] a new instance of Server + # + # source://rubocop//lib/rubocop/lsp/server.rb#23 + def initialize(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#61 + def configure(options); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#53 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#57 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#34 + def start; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#67 + def stop(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#49 + def write(response); end +end + +# Severity for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#7 +class RuboCop::LSP::Severity + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/severity.rb#17 + def find_by(rubocop_severity); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#8 +RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a lockfile for use when checking for gems. +# Does not actually resolve gems, just parses the lockfile. +# +# @api private +# +# source://rubocop//lib/rubocop/lockfile.rb#15 +class RuboCop::Lockfile + # @api private + # @param lockfile_path [String, Pathname, nil] + # @return [Lockfile] a new instance of Lockfile + # + # source://rubocop//lib/rubocop/lockfile.rb#17 + def initialize(lockfile_path = T.unsafe(nil)); end + + # Gems that the bundle directly depends on. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#29 + def dependencies; end + + # Returns the locked versions of gems from this lockfile. + # + # @api private + # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies + # are returned, i.e. those listed explicitly in the `Gemfile`. + # + # source://rubocop//lib/rubocop/lockfile.rb#49 + def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end + + # All activated gems, including transitive dependencies. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#37 + def gems; end + + # Whether this lockfile includes the named gem, directly or indirectly. + # + # @api private + # @param name [String] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#65 + def includes_gem?(name); end + + private + + # @api private + # @return [Bundler::LockfileParser, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#72 + def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end +end + +# Parse different formats of magic comments. +# +# @abstract parent of three different magic comment handlers +# +# source://rubocop//lib/rubocop/magic_comment.rb#7 +class RuboCop::MagicComment + # @return [MagicComment] a new instance of MagicComment + # + # source://rubocop//lib/rubocop/magic_comment.rb#32 + def initialize(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#36 + def any?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#104 + def encoding_specified?; end + + # Expose the `frozen_string_literal` value coerced to a boolean if possible. + # + # @return [Boolean] if value is `true` or `false` + # @return [nil] if frozen_string_literal comment isn't found + # @return [String] if comment is found but isn't true or false + # + # source://rubocop//lib/rubocop/magic_comment.rb#86 + def frozen_string_literal; end + + # Does the magic comment enable the frozen string literal feature. + # + # Test whether the frozen string literal value is `true`. Cannot + # just return `frozen_string_literal` since an invalid magic comment + # `'yes'` does not actually enable the feature + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#55 + def frozen_string_literal?; end + + # Was a magic comment for the frozen string literal found? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#70 + def frozen_string_literal_specified?; end + + # Expose the `shareable_constant_value` value coerced to a boolean if possible. + # + # @return [String] for shareable_constant_value config + # + # source://rubocop//lib/rubocop/magic_comment.rb#100 + def shareable_constant_value; end + + # Was a shareable_constant_value specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#77 + def shareable_constant_value_specified?; end + + # source://rubocop//lib/rubocop/magic_comment.rb#115 + def typed; end + + # Was the Sorbet `typed` sigil specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#111 + def typed_specified?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#43 + def valid?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#59 + def valid_literal_value?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#63 + def valid_shareable_constant_value?; end + + private + + # Match the entire comment string with a pattern and take the first capture. + # + # @param pattern [Regexp] + # @return [String] if pattern matched + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#131 + def extract(pattern); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#121 + def specified?(value); end + + class << self + # Detect magic comment format and pass it to the appropriate wrapper. + # + # @param comment [String] + # @return [RuboCop::MagicComment] + # + # source://rubocop//lib/rubocop/magic_comment.rb#23 + def parse(comment); end + end +end + +# Parent to Vim and Emacs magic comment handling. +# +# @abstract +# +# source://rubocop//lib/rubocop/magic_comment.rb#138 +class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment + # source://rubocop//lib/rubocop/magic_comment.rb#139 + def encoding; end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#144 + def without(type); end + + private + + # Find a token starting with the provided keyword and extract its value. + # + # @param keyword [String] + # @return [String] extracted value if it is found + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#159 + def match(keyword); end + + # Individual tokens composing an editor specific comment string. + # + # @return [Array] + # + # source://rubocop//lib/rubocop/magic_comment.rb#174 + def tokens; end +end + +# Wrapper for Emacs style magic comments. +# +# @example Emacs style comment +# comment = RuboCop::MagicComment.parse( +# '# -*- encoding: ASCII-8BIT -*-' +# ) +# +# comment.encoding # => 'ascii-8bit' +# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html +# @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y +# +# source://rubocop//lib/rubocop/magic_comment.rb#190 +class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment + private + + # source://rubocop//lib/rubocop/magic_comment.rb#198 + def extract_frozen_string_literal; end + + # source://rubocop//lib/rubocop/magic_comment.rb#202 + def extract_shareable_constant_value; end + + # Emacs comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#207 + def extract_typed; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#192 +RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#194 +RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#191 +RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#193 +RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#11 +RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# Wrapper for regular magic comments not bound to an editor. +# +# Simple comments can only specify one setting per comment. +# +# @example frozen string literal comments +# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') +# comment1.frozen_string_literal # => true +# comment1.encoding # => nil +# @example encoding comments +# comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') +# comment2.frozen_string_literal # => nil +# comment2.encoding # => 'utf-8' +# +# source://rubocop//lib/rubocop/magic_comment.rb#261 +class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment + # Match `encoding` or `coding` + # + # source://rubocop//lib/rubocop/magic_comment.rb#265 + def encoding; end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#270 + def without(type); end + + private + + # Extract `frozen_string_literal`. + # + # The `frozen_string_literal` magic comment only works if it + # is the only text in the comment. + # + # Case-insensitive and dashes/underscores are acceptable. + # + # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138 + # + # source://rubocop//lib/rubocop/magic_comment.rb#287 + def extract_frozen_string_literal; end + + # source://rubocop//lib/rubocop/magic_comment.rb#291 + def extract_shareable_constant_value; end + + # source://rubocop//lib/rubocop/magic_comment.rb#295 + def extract_typed; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#262 +RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) + +# IRB's pattern for matching magic comment tokens. +# +# @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 +# +# source://rubocop//lib/rubocop/magic_comment.rb#10 +RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) + +# Wrapper for Vim style magic comments. +# +# @example Vim style comment +# comment = RuboCop::MagicComment.parse( +# '# vim: filetype=ruby, fileencoding=ascii-8bit' +# ) +# +# comment.encoding # => 'ascii-8bit' +# +# source://rubocop//lib/rubocop/magic_comment.rb#218 +class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment + # For some reason the fileencoding keyword only works if there + # is at least one other token included in the string. For example + # + # # works + # # vim: foo=bar, fileencoding=ascii-8bit + # + # # does nothing + # # vim: foo=bar, fileencoding=ascii-8bit + # + # source://rubocop//lib/rubocop/magic_comment.rb#234 + def encoding; end + + # Vim comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#245 + def extract_typed; end + + # Vim comments cannot specify frozen string literal behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#239 + def frozen_string_literal; end + + # Vim comments cannot specify shareable constant values behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#242 + def shareable_constant_value; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#220 +RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#223 +RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/magic_comment.rb#222 +RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#219 +RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#221 +RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# Common functionality for finding names that are similar to a given name. +# +# @api private +# +# source://rubocop//lib/rubocop/name_similarity.rb#6 +module RuboCop::NameSimilarity + private + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#5 +RuboCop::NodePattern = RuboCop::AST::NodePattern + +# source://rubocop//lib/rubocop/options.rb#10 +class RuboCop::OptionArgumentError < ::StandardError; end + +# This class handles command line options. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#14 +class RuboCop::Options + # @api private + # @return [Options] a new instance of Options + # + # source://rubocop//lib/rubocop/options.rb#22 + def initialize; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#27 + def parse(command_line_args); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#229 + def add_additional_modes(opts); end + + # the autocorrect command-line arguments map to the autocorrect @options values like so: + # :fix_layout :autocorrect :safe_autocorrect :autocorrect_all + # -x, --fix-layout true true - - + # -a, --auto-correct - true true - + # --safe-auto-correct - true true - + # -A, --auto-correct-all - true - true + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#140 + def add_autocorrection_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#205 + def add_cache_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#73 + def add_check_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#163 + def add_config_generation_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#181 + def add_cop_selection_csv_option(option, opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#241 + def add_general_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#212 + def add_lsp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#105 + def add_output_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#253 + def add_profile_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#218 + def add_server_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#196 + def add_severity_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#53 + def define_options; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#263 + def handle_deprecated_option(old_option, new_option); end + + # Finds the option in `args` starting with -- and converts it to a symbol, + # e.g. [..., '--autocorrect', ...] to :autocorrect. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#297 + def long_opt_symbol(args); end + + # Sets a value in the @options hash, based on the given long option and its + # value, in addition to calling the block if a block is given. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#286 + def option(opts, *args); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#268 + def rainbow; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#302 + def require_feature(file); end + + # Creates a section of options in order to separate them visually when + # using `--help`. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#278 + def section(opts, heading, &_block); end +end + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#20 +RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#19 +RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#15 +RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) + +# This module contains help texts for command line options. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#498 +module RuboCop::OptionsHelp; end + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#500 +RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#499 +RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#502 +RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) + +# Validates option arguments and the options' compatibility with each other. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#312 +class RuboCop::OptionsValidator + # @api private + # @return [OptionsValidator] a new instance of OptionsValidator + # + # source://rubocop//lib/rubocop/options.rb#350 + def initialize(options); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#472 + def boolean_or_empty_cache?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#442 + def disable_parallel_when_invalid_option_combo; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#468 + def except_syntax?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#476 + def incompatible_options; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#455 + def invalid_arguments_for_parallel; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#463 + def only_includes_redundant_disable?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#382 + def validate_auto_gen_config; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#428 + def validate_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#488 + def validate_cache_enabled_for_cache_root; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#359 + def validate_compatibility; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#354 + def validate_cop_options; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#403 + def validate_display_only_correctable_and_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#395 + def validate_display_only_failed; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#412 + def validate_display_only_failed_and_display_only_correctable; end + + # @api private + # @raise [OptionParser::MissingArgument] + # + # source://rubocop//lib/rubocop/options.rb#480 + def validate_exclude_limit_option; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#421 + def validate_lsp_and_editor_mode; end + + class << self + # Cop name validation must be done later than option parsing, so it's not + # called from within Options. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#319 + def validate_cop_list(names); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#336 + def format_message_from(name, cop_names); end + end +end + +# Common methods and behaviors for dealing with paths. +# +# source://rubocop//lib/rubocop/path_util.rb#5 +module RuboCop::PathUtil + private + + # Returns true for an absolute Unix or Windows path. + # + # source://rubocop//lib/rubocop/path_util.rb#76 + def absolute?(path); end + + # Returns true for a glob + # + # source://rubocop//lib/rubocop/path_util.rb#81 + def glob?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#111 + def hidden_dir?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#94 + def hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#85 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # source://rubocop//lib/rubocop/path_util.rb#48 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # source://rubocop//lib/rubocop/path_util.rb#101 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/path_util.rb#34 + def smart_path(path); end + + class << self + # Returns true for an absolute Unix or Windows path. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#76 + def absolute?(path); end + + # Returns true for a glob + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#81 + def glob?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#111 + def hidden_dir?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#94 + def hidden_file?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#85 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#48 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#101 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # Returns the value of attribute relative_paths_cache. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache; end + + # Sets the attribute relative_paths_cache + # + # @param value the value to set the attribute relative_paths_cache to. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache=(_arg0); end + + # source://rubocop//lib/rubocop/path_util.rb#34 + def smart_path(path); end + end +end + +# source://rubocop//lib/rubocop/path_util.rb#98 +RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/path_util.rb#31 +RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) + +# This module provides information on the platform that RuboCop is being run +# on. +# +# source://rubocop//lib/rubocop/platform.rb#6 +module RuboCop::Platform + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/platform.rb#7 + def windows?; end + end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#6 +RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource + +# Common methods and behaviors for dealing with remote config files. +# +# @api private +# +# source://rubocop//lib/rubocop/remote_config.rb#9 +class RuboCop::RemoteConfig + # @api private + # @return [RemoteConfig] a new instance of RemoteConfig + # + # source://rubocop//lib/rubocop/remote_config.rb#14 + def initialize(url, base_dir); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#23 + def file; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#36 + def inherit_from_remote(file, path); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#10 + def uri; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#99 + def cache_name_from_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#82 + def cache_path; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#86 + def cache_path_exists?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#90 + def cache_path_expired?; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#105 + def cloned_url; end + + # @api private + # @yield [request] + # + # source://rubocop//lib/rubocop/remote_config.rb#57 + def generate_request(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#66 + def handle_response(response, limit, &block); end + + # @api private + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/remote_config.rb#44 + def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end +end + +# @api private +# +# source://rubocop//lib/rubocop/remote_config.rb#12 +RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) + +# Provides functionality for caching RuboCop runs. +# +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#11 +class RuboCop::ResultCache + # @api private + # @return [ResultCache] a new instance of ResultCache + # + # source://rubocop//lib/rubocop/result_cache.rb#87 + def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#100 + def debug?; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#108 + def load; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#85 + def path; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#113 + def save(offenses); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#104 + def valid?; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#146 + def any_symlink?(path); end + + # We combine team and options into a single "context" checksum to avoid + # making file names that are too long for some filesystems to handle. + # This context is for anything that's not (1) the RuboCop executable + # checksum or (2) the inspected file checksum. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#229 + def context_checksum(team, options); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#189 + def digest(path); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#157 + def file_checksum(file, config_store); end + + # Return a hash of the options given at invocation, minus the ones that have + # no effect on which offenses and disabled line ranges are found, and thus + # don't affect caching. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#220 + def relevant_options_digest(options); end + + # The checksum of the RuboCop program running the inspection. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#174 + def rubocop_checksum; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#200 + def rubocop_extra_features; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#142 + def symlink_protection_triggered?(path); end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#81 + def allow_symlinks_in_cache_location?(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#75 + def cache_root(config_store); end + + # Remove old files so that the cache doesn't grow too big. When the + # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the + # files in the cache are removed. The reason for removing so much is that + # cleaning should be done relatively seldom, since there is a slight risk + # that some other RuboCop process was just about to read the file, when + # there's parallel execution and the cache is shared. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#28 + def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#170 + def inhibit_cleanup; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#170 + def inhibit_cleanup=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#42 + def rubocop_required_features; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#42 + def rubocop_required_features=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#170 + def source_checksum; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#170 + def source_checksum=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#65 + def remove_files(files, dirs, remove_count); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#52 + def remove_oldest_files(files, dirs, cache_root, verbose); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#48 + def requires_file_removal?(file_count, config_store); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#16 +RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#12 +RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) + +# This class handles the processing of files, which includes dealing with +# formatters and letting cops inspect the files. +# +# source://rubocop//lib/rubocop/runner.rb#8 +class RuboCop::Runner + # @return [Runner] a new instance of Runner + # + # source://rubocop//lib/rubocop/runner.rb#63 + def initialize(options, config_store); end + + # Sets the attribute aborting + # + # @param value the value to set the attribute aborting to. + # + # source://rubocop//lib/rubocop/runner.rb#61 + def aborting=(_arg0); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#87 + def aborting?; end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/runner.rb#60 + def errors; end + + # source://rubocop//lib/rubocop/runner.rb#71 + def run(paths); end + + # Returns the value of attribute warnings. + # + # source://rubocop//lib/rubocop/runner.rb#60 + def warnings; end + + private + + # source://rubocop//lib/rubocop/runner.rb#200 + def add_redundant_disables(file, offenses, source); end + + # source://rubocop//lib/rubocop/runner.rb#174 + def cached_result(file, team); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#254 + def cached_run?; end + + # Check whether a run created source identical to a previous run, which + # means that we definitely have an infinite loop. + # + # source://rubocop//lib/rubocop/runner.rb#332 + def check_for_infinite_loop(processed_source, offenses_by_iteration); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#226 + def check_for_redundant_disables?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#427 + def considered_failure?(offense); end + + # source://rubocop//lib/rubocop/runner.rb#460 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/runner.rb#276 + def do_inspection_loop(file); end + + # source://rubocop//lib/rubocop/runner.rb#137 + def each_inspected_file(files); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#240 + def except_redundant_cop_disable_directive?; end + + # source://rubocop//lib/rubocop/runner.rb#361 + def extract_ruby_sources(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#249 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/runner.rb#178 + def file_offense_cache(file); end + + # source://rubocop//lib/rubocop/runner.rb#166 + def file_offenses(file); end + + # source://rubocop//lib/rubocop/runner.rb#244 + def file_started(file); end + + # source://rubocop//lib/rubocop/runner.rb#407 + def filter_cop_classes(cop_classes, config); end + + # source://rubocop//lib/rubocop/runner.rb#108 + def find_target_files(paths); end + + # source://rubocop//lib/rubocop/runner.rb#418 + def formatter_set; end + + # source://rubocop//lib/rubocop/runner.rb#475 + def get_processed_source(file); end + + # source://rubocop//lib/rubocop/runner.rb#346 + def inspect_file(processed_source, team = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/runner.rb#119 + def inspect_files(files); end + + # source://rubocop//lib/rubocop/runner.rb#307 + def iterate_until_no_changes(source, offenses_by_iteration); end + + # source://rubocop//lib/rubocop/runner.rb#152 + def list_files(paths); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#456 + def mark_as_safe_by_config?(config); end + + # source://rubocop//lib/rubocop/runner.rb#464 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/runner.rb#368 + def mobilize_team(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#373 + def mobilized_cop_classes(config); end + + # source://rubocop//lib/rubocop/runner.rb#436 + def offenses_to_report(offenses); end + + # source://rubocop//lib/rubocop/runner.rb#156 + def process_file(file); end + + # source://rubocop//lib/rubocop/runner.rb#397 + def qualify_option_cop_names; end + + # @yield [cop] + # + # source://rubocop//lib/rubocop/runner.rb#232 + def redundant_cop_disable_directive(file); end + + # source://rubocop//lib/rubocop/runner.rb#266 + def save_in_cache(cache, offenses); end + + # A Cop::Team instance is stateful and may change when inspecting. + # The "standby" team for a given config is an initialized but + # otherwise dormant team that can be used for config- and option- + # level caching in ResultCache. + # + # source://rubocop//lib/rubocop/runner.rb#503 + def standby_team(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#414 + def style_guide_cops_only?(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#448 + def supports_safe_autocorrect?(offense); end + + # @yield [team] + # + # source://rubocop//lib/rubocop/runner.rb#215 + def team_for_redundant_disables(file, offenses, source); end + + # Warms up the RuboCop cache by forking a suitable number of RuboCop + # instances that each inspects its allotted group of files. + # + # source://rubocop//lib/rubocop/runner.rb#95 + def warm_cache(target_files); end + + class << self + # @return [Array<#call>] + # + # source://rubocop//lib/rubocop/runner.rb#33 + def ruby_extractors; end + + private + + # @return [#call] + # + # source://rubocop//lib/rubocop/runner.rb#40 + def default_ruby_extractor; end + end +end + +# An exception indicating that the inspection loop got stuck correcting +# offenses back and forth. +# +# source://rubocop//lib/rubocop/runner.rb#11 +class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError + # @return [InfiniteCorrectionLoop] a new instance of InfiniteCorrectionLoop + # + # source://rubocop//lib/rubocop/runner.rb#14 + def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end + + # Returns the value of attribute offenses. + # + # source://rubocop//lib/rubocop/runner.rb#12 + def offenses; end +end + +# @api private +# +# source://rubocop//lib/rubocop/runner.rb#53 +RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://rubocop//lib/rubocop/runner.rb#56 +RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) + +# Take a string with embedded escapes, and convert the escapes as the Ruby +# interpreter would when reading a double-quoted string literal. +# For example, "\\n" will be converted to "\n". +# +# source://rubocop//lib/rubocop/string_interpreter.rb#7 +class RuboCop::StringInterpreter + class << self + # source://rubocop//lib/rubocop/string_interpreter.rb#24 + def interpret(string); end + + private + + # source://rubocop//lib/rubocop/string_interpreter.rb#51 + def interpret_hex(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#55 + def interpret_octal(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#33 + def interpret_string_escape(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#43 + def interpret_unicode(escape); end + end +end + +# source://rubocop//lib/rubocop/string_interpreter.rb#8 +RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/string_interpreter.rb#12 +RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# This class finds target files to inspect by scanning the directory tree and picking ruby files. +# +# @api private +# +# source://rubocop//lib/rubocop/target_finder.rb#6 +class RuboCop::TargetFinder + # @api private + # @return [TargetFinder] a new instance of TargetFinder + # + # source://rubocop//lib/rubocop/target_finder.rb#9 + def initialize(config_store, options = T.unsafe(nil)); end + + # Generate a list of target files by expanding globbing patterns (if any). If args is empty, + # recursively find all Ruby source files under the current directory + # + # @api private + # @return [Array] array of file paths + # + # source://rubocop//lib/rubocop/target_finder.rb#17 + def find(args, mode); end + + # Search for files recursively starting at the given base directory using the given flags that + # determine how the match is made. Excluded files will be removed later by the caller, but as an + # optimization find_files removes the top level directories that are excluded in configuration + # in the normal way (dir/**/*). + # + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#58 + def find_files(base_dir, flags); end + + # Finds all Ruby source files under the current or other supplied directory. A Ruby source file + # is defined as a file with the `.rb` extension or a file with no extension that has a ruby + # shebang line as its first line. + # It is possible to specify includes and excludes using the config file, so you can include + # other Ruby files like Rakefiles and gemspecs. + # + # @api private + # @param base_dir Root directory under which to search for + # ruby source files + # @return [Array] Array of filenames + # + # source://rubocop//lib/rubocop/target_finder.rb#41 + def target_files_in_dir(base_dir = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#120 + def all_cops_include; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#106 + def combined_exclude_glob_patterns(base_dir); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#172 + def configured_include?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#208 + def debug?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#212 + def fail_fast?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#200 + def force_exclusion?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#204 + def ignore_parent_exclusion?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#145 + def included_file?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#191 + def order; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#124 + def process_explicit_path(path, mode); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#176 + def ruby_executable?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#157 + def ruby_extension?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#161 + def ruby_extensions; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#149 + def ruby_file?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#168 + def ruby_filename?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#113 + def ruby_filenames; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#187 + def ruby_interpreters(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#153 + def stdin?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#98 + def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#73 + def to_inspect?(file, hidden_files, base_dir_config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#82 + def wanted_dir_patterns(base_dir, exclude_pattern, flags); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#134 + def without_excluded(files); end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_finder.rb#7 +RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) + +# The kind of Ruby that code inspected by RuboCop is written in. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#6 +class RuboCop::TargetRuby + # @api private + # @return [TargetRuby] a new instance of TargetRuby + # + # source://rubocop//lib/rubocop/target_ruby.rb#258 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#274 + def rubocop_version_with_support; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#262 + def source; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_ruby.rb#270 + def supported?; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#266 + def version; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#244 + def supported_versions; end + end +end + +# The lock file of Bundler may identify the target ruby version. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#191 +class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#192 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#225 + def bundler_lock_file_path; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#198 + def find_version; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#8 +RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) + +# If all else fails, a default version will be picked. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#232 +class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#233 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#239 + def find_version; end +end + +# The target ruby version may be found in a .gemspec file. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#53 +class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/target_ruby.rb#64 + def gem_requirement_versions(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#70 + def name; end + + # source://rubocop//lib/rubocop/target_ruby.rb#59 + def required_ruby_version(param0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#123 + def find_minimal_known_ruby(right_hand_side); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#76 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#86 + def gemspec_filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#93 + def gemspec_filepath; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#119 + def version_from_array(array); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#98 + def version_from_gemspec_file(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#107 + def version_from_right_hand_side(right_hand_side); end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#56 +RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#7 +RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#10 +RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) + +# The target ruby version may be configured in RuboCop's config. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#39 +class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#40 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#46 + def find_version; end +end + +# The target ruby version may be found in a .ruby-version file. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#137 +class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#141 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#147 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#155 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#151 + def pattern; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#162 + def version_file; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#138 +RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#139 +RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#248 +RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) + +# A place where information about a target ruby version is found. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#24 +class RuboCop::TargetRuby::Source + # @api private + # @return [Source] a new instance of Source + # + # source://rubocop//lib/rubocop/target_ruby.rb#27 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#25 + def name; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#32 + def to_s; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#25 + def version; end +end + +# The target ruby version may be found in a .tool-versions file, in a line +# starting with `ruby`. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#170 +class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#174 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#180 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#184 + def pattern; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#171 +RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#172 +RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/ast_aliases.rb#7 +RuboCop::Token = RuboCop::AST::Token + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/util.rb#5 +module RuboCop::Util + class << self + # source://rubocop//lib/rubocop/util.rb#6 + def silence_warnings; end + end +end + +# source://rubocop//lib/rubocop/error.rb#10 +class RuboCop::ValidationError < ::RuboCop::Error; end + +# This module holds the RuboCop version information. +# +# source://rubocop//lib/rubocop/version.rb#5 +module RuboCop::Version + class << self + # @api private + # + # source://rubocop//lib/rubocop/version.rb#108 + def document_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#58 + def extension_versions(env); end + + # Returns feature version in one of two ways: + # + # * Find by RuboCop core version style (e.g. rubocop-performance, rubocop-rspec) + # * Find by `bundle gem` version style (e.g. rubocop-rake) + # + # @api private + # + # source://rubocop//lib/rubocop/version.rb#92 + def feature_version(feature); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#43 + def parser_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#113 + def server_mode; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#21 + def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/version.rb#12 +RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#16 +RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#8 +RuboCop::Version::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/version.rb#6 +RuboCop::Version::STRING = T.let(T.unsafe(nil), String) + +# A Warning exception is different from an Offense with severity 'warning' +# When a Warning is raised, this means that RuboCop was unable to perform a +# requested operation (such as inspecting or correcting a source file) due to +# user error +# For example, a configuration value in .rubocop.yml might be malformed +# +# source://rubocop//lib/rubocop/warning.rb#9 +class RuboCop::Warning < ::StandardError; end + +# Find duplicated keys from YAML. +# +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#6 +module RuboCop::YAMLDuplicationChecker + class << self + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 + def check(yaml_string, filename, &on_duplicated); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#22 + def traverse(tree, &on_duplicated); end + end +end + +# Extensions to the core String class +# +# source://rubocop//lib/rubocop/core_ext/string.rb#4 +class String + include ::Comparable +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi new file mode 100644 index 0000000..f832ab1 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -0,0 +1,1318 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-progressbar` gem. +# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 +class ProgressBar + class << self + # source://ruby-progressbar//lib/ruby-progressbar.rb#9 + def create(*args); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#17 +class ProgressBar::Base + extend ::Forwardable + + # @return [Base] a new instance of Base + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#45 + def initialize(options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def clear(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#129 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format=(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#141 + def increment; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#199 + def inspect; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def log(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 + def pause; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def paused?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def progress(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#153 + def progress_mark=(mark); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def refresh(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 + def remainder_mark=(mark); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#114 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#110 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#87 + def start(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#133 + def started?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#106 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def stopped?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#161 + def title; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#165 + def title=(title); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 + def to_h; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#169 + def to_s(new_format = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 + def total=(new_total); end + + protected + + # Returns the value of attribute autofinish. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish; end + + # Sets the attribute autofinish + # + # @param value the value to set the attribute autofinish to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish=(_arg0); end + + # Returns the value of attribute autostart. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart; end + + # Sets the attribute autostart + # + # @param value the value to set the attribute autostart to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart=(_arg0); end + + # Returns the value of attribute bar_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component; end + + # Sets the attribute bar_component + # + # @param value the value to set the attribute bar_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component=(_arg0); end + + # Returns the value of attribute finished. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished; end + + # Sets the attribute finished + # + # @param value the value to set the attribute finished to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished=(_arg0); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output=(_arg0); end + + # Returns the value of attribute percentage_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component; end + + # Sets the attribute percentage_component + # + # @param value the value to set the attribute percentage_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component=(_arg0); end + + # Returns the value of attribute progressable. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable; end + + # Sets the attribute progressable + # + # @param value the value to set the attribute progressable to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector=(_arg0); end + + # Returns the value of attribute rate_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component; end + + # Sets the attribute rate_component + # + # @param value the value to set the attribute rate_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component=(_arg0); end + + # Returns the value of attribute time_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component; end + + # Sets the attribute time_component + # + # @param value the value to set the attribute time_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer=(_arg0); end + + # Returns the value of attribute title_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component; end + + # Sets the attribute title_component + # + # @param value the value to set the attribute title_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#226 + def update_progress(*args); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#28 +ProgressBar::Base::RUNNING_AVERAGE_RATE_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#21 +ProgressBar::Base::SMOOTHING_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#2 +module ProgressBar::Calculators; end + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#3 +class ProgressBar::Calculators::Length + # @return [Length] a new instance of Length + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#25 + def calculate_length; end + + # Returns the value of attribute current_length. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length; end + + # Sets the attribute current_length + # + # @param value the value to set the attribute current_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#14 + def length; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#18 + def length_changed?; end + + # Returns the value of attribute length_override. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#4 + def length_override; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#33 + def length_override=(other); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#29 + def reset_length; end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#56 + def dynamic_width; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#85 + def dynamic_width_stty; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#89 + def dynamic_width_tput; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#76 + def dynamic_width_via_io_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#71 + def dynamic_width_via_output_stream_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#81 + def dynamic_width_via_system_calls; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#43 + def terminal_width; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#93 + def unix?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#5 +module ProgressBar::Components; end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#6 +class ProgressBar::Components::Bar + # @return [Bar] a new instance of Bar + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#17 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#35 + def bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 + def bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#41 + def complete_bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 + def complete_bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#53 + def incomplete_space(length); end + + # Returns the value of attribute length. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length=(_arg0); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress=(_arg0); end + + # Returns the value of attribute progress_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark; end + + # Sets the attribute progress_mark + # + # @param value the value to set the attribute progress_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark=(_arg0); end + + # Returns the value of attribute remainder_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark; end + + # Sets the attribute remainder_mark + # + # @param value the value to set the attribute remainder_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#25 + def to_s(options = T.unsafe(nil)); end + + # Returns the value of attribute upa_steps. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps; end + + # Sets the attribute upa_steps + # + # @param value the value to set the attribute upa_steps to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#91 + def completed_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#81 + def incomplete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#71 + def integrated_percentage_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#77 + def standard_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#95 + def unknown_progress_frame; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 + def unknown_string; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#7 +ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#8 +ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#9 +ProgressBar::Components::Bar::DEFAULT_UPA_STEPS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#3 +class ProgressBar::Components::Percentage + # @return [Percentage] a new instance of Percentage + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#14 + def justified_percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#22 + def justified_percentage_with_precision; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#10 + def percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#18 + def percentage_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#3 +class ProgressBar::Components::Rate + # @return [Rate] a new instance of Rate + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#14 + def rate_of_change(format_string = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 + def rate_of_change_with_precision; end + + # Returns the value of attribute rate_scale. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale; end + + # Sets the attribute rate_scale + # + # @param value the value to set the attribute rate_scale to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 + def base_rate; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#26 + def scaled_rate; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#6 +class ProgressBar::Components::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#21 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#31 + def elapsed_with_label; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#47 + def estimated_wall_clock; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#43 + def estimated_with_friendly_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#27 + def estimated_with_label(out_of_bounds_time_format = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#35 + def estimated_with_no_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#39 + def estimated_with_unknown_oob; end + + protected + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#80 + def elapsed; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#66 + def estimated(out_of_bounds_time_format); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#94 + def estimated_seconds_remaining; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#88 + def estimated_with_elapsed_fallback(out_of_bounds_time_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#14 +ProgressBar::Components::Time::ELAPSED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#13 +ProgressBar::Components::Time::ESTIMATED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#12 +ProgressBar::Components::Time::NO_TIME_ELAPSED_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#11 +ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#9 +ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#16 +ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#8 +ProgressBar::Components::Time::OOB_TIME_FORMATS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#10 +ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#7 +ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 +ProgressBar::Components::Time::WALL_CLOCK_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#3 +class ProgressBar::Components::Title + # @return [Title] a new instance of Title + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute title. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title; end + + # Sets the attribute title + # + # @param value the value to set the attribute title to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#4 +ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#2 +module ProgressBar::Format; end + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#3 +class ProgressBar::Format::Formatter + class << self + # source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#4 + def process(format_string, max_length, bar); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#3 +class ProgressBar::Format::Molecule + # @return [Molecule] a new instance of Molecule + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#33 + def initialize(letter); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#38 + def bar_molecule?; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#46 + def full_key; end + + # Returns the value of attribute key. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#50 + def lookup_value(environment, length = T.unsafe(nil)); end + + # Returns the value of attribute method_name. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name; end + + # Sets the attribute method_name + # + # @param value the value to set the attribute method_name to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name=(_arg0); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#42 + def non_bar_molecule?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#28 +ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#4 +ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 +class ProgressBar::Format::String < ::String + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#13 + def bar_molecule_placeholder_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#21 + def bar_molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#9 + def displayable_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#25 + def molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#17 + def non_bar_molecules; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 +ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#6 +ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/errors/invalid_progress_error.rb#2 +class ProgressBar::InvalidProgressError < ::RuntimeError; end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 +class ProgressBar::Output + # @return [Output] a new instance of Output + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#10 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#37 + def clear_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#41 + def length; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#30 + def log(string); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#50 + def refresh(options = T.unsafe(nil)); end + + # Returns the value of attribute stream. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream; end + + # Sets the attribute stream + # + # @param value the value to set the attribute stream to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def with_refresh; end + + protected + + # Returns the value of attribute bar. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar; end + + # Sets the attribute bar + # + # @param value the value to set the attribute bar to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar=(_arg0); end + + # Returns the value of attribute length_calculator. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator; end + + # Sets the attribute length_calculator + # + # @param value the value to set the attribute length_calculator to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator=(_arg0); end + + # Returns the value of attribute throttle. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle; end + + # Sets the attribute throttle + # + # @param value the value to set the attribute throttle to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#66 + def print_and_flush; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#20 + def detect(options = T.unsafe(nil)); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#6 +ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#4 +module ProgressBar::Outputs; end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#5 +class ProgressBar::Outputs::NonTty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#18 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#8 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#28 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#38 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#14 + def last_update_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#36 + def refresh_with_format_change(*_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#32 + def resolve_format(*_arg0); end + + protected + + # Sets the attribute last_update_length + # + # @param value the value to set the attribute last_update_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#44 + def last_update_length=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#6 +ProgressBar::Outputs::NonTty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#5 +class ProgressBar::Outputs::Tty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#15 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#10 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#19 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#27 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def refresh_with_format_change; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#23 + def resolve_format(other_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#6 +ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#4 +class ProgressBar::Progress + # @return [Progress] a new instance of Progress + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#104 + def absolute; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#41 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#27 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#31 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#85 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#73 + def percentage_completed; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#97 + def percentage_completed_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#55 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#51 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#18 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute starting_position. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position; end + + # Sets the attribute starting_position + # + # @param value the value to set the attribute starting_position to. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position=(_arg0); end + + # Returns the value of attribute total. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def total; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#64 + def total=(new_total); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#93 + def total_with_unknown_indicator; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#89 + def unknown?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#6 +ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#5 +ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#4 +class ProgressBar::Projector + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projector.rb#10 + def from_type(name); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#5 +ProgressBar::Projector::DEFAULT_PROJECTOR = ProgressBar::Projectors::SmoothedAverage + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#6 +ProgressBar::Projector::NAME_TO_PROJECTOR_MAP = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#2 +module ProgressBar::Projectors; end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#3 +class ProgressBar::Projectors::SmoothedAverage + # @return [SmoothedAverage] a new instance of SmoothedAverage + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#11 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#24 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#28 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#52 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#32 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#42 + def progress=(new_progress); end + + # Returns the value of attribute projection. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#9 + def projection; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#38 + def reset; end + + # Returns the value of attribute samples. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples; end + + # Sets the attribute samples + # + # @param value the value to set the attribute samples to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#19 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute strength. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength; end + + # Sets the attribute strength + # + # @param value the value to set the attribute strength to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#36 + def total=(_new_total); end + + protected + + # Sets the attribute projection + # + # @param value the value to set the attribute projection to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#62 + def projection=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#66 + def absolute; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#56 + def calculate(current_projection, new_value, rate); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#5 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#4 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_STRENGTH = T.let(T.unsafe(nil), Float) + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#2 +module ProgressBar::Refinements; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#3 +module ProgressBar::Refinements::Enumerator; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#4 +ProgressBar::Refinements::Enumerator::ARITY_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#2 +class ProgressBar::Throttle + # @return [Throttle] a new instance of Throttle + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#15 + def choke(options = T.unsafe(nil)); end + + # Returns the value of attribute rate. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate; end + + # Sets the attribute rate + # + # @param value the value to set the attribute rate to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate=(_arg0); end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at=(_arg0); end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#3 +class ProgressBar::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#11 + def initialize(time = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#15 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#19 + def unmocked_time_method; end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#4 +ProgressBar::Time::TIME_MOCKING_LIBRARY_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/timer.rb#4 +class ProgressBar::Timer + # @return [Timer] a new instance of Timer + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#67 + def divide_seconds(seconds); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#63 + def elapsed_whole_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#23 + def pause; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#43 + def reset; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 + def reset?; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#52 + def restart; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#27 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#12 + def start; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 + def started?; end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#17 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 + def stopped?; end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at=(_arg0); end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time=(_arg0); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-active_record@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-active_record@2.15.0.rbi new file mode 100644 index 0000000..26ca796 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-active_record@2.15.0.rbi @@ -0,0 +1,649 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby_event_store-active_record` gem. +# Please instead update this file by running `bin/tapioca gem ruby_event_store-active_record`. + + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#3 +module RubyEventStore; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#4 +module RubyEventStore::ActiveRecord; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#5 +class RubyEventStore::ActiveRecord::BatchEnumerator + # @return [BatchEnumerator] a new instance of BatchEnumerator + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#6 + def initialize(batch_size, total_limit, reader); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#12 + def each; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#25 + def first; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#29 + def to_a; end + + private + + # Returns the value of attribute batch_size. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#35 + def batch_size; end + + # Returns the value of attribute reader. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#35 + def reader; end + + # Returns the value of attribute total_limit. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/batch_enumerator.rb#35 + def total_limit; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#8 +class RubyEventStore::ActiveRecord::DatabaseAdapter + # @raise [UnsupportedAdapter] + # @return [DatabaseAdapter] a new instance of DatabaseAdapter + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#43 + def initialize(data_type = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#57 + def ==(other); end + + # Returns the value of attribute data_type. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#51 + def data_type; end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#57 + def eql?(other); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#63 + def hash; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#53 + def supported_data_types; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#67 + def template_directory; end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#94 + def class_name; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#87 + def validate_data_type!(data_type); end + + class << self + # @raise [NoMethodError] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#70 + def from_string(adapter_name, data_type = T.unsafe(nil)); end + end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#23 +class RubyEventStore::ActiveRecord::DatabaseAdapter::MySQL < ::RubyEventStore::ActiveRecord::DatabaseAdapter + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#26 + def adapter_name; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#30 + def template_directory; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#24 +RubyEventStore::ActiveRecord::DatabaseAdapter::MySQL::SUPPORTED_DATA_TYPES = T.let(T.unsafe(nil), Array) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#9 +RubyEventStore::ActiveRecord::DatabaseAdapter::NONE = T.let(T.unsafe(nil), Object) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#11 +class RubyEventStore::ActiveRecord::DatabaseAdapter::PostgreSQL < ::RubyEventStore::ActiveRecord::DatabaseAdapter + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#14 + def adapter_name; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#18 + def template_directory; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#12 +RubyEventStore::ActiveRecord::DatabaseAdapter::PostgreSQL::SUPPORTED_DATA_TYPES = T.let(T.unsafe(nil), Array) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#35 +class RubyEventStore::ActiveRecord::DatabaseAdapter::SQLite < ::RubyEventStore::ActiveRecord::DatabaseAdapter + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#38 + def adapter_name; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#36 +RubyEventStore::ActiveRecord::DatabaseAdapter::SQLite::SUPPORTED_DATA_TYPES = T.let(T.unsafe(nil), Array) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#7 +class RubyEventStore::ActiveRecord::Event < ::ActiveRecord::Base + include ::RubyEventStore::ActiveRecord::Event::GeneratedAttributeMethods + include ::RubyEventStore::ActiveRecord::Event::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#0 +module RubyEventStore::ActiveRecord::Event::GeneratedAssociationMethods; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#0 +module RubyEventStore::ActiveRecord::Event::GeneratedAttributeMethods; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#5 +class RubyEventStore::ActiveRecord::EventIdIndexMigrationGenerator + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#6 + def call(migration_path); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#14 + def absolute_path(path); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#42 + def build_path(migration_path); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#18 + def migration_code; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#22 + def migration_template; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#30 + def migration_version; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#34 + def timestamp; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/event_id_index_migration_generator.rb#38 + def write_to_file(path); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#13 +class RubyEventStore::ActiveRecord::EventInStream < ::ActiveRecord::Base + include ::RubyEventStore::ActiveRecord::EventInStream::GeneratedAttributeMethods + include ::RubyEventStore::ActiveRecord::EventInStream::GeneratedAssociationMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_event(*args); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#0 +module RubyEventStore::ActiveRecord::EventInStream::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_event(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_event(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_event!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def event; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def event=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def event_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def event_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_event; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_event; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event.rb#0 +module RubyEventStore::ActiveRecord::EventInStream::GeneratedAttributeMethods; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#7 +class RubyEventStore::ActiveRecord::EventRepository + # @return [EventRepository] a new instance of EventRepository + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#10 + def initialize(serializer:, model_factory: T.unsafe(nil)); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#18 + def append_to_stream(records, stream, expected_version); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#46 + def count(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#30 + def delete_stream(stream); end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#80 + def event_in_stream?(event_id, stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#76 + def global_position(event_id); end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#34 + def has_event?(event_id); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#38 + def last_stream_event(stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#24 + def link_to_stream(event_ids, stream, expected_version); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#72 + def position_in_stream(event_id, stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#42 + def read(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#68 + def streams_of(event_id); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#50 + def update_messages(records); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#88 + def add_to_stream(event_ids, stream, expected_version); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#161 + def append_to_stream_(records, stream, expected_version); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#117 + def compute_position(resolved_version, index); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#121 + def detect_index_violated(message); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#125 + def insert_hash(record, serialized_record); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#154 + def link_to_stream_(event_ids, stream, expected_version); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#146 + def optimize_timestamp(valid_at, created_at); end + + # @raise [EventDuplicatedInStream] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#112 + def raise_error(e); end + + # Returns the value of attribute serializer. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#86 + def serializer; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#150 + def start_transaction(&block); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#136 + def upsert_hash(record, serialized_record); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository.rb#8 +RubyEventStore::ActiveRecord::EventRepository::POSITION_SHIFT = T.let(T.unsafe(nil), Integer) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#5 +class RubyEventStore::ActiveRecord::EventRepositoryReader + # @return [EventRepositoryReader] a new instance of EventRepositoryReader + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#6 + def initialize(event_klass, stream_klass, serializer); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#36 + def count(spec); end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#56 + def event_in_stream?(event_id, stream); end + + # @raise [EventNotFound] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#50 + def global_position(event_id); end + + # @return [Boolean] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#12 + def has_event?(event_id); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#16 + def last_stream_event(stream); end + + # @raise [EventNotFoundInStream] + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#44 + def position_in_stream(event_id, stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#21 + def read(spec); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#40 + def streams_of(event_id); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#121 + def as_at(spec); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#116 + def as_of(spec); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#176 + def coalesce(*exprs); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#69 + def monotonic_id_batch_reader(spec, stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#196 + def newer_than_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#200 + def newer_than_or_equal_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#64 + def offset_limit_batch_reader(spec, stream); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#188 + def older_than_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#192 + def older_than_or_equal_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#204 + def order(spec); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#83 + def read_scope(spec); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#208 + def record(record); end + + # Returns the value of attribute serializer. + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#62 + def serializer; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#136 + def start_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#156 + def start_condition_in_global_stream(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#126 + def start_offset_condition(specification, record_id, search_in); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#146 + def stop_condition(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#166 + def stop_condition_in_global_stream(specification); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#131 + def stop_offset_condition(specification, record_id, search_in); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/event_repository_reader.rb#180 + def time_comparison_field(specification); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#5 +class RubyEventStore::ActiveRecord::ForeignKeyOnEventIdMigrationGenerator + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#6 + def call(database_adapter, migration_path); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#28 + def absolute_path(path); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#52 + def build_path(migration_path, migration_name, time); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#16 + def each_migration(database_adapter, &block); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#32 + def migration_code(database_adapter, migration_name); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#36 + def migration_template(template_root, name); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#56 + def migration_verion_number(time); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#44 + def migration_version; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#40 + def template_root(database_adapter); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/foreign_key_on_event_id_migration_generator.rb#48 + def write_to_file(path, migration_code); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#5 +class RubyEventStore::ActiveRecord::IndexViolationDetector + # @return [IndexViolationDetector] a new instance of IndexViolationDetector + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#6 + def initialize(event_store_events, event_store_events_in_streams); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#20 + def detect(message); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#30 + def detect_mysql(message); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#26 + def detect_postgres(message); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/index_violation_detector.rb#35 + def detect_sqlite(message); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#6 +class RubyEventStore::ActiveRecord::InvalidDataTypeForAdapter < ::StandardError; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#7 +class RubyEventStore::ActiveRecord::MigrationGenerator + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#8 + def call(database_adapter, migration_path); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#17 + def absolute_path(path); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#45 + def build_path(migration_path); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#21 + def migration_code(database_adapter); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#29 + def migration_template(template_root, name); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#33 + def migration_version; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#25 + def template_root(database_adapter); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#37 + def timestamp; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/migration_generator.rb#41 + def write_to_file(migration_code, path); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/pg_linearized_event_repository.rb#5 +class RubyEventStore::ActiveRecord::PgLinearizedEventRepository < ::RubyEventStore::ActiveRecord::EventRepository + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/pg_linearized_event_repository.rb#6 + def start_transaction(&proc); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_event_id_index_migration_generator.rb#11 +class RubyEventStore::ActiveRecord::RailsEventIdIndexMigrationGenerator < ::Rails::Generators::Base + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_event_id_index_migration_generator.rb#19 + def create_migration; end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_event_id_index_migration_generator.rb#26 + def migration_version; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_event_id_index_migration_generator.rb#30 + def timestamp; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_event_id_index_migration_generator.rb#12 +class RubyEventStore::ActiveRecord::RailsEventIdIndexMigrationGenerator::Error < ::Thor::Error; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#11 +class RubyEventStore::ActiveRecord::RailsForeignKeyOnEventIdMigrationGenerator < ::Rails::Generators::Base + # @return [RailsForeignKeyOnEventIdMigrationGenerator] a new instance of RailsForeignKeyOnEventIdMigrationGenerator + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#19 + def initialize(*args); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#27 + def create_migration; end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#43 + def adapter_name; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#51 + def migration_verion_number(time); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#47 + def migration_version; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_foreign_key_on_event_id_migration_generator.rb#12 +class RubyEventStore::ActiveRecord::RailsForeignKeyOnEventIdMigrationGenerator::Error < ::Thor::Error; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#10 +class RubyEventStore::ActiveRecord::RailsMigrationGenerator < ::Rails::Generators::Base + # @return [RailsMigrationGenerator] a new instance of RailsMigrationGenerator + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#25 + def initialize(*args); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#36 + def create_migration; end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#47 + def adapter_name; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#43 + def data_type; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#51 + def migration_version; end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#55 + def timestamp; end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/rails_migration_generator.rb#11 +class RubyEventStore::ActiveRecord::RailsMigrationGenerator::Error < ::Thor::Error; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/railtie.rb#5 +class RubyEventStore::ActiveRecord::Railtie < ::Rails::Railtie; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/generators/database_adapter.rb#5 +class RubyEventStore::ActiveRecord::UnsupportedAdapter < ::StandardError; end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/version.rb#5 +RubyEventStore::ActiveRecord::VERSION = T.let(T.unsafe(nil), String) + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_abstract_base_class.rb#5 +class RubyEventStore::ActiveRecord::WithAbstractBaseClass + # @return [WithAbstractBaseClass] a new instance of WithAbstractBaseClass + # + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_abstract_base_class.rb#6 + def initialize(base_klass); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_abstract_base_class.rb#13 + def call(instance_id: T.unsafe(nil)); end + + private + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_abstract_base_class.rb#19 + def build_event_klass(instance_id); end + + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_abstract_base_class.rb#29 + def build_stream_klass(instance_id); end +end + +# source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_default_models.rb#5 +class RubyEventStore::ActiveRecord::WithDefaultModels + # source://ruby_event_store-active_record//lib/ruby_event_store/active_record/with_default_models.rb#6 + def call; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-browser@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-browser@2.15.0.rbi new file mode 100644 index 0000000..ae26ba8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-browser@2.15.0.rbi @@ -0,0 +1,447 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby_event_store-browser` gem. +# Please instead update this file by running `bin/tapioca gem ruby_event_store-browser`. + + +# source://ruby_event_store-browser//lib/ruby_event_store/browser.rb#3 +module RubyEventStore; end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser.rb#4 +module RubyEventStore::Browser; end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#10 +class RubyEventStore::Browser::App + # @return [App] a new instance of App + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#72 + def initialize(event_store_locator:, related_streams_query:, host:, root_path:, api_url:); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#84 + def call(env); end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#137 + def bootstrap_html; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#172 + def erb(template, **locals); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#133 + def event_store; end + + # Returns the value of attribute event_store_locator. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#131 + def event_store_locator; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#164 + def json(body); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#160 + def not_found; end + + # Returns the value of attribute related_streams_query. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#131 + def related_streams_query; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#180 + def res_version; end + + # Returns the value of attribute routing. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#131 + def routing; end + + class << self + # source://ruby_event_store-browser//lib/ruby_event_store/browser/app.rb#11 + def for(event_store_locator:, host: T.unsafe(nil), path: T.unsafe(nil), api_url: T.unsafe(nil), environment: T.unsafe(nil), related_streams_query: T.unsafe(nil)); end + end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser.rb#7 +RubyEventStore::Browser::DEFAULT_RELATED_STREAMS_QUERY = T.let(T.unsafe(nil), Proc) + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#5 +class RubyEventStore::Browser::GemSource + # @return [GemSource] a new instance of GemSource + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#8 + def initialize(load_path); end + + # @return [Boolean] + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#27 + def from_git?; end + + # @return [Boolean] + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#23 + def from_rubygems?; end + + # Returns the value of attribute path. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#6 + def path; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/gem_source.rb#15 + def version; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#5 +class RubyEventStore::Browser::GetEvent + # @return [GetEvent] a new instance of GetEvent + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#6 + def initialize(event_store:, event_id:); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#11 + def to_h; end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#28 + def event; end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#26 + def event_id; end + + # Returns the value of attribute event_store. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#26 + def event_store; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#32 + def parent_event_id; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_event.rb#22 + def streams; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#5 +class RubyEventStore::Browser::GetEventsFromStream + # @return [GetEventsFromStream] a new instance of GetEventsFromStream + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#8 + def initialize(event_store:, routing:, stream_name:, page:); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#15 + def to_h; end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#93 + def count; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#97 + def direction; end + + # Returns the value of attribute event_store. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#21 + def event_store; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#23 + def events; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#55 + def events_backward(position); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#48 + def events_forward(position); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#85 + def first_page_link; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#89 + def last_page_link; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#33 + def links; end + + # @return [Boolean] + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#62 + def next_event?; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#76 + def next_page_link(event_id); end + + # Returns the value of attribute page. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#21 + def page; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#106 + def position; end + + # @return [Boolean] + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#67 + def prev_event?; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#72 + def prev_page_link(event_id); end + + # Returns the value of attribute routing. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#21 + def routing; end + + # Returns the value of attribute stream_name. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#21 + def stream_name; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/get_events_from_stream.rb#6 +RubyEventStore::Browser::GetEventsFromStream::HEAD = T.let(T.unsafe(nil), Object) + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#5 +class RubyEventStore::Browser::GetStream + # @return [GetStream] a new instance of GetStream + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#6 + def initialize(routing:, stream_name:, related_streams_query:); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#12 + def to_h; end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#20 + def events_from_stream_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#24 + def related_streams; end + + # Returns the value of attribute related_streams_query. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#18 + def related_streams_query; end + + # Returns the value of attribute routing. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#18 + def routing; end + + # Returns the value of attribute stream_name. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/get_stream.rb#18 + def stream_name; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#5 +class RubyEventStore::Browser::JsonApiEvent + # @return [JsonApiEvent] a new instance of JsonApiEvent + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#6 + def initialize(event, parent_event_id); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#11 + def to_h; end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#42 + def causation_stream_name; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#38 + def correlation_stream_name; end + + # Returns the value of attribute event. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#29 + def event; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#31 + def metadata; end + + # Returns the value of attribute parent_event_id. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#29 + def parent_event_id; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_event.rb#46 + def type_stream_name; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#5 +class RubyEventStore::Browser::JsonApiStream + # @return [JsonApiStream] a new instance of JsonApiStream + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#6 + def initialize(stream_name, events_from_stream_url, related_streams); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#12 + def to_h; end + + private + + # Returns the value of attribute events_from_stream_url. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#31 + def events_from_stream_url; end + + # Returns the value of attribute related_streams. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#31 + def related_streams; end + + # Returns the value of attribute stream_name. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/json_api_stream.rb#31 + def stream_name; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser.rb#5 +RubyEventStore::Browser::PAGE_SIZE = T.let(T.unsafe(nil), Integer) + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#5 +class RubyEventStore::Browser::Router + # @return [Router] a new instance of Router + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#38 + def initialize(urls = T.unsafe(nil)); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#43 + def add_route(request_method, pattern, &block); end + + # @raise [NoMatch] + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#47 + def handle(request); end + + private + + # Returns the value of attribute routes. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#57 + def routes; end + + # Returns the value of attribute urls. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#57 + def urls; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#6 +class RubyEventStore::Browser::Router::NoMatch < ::StandardError; end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#8 +class RubyEventStore::Browser::Router::Route + # @return [Route] a new instance of Route + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#12 + def initialize(request_method, pattern, &block); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#25 + def call(params, urls); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#18 + def match(request); end + + private + + # Returns the value of attribute handler. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#35 + def handler; end + + # Returns the value of attribute pattern. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#35 + def pattern; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#31 + def regexp; end + + # Returns the value of attribute request_method. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#35 + def request_method; end +end + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/router.rb#9 +RubyEventStore::Browser::Router::Route::NAMED_SEGMENTS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby_event_store-browser//lib/ruby_event_store/browser.rb#6 +RubyEventStore::Browser::SERIALIZED_GLOBAL_STREAM_NAME = T.let(T.unsafe(nil), String) + +# source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#5 +class RubyEventStore::Browser::Urls + # @return [Urls] a new instance of Urls + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#20 + def initialize(host, root_path, api_url); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#72 + def ==(o); end + + # Returns the value of attribute api_url. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#18 + def api_url; end + + # Returns the value of attribute app_url. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#18 + def app_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#68 + def bootstrap_js_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#59 + def browser_css_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#50 + def browser_js_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#28 + def events_url; end + + # Returns the value of attribute host. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#18 + def host; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#36 + def paginated_events_from_stream_url(id:, position: T.unsafe(nil), direction: T.unsafe(nil), count: T.unsafe(nil)); end + + # Returns the value of attribute root_path. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#18 + def root_path; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#32 + def streams_url; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#14 + def with_request(request); end + + private + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#83 + def cdn_file_url(name); end + + # Returns the value of attribute gem_source. + # + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#77 + def gem_source; end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#79 + def local_file_url(name); end + + class << self + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#6 + def from_configuration(host, root_path, api_url = T.unsafe(nil)); end + + # source://ruby_event_store-browser//lib/ruby_event_store/browser/urls.rb#10 + def initial; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-transformations@0.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-transformations@0.1.0.rbi new file mode 100644 index 0000000..1a85f33 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store-transformations@0.1.0.rbi @@ -0,0 +1,38 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby_event_store-transformations` gem. +# Please instead update this file by running `bin/tapioca gem ruby_event_store-transformations`. + + +# source://ruby_event_store-transformations//lib/ruby_event_store/transformations/version.rb#3 +module RubyEventStore; end + +# source://ruby_event_store-transformations//lib/ruby_event_store/transformations/version.rb#4 +module RubyEventStore::Transformations; end + +# source://ruby_event_store-transformations//lib/ruby_event_store/transformations/identity_map.rb#3 +class RubyEventStore::Transformations::IdentityMap + # @return [IdentityMap] a new instance of IdentityMap + # + # source://ruby_event_store-transformations//lib/ruby_event_store/transformations/identity_map.rb#4 + def initialize; end + + # source://ruby_event_store-transformations//lib/ruby_event_store/transformations/identity_map.rb#8 + def dump(domain_event); end + + # source://ruby_event_store-transformations//lib/ruby_event_store/transformations/identity_map.rb#24 + def load(record); end +end + +# source://ruby_event_store-transformations//lib/ruby_event_store/transformations/version.rb#5 +RubyEventStore::Transformations::VERSION = T.let(T.unsafe(nil), String) + +# source://ruby_event_store-transformations//lib/ruby_event_store/transformations/with_indifferent_access.rb#9 +class RubyEventStore::Transformations::WithIndifferentAccess + # source://ruby_event_store-transformations//lib/ruby_event_store/transformations/with_indifferent_access.rb#10 + def dump(record); end + + # source://ruby_event_store-transformations//lib/ruby_event_store/transformations/with_indifferent_access.rb#21 + def load(record); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store@2.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store@2.15.0.rbi new file mode 100644 index 0000000..4273d8f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/ruby_event_store@2.15.0.rbi @@ -0,0 +1,2652 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby_event_store` gem. +# Please instead update this file by running `bin/tapioca gem ruby_event_store`. + + +# source://ruby_event_store//lib/ruby_event_store/dispatcher.rb#3 +module RubyEventStore; end + +# source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#4 +class RubyEventStore::BatchEnumerator + # @return [BatchEnumerator] a new instance of BatchEnumerator + # + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#5 + def initialize(batch_size, total_limit, reader); end + + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#11 + def each; end + + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#23 + def first; end + + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#27 + def to_a; end + + private + + # Returns the value of attribute batch_size. + # + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#33 + def batch_size; end + + # Returns the value of attribute reader. + # + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#33 + def reader; end + + # Returns the value of attribute total_limit. + # + # source://ruby_event_store//lib/ruby_event_store/batch_enumerator.rb#33 + def total_limit; end +end + +# source://ruby_event_store//lib/ruby_event_store/broker.rb#4 +class RubyEventStore::Broker + # @return [Broker] a new instance of Broker + # + # source://ruby_event_store//lib/ruby_event_store/broker.rb#5 + def initialize(subscriptions:, dispatcher:); end + + # source://ruby_event_store//lib/ruby_event_store/broker.rb#20 + def add_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/broker.rb#15 + def add_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/broker.rb#30 + def add_thread_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/broker.rb#25 + def add_thread_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/broker.rb#10 + def call(event, record); end + + private + + # Returns the value of attribute dispatcher. + # + # source://ruby_event_store//lib/ruby_event_store/broker.rb#37 + def dispatcher; end + + # Returns the value of attribute subscriptions. + # + # source://ruby_event_store//lib/ruby_event_store/broker.rb#37 + def subscriptions; end + + # @raise [SubscriberNotExist] + # + # source://ruby_event_store//lib/ruby_event_store/broker.rb#39 + def verify_subscription(subscriber); end +end + +# source://ruby_event_store//lib/ruby_event_store/client.rb#6 +class RubyEventStore::Client + # @return [Client] a new instance of Client + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#7 + def initialize(repository: T.unsafe(nil), mapper: T.unsafe(nil), subscriptions: T.unsafe(nil), dispatcher: T.unsafe(nil), clock: T.unsafe(nil), correlation_id_generator: T.unsafe(nil), event_type_resolver: T.unsafe(nil)); end + + # Persists new event(s) without notifying any subscribed handlers + # + # @param events [Array, Event] event(s) + # @param stream_name [String] name of the stream for persisting events. + # @param expected_version [:any, :auto, :none, Integer] controls optimistic locking strategy. {http://railseventstore.org/docs/expected_version/ Read more} + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#48 + def append(events, stream_name: T.unsafe(nil), expected_version: T.unsafe(nil)); end + + # Deletes a stream. + # All events from the stream remain intact but they are no + # longer linked to the stream. + # + # @param stream_name [String] name of the stream to be cleared. + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#75 + def delete_stream(stream_name); end + + # Deserialize event which was serialized for async event handlers + # {http://railseventstore.org/docs/subscribe/#async-handlers Read more} + # + # @return [Event] deserialized event + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#273 + def deserialize(serializer:, event_type:, event_id:, data:, metadata:, timestamp: T.unsafe(nil), valid_at: T.unsafe(nil)); end + + # Checks whether event is linked in given stream + # + # @param event_id [String] + # @param stream_name [String] + # @return [Boolean] true if event is linked to given stream, false otherwise + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#127 + def event_in_stream?(event_id, stream_name); end + + # Gets position of the event in global stream + # + # The position is always nonnegative. + # Global position may have gaps, meaning, there may be event at + # position 40, but no event at position 39. + # + # @param event_id [String] + # @raise [EventNotFound] + # @return [Integer] nonnegno ative integer position of event in global stream + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#118 + def global_position(event_id); end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#332 + def inspect; end + + # Links already persisted event(s) to a different stream. + # Does not notify any subscribed handlers. + # + # @param event_ids [String, Array] ids of events + # @param stream_name [String] name of the stream for persisting events. + # @param expected_version [:any, :auto, :none, Integer] controls optimistic locking strategy. {http://railseventstore.org/docs/expected_version/ Read more} + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#64 + def link(event_ids, stream_name:, expected_version: T.unsafe(nil)); end + + # Read additional metadata which will be added for published events + # {http://railseventstore.org/docs/request_metadata#passing-your-own-metadata-using-with_metadata-method Read more} + # + # @return [Hash] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#294 + def metadata; end + + # Overwrite existing event(s) with the same ID. + # + # Does not notify any subscribed handlers. + # Does not enrich with additional current metadata. + # Does not allow changing which streams these events are in. + # {http://railseventstore.org/docs/migrating_messages Read more} + # + # @example Add data and metadata to existing events + # + # events = event_store.read.limit(10).to_a + # events.each do |ev| + # ev.data[:tenant_id] = 1 + # ev.metadata[:server_id] = "eu-west-2" + # end + # event_store.overwrite(events) + # @example Change event type + # + # events = event_store.read.limit(10).each.select{|ev| OldType === ev }.map do |ev| + # NewType.new( + # event_id: ev.event_id, + # data: ev.data, + # metadata: ev.metadata, + # ) + # end + # event_store.overwrite(events) + # @param events [Array, Event] event(s) to serialize and overwrite again + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#327 + def overwrite(events_or_event); end + + # Gets position of the event in given stream + # + # The position is always nonnegative. + # Returns nil if the event has no specific position in stream. + # Raise error if event is not present in stream. + # + # @param event_id [String] + # @param stream_name [String] + # @raise [EventNotInStream] + # @return [Integer] nonnegative integer position of event in stream + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#105 + def position_in_stream(event_id, stream_name); end + + # Persists events and notifies subscribed handlers about them + # + # @param events [Array, Event] event(s) + # @param stream_name [String] name of the stream for persisting events. + # @param expected_version [:any, :auto, :none, Integer] controls optimistic locking strategy. {http://railseventstore.org/docs/expected_version/ Read more} + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#32 + def publish(events, stream_name: T.unsafe(nil), expected_version: T.unsafe(nil)); end + + # Starts building a query specification for reading events. + # {http://railseventstore.org/docs/read/ More info.} + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#84 + def read; end + + # Gets list of streams where event is stored or linked + # + # @return [Array] where event is stored or linked + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#91 + def streams_of(event_id); end + + # Subscribes a handler (subscriber) that will be invoked for published events of provided type. + # + # @overload subscribe + # @overload subscribe + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#144 + def subscribe(subscriber = T.unsafe(nil), to:, &proc); end + + # Subscribes a handler (subscriber) that will be invoked for all published events + # + # @overload subscribe_to_all_events + # @overload subscribe_to_all_events + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#160 + def subscribe_to_all_events(subscriber = T.unsafe(nil), &proc); end + + # Get list of handlers subscribed to an event + # + # @param to [Class, String] type of events to get list of sybscribed handlers + # @return [Array] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#169 + def subscribers_for(event_class); end + + # Set additional metadata for all events published within the provided block + # {http://railseventstore.org/docs/request_metadata#passing-your-own-metadata-using-with_metadata-method Read more} + # + # @param metadata [Hash] metadata to set for events + # @param block [Proc] block of code during which the metadata will be added + # @return [Object] last value returned by the provided block + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#261 + def with_metadata(metadata_for_block, &block); end + + # Use for starting temporary subscriptions. + # {http://railseventstore.org/docs/subscribe/#temporary-subscriptions Read more} + # + # @param block [Proc] block of code during which the temporary subscriptions will be active + # @raise [ArgumentError] + # @return [Within] builder object which collects temporary subscriptions + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#250 + def within(&block); end + + protected + + # Returns the value of attribute broker. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def broker; end + + # Returns the value of attribute clock. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def clock; end + + # Returns the value of attribute correlation_id_generator. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def correlation_id_generator; end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#368 + def default_clock; end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#372 + def default_correlation_id_generator; end + + # Returns the value of attribute event_type_resolver. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def event_type_resolver; end + + # Returns the value of attribute mapper. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def mapper; end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#364 + def metadata=(value); end + + # Returns the value of attribute repository. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def repository; end + + # Returns the value of attribute subscriptions. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#376 + def subscriptions; end + + private + + # source://ruby_event_store//lib/ruby_event_store/client.rb#358 + def append_records_to_stream(records, stream_name:, expected_version:); end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#351 + def enrich_event_metadata(event); end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#345 + def enrich_events_metadata(events); end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#341 + def transform(events); end +end + +# source://ruby_event_store//lib/ruby_event_store/client.rb#336 +RubyEventStore::Client::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# Builder object for collecting temporary handlers (subscribers) +# which are active only during the invocation of the provided +# block of code. +# +# source://ruby_event_store//lib/ruby_event_store/client.rb#176 +class RubyEventStore::Client::Within + # @return [Within] a new instance of Within + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#177 + def initialize(block, broker, resolver); end + + # Invokes the block of code provided to {Client#within} + # and then unsubscribes temporary handlers. + # {http://railseventstore.org/docs/subscribe/#temporary-subscriptions Read more.} + # + # @return [Object] value returned by the invoked block of code + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#225 + def call; end + + # Subscribes temporary handlers that + # will be called for published events of provided type. + # The subscription is active only during the invocation + # of the block of code provided to {Client#within}. + # {http://railseventstore.org/docs/subscribe/#temporary-subscriptions Read more.} + # + # @overload subscribe + # @overload subscribe + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#214 + def subscribe(handler = T.unsafe(nil), to:, &handler2); end + + # Subscribes temporary handlers that + # will be called for all published events. + # The subscription is active only during the invocation + # of the block of code provided to {Client#within}. + # {http://railseventstore.org/docs/subscribe/#temporary-subscriptions Read more.} + # + # @param handlers [Object, Class] handlers passed as objects or classes + # @param handler2 [Proc] handler passed as proc + # @return [self] + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#194 + def subscribe_to_all_events(*handlers, &handler2); end + + private + + # source://ruby_event_store//lib/ruby_event_store/client.rb#240 + def add_thread_global_subscribers; end + + # source://ruby_event_store//lib/ruby_event_store/client.rb#236 + def add_thread_subscribers; end + + # Returns the value of attribute resolver. + # + # source://ruby_event_store//lib/ruby_event_store/client.rb#234 + def resolver; end +end + +# source://ruby_event_store//lib/ruby_event_store/composed_dispatcher.rb#4 +class RubyEventStore::ComposedDispatcher + # @return [ComposedDispatcher] a new instance of ComposedDispatcher + # + # source://ruby_event_store//lib/ruby_event_store/composed_dispatcher.rb#5 + def initialize(*dispatchers); end + + # source://ruby_event_store//lib/ruby_event_store/composed_dispatcher.rb#9 + def call(subscriber, event, record); end + + # source://ruby_event_store//lib/ruby_event_store/composed_dispatcher.rb#18 + def verify(subscriber); end +end + +# source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#4 +class RubyEventStore::CorrelatedCommands + # @return [CorrelatedCommands] a new instance of CorrelatedCommands + # + # source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#5 + def initialize(event_store, command_bus); end + + # source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#13 + def call(command); end + + private + + # Returns the value of attribute command_bus. + # + # source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#29 + def command_bus; end + + # Returns the value of attribute event_store. + # + # source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#29 + def event_store; end +end + +# source://ruby_event_store//lib/ruby_event_store/correlated_commands.rb#10 +class RubyEventStore::CorrelatedCommands::MiniEvent < ::Struct; end + +# source://ruby_event_store//lib/ruby_event_store/dispatcher.rb#4 +class RubyEventStore::Dispatcher + # source://ruby_event_store//lib/ruby_event_store/dispatcher.rb#5 + def call(subscriber, event, _); end + + # source://ruby_event_store//lib/ruby_event_store/dispatcher.rb#10 + def verify(subscriber); end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#4 +class RubyEventStore::Error < ::StandardError; end + +# Data structure representing an event +# +# source://ruby_event_store//lib/ruby_event_store/event.rb#7 +class RubyEventStore::Event + # Instantiates a new event + # + # @param event_id [String] event id + # @param data [Hash] event data which belong to your application domain + # @param metadata [Hash] event metadata which are technical and not + # part of your domain such as remote_ip, request_id, correlation_id, + # causation_id etc. + # @return [Event] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#16 + def initialize(event_id: T.unsafe(nil), metadata: T.unsafe(nil), data: T.unsafe(nil)); end + + # Two events are equal if: + # * they are of the same class + # * have identical event type + # * have identical event id + # * have identical data (verified with eql? method) + # + # Event equality ignores metadata! + # + # @param other_event [Event, Object] object to compare + # @return [TrueClass, FalseClass] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#60 + def ==(other_event); end + + # Reads causation_id from metadata. + # {http://railseventstore.org/docs/correlation_causation/ Find out more} + # + # @return [String, nil] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#101 + def causation_id; end + + # Sets causation_id= in metadata. + # {http://railseventstore.org/docs/correlation_causation/ Find out more} + # + # @param val [String] + # @return [String] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#110 + def causation_id=(val); end + + # Sets correlation_id and causation_id in metadata based + # on correlation_id and message_id of the provided message. + # {http://railseventstore.org/docs/correlation_causation/ Find out more} + # + # @param other_message [Event, command] message to correlate with. Most likely an event or a command. Must respond to correlation_id and message_id. + # @return [String] set causation_id + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#120 + def correlate_with(other_message); end + + # Reads correlation_id from metadata. + # {http://railseventstore.org/docs/correlation_causation/ Find out more} + # + # @return [String, nil] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#84 + def correlation_id; end + + # Sets correlation_id in metadata. + # {http://railseventstore.org/docs/correlation_causation/ Find out more} + # + # @param val [String] + # @return [String] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#93 + def correlation_id=(val); end + + # Returns the value of attribute data. + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#22 + def data; end + + # Two events are equal if: + # * they are of the same class + # * have identical event type + # * have identical event id + # * have identical data (verified with eql? method) + # + # Event equality ignores metadata! + # + # @param other_event [Event, Object] object to compare + # @return [TrueClass, FalseClass] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#60 + def eql?(other_event); end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#22 + def event_id; end + + # Type of event. Used when matching with subscribed handlers. + # + # @return [String] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#32 + def event_type; end + + # Generates a Fixnum hash value for this object. This function + # have the property that a.eql?(b) implies a.hash == b.hash. + # + # The hash value is used along with eql? by the Hash class to + # determine if two objects reference the same hash key. + # + # This hash is based on + # * class + # * event_id + # * data + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#75 + def hash; end + + # Event id + # + # @return [String] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#26 + def message_id; end + + # Returns the value of attribute metadata. + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#22 + def metadata; end + + # Timestamp from metadata + # + # @return [Time, nil] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#39 + def timestamp; end + + # Validity time from metadata + # + # @return [Time, nil] + # + # source://ruby_event_store//lib/ruby_event_store/event.rb#46 + def valid_at; end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#12 +class RubyEventStore::EventDuplicatedInStream < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#17 +class RubyEventStore::EventNotFound < ::RubyEventStore::Error + # @return [EventNotFound] a new instance of EventNotFound + # + # source://ruby_event_store//lib/ruby_event_store/errors.rb#20 + def initialize(event_id); end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store//lib/ruby_event_store/errors.rb#18 + def event_id; end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#15 +class RubyEventStore::EventNotFoundInStream < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/event_type_resolver.rb#4 +class RubyEventStore::EventTypeResolver + # source://ruby_event_store//lib/ruby_event_store/event_type_resolver.rb#5 + def call(value); end +end + +# source://ruby_event_store//lib/ruby_event_store/expected_version.rb#4 +class RubyEventStore::ExpectedVersion + # @return [ExpectedVersion] a new instance of ExpectedVersion + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#22 + def initialize(version); end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#56 + def ==(other_expected_version); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#27 + def any?; end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#31 + def auto?; end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#56 + def eql?(other_expected_version); end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#52 + def hash; end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#35 + def none?; end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#39 + def resolve_for(stream, resolver = T.unsafe(nil)); end + + # Returns the value of attribute version. + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#20 + def version; end + + private + + # @raise [InvalidExpectedVersion] + # + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#64 + def invalid_version!; end + + class << self + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#8 + def any; end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#16 + def auto; end + + # source://ruby_event_store//lib/ruby_event_store/expected_version.rb#12 + def none; end + end +end + +# source://ruby_event_store//lib/ruby_event_store/expected_version.rb#6 +RubyEventStore::ExpectedVersion::NOT_RESOLVED = T.let(T.unsafe(nil), Object) + +# source://ruby_event_store//lib/ruby_event_store/expected_version.rb#5 +RubyEventStore::ExpectedVersion::POSITION_DEFAULT = T.let(T.unsafe(nil), Integer) + +# source://ruby_event_store//lib/ruby_event_store/constants.rb#4 +RubyEventStore::GLOBAL_STREAM = T.let(T.unsafe(nil), Object) + +# source://ruby_event_store//lib/ruby_event_store/immediate_async_dispatcher.rb#4 +class RubyEventStore::ImmediateAsyncDispatcher + # @return [ImmediateAsyncDispatcher] a new instance of ImmediateAsyncDispatcher + # + # source://ruby_event_store//lib/ruby_event_store/immediate_async_dispatcher.rb#5 + def initialize(scheduler:); end + + # source://ruby_event_store//lib/ruby_event_store/immediate_async_dispatcher.rb#9 + def call(subscriber, _, record); end + + # source://ruby_event_store//lib/ruby_event_store/immediate_async_dispatcher.rb#13 + def verify(subscriber); end +end + +# source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#5 +class RubyEventStore::InMemoryRepository + # @return [InMemoryRepository] a new instance of InMemoryRepository + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#26 + def initialize(serializer: T.unsafe(nil), ensure_supported_any_usage: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#34 + def append_to_stream(records, stream, expected_version); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#103 + def count(spec); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#69 + def delete_stream(stream); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#139 + def event_in_stream?(event_id, stream); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#135 + def global_position(event_id); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#73 + def has_event?(event_id); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#77 + def last_stream_event(stream); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#52 + def link_to_stream(event_ids, stream, expected_version); end + + # @raise [EventNotFoundInStream] + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#129 + def position_in_stream(event_id, stream); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#82 + def read(spec); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#125 + def streams_of(event_id); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#107 + def update_messages(records); end + + private + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#233 + def add_to_stream(stream, serialized_record, resolved_version, index); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#229 + def compute_position(resolved_version, index); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#237 + def ensure_supported_any_usage(resolved_version, stream); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#181 + def event_ids_of_stream(stream); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#218 + def has_event_in_stream?(event_id, stream_name); end + + # @raise [EventNotFound] + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#222 + def index_of(source, event_id); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#200 + def last_stream_version(stream); end + + # Returns the value of attribute mutex. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#248 + def mutex; end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#189 + def ordered(serialized_records, spec); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#177 + def read_event(event_id); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#145 + def read_scope(spec); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#185 + def serialized_records_of_stream(stream); end + + # Returns the value of attribute serializer. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#248 + def serializer; end + + # Returns the value of attribute storage. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#248 + def storage; end + + # Returns the value of attribute streams. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#248 + def streams; end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#169 + def time_comparison_field(spec, sr); end + + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#204 + def with_synchronize(expected_version, stream, &block); end +end + +# source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#17 +class RubyEventStore::InMemoryRepository::EventInStream + # @return [EventInStream] a new instance of EventInStream + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#18 + def initialize(event_id, position); end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#23 + def event_id; end + + # Returns the value of attribute position. + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#23 + def position; end +end + +# source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#6 +class RubyEventStore::InMemoryRepository::UnsupportedVersionAnyUsage < ::StandardError + # @return [UnsupportedVersionAnyUsage] a new instance of UnsupportedVersionAnyUsage + # + # source://ruby_event_store//lib/ruby_event_store/in_memory_repository.rb#7 + def initialize; end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#7 +class RubyEventStore::IncorrectStreamData < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#4 +class RubyEventStore::InstrumentedDispatcher + # @return [InstrumentedDispatcher] a new instance of InstrumentedDispatcher + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#5 + def initialize(dispatcher, instrumentation); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#10 + def call(subscriber, event, record); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#16 + def method_missing(method_name, *arguments, **keyword_arguments, &block); end + + private + + # Returns the value of attribute dispatcher. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#30 + def dispatcher; end + + # Returns the value of attribute instrumentation. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#30 + def instrumentation; end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_dispatcher.rb#24 + def respond_to_missing?(method_name, _include_private); end +end + +# source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#4 +class RubyEventStore::InstrumentedRepository + # @return [InstrumentedRepository] a new instance of InstrumentedRepository + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#5 + def initialize(repository, instrumentation); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#10 + def append_to_stream(records, stream, expected_version); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#34 + def count(specification); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#22 + def delete_stream(stream); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#16 + def link_to_stream(event_ids, stream, expected_version); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#52 + def method_missing(method_name, *arguments, **keyword_arguments, &block); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#28 + def read(specification); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#46 + def streams_of(event_id); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#40 + def update_messages(messages); end + + private + + # Returns the value of attribute instrumentation. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#66 + def instrumentation; end + + # Returns the value of attribute repository. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#66 + def repository; end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_repository.rb#60 + def respond_to_missing?(method_name, _include_private); end +end + +# source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#4 +class RubyEventStore::InstrumentedSubscriptions + # @return [InstrumentedSubscriptions] a new instance of InstrumentedSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#5 + def initialize(subscriptions, instrumentation); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#16 + def add_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#10 + def add_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#28 + def add_thread_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#22 + def add_thread_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#34 + def method_missing(method_name, *arguments, &block); end + + private + + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#48 + def instrument(args); end + + # Returns the value of attribute instrumentation. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#59 + def instrumentation; end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#42 + def respond_to_missing?(method_name, _include_private); end + + # Returns the value of attribute subscriptions. + # + # source://ruby_event_store//lib/ruby_event_store/instrumented_subscriptions.rb#59 + def subscriptions; end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#6 +class RubyEventStore::InvalidExpectedVersion < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#14 +class RubyEventStore::InvalidHandler < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#11 +class RubyEventStore::InvalidPageSize < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#9 +class RubyEventStore::InvalidPageStart < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#10 +class RubyEventStore::InvalidPageStop < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#24 +class RubyEventStore::LinkByCausationId < ::RubyEventStore::LinkByMetadata + # @return [LinkByCausationId] a new instance of LinkByCausationId + # + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#25 + def initialize(event_store:, prefix: T.unsafe(nil)); end +end + +# source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#18 +class RubyEventStore::LinkByCorrelationId < ::RubyEventStore::LinkByMetadata + # @return [LinkByCorrelationId] a new instance of LinkByCorrelationId + # + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#19 + def initialize(event_store:, prefix: T.unsafe(nil)); end +end + +# source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#30 +class RubyEventStore::LinkByEventType + # @return [LinkByEventType] a new instance of LinkByEventType + # + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#31 + def initialize(event_store:, prefix: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#36 + def call(event); end +end + +# source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#4 +class RubyEventStore::LinkByMetadata + # @return [LinkByMetadata] a new instance of LinkByMetadata + # + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#5 + def initialize(event_store:, key:, prefix: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/link_by_metadata.rb#11 + def call(event); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#4 +module RubyEventStore::Mappers; end + +# source://ruby_event_store//lib/ruby_event_store/mappers/default.rb#5 +class RubyEventStore::Mappers::Default < ::RubyEventStore::Mappers::PipelineMapper + # @return [Default] a new instance of Default + # + # source://ruby_event_store//lib/ruby_event_store/mappers/default.rb#6 + def initialize(events_class_remapping: T.unsafe(nil)); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#5 +class RubyEventStore::Mappers::EncryptionKey + # @return [EncryptionKey] a new instance of EncryptionKey + # + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#6 + def initialize(cipher:, key:); end + + # Returns the value of attribute cipher. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#32 + def cipher; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#19 + def decrypt(message, iv); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#11 + def encrypt(message, iv); end + + # Returns the value of attribute key. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#32 + def key; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#27 + def random_iv; end + + private + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#36 + def ciphertext_from_authenticated(crypto, message); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#42 + def encrypt_authenticated(crypto, message); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#47 + def prepare_auth_data(crypto); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#58 + def prepare_decrypt(cipher); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_key.rb#52 + def prepare_encrypt(cipher); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/encryption_mapper.rb#5 +class RubyEventStore::Mappers::EncryptionMapper < ::RubyEventStore::Mappers::PipelineMapper + # @return [EncryptionMapper] a new instance of EncryptionMapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/encryption_mapper.rb#6 + def initialize(key_repository, serializer: T.unsafe(nil), forgotten_data: T.unsafe(nil)); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#5 +class RubyEventStore::Mappers::ForgottenData + # @return [ForgottenData] a new instance of ForgottenData + # + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#8 + def initialize(string = T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#16 + def ==(other); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#16 + def eql?(other); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#21 + def method_missing(*_arg0); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#12 + def to_s; end + + private + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#25 + def respond_to_missing?(*_arg0); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/forgotten_data.rb#6 +RubyEventStore::Mappers::ForgottenData::FORGOTTEN_DATA = T.let(T.unsafe(nil), String) + +# source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#5 +class RubyEventStore::Mappers::InMemoryEncryptionKeyRepository + # @return [InMemoryEncryptionKeyRepository] a new instance of InMemoryEncryptionKeyRepository + # + # source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#8 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#16 + def create(identifier, cipher: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#21 + def forget(identifier); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#12 + def key_of(identifier, cipher: T.unsafe(nil)); end + + private + + # source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#27 + def prepare_encrypt(cipher); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/in_memory_encryption_key_repository.rb#6 +RubyEventStore::Mappers::InMemoryEncryptionKeyRepository::DEFAULT_CIPHER = T.let(T.unsafe(nil), String) + +# source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#5 +class RubyEventStore::Mappers::InstrumentedMapper + # @return [InstrumentedMapper] a new instance of InstrumentedMapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#6 + def initialize(mapper, instrumentation); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#11 + def event_to_record(event); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#17 + def record_to_event(record); end + + private + + # Returns the value of attribute instrumentation. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#25 + def instrumentation; end + + # Returns the value of attribute mapper. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/instrumented_mapper.rb#25 + def mapper; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/json_mapper.rb#5 +class RubyEventStore::Mappers::JSONMapper < ::RubyEventStore::Mappers::Default + # @return [JSONMapper] a new instance of JSONMapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/json_mapper.rb#6 + def initialize(events_class_remapping: T.unsafe(nil)); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/null_mapper.rb#5 +class RubyEventStore::Mappers::NullMapper < ::RubyEventStore::Mappers::PipelineMapper + # @return [NullMapper] a new instance of NullMapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/null_mapper.rb#6 + def initialize; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/pipeline.rb#5 +class RubyEventStore::Mappers::Pipeline + # @return [Pipeline] a new instance of Pipeline + # + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline.rb#6 + def initialize(*transformations, to_domain_event: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline.rb#10 + def dump(event); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline.rb#14 + def load(record); end + + # Returns the value of attribute transformations. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline.rb#18 + def transformations; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/pipeline_mapper.rb#5 +class RubyEventStore::Mappers::PipelineMapper + # @return [PipelineMapper] a new instance of PipelineMapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline_mapper.rb#6 + def initialize(pipeline); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline_mapper.rb#10 + def event_to_record(event); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline_mapper.rb#14 + def record_to_event(record); end + + private + + # Returns the value of attribute pipeline. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/pipeline_mapper.rb#20 + def pipeline; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/domain_event.rb#5 +module RubyEventStore::Mappers::Transformation; end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/domain_event.rb#6 +class RubyEventStore::Mappers::Transformation::DomainEvent + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/domain_event.rb#7 + def dump(event); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/domain_event.rb#21 + def load(record); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#6 +class RubyEventStore::Mappers::Transformation::Encryption + # @return [Encryption] a new instance of Encryption + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#20 + def initialize(key_repository, serializer: T.unsafe(nil), forgotten_data: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#26 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#44 + def load(record); end + + private + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#114 + def decrypt_attribute(data, attribute, meta); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#94 + def decrypt_data(data, meta); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#66 + def deep_dup(hash); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#101 + def encrypt_attribute(data, attribute, meta); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#87 + def encrypt_data(data, meta); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#72 + def encryption_metadata(data, schema); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#62 + def encryption_schema(event_class); end + + # Returns the value of attribute forgotten_data. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#60 + def forgotten_data; end + + # Returns the value of attribute key_repository. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#60 + def key_repository; end + + # Returns the value of attribute serializer. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#60 + def serializer; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#7 +class RubyEventStore::Mappers::Transformation::Encryption::Leaf + class << self + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#8 + def ===(hash); end + end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#14 +class RubyEventStore::Mappers::Transformation::Encryption::MissingEncryptionKey < ::StandardError + # @return [MissingEncryptionKey] a new instance of MissingEncryptionKey + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/encryption.rb#15 + def initialize(key_identifier); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/event_class_remapper.rb#6 +class RubyEventStore::Mappers::Transformation::EventClassRemapper + # @return [EventClassRemapper] a new instance of EventClassRemapper + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/event_class_remapper.rb#7 + def initialize(class_map); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/event_class_remapper.rb#11 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/event_class_remapper.rb#15 + def load(record); end + + private + + # Returns the value of attribute class_map. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/event_class_remapper.rb#28 + def class_map; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#6 +class RubyEventStore::Mappers::Transformation::PreserveTypes + # @return [PreserveTypes] a new instance of PreserveTypes + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#7 + def initialize(type_resolver: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#68 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#85 + def load(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#63 + def register(type, serializer:, deserializer:, stored_type: T.unsafe(nil)); end + + private + + # Returns the value of attribute registry. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#111 + def registry; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#153 + def restore_type(argument, type); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#145 + def restore_types(argument, types); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#134 + def store_type(argument); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#128 + def store_types(argument); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#117 + def transform(argument); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#113 + def transform_hash(argument); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#107 +RubyEventStore::Mappers::Transformation::PreserveTypes::DEFAULT_STORE_TYPE = T.let(T.unsafe(nil), Proc) + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#11 +class RubyEventStore::Mappers::Transformation::PreserveTypes::NullType + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#19 + def deserializer; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#15 + def serializer; end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#23 + def stored_type; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#12 +RubyEventStore::Mappers::Transformation::PreserveTypes::NullType::PASS_THROUGH = T.let(T.unsafe(nil), Proc) + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#29 +class RubyEventStore::Mappers::Transformation::PreserveTypes::RegisteredType + # @return [RegisteredType] a new instance of RegisteredType + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#30 + def initialize(serializer, deserializer, stored_type); end + + # Returns the value of attribute deserializer. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#36 + def deserializer; end + + # Returns the value of attribute serializer. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#36 + def serializer; end + + # Returns the value of attribute stored_type. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#36 + def stored_type; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#40 +class RubyEventStore::Mappers::Transformation::PreserveTypes::Registry + # @return [Registry] a new instance of Registry + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#41 + def initialize(resolver); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#50 + def add(type, serializer, deserializer, stored_type); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#54 + def of(type); end + + private + + # Returns the value of attribute resolver. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#59 + def resolver; end + + # Returns the value of attribute types. + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#59 + def types; end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/preserve_types.rb#47 +RubyEventStore::Mappers::Transformation::PreserveTypes::Registry::NULL_TYPE = T.let(T.unsafe(nil), RubyEventStore::Mappers::Transformation::PreserveTypes::NullType) + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/stringify_metadata_keys.rb#6 +class RubyEventStore::Mappers::Transformation::StringifyMetadataKeys + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/stringify_metadata_keys.rb#7 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/stringify_metadata_keys.rb#11 + def load(record); end + + private + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/stringify_metadata_keys.rb#17 + def stringify(record); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/symbolize_metadata_keys.rb#6 +class RubyEventStore::Mappers::Transformation::SymbolizeMetadataKeys + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/symbolize_metadata_keys.rb#7 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/symbolize_metadata_keys.rb#11 + def load(record); end + + private + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/symbolize_metadata_keys.rb#17 + def symbolize(record); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#6 +class RubyEventStore::Mappers::Transformation::Upcast + # @return [Upcast] a new instance of Upcast + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#19 + def initialize(upcast_map); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#23 + def dump(record); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#27 + def load(record); end +end + +# source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#7 +class RubyEventStore::Mappers::Transformation::Upcast::RecordUpcaster + # @return [RecordUpcaster] a new instance of RecordUpcaster + # + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#8 + def initialize(upcast_map); end + + # source://ruby_event_store//lib/ruby_event_store/mappers/transformation/upcast.rb#12 + def call(record); end +end + +# source://ruby_event_store//lib/ruby_event_store/metadata.rb#8 +class RubyEventStore::Metadata + include ::Enumerable + extend ::Forwardable + + # @return [Metadata] a new instance of Metadata + # + # source://ruby_event_store//lib/ruby_event_store/metadata.rb#12 + def initialize(h = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def <(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def <=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def >(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def >=(*args, **_arg1, &block); end + + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/metadata.rb#17 + def [](key); end + + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/metadata.rb#22 + def []=(key, val); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def assoc(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def clear(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def compact(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def compact!(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def delete(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def delete_if(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def dig(*args, **_arg1, &block); end + + # source://ruby_event_store//lib/ruby_event_store/metadata.rb#28 + def each(&block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each_key(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each_pair(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each_value(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def empty?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fetch(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fetch_values(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def flatten(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def has_key?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def has_value?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def keep_if(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def key(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def key?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def keys(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def length(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def rassoc(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def reject!(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def select!(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def shift(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def size(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def slice(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to_proc(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def transform_keys(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def transform_values(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def value?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def values(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def values_at(*args, **_arg1, &block); end + + private + + # source://ruby_event_store//lib/ruby_event_store/metadata.rb#76 + def allowed_types; end +end + +# source://ruby_event_store//lib/ruby_event_store/metadata.rb#32 +RubyEventStore::Metadata::SAFE_HASH_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby_event_store//lib/ruby_event_store/null.rb#4 +module RubyEventStore::NULL + class << self + # source://ruby_event_store//lib/ruby_event_store/null.rb#5 + def dump(value); end + + # source://ruby_event_store//lib/ruby_event_store/null.rb#9 + def load(value); end + end +end + +# source://ruby_event_store//lib/ruby_event_store/constants.rb#5 +RubyEventStore::PAGE_SIZE = T.let(T.unsafe(nil), Integer) + +# source://ruby_event_store//lib/ruby_event_store/projection.rb#4 +class RubyEventStore::Projection + # @return [Projection] a new instance of Projection + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#17 + def initialize(streams: T.unsafe(nil)); end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#44 + def call(event); end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#40 + def current_state; end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#48 + def handled_events; end + + # Returns the value of attribute handlers. + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#23 + def handlers; end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#25 + def init(handler); end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#36 + def initial_state; end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#52 + def run(event_store, start: T.unsafe(nil), count: T.unsafe(nil)); end + + # Returns the value of attribute streams. + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#23 + def streams; end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#30 + def when(events, handler); end + + private + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#78 + def read_scope(event_store, stream, count, start); end + + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#73 + def reduce_from_all_streams(event_store, start, count); end + + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#64 + def reduce_from_streams(event_store, start, count); end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#86 + def start_events(start); end + + # source://ruby_event_store//lib/ruby_event_store/projection.rb#90 + def transition(state, event); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#59 + def valid_starting_point?(start); end + + class << self + # source://ruby_event_store//lib/ruby_event_store/projection.rb#13 + def from_all_streams; end + + # @raise [ArgumentError] + # + # source://ruby_event_store//lib/ruby_event_store/projection.rb#7 + def from_stream(stream_or_streams); end + + private + + def new(*_arg0); end + end +end + +# source://ruby_event_store//lib/ruby_event_store/record.rb#4 +class RubyEventStore::Record + # @raise [StringsRequired] + # @return [Record] a new instance of Record + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#6 + def initialize(event_id:, data:, metadata:, event_type:, timestamp:, valid_at:); end + + # source://ruby_event_store//lib/ruby_event_store/record.rb#24 + def ==(other); end + + # Returns the value of attribute data. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def data; end + + # source://ruby_event_store//lib/ruby_event_store/record.rb#24 + def eql?(other); end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def event_id; end + + # Returns the value of attribute event_type. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def event_type; end + + # source://ruby_event_store//lib/ruby_event_store/record.rb#20 + def hash; end + + # Returns the value of attribute metadata. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def metadata; end + + # source://ruby_event_store//lib/ruby_event_store/record.rb#41 + def serialize(serializer); end + + # Returns the value of attribute timestamp. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def timestamp; end + + # source://ruby_event_store//lib/ruby_event_store/record.rb#30 + def to_h; end + + # Returns the value of attribute valid_at. + # + # source://ruby_event_store//lib/ruby_event_store/record.rb#18 + def valid_at; end +end + +# source://ruby_event_store//lib/ruby_event_store/record.rb#5 +class RubyEventStore::Record::StringsRequired < ::StandardError; end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#13 +class RubyEventStore::ReservedInternalName < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#4 +class RubyEventStore::SerializedRecord + # @raise [StringsRequired] + # @return [SerializedRecord] a new instance of SerializedRecord + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#6 + def initialize(event_id:, data:, metadata:, event_type:, timestamp:, valid_at:); end + + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#23 + def ==(other); end + + # Returns the value of attribute data. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def data; end + + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#40 + def deserialize(serializer); end + + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#23 + def eql?(other); end + + # Returns the value of attribute event_id. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def event_id; end + + # Returns the value of attribute event_type. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def event_type; end + + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#19 + def hash; end + + # Returns the value of attribute metadata. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def metadata; end + + # Returns the value of attribute timestamp. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def timestamp; end + + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#29 + def to_h; end + + # Returns the value of attribute valid_at. + # + # source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#17 + def valid_at; end +end + +# source://ruby_event_store//lib/ruby_event_store/serialized_record.rb#5 +class RubyEventStore::SerializedRecord::StringsRequired < ::StandardError; end + +# source://ruby_event_store//lib/ruby_event_store/serializers/yaml.rb#6 +module RubyEventStore::Serializers; end + +# source://ruby_event_store//lib/ruby_event_store/serializers/yaml.rb#7 +class RubyEventStore::Serializers::YAML + class << self + # source://ruby_event_store//lib/ruby_event_store/serializers/yaml.rb#8 + def dump(value); end + + # source://ruby_event_store//lib/ruby_event_store/serializers/yaml.rb#12 + def load(serialized); end + end +end + +# Used for building and executing the query specification. +# +# source://ruby_event_store//lib/ruby_event_store/specification.rb#5 +class RubyEventStore::Specification + # @api private + # @private + # @return [Specification] a new instance of Specification + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#10 + def initialize(reader, result = T.unsafe(nil)); end + + # Sets the order of time sorting using transaction time + # {http://railseventstore.org/docs/read/ Find out more} + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#125 + def as_at; end + + # Sets the order of time sorting using validity time + # {http://railseventstore.org/docs/read/ Find out more} + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#133 + def as_of; end + + # Sets the order of reading events to descending (backward from the start). + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#149 + def backward; end + + # Limits the query to events within given time range. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param time_range [Range] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#113 + def between(time_range); end + + # Calculates the size of result set based on the specification build up to this point. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Integer] Number of events to read + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#212 + def count; end + + # Executes the query based on the specification built up to this point. + # Yields events read from the store if block given. Otherwise, returns enumerable collection. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Enumerator, nil] Enumerator is returned when block not given + # @yield [Event] event + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#181 + def each; end + + # Executes the query based on the specification built up to this point. + # Yields each batch of records that was retrieved from the store. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Enumerator, nil] Enumerator is returned when block not given + # @yield [Array] batch of events + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#169 + def each_batch; end + + # Reads single event from repository. + # Returns the event with specified id or nil if event is not found + # in specified collection of events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Event, nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#308 + def event(event_id); end + + # Reads single existing event from repository. + # Returns the event with specified id or raises [EventNotFound] error if + # event is not found in specified collection of events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Event] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#318 + def event!(event_id); end + + # Reads all events of given ids from repository. + # Yields each event (found by id in specified collection of events) + # read from the store if block given. Otherwise, returns enumerable collection. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Enumerator] Enumerator is returned when block not given + # @yield [Event] event + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#329 + def events(event_ids); end + + # Executes the query based on the specification built up to this point. + # Returns the first event in specified collection of events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Event, nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#270 + def first; end + + # Sets the order of reading events to ascending (forward from the start). + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#141 + def forward; end + + # Limits the query to events before or after another event. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param start [String] id of event to start reading from. + # @raise [InvalidPageStart] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#29 + def from(start); end + + # Specifies that events should be obtained in batches. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # Looping through a collection of events from the store + # can be inefficient since it will try to instantiate all + # the events at once. + # + # In that case, batch processing methods allow you to work + # with the records in batches, thereby greatly reducing + # memory consumption. + # + # @param batch_size [Integer] number of events to read in a single batch + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#238 + def in_batches(batch_size = T.unsafe(nil)); end + + # Specifies that events should be obtained in batches. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # Looping through a collection of events from the store + # can be inefficient since it will try to instantiate all + # the events at once. + # + # In that case, batch processing methods allow you to work + # with the records in batches, thereby greatly reducing + # memory consumption. + # + # @param batch_size [Integer] number of events to read in a single batch + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#238 + def in_batches_of(batch_size = T.unsafe(nil)); end + + # Executes the query based on the specification built up to this point. + # Returns the last event in specified collection of events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Event, nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#279 + def last; end + + # Limits the query to specified number of events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param count [Integer] maximal number of events to retrieve + # @raise [InvalidPageSize] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#158 + def limit(count); end + + # Executes the query based on the specification built up to this point + # and maps the result using provided block. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @raise [ArgumentError] + # @return [Array] of mapped result + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#192 + def map(&block); end + + # Limits the query to events that occurred after given time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param time [Time] + # @raise [ArgumentError] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#81 + def newer_than(time); end + + # Limits the query to events that occurred on or after given time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param time [Time] + # @raise [ArgumentError] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#97 + def newer_than_or_equal(time); end + + # Limits the query to certain event type(s). + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#288 + def of_type(*types); end + + # Limits the query to certain event type(s). + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#288 + def of_types(*types); end + + # Limits the query to events that occurred before given time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param time [Time] + # @raise [ArgumentError] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#49 + def older_than(time); end + + # Limits the query to events that occurred on or before given time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param time [Time] + # @raise [ArgumentError] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#65 + def older_than_or_equal(time); end + + # Specifies that only first event should be read. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#253 + def read_first; end + + # Specifies that only last event should be read. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#261 + def read_last; end + + # Reduces the results of the query based on the specification + # built up to this point result using provided block. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param accumulator starting state for reduce operation + # @raise [ArgumentError] + # @return reduce result as defined by block given + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#203 + def reduce(accumulator = T.unsafe(nil), &block); end + + # Returns the value of attribute result. + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#333 + def result; end + + # Limits the query to certain stream. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param stream_name [String] name of the stream to get events from + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#20 + def stream(stream_name); end + + # Limits the query to events before or after another event. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param stop [String] id of event to start reading from. + # @raise [InvalidPageStop] + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#39 + def to(stop); end + + # Executes the query based on the specification built up to this point. + # Returns array of domain events. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Array] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#221 + def to_a; end + + # Limits the query to certain events by given even ids. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @param event_ids [Array(String)] ids of event to look for. + # @return [Specification] + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#298 + def with_id(event_ids); end + + private + + # Returns the value of attribute reader. + # + # source://ruby_event_store//lib/ruby_event_store/specification.rb#337 + def reader; end +end + +# source://ruby_event_store//lib/ruby_event_store/specification.rb#6 +RubyEventStore::Specification::DEFAULT_BATCH_SIZE = T.let(T.unsafe(nil), Integer) + +# Used for fetching events based on given query specification. +# +# source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#5 +class RubyEventStore::SpecificationReader + # @api private + # @private + # @return [SpecificationReader] a new instance of SpecificationReader + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#8 + def initialize(repository, mapper); end + + # @api private + # @private + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#28 + def count(specification_result); end + + # @api private + # @private + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#22 + def each(specification_result); end + + # @api private + # @private + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#15 + def one(specification_result); end + + private + + # Returns the value of attribute mapper. + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#34 + def mapper; end + + # Returns the value of attribute repository. + # + # source://ruby_event_store//lib/ruby_event_store/specification_reader.rb#34 + def repository; end +end + +# source://ruby_event_store//lib/ruby_event_store/specification_result.rb#4 +class RubyEventStore::SpecificationResult + # @return [SpecificationResult] a new instance of SpecificationResult + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#5 + def initialize(direction: T.unsafe(nil), start: T.unsafe(nil), stop: T.unsafe(nil), older_than: T.unsafe(nil), older_than_or_equal: T.unsafe(nil), newer_than: T.unsafe(nil), newer_than_or_equal: T.unsafe(nil), time_sort_by: T.unsafe(nil), count: T.unsafe(nil), stream: T.unsafe(nil), read_as: T.unsafe(nil), batch_size: T.unsafe(nil), with_ids: T.unsafe(nil), with_types: T.unsafe(nil)); end + + # Two specification attributess are equal if: + # * they are of the same class + # * have identical data (verified with eql? method) + # + # @param other_spec [SpecificationResult, Object] object to compare + # @return [TrueClass, FalseClass] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#259 + def ==(other_spec); end + + # Read strategy. True if all items will be read + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#222 + def all?; end + + # Read direction. True is reading backward + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#150 + def backward?; end + + # Size of batch to read (only for :batch read strategy) + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Integer] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#158 + def batch_size; end + + # Read strategy. True if items will be read in batches + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#198 + def batched?; end + + # Clone [SpecificationResult] + # If block is given cloned attributes might be modified. + # + # @return [SpecificationResult] + # @yield [new_attributes] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#246 + def dup; end + + # Read strategy. True if first item will be read + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#206 + def first?; end + + # Read direction. True is reading forward + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#142 + def forward?; end + + # Generates a Fixnum hash value for this object. This function + # have the property that a.eql?(b) implies a.hash == b.hash. + # + # The hash value is used along with eql? by the Hash class to + # determine if two objects reference the same hash key. + # + # This hash is based on + # * class + # * direction + # * start + # * stop + # * older_than + # * older_than_or_equal + # * newer_than + # * newer_than_or_equal + # * time_sort_by + # * count + # * stream + # * read_as + # * batch_size + # * with_ids + # * with_types + # + # @return [Integer] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#287 + def hash; end + + # Read strategy. True if last item will be read + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#214 + def last?; end + + # Results limit or infinity if limit not defined + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Integer|Infinity] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#70 + def limit; end + + # Limited results. True if number of read elements are limited + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#62 + def limit?; end + + # Starting time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Time] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#118 + def newer_than; end + + # Starting time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Time] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#126 + def newer_than_or_equal; end + + # Ending time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Time] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#102 + def older_than; end + + # Ending time. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Time] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#110 + def older_than_or_equal; end + + # Starting position. Event id of starting event + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [String] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#86 + def start; end + + # Stop position. Event id of stopping event + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [String|Symbol] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#94 + def stop; end + + # Stream definition. Stream to be read or nil + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Stream|nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#78 + def stream; end + + # Time sorting strategy. Nil when not specified. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Symbol] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#134 + def time_sort_by; end + + # Read strategy. True if results will be sorted by timestamp + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#230 + def time_sort_by_as_at?; end + + # Read strategy. True if results will be sorted by valid_at + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#238 + def time_sort_by_as_of?; end + + # Ids of specified event to be read (if any given) + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Array|nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#166 + def with_ids; end + + # Read by specified ids. True if event ids have been specified. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#174 + def with_ids?; end + + # Event types to be read (if any given) + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Array|nil] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#182 + def with_types; end + + # Read by specified event types. True if event types have been specified. + # {http://railseventstore.org/docs/read/ Find out more}. + # + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#190 + def with_types?; end + + private + + # Returns the value of attribute attributes. + # + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#308 + def attributes; end + + # source://ruby_event_store//lib/ruby_event_store/specification_result.rb#310 + def get_direction; end +end + +# source://ruby_event_store//lib/ruby_event_store/stream.rb#4 +class RubyEventStore::Stream + # @raise [IncorrectStreamData] + # @return [Stream] a new instance of Stream + # + # source://ruby_event_store//lib/ruby_event_store/stream.rb#5 + def initialize(name); end + + # source://ruby_event_store//lib/ruby_event_store/stream.rb#20 + def ==(other_stream); end + + # source://ruby_event_store//lib/ruby_event_store/stream.rb#20 + def eql?(other_stream); end + + # @return [Boolean] + # + # source://ruby_event_store//lib/ruby_event_store/stream.rb#10 + def global?; end + + # source://ruby_event_store//lib/ruby_event_store/stream.rb#16 + def hash; end + + # Returns the value of attribute name. + # + # source://ruby_event_store//lib/ruby_event_store/stream.rb#14 + def name; end +end + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#8 +class RubyEventStore::SubscriberNotExist < ::RubyEventStore::Error; end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#6 +class RubyEventStore::Subscriptions + # @return [Subscriptions] a new instance of Subscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#7 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#17 + def add_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#13 + def add_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#25 + def add_thread_global_subscription(subscriber); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#21 + def add_thread_subscription(subscriber, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#29 + def all_for(event_type); end + + private + + # Returns the value of attribute global. + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#35 + def global; end + + # Returns the value of attribute local. + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#35 + def local; end + + # Returns the value of attribute thread. + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#35 + def thread; end +end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#64 +class RubyEventStore::Subscriptions::GlobalSubscriptions + # @return [GlobalSubscriptions] a new instance of GlobalSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#65 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#69 + def add(subscription); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#74 + def all_for(_event_type); end +end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#49 +class RubyEventStore::Subscriptions::LocalSubscriptions + # @return [LocalSubscriptions] a new instance of LocalSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#50 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#54 + def add(subscription, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#59 + def all_for(event_type); end +end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#94 +class RubyEventStore::Subscriptions::ThreadGlobalSubscriptions + # @return [ThreadGlobalSubscriptions] a new instance of ThreadGlobalSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#95 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#99 + def add(subscription); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#104 + def all_for(_event_type); end +end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#79 +class RubyEventStore::Subscriptions::ThreadLocalSubscriptions + # @return [ThreadLocalSubscriptions] a new instance of ThreadLocalSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#80 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#84 + def add(subscription, event_types); end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#89 + def all_for(event_type); end +end + +# source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#37 +class RubyEventStore::Subscriptions::ThreadSubscriptions + # @return [ThreadSubscriptions] a new instance of ThreadSubscriptions + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#38 + def initialize; end + + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#44 + def all_for(event_type); end + + # Returns the value of attribute global. + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#42 + def global; end + + # Returns the value of attribute local. + # + # source://ruby_event_store//lib/ruby_event_store/subscriptions.rb#42 + def local; end +end + +# source://ruby_event_store//lib/ruby_event_store/constants.rb#6 +RubyEventStore::TIMESTAMP_PRECISION = T.let(T.unsafe(nil), Integer) + +# source://ruby_event_store//lib/ruby_event_store/transform_keys.rb#4 +class RubyEventStore::TransformKeys + class << self + # source://ruby_event_store//lib/ruby_event_store/transform_keys.rb#6 + def stringify(data); end + + # source://ruby_event_store//lib/ruby_event_store/transform_keys.rb#10 + def symbolize(data); end + + private + + # source://ruby_event_store//lib/ruby_event_store/transform_keys.rb#16 + def deep_transform(data, &block); end + end +end + +# source://ruby_event_store//lib/ruby_event_store/version.rb#4 +RubyEventStore::VERSION = T.let(T.unsafe(nil), String) + +# source://ruby_event_store//lib/ruby_event_store/errors.rb#5 +class RubyEventStore::WrongExpectedEventVersion < ::RubyEventStore::Error; end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/securerandom@0.3.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/securerandom@0.3.1.rbi new file mode 100644 index 0000000..6e8b28c --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/securerandom@0.3.1.rbi @@ -0,0 +1,73 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `securerandom` gem. +# Please instead update this file by running `bin/tapioca gem securerandom`. + + +# == Secure random number generator interface. +# +# This library is an interface to secure random number generators which are +# suitable for generating session keys in HTTP cookies, etc. +# +# You can use this library in your application by requiring it: +# +# require 'securerandom' +# +# It supports the following secure random number generators: +# +# * openssl +# * /dev/urandom +# * Win32 +# +# SecureRandom is extended by the Random::Formatter module which +# defines the following methods: +# +# * alphanumeric +# * base64 +# * choose +# * gen_random +# * hex +# * rand +# * random_bytes +# * random_number +# * urlsafe_base64 +# * uuid +# +# These methods are usable as class methods of SecureRandom such as +# +SecureRandom.hex+. +# +# If a secure random number generator is not available, +# +NotImplementedError+ is raised. +module SecureRandom + extend ::Random::Formatter + + class << self + # Returns a random binary string containing +size+ bytes. + # + # See Random.bytes + # + # source://securerandom//securerandom.rb#50 + def bytes(n); end + + # source://securerandom//securerandom.rb#64 + def gen_random(n); end + + private + + # Implementation using OpenSSL + # + # source://securerandom//securerandom.rb#59 + def gen_random_openssl(n); end + + # Implementation using system random device + # + # source://securerandom//securerandom.rb#64 + def gen_random_urandom(n); end + end +end + +# The version +# +# source://securerandom//securerandom.rb#44 +SecureRandom::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/slop@3.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/slop@3.6.0.rbi new file mode 100644 index 0000000..0e38e66 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/slop@3.6.0.rbi @@ -0,0 +1,854 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `slop` gem. +# Please instead update this file by running `bin/tapioca gem slop`. + + +# source://slop//lib/slop/option.rb#1 +class Slop + include ::Enumerable + + # Create a new instance of Slop and optionally build options via a block. + # + # config - A Hash of configuration options. + # block - An optional block used to specify options. + # + # @return [Slop] a new instance of Slop + # + # source://slop//lib/slop.rb#128 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://slop//lib/slop.rb#293 + def [](key); end + + # Add a callback. + # + # label - The Symbol identifier to attach this callback. + # + # Returns nothing. + # + # source://slop//lib/slop.rb#413 + def add_callback(label, &block); end + + # Get or set the banner. + # + # banner - The String to set the banner. + # + # Returns the banner String. + # + # source://slop//lib/slop.rb#171 + def banner(banner = T.unsafe(nil)); end + + # Set the banner. + # + # banner - The String to set the banner. + # + # source://slop//lib/slop.rb#162 + def banner=(banner); end + + # Add a new command. + # + # command - The Symbol or String used to identify this command. + # options - A Hash of configuration options (see Slop::new) + # + # Returns a new instance of Slop mapped to this command. + # + # source://slop//lib/slop.rb#199 + def command(command, options = T.unsafe(nil), &block); end + + # The Hash of sub-commands for this Slop instance. + # + # source://slop//lib/slop.rb#122 + def commands; end + + # The Hash of configuration options for this Slop instance. + # + # source://slop//lib/slop.rb#116 + def config; end + + # Get or set the description (used for commands). + # + # desc - The String to set the description. + # + # Returns the description String. + # + # source://slop//lib/slop.rb#188 + def description(desc = T.unsafe(nil)); end + + # Set the description (used for commands). + # + # desc - The String to set the description. + # + # source://slop//lib/slop.rb#179 + def description=(desc); end + + # Enumerable interface. Yields each Slop::Option. + # + # source://slop//lib/slop.rb#312 + def each(&block); end + + # Fetch a Slop object associated with this command. + # + # command - The String or Symbol name of the command. + # + # Examples: + # + # opts.command :foo do + # on :v, :verbose, 'Enable verbose mode' + # end + # + # # ruby run.rb foo -v + # opts.fetch_command(:foo).verbose? #=> true + # + # source://slop//lib/slop.rb#404 + def fetch_command(command); end + + # Fetch a Slop::Option object. + # + # key - The Symbol or String option key. + # + # Examples: + # + # opts.on(:foo, 'Something fooey', :argument => :optional) + # opt = opts.fetch_option(:foo) + # opt.class #=> Slop::Option + # opt.accepts_optional_argument? #=> true + # + # Returns an Option or nil if none were found. + # + # source://slop//lib/slop.rb#388 + def fetch_option(key); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://slop//lib/slop.rb#293 + def get(key); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://slop//lib/slop.rb#431 + def help; end + + # Fetch a list of options which were missing from the parsed list. + # + # Examples: + # + # opts = Slop.new do + # on :n, :name= + # on :p, :password= + # end + # + # opts.parse %w[ --name Lee ] + # opts.missing #=> ['password'] + # + # Returns an Array of Strings representing missing options. + # + # source://slop//lib/slop.rb#372 + def missing; end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://slop//lib/slop.rb#276 + def on(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://slop//lib/slop.rb#276 + def opt(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://slop//lib/slop.rb#276 + def option(*objects, &block); end + + # The Array of Slop::Option objects tied to this Slop instance. + # + # source://slop//lib/slop.rb#119 + def options; end + + # Parse a list of items, executing and gathering options along the way. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items. + # + # source://slop//lib/slop.rb#210 + def parse(items = T.unsafe(nil), &block); end + + # Parse a list of items, executing and gathering options along the way. + # unlike parse() this method will remove any options and option arguments + # from the original Array. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items with options removed. + # + # source://slop//lib/slop.rb#223 + def parse!(items = T.unsafe(nil), &block); end + + # Check for an options presence. + # + # Examples: + # + # opts.parse %w( --foo ) + # opts.present?(:foo) #=> true + # opts.present?(:bar) #=> false + # + # Returns true if all of the keys are present in the parsed arguments. + # + # @return [Boolean] + # + # source://slop//lib/slop.rb#348 + def present?(*keys); end + + # Specify code to be executed when these options are parsed. + # + # callable - An object responding to a call method. + # + # yields - The instance of Slop parsing these options + # An Array of unparsed arguments + # + # Example: + # + # Slop.parse do + # on :v, :verbose + # + # run do |opts, args| + # puts "Arguments: #{args.inspect}" if opts.verbose? + # end + # end + # + # source://slop//lib/slop.rb#332 + def run(callable = T.unsafe(nil), &block); end + + # Add string separators between options. + # + # text - The String text to print. + # + # source://slop//lib/slop.rb#420 + def separator(text); end + + # Is strict mode enabled? + # + # Returns true if strict mode is enabled, false otherwise. + # + # @return [Boolean] + # + # source://slop//lib/slop.rb#155 + def strict?; end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://slop//lib/slop.rb#302 + def to_h(include_commands = T.unsafe(nil)); end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://slop//lib/slop.rb#302 + def to_hash(include_commands = T.unsafe(nil)); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://slop//lib/slop.rb#431 + def to_s; end + + private + + # Autocreate an option on the fly. See the :autocreate Slop config option. + # + # items - The Array of items we're parsing. + # index - The current Integer index for the item we're processing. + # + # Returns nothing. + # + # source://slop//lib/slop.rb#615 + def autocreate(items, index); end + + # Build an option from a list of objects. + # + # objects - An Array of objects used to build this option. + # + # Returns a new instance of Slop::Option. + # + # source://slop//lib/slop.rb#631 + def build_option(objects, &block); end + + # Remove any leading -- characters from a string. + # + # object - The Object we want to cast to a String and clean. + # + # Returns the newly cleaned String with leading -- characters removed. + # + # source://slop//lib/slop.rb#675 + def clean(object); end + + # source://slop//lib/slop.rb#679 + def commands_to_help; end + + # Execute a `-abc` type option where a, b and c are all options. This + # method is only executed if the multiple_switches argument is true. + # + # option - The first Option object. + # argument - The argument to this option. (Split into multiple Options). + # items - The Array of items currently being parsed. + # index - The index of the current item being processed. + # + # Returns nothing. + # + # source://slop//lib/slop.rb#570 + def execute_multiple_switches(option, argument, items, index); end + + # Execute an option, firing off callbacks and assigning arguments. + # + # option - The Slop::Option object found by #process_item. + # argument - The argument Object to assign to this option. + # index - The current Integer index of the object we're processing. + # item - The optional String item we're processing. + # + # Returns nothing. + # + # source://slop//lib/slop.rb#537 + def execute_option(option, argument, index, item = T.unsafe(nil)); end + + # Extract the long flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://slop//lib/slop.rb#660 + def extract_long_flag(objects, config); end + + # Extract an option from a flag. + # + # flag - The flag key used to extract an option. + # + # Returns an Array of [option, argument]. + # + # source://slop//lib/slop.rb#593 + def extract_option(flag); end + + # source://slop//lib/slop.rb#647 + def extract_short_flag(objects, config); end + + # Convenience method for present?(:option). + # + # Examples: + # + # opts.parse %( --verbose ) + # opts.verbose? #=> true + # opts.other? #=> false + # + # Returns true if this option is present. If this method does not end + # with a ? character it will instead call super(). + # + # source://slop//lib/slop.rb#473 + def method_missing(method, *args, &block); end + + # Process a list item, figure out if it's an option, execute any + # callbacks, assign any option arguments, and do some sanity checks. + # + # items - The Array of items to process. + # index - The current Integer index of the item we want to process. + # block - An optional block which when passed will yield non options. + # + # Returns nothing. + # + # source://slop//lib/slop.rb#491 + def process_item(items, index, &block); end + + # Override this method so we can check if an option? method exists. + # + # Returns true if this option key exists in our list of options. + # + # @return [Boolean] + # + # source://slop//lib/slop.rb#355 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Build a Slop object from a option specification. + # + # This allows you to design your options via a simple String rather + # than programatically. Do note though that with this method, you're + # unable to pass any advanced options to the on() method when creating + # options. + # + # string - The optspec String + # config - A Hash of configuration options to pass to Slop.new + # + # Examples: + # + # opts = Slop.optspec(<<-SPEC) + # ruby foo.rb [options] + # --- + # n,name= Your name + # a,age= Your age + # A,auth Sign in with auth + # p,passcode= Your secret pass code + # SPEC + # + # opts.fetch_option(:name).description #=> "Your name" + # + # Returns a new instance of Slop. + # + # source://slop//lib/slop.rb#93 + def optspec(string, config = T.unsafe(nil)); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Examples: + # + # Slop.parse(ARGV, :help => true) do + # on '-n', '--name', 'Your username', :argument => true + # end + # + # Returns a new instance of Slop. + # + # source://slop//lib/slop.rb#53 + def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Returns a new instance of Slop. + # + # source://slop//lib/slop.rb#62 + def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + end +end + +# source://slop//lib/slop/commands.rb#2 +class Slop::Commands + include ::Enumerable + + # Create a new instance of Slop::Commands and optionally build + # Slop instances via a block. Any configuration options used in + # this method will be the default configuration options sent to + # each Slop object created. + # + # config - An optional configuration Hash. + # block - Optional block used to define commands. + # + # Examples: + # + # commands = Slop::Commands.new do + # on :new do + # on '-o', '--outdir=', 'The output directory' + # on '-v', '--verbose', 'Enable verbose mode' + # end + # + # on :generate do + # on '--assets', 'Generate assets', :default => true + # end + # + # global do + # on '-D', '--debug', 'Enable debug mode', :default => false + # end + # end + # + # commands[:new].class #=> Slop + # commands.parse + # + # @return [Commands] a new instance of Commands + # + # source://slop//lib/slop/commands.rb#36 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://slop//lib/slop/commands.rb#97 + def [](key); end + + # Returns the value of attribute arguments. + # + # source://slop//lib/slop/commands.rb#5 + def arguments; end + + # Optionally set the banner for this command help output. + # + # banner - The String text to set the banner. + # + # Returns the String banner if one is set. + # + # source://slop//lib/slop/commands.rb#56 + def banner(banner = T.unsafe(nil)); end + + # Sets the attribute banner + # + # @param value the value to set the attribute banner to. + # + # source://slop//lib/slop/commands.rb#6 + def banner=(_arg0); end + + # Returns the value of attribute commands. + # + # source://slop//lib/slop/commands.rb#5 + def commands; end + + # Returns the value of attribute config. + # + # source://slop//lib/slop/commands.rb#5 + def config; end + + # Add a Slop instance used when no other commands exist. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to default. + # + # source://slop//lib/slop/commands.rb#78 + def default(config = T.unsafe(nil), &block); end + + # Enumerable interface. + # + # source://slop//lib/slop/commands.rb#116 + def each(&block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://slop//lib/slop/commands.rb#97 + def get(key); end + + # Add a global Slop instance. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to global. + # + # source://slop//lib/slop/commands.rb#88 + def global(config = T.unsafe(nil), &block); end + + # Returns the help String. + # + # source://slop//lib/slop/commands.rb#160 + def help; end + + # Returns the inspection String. + # + # source://slop//lib/slop/commands.rb#176 + def inspect; end + + # Add a Slop instance for a specific command. + # + # command - A String or Symbol key used to identify this command. + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to command. + # + # source://slop//lib/slop/commands.rb#68 + def on(command, config = T.unsafe(nil), &block); end + + # Parse a list of items. + # + # items - The Array of items to parse. + # + # Returns the original Array of items. + # + # source://slop//lib/slop/commands.rb#125 + def parse(items = T.unsafe(nil)); end + + # Parse a list of items, removing any options or option arguments found. + # + # items - The Array of items to parse. + # + # Returns the original Array of items with options removed. + # + # source://slop//lib/slop/commands.rb#135 + def parse!(items = T.unsafe(nil)); end + + # Check for a command presence. + # + # Examples: + # + # cmds.parse %w( foo ) + # cmds.present?(:foo) #=> true + # cmds.present?(:bar) #=> false + # + # Returns true if the given key is present in the parsed arguments. + # + # @return [Boolean] + # + # source://slop//lib/slop/commands.rb#111 + def present?(key); end + + # Returns a nested Hash with Slop options and values. See Slop#to_hash. + # + # source://slop//lib/slop/commands.rb#155 + def to_hash; end + + # Returns the help String. + # + # source://slop//lib/slop/commands.rb#160 + def to_s; end + + private + + # Returns nothing. + # + # source://slop//lib/slop/commands.rb#183 + def execute_arguments!(items); end + + # Returns nothing. + # + # source://slop//lib/slop/commands.rb#189 + def execute_global_opts!(items); end +end + +# Returns a default Hash of configuration options this Slop instance uses. +# +# source://slop//lib/slop.rb#28 +Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The main Error class, all Exception classes inherit from this class. +# +# source://slop//lib/slop.rb#10 +class Slop::Error < ::StandardError; end + +# Raised when an argument does not match its intended match constraint. +# +# source://slop//lib/slop.rb#19 +class Slop::InvalidArgumentError < ::Slop::Error; end + +# Raised when an invalid command is found and the strict flag is enabled. +# +# source://slop//lib/slop.rb#25 +class Slop::InvalidCommandError < ::Slop::Error; end + +# Raised when an invalid option is found and the strict flag is enabled. +# +# source://slop//lib/slop.rb#22 +class Slop::InvalidOptionError < ::Slop::Error; end + +# Raised when an option argument is expected but none are given. +# +# source://slop//lib/slop.rb#13 +class Slop::MissingArgumentError < ::Slop::Error; end + +# Raised when an option is expected/required but not present. +# +# source://slop//lib/slop.rb#16 +class Slop::MissingOptionError < ::Slop::Error; end + +# source://slop//lib/slop/option.rb#2 +class Slop::Option + # Incapsulate internal option information, mainly used to store + # option specific configuration data, most of the meat of this + # class is found in the #value method. + # + # slop - The instance of Slop tied to this Option. + # short - The String or Symbol short flag. + # long - The String or Symbol long flag. + # description - The String description text. + # config - A Hash of configuration options. + # block - An optional block used as a callback. + # + # @return [Option] a new instance of Option + # + # source://slop//lib/slop/option.rb#33 + def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end + + # Returns true if this option accepts an optional argument. + # + # @return [Boolean] + # + # source://slop//lib/slop/option.rb#71 + def accepts_optional_argument?; end + + # Returns the value of attribute argument_in_value. + # + # source://slop//lib/slop/option.rb#21 + def argument_in_value; end + + # Sets the attribute argument_in_value + # + # @param value the value to set the attribute argument_in_value to. + # + # source://slop//lib/slop/option.rb#21 + def argument_in_value=(_arg0); end + + # Call this options callback if one exists, and it responds to call(). + # + # Returns nothing. + # + # source://slop//lib/slop/option.rb#83 + def call(*objects); end + + # Returns the value of attribute config. + # + # source://slop//lib/slop/option.rb#20 + def config; end + + # Returns the value of attribute count. + # + # source://slop//lib/slop/option.rb#21 + def count; end + + # Sets the attribute count + # + # @param value the value to set the attribute count to. + # + # source://slop//lib/slop/option.rb#21 + def count=(_arg0); end + + # Returns the value of attribute description. + # + # source://slop//lib/slop/option.rb#20 + def description; end + + # Returns true if this option expects an argument. + # + # @return [Boolean] + # + # source://slop//lib/slop/option.rb#66 + def expects_argument?; end + + # Returns the help String for this option. + # + # source://slop//lib/slop/option.rb#127 + def help; end + + # Returns the String inspection text. + # + # source://slop//lib/slop/option.rb#151 + def inspect; end + + # Returns the String flag of this option. Preferring the long flag. + # + # source://slop//lib/slop/option.rb#76 + def key; end + + # Returns the value of attribute long. + # + # source://slop//lib/slop/option.rb#20 + def long; end + + # Returns the value of attribute short. + # + # source://slop//lib/slop/option.rb#20 + def short; end + + # Returns the help String for this option. + # + # source://slop//lib/slop/option.rb#127 + def to_s; end + + # Returns the value of attribute types. + # + # source://slop//lib/slop/option.rb#20 + def types; end + + # Fetch the argument value for this option. + # + # Returns the Object once any type conversions have taken place. + # + # source://slop//lib/slop/option.rb#107 + def value; end + + # Set the new argument value for this option. + # + # We use this setter method to handle concatenating lists. That is, + # when an array type is specified and used more than once, values from + # both options will be grouped together and flattened into a single array. + # + # source://slop//lib/slop/option.rb#92 + def value=(new_value); end + + private + + # Convert an object to a Float if possible. + # + # value - The Object we want to convert to a float. + # + # Returns the Float value if possible to convert, else a zero. + # + # source://slop//lib/slop/option.rb#181 + def value_to_float(value); end + + # Convert an object to an Integer if possible. + # + # value - The Object we want to convert to an integer. + # + # Returns the Integer value if possible to convert, else a zero. + # + # source://slop//lib/slop/option.rb#164 + def value_to_integer(value); end + + # Convert an object to a Range if possible. + # + # value - The Object we want to convert to a range. + # + # Returns the Range value if one could be found, else the original object. + # + # source://slop//lib/slop/option.rb#198 + def value_to_range(value); end +end + +# The default Hash of configuration options this class uses. +# +# source://slop//lib/slop/option.rb#5 +Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://slop//lib/slop.rb#7 +Slop::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_cache@1.0.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_cache@1.0.6.rbi new file mode 100644 index 0000000..6b008c0 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_cache@1.0.6.rbi @@ -0,0 +1,786 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `solid_cache` gem. +# Please instead update this file by running `bin/tapioca gem solid_cache`. + + +# See https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44824.pdf +# +# source://solid_cache//lib/solid_cache/engine.rb#6 +module SolidCache + # source://solid_cache//lib/solid_cache.rb#13 + def configuration; end + + # source://solid_cache//lib/solid_cache.rb#13 + def configuration=(val); end + + # source://solid_cache//lib/solid_cache.rb#12 + def executor; end + + # source://solid_cache//lib/solid_cache.rb#12 + def executor=(val); end + + class << self + # source://solid_cache//lib/solid_cache.rb#13 + def configuration; end + + # source://solid_cache//lib/solid_cache.rb#13 + def configuration=(val); end + + # source://solid_cache//lib/solid_cache.rb#12 + def executor; end + + # source://solid_cache//lib/solid_cache.rb#12 + def executor=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#413 + def railtie_helpers_paths; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#396 + def railtie_namespace; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#417 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#402 + def table_name_prefix; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#409 + def use_relative_model_naming?; end + end +end + +# source://solid_cache//lib/solid_cache/configuration.rb#4 +class SolidCache::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://solid_cache//lib/solid_cache/configuration.rb#7 + def initialize(store_options: T.unsafe(nil), database: T.unsafe(nil), databases: T.unsafe(nil), connects_to: T.unsafe(nil), executor: T.unsafe(nil), encrypt: T.unsafe(nil), encryption_context_properties: T.unsafe(nil), size_estimate_samples: T.unsafe(nil)); end + + # Returns the value of attribute connects_to. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def connects_to; end + + # Returns the value of attribute encrypt. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def encrypt; end + + # @return [Boolean] + # + # source://solid_cache//lib/solid_cache/configuration.rb#25 + def encrypt?; end + + # Returns the value of attribute encryption_context_properties. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def encryption_context_properties; end + + # Returns the value of attribute executor. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def executor; end + + # source://solid_cache//lib/solid_cache/configuration.rb#21 + def shard_keys; end + + # @return [Boolean] + # + # source://solid_cache//lib/solid_cache/configuration.rb#17 + def sharded?; end + + # Returns the value of attribute size_estimate_samples. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def size_estimate_samples; end + + # Returns the value of attribute store_options. + # + # source://solid_cache//lib/solid_cache/configuration.rb#5 + def store_options; end + + private + + # source://solid_cache//lib/solid_cache/configuration.rb#48 + def default_encryption_context_properties; end + + # source://solid_cache//lib/solid_cache/configuration.rb#30 + def set_connects_to(database:, databases:, connects_to:); end +end + +# source://solid_cache//lib/solid_cache/connections.rb#4 +module SolidCache::Connections + class << self + # source://solid_cache//lib/solid_cache/connections.rb#5 + def from_config(options); end + end +end + +# source://solid_cache//lib/solid_cache/connections/sharded.rb#5 +class SolidCache::Connections::Sharded + # @return [Sharded] a new instance of Sharded + # + # source://solid_cache//lib/solid_cache/connections/sharded.rb#8 + def initialize(names); end + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#27 + def assign(keys); end + + # Returns the value of attribute consistent_hash. + # + # source://solid_cache//lib/solid_cache/connections/sharded.rb#6 + def consistent_hash; end + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#31 + def count; end + + # Returns the value of attribute names. + # + # source://solid_cache//lib/solid_cache/connections/sharded.rb#6 + def names; end + + # Returns the value of attribute nodes. + # + # source://solid_cache//lib/solid_cache/connections/sharded.rb#6 + def nodes; end + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#19 + def with(name, &block); end + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#23 + def with_connection_for(key, &block); end + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#13 + def with_each(&block); end + + private + + # source://solid_cache//lib/solid_cache/connections/sharded.rb#36 + def shard_for(key); end +end + +# source://solid_cache//lib/solid_cache/connections/single.rb#5 +class SolidCache::Connections::Single + # @return [Single] a new instance of Single + # + # source://solid_cache//lib/solid_cache/connections/single.rb#8 + def initialize(name); end + + # source://solid_cache//lib/solid_cache/connections/single.rb#26 + def assign(keys); end + + # source://solid_cache//lib/solid_cache/connections/single.rb#30 + def count; end + + # Returns the value of attribute name. + # + # source://solid_cache//lib/solid_cache/connections/single.rb#6 + def name; end + + # source://solid_cache//lib/solid_cache/connections/single.rb#34 + def names; end + + # source://solid_cache//lib/solid_cache/connections/single.rb#18 + def with(name, &block); end + + # source://solid_cache//lib/solid_cache/connections/single.rb#22 + def with_connection_for(key, &block); end + + # source://solid_cache//lib/solid_cache/connections/single.rb#12 + def with_each(&block); end +end + +# source://solid_cache//lib/solid_cache/connections/unmanaged.rb#5 +class SolidCache::Connections::Unmanaged + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#20 + def assign(keys); end + + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#24 + def count; end + + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#28 + def names; end + + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#12 + def with(name); end + + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#16 + def with_connection_for(key); end + + # source://solid_cache//lib/solid_cache/connections/unmanaged.rb#6 + def with_each; end +end + +# source://solid_cache//lib/solid_cache/engine.rb#7 +class SolidCache::Engine < ::Rails::Engine + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +class SolidCache::Entry < ::SolidCache::Record + include ::SolidCache::Entry::GeneratedAttributeMethods + include ::SolidCache::Entry::GeneratedAssociationMethods + include ::SolidCache::Entry::Size + include ::SolidCache::Entry::Expiration + include ::SolidCache::Entry::Encryption + extend ::SolidCache::Entry::Size::ClassMethods + extend ::SolidCache::Entry::Expiration::ClassMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + def clear_delete; end + def clear_truncate; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def delete_by_key(*keys); end + def id_range; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def in_key_hash_range(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def largest_byte_sizes(*args, **_arg1); end + + def lock_and_write(key, &block); end + def read(key); end + def read_multi(keys); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def up_to_byte_size(*args, **_arg1); end + + def write(key, value); end + def write_multi(payloads); end + + private + + def add_key_hash_and_byte_size(payloads); end + def byte_size_for(payload); end + def estimated_row_overhead; end + def key_hash_for(key); end + def key_hashes_for(keys); end + def select_sql(keys); end + def upsert_unique_by; end + def without_query_cache(&block); end + end +end + +SolidCache::Entry::ESTIMATED_ENCRYPTION_OVERHEAD = T.let(T.unsafe(nil), Integer) +SolidCache::Entry::ESTIMATED_ROW_OVERHEAD = T.let(T.unsafe(nil), Integer) + +module SolidCache::Entry::Encryption + extend ::ActiveSupport::Concern +end + +module SolidCache::Entry::Expiration + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidCache::Entry::Expiration::ClassMethods +end + +module SolidCache::Entry::Expiration::ClassMethods + def expire(count, max_age:, max_entries:, max_size:); end + + private + + def cache_full?(max_entries:, max_size:); end + def expiry_candidate_ids(count, max_age:, max_entries:, max_size:); end +end + +module SolidCache::Entry::GeneratedAssociationMethods; end +module SolidCache::Entry::GeneratedAttributeMethods; end +SolidCache::Entry::KEY_HASH_ID_RANGE = T.let(T.unsafe(nil), Range) + +module SolidCache::Entry::Size + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidCache::Entry::Size::ClassMethods +end + +module SolidCache::Entry::Size::ClassMethods + def estimated_size(samples: T.unsafe(nil)); end +end + +class SolidCache::Entry::Size::Estimate + def initialize(samples:); end + + def exact?; end + def max_records; end + def samples; end + def size; end + + private + + def key_hash_range; end + def non_outlier_estimated_size; end + def outliers_count; end + def outliers_cutoff; end + def outliers_size; end + def outliers_size_count_and_cutoff; end + def sample_range; end + def sample_range_size; end + def sampled_fraction; end + def sampled_non_outlier_size; end +end + +class SolidCache::Entry::Size::MovingAverageEstimate + def initialize(samples:); end + + def exact?(*_arg0, **_arg1, &_arg2); end + def samples; end + def size; end + + private + + def estimate; end + def latest_value; end + def latest_values; end + def previous_values; end + def retained_estimates; end + def retained_estimates_for_target_fraction; end + def write_values(values); end +end + +SolidCache::Entry::Size::MovingAverageEstimate::ESTIMATES_KEY = T.let(T.unsafe(nil), String) +SolidCache::Entry::Size::MovingAverageEstimate::MAX_RETAINED_ESTIMATES = T.let(T.unsafe(nil), Integer) +SolidCache::Entry::Size::MovingAverageEstimate::TARGET_SAMPLED_FRACTION = T.let(T.unsafe(nil), Float) + +class SolidCache::ExpiryJob < ::ActiveJob::Base + def perform(count, shard: T.unsafe(nil), max_age: T.unsafe(nil), max_entries: T.unsafe(nil), max_size: T.unsafe(nil)); end +end + +# source://solid_cache//lib/solid_cache/maglev_hash.rb#6 +class SolidCache::MaglevHash + # @raise [ArgumentError] + # @return [MaglevHash] a new instance of MaglevHash + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#12 + def initialize(nodes); end + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#20 + def node(key); end + + # Returns the value of attribute nodes. + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#7 + def nodes; end + + private + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#27 + def build_lookup; end + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#43 + def build_preferences(node); end + + # Returns the value of attribute lookup. + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#25 + def lookup; end + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#50 + def md5(*args); end + + # Returns the value of attribute node_count. + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#25 + def node_count; end + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#54 + def quick_hash(key); end +end + +# source://solid_cache//lib/solid_cache/maglev_hash.rb#58 +class SolidCache::MaglevHash::Preferences + # @return [Preferences] a new instance of Preferences + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#59 + def initialize(offset, skip); end + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#64 + def preferred_free_slot(lookup); end + + private + + # source://solid_cache//lib/solid_cache/maglev_hash.rb#74 + def next_slot; end + + # Returns the value of attribute preferred_slots. + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#72 + def preferred_slots; end + + # Returns the value of attribute rank. + # + # source://solid_cache//lib/solid_cache/maglev_hash.rb#72 + def rank; end +end + +# Must be prime +# +# source://solid_cache//lib/solid_cache/maglev_hash.rb#10 +SolidCache::MaglevHash::TABLE_SIZE = T.let(T.unsafe(nil), Integer) + +class SolidCache::Record < ::ActiveRecord::Base + include ::SolidCache::Record::GeneratedAttributeMethods + include ::SolidCache::Record::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def disable_instrumentation(&block); end + def each_shard(&block); end + def with_shard(shard, &block); end + end +end + +module SolidCache::Record::GeneratedAssociationMethods; end +module SolidCache::Record::GeneratedAttributeMethods; end +SolidCache::Record::NULL_INSTRUMENTER = T.let(T.unsafe(nil), ActiveSupport::Notifications::Instrumenter) + +# source://solid_cache//lib/solid_cache/store.rb#4 +class SolidCache::Store < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + include ::SolidCache::Store::Stats + include ::SolidCache::Store::Failsafe + include ::SolidCache::Store::Expiry + include ::SolidCache::Store::Execution + include ::SolidCache::Store::Entries + include ::SolidCache::Store::Connections + include ::SolidCache::Store::Api + + # @return [Store] a new instance of Store + # + # source://solid_cache//lib/solid_cache/store.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store.rb#16 + def setup!; end + + class << self + # @return [Boolean] + # + # source://solid_cache//lib/solid_cache/store.rb#12 + def supports_cache_versioning?; end + end +end + +# source://solid_cache//lib/solid_cache/store/api.rb#5 +module SolidCache::Store::Api + # source://solid_cache//lib/solid_cache/store/api.rb#11 + def initialize(options = T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://solid_cache//lib/solid_cache/store/api.rb#35 + def cleanup(options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/api.rb#39 + def clear(options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/api.rb#26 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/api.rb#17 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute max_key_bytesize. + # + # source://solid_cache//lib/solid_cache/store/api.rb#9 + def max_key_bytesize; end + + private + + # source://solid_cache//lib/solid_cache/store/api.rb#154 + def adjust(name, amount, options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#164 + def adjusted_entry(value, amount, options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#118 + def delete_entry(key, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#122 + def delete_multi_entries(entries, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#136 + def deserialize_entry(payload, **_arg1); end + + # source://solid_cache//lib/solid_cache/store/api.rb#140 + def normalize_key(key, options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#44 + def read_entry(key, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#79 + def read_multi_entries(names, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#75 + def read_serialized_entries(keys); end + + # source://solid_cache//lib/solid_cache/store/api.rb#48 + def read_serialized_entry(key, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#130 + def serialize_entries(entries, **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#126 + def serialize_entry(entry, raw: T.unsafe(nil), **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#144 + def truncate_key(key); end + + # source://solid_cache//lib/solid_cache/store/api.rb#52 + def write_entry(key, entry, raw: T.unsafe(nil), unless_exist: T.unsafe(nil), **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#106 + def write_multi_entries(entries, expires_in: T.unsafe(nil), **options); end + + # source://solid_cache//lib/solid_cache/store/api.rb#71 + def write_serialized_entry(key, payload, raw: T.unsafe(nil), unless_exist: T.unsafe(nil), expires_in: T.unsafe(nil), race_condition_ttl: T.unsafe(nil), returning: T.unsafe(nil), **options); end +end + +# source://solid_cache//lib/solid_cache/store/api.rb#6 +SolidCache::Store::Api::DEFAULT_MAX_KEY_BYTESIZE = T.let(T.unsafe(nil), Integer) + +# source://solid_cache//lib/solid_cache/store/api.rb#7 +SolidCache::Store::Api::SQL_WILDCARD_CHARS = T.let(T.unsafe(nil), Array) + +# source://solid_cache//lib/solid_cache/store/connections.rb#5 +module SolidCache::Store::Connections + # source://solid_cache//lib/solid_cache/store/connections.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#53 + def connection_names; end + + # source://solid_cache//lib/solid_cache/store/connections.rb#57 + def connections; end + + # source://solid_cache//lib/solid_cache/store/connections.rb#49 + def group_by_connection(keys); end + + # Returns the value of attribute shard_options. + # + # source://solid_cache//lib/solid_cache/store/connections.rb#6 + def shard_options; end + + # source://solid_cache//lib/solid_cache/store/connections.rb#43 + def with_connection(name, async: T.unsafe(nil), &block); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#37 + def with_connection_for(key, async: T.unsafe(nil), &block); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#29 + def with_each_connection(async: T.unsafe(nil), &block); end + + private + + # source://solid_cache//lib/solid_cache/store/connections.rb#66 + def reading_key(key, failsafe:, failsafe_returning: T.unsafe(nil), &block); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#72 + def reading_keys(keys, failsafe:, failsafe_returning: T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#62 + def setup!; end + + # source://solid_cache//lib/solid_cache/store/connections.rb#99 + def writing_all(failsafe:, failsafe_returning: T.unsafe(nil), &block); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#83 + def writing_key(key, failsafe:, failsafe_returning: T.unsafe(nil), &block); end + + # source://solid_cache//lib/solid_cache/store/connections.rb#89 + def writing_keys(entries, failsafe:, failsafe_returning: T.unsafe(nil)); end +end + +# source://solid_cache//lib/solid_cache/store/entries.rb#5 +module SolidCache::Store::Entries + # source://solid_cache//lib/solid_cache/store/entries.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute clear_with. + # + # source://solid_cache//lib/solid_cache/store/entries.rb#6 + def clear_with; end + + private + + # source://solid_cache//lib/solid_cache/store/entries.rb#20 + def entry_clear; end + + # source://solid_cache//lib/solid_cache/store/entries.rb#66 + def entry_delete(key); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#72 + def entry_delete_multi(entries); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#30 + def entry_lock_and_write(key, &block); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#38 + def entry_read(key); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#44 + def entry_read_multi(keys); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#50 + def entry_write(key, payload); end + + # source://solid_cache//lib/solid_cache/store/entries.rb#58 + def entry_write_multi(entries); end +end + +# source://solid_cache//lib/solid_cache/store/execution.rb#5 +module SolidCache::Store::Execution + # source://solid_cache//lib/solid_cache/store/execution.rb#6 + def initialize(options = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://solid_cache//lib/solid_cache/store/execution.rb#43 + def active_record_instrumentation?; end + + # source://solid_cache//lib/solid_cache/store/execution.rb#13 + def async(&block); end + + # source://solid_cache//lib/solid_cache/store/execution.rb#27 + def execute(async, &block); end + + # source://solid_cache//lib/solid_cache/store/execution.rb#47 + def setup_instrumentation(&block); end + + # source://solid_cache//lib/solid_cache/store/execution.rb#35 + def wrap_in_rails_executor(&block); end +end + +# source://solid_cache//lib/solid_cache/store/expiry.rb#7 +module SolidCache::Store::Expiry + # @raise [ArgumentError] + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#14 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute expires_per_write. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def expires_per_write; end + + # Returns the value of attribute expiry_batch_size. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def expiry_batch_size; end + + # Returns the value of attribute expiry_method. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def expiry_method; end + + # Returns the value of attribute expiry_queue. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def expiry_queue; end + + # Returns the value of attribute max_age. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def max_age; end + + # Returns the value of attribute max_entries. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def max_entries; end + + # Returns the value of attribute max_size. + # + # source://solid_cache//lib/solid_cache/store/expiry.rb#12 + def max_size; end + + # source://solid_cache//lib/solid_cache/store/expiry.rb#27 + def track_writes(count); end + + private + + # source://solid_cache//lib/solid_cache/store/expiry.rb#39 + def expire_later; end + + # source://solid_cache//lib/solid_cache/store/expiry.rb#32 + def expiry_batches(count); end +end + +# For every write that we do, we attempt to delete EXPIRY_MULTIPLIER times as many records. +# This ensures there is downward pressure on the cache size while there is valid data to delete +# +# source://solid_cache//lib/solid_cache/store/expiry.rb#10 +SolidCache::Store::Expiry::EXPIRY_MULTIPLIER = T.let(T.unsafe(nil), Integer) + +# source://solid_cache//lib/solid_cache/store/failsafe.rb#5 +module SolidCache::Store::Failsafe + # source://solid_cache//lib/solid_cache/store/failsafe.rb#22 + def initialize(options = T.unsafe(nil)); end + + private + + # Returns the value of attribute error_handler. + # + # source://solid_cache//lib/solid_cache/store/failsafe.rb#29 + def error_handler; end + + # source://solid_cache//lib/solid_cache/store/failsafe.rb#31 + def failsafe(method, returning: T.unsafe(nil)); end +end + +# source://solid_cache//lib/solid_cache/store/failsafe.rb#16 +SolidCache::Store::Failsafe::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# source://solid_cache//lib/solid_cache/store/failsafe.rb#6 +SolidCache::Store::Failsafe::TRANSIENT_ACTIVE_RECORD_ERRORS = T.let(T.unsafe(nil), Array) + +# source://solid_cache//lib/solid_cache/store/stats.rb#5 +module SolidCache::Store::Stats + # source://solid_cache//lib/solid_cache/store/stats.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://solid_cache//lib/solid_cache/store/stats.rb#10 + def stats; end + + private + + # source://solid_cache//lib/solid_cache/store/stats.rb#22 + def connection_stats; end + + # source://solid_cache//lib/solid_cache/store/stats.rb#18 + def connections_stats; end +end + +# source://solid_cache//lib/solid_cache/version.rb#4 +SolidCache::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_queue@1.0.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_queue@1.0.0.rbi new file mode 100644 index 0000000..caf1a35 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/solid_queue@1.0.0.rbi @@ -0,0 +1,2894 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `solid_queue` gem. +# Please instead update this file by running `bin/tapioca gem solid_queue`. + + +# source://solid_queue//lib/active_job/concurrency_controls.rb#3 +module ActiveJob + class << self + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_adapter.rb#7 + def adapter_name(adapter); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/deprecator.rb#4 + def deprecator; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/gem_version.rb#5 + def gem_version; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/enqueuing.rb#14 + def perform_all_later(*jobs); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job.rb#52 + def use_big_decimal_serializer; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job.rb#58 + def use_big_decimal_serializer=(value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job.rb#69 + def verbose_enqueue_logs; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job.rb#69 + def verbose_enqueue_logs=(_arg0); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/version.rb#7 + def version; end + + private + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/instrumentation.rb#6 + def instrument_enqueue_all(queue_adapter, jobs); end + end +end + +class ActiveJob::Base + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _enqueue_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _perform_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_enqueue_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_perform_callbacks(&block); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/exceptions.rb#12 + def after_discard_procs; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/exceptions.rb#12 + def after_discard_procs=(_arg0); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#14 + def concurrency_duration; end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#14 + def concurrency_duration=(_arg0); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#14 + def concurrency_duration?; end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#13 + def concurrency_limit; end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#13 + def concurrency_limit=(_arg0); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#13 + def concurrency_limit?; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/logging.rb#15 + def logger; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/logging.rb#15 + def logger=(val); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_adapter.rb#27 + def queue_adapter(&_arg0); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#57 + def queue_name_prefix; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#57 + def queue_name_prefix=(_arg0); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#57 + def queue_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers=(_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _enqueue_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _enqueue_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _perform_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _perform_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _queue_adapter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _queue_adapter=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _queue_adapter_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _queue_adapter_name=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _test_adapter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _test_adapter=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def after_discard_procs; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def after_discard_procs=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/exceptions.rb#12 + def after_discard_procs?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_duration; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_duration=(new_value); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#14 + def concurrency_duration?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_group; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_group=(new_value); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#11 + def concurrency_group?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_key; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_key=(new_value); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#10 + def concurrency_key?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def concurrency_limit; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def concurrency_limit=(new_value); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#13 + def concurrency_limit?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def enqueue_after_transaction_commit; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def enqueue_after_transaction_commit=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def log_arguments; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def log_arguments=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/logging.rb#26 + def log_arguments?; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/logging.rb#15 + def logger; end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/logging.rb#15 + def logger=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def priority; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def priority=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_priority.rb#49 + def priority?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#55 + def queue_name?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name_delimiter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name_delimiter=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#56 + def queue_name_delimiter?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name_prefix; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name_prefix=(new_value); end + + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_name.rb#57 + def queue_name_prefix?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/rescuable.rb#15 + def rescue_handlers?; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def retry_jitter; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def retry_jitter=(new_value); end + end +end + +# source://solid_queue//lib/active_job/concurrency_controls.rb#4 +module ActiveJob::ConcurrencyControls + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveJob::ConcurrencyControls::ClassMethods + + # source://solid_queue//lib/active_job/concurrency_controls.rb#26 + def concurrency_key; end + + # @return [Boolean] + # + # source://solid_queue//lib/active_job/concurrency_controls.rb#39 + def concurrency_limited?; end + + private + + # source://solid_queue//lib/active_job/concurrency_controls.rb#48 + def compute_concurrency_parameter(option); end + + # source://solid_queue//lib/active_job/concurrency_controls.rb#44 + def concurrency_group; end + + module GeneratedClassMethods + def concurrency_duration; end + def concurrency_duration=(value); end + def concurrency_duration?; end + def concurrency_group; end + def concurrency_group=(value); end + def concurrency_group?; end + def concurrency_key; end + def concurrency_key=(value); end + def concurrency_key?; end + def concurrency_limit; end + def concurrency_limit=(value); end + def concurrency_limit?; end + end + + module GeneratedInstanceMethods + def concurrency_duration; end + def concurrency_duration=(value); end + def concurrency_duration?; end + def concurrency_limit; end + def concurrency_limit=(value); end + def concurrency_limit?; end + end +end + +# source://solid_queue//lib/active_job/concurrency_controls.rb#0 +module ActiveJob::ConcurrencyControls::ClassMethods + # source://solid_queue//lib/active_job/concurrency_controls.rb#18 + def limits_concurrency(key:, to: T.unsafe(nil), group: T.unsafe(nil), duration: T.unsafe(nil)); end +end + +# source://solid_queue//lib/active_job/concurrency_controls.rb#7 +ActiveJob::ConcurrencyControls::DEFAULT_CONCURRENCY_GROUP = T.let(T.unsafe(nil), Proc) + +# source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#4 +module ActiveJob::QueueAdapters + class << self + # source://activejob/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_job/queue_adapters.rb#135 + def lookup(name); end + end +end + +# == Active Job SolidQueue adapter +# +# To use it set the queue_adapter config to +:solid_queue+. +# +# Rails.application.config.active_job.queue_adapter = :solid_queue +# +# source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#10 +class ActiveJob::QueueAdapters::SolidQueueAdapter + # source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#15 + def enqueue(active_job); end + + # @return [Boolean] + # + # source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#11 + def enqueue_after_transaction_commit?; end + + # source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#23 + def enqueue_all(active_jobs); end + + # source://solid_queue//lib/active_job/queue_adapters/solid_queue_adapter.rb#19 + def enqueue_at(active_job, timestamp); end +end + +# source://solid_queue//lib/solid_queue/version.rb#1 +module SolidQueue + extend ::SolidQueue + + # source://solid_queue//lib/solid_queue.rb#26 + def app_executor; end + + # source://solid_queue//lib/solid_queue.rb#26 + def app_executor=(val); end + + # source://solid_queue//lib/solid_queue.rb#41 + def clear_finished_jobs_after; end + + # source://solid_queue//lib/solid_queue.rb#41 + def clear_finished_jobs_after=(val); end + + # source://solid_queue//lib/solid_queue.rb#26 + def connects_to; end + + # source://solid_queue//lib/solid_queue.rb#26 + def connects_to=(val); end + + # source://solid_queue//lib/solid_queue.rb#42 + def default_concurrency_control_period; end + + # source://solid_queue//lib/solid_queue.rb#42 + def default_concurrency_control_period=(val); end + + # source://solid_queue//lib/solid_queue.rb#66 + def instrument(channel, **options, &block); end + + # source://solid_queue//lib/solid_queue.rb#25 + def logger; end + + # source://solid_queue//lib/solid_queue.rb#25 + def logger=(val); end + + # source://solid_queue//lib/solid_queue.rb#44 + def on_start(&_arg0); end + + # source://solid_queue//lib/solid_queue.rb#44 + def on_stop(&_arg0); end + + # source://solid_queue//lib/solid_queue.rb#26 + def on_thread_error; end + + # source://solid_queue//lib/solid_queue.rb#26 + def on_thread_error=(val); end + + # source://solid_queue//lib/solid_queue.rb#46 + def on_worker_start(*_arg0, **_arg1, &_arg2); end + + # source://solid_queue//lib/solid_queue.rb#50 + def on_worker_stop(*_arg0, **_arg1, &_arg2); end + + # source://solid_queue//lib/solid_queue.rb#40 + def preserve_finished_jobs; end + + # source://solid_queue//lib/solid_queue.rb#40 + def preserve_finished_jobs=(val); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue.rb#62 + def preserve_finished_jobs?; end + + # source://solid_queue//lib/solid_queue.rb#31 + def process_alive_threshold; end + + # source://solid_queue//lib/solid_queue.rb#31 + def process_alive_threshold=(val); end + + # source://solid_queue//lib/solid_queue.rb#30 + def process_heartbeat_interval; end + + # source://solid_queue//lib/solid_queue.rb#30 + def process_heartbeat_interval=(val); end + + # source://solid_queue//lib/solid_queue.rb#33 + def shutdown_timeout; end + + # source://solid_queue//lib/solid_queue.rb#33 + def shutdown_timeout=(val); end + + # source://solid_queue//lib/solid_queue.rb#35 + def silence_polling; end + + # source://solid_queue//lib/solid_queue.rb#35 + def silence_polling=(val); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue.rb#58 + def silence_polling?; end + + # source://solid_queue//lib/solid_queue.rb#38 + def supervisor; end + + # source://solid_queue//lib/solid_queue.rb#38 + def supervisor=(val); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue.rb#54 + def supervisor?; end + + # source://solid_queue//lib/solid_queue.rb#37 + def supervisor_pidfile; end + + # source://solid_queue//lib/solid_queue.rb#37 + def supervisor_pidfile=(val); end + + # source://solid_queue//lib/solid_queue.rb#28 + def use_skip_locked; end + + # source://solid_queue//lib/solid_queue.rb#28 + def use_skip_locked=(val); end + + class << self + # source://solid_queue//lib/solid_queue.rb#26 + def app_executor; end + + # source://solid_queue//lib/solid_queue.rb#26 + def app_executor=(val); end + + # source://solid_queue//lib/solid_queue.rb#41 + def clear_finished_jobs_after; end + + # source://solid_queue//lib/solid_queue.rb#41 + def clear_finished_jobs_after=(val); end + + # source://solid_queue//lib/solid_queue.rb#26 + def connects_to; end + + # source://solid_queue//lib/solid_queue.rb#26 + def connects_to=(val); end + + # source://solid_queue//lib/solid_queue.rb#42 + def default_concurrency_control_period; end + + # source://solid_queue//lib/solid_queue.rb#42 + def default_concurrency_control_period=(val); end + + # source://solid_queue//lib/solid_queue.rb#25 + def logger; end + + # source://solid_queue//lib/solid_queue.rb#25 + def logger=(val); end + + # source://solid_queue//lib/solid_queue.rb#26 + def on_thread_error; end + + # source://solid_queue//lib/solid_queue.rb#26 + def on_thread_error=(val); end + + # source://solid_queue//lib/solid_queue.rb#40 + def preserve_finished_jobs; end + + # source://solid_queue//lib/solid_queue.rb#40 + def preserve_finished_jobs=(val); end + + # source://solid_queue//lib/solid_queue.rb#31 + def process_alive_threshold; end + + # source://solid_queue//lib/solid_queue.rb#31 + def process_alive_threshold=(val); end + + # source://solid_queue//lib/solid_queue.rb#30 + def process_heartbeat_interval; end + + # source://solid_queue//lib/solid_queue.rb#30 + def process_heartbeat_interval=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#413 + def railtie_helpers_paths; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#396 + def railtie_namespace; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#417 + def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end + + # source://solid_queue//lib/solid_queue.rb#33 + def shutdown_timeout; end + + # source://solid_queue//lib/solid_queue.rb#33 + def shutdown_timeout=(val); end + + # source://solid_queue//lib/solid_queue.rb#35 + def silence_polling; end + + # source://solid_queue//lib/solid_queue.rb#35 + def silence_polling=(val); end + + # source://solid_queue//lib/solid_queue.rb#38 + def supervisor; end + + # source://solid_queue//lib/solid_queue.rb#38 + def supervisor=(val); end + + # source://solid_queue//lib/solid_queue.rb#37 + def supervisor_pidfile; end + + # source://solid_queue//lib/solid_queue.rb#37 + def supervisor_pidfile=(val); end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#402 + def table_name_prefix; end + + # source://railties/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/rails/engine.rb#409 + def use_relative_model_naming?; end + + # source://solid_queue//lib/solid_queue.rb#28 + def use_skip_locked; end + + # source://solid_queue//lib/solid_queue.rb#28 + def use_skip_locked=(val); end + end +end + +# source://solid_queue//lib/solid_queue/app_executor.rb#4 +module SolidQueue::AppExecutor + # source://solid_queue//lib/solid_queue/app_executor.rb#13 + def handle_thread_error(error); end + + # source://solid_queue//lib/solid_queue/app_executor.rb#5 + def wrap_in_app_executor(&block); end +end + +class SolidQueue::BlockedExecution < ::SolidQueue::Execution + include ::SolidQueue::BlockedExecution::GeneratedAttributeMethods + include ::SolidQueue::BlockedExecution::GeneratedAssociationMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_semaphore(*args); end + + def release; end + + private + + def acquire_concurrency_lock; end + def promote_to_ready; end + def ready_attributes; end + def set_expires_at; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def assumable_attributes_from_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def assumable_attributes_from_job=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def expired(*args, **_arg1); end + + def release_many(concurrency_keys); end + def release_one(concurrency_key); end + def unblock(limit); end + + private + + def releasable(concurrency_keys); end + end +end + +module SolidQueue::BlockedExecution::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_semaphore(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_semaphore(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_semaphore!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_semaphore; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_semaphore; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def semaphore; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def semaphore=(value); end +end + +module SolidQueue::BlockedExecution::GeneratedAttributeMethods; end + +class SolidQueue::ClaimedExecution < ::SolidQueue::Execution + include ::SolidQueue::ClaimedExecution::GeneratedAttributeMethods + include ::SolidQueue::ClaimedExecution::GeneratedAssociationMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_process(*args); end + + def discard; end + def failed_with(error); end + def perform; end + def release; end + + private + + def execute; end + def finished; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + def claiming(job_ids, process_id, &block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def discard_all_from_jobs(*_arg0); end + def discard_all_in_batches(*_arg0); end + def fail_all_with(error); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def orphaned(*args, **_arg1); end + + def release_all; end + end +end + +module SolidQueue::ClaimedExecution::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_process(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_process(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_process!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def process; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def process=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def process_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def process_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_process; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_process; end +end + +module SolidQueue::ClaimedExecution::GeneratedAttributeMethods; end + +class SolidQueue::ClaimedExecution::Result < ::Struct + def success?; end +end + +# source://solid_queue//lib/solid_queue/cli.rb#6 +class SolidQueue::Cli < ::Thor + # source://solid_queue//lib/solid_queue/cli.rb#25 + def start; end + + class << self + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/cli.rb#18 + def exit_on_failure?; end + end +end + +# source://solid_queue//lib/solid_queue/configuration.rb#4 +class SolidQueue::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://solid_queue//lib/solid_queue/configuration.rb#28 + def initialize(**options); end + + # source://solid_queue//lib/solid_queue/configuration.rb#32 + def configured_processes; end + + # source://solid_queue//lib/solid_queue/configuration.rb#39 + def max_number_of_threads; end + + private + + # source://solid_queue//lib/solid_queue/configuration.rb#118 + def config_from(file_or_hash, keys: T.unsafe(nil), fallback: T.unsafe(nil), env: T.unsafe(nil)); end + + # source://solid_queue//lib/solid_queue/configuration.rb#47 + def default_options; end + + # source://solid_queue//lib/solid_queue/configuration.rb#76 + def dispatchers; end + + # source://solid_queue//lib/solid_queue/configuration.rb#95 + def dispatchers_options; end + + # source://solid_queue//lib/solid_queue/configuration.rb#130 + def load_config_from(file_or_hash); end + + # source://solid_queue//lib/solid_queue/configuration.rb#143 + def load_config_from_file(file); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/configuration.rb#61 + def only_dispatch?; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/configuration.rb#57 + def only_work?; end + + # Returns the value of attribute options. + # + # source://solid_queue//lib/solid_queue/configuration.rb#45 + def options; end + + # source://solid_queue//lib/solid_queue/configuration.rb#106 + def processes_config; end + + # source://solid_queue//lib/solid_queue/configuration.rb#100 + def recurring_tasks; end + + # source://solid_queue//lib/solid_queue/configuration.rb#113 + def recurring_tasks_config; end + + # source://solid_queue//lib/solid_queue/configuration.rb#82 + def schedulers; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/configuration.rb#65 + def skip_recurring_tasks?; end + + # source://solid_queue//lib/solid_queue/configuration.rb#69 + def workers; end + + # source://solid_queue//lib/solid_queue/configuration.rb#90 + def workers_options; end +end + +# source://solid_queue//lib/solid_queue/configuration.rb#25 +SolidQueue::Configuration::DEFAULT_CONFIG_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://solid_queue//lib/solid_queue/configuration.rb#26 +SolidQueue::Configuration::DEFAULT_RECURRING_SCHEDULE_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://solid_queue//lib/solid_queue/configuration.rb#18 +SolidQueue::Configuration::DISPATCHER_DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://solid_queue//lib/solid_queue/configuration.rb#5 +class SolidQueue::Configuration::Process < ::Struct + # source://solid_queue//lib/solid_queue/configuration.rb#6 + def instantiate; end +end + +# source://solid_queue//lib/solid_queue/configuration.rb#11 +SolidQueue::Configuration::WORKER_DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://solid_queue//lib/solid_queue.rb#23 +SolidQueue::DEFAULT_LOGGER = T.let(T.unsafe(nil), ActiveSupport::Logger) + +# source://solid_queue//lib/solid_queue/dispatcher.rb#4 +class SolidQueue::Dispatcher < ::SolidQueue::Processes::Poller + # @return [Dispatcher] a new instance of Dispatcher + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#10 + def initialize(**options); end + + # Returns the value of attribute batch_size. + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#5 + def batch_size; end + + # Sets the attribute batch_size + # + # @param value the value to set the attribute batch_size to. + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#5 + def batch_size=(_arg0); end + + # Returns the value of attribute concurrency_maintenance. + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#5 + def concurrency_maintenance; end + + # Sets the attribute concurrency_maintenance + # + # @param value the value to set the attribute concurrency_maintenance to. + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#5 + def concurrency_maintenance=(_arg0); end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#20 + def metadata; end + + private + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/dispatcher.rb#52 + def all_work_completed?; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#30 + def dispatch_next_batch; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#25 + def poll; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#40 + def schedule_recurring_tasks; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#56 + def set_procline; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#36 + def start_concurrency_maintenance; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#44 + def stop_concurrency_maintenance; end + + # source://solid_queue//lib/solid_queue/dispatcher.rb#48 + def unschedule_recurring_tasks; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#4 +class SolidQueue::Dispatcher::ConcurrencyMaintenance + include ::SolidQueue::AppExecutor + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#9 + def initialize(interval, batch_size); end + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#7 + def batch_size; end + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#7 + def interval; end + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#14 + def start; end + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#27 + def stop; end + + private + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#32 + def expire_semaphores; end + + # source://solid_queue//lib/solid_queue/dispatcher/concurrency_maintenance.rb#38 + def unblock_blocked_executions; end +end + +# source://solid_queue//lib/solid_queue/engine.rb#4 +class SolidQueue::Engine < ::Rails::Engine + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +class SolidQueue::Execution < ::SolidQueue::Record + include ::SolidQueue::Execution::GeneratedAttributeMethods + include ::SolidQueue::Execution::GeneratedAssociationMethods + include ::SolidQueue::Execution::JobAttributes + extend ::SolidQueue::Execution::JobAttributes::ClassMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_job(*args); end + + def discard; end + def type; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def assumable_attributes_from_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def assumable_attributes_from_job=(new_value); end + + def assumable_attributes_from_job?; end + def create_all_from_jobs(jobs); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def discard_all_from_jobs(jobs); end + def discard_all_in_batches(batch_size: T.unsafe(nil)); end + def execution_data_from_jobs(jobs); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def ordered(*args, **_arg1); end + + def type; end + + private + + def discard_jobs(job_ids); end + def lock_all_from_jobs(jobs); end + end +end + +module SolidQueue::Execution::Dispatching + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::Execution::Dispatching::ClassMethods +end + +module SolidQueue::Execution::Dispatching::ClassMethods + def dispatch_jobs(job_ids); end +end + +module SolidQueue::Execution::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_job(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_job(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_job!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def job; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def job=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def job_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def job_previously_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_job; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_job; end +end + +module SolidQueue::Execution::GeneratedAttributeMethods; end + +module SolidQueue::Execution::JobAttributes + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::SolidQueue::Execution::JobAttributes::ClassMethods + + private + + def assume_attributes_from_job; end + + module GeneratedClassMethods + def assumable_attributes_from_job; end + def assumable_attributes_from_job=(value); end + def assumable_attributes_from_job?; end + end + + module GeneratedInstanceMethods; end +end + +module SolidQueue::Execution::JobAttributes::ClassMethods + def assumes_attributes_from_job(*attribute_names); end + def attributes_from_job(job); end +end + +class SolidQueue::Execution::UndiscardableError < ::StandardError; end + +class SolidQueue::FailedExecution < ::SolidQueue::Execution + include ::SolidQueue::FailedExecution::GeneratedAttributeMethods + include ::SolidQueue::FailedExecution::GeneratedAssociationMethods + include ::SolidQueue::Execution::Dispatching + extend ::SolidQueue::Execution::Dispatching::ClassMethods + + def backtrace; end + def exception; end + def exception=(_arg0); end + def exception_class; end + def message; end + def retry; end + + private + + def determine_backtrace_size_limit; end + def exception_backtrace; end + def exception_class_name; end + def exception_message; end + def expand_error_details_from_exception; end + def truncate_backtrace(lines, limit); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def retry_all(jobs); end + end +end + +module SolidQueue::FailedExecution::GeneratedAssociationMethods; end +module SolidQueue::FailedExecution::GeneratedAttributeMethods; end +SolidQueue::FailedExecution::JSON_OVERHEAD = T.let(T.unsafe(nil), Integer) + +class SolidQueue::Job < ::SolidQueue::Record + include ::SolidQueue::Job::GeneratedAttributeMethods + include ::SolidQueue::Job::GeneratedAssociationMethods + include ::SolidQueue::Job::Recurrable + include ::SolidQueue::Job::Clearable + include ::SolidQueue::Job::Executable + include ::SolidQueue::Job::Retryable + include ::SolidQueue::Job::Schedulable + include ::SolidQueue::Job::ConcurrencyControls + extend ::SolidQueue::Job::Clearable::ClassMethods + extend ::SolidQueue::Job::Executable::ClassMethods + extend ::SolidQueue::Job::Schedulable::ClassMethods + extend ::SolidQueue::Job::ConcurrencyControls::ClassMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_blocked_execution(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_claimed_execution(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_failed_execution(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_ready_execution(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_recurring_execution(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_scheduled_execution(*args); end + + def concurrency_duration(*_arg0, **_arg1, &_arg2); end + def concurrency_limit(*_arg0, **_arg1, &_arg2); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def clearable(*args, **_arg1); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def enqueue(active_job, scheduled_at: T.unsafe(nil)); end + def enqueue_all(active_jobs); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def failed(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def finished(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def scheduled(*args, **_arg1); end + + private + + def attributes_from_active_job(active_job); end + def create_all_from_active_jobs(active_jobs); end + def create_from_active_job(active_job); end + end +end + +module SolidQueue::Job::Clearable + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::Job::Clearable::ClassMethods +end + +module SolidQueue::Job::Clearable::ClassMethods + def clear_finished_in_batches(batch_size: T.unsafe(nil), finished_before: T.unsafe(nil), class_name: T.unsafe(nil)); end +end + +module SolidQueue::Job::ConcurrencyControls + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::Job::ConcurrencyControls::ClassMethods + + def blocked?; end + def concurrency_limited?; end + def unblock_next_blocked_job; end + + private + + def acquire_concurrency_lock; end + def block; end + def execution; end + def job_class; end + def release_concurrency_lock; end + def release_next_blocked_job; end +end + +module SolidQueue::Job::ConcurrencyControls::ClassMethods + def release_all_concurrency_locks(jobs); end +end + +class SolidQueue::Job::EnqueueError < ::StandardError; end + +module SolidQueue::Job::Executable + extend ::ActiveSupport::Concern + + def claimed?; end + def discard; end + def dispatch; end + def dispatch_bypassing_concurrency_limits; end + def failed?; end + def finished!; end + def finished?; end + def prepare_for_execution; end + def ready?; end + def status; end + + private + + def execution; end + def ready; end +end + +module SolidQueue::Job::Executable::ClassMethods + def dispatch_all(jobs); end + def prepare_all_for_execution(jobs); end + + private + + def dispatch_all_at_once(jobs); end + def dispatch_all_one_by_one(jobs); end + def dispatched_and_blocked(jobs); end + def dispatched_and_ready(jobs); end + def successfully_dispatched(jobs); end +end + +module SolidQueue::Job::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def blocked_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def blocked_execution=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_blocked_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_claimed_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_failed_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_ready_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_recurring_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_scheduled_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def claimed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def claimed_execution=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_blocked_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_blocked_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_claimed_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_claimed_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_failed_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_failed_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_ready_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_ready_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_recurring_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_recurring_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_scheduled_execution(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_scheduled_execution!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def failed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def failed_execution=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def ready_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def ready_execution=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def recurring_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def recurring_execution=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_blocked_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_claimed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_failed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_ready_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_recurring_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_scheduled_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_blocked_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_claimed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_failed_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_ready_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_recurring_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_scheduled_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def scheduled_execution; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def scheduled_execution=(value); end +end + +module SolidQueue::Job::GeneratedAttributeMethods; end + +module SolidQueue::Job::Recurrable + extend ::ActiveSupport::Concern +end + +module SolidQueue::Job::Retryable + extend ::ActiveSupport::Concern + + def failed_with(exception); end + def reset_execution_counters; end + def retry; end +end + +module SolidQueue::Job::Schedulable + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::Job::Schedulable::ClassMethods + + def due?; end + def scheduled?; end + + private + + def execution; end + def schedule; end +end + +module SolidQueue::Job::Schedulable::ClassMethods + def schedule_all(jobs); end + + private + + def schedule_all_at_once(jobs); end + def successfully_scheduled(jobs); end +end + +# source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#4 +module SolidQueue::LifecycleHooks + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::LifecycleHooks::ClassMethods + + private + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#35 + def run_hooks_for(event); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#27 + def run_start_hooks; end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#31 + def run_stop_hooks; end +end + +# source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#0 +module SolidQueue::LifecycleHooks::ClassMethods + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#20 + def clear_hooks; end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#12 + def on_start(&block); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#16 + def on_stop(&block); end +end + +# source://solid_queue//lib/solid_queue/log_subscriber.rb#5 +class SolidQueue::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://solid_queue//lib/solid_queue/log_subscriber.rb#10 + def claim(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#101 + def deregister_process(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#38 + def discard(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#34 + def discard_all(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#6 + def dispatch_scheduled(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#50 + def enqueue_recurring_task(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#18 + def fail_many_claimed(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#129 + def graceful_termination(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#139 + def immediate_termination(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#121 + def prune_processes(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#90 + def register_process(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#46 + def release_blocked(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#22 + def release_claimed(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#42 + def release_many_blocked(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#14 + def release_many_claimed(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#147 + def replace_fork(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#30 + def retry(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#26 + def retry_all(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#77 + def shutdown_process(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#64 + def start_process(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#125 + def thread_error(event); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#143 + def unhandled_signal_error(event); end + + private + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#168 + def formatted_attributes(**attributes); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#172 + def formatted_error(error); end + + # source://solid_queue//lib/solid_queue/log_subscriber.rb#164 + def formatted_event(event, action:, **attributes); end + + # Use the logger configured for SolidQueue + # + # source://solid_queue//lib/solid_queue/log_subscriber.rb#177 + def logger; end +end + +class SolidQueue::Pause < ::SolidQueue::Record + include ::SolidQueue::Pause::GeneratedAttributeMethods + include ::SolidQueue::Pause::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + end +end + +module SolidQueue::Pause::GeneratedAssociationMethods; end +module SolidQueue::Pause::GeneratedAttributeMethods; end + +# source://solid_queue//lib/solid_queue/pool.rb#4 +class SolidQueue::Pool + include ::SolidQueue::AppExecutor + + # @return [Pool] a new instance of Pool + # + # source://solid_queue//lib/solid_queue/pool.rb#11 + def initialize(size, on_idle: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/pool.rb#41 + def idle?; end + + # source://solid_queue//lib/solid_queue/pool.rb#37 + def idle_threads; end + + # source://solid_queue//lib/solid_queue/pool.rb#18 + def post(execution); end + + # source://solid_queue//lib/solid_queue/pool.rb#9 + def shutdown(*_arg0, **_arg1, &_arg2); end + + # source://solid_queue//lib/solid_queue/pool.rb#9 + def shutdown?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute size. + # + # source://solid_queue//lib/solid_queue/pool.rb#7 + def size; end + + # source://solid_queue//lib/solid_queue/pool.rb#9 + def wait_for_termination(*_arg0, **_arg1, &_arg2); end + + private + + # Returns the value of attribute available_threads. + # + # source://solid_queue//lib/solid_queue/pool.rb#46 + def available_threads; end + + # source://solid_queue//lib/solid_queue/pool.rb#54 + def executor; end + + # Returns the value of attribute mutex. + # + # source://solid_queue//lib/solid_queue/pool.rb#46 + def mutex; end + + # Returns the value of attribute on_idle. + # + # source://solid_queue//lib/solid_queue/pool.rb#46 + def on_idle; end +end + +# source://solid_queue//lib/solid_queue/pool.rb#48 +SolidQueue::Pool::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +class SolidQueue::Process < ::SolidQueue::Record + include ::SolidQueue::Process::GeneratedAttributeMethods + include ::SolidQueue::Process::GeneratedAssociationMethods + include ::SolidQueue::Process::Prunable + include ::SolidQueue::Process::Executor + extend ::SolidQueue::Process::Prunable::ClassMethods + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_claimed_executions(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_supervisees(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def autosave_associated_records_for_supervisor(*args); end + + def deregister(pruned: T.unsafe(nil)); end + def heartbeat; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_claimed_executions(*args); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/autosave_association.rb#162 + def validate_associated_records_for_supervisees(*args); end + + private + + def supervised?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _reflections; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def prunable(*args, **_arg1); end + + def register(**attributes); end + end +end + +module SolidQueue::Process::Executor + extend ::ActiveSupport::Concern + + def fail_all_claimed_executions_with(error); end + def release_all_claimed_executions; end + + private + + def claims_executions?; end +end + +module SolidQueue::Process::GeneratedAssociationMethods + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#32 + def build_supervisor(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def claimed_execution_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def claimed_execution_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def claimed_executions; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def claimed_executions=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#36 + def create_supervisor(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#40 + def create_supervisor!(*args, &block); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#19 + def reload_supervisor; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/singular_association.rb#23 + def reset_supervisor; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#62 + def supervisee_ids; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/collection_association.rb#72 + def supervisee_ids=(ids); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def supervisees; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def supervisees=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#104 + def supervisor; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/association.rb#112 + def supervisor=(value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#146 + def supervisor_changed?; end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/associations/builder/belongs_to.rb#150 + def supervisor_previously_changed?; end +end + +module SolidQueue::Process::GeneratedAttributeMethods; end + +module SolidQueue::Process::Prunable + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::SolidQueue::Process::Prunable::ClassMethods + + def prune; end +end + +module SolidQueue::Process::Prunable::ClassMethods + def prune(excluding: T.unsafe(nil)); end +end + +# source://solid_queue//lib/solid_queue/supervisor.rb#0 +module SolidQueue::Processes; end + +# source://solid_queue//lib/solid_queue/processes/base.rb#5 +class SolidQueue::Processes::Base + include ::SolidQueue::Processes::Callbacks + include ::ActiveSupport::Callbacks + include ::SolidQueue::Processes::Procline + include ::SolidQueue::Processes::Interruptible + include ::SolidQueue::Processes::Registrable + include ::SolidQueue::AppExecutor + extend ::ActiveModel::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # @return [Base] a new instance of Base + # + # source://solid_queue//lib/solid_queue/processes/base.rb#11 + def initialize(*_arg0); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#69 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _boot_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_boot_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#911 + def _run_shutdown_callbacks(&block); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#923 + def _shutdown_callbacks; end + + # source://solid_queue//lib/solid_queue/processes/base.rb#20 + def hostname; end + + # source://solid_queue//lib/solid_queue/processes/base.rb#16 + def kind; end + + # source://solid_queue//lib/solid_queue/processes/base.rb#28 + def metadata; end + + # Returns the value of attribute name. + # + # source://solid_queue//lib/solid_queue/processes/base.rb#9 + def name; end + + # source://solid_queue//lib/solid_queue/processes/base.rb#24 + def pid; end + + # source://solid_queue//lib/solid_queue/processes/base.rb#32 + def stop; end + + private + + # source://solid_queue//lib/solid_queue/processes/base.rb#37 + def generate_name; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/base.rb#41 + def stopped?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _boot_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _boot_callbacks=(value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#915 + def _shutdown_callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/callbacks.rb#919 + def _shutdown_callbacks=(value); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_boot(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#144 + def after_shutdown(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_boot(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#137 + def around_shutdown(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_boot(*args, **options, &block); end + + # source://activemodel/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_model/callbacks.rb#130 + def before_shutdown(*args, **options, &block); end + end +end + +# source://solid_queue//lib/solid_queue/processes/callbacks.rb#4 +module SolidQueue::Processes::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::Callbacks + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://solid_queue//lib/solid_queue/processes/interruptible.rb#4 +module SolidQueue::Processes::Interruptible + # source://solid_queue//lib/solid_queue/processes/interruptible.rb#5 + def wake_up; end + + private + + # source://solid_queue//lib/solid_queue/processes/interruptible.rb#32 + def create_self_pipe; end + + # source://solid_queue//lib/solid_queue/processes/interruptible.rb#12 + def interrupt; end + + # source://solid_queue//lib/solid_queue/processes/interruptible.rb#20 + def interruptible_sleep(time); end + + # Self-pipe for signal-handling (http://cr.yp.to/docs/selfpipe.html) + # + # source://solid_queue//lib/solid_queue/processes/interruptible.rb#28 + def self_pipe; end +end + +# source://solid_queue//lib/solid_queue/processes/interruptible.rb#10 +SolidQueue::Processes::Interruptible::SELF_PIPE_BLOCK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://solid_queue//lib/solid_queue/processes/poller.rb#4 +class SolidQueue::Processes::Poller < ::SolidQueue::Processes::Base + include ::SolidQueue::Processes::Supervised + include ::SolidQueue::Processes::Runnable + + # @return [Poller] a new instance of Poller + # + # source://solid_queue//lib/solid_queue/processes/poller.rb#9 + def initialize(polling_interval:, **options); end + + # source://solid_queue//lib/solid_queue/processes/poller.rb#15 + def metadata; end + + # Returns the value of attribute polling_interval. + # + # source://solid_queue//lib/solid_queue/processes/poller.rb#7 + def polling_interval; end + + # Sets the attribute polling_interval + # + # @param value the value to set the attribute polling_interval to. + # + # source://solid_queue//lib/solid_queue/processes/poller.rb#7 + def polling_interval=(_arg0); end + + private + + # @raise [NotImplementedError] + # + # source://solid_queue//lib/solid_queue/processes/poller.rb#40 + def poll; end + + # source://solid_queue//lib/solid_queue/processes/poller.rb#20 + def run; end + + # source://solid_queue//lib/solid_queue/processes/poller.rb#24 + def start_loop; end + + # source://solid_queue//lib/solid_queue/processes/poller.rb#44 + def with_polling_volume; end +end + +# source://solid_queue//lib/solid_queue/processes/process_exit_error.rb#5 +class SolidQueue::Processes::ProcessExitError < ::RuntimeError + # @return [ProcessExitError] a new instance of ProcessExitError + # + # source://solid_queue//lib/solid_queue/processes/process_exit_error.rb#6 + def initialize(status); end +end + +# source://solid_queue//lib/solid_queue/processes/process_missing_error.rb#3 +class SolidQueue::Processes::ProcessMissingError < ::RuntimeError + # @return [ProcessMissingError] a new instance of ProcessMissingError + # + # source://solid_queue//lib/solid_queue/processes/process_missing_error.rb#4 + def initialize; end +end + +# source://solid_queue//lib/solid_queue/processes/process_pruned_error.rb#5 +class SolidQueue::Processes::ProcessPrunedError < ::RuntimeError + # @return [ProcessPrunedError] a new instance of ProcessPrunedError + # + # source://solid_queue//lib/solid_queue/processes/process_pruned_error.rb#6 + def initialize(last_heartbeat_at); end +end + +# source://solid_queue//lib/solid_queue/processes/procline.rb#4 +module SolidQueue::Processes::Procline + # Sets the procline ($0) + # solid-queue-supervisor(0.1.0): + # + # source://solid_queue//lib/solid_queue/processes/procline.rb#7 + def procline(string); end +end + +# source://solid_queue//lib/solid_queue/processes/registrable.rb#4 +module SolidQueue::Processes::Registrable + extend ::ActiveSupport::Concern + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#14 + def process_id; end + + private + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#31 + def deregister; end + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#55 + def heartbeat; end + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#39 + def launch_heartbeat; end + + # Returns the value of attribute process. + # + # source://solid_queue//lib/solid_queue/processes/registrable.rb#19 + def process; end + + # Sets the attribute process + # + # @param value the value to set the attribute process to. + # + # source://solid_queue//lib/solid_queue/processes/registrable.rb#19 + def process=(_arg0); end + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#21 + def register; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/registrable.rb#35 + def registered?; end + + # source://solid_queue//lib/solid_queue/processes/registrable.rb#51 + def stop_heartbeat; end +end + +# source://solid_queue//lib/solid_queue/processes/runnable.rb#4 +module SolidQueue::Processes::Runnable + include ::SolidQueue::Processes::Supervised + + # Sets the attribute mode + # + # @param value the value to set the attribute mode to. + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#7 + def mode=(_arg0); end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#9 + def start; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#19 + def stop; end + + # source://solid_queue//lib/solid_queue/processes/supervised.rb#8 + def supervisor; end + + private + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#60 + def all_work_completed?; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#33 + def boot; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#83 + def create_thread(&block); end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#56 + def finished?; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#29 + def mode; end + + # @raise [NotImplementedError] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#52 + def run; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#78 + def running_as_fork?; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#74 + def running_async?; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#70 + def running_inline?; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#67 + def set_procline; end + + # source://solid_queue//lib/solid_queue/processes/runnable.rb#64 + def shutdown; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/runnable.rb#48 + def shutting_down?; end +end + +# source://solid_queue//lib/solid_queue/processes/runnable.rb#27 +SolidQueue::Processes::Runnable::DEFAULT_MODE = T.let(T.unsafe(nil), Symbol) + +# source://solid_queue//lib/solid_queue/processes/supervised.rb#4 +module SolidQueue::Processes::Supervised + extend ::ActiveSupport::Concern + + # source://solid_queue//lib/solid_queue/processes/supervised.rb#11 + def supervised_by(process); end + + private + + # source://solid_queue//lib/solid_queue/processes/supervised.rb#28 + def register_signal_handlers; end + + # source://solid_queue//lib/solid_queue/processes/supervised.rb#16 + def set_procline; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/supervised.rb#24 + def supervised?; end + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/processes/supervised.rb#20 + def supervisor_went_away?; end +end + +class SolidQueue::Queue + def initialize(name); end + + def ==(queue); end + def clear; end + def eql?(queue); end + def hash; end + def name; end + def name=(_arg0); end + def pause; end + def paused?; end + def resume; end + def size; end + + class << self + def all; end + def find_by_name(name); end + end +end + +class SolidQueue::QueueSelector + def initialize(queue_list, relation); end + + def raw_queues; end + def relation; end + def scoped_relations; end + + private + + def all?; end + def all_queues; end + def eligible_queues; end + def exact_names; end + def include_all_queues?; end + def none?; end + def paused_queues; end + def prefixed_names; end + def prefixes; end + def queue_names; end +end + +class SolidQueue::ReadyExecution < ::SolidQueue::Execution + include ::SolidQueue::ReadyExecution::GeneratedAttributeMethods + include ::SolidQueue::ReadyExecution::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + def aggregated_count_across(queue_list); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def assumable_attributes_from_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def assumable_attributes_from_job=(new_value); end + + def claim(queue_list, limit, process_id); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def queued_as(*args, **_arg1); end + + private + + def discard_jobs(job_ids); end + def lock_candidates(executions, process_id); end + def select_and_lock(queue_relation, process_id, limit); end + def select_candidates(queue_relation, limit); end + end +end + +module SolidQueue::ReadyExecution::GeneratedAssociationMethods; end +module SolidQueue::ReadyExecution::GeneratedAttributeMethods; end + +class SolidQueue::Record < ::ActiveRecord::Base + include ::SolidQueue::Record::GeneratedAttributeMethods + include ::SolidQueue::Record::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def non_blocking_lock; end + end +end + +module SolidQueue::Record::GeneratedAssociationMethods; end +module SolidQueue::Record::GeneratedAttributeMethods; end + +class SolidQueue::RecurringExecution < ::SolidQueue::Execution + include ::SolidQueue::RecurringExecution::GeneratedAttributeMethods + include ::SolidQueue::RecurringExecution::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + def clear_in_batches(batch_size: T.unsafe(nil)); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def clearable(*args, **_arg1); end + + def create_or_insert!(**attributes); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def record(task_key, run_at, &block); end + end +end + +class SolidQueue::RecurringExecution::AlreadyRecorded < ::StandardError; end +module SolidQueue::RecurringExecution::GeneratedAssociationMethods; end +module SolidQueue::RecurringExecution::GeneratedAttributeMethods; end + +class SolidQueue::RecurringJob < ::ActiveJob::Base + def perform(command); end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + end +end + +class SolidQueue::RecurringTask < ::SolidQueue::Record + include ::SolidQueue::RecurringTask::GeneratedAttributeMethods + include ::SolidQueue::RecurringTask::GeneratedAssociationMethods + + def attributes_for_upsert; end + def default_job_class; end + def default_job_class=(val); end + def delay_from_now; end + def enqueue(at:); end + def next_time; end + def to_s; end + + private + + def arguments_with_kwargs; end + def enqueue_and_record(run_at:); end + def enqueue_options; end + def ensure_command_or_class_present; end + def existing_job_class; end + def job_class; end + def parsed_schedule; end + def perform_later; end + def supported_schedule; end + def using_solid_queue_adapter?; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + def create_or_update_all(tasks); end + def default_job_class; end + def default_job_class=(val); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def from_configuration(key, **options); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def static(*args, **_arg1); end + + def wrap(args); end + end +end + +class SolidQueue::RecurringTask::Arguments + class << self + def dump(data); end + def load(data); end + end +end + +module SolidQueue::RecurringTask::GeneratedAssociationMethods; end +module SolidQueue::RecurringTask::GeneratedAttributeMethods; end + +class SolidQueue::ScheduledExecution < ::SolidQueue::Execution + include ::SolidQueue::ScheduledExecution::GeneratedAttributeMethods + include ::SolidQueue::ScheduledExecution::GeneratedAssociationMethods + include ::SolidQueue::Execution::Dispatching + extend ::SolidQueue::Execution::Dispatching::ClassMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def assumable_attributes_from_job; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def assumable_attributes_from_job=(new_value); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + def dispatch_next_batch(batch_size); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def due(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def next_batch(*args, **_arg1); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def ordered(*args, **_arg1); end + end +end + +module SolidQueue::ScheduledExecution::GeneratedAssociationMethods; end +module SolidQueue::ScheduledExecution::GeneratedAttributeMethods; end + +# source://solid_queue//lib/solid_queue/scheduler.rb#4 +class SolidQueue::Scheduler < ::SolidQueue::Processes::Base + include ::SolidQueue::Processes::Supervised + include ::SolidQueue::Processes::Runnable + + # @return [Scheduler] a new instance of Scheduler + # + # source://solid_queue//lib/solid_queue/scheduler.rb#12 + def initialize(recurring_tasks:, **options); end + + # source://solid_queue//lib/solid_queue/scheduler.rb#18 + def metadata; end + + # Returns the value of attribute recurring_schedule. + # + # source://solid_queue//lib/solid_queue/scheduler.rb#7 + def recurring_schedule; end + + # Sets the attribute recurring_schedule + # + # @param value the value to set the attribute recurring_schedule to. + # + # source://solid_queue//lib/solid_queue/scheduler.rb#7 + def recurring_schedule=(_arg0); end + + private + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/scheduler.rb#45 + def all_work_completed?; end + + # source://solid_queue//lib/solid_queue/scheduler.rb#25 + def run; end + + # source://solid_queue//lib/solid_queue/scheduler.rb#37 + def schedule_recurring_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler.rb#49 + def set_procline; end + + # source://solid_queue//lib/solid_queue/scheduler.rb#41 + def unschedule_recurring_tasks; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + end +end + +# source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#4 +class SolidQueue::Scheduler::RecurringSchedule + include ::SolidQueue::AppExecutor + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#9 + def initialize(tasks); end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#7 + def configured_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#14 + def empty?; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#29 + def schedule_task(task); end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#18 + def schedule_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#7 + def scheduled_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#38 + def task_keys; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#33 + def unschedule_tasks; end + + private + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#43 + def persist_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#47 + def reload_tasks; end + + # source://solid_queue//lib/solid_queue/scheduler/recurring_schedule.rb#51 + def schedule(task); end +end + +# Right now it doesn't matter, can be set to 1 in the future for dynamic tasks +# +# source://solid_queue//lib/solid_queue/scheduler.rb#23 +SolidQueue::Scheduler::SLEEP_INTERVAL = T.let(T.unsafe(nil), Integer) + +class SolidQueue::Semaphore < ::SolidQueue::Record + include ::SolidQueue::Semaphore::GeneratedAttributeMethods + include ::SolidQueue::Semaphore::GeneratedAssociationMethods + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def _validators; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def available(*args, **_arg1); end + + def create_unique_by(attributes); end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def defined_enums; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_record/scoping/named.rb#174 + def expired(*args, **_arg1); end + + def signal(job); end + def signal_all(jobs); end + def wait(job); end + end +end + +module SolidQueue::Semaphore::GeneratedAssociationMethods; end +module SolidQueue::Semaphore::GeneratedAttributeMethods; end + +class SolidQueue::Semaphore::Proxy + def initialize(job); end + + def signal; end + def wait; end + + private + + def attempt_creation; end + def attempt_decrement; end + def attempt_increment; end + def check_limit_or_decrement; end + def expires_at; end + def job; end + def job=(_arg0); end + def key; end + def limit; end + + class << self + def signal_all(jobs); end + end +end + +# source://solid_queue//lib/solid_queue/supervisor.rb#4 +class SolidQueue::Supervisor < ::SolidQueue::Processes::Base + include ::SolidQueue::LifecycleHooks + include ::SolidQueue::Supervisor::Pidfiled + include ::SolidQueue::Supervisor::Signals + include ::SolidQueue::Supervisor::Maintenance + extend ::SolidQueue::LifecycleHooks::ClassMethods + + # @return [Supervisor] a new instance of Supervisor + # + # source://solid_queue//lib/solid_queue/supervisor.rb#21 + def initialize(configuration); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#8 + def lifecycle_hooks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#29 + def start; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#39 + def stop; end + + private + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/supervisor.rb#180 + def all_forks_terminated?; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#47 + def boot; end + + # Returns the value of attribute configuration. + # + # source://solid_queue//lib/solid_queue/supervisor.rb#45 + def configuration; end + + # Returns the value of attribute configured_processes. + # + # source://solid_queue//lib/solid_queue/supervisor.rb#45 + def configured_processes; end + + # Returns the value of attribute forks. + # + # source://solid_queue//lib/solid_queue/supervisor.rb#45 + def forks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#173 + def handle_claimed_jobs_by(terminated_fork, status); end + + # source://solid_queue//lib/solid_queue/supervisor.rb#134 + def quit_forks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#138 + def reap_and_replace_terminated_forks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#147 + def reap_terminated_forks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#162 + def replace_fork(pid, status); end + + # source://solid_queue//lib/solid_queue/supervisor.rb#89 + def set_procline; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#114 + def shutdown; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#75 + def start_process(configured_process); end + + # source://solid_queue//lib/solid_queue/supervisor.rb#55 + def start_processes; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#59 + def supervise; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#126 + def supervised_processes; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#122 + def sync_std_streams; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#130 + def term_forks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#93 + def terminate_gracefully; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#108 + def terminate_immediately; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#8 + def lifecycle_hooks; end + + # source://solid_queue//lib/solid_queue/supervisor.rb#9 + def start(**options); end + end +end + +# source://solid_queue//lib/solid_queue/supervisor/maintenance.rb#2 +module SolidQueue::Supervisor::Maintenance + extend ::ActiveSupport::Concern + + private + + # source://solid_queue//lib/solid_queue/supervisor/maintenance.rb#30 + def fail_orphaned_executions; end + + # source://solid_queue//lib/solid_queue/supervisor/maintenance.rb#10 + def launch_maintenance_task; end + + # source://solid_queue//lib/solid_queue/supervisor/maintenance.rb#26 + def prune_dead_processes; end + + # source://solid_queue//lib/solid_queue/supervisor/maintenance.rb#22 + def stop_maintenance_task; end +end + +# source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#4 +class SolidQueue::Supervisor::Pidfile + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#5 + def initialize(path); end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#16 + def delete; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#10 + def setup; end + + private + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#54 + def already_running!; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#23 + def check_status; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#50 + def delete_file; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#21 + def path; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#21 + def pid; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#46 + def set_at_exit_hook; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfile.rb#39 + def write_file; end +end + +# source://solid_queue//lib/solid_queue/supervisor/pidfiled.rb#5 +module SolidQueue::Supervisor::Pidfiled + extend ::ActiveSupport::Concern + + private + + # source://solid_queue//lib/solid_queue/supervisor/pidfiled.rb#20 + def delete_pidfile; end + + # source://solid_queue//lib/solid_queue/supervisor/pidfiled.rb#14 + def setup_pidfile; end +end + +# source://solid_queue//lib/solid_queue/supervisor/signals.rb#5 +module SolidQueue::Supervisor::Signals + extend ::ActiveSupport::Concern + + private + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#37 + def handle_signal(signal); end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#31 + def process_signal_queue; end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#16 + def register_signal_handlers; end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#25 + def restore_default_signal_handlers; end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#56 + def signal_process(pid, signal); end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#50 + def signal_processes(pids, signal); end + + # source://solid_queue//lib/solid_queue/supervisor/signals.rb#62 + def signal_queue; end +end + +# source://solid_queue//lib/solid_queue/supervisor/signals.rb#14 +SolidQueue::Supervisor::Signals::SIGNALS = T.let(T.unsafe(nil), Array) + +# source://solid_queue//lib/solid_queue/timer.rb#4 +module SolidQueue::Timer + extend ::SolidQueue::Timer + + # source://solid_queue//lib/solid_queue/timer.rb#7 + def wait_until(timeout, condition, &block); end + + private + + # source://solid_queue//lib/solid_queue/timer.rb#24 + def monotonic_time_now; end +end + +# source://solid_queue//lib/solid_queue/version.rb#2 +SolidQueue::VERSION = T.let(T.unsafe(nil), String) + +# source://solid_queue//lib/solid_queue/worker.rb#4 +class SolidQueue::Worker < ::SolidQueue::Processes::Poller + include ::SolidQueue::LifecycleHooks + extend ::SolidQueue::LifecycleHooks::ClassMethods + + # @return [Worker] a new instance of Worker + # + # source://solid_queue//lib/solid_queue/worker.rb#12 + def initialize(**options); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#8 + def lifecycle_hooks; end + + # source://solid_queue//lib/solid_queue/worker.rb#21 + def metadata; end + + # Returns the value of attribute pool. + # + # source://solid_queue//lib/solid_queue/worker.rb#10 + def pool; end + + # Sets the attribute pool + # + # @param value the value to set the attribute pool to. + # + # source://solid_queue//lib/solid_queue/worker.rb#10 + def pool=(_arg0); end + + # Returns the value of attribute queues. + # + # source://solid_queue//lib/solid_queue/worker.rb#10 + def queues; end + + # Sets the attribute queues + # + # @param value the value to set the attribute queues to. + # + # source://solid_queue//lib/solid_queue/worker.rb#10 + def queues=(_arg0); end + + private + + # @return [Boolean] + # + # source://solid_queue//lib/solid_queue/worker.rb#49 + def all_work_completed?; end + + # source://solid_queue//lib/solid_queue/worker.rb#36 + def claim_executions; end + + # source://solid_queue//lib/solid_queue/worker.rb#26 + def poll; end + + # source://solid_queue//lib/solid_queue/worker.rb#53 + def set_procline; end + + # source://solid_queue//lib/solid_queue/worker.rb#42 + def shutdown; end + + class << self + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1-15ddce90583bdf169ae69449b42db10be9f714c9/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://solid_queue//lib/solid_queue/lifecycle_hooks.rb#8 + def lifecycle_hooks; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/spoom@1.3.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/spoom@1.3.2.rbi new file mode 100644 index 0000000..34567e8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/spoom@1.3.2.rbi @@ -0,0 +1,4421 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `spoom` gem. +# Please instead update this file by running `bin/tapioca gem spoom`. + + +# source://spoom//lib/spoom.rb#7 +module Spoom; end + +# source://spoom//lib/spoom/cli/helper.rb#9 +module Spoom::Cli; end + +# source://spoom//lib/spoom/cli/deadcode.rb#8 +class Spoom::Cli::Deadcode < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/deadcode.rb#52 + sig { params(paths: ::String).void } + def deadcode(*paths); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/deadcode.rb#150 + def remove(location_string); end +end + +# source://spoom//lib/spoom/cli/helper.rb#10 +module Spoom::Cli::Helper + include ::Spoom::Colorize + + requires_ancestor { Thor } + + # source://spoom//lib/spoom/cli/helper.rb#139 + sig { params(string: ::String).returns(::String) } + def blue(string); end + + # Is the `--color` option true? + # + # source://spoom//lib/spoom/cli/helper.rb#103 + sig { returns(T::Boolean) } + def color?; end + + # Colorize a string if `color?` + # + # source://spoom//lib/spoom/cli/helper.rb#132 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Returns the context at `--path` (by default the current working directory) + # + # source://spoom//lib/spoom/cli/helper.rb#71 + sig { returns(::Spoom::Context) } + def context; end + + # Raise if `spoom` is not ran inside a context with a `sorbet/config` file + # + # source://spoom//lib/spoom/cli/helper.rb#77 + sig { returns(::Spoom::Context) } + def context_requiring_sorbet!; end + + # source://spoom//lib/spoom/cli/helper.rb#144 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # Return the path specified through `--path` + # + # source://spoom//lib/spoom/cli/helper.rb#92 + sig { returns(::String) } + def exec_path; end + + # source://spoom//lib/spoom/cli/helper.rb#149 + sig { params(string: ::String).returns(::String) } + def gray(string); end + + # source://spoom//lib/spoom/cli/helper.rb#154 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # source://spoom//lib/spoom/cli/helper.rb#108 + sig { params(string: ::String).returns(::String) } + def highlight(string); end + + # source://spoom//lib/spoom/cli/helper.rb#159 + sig { params(string: ::String).returns(::String) } + def red(string); end + + # Print `message` on `$stdout` + # + # source://spoom//lib/spoom/cli/helper.rb#20 + sig { params(message: ::String).void } + def say(message); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Error`). + # + # source://spoom//lib/spoom/cli/helper.rb#39 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Warning`). + # + # source://spoom//lib/spoom/cli/helper.rb#59 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#164 + sig { params(string: ::String).returns(::String) } + def yellow(string); end +end + +# source://spoom//lib/spoom/cli.rb#12 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#101 + def __print_version; end + + # source://spoom//lib/spoom/cli.rb#58 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli.rb#65 + def coverage(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def deadcode(*args); end + + # source://spoom//lib/spoom/cli.rb#75 + def lsp(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def srb(*args); end + + # source://spoom//lib/spoom/cli.rb#94 + def tc(*paths_to_select); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#108 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli.rb#81 +Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli.rb#83 +Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli.rb#82 +Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/bump.rb#9 +module Spoom::Cli::Srb; end + +# source://spoom//lib/spoom/cli/srb/bump.rb#10 +class Spoom::Cli::Srb::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/bump.rb#50 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#171 + def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#193 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#10 +class Spoom::Cli::Srb::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/coverage.rb#199 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#211 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#174 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#190 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#143 + def report; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#21 + def snapshot; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#43 + def timeline; end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#13 +Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/lsp.rb#11 +class Spoom::Cli::Srb::LSP < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#45 + def defs(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#55 + def find(query); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#31 + def hover(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#16 + def list; end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#104 + def lsp_client; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#75 + def refs(file, line, col); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#127 + def run(&block); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#85 + def sigs(file, line, col); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#119 + def symbol_printer; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#65 + def symbols(file); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#152 + def to_uri(path); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#95 + def types(file, line, col); end +end + +# source://spoom//lib/spoom/cli/srb.rb#12 +class Spoom::Cli::Srb::Main < ::Thor + # source://thor/1.3.2/lib/thor.rb#334 + def bump(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def coverage(*args); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://thor/1.3.2/lib/thor.rb#334 + def lsp(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def tc(*args); end +end + +# source://spoom//lib/spoom/cli/srb/tc.rb#7 +class Spoom::Cli::Srb::Tc < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/tc.rb#132 + def colorize_message(message); end + + # source://spoom//lib/spoom/cli/srb/tc.rb#123 + def format_error(error, format); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/tc.rb#27 + def tc(*paths_to_select); end +end + +# source://spoom//lib/spoom/cli/srb/tc.rb#16 +Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/tc.rb#12 +Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/tc.rb#14 +Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli/srb/tc.rb#13 +Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/colors.rb#5 +class Spoom::Color < ::T::Enum + enums do + CLEAR = new + BOLD = new + BLACK = new + RED = new + GREEN = new + YELLOW = new + BLUE = new + MAGENTA = new + CYAN = new + WHITE = new + LIGHT_BLACK = new + LIGHT_RED = new + LIGHT_GREEN = new + LIGHT_YELLOW = new + LIGHT_BLUE = new + LIGHT_MAGENTA = new + LIGHT_CYAN = new + LIGHT_WHITE = new + end + + # source://spoom//lib/spoom/colors.rb#32 + sig { returns(::String) } + def ansi_code; end +end + +# source://spoom//lib/spoom/colors.rb#37 +module Spoom::Colorize + # source://spoom//lib/spoom/colors.rb#41 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def set_color(string, *color); end +end + +# An abstraction to a Ruby project context +# +# A context maps to a directory in the file system. +# It is used to manipulate files and run commands in the context of this directory. +# +# source://spoom//lib/spoom/context/bundle.rb#5 +class Spoom::Context + include ::Spoom::Context::Bundle + include ::Spoom::Context::Exec + include ::Spoom::Context::FileSystem + include ::Spoom::Context::Git + include ::Spoom::Context::Sorbet + + # Create a new context about `absolute_path` + # + # The directory will not be created if it doesn't exist. + # Call `#make!` to create it. + # + # source://spoom//lib/spoom/context.rb#51 + sig { params(absolute_path: ::String).void } + def initialize(absolute_path); end + + # The absolute path to the directory this context is about + # + # source://spoom//lib/spoom/context.rb#44 + sig { returns(::String) } + def absolute_path; end + + class << self + # Create a new context in the system's temporary directory + # + # `name` is used as prefix to the temporary directory name. + # The directory will be created if it doesn't exist. + # + # source://spoom//lib/spoom/context.rb#37 + sig { params(name: T.nilable(::String)).returns(T.attached_class) } + def mktmp!(name = T.unsafe(nil)); end + end +end + +# Bundle features for a context +# +# source://spoom//lib/spoom/context/bundle.rb#7 +module Spoom::Context::Bundle + requires_ancestor { Spoom::Context } + + # Run a command with `bundle` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#33 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run a command `bundle exec` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#46 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run `bundle install` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#40 + sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Get `gem` version from the `Gemfile.lock` content + # + # Returns `nil` if `gem` cannot be found in the Gemfile. + # + # source://spoom//lib/spoom/context/bundle.rb#62 + sig { params(gem: ::String).returns(T.nilable(::String)) } + def gem_version_from_gemfile_lock(gem); end + + # source://spoom//lib/spoom/context/bundle.rb#51 + sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } + def gemfile_lock_specs; end + + # Read the contents of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#15 + sig { returns(T.nilable(::String)) } + def read_gemfile; end + + # Read the contents of the Gemfile.lock in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#21 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#27 + sig { params(contents: ::String, append: T::Boolean).void } + def write_gemfile!(contents, append: T.unsafe(nil)); end +end + +# Execution features for a context +# +# source://spoom//lib/spoom/context/exec.rb#27 +module Spoom::Context::Exec + requires_ancestor { Spoom::Context } + + # Run a command in this context directory + # + # source://spoom//lib/spoom/context/exec.rb#35 + sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def exec(command, capture_err: T.unsafe(nil)); end +end + +# File System features for a context +# +# source://spoom//lib/spoom/context/file_system.rb#7 +module Spoom::Context::FileSystem + requires_ancestor { Spoom::Context } + + # Returns the absolute path to `relative_path` in the context's directory + # + # source://spoom//lib/spoom/context/file_system.rb#15 + sig { params(relative_path: ::String).returns(::String) } + def absolute_path_to(relative_path); end + + # source://spoom//lib/spoom/context/file_system.rb#53 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).returns(T::Array[::String]) + end + def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # Delete this context and its content + # + # Warning: it will `rm -rf` the context directory on the file system. + # + # source://spoom//lib/spoom/context/file_system.rb#105 + sig { void } + def destroy!; end + + # Does the context directory at `absolute_path` exist and is a directory? + # + # source://spoom//lib/spoom/context/file_system.rb#21 + sig { returns(T::Boolean) } + def exist?; end + + # Does `relative_path` point to an existing file in this context directory? + # + # source://spoom//lib/spoom/context/file_system.rb#65 + sig { params(relative_path: ::String).returns(T::Boolean) } + def file?(relative_path); end + + # List all files in this context matching `pattern` + # + # source://spoom//lib/spoom/context/file_system.rb#34 + sig { params(pattern: ::String).returns(T::Array[::String]) } + def glob(pattern = T.unsafe(nil)); end + + # List all files at the top level of this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#42 + sig { returns(T::Array[::String]) } + def list; end + + # Create the context directory at `absolute_path` + # + # source://spoom//lib/spoom/context/file_system.rb#27 + sig { void } + def mkdir!; end + + # Move the file or directory from `from_relative_path` to `to_relative_path` + # + # source://spoom//lib/spoom/context/file_system.rb#95 + sig { params(from_relative_path: ::String, to_relative_path: ::String).void } + def move!(from_relative_path, to_relative_path); end + + # Return the contents of the file at `relative_path` in this context directory + # + # Will raise if the file doesn't exist. + # + # source://spoom//lib/spoom/context/file_system.rb#73 + sig { params(relative_path: ::String).returns(::String) } + def read(relative_path); end + + # Remove the path at `relative_path` (recursive + force) in this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#89 + sig { params(relative_path: ::String).void } + def remove!(relative_path); end + + # Write `contents` in the file at `relative_path` in this context directory + # + # Append to the file if `append` is true. + # + # source://spoom//lib/spoom/context/file_system.rb#81 + sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } + def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end +end + +# Git features for a context +# +# source://spoom//lib/spoom/context/git.rb#35 +module Spoom::Context::Git + requires_ancestor { Spoom::Context } + + # Run a command prefixed by `git` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#43 + sig { params(command: ::String).returns(::Spoom::ExecResult) } + def git(command); end + + # Run `git checkout` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#62 + sig { params(ref: ::String).returns(::Spoom::ExecResult) } + def git_checkout!(ref: T.unsafe(nil)); end + + # Run `git checkout -b ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#68 + sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end + + # Run `git add . && git commit` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#78 + sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } + def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end + + # Get the current git branch in this context directory + # + # source://spoom//lib/spoom/context/git.rb#89 + sig { returns(T.nilable(::String)) } + def git_current_branch; end + + # Run `git diff` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#98 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_diff(*arg); end + + # Run `git init` in this context directory + # + # Warning: passing a branch will run `git init -b ` which is only available in git 2.28+. + # In older versions, use `git_init!` followed by `git("checkout -b ")`. + # + # source://spoom//lib/spoom/context/git.rb#52 + sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_init!(branch: T.unsafe(nil)); end + + # Get the last commit in the currently checked out branch + # + # source://spoom//lib/spoom/context/git.rb#104 + sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } + def git_last_commit(short_sha: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#115 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_log(*arg); end + + # Run `git push ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#121 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#126 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_show(*arg); end + + # Is there uncommitted changes in this context directory? + # + # source://spoom//lib/spoom/context/git.rb#132 + sig { params(path: ::String).returns(T::Boolean) } + def git_workdir_clean?(path: T.unsafe(nil)); end +end + +# Sorbet features for a context +# +# source://spoom//lib/spoom/context/sorbet.rb#7 +module Spoom::Context::Sorbet + requires_ancestor { Spoom::Context } + + # Does this context has a `sorbet/config` file? + # + # source://spoom//lib/spoom/context/sorbet.rb#119 + sig { returns(T::Boolean) } + def has_sorbet_config?; end + + # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) + # + # source://spoom//lib/spoom/context/sorbet.rb#142 + sig { params(relative_path: ::String).returns(T.nilable(::String)) } + def read_file_strictness(relative_path); end + + # Read the contents of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#130 + sig { returns(::String) } + def read_sorbet_config; end + + # source://spoom//lib/spoom/context/sorbet.rb#124 + sig { returns(::Spoom::Sorbet::Config) } + def sorbet_config; end + + # Get the commit introducing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#148 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_intro_commit; end + + # Get the commit removing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#160 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_removal_commit; end + + # Run `bundle exec srb` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#15 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` + # + # source://spoom//lib/spoom/context/sorbet.rb#65 + sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } + def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` that matches `strictness` + # + # source://spoom//lib/spoom/context/sorbet.rb#104 + sig do + params( + strictness: ::String, + with_config: T.nilable(::Spoom::Sorbet::Config), + include_rbis: T::Boolean + ).returns(T::Array[::String]) + end + def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#45 + sig do + params( + arg: ::String, + sorbet_bin: T.nilable(::String), + capture_err: T::Boolean + ).returns(T.nilable(T::Hash[::String, ::Integer])) + end + def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#33 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#110 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } + def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Set the `contents` of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#136 + sig { params(contents: ::String, append: T::Boolean).void } + def write_sorbet_config!(contents, append: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#5 +module Spoom::Coverage + class << self + # source://spoom//lib/spoom/coverage.rb#103 + sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } + def file_tree(context); end + + # source://spoom//lib/spoom/coverage.rb#83 + sig do + params( + context: ::Spoom::Context, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + palette: ::Spoom::Coverage::D3::ColorPalette + ).returns(::Spoom::Coverage::Report) + end + def report(context, snapshots, palette:); end + + # source://spoom//lib/spoom/coverage.rb#16 + sig do + params( + context: ::Spoom::Context, + rbi: T::Boolean, + sorbet_bin: T.nilable(::String) + ).returns(::Spoom::Coverage::Snapshot) + end + def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/coverage/report.rb#88 +module Spoom::Coverage::Cards; end + +# source://spoom//lib/spoom/coverage/report.rb#89 +class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template + # source://spoom//lib/spoom/coverage/report.rb#98 + sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } + def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end + + # @return [String, nil] + # + # source://spoom//lib/spoom/coverage/report.rb#95 + def body; end + + # source://spoom//lib/spoom/coverage/report.rb#95 + sig { returns(T.nilable(::String)) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#92 +Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#105 +class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#112 + sig { void } + def initialize; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#120 + sig { abstract.returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#115 + sig { override.returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/coverage/report.rb#153 +class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#164 + sig do + params( + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + title: ::String + ).void + end + def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#123 +class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#132 + sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } + def initialize(snapshot:, title: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#143 + sig { returns(::Spoom::Coverage::D3::Pie::Calls) } + def pie_calls; end + + # source://spoom//lib/spoom/coverage/report.rb#138 + sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } + def pie_sigils; end + + # source://spoom//lib/spoom/coverage/report.rb#148 + sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } + def pie_sigs; end + + # source://spoom//lib/spoom/coverage/report.rb#129 + sig { returns(::Spoom::Coverage::Snapshot) } + def snapshot; end +end + +# source://spoom//lib/spoom/coverage/report.rb#126 +Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#240 +class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb + # source://spoom//lib/spoom/coverage/report.rb#244 + sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } + def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#250 + sig { override.returns(::String) } + def erb; end +end + +# source://spoom//lib/spoom/coverage/report.rb#177 +class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#181 + sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } + def initialize(title:, timeline:); end +end + +# source://spoom//lib/spoom/coverage/report.rb#194 +class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#198 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#212 +class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#216 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#230 +class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#234 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#185 +class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#189 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#203 +class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#207 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#221 +class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#225 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/d3/base.rb#6 +module Spoom::Coverage::D3 + class << self + # source://spoom//lib/spoom/coverage/d3.rb#61 + sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } + def header_script(palette); end + + # source://spoom//lib/spoom/coverage/d3.rb#21 + sig { returns(::String) } + def header_style; end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/base.rb#7 +class Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/base.rb#17 + sig { params(id: ::String, data: T.untyped).void } + def initialize(id, data); end + + # source://spoom//lib/spoom/coverage/d3/base.rb#37 + sig { returns(::String) } + def html; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#14 + sig { returns(::String) } + def id; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/base.rb#50 + sig { abstract.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#45 + sig { returns(::String) } + def tooltip; end + + class << self + # source://spoom//lib/spoom/coverage/d3/base.rb#31 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#26 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3.rb#12 +Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#11 +Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#14 +Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#15 +Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#13 +Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 +class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 +class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159 + sig do + params( + id: ::String, + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float] + ).void + end + def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166 + sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } + def tree_node_to_json(node); end +end + +# source://spoom//lib/spoom/coverage/d3.rb#103 +class Spoom::Coverage::D3::ColorPalette < ::T::Struct + prop :ignore, ::String + prop :false, ::String + prop :true, ::String + prop :strict, ::String + prop :strong, ::String + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/pie.rb#9 +class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/pie.rb#16 + sig { params(id: ::String, title: ::String, data: T.untyped).void } + def initialize(id, title, data); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#56 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/pie.rb#43 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#141 +class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#145 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#150 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#123 +class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#127 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#132 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#159 +class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#163 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#172 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#9 +class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#16 + sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } + def initialize(id, data, keys); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#187 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#203 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/timeline.rb#126 + sig { abstract.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#217 + sig { params(y: ::String).returns(::String) } + def points(y:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#101 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#129 + sig { returns(::String) } + def x_scale; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#145 + sig { returns(::String) } + def x_ticks; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#158 + sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } + def y_scale(min:, max:, ticks:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#174 + sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } + def y_ticks(ticks:, format:, padding:); end + + class << self + # source://spoom//lib/spoom/coverage/d3/timeline.rb#79 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#448 +class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#452 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#466 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#505 +class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#509 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#577 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#617 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#537 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#523 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#282 +class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#286 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#311 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#298 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#421 +class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#425 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#439 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#475 +class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#479 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#496 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#329 +class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#388 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#377 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 + sig { override.returns(::String) } + def script; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#232 +class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#236 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#263 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#249 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#38 +class Spoom::Coverage::Page < ::Spoom::Coverage::Template + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#53 + sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } + def initialize(title:, palette:, template: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#75 + sig { returns(::String) } + def body_html; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#80 + sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#83 + sig { returns(::String) } + def footer_html; end + + # source://spoom//lib/spoom/coverage/report.rb#70 + sig { returns(::String) } + def header_html; end + + # source://spoom//lib/spoom/coverage/report.rb#65 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/report.rb#60 + sig { returns(::String) } + def header_style; end + + # source://spoom//lib/spoom/coverage/report.rb#50 + sig { returns(::Spoom::Coverage::D3::ColorPalette) } + def palette; end + + # source://spoom//lib/spoom/coverage/report.rb#47 + sig { returns(::String) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#44 +Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#261 +class Spoom::Coverage::Report < ::Spoom::Coverage::Page + # source://spoom//lib/spoom/coverage/report.rb#276 + sig do + params( + project_name: ::String, + palette: ::Spoom::Coverage::D3::ColorPalette, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + sorbet_intro_commit: T.nilable(::String), + sorbet_intro_date: T.nilable(::Time) + ).void + end + def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#308 + sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#297 + sig { override.returns(::String) } + def header_html; end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#6 +class Spoom::Coverage::Snapshot < ::T::Struct + prop :timestamp, ::Integer, default: T.unsafe(nil) + prop :version_static, T.nilable(::String), default: T.unsafe(nil) + prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) + prop :duration, ::Integer, default: T.unsafe(nil) + prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) + prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) + prop :files, ::Integer, default: T.unsafe(nil) + prop :rbi_files, ::Integer, default: T.unsafe(nil) + prop :modules, ::Integer, default: T.unsafe(nil) + prop :classes, ::Integer, default: T.unsafe(nil) + prop :singleton_classes, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig, ::Integer, default: T.unsafe(nil) + prop :methods_with_sig, ::Integer, default: T.unsafe(nil) + prop :calls_untyped, ::Integer, default: T.unsafe(nil) + prop :calls_typed, ::Integer, default: T.unsafe(nil) + prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) + prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil) + + # source://spoom//lib/spoom/coverage/snapshot.rb#33 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#39 + sig { params(arg: T.untyped).returns(::String) } + def to_json(*arg); end + + class << self + # source://spoom//lib/spoom/coverage/snapshot.rb#47 + sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } + def from_json(json); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#52 + sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } + def from_obj(obj); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# The strictness name as found in the Sorbet metrics file +# +# source://spoom//lib/spoom/coverage/snapshot.rb#30 +Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/coverage/snapshot.rb#95 +class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/coverage/snapshot.rb#99 + sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } + def print_snapshot(snapshot); end + + private + + # source://spoom//lib/spoom/coverage/snapshot.rb#158 + sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } + def percent(value, total); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#147 + sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } + def print_map(hash, total); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#10 +class Spoom::Coverage::Template + abstract! + + # Create a new template from an Erb file path + # + # source://spoom//lib/spoom/coverage/report.rb#18 + sig { params(template: ::String).void } + def initialize(template:); end + + # source://spoom//lib/spoom/coverage/report.rb#23 + sig { returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#33 + sig { returns(::Binding) } + def get_binding; end + + # source://spoom//lib/spoom/coverage/report.rb#28 + sig { returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/deadcode/visitor.rb#5 +module Spoom::Deadcode + class << self + # source://spoom//lib/spoom/deadcode.rb#81 + sig do + params( + index: ::Spoom::Deadcode::Index, + erb: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#67 + sig do + params( + index: ::Spoom::Deadcode::Index, + node: ::Prism::Node, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_node(index, node, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#75 + sig do + params( + index: ::Spoom::Deadcode::Index, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#75 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def load_custom_plugins(context); end + + # source://spoom//lib/spoom/deadcode.rb#43 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#61 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def plugins_from_gemfile_lock(context); end + end +end + +# source://spoom//lib/spoom/deadcode/plugins.rb#26 +Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/deadcode/plugins.rb#28 +Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) + +# A definition is a class, module, method, constant, etc. being defined in the code +# +# source://spoom//lib/spoom/deadcode/definition.rb#7 +class Spoom::Deadcode::Definition < ::T::Struct + const :kind, ::Spoom::Deadcode::Definition::Kind + const :name, ::String + const :full_name, ::String + const :location, ::Spoom::Deadcode::Location + const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/definition.rb#78 + sig { void } + def alive!; end + + # Status + # + # source://spoom//lib/spoom/deadcode/definition.rb#73 + sig { returns(T::Boolean) } + def alive?; end + + # Kind + # + # source://spoom//lib/spoom/deadcode/definition.rb#41 + sig { returns(T::Boolean) } + def attr_reader?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#46 + sig { returns(T::Boolean) } + def attr_writer?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#51 + sig { returns(T::Boolean) } + def class?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#56 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#83 + sig { returns(T::Boolean) } + def dead?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#93 + sig { void } + def ignored!; end + + # source://spoom//lib/spoom/deadcode/definition.rb#88 + sig { returns(T::Boolean) } + def ignored?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#61 + sig { returns(T::Boolean) } + def method?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#66 + sig { returns(T::Boolean) } + def module?; end + + # Utils + # + # source://spoom//lib/spoom/deadcode/definition.rb#100 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#10 +class Spoom::Deadcode::Definition::Kind < ::T::Enum + enums do + AttrReader = new + AttrWriter = new + Class = new + Constant = new + Method = new + Module = new + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#21 +class Spoom::Deadcode::Definition::Status < ::T::Enum + enums do + ALIVE = new + DEAD = new + IGNORED = new + end +end + +# Custom engine to handle ERB templates as used by Rails +# +# source://spoom//lib/spoom/deadcode/erb.rb#29 +class Spoom::Deadcode::ERB < ::Erubi::Engine + # source://spoom//lib/spoom/deadcode/erb.rb#33 + sig { params(input: T.untyped, properties: T.untyped).void } + def initialize(input, properties = T.unsafe(nil)); end + + private + + # source://spoom//lib/spoom/deadcode/erb.rb#83 + sig { override.params(code: T.untyped).void } + def add_code(code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#66 + sig { override.params(indicator: T.untyped, code: T.untyped).void } + def add_expression(indicator, code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#89 + sig { override.params(_: T.untyped).void } + def add_postamble(_); end + + # source://spoom//lib/spoom/deadcode/erb.rb#48 + sig { override.params(text: T.untyped).void } + def add_text(text); end + + # source://spoom//lib/spoom/deadcode/erb.rb#95 + sig { params(src: T.untyped).void } + def flush_newline_if_pending(src); end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#63 +Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode.rb#21 +class Spoom::Deadcode::Error < ::Spoom::Error + abstract! +end + +# source://spoom//lib/spoom/deadcode/index.rb#6 +class Spoom::Deadcode::Index + # source://spoom//lib/spoom/deadcode/index.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/deadcode/index.rb#51 + sig { returns(T::Array[::Spoom::Deadcode::Definition]) } + def all_definitions; end + + # source://spoom//lib/spoom/deadcode/index.rb#56 + sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + def all_references; end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#24 + sig { params(definition: ::Spoom::Deadcode::Definition).void } + def define(definition); end + + # source://spoom//lib/spoom/deadcode/index.rb#10 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } + def definitions; end + + # Utils + # + # source://spoom//lib/spoom/deadcode/index.rb#46 + sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } + def definitions_for_name(name); end + + # Mark all definitions having a reference of the same name as `alive` + # + # To be called once all the files have been indexed and all the definitions and references discovered. + # + # source://spoom//lib/spoom/deadcode/index.rb#37 + sig { void } + def finalize!; end + + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(reference: ::Spoom::Deadcode::Reference).void } + def reference(reference); end + + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + def references; end +end + +# source://spoom//lib/spoom/deadcode/indexer.rb#6 +class Spoom::Deadcode::Indexer < ::Spoom::Deadcode::Visitor + # source://spoom//lib/spoom/deadcode/indexer.rb#16 + sig do + params( + path: ::String, + source: ::String, + index: ::Spoom::Deadcode::Index, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def initialize(path, source, index, plugins: T.unsafe(nil)); end + + # Context + # + # source://spoom//lib/spoom/deadcode/indexer.rb#408 + sig { returns(::Prism::Node) } + def current_node; end + + # Definition indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#322 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#334 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#346 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#358 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#370 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#382 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_module(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#453 + sig { returns(T.nilable(::String)) } + def last_sig; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#427 + sig { returns(T.nilable(::Prism::BlockNode)) } + def nesting_block; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#432 + sig { returns(T.nilable(::Prism::CallNode)) } + def nesting_call; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#422 + sig { returns(T.nilable(::Prism::ClassNode)) } + def nesting_class; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#437 + sig { returns(T.nilable(::String)) } + def nesting_class_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#445 + sig { returns(T.nilable(::String)) } + def nesting_class_superclass_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#413 + sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } + def nesting_node(type); end + + # Node utils + # + # source://spoom//lib/spoom/deadcode/indexer.rb#464 + sig { params(node: ::Prism::Node).returns(::Spoom::Deadcode::Location) } + def node_location(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end + + # Reference indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#396 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#401 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end + + # Visit + # + # source://spoom//lib/spoom/deadcode/indexer.rb#35 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#45 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#50 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#56 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#67 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#91 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#75 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#83 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#104 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#137 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#143 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#149 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#155 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#173 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#178 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#186 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#194 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#202 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#210 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#218 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#224 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#254 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#268 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#274 + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end +end + +# source://spoom//lib/spoom/deadcode.rb#29 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error + # source://spoom//lib/spoom/deadcode.rb#33 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + +# source://spoom//lib/spoom/deadcode/location.rb#6 +class Spoom::Deadcode::Location + include ::Comparable + + # source://spoom//lib/spoom/deadcode/location.rb#54 + sig do + params( + file: ::String, + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).void + end + def initialize(file, start_line, start_column, end_line, end_column); end + + # source://spoom//lib/spoom/deadcode/location.rb#74 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def end_column; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def end_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#40 + sig { returns(::String) } + def file; end + + # source://spoom//lib/spoom/deadcode/location.rb#63 + sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) } + def include?(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#43 + def start_column; end + + # source://spoom//lib/spoom/deadcode/location.rb#43 + sig { returns(::Integer) } + def start_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#81 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/deadcode/location.rb#34 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Deadcode::Location) } + def from_prism(file, location); end + + # @raise [LocationError] + # + # source://spoom//lib/spoom/deadcode/location.rb#17 + sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) } + def from_string(location_string); end + end +end + +# source://spoom//lib/spoom/deadcode/location.rb#11 +class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode/plugins.rb#36 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/deadcode.rb#27 +class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 +module Spoom::Deadcode::Plugins; end + +# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 +class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#7 +class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 +class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10 +Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 +class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 +class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 +class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 +Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 +Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 +class Spoom::Deadcode::Plugins::Base + abstract! + + # Do not override this method, use `on_define_accessor` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#150 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_accessor(indexer, definition); end + + # Do not override this method, use `on_define_class` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#174 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_class(indexer, definition); end + + # Do not override this method, use `on_define_constant` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#204 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_constant(indexer, definition); end + + # Do not override this method, use `on_define_method` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_method(indexer, definition); end + + # Do not override this method, use `on_define_module` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def internal_on_define_module(indexer, definition); end + + # Do not override this method, use `on_send` instead. + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def internal_on_send(indexer, send); end + + # Called when an accessor is defined. + # + # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_accessor(indexer, definition) + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_accessor(indexer, definition); end + + # Called when a class is defined. + # + # Will be called when the indexer processes a `class` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_class(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # Called when a constant is defined. + # + # Will be called when the indexer processes a `CONST =` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_constant(indexer, definition) + # definition.ignored! if definition.name == "FOO" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # Called when a method is defined. + # + # Will be called when the indexer processes a `def` or `defs` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_method(indexer, definition) + # super # So the `ignore_method_names` DSL is still applied + # + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # Called when a module is defined. + # + # Will be called when the indexer processes a `module` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_module(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + # Called when a send is being processed + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_send(indexer, send) + # return unless send.name == "dsl_method" + # return if send.args.empty? + # + # method_name = send.args.first.slice.delete_prefix(":") + # indexer.reference_method(method_name, send.node) + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # Plugin utils + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + sig { params(name: ::String).returns(::String) } + def camelize(name); end + + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(name: T.nilable(::String)).returns(T::Boolean) } + def ignored_class_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_constant_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_method_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_module_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 + sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } + def ignored_name?(name, names_variable, patterns_variable); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#300 + sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) } + def ignored_subclass?(superclass_name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#327 + sig { params(const: ::Symbol).returns(T::Set[::String]) } + def names(const); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 + sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } + def patterns(const); end + + class << self + # Mark classes directly subclassing a class matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_classes_inheriting_from( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#52 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_inheriting_from(*names); end + + # Mark classes matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#34 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_classes_named(*names); end + + # Mark constants matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "FOO", + # "BAR", + # /BAZ.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#70 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_constants_named(*names); end + + # Mark methods matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_method_names( + # "foo", + # "bar", + # /baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#88 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_methods_named(*names); end + + # Mark modules matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_class_names( + # "Foo", + # "Bar", + # /Baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#106 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_modules_named(*names); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#113 + sig do + params( + names: T::Array[T.any(::Regexp, ::String)], + names_variable: ::Symbol, + patterns_variable: ::Symbol + ).void + end + def save_names_and_patterns(names, names_variable, patterns_variable); end + end +end + +# source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7 +class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end +end + +# source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7 +class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 +class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 + sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } + def used_as_namespace?(indexer); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 +class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/rails.rb#7 +class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 + sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } + def file_is_helper?(indexer); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 +class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end + +# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7 +class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def rubocop_constant?(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def rubocop_method?(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 +Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) + +# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 +class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } + def reference_symbol_as_constant(indexer, send, node); end +end + +# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7 +class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#34 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def sorbet_enum_constant?(indexer, definition); end + + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } + def sorbet_type_member?(indexer, definition); end +end + +# source://spoom//lib/spoom/deadcode/plugins/thor.rb#7 +class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end +end + +# A reference is a call to a method or a constant +# +# source://spoom//lib/spoom/deadcode/reference.rb#7 +class Spoom::Deadcode::Reference < ::T::Struct + const :kind, ::Spoom::Deadcode::Reference::Kind + const :name, ::String + const :location, ::Spoom::Deadcode::Location + + # Kind + # + # source://spoom//lib/spoom/deadcode/reference.rb#24 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/reference.rb#29 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/reference.rb#10 +class Spoom::Deadcode::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#6 +class Spoom::Deadcode::Remover + # source://spoom//lib/spoom/deadcode/remover.rb#12 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#17 + sig do + params( + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Deadcode::Location + ).returns(::String) + end + def remove_location(kind, location); end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#9 +class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode/remover.rb#372 +class Spoom::Deadcode::Remover::NodeContext + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig do + params( + source: ::String, + comments: T::Hash[::Integer, ::Prism::Comment], + node: ::Prism::Node, + nesting: T::Array[::Prism::Node] + ).void + end + def initialize(source, comments, node, nesting); end + + # source://spoom//lib/spoom/deadcode/remover.rb#506 + sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } + def attached_comments(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#534 + sig { returns(T.nilable(::Prism::CallNode)) } + def attached_sig; end + + # source://spoom//lib/spoom/deadcode/remover.rb#521 + sig { returns(T::Array[::Prism::Node]) } + def attached_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#376 + sig { returns(T::Hash[::Integer, ::Prism::Comment]) } + def comments; end + + # source://spoom//lib/spoom/deadcode/remover.rb#494 + sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } + def comments_between_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::Prism::Node]) } + def nesting; end + + # @return [Array] + # + # source://spoom//lib/spoom/deadcode/remover.rb#382 + def nesting=(_arg0); end + + # source://spoom//lib/spoom/deadcode/remover.rb#444 + sig { returns(T.nilable(::Prism::Node)) } + def next_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#433 + sig { returns(T::Array[::Prism::Node]) } + def next_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#379 + sig { returns(::Prism::Node) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#408 + sig { returns(::Spoom::Deadcode::Remover::NodeContext) } + def parent_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#400 + sig { returns(::Prism::Node) } + def parent_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#428 + sig { returns(T.nilable(::Prism::Node)) } + def previous_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#417 + sig { returns(T::Array[::Prism::Node]) } + def previous_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#449 + sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } + def sclass_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#482 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_extend_sig?(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#477 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_signature?(node); end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#549 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#621 + sig { params(location: ::Spoom::Deadcode::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + def initialize(location, kind); end + + # source://spoom//lib/spoom/deadcode/remover.rb#615 + sig { returns(T.nilable(::Prism::Node)) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#618 + sig { returns(T::Array[::Prism::Node]) } + def nodes_nesting; end + + # source://spoom//lib/spoom/deadcode/remover.rb#630 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + class << self + # source://spoom//lib/spoom/deadcode/remover.rb#556 + sig do + params( + source: ::String, + location: ::Spoom::Deadcode::Location, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::Spoom::Deadcode::Remover::NodeContext) + end + def find(source, location, kind); end + + # source://spoom//lib/spoom/deadcode/remover.rb#590 + sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } + def node_match_kind?(node, kind); end + end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#29 +class Spoom::Deadcode::Remover::NodeRemover + # source://spoom//lib/spoom/deadcode/remover.rb#36 + sig do + params( + source: ::String, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Deadcode::Location + ).void + end + def initialize(source, kind, location); end + + # source://spoom//lib/spoom/deadcode/remover.rb#46 + sig { void } + def apply_edit; end + + # source://spoom//lib/spoom/deadcode/remover.rb#33 + sig { returns(::String) } + def new_source; end + + private + + # source://spoom//lib/spoom/deadcode/remover.rb#153 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_attr_accessor(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#331 + sig { params(start_char: ::Integer, end_char: ::Integer).void } + def delete_chars(start_char, end_char); end + + # source://spoom//lib/spoom/deadcode/remover.rb#73 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_constant_assignment(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#324 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def delete_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#261 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_node_and_comments_and_sigs(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#218 + sig do + params( + node: ::Prism::Node, + send_context: ::Spoom::Deadcode::Remover::NodeContext, + was_removed: T::Boolean + ).void + end + def insert_accessor(node, send_context, was_removed:); end + + # source://spoom//lib/spoom/deadcode/remover.rb#336 + sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } + def replace_chars(start_char, end_char, replacement); end + + # source://spoom//lib/spoom/deadcode/remover.rb#341 + sig do + params( + node: ::Prism::CallNode, + name: ::String, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::String) + end + def transform_sig(node, name:, kind:); end +end + +# An abstraction to simplify handling of Prism::CallNode nodes. +# +# source://spoom//lib/spoom/deadcode/send.rb#7 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::Prism::CallNode + const :name, ::String + const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :args, T::Array[::Prism::Node], default: T.unsafe(nil) + const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/send.rb#21 + sig do + type_parameters(:T) + .params( + arg_type: T::Class[T.type_parameter(:T)], + block: T.proc.params(arg: T.type_parameter(:T)).void + ).void + end + def each_arg(arg_type, &block); end + + # source://spoom//lib/spoom/deadcode/send.rb#28 + sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } + def each_arg_assoc(&block); end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/visitor.rb#6 +class Spoom::Deadcode::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/deadcode/visitor.rb#15 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#20 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#25 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#30 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#35 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#40 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#45 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#50 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#55 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#60 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#65 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#70 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#75 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#80 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#85 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#90 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#95 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#100 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#105 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#110 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#115 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#120 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#125 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#130 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#135 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#10 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#140 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#145 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#150 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#155 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#160 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#165 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#170 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#175 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#180 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#185 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#190 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#195 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#200 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#205 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#210 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#215 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#220 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#225 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#230 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#235 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#240 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#245 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#250 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#255 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#260 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#265 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#270 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#275 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#280 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#285 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#290 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#295 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#300 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#305 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#310 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#315 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#320 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#325 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#330 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#335 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#340 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#345 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#350 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#355 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#360 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#365 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#370 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#375 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#380 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#385 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#390 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#395 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#400 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#405 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#410 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#415 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#420 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#425 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#430 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#435 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#440 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#445 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#450 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#455 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#460 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#465 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#470 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#475 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#480 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#485 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#490 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#495 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#500 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#505 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#510 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#515 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#520 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#525 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#530 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#535 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#540 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#545 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#550 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#555 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#560 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#565 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#570 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#575 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#580 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#585 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#590 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#595 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#600 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#605 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#610 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#615 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#620 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#625 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#630 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#635 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#640 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#645 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#650 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#655 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#660 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#665 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#670 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#675 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#680 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#685 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#690 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#695 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#700 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#705 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#710 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#715 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#720 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#725 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#730 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#735 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#740 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#745 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#750 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# source://spoom//lib/spoom.rb#12 +class Spoom::Error < ::StandardError; end + +# source://spoom//lib/spoom/context/exec.rb#5 +class Spoom::ExecResult < ::T::Struct + const :out, ::String + const :err, T.nilable(::String) + const :status, T::Boolean + const :exit_code, ::Integer + + # source://spoom//lib/spoom/context/exec.rb#14 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/file_collector.rb#5 +class Spoom::FileCollector + # Initialize a new file collector + # + # If `allow_extensions` is empty, all files are collected. + # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. + # + # If `allow_mime_types` is empty, all files are collected. + # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in + # the list. + # + # source://spoom//lib/spoom/file_collector.rb#26 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).void + end + def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_collector.rb#9 + sig { returns(T::Array[::String]) } + def files; end + + # source://spoom//lib/spoom/file_collector.rb#39 + sig { params(path: ::String).void } + def visit_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#34 + sig { params(paths: T::Array[::String]).void } + def visit_paths(paths); end + + private + + # source://spoom//lib/spoom/file_collector.rb#56 + sig { params(path: ::String).returns(::String) } + def clean_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#73 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_file?(path); end + + # source://spoom//lib/spoom/file_collector.rb#88 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_path?(path); end + + # source://spoom//lib/spoom/file_collector.rb#97 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end + + # source://spoom//lib/spoom/file_collector.rb#68 + sig { params(path: ::String).void } + def visit_directory(path); end + + # source://spoom//lib/spoom/file_collector.rb#61 + sig { params(path: ::String).void } + def visit_file(path); end +end + +# Build a file hierarchy from a set of file paths. +# +# source://spoom//lib/spoom/file_tree.rb#6 +class Spoom::FileTree + # source://spoom//lib/spoom/file_tree.rb#10 + sig { params(paths: T::Enumerable[::String]).void } + def initialize(paths = T.unsafe(nil)); end + + # Add a `path` to the tree + # + # This will create all nodes until the root of `path`. + # + # source://spoom//lib/spoom/file_tree.rb#25 + sig { params(path: ::String).returns(::Spoom::FileTree::Node) } + def add_path(path); end + + # Add all `paths` to the tree + # + # source://spoom//lib/spoom/file_tree.rb#17 + sig { params(paths: T::Enumerable[::String]).void } + def add_paths(paths); end + + # All the nodes in this tree + # + # source://spoom//lib/spoom/file_tree.rb#45 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # Return a map of typing scores for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#59 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(context); end + + # All the paths in this tree + # + # source://spoom//lib/spoom/file_tree.rb#53 + sig { returns(T::Array[::String]) } + def paths; end + + # Return a map of typing scores for each path in the tree + # + # source://spoom//lib/spoom/file_tree.rb#67 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end + + # source://spoom//lib/spoom/file_tree.rb#72 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # All root nodes + # + # source://spoom//lib/spoom/file_tree.rb#39 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def roots; end +end + +# A visitor that collects all the nodes in a tree +# +# source://spoom//lib/spoom/file_tree.rb#124 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#131 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/file_tree.rb#128 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # source://spoom//lib/spoom/file_tree.rb#137 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A visitor that collects the typing score of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#167 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # source://spoom//lib/spoom/file_tree.rb#174 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#171 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end + + # source://spoom//lib/spoom/file_tree.rb#181 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#190 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end + + # source://spoom//lib/spoom/file_tree.rb#199 + sig { params(strictness: T.nilable(::String)).returns(::Float) } + def strictness_score(strictness); end +end + +# A visitor that collects the strictness of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#144 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#151 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#148 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end + + # source://spoom//lib/spoom/file_tree.rb#158 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A node representing either a file or a directory inside a FileTree +# +# source://spoom//lib/spoom/file_tree.rb#78 +class Spoom::FileTree::Node < ::T::Struct + const :parent, T.nilable(::Spoom::FileTree::Node) + const :name, ::String + const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) + + # Full path to this node from root + # + # source://spoom//lib/spoom/file_tree.rb#92 + sig { returns(::String) } + def path; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# An internal class used to print a FileTree +# +# See `FileTree#print` +# +# source://spoom//lib/spoom/file_tree.rb#212 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#222 + sig do + params( + strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + out: T.any(::IO, ::StringIO), + colors: T::Boolean + ).void + end + def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_tree.rb#230 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#255 + sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } + def strictness_color(strictness); end +end + +# An abstract visitor for FileTree +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/file_tree.rb#101 +class Spoom::FileTree::Visitor + abstract! + + # source://spoom//lib/spoom/file_tree.rb#113 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + # source://spoom//lib/spoom/file_tree.rb#118 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end + + # source://spoom//lib/spoom/file_tree.rb#108 + sig { params(tree: ::Spoom::FileTree).void } + def visit_tree(tree); end +end + +# source://spoom//lib/spoom/context/git.rb#5 +module Spoom::Git; end + +# source://spoom//lib/spoom/context/git.rb#6 +class Spoom::Git::Commit < ::T::Struct + const :sha, ::String + const :time, ::Time + + # source://spoom//lib/spoom/context/git.rb#27 + sig { returns(::Integer) } + def timestamp; end + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + + # Parse a line formatted as `%h %at` into a `Commit` + # + # source://spoom//lib/spoom/context/git.rb#14 + sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } + def parse_line(string); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 +module Spoom::LSP; end + +# source://spoom//lib/spoom/sorbet/lsp.rb#13 +class Spoom::LSP::Client + # source://spoom//lib/spoom/sorbet/lsp.rb#17 + sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } + def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#229 + sig { void } + def close; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#131 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def definitions(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#212 + sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def document_symbols(uri); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#89 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } + def hover(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#27 + sig { returns(::Integer) } + def next_id; end + + # LSP requests + # + # @raise [Error::AlreadyOpen] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#72 + sig { params(workspace_path: ::String).void } + def open(workspace_path); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#54 + sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def read; end + + # @raise [Error::BadHeaders] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#43 + sig { returns(T.nilable(::String)) } + def read_raw; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#173 + sig do + params( + uri: ::String, + line: ::Integer, + column: ::Integer, + include_decl: T::Boolean + ).returns(T::Array[::Spoom::LSP::Location]) + end + def references(uri, line, column, include_decl = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#37 + sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def send(message); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#32 + sig { params(json_string: ::String).void } + def send_raw(json_string); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#110 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } + def signatures(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#197 + sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def symbols(query); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#152 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def type_definitions(uri, line, column); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 +class Spoom::LSP::Diagnostic < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :range, ::Spoom::LSP::Range + const :code, ::Integer + const :message, ::String + const :information, ::Object + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 +class Spoom::LSP::DocumentSymbol < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :name, ::String + const :detail, T.nilable(::String) + const :kind, ::Integer + const :location, T.nilable(::Spoom::LSP::Location) + const :range, T.nilable(::Spoom::LSP::Range) + const :children, T::Array[::Spoom::LSP::DocumentSymbol] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 + sig { returns(::String) } + def kind_string; end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 +Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 +class Spoom::LSP::Error < ::StandardError; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 +class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 +class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 +class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 + sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } + def initialize(uri, diagnostics); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 + sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } + def diagnostics; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 + sig { returns(::String) } + def uri; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 +class Spoom::LSP::Hover < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :contents, ::String + const :range, T.nilable(T::Range[T.untyped]) + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 +class Spoom::LSP::Location < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :uri, ::String + const :range, ::Spoom::LSP::Range + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A general message as defined by JSON-RPC. +# +# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 +class Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def as_json; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end +end + +# A notification message. +# +# A processed notification message must not send a response back. They work like events. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 +class Spoom::LSP::Notification < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 + sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 + sig { returns(::String) } + def method; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 +class Spoom::LSP::Position < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :line, ::Integer + const :char, ::Integer + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 +module Spoom::LSP::PrintableSymbol + interface! + + # @abstract + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 + sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 +class Spoom::LSP::Range < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :start, ::Spoom::LSP::Position + const :end, ::Spoom::LSP::Position + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A request message to describe a request between the client and the server. +# +# Every processed request must send a response back to the sender of the request. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 +class Spoom::LSP::Request < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 + sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(id, method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 + sig { returns(::Integer) } + def id; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 +class Spoom::LSP::ResponseError < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 + sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } + def initialize(code, message, data); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 + sig { returns(::Integer) } + def code; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def data; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 +class Spoom::LSP::SignatureHelp < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :label, T.nilable(::String) + const :doc, ::Object + const :params, T::Array[T.untyped] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 +class Spoom::LSP::SymbolPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 + sig do + params( + out: T.any(::IO, ::StringIO), + colors: T::Boolean, + indent_level: ::Integer, + prefix: T.nilable(::String) + ).void + end + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 + sig { params(uri: ::String).returns(::String) } + def clean_uri(uri); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + sig { returns(T.nilable(::String)) } + def prefix; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + def prefix=(_arg0); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_list(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 + sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } + def print_object(object); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_objects(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 + sig { returns(T::Set[::Integer]) } + def seen; end +end + +# source://spoom//lib/spoom/printer.rb#7 +class Spoom::Printer + include ::Spoom::Colorize + + # source://spoom//lib/spoom/printer.rb#17 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # Colorize `string` with color if `@colors` + # + # source://spoom//lib/spoom/printer.rb#78 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # source://spoom//lib/spoom/printer.rb#31 + sig { void } + def dedent; end + + # Increase indent level + # + # source://spoom//lib/spoom/printer.rb#25 + sig { void } + def indent; end + + # source://spoom//lib/spoom/printer.rb#14 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # @return [IO, StringIO] + # + # source://spoom//lib/spoom/printer.rb#14 + def out=(_arg0); end + + # Print `string` into `out` + # + # source://spoom//lib/spoom/printer.rb#37 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # + # Does not use colors unless `@colors`. + # + # source://spoom//lib/spoom/printer.rb#47 + sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } + def print_colored(string, *color); end + + # Print `string` with indent and newline + # + # source://spoom//lib/spoom/printer.rb#62 + sig { params(string: T.nilable(::String)).void } + def printl(string); end + + # Print a new line into `out` + # + # source://spoom//lib/spoom/printer.rb#56 + sig { void } + def printn; end + + # Print an indent space into `out` + # + # source://spoom//lib/spoom/printer.rb#72 + sig { void } + def printt; end +end + +# source://spoom//lib/spoom.rb#10 +Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/config.rb#5 +module Spoom::Sorbet; end + +# source://spoom//lib/spoom/sorbet.rb#39 +Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#36 +Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) + +# Parse Sorbet config files +# +# Parses a Sorbet config file: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_file("sorbet/config") +# puts config.paths # "." +# ``` +# +# Parses a Sorbet config string: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) +# a +# --file=b +# --ignore=c +# CONFIG +# puts config.paths # "a", "b" +# puts config.ignore # "c" +# ``` +# +# source://spoom//lib/spoom/sorbet/config.rb#26 +class Spoom::Sorbet::Config + # source://spoom//lib/spoom/sorbet/config.rb#38 + sig { void } + def initialize; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#46 + sig { returns(::Spoom::Sorbet::Config) } + def copy; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#35 + sig { returns(T::Boolean) } + def no_stdlib; end + + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/config.rb#35 + def no_stdlib=(_arg0); end + + # Returns self as a string of options that can be passed to Sorbet + # + # Example: + # ~~~rb + # config = Sorbet::Config.new + # config.paths << "/foo" + # config.paths << "/bar" + # config.ignore << "/baz" + # config.allowed_extensions << ".rb" + # + # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" + # ~~~ + # + # source://spoom//lib/spoom/sorbet/config.rb#68 + sig { returns(::String) } + def options_string; end + + # source://spoom//lib/spoom/sorbet/config.rb#32 + sig { returns(T::Array[::String]) } + def paths; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def paths=(_arg0); end + + class << self + # source://spoom//lib/spoom/sorbet/config.rb#81 + sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } + def parse_file(sorbet_config_path); end + + # source://spoom//lib/spoom/sorbet/config.rb#86 + sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } + def parse_string(sorbet_config); end + + private + + # source://spoom//lib/spoom/sorbet/config.rb#150 + sig { params(line: ::String).returns(::String) } + def parse_option(line); end + end +end + +# source://spoom//lib/spoom/sorbet/config.rb#29 +Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#14 +class Spoom::Sorbet::Error < ::StandardError + # source://spoom//lib/spoom/sorbet.rb#29 + sig { params(message: ::String, result: ::Spoom::ExecResult).void } + def initialize(message, result); end + + # source://spoom//lib/spoom/sorbet.rb#21 + sig { returns(::Spoom::ExecResult) } + def result; end +end + +# source://spoom//lib/spoom/sorbet.rb#17 +class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet.rb#18 +class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet/errors.rb#6 +module Spoom::Sorbet::Errors + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#13 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def sort_errors_by_code(errors); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#7 +Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/errors.rb#125 +class Spoom::Sorbet::Errors::Error + include ::Comparable + + # source://spoom//lib/spoom/sorbet/errors.rb#151 + sig do + params( + file: T.nilable(::String), + line: T.nilable(::Integer), + message: T.nilable(::String), + code: T.nilable(::Integer), + more: T::Array[::String] + ).void + end + def initialize(file, line, message, code, more = T.unsafe(nil)); end + + # By default errors are sorted by location + # + # source://spoom//lib/spoom/sorbet/errors.rb#162 + sig { params(other: T.untyped).returns(::Integer) } + def <=>(other); end + + # @return [Integer, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#133 + def code; end + + # source://spoom//lib/spoom/sorbet/errors.rb#130 + sig { returns(T.nilable(::String)) } + def file; end + + # Other files associated with the error + # + # source://spoom//lib/spoom/sorbet/errors.rb#140 + sig { returns(T::Set[::String]) } + def files_from_error_sections; end + + # source://spoom//lib/spoom/sorbet/errors.rb#133 + sig { returns(T.nilable(::Integer)) } + def line; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#130 + def message; end + + # source://spoom//lib/spoom/sorbet/errors.rb#136 + sig { returns(T::Array[::String]) } + def more; end + + # source://spoom//lib/spoom/sorbet/errors.rb#169 + sig { returns(::String) } + def to_s; end +end + +# Parse errors from Sorbet output +# +# source://spoom//lib/spoom/sorbet/errors.rb#18 +class Spoom::Sorbet::Errors::Parser + # source://spoom//lib/spoom/sorbet/errors.rb#43 + sig { params(error_url_base: ::String).void } + def initialize(error_url_base: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/errors.rb#50 + sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse(output); end + + private + + # source://spoom//lib/spoom/sorbet/errors.rb#114 + sig { params(line: ::String).void } + def append_error(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#106 + sig { void } + def close_error; end + + # source://spoom//lib/spoom/sorbet/errors.rb#73 + sig { params(error_url_base: ::String).returns(::Regexp) } + def error_line_match_regexp(error_url_base); end + + # source://spoom//lib/spoom/sorbet/errors.rb#90 + sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } + def match_error_line(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#99 + sig { params(error: ::Spoom::Sorbet::Errors::Error).void } + def open_error(error); end + + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#36 + sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse_string(output, error_url_base: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#21 +Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#37 +Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#38 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#41 +Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/metrics.rb#8 +module Spoom::Sorbet::MetricsParser + class << self + # source://spoom//lib/spoom/sorbet/metrics.rb#15 + sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_file(path, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#25 + sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_hash(obj, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#20 + sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_string(string, prefix = T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/metrics.rb#9 +Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#42 +Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/sigils.rb#9 +module Spoom::Sorbet::Sigils + class << self + # changes the sigil in the file at the passed path to the specified new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#72 + sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } + def change_sigil_in_file(path, new_strictness); end + + # changes the sigil to have a new strictness in a list of files + # + # source://spoom//lib/spoom/sorbet/sigils.rb#83 + sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } + def change_sigil_in_files(path_list, new_strictness); end + + # returns a string containing the strictness of a sigil in a file at the passed path + # * returns nil if no sigil + # + # source://spoom//lib/spoom/sorbet/sigils.rb#63 + sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } + def file_strictness(path); end + + # returns the full sigil comment string for the passed strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#38 + sig { params(strictness: ::String).returns(::String) } + def sigil_string(strictness); end + + # returns the strictness of a sigil in the passed file content string (nil if no sigil) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#50 + sig { params(content: ::String).returns(T.nilable(::String)) } + def strictness_in_content(content); end + + # returns a string which is the passed content but with the sigil updated to a new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#56 + sig { params(content: ::String, new_strictness: ::String).returns(::String) } + def update_sigil(content, new_strictness); end + + # returns true if the passed string is a valid strictness (else false) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#44 + sig { params(strictness: ::String).returns(T::Boolean) } + def valid_strictness?(strictness); end + end +end + +# source://spoom//lib/spoom/sorbet/sigils.rb#31 +Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://spoom//lib/spoom/sorbet/sigils.rb#13 +Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#12 +Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#17 +Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#15 +Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#16 +Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#14 +Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#19 +Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/timeline.rb#5 +class Spoom::Timeline + # source://spoom//lib/spoom/timeline.rb#9 + sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } + def initialize(context, from, to); end + + # Return one commit for each date in `dates` + # + # source://spoom//lib/spoom/timeline.rb#36 + sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } + def commits_for_dates(dates); end + + # Return all months between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#23 + sig { returns(T::Array[::Time]) } + def months; end + + # Return one commit for each month between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#17 + sig { returns(T::Array[::Spoom::Git::Commit]) } + def ticks; end +end + +# source://spoom//lib/spoom/version.rb#5 +Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/sqlite3@2.1.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/sqlite3@2.1.0.rbi new file mode 100644 index 0000000..f883d22 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/sqlite3@2.1.0.rbi @@ -0,0 +1,1752 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `sqlite3` gem. +# Please instead update this file by running `bin/tapioca gem sqlite3`. + + +module Process + extend ::SQLite3::ForkSafety::CoreExt + extend ::ActiveSupport::ForkTracker::CoreExt +end + +# based on Rails's active_support/fork_tracker.rb +# +# source://sqlite3//lib/sqlite3/constants.rb#1 +module SQLite3 + class << self + def libversion; end + def sqlcipher?; end + def status(*_arg0); end + def threadsafe; end + + # Was sqlite3 compiled with thread safety on? + # + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3.rb#14 + def threadsafe?; end + end +end + +# source://sqlite3//lib/sqlite3/errors.rb#15 +class SQLite3::AbortException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#53 +class SQLite3::AuthorizationException < ::SQLite3::Exception; end + +class SQLite3::Backup + def initialize(_arg0, _arg1, _arg2, _arg3); end + + def finish; end + def pagecount; end + def remaining; end + def step(_arg0); end +end + +class SQLite3::Blob < ::String; end + +# source://sqlite3//lib/sqlite3/errors.rb#17 +class SQLite3::BusyException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#35 +class SQLite3::CantOpenException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/constants.rb#2 +module SQLite3::Constants; end + +# CAPI3REF: Fundamental Datatypes +# +# ^(Every value in SQLite has one of five fundamental datatypes: +# +#
      +#
    • 64-bit signed integer +#
    • 64-bit IEEE floating point number +#
    • string +#
    • BLOB +#
    • NULL +#
    )^ +# +# These constants are codes for each of those types. +# +# source://sqlite3//lib/sqlite3/constants.rb#39 +module SQLite3::Constants::ColumnType; end + +# source://sqlite3//lib/sqlite3/constants.rb#43 +SQLite3::Constants::ColumnType::BLOB = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/constants.rb#41 +SQLite3::Constants::ColumnType::FLOAT = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/constants.rb#40 +SQLite3::Constants::ColumnType::INTEGER = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/constants.rb#44 +SQLite3::Constants::ColumnType::NULL = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/constants.rb#42 +SQLite3::Constants::ColumnType::TEXT = T.let(T.unsafe(nil), Integer) + +# CAPI3REF: Result Codes +# +# Many SQLite functions return an integer result code from the set shown +# here in order to indicate success or failure. +# +# New error codes may be added in future versions of SQLite. +# +# source://sqlite3//lib/sqlite3/constants.rb#55 +module SQLite3::Constants::ErrorCode; end + +# Callback routine requested an abort +# +# source://sqlite3//lib/sqlite3/constants.rb#65 +SQLite3::Constants::ErrorCode::ABORT = T.let(T.unsafe(nil), Integer) + +# Authorization denied +# +# source://sqlite3//lib/sqlite3/constants.rb#103 +SQLite3::Constants::ErrorCode::AUTH = T.let(T.unsafe(nil), Integer) + +# The database file is locked +# +# source://sqlite3//lib/sqlite3/constants.rb#67 +SQLite3::Constants::ErrorCode::BUSY = T.let(T.unsafe(nil), Integer) + +# Unable to open the database file +# +# source://sqlite3//lib/sqlite3/constants.rb#85 +SQLite3::Constants::ErrorCode::CANTOPEN = T.let(T.unsafe(nil), Integer) + +# Abort due to constraint violation +# +# source://sqlite3//lib/sqlite3/constants.rb#95 +SQLite3::Constants::ErrorCode::CONSTRAINT = T.let(T.unsafe(nil), Integer) + +# The database disk image is malformed +# +# source://sqlite3//lib/sqlite3/constants.rb#79 +SQLite3::Constants::ErrorCode::CORRUPT = T.let(T.unsafe(nil), Integer) + +# sqlite_step() has finished executing +# +# source://sqlite3//lib/sqlite3/constants.rb#117 +SQLite3::Constants::ErrorCode::DONE = T.let(T.unsafe(nil), Integer) + +# (Internal Only) Database table is empty +# +# source://sqlite3//lib/sqlite3/constants.rb#89 +SQLite3::Constants::ErrorCode::EMPTY = T.let(T.unsafe(nil), Integer) + +# SQL error or missing database +# +# source://sqlite3//lib/sqlite3/constants.rb#59 +SQLite3::Constants::ErrorCode::ERROR = T.let(T.unsafe(nil), Integer) + +# Not used +# +# source://sqlite3//lib/sqlite3/constants.rb#105 +SQLite3::Constants::ErrorCode::FORMAT = T.let(T.unsafe(nil), Integer) + +# Insertion failed because database is full +# +# source://sqlite3//lib/sqlite3/constants.rb#83 +SQLite3::Constants::ErrorCode::FULL = T.let(T.unsafe(nil), Integer) + +# An internal logic error in SQLite +# +# source://sqlite3//lib/sqlite3/constants.rb#61 +SQLite3::Constants::ErrorCode::INTERNAL = T.let(T.unsafe(nil), Integer) + +# Operation terminated by sqlite_interrupt() +# +# source://sqlite3//lib/sqlite3/constants.rb#75 +SQLite3::Constants::ErrorCode::INTERRUPT = T.let(T.unsafe(nil), Integer) + +# Some kind of disk I/O error occurred +# +# source://sqlite3//lib/sqlite3/constants.rb#77 +SQLite3::Constants::ErrorCode::IOERR = T.let(T.unsafe(nil), Integer) + +# A table in the database is locked +# +# source://sqlite3//lib/sqlite3/constants.rb#69 +SQLite3::Constants::ErrorCode::LOCKED = T.let(T.unsafe(nil), Integer) + +# Data type mismatch +# +# source://sqlite3//lib/sqlite3/constants.rb#97 +SQLite3::Constants::ErrorCode::MISMATCH = T.let(T.unsafe(nil), Integer) + +# Library used incorrectly +# +# source://sqlite3//lib/sqlite3/constants.rb#99 +SQLite3::Constants::ErrorCode::MISUSE = T.let(T.unsafe(nil), Integer) + +# Uses OS features not supported on host +# +# source://sqlite3//lib/sqlite3/constants.rb#101 +SQLite3::Constants::ErrorCode::NOLFS = T.let(T.unsafe(nil), Integer) + +# A malloc() failed +# +# source://sqlite3//lib/sqlite3/constants.rb#71 +SQLite3::Constants::ErrorCode::NOMEM = T.let(T.unsafe(nil), Integer) + +# File opened that is not a database file +# +# source://sqlite3//lib/sqlite3/constants.rb#109 +SQLite3::Constants::ErrorCode::NOTADB = T.let(T.unsafe(nil), Integer) + +# (Internal Only) Table or record not found +# +# source://sqlite3//lib/sqlite3/constants.rb#81 +SQLite3::Constants::ErrorCode::NOTFOUND = T.let(T.unsafe(nil), Integer) + +# Notifications from sqlite3_log() +# +# source://sqlite3//lib/sqlite3/constants.rb#111 +SQLite3::Constants::ErrorCode::NOTICE = T.let(T.unsafe(nil), Integer) + +# Successful result +# +# source://sqlite3//lib/sqlite3/constants.rb#57 +SQLite3::Constants::ErrorCode::OK = T.let(T.unsafe(nil), Integer) + +# Access permission denied +# +# source://sqlite3//lib/sqlite3/constants.rb#63 +SQLite3::Constants::ErrorCode::PERM = T.let(T.unsafe(nil), Integer) + +# Database lock protocol error +# +# source://sqlite3//lib/sqlite3/constants.rb#87 +SQLite3::Constants::ErrorCode::PROTOCOL = T.let(T.unsafe(nil), Integer) + +# 2nd parameter to sqlite3_bind out of range +# +# source://sqlite3//lib/sqlite3/constants.rb#107 +SQLite3::Constants::ErrorCode::RANGE = T.let(T.unsafe(nil), Integer) + +# Attempt to write a readonly database +# +# source://sqlite3//lib/sqlite3/constants.rb#73 +SQLite3::Constants::ErrorCode::READONLY = T.let(T.unsafe(nil), Integer) + +# sqlite_step() has another row ready +# +# source://sqlite3//lib/sqlite3/constants.rb#115 +SQLite3::Constants::ErrorCode::ROW = T.let(T.unsafe(nil), Integer) + +# The database schema changed +# +# source://sqlite3//lib/sqlite3/constants.rb#91 +SQLite3::Constants::ErrorCode::SCHEMA = T.let(T.unsafe(nil), Integer) + +# Too much data for one row of a table +# +# source://sqlite3//lib/sqlite3/constants.rb#93 +SQLite3::Constants::ErrorCode::TOOBIG = T.let(T.unsafe(nil), Integer) + +# Warnings from sqlite3_log() +# +# source://sqlite3//lib/sqlite3/constants.rb#113 +SQLite3::Constants::ErrorCode::WARNING = T.let(T.unsafe(nil), Integer) + +module SQLite3::Constants::Open; end +SQLite3::Constants::Open::AUTOPROXY = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::CREATE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::DELETEONCLOSE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::EXCLUSIVE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::FULLMUTEX = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::MAIN_DB = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::MAIN_JOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::MASTER_JOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::MEMORY = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::NOMUTEX = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::PRIVATECACHE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::READONLY = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::READWRITE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::SHAREDCACHE = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::SUBJOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::SUPER_JOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::TEMP_DB = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::TEMP_JOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::TRANSIENT_DB = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::URI = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::WAL = T.let(T.unsafe(nil), Integer) + +# CAPI3REF: Status Parameters +# +# These integer constants designate various run-time status parameters +# that can be returned by SQLite3.status +# +# source://sqlite3//lib/sqlite3/constants.rb#126 +module SQLite3::Constants::Status; end + +# This parameter records the number of separate memory allocations currently checked out. +# +# source://sqlite3//lib/sqlite3/constants.rb#171 +SQLite3::Constants::Status::MALLOC_COUNT = T.let(T.unsafe(nil), Integer) + +# This parameter records the largest memory allocation request handed to sqlite3_malloc() or +# sqlite3_realloc() (or their internal equivalents). Only the value returned in the +# *pHighwater parameter to sqlite3_status() is of interest. The value written into the +# *pCurrent parameter is undefined. +# +# source://sqlite3//lib/sqlite3/constants.rb#155 +SQLite3::Constants::Status::MALLOC_SIZE = T.let(T.unsafe(nil), Integer) + +# This parameter is the current amount of memory checked out using sqlite3_malloc(), either +# directly or indirectly. The figure includes calls made to sqlite3_malloc() by the +# application and internal memory usage by the SQLite library. Auxiliary page-cache memory +# controlled by SQLITE_CONFIG_PAGECACHE is not included in this parameter. The amount returned +# is the sum of the allocation sizes as reported by the xSize method in sqlite3_mem_methods. +# +# source://sqlite3//lib/sqlite3/constants.rb#132 +SQLite3::Constants::Status::MEMORY_USED = T.let(T.unsafe(nil), Integer) + +# This parameter returns the number of bytes of page cache allocation which could not be +# satisfied by the SQLITE_CONFIG_PAGECACHE buffer and where forced to overflow to +# sqlite3_malloc(). The returned value includes allocations that overflowed because they where +# too large (they were larger than the "sz" parameter to SQLITE_CONFIG_PAGECACHE) and +# allocations that overflowed because no space was left in the page cache. +# +# source://sqlite3//lib/sqlite3/constants.rb#143 +SQLite3::Constants::Status::PAGECACHE_OVERFLOW = T.let(T.unsafe(nil), Integer) + +# This parameter records the largest memory allocation request handed to the pagecache memory +# allocator. Only the value returned in the *pHighwater parameter to sqlite3_status() is of +# interest. The value written into the *pCurrent parameter is undefined. +# +# source://sqlite3//lib/sqlite3/constants.rb#165 +SQLite3::Constants::Status::PAGECACHE_SIZE = T.let(T.unsafe(nil), Integer) + +# This parameter returns the number of pages used out of the pagecache memory allocator that +# was configured using SQLITE_CONFIG_PAGECACHE. The value returned is in pages, not in bytes. +# +# source://sqlite3//lib/sqlite3/constants.rb#136 +SQLite3::Constants::Status::PAGECACHE_USED = T.let(T.unsafe(nil), Integer) + +# The *pHighwater parameter records the deepest parser stack. The *pCurrent value is +# undefined. The *pHighwater value is only meaningful if SQLite is compiled with +# YYTRACKMAXSTACKDEPTH. +# +# source://sqlite3//lib/sqlite3/constants.rb#160 +SQLite3::Constants::Status::PARSER_STACK = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3//lib/sqlite3/constants.rb#149 +SQLite3::Constants::Status::SCRATCH_OVERFLOW = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3//lib/sqlite3/constants.rb#168 +SQLite3::Constants::Status::SCRATCH_SIZE = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3//lib/sqlite3/constants.rb#146 +SQLite3::Constants::Status::SCRATCH_USED = T.let(T.unsafe(nil), Integer) + +# CAPI3REF: Text Encodings +# +# These constant define integer codes that represent the various +# text encodings supported by SQLite. +# +# source://sqlite3//lib/sqlite3/constants.rb#9 +module SQLite3::Constants::TextRep; end + +# Deprecated +# +# source://sqlite3//lib/sqlite3/constants.rb#19 +SQLite3::Constants::TextRep::ANY = T.let(T.unsafe(nil), Integer) + +# sqlite3_create_collation only +# +# source://sqlite3//lib/sqlite3/constants.rb#21 +SQLite3::Constants::TextRep::DETERMINISTIC = T.let(T.unsafe(nil), Integer) + +# Use native byte order +# +# source://sqlite3//lib/sqlite3/constants.rb#17 +SQLite3::Constants::TextRep::UTF16 = T.let(T.unsafe(nil), Integer) + +# IMP: R-51971-34154 +# +# source://sqlite3//lib/sqlite3/constants.rb#15 +SQLite3::Constants::TextRep::UTF16BE = T.let(T.unsafe(nil), Integer) + +# IMP: R-03371-37637 +# +# source://sqlite3//lib/sqlite3/constants.rb#13 +SQLite3::Constants::TextRep::UTF16LE = T.let(T.unsafe(nil), Integer) + +# IMP: R-37514-35566 +# +# source://sqlite3//lib/sqlite3/constants.rb#11 +SQLite3::Constants::TextRep::UTF8 = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/errors.rb#45 +class SQLite3::ConstraintException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#29 +class SQLite3::CorruptException < ::SQLite3::Exception; end + +# The Database class encapsulates a single connection to a SQLite3 database. +# Its usage is very straightforward: +# +# require 'sqlite3' +# +# SQLite3::Database.new( "data.db" ) do |db| +# db.execute( "select * from table" ) do |row| +# p row +# end +# end +# +# It wraps the lower-level methods provided by the selected driver, and +# includes the Pragmas module for access to various pragma convenience +# methods. +# +# The Database class provides type translation services as well, by which +# the SQLite3 data types (which are all represented as strings) may be +# converted into their corresponding types (as defined in the schemas +# for their tables). This translation only occurs when querying data from +# the database--insertions and updates are all still typeless. +# +# Furthermore, the Database class has been designed to work well with the +# ArrayFields module from Ara Howard. If you require the ArrayFields +# module before performing a query, and if you have not enabled results as +# hashes, then the results will all be indexible by field name. +# +# Thread safety: +# +# When `SQLite3.threadsafe?` returns true, it is safe to share instances of +# the database class among threads without adding specific locking. Other +# object instances may require applications to provide their own locks if +# they are to be shared among threads. Please see the README.md for more +# information. +# +# source://sqlite3//lib/sqlite3/database.rb#44 +class SQLite3::Database + include ::SQLite3::Pragmas + + # call-seq: SQLite3::Database.new(file, options = {}) + # + # Create a new Database object that opens the given file. + # + # Supported permissions +options+: + # - the default mode is READWRITE | CREATE + # - +:readonly+: boolean (default false), true to set the mode to +READONLY+ + # - +:readwrite+: boolean (default false), true to set the mode to +READWRITE+ + # - +:flags+: set the mode to a combination of SQLite3::Constants::Open flags. + # + # Supported encoding +options+: + # - +:utf16+: boolean (default false), is the filename's encoding UTF-16 (only needed if the filename encoding is not UTF_16LE or BE) + # + # Other supported +options+: + # - +:strict+: boolean (default false), disallow the use of double-quoted string literals (see https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted) + # - +:results_as_hash+: boolean (default false), return rows as hashes instead of arrays + # - +:default_transaction_mode+: one of +:deferred+ (default), +:immediate+, or +:exclusive+. If a mode is not specified in a call to #transaction, this will be the default transaction mode. + # + # @return [Database] a new instance of Database + # + # source://sqlite3//lib/sqlite3/database.rb#97 + def initialize(file, options = T.unsafe(nil), zvfs = T.unsafe(nil)); end + + # Installs (or removes) a block that will be invoked for every access + # to the database. If the block returns 0 (or +nil+), the statement + # is allowed to proceed. Returning 1 causes an authorization error to + # occur, and returning 2 causes the access to be silently denied. + # + # source://sqlite3//lib/sqlite3/database.rb#160 + def authorizer(&block); end + + def authorizer=(_arg0); end + + # Given a statement, return a result set. + # This is not intended for general consumption + # + # source://sqlite3//lib/sqlite3/database.rb#697 + def build_result_set(stmt); end + + def busy_handler(*_arg0); end + + # Sets a #busy_handler that releases the GVL between retries, + # but only retries up to the indicated number of +milliseconds+. + # This is an alternative to #busy_timeout, which holds the GVL + # while SQLite sleeps and retries. + # + # source://sqlite3//lib/sqlite3/database.rb#646 + def busy_handler_timeout=(milliseconds); end + + def busy_timeout(_arg0); end + def busy_timeout=(_arg0); end + def changes; end + def close; end + def closed?; end + def collation(_arg0, _arg1); end + + # Returns the value of attribute collations. + # + # source://sqlite3//lib/sqlite3/database.rb#45 + def collations; end + + # Commits the current transaction. If there is no current transaction, + # this will cause an error to be raised. This returns +true+, in order + # to allow it to be used in idioms like + # abort? and rollback or commit. + # + # source://sqlite3//lib/sqlite3/database.rb#622 + def commit; end + + def complete?(_arg0); end + + # Creates a new aggregate function for use in SQL statements. Aggregate + # functions are functions that apply over every row in the result set, + # instead of over just a single row. (A very common aggregate function + # is the "count" function, for determining the number of rows that match + # a query.) + # + # The new function will be added as +name+, with the given +arity+. (For + # variable arity functions, use -1 for the arity.) + # + # The +step+ parameter must be a proc object that accepts as its first + # parameter a FunctionProxy instance (representing the function + # invocation), with any subsequent parameters (up to the function's arity). + # The +step+ callback will be invoked once for each row of the result set. + # + # The +finalize+ parameter must be a +proc+ object that accepts only a + # single parameter, the FunctionProxy instance representing the current + # function invocation. It should invoke FunctionProxy#result= to + # store the result of the function. + # + # Example: + # + # db.create_aggregate( "lengths", 1 ) do + # step do |func, value| + # func[ :total ] ||= 0 + # func[ :total ] += ( value ? value.length : 0 ) + # end + # + # finalize do |func| + # func.result = func[ :total ] || 0 + # end + # end + # + # puts db.get_first_value( "select lengths(name) from table" ) + # + # See also #create_aggregate_handler for a more object-oriented approach to + # aggregate functions. + # + # source://sqlite3//lib/sqlite3/database.rb#410 + def create_aggregate(name, arity, step = T.unsafe(nil), finalize = T.unsafe(nil), text_rep = T.unsafe(nil), &block); end + + # This is another approach to creating an aggregate function (see + # #create_aggregate). Instead of explicitly specifying the name, + # callbacks, arity, and type, you specify a factory object + # (the "handler") that knows how to obtain all of that information. The + # handler should respond to the following messages: + # + # +arity+:: corresponds to the +arity+ parameter of #create_aggregate. This + # message is optional, and if the handler does not respond to it, + # the function will have an arity of -1. + # +name+:: this is the name of the function. The handler _must_ implement + # this message. + # +new+:: this must be implemented by the handler. It should return a new + # instance of the object that will handle a specific invocation of + # the function. + # + # The handler instance (the object returned by the +new+ message, described + # above), must respond to the following messages: + # + # +step+:: this is the method that will be called for each step of the + # aggregate function's evaluation. It should implement the same + # signature as the +step+ callback for #create_aggregate. + # +finalize+:: this is the method that will be called to finalize the + # aggregate function's evaluation. It should implement the + # same signature as the +finalize+ callback for + # #create_aggregate. + # + # Example: + # + # class LengthsAggregateHandler + # def self.arity; 1; end + # def self.name; 'lengths'; end + # + # def initialize + # @total = 0 + # end + # + # def step( ctx, name ) + # @total += ( name ? name.length : 0 ) + # end + # + # def finalize( ctx ) + # ctx.result = @total + # end + # end + # + # db.create_aggregate_handler( LengthsAggregateHandler ) + # puts db.get_first_value( "select lengths(name) from A" ) + # + # source://sqlite3//lib/sqlite3/database.rb#508 + def create_aggregate_handler(handler); end + + # Creates a new function for use in SQL statements. It will be added as + # +name+, with the given +arity+. (For variable arity functions, use + # -1 for the arity.) + # + # The block should accept at least one parameter--the FunctionProxy + # instance that wraps this function invocation--and any other + # arguments it needs (up to its arity). + # + # The block does not return a value directly. Instead, it will invoke + # the FunctionProxy#result= method on the +func+ parameter and + # indicate the return value that way. + # + # Example: + # + # db.create_function( "maim", 1 ) do |func, value| + # if value.nil? + # func.result = nil + # else + # func.result = value.split(//).sort.join + # end + # end + # + # puts db.get_first_value( "select maim(name) from table" ) + # + # source://sqlite3//lib/sqlite3/database.rb#365 + def create_function(name, arity, text_rep = T.unsafe(nil), &block); end + + # Define an aggregate function named +name+ using a object template + # object +aggregator+. +aggregator+ must respond to +step+ and +finalize+. + # +step+ will be called with row information and +finalize+ must return the + # return value for the aggregator function. + # + # _API Change:_ +aggregator+ must also implement +clone+. The provided + # +aggregator+ object will serve as template that is cloned to provide the + # individual instances of the aggregate function. Regular ruby objects + # already provide a suitable +clone+. + # The functions arity is the arity of the +step+ method. + # + # source://sqlite3//lib/sqlite3/database.rb#545 + def define_aggregator(name, aggregator); end + + def define_function(_arg0); end + def define_function_with_flags(_arg0, _arg1); end + def enable_load_extension(_arg0); end + + # call-seq: db.encoding + # + # Fetch the encoding set on this database + # + # source://sqlite3//lib/sqlite3/database.rb#152 + def encoding; end + + def errcode; end + def errmsg; end + + # Executes the given SQL statement. If additional parameters are given, + # they are treated as bind variables, and are bound to the placeholders in + # the query. + # + # Note that if any of the values passed to this are hashes, then the + # key/value pairs are each bound separately, with the key being used as + # the name of the placeholder to bind the value to. + # + # The block is optional. If given, it will be invoked for each row returned + # by the query. Otherwise, any results are accumulated into an array and + # returned wholesale. + # + # See also #execute2, #query, and #execute_batch for additional ways of + # executing statements. + # + # source://sqlite3//lib/sqlite3/database.rb#201 + def execute(sql, bind_vars = T.unsafe(nil), &block); end + + # Executes the given SQL statement, exactly as with #execute. However, the + # first row returned (either via the block, or in the returned array) is + # always the names of the columns. Subsequent rows correspond to the data + # from the result set. + # + # Thus, even if the query itself returns no rows, this method will always + # return at least one row--the names of the columns. + # + # See also #execute, #query, and #execute_batch for additional ways of + # executing statements. + # + # source://sqlite3//lib/sqlite3/database.rb#226 + def execute2(sql, *bind_vars); end + + # Executes all SQL statements in the given string. By contrast, the other + # means of executing queries will only execute the first statement in the + # string, ignoring all subsequent statements. This will execute each one + # in turn. The same bind parameters, if given, will be applied to each + # statement. + # + # This always returns the result of the last statement. + # + # See also #execute_batch2 for additional ways of + # executing statements. + # + # source://sqlite3//lib/sqlite3/database.rb#250 + def execute_batch(sql, bind_vars = T.unsafe(nil)); end + + # Executes all SQL statements in the given string. By contrast, the other + # means of executing queries will only execute the first statement in the + # string, ignoring all subsequent statements. This will execute each one + # in turn. Bind parameters cannot be passed to #execute_batch2. + # + # If a query is made, all values will be returned as strings. + # If no query is made, an empty array will be returned. + # + # Because all values except for 'NULL' are returned as strings, + # a block can be passed to parse the values accordingly. + # + # See also #execute_batch for additional ways of + # executing statements. + # + # source://sqlite3//lib/sqlite3/database.rb#283 + def execute_batch2(sql, &block); end + + def extended_result_codes=(_arg0); end + + # Returns the filename for the database named +db_name+. +db_name+ defaults + # to "main". Main return `nil` or an empty string if the database is + # temporary or in-memory. + # + # source://sqlite3//lib/sqlite3/database.rb#183 + def filename(db_name = T.unsafe(nil)); end + + # A convenience method for obtaining the first row of a result set, and + # discarding all others. It is otherwise identical to #execute. + # + # See also #get_first_value. + # + # source://sqlite3//lib/sqlite3/database.rb#322 + def get_first_row(sql, *bind_vars); end + + # A convenience method for obtaining the first value of the first row of a + # result set, and discarding all other values and rows. It is otherwise + # identical to #execute. + # + # See also #get_first_row. + # + # source://sqlite3//lib/sqlite3/database.rb#331 + def get_first_value(sql, *bind_vars); end + + def interrupt; end + def last_insert_row_id; end + def load_extension(_arg0); end + + # Returns a Statement object representing the given SQL. This does not + # execute the statement; it merely prepares the statement for execution. + # + # The Statement can then be executed using Statement#execute. + # + # source://sqlite3//lib/sqlite3/database.rb#169 + def prepare(sql); end + + # This is a convenience method for creating a statement, binding + # parameters to it, and calling execute: + # + # result = db.query( "select * from foo where a=?", [5]) + # # is the same as + # result = db.prepare( "select * from foo where a=?" ).execute( 5 ) + # + # You must be sure to call +close+ on the ResultSet instance that is + # returned, or you could have problems with locks on the table. If called + # with a block, +close+ will be invoked implicitly when the block + # terminates. + # + # source://sqlite3//lib/sqlite3/database.rb#305 + def query(sql, bind_vars = T.unsafe(nil)); end + + # Returns +true+ if the database has been open in readonly mode + # A helper to check before performing any operation + # + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3/database.rb#638 + def readonly?; end + + # A boolean that indicates whether rows in result sets should be returned + # as hashes or not. By default, rows are returned as arrays. + # + # source://sqlite3//lib/sqlite3/database.rb#77 + def results_as_hash; end + + # A boolean that indicates whether rows in result sets should be returned + # as hashes or not. By default, rows are returned as arrays. + # + # source://sqlite3//lib/sqlite3/database.rb#77 + def results_as_hash=(_arg0); end + + # Rolls the current transaction back. If there is no current transaction, + # this will cause an error to be raised. This returns +true+, in order + # to allow it to be used in idioms like + # abort? and rollback or commit. + # + # source://sqlite3//lib/sqlite3/database.rb#631 + def rollback; end + + def statement_timeout=(_arg0); end + def total_changes; end + def trace(*_arg0); end + + # Begins a new transaction. Note that nested transactions are not allowed + # by SQLite, so attempting to nest a transaction will result in a runtime + # exception. + # + # The +mode+ parameter may be either :deferred, + # :immediate, or :exclusive. + # If `nil` is specified, the default transaction mode, which was + # passed to #initialize, is used. + # + # If a block is given, the database instance is yielded to it, and the + # transaction is committed when the block terminates. If the block + # raises an exception, a rollback will be performed instead. Note that if + # a block is given, #commit and #rollback should never be called + # explicitly or you'll get an error when the block terminates. + # + # If a block is not given, it is the caller's responsibility to end the + # transaction explicitly, either by calling #commit, or by calling + # #rollback. + # + # source://sqlite3//lib/sqlite3/database.rb#599 + def transaction(mode = T.unsafe(nil)); end + + def transaction_active?; end + + private + + def db_filename(_arg0); end + def define_aggregator2(_arg0, _arg1); end + def disable_quirk_mode; end + def discard; end + def exec_batch(_arg0, _arg1); end + def open16(_arg0); end + def open_v2(_arg0, _arg1, _arg2); end + + class << self + # Without block works exactly as new. + # With block, like new closes the database at the end, but unlike new + # returns the result of the block instead of the database instance. + # + # source://sqlite3//lib/sqlite3/database.rb#53 + def open(*args); end + + # Quotes the given string, making it safe to use in an SQL statement. + # It replaces all instances of the single-quote character with two + # single-quote characters. The modified string is returned. + # + # source://sqlite3//lib/sqlite3/database.rb#70 + def quote(string); end + end +end + +# A helper class for dealing with custom functions (see #create_function, +# #create_aggregate, and #create_aggregate_handler). It encapsulates the +# opaque function object that represents the current invocation. It also +# provides more convenient access to the API functions that operate on +# the function object. +# +# This class will almost _always_ be instantiated indirectly, by working +# with the create methods mentioned above. +# +# source://sqlite3//lib/sqlite3/database.rb#669 +class SQLite3::Database::FunctionProxy + # Create a new FunctionProxy that encapsulates the given +func+ object. + # If context is non-nil, the functions context will be set to that. If + # it is non-nil, it must quack like a Hash. If it is nil, then none of + # the context functions will be available. + # + # @return [FunctionProxy] a new instance of FunctionProxy + # + # source://sqlite3//lib/sqlite3/database.rb#676 + def initialize; end + + # Returns the value with the given key from the context. This is only + # available to aggregate functions. + # + # source://sqlite3//lib/sqlite3/database.rb#683 + def [](key); end + + # Sets the value with the given key in the context. This is only + # available to aggregate functions. + # + # source://sqlite3//lib/sqlite3/database.rb#689 + def []=(key, value); end + + # Returns the value of attribute result. + # + # source://sqlite3//lib/sqlite3/database.rb#670 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://sqlite3//lib/sqlite3/database.rb#670 + def result=(_arg0); end +end + +# source://sqlite3//lib/sqlite3/errors.rb#39 +class SQLite3::EmptyException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#4 +class SQLite3::Exception < ::StandardError + # A convenience for accessing the error code for this exception. + # + # source://sqlite3//lib/sqlite3/errors.rb#6 + def code; end +end + +# source://sqlite3//lib/sqlite3/fork_safety.rb#7 +module SQLite3::ForkSafety + class << self + # source://sqlite3//lib/sqlite3/fork_safety.rb#33 + def discard; end + + # source://sqlite3//lib/sqlite3/fork_safety.rb#23 + def hook!; end + + # Call to suppress the fork-related warnings. + # + # source://sqlite3//lib/sqlite3/fork_safety.rb#55 + def suppress_warnings!; end + + # source://sqlite3//lib/sqlite3/fork_safety.rb#27 + def track(database); end + end +end + +# source://sqlite3//lib/sqlite3/fork_safety.rb#8 +module SQLite3::ForkSafety::CoreExt + # source://sqlite3//lib/sqlite3/fork_safety.rb#9 + def _fork; end +end + +# source://sqlite3//lib/sqlite3/errors.rb#55 +class SQLite3::FormatException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#33 +class SQLite3::FullException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/resultset.rb#93 +class SQLite3::HashResultSet < ::SQLite3::ResultSet + # source://sqlite3//lib/sqlite3/resultset.rb#85 + def next; end +end + +# source://sqlite3//lib/sqlite3/errors.rb#27 +class SQLite3::IOException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#11 +class SQLite3::InternalException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#25 +class SQLite3::InterruptException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#19 +class SQLite3::LockedException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#21 +class SQLite3::MemoryException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#47 +class SQLite3::MismatchException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#49 +class SQLite3::MisuseException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#59 +class SQLite3::NotADatabaseException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#31 +class SQLite3::NotFoundException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#13 +class SQLite3::PermissionException < ::SQLite3::Exception; end + +# This module is intended for inclusion solely by the Database class. It +# defines convenience methods for the various pragmas supported by SQLite3. +# +# For a detailed description of these pragmas, see the SQLite3 documentation +# at http://sqlite.org/pragma.html. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#9 +module SQLite3::Pragmas + # source://sqlite3//lib/sqlite3/pragmas.rb#101 + def application_id; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#105 + def application_id=(integer); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#109 + def auto_vacuum; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#113 + def auto_vacuum=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#117 + def automatic_index; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#121 + def automatic_index=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#125 + def busy_timeout; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#129 + def busy_timeout=(milliseconds); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#133 + def cache_size; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#137 + def cache_size=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#141 + def cache_spill; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#145 + def cache_spill=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#149 + def case_sensitive_like=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#153 + def cell_size_check; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#157 + def cell_size_check=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#161 + def checkpoint_fullfsync; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#165 + def checkpoint_fullfsync=(mode); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#169 + def collation_list(&block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#173 + def compile_options(&block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#177 + def count_changes; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#181 + def count_changes=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#185 + def data_version; end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#189 + def database_list(&block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#193 + def default_cache_size; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#197 + def default_cache_size=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#201 + def default_synchronous; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#205 + def default_synchronous=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#209 + def default_temp_store; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#213 + def default_temp_store=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#217 + def defer_foreign_keys; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#221 + def defer_foreign_keys=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#225 + def encoding; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#229 + def encoding=(mode); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#233 + def foreign_key_check(*table, &block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#237 + def foreign_key_list(table, &block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#241 + def foreign_keys; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#245 + def foreign_keys=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#249 + def freelist_count; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#253 + def full_column_names; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#257 + def full_column_names=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#261 + def fullfsync; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#265 + def fullfsync=(mode); end + + # Returns +true+ or +false+ depending on the value of the named pragma. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#11 + def get_boolean_pragma(name); end + + # Return the value of the given pragma. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#51 + def get_enum_pragma(name); end + + # Returns the value of the given pragma as an integer. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#69 + def get_int_pragma(name); end + + # Requests the given pragma (and parameters), and if the block is given, + # each row of the result set will be yielded to it. Otherwise, the results + # are returned as an array. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#41 + def get_query_pragma(name, *params, &block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#269 + def ignore_check_constraints=(mode); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#273 + def incremental_vacuum(pages, &block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#277 + def index_info(index, &block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#281 + def index_list(table, &block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#285 + def index_xinfo(index, &block); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#289 + def integrity_check(*num_errors, &block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#293 + def journal_mode; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#297 + def journal_mode=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#301 + def journal_size_limit; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#305 + def journal_size_limit=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#309 + def legacy_file_format; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#313 + def legacy_file_format=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#317 + def locking_mode; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#321 + def locking_mode=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#325 + def max_page_count; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#329 + def max_page_count=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#333 + def mmap_size; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#337 + def mmap_size=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#341 + def page_count; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#345 + def page_size; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#349 + def page_size=(size); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#353 + def parser_trace=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#357 + def query_only; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#361 + def query_only=(mode); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#365 + def quick_check(*num_errors, &block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#369 + def read_uncommitted; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#373 + def read_uncommitted=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#377 + def recursive_triggers; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#381 + def recursive_triggers=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#385 + def reverse_unordered_selects; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#389 + def reverse_unordered_selects=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#393 + def schema_cookie; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#397 + def schema_cookie=(cookie); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#401 + def schema_version; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#405 + def schema_version=(version); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#409 + def secure_delete; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#413 + def secure_delete=(mode); end + + # Sets the given pragma to the given boolean value. The value itself + # may be +true+ or +false+, or any other commonly used string or + # integer that represents truth. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#18 + def set_boolean_pragma(name, mode); end + + # Set the value of the given pragma to +mode+. The +mode+ parameter must + # conform to one of the values in the given +enum+ array. Each entry in + # the array is another array comprised of elements in the enumeration that + # have duplicate values. See #synchronous, #default_synchronous, + # #temp_store, and #default_temp_store for usage examples. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#60 + def set_enum_pragma(name, mode, enums); end + + # Set the value of the given pragma to the integer value of the +value+ + # parameter. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#75 + def set_int_pragma(name, value); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#417 + def short_column_names; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#421 + def short_column_names=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#425 + def shrink_memory; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#429 + def soft_heap_limit; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#433 + def soft_heap_limit=(mode); end + + # :yields: row + # + # source://sqlite3//lib/sqlite3/pragmas.rb#437 + def stats(&block); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#441 + def synchronous; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#445 + def synchronous=(mode); end + + # Returns information about +table+. Yields each row of table information + # if a block is provided. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#524 + def table_info(table); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#449 + def temp_store; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#453 + def temp_store=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#457 + def threads; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#461 + def threads=(count); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#465 + def user_cookie; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#469 + def user_cookie=(cookie); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#473 + def user_version; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#477 + def user_version=(version); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#481 + def vdbe_addoptrace=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#485 + def vdbe_debug=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#489 + def vdbe_listing=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#493 + def vdbe_trace; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#497 + def vdbe_trace=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#501 + def wal_autocheckpoint; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#505 + def wal_autocheckpoint=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#509 + def wal_checkpoint; end + + # source://sqlite3//lib/sqlite3/pragmas.rb#513 + def wal_checkpoint=(mode); end + + # source://sqlite3//lib/sqlite3/pragmas.rb#517 + def writable_schema=(mode); end + + private + + # Since SQLite 3.3.8, the table_info pragma has returned the default + # value of the row as a quoted SQL value. This method essentially + # unquotes those values. + # + # source://sqlite3//lib/sqlite3/pragmas.rb#574 + def tweak_default(hash); end + + # Compares two version strings + # + # source://sqlite3//lib/sqlite3/pragmas.rb#558 + def version_compare(v1, v2); end +end + +# The enumeration of valid auto vacuum modes. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#86 +SQLite3::Pragmas::AUTO_VACUUM_MODES = T.let(T.unsafe(nil), Array) + +# The list of valid encodings. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#96 +SQLite3::Pragmas::ENCODINGS = T.let(T.unsafe(nil), Array) + +# The list of valid journaling modes. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#89 +SQLite3::Pragmas::JOURNAL_MODES = T.let(T.unsafe(nil), Array) + +# The list of valid locking modes. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#93 +SQLite3::Pragmas::LOCKING_MODES = T.let(T.unsafe(nil), Array) + +# The enumeration of valid synchronous modes. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#80 +SQLite3::Pragmas::SYNCHRONOUS_MODES = T.let(T.unsafe(nil), Array) + +# The enumeration of valid temp store modes. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#83 +SQLite3::Pragmas::TEMP_STORE_MODES = T.let(T.unsafe(nil), Array) + +# The list of valid WAL checkpoints. +# +# source://sqlite3//lib/sqlite3/pragmas.rb#99 +SQLite3::Pragmas::WAL_CHECKPOINTS = T.let(T.unsafe(nil), Array) + +# source://sqlite3//lib/sqlite3/errors.rb#37 +class SQLite3::ProtocolException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#57 +class SQLite3::RangeException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#23 +class SQLite3::ReadOnlyException < ::SQLite3::Exception; end + +# The ResultSet object encapsulates the enumerability of a query's output. +# It is a simple cursor over the data that the query returns. It will +# very rarely (if ever) be instantiated directly. Instead, clients should +# obtain a ResultSet instance via Statement#execute. +# +# source://sqlite3//lib/sqlite3/resultset.rb#9 +class SQLite3::ResultSet + include ::Enumerable + + # Create a new ResultSet attached to the given database, using the + # given sql text. + # + # @return [ResultSet] a new instance of ResultSet + # + # source://sqlite3//lib/sqlite3/resultset.rb#14 + def initialize(db, stmt); end + + # Closes the statement that spawned this result set. + # Use with caution! Closing a result set will automatically + # close any other result sets that were spawned from the same statement. + # + # source://sqlite3//lib/sqlite3/resultset.rb#65 + def close; end + + # Queries whether the underlying statement has been closed or not. + # + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3/resultset.rb#70 + def closed?; end + + # Returns the names of the columns returned by this result set. + # + # source://sqlite3//lib/sqlite3/resultset.rb#80 + def columns; end + + # Required by the Enumerable mixin. Provides an internal iterator over the + # rows of the result set. + # + # source://sqlite3//lib/sqlite3/resultset.rb#48 + def each; end + + # Provides an internal iterator over the rows of the result set where + # each row is yielded as a hash. + # + # source://sqlite3//lib/sqlite3/resultset.rb#56 + def each_hash; end + + # Query whether the cursor has reached the end of the result set or not. + # + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3/resultset.rb#27 + def eof?; end + + # Obtain the next row from the cursor. If there are no more rows to be + # had, this will return +nil+. + # + # The returned value will be an array, unless Database#results_as_hash has + # been set to +true+, in which case the returned value will be a hash. + # + # For arrays, the column names are accessible via the +fields+ property, + # and the column types are accessible via the +types+ property. + # + # For hashes, the column names are the keys of the hash, and the column + # types are accessible via the +types+ property. + # + # source://sqlite3//lib/sqlite3/resultset.rb#42 + def next; end + + # Return the next row as a hash + # + # source://sqlite3//lib/sqlite3/resultset.rb#85 + def next_hash; end + + # Reset the cursor, so that a result set which has reached end-of-file + # can be rewound and reiterated. + # + # source://sqlite3//lib/sqlite3/resultset.rb#21 + def reset(*bind_params); end + + # Returns the types of the columns returned by this result set. + # + # source://sqlite3//lib/sqlite3/resultset.rb#75 + def types; end +end + +# source://sqlite3//lib/sqlite3/errors.rb#9 +class SQLite3::SQLException < ::SQLite3::Exception; end + +SQLite3::SQLITE_LOADED_VERSION = T.let(T.unsafe(nil), String) +SQLite3::SQLITE_VERSION = T.let(T.unsafe(nil), String) +SQLite3::SQLITE_VERSION_NUMBER = T.let(T.unsafe(nil), Integer) + +# source://sqlite3//lib/sqlite3/errors.rb#41 +class SQLite3::SchemaChangedException < ::SQLite3::Exception; end + +# A statement represents a prepared-but-unexecuted SQL query. It will rarely +# (if ever) be instantiated directly by a client, and is most often obtained +# via the Database#prepare method. +# +# source://sqlite3//lib/sqlite3/statement.rb#14 +class SQLite3::Statement + include ::Enumerable + + # call-seq: SQLite3::Statement.new(db, sql) + # + # Create a new statement attached to the given Database instance, and which + # encapsulates the given SQL text. If the text contains more than one + # statement (i.e., separated by semicolons), then the #remainder property + # will be set to the trailing text. + # + # @raise [ArgumentError] + # @return [Statement] a new instance of Statement + # + # source://sqlite3//lib/sqlite3/statement.rb#28 + def initialize(db, sql); end + + # Returns true if the statement is currently active, meaning it has an + # open result set. + # + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3/statement.rb#111 + def active?; end + + def bind_param(_arg0, _arg1); end + def bind_parameter_count; end + + # Binds the given variables to the corresponding placeholders in the SQL + # text. + # + # See Database#execute for a description of the valid placeholder + # syntaxes. + # + # Example: + # + # stmt = db.prepare( "select * from table where a=? and b=?" ) + # stmt.bind_params( 15, "hello" ) + # + # See also #execute, #bind_param, Statement#bind_param, and + # Statement#bind_params. + # + # source://sqlite3//lib/sqlite3/statement.rb#52 + def bind_params(*bind_vars); end + + def clear_bindings!; end + def close; end + def closed?; end + def column_count; end + def column_decltype(_arg0); end + def column_name(_arg0); end + + # Return an array of the column names for this statement. Note that this + # may execute the statement in order to obtain the metadata; this makes it + # a (potentially) expensive operation. + # + # source://sqlite3//lib/sqlite3/statement.rb#118 + def columns; end + + def done?; end + + # source://sqlite3//lib/sqlite3/statement.rb#123 + def each; end + + # Execute the statement. This creates a new ResultSet object for the + # statement's virtual machine. If a block was given, the new ResultSet will + # be yielded to it; otherwise, the ResultSet will be returned. + # + # Any parameters will be bound to the statement using #bind_params. + # + # Example: + # + # stmt = db.prepare( "select * from table" ) + # stmt.execute do |result| + # ... + # end + # + # See also #bind_params, #execute!. + # + # @yield [results] + # + # source://sqlite3//lib/sqlite3/statement.rb#78 + def execute(*bind_vars); end + + # Execute the statement. If no block was given, this returns an array of + # rows returned by executing the statement. Otherwise, each row will be + # yielded to the block. + # + # Any parameters will be bound to the statement using #bind_params. + # + # Example: + # + # stmt = db.prepare( "select * from table" ) + # stmt.execute! do |row| + # ... + # end + # + # See also #bind_params, #execute. + # + # source://sqlite3//lib/sqlite3/statement.rb#104 + def execute!(*bind_vars, &block); end + + def expanded_sql; end + def memused; end + + # Performs a sanity check to ensure that the statement is not + # closed. If it is, an exception is raised. + # + # source://sqlite3//lib/sqlite3/statement.rb#142 + def must_be_open!; end + + # This is any text that followed the first valid SQL statement in the text + # with which the statement was initialized. If there was no trailing text, + # this will be the empty string. + # + # source://sqlite3//lib/sqlite3/statement.rb#20 + def remainder; end + + def reset!; end + def sql; end + + # Returns a Hash containing information about the statement. + # The contents of the hash are implementation specific and may change in + # the future without notice. The hash includes information about internal + # statistics about the statement such as: + # - +fullscan_steps+: the number of times that SQLite has stepped forward + # in a table as part of a full table scan + # - +sorts+: the number of sort operations that have occurred + # - +autoindexes+: the number of rows inserted into transient indices + # that were created automatically in order to help joins run faster + # - +vm_steps+: the number of virtual machine operations executed by the + # prepared statement + # - +reprepares+: the number of times that the prepare statement has been + # automatically regenerated due to schema changes or changes to bound + # parameters that might affect the query plan + # - +runs+: the number of times that the prepared statement has been run + # - +filter_misses+: the number of times that the Bloom filter returned + # a find, and thus the join step had to be processed as normal + # - +filter_hits+: the number of times that a join step was bypassed + # because a Bloom filter returned not-found + # + # source://sqlite3//lib/sqlite3/statement.rb#167 + def stat(key = T.unsafe(nil)); end + + def step; end + + # Return an array of the data types for each column in this statement. Note + # that this may execute the statement in order to obtain the metadata; this + # makes it a (potentially) expensive operation. + # + # source://sqlite3//lib/sqlite3/statement.rb#134 + def types; end + + private + + # A convenience method for obtaining the metadata about the query. Note + # that this will actually execute the SQL, which means it can be a + # (potentially) expensive operation. + # + # source://sqlite3//lib/sqlite3/statement.rb#180 + def get_metadata; end + + def prepare(_arg0, _arg1); end + def stat_for(_arg0); end + def stats_as_hash; end +end + +# source://sqlite3//lib/sqlite3/errors.rb#43 +class SQLite3::TooBigException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/errors.rb#51 +class SQLite3::UnsupportedException < ::SQLite3::Exception; end + +# source://sqlite3//lib/sqlite3/version.rb#2 +SQLite3::VERSION = T.let(T.unsafe(nil), String) + +# source://sqlite3//lib/sqlite3/value.rb#4 +class SQLite3::Value + # @return [Value] a new instance of Value + # + # source://sqlite3//lib/sqlite3/value.rb#7 + def initialize(db, handle); end + + # Returns the value of attribute handle. + # + # source://sqlite3//lib/sqlite3/value.rb#5 + def handle; end + + # source://sqlite3//lib/sqlite3/value.rb#20 + def length(utf16 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://sqlite3//lib/sqlite3/value.rb#12 + def null?; end + + # source://sqlite3//lib/sqlite3/value.rb#16 + def to_blob; end + + # source://sqlite3//lib/sqlite3/value.rb#28 + def to_f; end + + # source://sqlite3//lib/sqlite3/value.rb#32 + def to_i; end + + # source://sqlite3//lib/sqlite3/value.rb#36 + def to_int64; end + + # source://sqlite3//lib/sqlite3/value.rb#40 + def to_s(utf16 = T.unsafe(nil)); end + + # source://sqlite3//lib/sqlite3/value.rb#44 + def type; end +end + +# source://sqlite3//lib/sqlite3/statement.rb#4 +class String + include ::Comparable + + # source://sqlite3//lib/sqlite3/statement.rb#5 + def to_blob; end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/sshkit@1.23.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/sshkit@1.23.1.rbi new file mode 100644 index 0000000..d94d74b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/sshkit@1.23.1.rbi @@ -0,0 +1,1802 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `sshkit` gem. +# Please instead update this file by running `bin/tapioca gem sshkit`. + + +# source://sshkit//lib/core_ext/array.rb#1 +class Array + include ::Enumerable + + # source://sshkit//lib/core_ext/array.rb#2 + def extract_options!; end +end + +# source://sshkit//lib/core_ext/hash.rb#1 +class Hash + include ::Enumerable + + # source://sshkit//lib/core_ext/hash.rb#2 + def symbolize_keys; end + + # source://sshkit//lib/core_ext/hash.rb#8 + def symbolize_keys!; end +end + +# source://sshkit//lib/sshkit/backends/netssh.rb#6 +module Net::SSH + class << self + # source://net-ssh/7.2.3/lib/net/ssh.rb#298 + def assign_defaults(options); end + + # source://net-ssh/7.2.3/lib/net/ssh.rb#288 + def configuration_for(host, use_ssh_config); end + + # source://net-ssh/7.2.3/lib/net/ssh.rb#225 + def start(host, user = T.unsafe(nil), options = T.unsafe(nil), &block); end + + private + + # source://net-ssh/7.2.3/lib/net/ssh.rb#311 + def _sanitize_options(options); end + + # source://net-ssh/7.2.3/lib/net/ssh.rb#320 + def _support_deprecated_option_paranoid(options); end + end +end + +# source://sshkit//lib/sshkit/backends/netssh.rb#7 +class Net::SSH::Config + class << self + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#60 + def default_auth_methods; end + + # source://sshkit//lib/sshkit/backends/netssh.rb#11 + def default_files; end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#186 + def expandable_default_files; end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#68 + def for(host, files = T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#80 + def load(path, host, settings = T.unsafe(nil), base_dir = T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#176 + def translate(settings); end + + private + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#365 + def eval_match_conditions(condition, host, settings); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#353 + def included_file_paths(base_dir, config_paths); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#336 + def interpret_size(size); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#345 + def merge_challenge_response_with_keyboard_interactive(hash); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#316 + def pattern2regex(pattern); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#301 + def setup_proxy(type, value); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#361 + def tokenize_config_value(str); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#235 + def translate_config_key(hash, key, value, settings); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#208 + def translate_keepalive(hash, value); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#197 + def translate_verify_host_key(value); end + + # source://net-ssh/7.2.3/lib/net/ssh/config.rb#400 + def unquote(string); end + end +end + +module Net::SSH::Proxy; end + +# source://sshkit//lib/sshkit/backends/connection_pool.rb#15 +class Net::SSH::Proxy::Command + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#32 + def initialize(command_line_template); end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#116 + def close_on_error(io); end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#23 + def command_line; end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#20 + def command_line_template; end + + # Ensure a stable string value is used, rather than memory address. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#17 + def inspect; end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#40 + def open(host, port, connection_options = T.unsafe(nil)); end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#26 + def timeout; end + + # source://net-ssh/7.2.3/lib/net/ssh/proxy/command.rb#26 + def timeout=(_arg0); end +end + +#  @author Lee Hambley +# +# source://sshkit//lib/sshkit.rb#1 +module SSHKit + class << self + # source://sshkit//lib/sshkit.rb#14 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://sshkit//lib/sshkit.rb#7 + def config=(_arg0); end + + # @yield [config] + # + # source://sshkit//lib/sshkit.rb#9 + def configure; end + + # source://sshkit//lib/sshkit.rb#18 + def reset_configuration!; end + end +end + +# source://sshkit//lib/sshkit/backends/abstract.rb#5 +module SSHKit::Backend + class << self + # The Backend instance that is running in the current thread. If no Backend + # is running, returns `nil` instead. + # + # Example: + # + # on(:local) do + # self == SSHKit::Backend.current # => true + # end + # + # source://sshkit//lib/sshkit/backends/abstract.rb#18 + def current; end + end +end + +# source://sshkit//lib/sshkit/backends/abstract.rb#22 +class SSHKit::Backend::Abstract + extend ::Forwardable + + # @return [Abstract] a new instance of Abstract + # + # source://sshkit//lib/sshkit/backends/abstract.rb#36 + def initialize(host, &block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#105 + def as(who, &_block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#70 + def background(*args); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#64 + def capture(*args); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#13 + def capture_with_debug(*args, **kwargs); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#9 + def capture_with_info(*args, **kwargs); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#17 + def capture_with_pretty_json(*args, **kwargs); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # @raise [MethodUnavailableError] + # + # source://sshkit//lib/sshkit/backends/abstract.rb#137 + def download!(_remote, _local = T.unsafe(nil), _options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def error(*args, **_arg1, &block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def execute(*args); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fatal(*args, **_arg1, &block); end + + # Returns the value of attribute host. + # + # source://sshkit//lib/sshkit/backends/abstract.rb#27 + def host; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def info(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def log(*args, **_arg1, &block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#51 + def make(commands = T.unsafe(nil)); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#21 + def puts_by_host(host, output, type: T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#55 + def rake(commands = T.unsafe(nil)); end + + # Used in execute_command to hide redact() args a user passes in + # + # source://sshkit//lib/sshkit/backends/abstract.rb#47 + def redact(arg); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#29 + def run; end + + # source://sshkit//lib/sshkit/backends/abstract.rb#59 + def test(*args); end + + # Backends which extend the Abstract backend should implement the following methods: + # + # @raise [MethodUnavailableError] + # + # source://sshkit//lib/sshkit/backends/abstract.rb#136 + def upload!(_local, _remote, _options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def warn(*args, **_arg1, &block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#97 + def with(environment, &_block); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#83 + def within(directory, &_block); end + + private + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#36 + def command(args, options); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#147 + def create_command_and_execute(args, options); end + + # @raise [MethodUnavailableError] + # + # source://sshkit//lib/sshkit/backends/abstract.rb#138 + def execute_command(_cmd); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#143 + def output; end + + # source://sshkit//lib/sshkit/backends/abstract.rb#151 + def pwd_path; end + + class << self + # source://sshkit//lib/sshkit/backends/abstract.rb#126 + def config; end + + # @yield [config] + # + # source://sshkit//lib/sshkit/backends/abstract.rb#130 + def configure; end + end +end + +# The ConnectionPool caches connections and allows them to be reused, so long as +# the reuse happens within the `idle_timeout` period. Timed out connections are +# eventually closed, forcing a new connection to be used in that case. +# +# Additionally, a background thread is started to check for abandoned +# connections that have timed out without any attempt at being reused. These +# are eventually closed as well and removed from the cache. +# +# If `idle_timeout` set to `false`, `0`, or `nil`, no caching is performed, and +# a new connection is created and then immediately closed each time. The default +# timeout is 30 (seconds). +# +# There is a single public method: `with`. Example usage: +# +# pool = SSHKit::Backend::ConnectionPool.new +# pool.with(Net::SSH.method(:start), "host", "username") do |connection| +# # do stuff with connection +# end +# +# source://sshkit//lib/sshkit/backends/connection_pool.rb#41 +class SSHKit::Backend::ConnectionPool + # @return [ConnectionPool] a new instance of ConnectionPool + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#44 + def initialize(idle_timeout = T.unsafe(nil)); end + + # Immediately close all cached connections and empty the pool. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#80 + def close_connections; end + + # Immediately remove all cached connections, without closing them. This only + # exists for unit test purposes. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#75 + def flush_connections; end + + # Returns the value of attribute idle_timeout. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#42 + def idle_timeout; end + + # Sets the attribute idle_timeout + # + # @param value the value to set the attribute idle_timeout to. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#42 + def idle_timeout=(_arg0); end + + # Creates a new connection or reuses a cached connection (if possible) and + # yields the connection to the given block. Connections are created by + # invoking the `connection_factory` proc with the given `args`. The arguments + # are used to construct a key used for caching. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#60 + def with(connection_factory, *args); end + + protected + + # Returns the value of attribute caches. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#90 + def caches; end + + # Returns the value of attribute timed_out_connections. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#90 + def timed_out_connections; end + + private + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#98 + def cache_enabled?; end + + # source://sshkit//lib/sshkit/backends/connection_pool.rb#94 + def cache_key_for_connection_args(args); end + + # Look up a Cache that matches the given connection arguments. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#103 + def find_cache(args); end + + # Immediately close any connections that are pending closure. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#147 + def process_deferred_close; end + + # Loops indefinitely to close connections and to find abandoned connections + # that need to be closed. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#135 + def run_eviction_loop; end + + # Close the given `connection` immediately, assuming it responds to a `close` + # method. If it doesn't, or if `nil` is provided, it is silently ignored. Any + # `StandardError` is also silently ignored. Returns `true` if the connection + # was closed; `false` if it was already closed or could not be closed due to + # an error. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#172 + def silently_close_connection(connection); end + + # Adds the connection to a queue that is processed asynchronously by a + # background thread. The connection will eventually be closed. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#163 + def silently_close_connection_later(connection); end + + # Cache creation needs to happen in a mutex, because otherwise a race + # condition might cause two identical caches to be created for the same key. + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#114 + def thread_safe_find_or_create_cache(key); end + + # Update cache key with changed args to prevent cache miss + # + # source://sshkit//lib/sshkit/backends/connection_pool.rb#123 + def update_key_if_args_changed(cache, args); end +end + +# A Cache holds connections for a given key. Each connection is stored along +# with an expiration time so that its idle duration can be measured. +# +# source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#3 +class SSHKit::Backend::ConnectionPool::Cache + # @return [Cache] a new instance of Cache + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#6 + def initialize(key, idle_timeout, closer); end + + # Close all connections and completely clear the cache. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#52 + def clear; end + + # Close and remove any connections in this Cache that have been idle for + # too long. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#36 + def evict; end + + # Returns the value of attribute key. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#4 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#4 + def key=(_arg0); end + + # Remove and return a fresh connection from this Cache. Returns `nil` if + # the Cache is empty or if all existing connections have gone stale. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#16 + def pop; end + + # Return a connection to this Cache. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#25 + def push(conn); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#59 + def same_key?(other_key); end + + protected + + # Returns the value of attribute closer. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#65 + def closer; end + + # Returns the value of attribute connections. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#65 + def connections; end + + # Returns the value of attribute idle_timeout. + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#65 + def idle_timeout; end + + private + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#73 + def closed?(conn); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/connection_pool/cache.rb#69 + def fresh?(expires_at); end +end + +# source://sshkit//lib/sshkit/backends/connection_pool/nil_cache.rb#3 +class SSHKit::Backend::ConnectionPool::NilCache < ::Struct + def closer; end + def closer=(_); end + + # source://sshkit//lib/sshkit/backends/connection_pool/nil_cache.rb#4 + def pop; end + + # source://sshkit//lib/sshkit/backends/connection_pool/nil_cache.rb#8 + def push(conn); end + + # source://sshkit//lib/sshkit/backends/connection_pool/nil_cache.rb#12 + def same_key?(_key); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://sshkit//lib/sshkit/backends/local.rb#7 +class SSHKit::Backend::Local < ::SSHKit::Backend::Abstract + # @return [Local] a new instance of Local + # + # source://sshkit//lib/sshkit/backends/local.rb#9 + def initialize(_ = T.unsafe(nil), &block); end + + # source://sshkit//lib/sshkit/backends/local.rb#28 + def download!(remote, local = T.unsafe(nil), _options = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/backends/local.rb#13 + def upload!(local, remote, options = T.unsafe(nil)); end + + private + + # source://sshkit//lib/sshkit/backends/local.rb#41 + def execute_command(cmd); end +end + +# source://sshkit//lib/sshkit/backends/abstract.rb#7 +class SSHKit::Backend::MethodUnavailableError < ::SSHKit::StandardError; end + +# source://sshkit//lib/sshkit/backends/netssh.rb#23 +class SSHKit::Backend::Netssh < ::SSHKit::Backend::Abstract + extend ::SSHKit::Backend::Netssh::LimitConcurrentStartsClass + + # source://sshkit//lib/sshkit/backends/netssh.rb#87 + def download!(remote, local = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/backends/netssh.rb#79 + def upload!(local, remote, options = T.unsafe(nil)); end + + private + + # source://sshkit//lib/sshkit/backends/netssh.rb#141 + def execute_command(cmd); end + + # source://sshkit//lib/sshkit/backends/netssh.rb#116 + def transfer_summarizer(action, options = T.unsafe(nil)); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#83 + def with_ssh(&block); end + + # source://sshkit//lib/sshkit/backends/netssh.rb#201 + def with_transfer(summarizer); end + + class << self + # @raise [ArgumentError] + # + # source://sshkit//lib/sshkit/backends/netssh.rb#24 + def assert_valid_transfer_method!(method); end + + # source://sshkit//lib/sshkit/backends/netssh.rb#109 + def config; end + + # @yield [config] + # + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#68 + def configure(&block); end + + # Returns the value of attribute pool. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#103 + def pool; end + + # Sets the attribute pool + # + # @param value the value to set the attribute pool to. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#103 + def pool=(_arg0); end + end +end + +# source://sshkit//lib/sshkit/backends/netssh.rb#30 +class SSHKit::Backend::Netssh::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://sshkit//lib/sshkit/backends/netssh.rb#35 + def initialize; end + + # Returns the value of attribute connection_timeout. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#31 + def connection_timeout; end + + # Sets the attribute connection_timeout + # + # @param value the value to set the attribute connection_timeout to. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#31 + def connection_timeout=(_arg0); end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#61 + def max_concurrent_starts; end + + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#61 + def max_concurrent_starts=(_arg0); end + + # Returns the value of attribute pty. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#31 + def pty; end + + # Sets the attribute pty + # + # @param value the value to set the attribute pty to. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#31 + def pty=(_arg0); end + + # source://sshkit//lib/sshkit/backends/netssh.rb#45 + def ssh_options; end + + # Sets the attribute ssh_options + # + # @param value the value to set the attribute ssh_options to. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#33 + def ssh_options=(_arg0); end + + # Returns the value of attribute transfer_method. + # + # source://sshkit//lib/sshkit/backends/netssh.rb#32 + def transfer_method; end + + # source://sshkit//lib/sshkit/backends/netssh.rb#39 + def transfer_method=(method); end + + private + + # Set default options early for ConnectionPool cache key + # + # source://sshkit//lib/sshkit/backends/netssh.rb#64 + def assign_defaults; end + + # source://sshkit//lib/sshkit/backends/netssh.rb#52 + def default_options; end +end + +# source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#113 +class SSHKit::Backend::Netssh::KnownHosts + # @return [KnownHosts] a new instance of KnownHosts + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#114 + def initialize; end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#127 + def add(*args); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#120 + def search_for(host, options = T.unsafe(nil)); end + + private + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#134 + def known_hosts_file(path); end +end + +# source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#9 +class SSHKit::Backend::Netssh::KnownHostsKeys + # @return [KnownHostsKeys] a new instance of KnownHostsKeys + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#10 + def initialize(path); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#17 + def keys_for(hostlist); end + + private + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#92 + def empty_line?(scanner); end + + # Returns the value of attribute hosts_hashes. + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#41 + def hosts_hashes; end + + # Sets the attribute hosts_hashes + # + # @param value the value to set the attribute hosts_hashes to. + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#41 + def hosts_hashes=(_arg0); end + + # Returns the value of attribute hosts_keys. + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#41 + def hosts_keys; end + + # Sets the attribute hosts_keys + # + # @param value the value to set the attribute hosts_keys to. + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#41 + def hosts_keys=(_arg0); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#47 + def parse_file; end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#87 + def parse_host_hash(line); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#97 + def parse_hostlist(scanner); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#107 + def parse_key(scanner); end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#71 + def parse_line(scanner, hosts_keys, hosts_hashes); end + + # Returns the value of attribute path. + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#40 + def path; end + + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#43 + def sha1; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/backends/netssh/known_hosts.rb#102 + def supported_type?(scanner); end +end + +# Printer is used to implement --dry-run in Capistrano +# +# source://sshkit//lib/sshkit/backends/printer.rb#5 +class SSHKit::Backend::Printer < ::SSHKit::Backend::Abstract + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def download!(*args); end + + # source://sshkit//lib/sshkit/backends/printer.rb#7 + def execute_command(cmd); end + + # source://sshkit//lib/sshkit/backends/printer.rb#14 + def test(*_arg0); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def upload!(*args); end +end + +# source://sshkit//lib/sshkit/backends/skipper.rb#4 +class SSHKit::Backend::Skipper < ::SSHKit::Backend::Abstract + # @return [Skipper] a new instance of Skipper + # + # source://sshkit//lib/sshkit/backends/skipper.rb#6 + def initialize(&block); end + + # source://sshkit//lib/sshkit/backends/skipper.rb#17 + def debug(_messages); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def download!(*args); end + + # source://sshkit//lib/sshkit/backends/skipper.rb#17 + def error(_messages); end + + # source://sshkit//lib/sshkit/backends/skipper.rb#10 + def execute_command(cmd); end + + # source://sshkit//lib/sshkit/backends/skipper.rb#17 + def fatal(_messages); end + + # source://sshkit//lib/sshkit/backends/skipper.rb#17 + def info(_messages); end + + # suppress all messages except `warn` + # + # source://sshkit//lib/sshkit/backends/skipper.rb#17 + def log(_messages); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def test(*args); end + + # source://sshkit//lib/sshkit/backends/abstract.rb#78 + def upload!(*args); end +end + +# Very basic support for ANSI color, so that we don't have to rely on +# any external dependencies. This class handles colorizing strings, and +# automatically disabling color if the underlying output is not a tty. +# +# source://sshkit//lib/sshkit/color.rb#6 +class SSHKit::Color + # @return [Color] a new instance of Color + # + # source://sshkit//lib/sshkit/color.rb#26 + def initialize(output, env = T.unsafe(nil)); end + + # Converts the given obj to string and surrounds in the appropriate ANSI + # color escape sequence, based on the specified color and mode. The color + # must be a symbol (see COLOR_CODES for a complete list). + # + # If the underlying output does not support ANSI color (see `colorize?), + # the string will be not be colorized. Likewise if the specified color + # symbol is unrecognized, the string will not be colorized. + # + # Note that the only mode currently support is :bold. All other values + # will be silently ignored (i.e. treated the same as mode=nil). + # + # source://sshkit//lib/sshkit/color.rb#41 + def colorize(obj, color, mode = T.unsafe(nil)); end + + # Returns `true` if the underlying output is a tty, or if the SSHKIT_COLOR + # environment variable is set. + # + # @return [Boolean] + # + # source://sshkit//lib/sshkit/color.rb#54 + def colorize?; end +end + +# source://sshkit//lib/sshkit/color.rb#7 +SSHKit::Color::COLOR_CODES = T.let(T.unsafe(nil), Hash) + +# @author Lee Hambley +# +# source://sshkit//lib/sshkit/command.rb#9 +class SSHKit::Command + # Initialize a new Command object + # + # command name, with optional variadaric args + # nothing in stdin or stdout + # + # @param A [Array] list of arguments, the first is considered to be the + # @raise [ArgumentError] + # @return [Command] An un-started command object with no exit staus, and + # + # source://sshkit//lib/sshkit/command.rb#22 + def initialize(*args); end + + # Returns the value of attribute args. + # + # source://sshkit//lib/sshkit/command.rb#13 + def args; end + + # Returns the value of attribute command. + # + # source://sshkit//lib/sshkit/command.rb#13 + def command; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#32 + def complete?; end + + # source://sshkit//lib/sshkit/command.rb#149 + def environment_hash; end + + # source://sshkit//lib/sshkit/command.rb#153 + def environment_string; end + + # Returns the value of attribute exit_status. + # + # source://sshkit//lib/sshkit/command.rb#13 + def exit_status; end + + # source://sshkit//lib/sshkit/command.rb#88 + def exit_status=(new_exit_status); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#51 + def failed?; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#51 + def failure?; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#32 + def finished?; end + + # Returns the value of attribute full_stderr. + # + # source://sshkit//lib/sshkit/command.rb#13 + def full_stderr; end + + # Returns the value of attribute full_stdout. + # + # source://sshkit//lib/sshkit/command.rb#13 + def full_stdout; end + + # source://sshkit//lib/sshkit/command.rb#183 + def group(&_block); end + + # source://sshkit//lib/sshkit/command.rb#125 + def host; end + + # source://sshkit//lib/sshkit/command.rb#173 + def in_background(&_block); end + + # source://sshkit//lib/sshkit/command.rb#82 + def on_stderr(channel, data); end + + # source://sshkit//lib/sshkit/command.rb#76 + def on_stdout(channel, data); end + + # Returns the value of attribute options. + # + # source://sshkit//lib/sshkit/command.rb#13 + def options; end + + # source://sshkit//lib/sshkit/command.rb#101 + def runtime; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#140 + def should_map?; end + + # Returns the value of attribute started. + # + # source://sshkit//lib/sshkit/command.rb#13 + def started; end + + # source://sshkit//lib/sshkit/command.rb#41 + def started=(new_started); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#37 + def started?; end + + # Returns the value of attribute started_at. + # + # source://sshkit//lib/sshkit/command.rb#13 + def started_at; end + + # source://sshkit//lib/sshkit/command.rb#66 + def stderr; end + + # source://sshkit//lib/sshkit/command.rb#71 + def stderr=(new_value); end + + # source://sshkit//lib/sshkit/command.rb#56 + def stdout; end + + # source://sshkit//lib/sshkit/command.rb#61 + def stdout=(new_value); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#46 + def success?; end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/command.rb#46 + def successful?; end + + # source://sshkit//lib/sshkit/command.rb#190 + def to_command; end + + # source://sshkit//lib/sshkit/command.rb#106 + def to_hash; end + + # source://sshkit//lib/sshkit/command.rb#214 + def to_s; end + + # source://sshkit//lib/sshkit/command.rb#178 + def umask(&_block); end + + # source://sshkit//lib/sshkit/command.rb#167 + def user(&_block); end + + # Returns the value of attribute uuid. + # + # source://sshkit//lib/sshkit/command.rb#13 + def uuid; end + + # source://sshkit//lib/sshkit/command.rb#129 + def verbosity; end + + # source://sshkit//lib/sshkit/command.rb#161 + def with(&_block); end + + # source://sshkit//lib/sshkit/command.rb#207 + def with_redaction; end + + # source://sshkit//lib/sshkit/command.rb#144 + def within(&_block); end + + private + + # source://sshkit//lib/sshkit/command.rb#240 + def call_interaction_handler(stream_name, data, channel); end + + # source://sshkit//lib/sshkit/command.rb#229 + def default_options; end + + # source://sshkit//lib/sshkit/command.rb#246 + def log_reader_deprecation(stream); end + + # source://sshkit//lib/sshkit/command.rb#253 + def log_writer_deprecation(stream); end + + # source://sshkit//lib/sshkit/command.rb#236 + def sanitize_command(cmd); end + + class << self + # allow using home directory but escape everything else like spaces etc + # + # source://sshkit//lib/sshkit/command.rb#223 + def shellescape_except_tilde(file); end + end +end + +# source://sshkit//lib/sshkit/command.rb#11 +class SSHKit::Command::Failed < ::SSHKit::StandardError; end + +# source://sshkit//lib/sshkit/command_map.rb#2 +class SSHKit::CommandMap + # @return [CommandMap] a new instance of CommandMap + # + # source://sshkit//lib/sshkit/command_map.rb#36 + def initialize(value = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/command_map.rb#40 + def [](command); end + + # source://sshkit//lib/sshkit/command_map.rb#55 + def []=(command, new_command); end + + # source://sshkit//lib/sshkit/command_map.rb#59 + def clear; end + + # source://sshkit//lib/sshkit/command_map.rb#63 + def defaults; end + + # source://sshkit//lib/sshkit/command_map.rb#51 + def prefix; end +end + +# source://sshkit//lib/sshkit/command_map.rb#3 +class SSHKit::CommandMap::CommandHash + # @return [CommandHash] a new instance of CommandHash + # + # source://sshkit//lib/sshkit/command_map.rb#4 + def initialize(defaults = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/command_map.rb#9 + def [](key); end + + # source://sshkit//lib/sshkit/command_map.rb#13 + def []=(key, value); end + + private + + # source://sshkit//lib/sshkit/command_map.rb#19 + def normalize_key(key); end +end + +# source://sshkit//lib/sshkit/command_map.rb#24 +class SSHKit::CommandMap::PrefixProvider + # @return [PrefixProvider] a new instance of PrefixProvider + # + # source://sshkit//lib/sshkit/command_map.rb#25 + def initialize; end + + # source://sshkit//lib/sshkit/command_map.rb#29 + def [](command); end +end + +# source://sshkit//lib/sshkit/command_map.rb#34 +SSHKit::CommandMap::TO_VALUE = T.let(T.unsafe(nil), Proc) + +# source://sshkit//lib/sshkit/configuration.rb#3 +class SSHKit::Configuration + # source://sshkit//lib/sshkit/configuration.rb#42 + def backend; end + + # Sets the attribute backend + # + # @param value the value to set the attribute backend to. + # + # source://sshkit//lib/sshkit/configuration.rb#6 + def backend=(_arg0); end + + # source://sshkit//lib/sshkit/configuration.rb#79 + def command_map; end + + # source://sshkit//lib/sshkit/configuration.rb#83 + def command_map=(value); end + + # source://sshkit//lib/sshkit/configuration.rb#24 + def default_env; end + + # Sets the attribute default_env + # + # @param value the value to set the attribute default_env to. + # + # source://sshkit//lib/sshkit/configuration.rb#6 + def default_env=(_arg0); end + + # source://sshkit//lib/sshkit/configuration.rb#28 + def default_runner; end + + # Sets the attribute default_runner + # + # @param value the value to set the attribute default_runner to. + # + # source://sshkit//lib/sshkit/configuration.rb#6 + def default_runner=(_arg0); end + + # source://sshkit//lib/sshkit/configuration.rb#32 + def default_runner_config; end + + # source://sshkit//lib/sshkit/configuration.rb#36 + def default_runner_config=(config_hash); end + + # source://sshkit//lib/sshkit/configuration.rb#12 + def deprecation_logger; end + + # source://sshkit//lib/sshkit/configuration.rb#20 + def deprecation_output=(out); end + + # TODO: deprecate in favor of `use_format` + # + # source://sshkit//lib/sshkit/configuration.rb#55 + def format=(format); end + + # source://sshkit//lib/sshkit/configuration.rb#8 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://sshkit//lib/sshkit/configuration.rb#6 + def output=(_arg0); end + + # source://sshkit//lib/sshkit/configuration.rb#46 + def output_verbosity; end + + # source://sshkit//lib/sshkit/configuration.rb#50 + def output_verbosity=(verbosity); end + + # Returns the value of attribute umask. + # + # source://sshkit//lib/sshkit/configuration.rb#5 + def umask; end + + # Sets the attribute umask + # + # @param value the value to set the attribute umask to. + # + # source://sshkit//lib/sshkit/configuration.rb#5 + def umask=(_arg0); end + + # Tell SSHKit to use the specified `formatter` for stdout. The formatter + # can be the name of a built-in SSHKit formatter, like `:pretty`, a + # formatter class, like `SSHKit::Formatter::Pretty`, or a custom formatter + # class you've written yourself. + # + # Additional arguments will be passed to the formatter's constructor. + # + # Example: + # + # config.use_format(:pretty) + # + # Is equivalent to: + # + # config.output = SSHKit::Formatter::Pretty.new($stdout) + # + # source://sshkit//lib/sshkit/configuration.rb#74 + def use_format(formatter, *args); end + + private + + # source://sshkit//lib/sshkit/configuration.rb#93 + def formatter_class(symbol); end + + # source://sshkit//lib/sshkit/configuration.rb#89 + def logger(verbosity); end +end + +# source://sshkit//lib/sshkit/coordinator.rb#3 +class SSHKit::Coordinator + # @return [Coordinator] a new instance of Coordinator + # + # source://sshkit//lib/sshkit/coordinator.rb#7 + def initialize(raw_hosts); end + + # source://sshkit//lib/sshkit/coordinator.rb#12 + def each(options = T.unsafe(nil), &block); end + + # Returns the value of attribute hosts. + # + # source://sshkit//lib/sshkit/coordinator.rb#5 + def hosts; end + + # Sets the attribute hosts + # + # @param value the value to set the attribute hosts to. + # + # source://sshkit//lib/sshkit/coordinator.rb#5 + def hosts=(_arg0); end + + private + + # source://sshkit//lib/sshkit/coordinator.rb#29 + def default_options; end + + # source://sshkit//lib/sshkit/coordinator.rb#33 + def resolve_hosts; end +end + +# source://sshkit//lib/sshkit/dsl.rb#3 +module SSHKit::DSL + # source://sshkit//lib/sshkit/dsl.rb#5 + def on(hosts, options = T.unsafe(nil), &block); end + + # source://sshkit//lib/sshkit/dsl.rb#9 + def run_locally(&block); end +end + +# source://sshkit//lib/sshkit/deprecation_logger.rb#4 +class SSHKit::DeprecationLogger + # @return [DeprecationLogger] a new instance of DeprecationLogger + # + # source://sshkit//lib/sshkit/deprecation_logger.rb#5 + def initialize(out); end + + # source://sshkit//lib/sshkit/deprecation_logger.rb#10 + def log(message); end +end + +# source://sshkit//lib/sshkit/formatters/abstract.rb#5 +module SSHKit::Formatter; end + +# source://sshkit//lib/sshkit/formatters/abstract.rb#7 +class SSHKit::Formatter::Abstract + extend ::Forwardable + + # @return [Abstract] a new instance of Abstract + # + # source://sshkit//lib/sshkit/formatters/abstract.rb#14 + def initialize(output, options = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#39 + def <<(obj); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def colorize(*args, **_arg1, &block); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def debug(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def error(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def fatal(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def info(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def log(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#31 + def log_command_data(command, _stream_type, _stream_data); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#35 + def log_command_exit(command); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#27 + def log_command_start(command); end + + # Returns the value of attribute options. + # + # source://sshkit//lib/sshkit/formatters/abstract.rb#10 + def options; end + + # Returns the value of attribute original_output. + # + # source://sshkit//lib/sshkit/formatters/abstract.rb#10 + def original_output; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def read(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def rewind(*args, **_arg1, &block); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#21 + def warn(message); end + + # source://sshkit//lib/sshkit/formatters/abstract.rb#43 + def write(_obj); end +end + +# source://sshkit//lib/sshkit/formatters/black_hole.rb#5 +class SSHKit::Formatter::BlackHole < ::SSHKit::Formatter::Abstract + # source://sshkit//lib/sshkit/formatters/black_hole.rb#7 + def write(_obj); end +end + +# source://sshkit//lib/sshkit/formatters/dot.rb#5 +class SSHKit::Formatter::Dot < ::SSHKit::Formatter::Abstract + # source://sshkit//lib/sshkit/formatters/dot.rb#7 + def log_command_exit(command); end + + # source://sshkit//lib/sshkit/formatters/dot.rb#11 + def write(_obj); end +end + +# source://sshkit//lib/sshkit/formatters/pretty.rb#5 +class SSHKit::Formatter::Pretty < ::SSHKit::Formatter::Abstract + # source://sshkit//lib/sshkit/formatters/pretty.rb#25 + def log_command_data(command, stream_type, stream_data); end + + # source://sshkit//lib/sshkit/formatters/pretty.rb#35 + def log_command_exit(command); end + + # source://sshkit//lib/sshkit/formatters/pretty.rb#18 + def log_command_start(command); end + + # source://sshkit//lib/sshkit/formatters/pretty.rb#10 + def write(obj); end + + protected + + # source://sshkit//lib/sshkit/formatters/pretty.rb#44 + def format_message(verbosity, message, uuid = T.unsafe(nil)); end + + private + + # source://sshkit//lib/sshkit/formatters/pretty.rb#52 + def write_message(verbosity, message, uuid = T.unsafe(nil)); end +end + +# source://sshkit//lib/sshkit/formatters/pretty.rb#8 +SSHKit::Formatter::Pretty::LEVEL_COLORS = T.let(T.unsafe(nil), Array) + +# source://sshkit//lib/sshkit/formatters/pretty.rb#7 +SSHKit::Formatter::Pretty::LEVEL_NAMES = T.let(T.unsafe(nil), Array) + +# source://sshkit//lib/sshkit/formatters/simple_text.rb#5 +class SSHKit::Formatter::SimpleText < ::SSHKit::Formatter::Pretty + # Historically, SimpleText formatter was used to disable coloring, so we maintain that behaviour + # + # source://sshkit//lib/sshkit/formatters/simple_text.rb#8 + def colorize(obj, _color, _mode = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/formatters/simple_text.rb#12 + def format_message(_verbosity, message, _uuid = T.unsafe(nil)); end +end + +# source://sshkit//lib/sshkit/host.rb#8 +class SSHKit::Host + # @return [Host] a new instance of Host + # + # source://sshkit//lib/sshkit/host.rb#25 + def initialize(host_string_or_options_hash); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#64 + def ==(other_host); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#64 + def eql?(other_host); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#64 + def equal?(other_host); end + + # source://sshkit//lib/sshkit/host.rb#89 + def first_suitable_parser(host); end + + # source://sshkit//lib/sshkit/host.rb#56 + def hash; end + + # Returns the value of attribute hostname. + # + # source://sshkit//lib/sshkit/host.rb#10 + def hostname; end + + # Sets the attribute hostname + # + # @param value the value to set the attribute hostname to. + # + # source://sshkit//lib/sshkit/host.rb#10 + def hostname=(_arg0); end + + # source://sshkit//lib/sshkit/host.rb#13 + def key=(new_key); end + + # source://sshkit//lib/sshkit/host.rb#21 + def keys; end + + # source://sshkit//lib/sshkit/host.rb#17 + def keys=(new_keys); end + + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#52 + def local?; end + + # source://sshkit//lib/sshkit/host.rb#74 + def netssh_options; end + + # Returns the value of attribute password. + # + # source://sshkit//lib/sshkit/host.rb#10 + def password; end + + # Sets the attribute password + # + # @param value the value to set the attribute password to. + # + # source://sshkit//lib/sshkit/host.rb#10 + def password=(_arg0); end + + # Returns the value of attribute port. + # + # source://sshkit//lib/sshkit/host.rb#10 + def port; end + + # Sets the attribute port + # + # @param value the value to set the attribute port to. + # + # source://sshkit//lib/sshkit/host.rb#10 + def port=(_arg0); end + + # source://sshkit//lib/sshkit/host.rb#85 + def properties; end + + # Returns the value of attribute ssh_options. + # + # source://sshkit//lib/sshkit/host.rb#10 + def ssh_options; end + + # Sets the attribute ssh_options + # + # @param value the value to set the attribute ssh_options to. + # + # source://sshkit//lib/sshkit/host.rb#10 + def ssh_options=(_arg0); end + + # source://sshkit//lib/sshkit/host.rb#70 + def to_s; end + + # Returns the value of attribute transfer_method. + # + # source://sshkit//lib/sshkit/host.rb#11 + def transfer_method; end + + # source://sshkit//lib/sshkit/host.rb#46 + def transfer_method=(method); end + + # Returns the value of attribute user. + # + # source://sshkit//lib/sshkit/host.rb#10 + def user; end + + # Sets the attribute user + # + # @param value the value to set the attribute user to. + # + # source://sshkit//lib/sshkit/host.rb#10 + def user=(_arg0); end + + # source://sshkit//lib/sshkit/host.rb#60 + def username; end +end + +# source://sshkit//lib/sshkit/host.rb#142 +class SSHKit::HostWithPortParser < ::SSHKit::SimpleHostParser + # source://sshkit//lib/sshkit/host.rb#152 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#148 + def port; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#144 + def suitable?(host_string); end + end +end + +# @private +# +# source://sshkit//lib/sshkit/host.rb#160 +class SSHKit::HostWithUsernameAndPortParser < ::SSHKit::SimpleHostParser + # source://sshkit//lib/sshkit/host.rb#167 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#170 + def port; end + + # source://sshkit//lib/sshkit/host.rb#164 + def username; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#161 + def suitable?(host_string); end + end +end + +# @private +# +# source://sshkit//lib/sshkit/host.rb#198 +class SSHKit::HostWithUsernameParser < ::SSHKit::SimpleHostParser + # source://sshkit//lib/sshkit/host.rb#205 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#202 + def username; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#199 + def suitable?(host_string); end + end +end + +# @private +# +# source://sshkit//lib/sshkit/host.rb#128 +class SSHKit::IPv6HostParser < ::SSHKit::SimpleHostParser + # source://sshkit//lib/sshkit/host.rb#137 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#133 + def port; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#129 + def suitable?(host_string); end + end +end + +# @private +# +# source://sshkit//lib/sshkit/host.rb#177 +class SSHKit::IPv6HostWithPortParser < ::SSHKit::SimpleHostParser + # source://sshkit//lib/sshkit/host.rb#190 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#184 + def port; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#180 + def suitable?(host_string); end + end +end + +# source://sshkit//lib/sshkit/host.rb#178 +SSHKit::IPv6HostWithPortParser::IPV6_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sshkit//lib/sshkit/log_message.rb#3 +class SSHKit::LogMessage + # @return [LogMessage] a new instance of LogMessage + # + # source://sshkit//lib/sshkit/log_message.rb#5 + def initialize(verbosity, message); end + + # Returns the value of attribute message. + # + # source://sshkit//lib/sshkit/log_message.rb#4 + def message; end + + # source://sshkit//lib/sshkit/log_message.rb#8 + def to_s; end + + # Returns the value of attribute verbosity. + # + # source://sshkit//lib/sshkit/log_message.rb#4 + def verbosity; end +end + +# source://sshkit//lib/sshkit/logger.rb#2 +class SSHKit::Logger; end + +# source://sshkit//lib/sshkit/logger.rb#3 +SSHKit::Logger::DEBUG = T.let(T.unsafe(nil), Integer) + +# source://sshkit//lib/sshkit/logger.rb#6 +SSHKit::Logger::ERROR = T.let(T.unsafe(nil), Integer) + +# source://sshkit//lib/sshkit/logger.rb#7 +SSHKit::Logger::FATAL = T.let(T.unsafe(nil), Integer) + +# source://sshkit//lib/sshkit/logger.rb#4 +SSHKit::Logger::INFO = T.let(T.unsafe(nil), Integer) + +# source://sshkit//lib/sshkit/logger.rb#5 +SSHKit::Logger::WARN = T.let(T.unsafe(nil), Integer) + +# source://sshkit//lib/sshkit/mapping_interaction_handler.rb#3 +class SSHKit::MappingInteractionHandler + # @return [MappingInteractionHandler] a new instance of MappingInteractionHandler + # + # source://sshkit//lib/sshkit/mapping_interaction_handler.rb#5 + def initialize(mapping, log_level = T.unsafe(nil)); end + + # source://sshkit//lib/sshkit/mapping_interaction_handler.rb#21 + def on_data(_command, stream_name, data, channel); end + + private + + # source://sshkit//lib/sshkit/mapping_interaction_handler.rb#42 + def log(message); end +end + +# source://sshkit//lib/sshkit/host.rb#210 +SSHKit::PARSERS = T.let(T.unsafe(nil), Array) + +# Used for redaction of a certain argument +# +# source://sshkit//lib/sshkit.rb#25 +module SSHKit::Redaction; end + +# source://sshkit//lib/sshkit/exception.rb#3 +module SSHKit::Runner; end + +# source://sshkit//lib/sshkit/runners/abstract.rb#5 +class SSHKit::Runner::Abstract + # @return [Abstract] a new instance of Abstract + # + # source://sshkit//lib/sshkit/runners/abstract.rb#9 + def initialize(hosts, options = T.unsafe(nil), &block); end + + # Returns the value of attribute block. + # + # source://sshkit//lib/sshkit/runners/abstract.rb#7 + def block; end + + # Returns the value of attribute hosts. + # + # source://sshkit//lib/sshkit/runners/abstract.rb#7 + def hosts; end + + # Returns the value of attribute options. + # + # source://sshkit//lib/sshkit/runners/abstract.rb#7 + def options; end + + private + + # source://sshkit//lib/sshkit/runners/abstract.rb#17 + def backend(host, &block); end +end + +# source://sshkit//lib/sshkit/exception.rb#5 +class SSHKit::Runner::ExecuteError < ::SSHKit::StandardError + # @return [ExecuteError] a new instance of ExecuteError + # + # source://sshkit//lib/sshkit/exception.rb#8 + def initialize(cause); end + + # Returns the value of attribute cause. + # + # source://sshkit//lib/sshkit/exception.rb#6 + def cause; end +end + +# source://sshkit//lib/sshkit/runners/group.rb#5 +class SSHKit::Runner::Group < ::SSHKit::Runner::Sequential + # @return [Group] a new instance of Group + # + # source://sshkit//lib/sshkit/runners/group.rb#8 + def initialize(hosts, options = T.unsafe(nil), &block); end + + # source://sshkit//lib/sshkit/runners/group.rb#13 + def execute; end + + # Returns the value of attribute group_size. + # + # source://sshkit//lib/sshkit/runners/group.rb#6 + def group_size; end + + # Sets the attribute group_size + # + # @param value the value to set the attribute group_size to. + # + # source://sshkit//lib/sshkit/runners/group.rb#6 + def group_size=(_arg0); end +end + +# source://sshkit//lib/sshkit/runners/null.rb#5 +class SSHKit::Runner::Null < ::SSHKit::Runner::Abstract + # source://sshkit//lib/sshkit/runners/null.rb#7 + def execute; end +end + +# source://sshkit//lib/sshkit/runners/parallel.rb#7 +class SSHKit::Runner::Parallel < ::SSHKit::Runner::Abstract + # source://kamal/2.0.0/lib/kamal/sshkit_with_ext.rb#115 + def execute; end +end + +# source://sshkit//lib/sshkit/runners/sequential.rb#5 +class SSHKit::Runner::Sequential < ::SSHKit::Runner::Abstract + # @return [Sequential] a new instance of Sequential + # + # source://sshkit//lib/sshkit/runners/sequential.rb#8 + def initialize(hosts, options = T.unsafe(nil), &block); end + + # source://sshkit//lib/sshkit/runners/sequential.rb#13 + def execute; end + + # Returns the value of attribute wait_interval. + # + # source://sshkit//lib/sshkit/runners/sequential.rb#6 + def wait_interval; end + + # Sets the attribute wait_interval + # + # @param value the value to set the attribute wait_interval to. + # + # source://sshkit//lib/sshkit/runners/sequential.rb#6 + def wait_interval=(_arg0); end + + private + + # source://sshkit//lib/sshkit/runners/sequential.rb#27 + def run_backend(host, &block); end +end + +# @private +# +# source://sshkit//lib/sshkit/host.rb#98 +class SSHKit::SimpleHostParser + # @return [SimpleHostParser] a new instance of SimpleHostParser + # + # source://sshkit//lib/sshkit/host.rb#104 + def initialize(host_string); end + + # source://sshkit//lib/sshkit/host.rb#120 + def attributes; end + + # source://sshkit//lib/sshkit/host.rb#116 + def hostname; end + + # source://sshkit//lib/sshkit/host.rb#112 + def port; end + + # source://sshkit//lib/sshkit/host.rb#108 + def username; end + + class << self + # @return [Boolean] + # + # source://sshkit//lib/sshkit/host.rb#100 + def suitable?(host_string); end + end +end + +# source://sshkit//lib/sshkit.rb#3 +class SSHKit::StandardError < ::StandardError; end + +# source://sshkit//lib/sshkit/host.rb#6 +class SSHKit::UnparsableHostStringError < ::SSHKit::StandardError; end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/stringio@3.1.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/stringio@3.1.1.rbi new file mode 100644 index 0000000..0b17e91 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/stringio@3.1.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `stringio` gem. +# Please instead update this file by running `bin/tapioca gem stringio`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/tapioca@0.15.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/tapioca@0.15.0.rbi new file mode 100644 index 0000000..fe3896e --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/tapioca@0.15.0.rbi @@ -0,0 +1,3563 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tapioca` gem. +# Please instead update this file by running `bin/tapioca gem tapioca`. + + +class Bundler::Dependency < ::Gem::Dependency + include ::Tapioca::BundlerExt::AutoRequireHook +end + +# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4 +class GitAttributes + class << self + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9 + sig { params(path: ::Pathname).void } + def create_generated_attribute_file(path); end + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16 + sig { params(path: ::Pathname).void } + def create_vendored_attribute_file(path); end + + private + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25 + sig { params(path: ::Pathname, content: ::String).void } + def create_gitattributes_file(path, content); end + end +end + +# We need to do the alias-method-chain dance since Bootsnap does the same, +# and prepended modules and alias-method-chain don't play well together. +# +# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! +# That's because RubyGems does alias-method-chain for Kernel#require and such, +# so, if Bootsnap were to do prepend, it might end up breaking RubyGems. +# +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 +class Module + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 + def append_features(constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 + def autoload(const_name, path); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 + def extend_object(obj); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 + def prepend_features(constant); end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#4 +module RBI; end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#5 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi/0.1.13/lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi/0.1.13/lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi/0.1.13/lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi/0.1.13/lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi/0.1.13/lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: ::String, + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#25 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_path(constant, &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#135 + sig do + params( + parameters: T::Hash[T.any(::String, ::Symbol), ::String], + type_parameters: T::Array[::String], + return_type: ::String + ).returns(::RBI::Sig) + end + def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi/0.1.13/lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi/0.1.13/lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi/0.1.13/lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi/0.1.13/lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi/0.1.13/lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi/0.1.13/lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi/0.1.13/lib/rbi/rewriters/nest_non_public_methods.rb#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi/0.1.13/lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi/0.1.13/lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi/0.1.13/lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi/0.1.13/lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#150 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#145 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#160 +class RBI::TypedParam < ::T::Struct + const :param, ::RBI::Param + const :type, ::String + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 +module T::Generic + include ::Kernel + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 + def [](*types); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# This module intercepts calls to generic type instantiations and type variable definitions. +# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used +# to look up the original call details when we are trying to do code generation. +# +# We are interested in the data of the `[]`, `type_member` and `type_template` calls which +# are all needed to generate good generic information at runtime. +# +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#12 +module T::Generic::TypeStoragePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 + def [](*types); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 +module T::Private::Methods + class << self + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 + def finalize_proc(decl); end + end +end + +class T::Private::Methods::Declaration < ::Struct + def bind; end + def bind=(_); end + def checked; end + def checked=(_); end + def finalized; end + def finalized=(_); end + def mod; end + def mod=(_); end + def mode; end + def mode=(_); end + def on_failure; end + def on_failure=(_); end + def override_allow_incompatible; end + def override_allow_incompatible=(_); end + def params; end + def params=(_); end + def raw; end + def raw=(_); end + def returns; end + def returns=(_); end + def type_parameters; end + def type_parameters=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +class T::Private::Methods::DeclarationBlock < ::Struct + def blk; end + def blk=(_); end + def final; end + def final=(_); end + def loc; end + def loc=(_); end + def mod; end + def mod=(_); end + def raw; end + def raw=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#29 +module T::Private::Methods::ProcBindPatch + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 + def finalize_proc(decl); end +end + +class T::Types::Proc < ::T::Types::Base; end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6 +module T::Types::ProcBindPatch + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#7 + def initialize(arg_types, returns, bind = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#15 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 +class T::Types::Simple < ::T::Types::Base + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#65 +module T::Types::Simple::GenericPatch + # This method intercepts calls to the `name` method for simple types, so that + # it can ask the name to the type if the type is generic, since, by this point, + # we've created a clone of that type with the `name` method returning the + # appropriate name for that specific concrete type. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7 +module T::Types::Simple::NamePatch + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10 + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16 + def qualified_name_of(constant); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 +T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87 +module T::Utils::Private + class << self + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 + def coerce_and_check_module_types(val, check_val, check_module_type); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#88 +module T::Utils::Private::PrivateCoercePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 + def coerce_and_check_module_types(val, check_val, check_module_type); end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 +module Tapioca + class << self + # source://tapioca//lib/tapioca.rb#19 + sig do + type_parameters(:Result) + .params( + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def silence_warnings(&blk); end + end +end + +# source://tapioca//lib/tapioca.rb#37 +Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 +module Tapioca::BundlerExt; end + +# This is a module that gets prepended to `Bundler::Dependency` and +# makes sure even gems marked as `require: false` are required during +# `Bundler.require`. +# +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#9 +module Tapioca::BundlerExt::AutoRequireHook + requires_ancestor { Bundler::Dependency } + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46 + sig { returns(T.untyped) } + def autorequire; end + + class << self + # @return [Boolean] + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26 + def enabled?; end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22 + sig { params(name: T.untyped).returns(T::Boolean) } + def excluded?(name); end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36 + sig do + type_parameters(:Result) + .params( + exclude: T::Array[::String], + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def override_require_false(exclude:, &blk); end + end +end + +# source://tapioca//lib/tapioca.rb#60 +Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#59 +Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#58 +Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/cli.rb#5 +class Tapioca::Cli < ::Thor + include ::Tapioca::CliHelper + include ::Tapioca::ConfigHelper + include ::Tapioca::EnvHelper + + # source://tapioca//lib/tapioca/cli.rb#366 + def __print_version; end + + # source://tapioca//lib/tapioca/cli.rb#348 + def annotations; end + + # source://tapioca//lib/tapioca/cli.rb#320 + def check_shims; end + + # source://tapioca//lib/tapioca/cli.rb#46 + def configure; end + + # source://tapioca//lib/tapioca/cli.rb#147 + def dsl(*constant_or_paths); end + + # @raise [MalformattedArgumentError] + # + # source://tapioca//lib/tapioca/cli.rb#264 + def gem(*gems); end + + # source://tapioca//lib/tapioca/cli.rb#27 + def init; end + + # source://tapioca//lib/tapioca/cli.rb#57 + def require; end + + # source://tapioca//lib/tapioca/cli.rb#74 + def todo; end + + private + + # source://tapioca//lib/tapioca/cli.rb#380 + def print_init_next_steps; end + + class << self + # source://tapioca//lib/tapioca/cli.rb#372 + def exit_on_failure?; end + end +end + +# source://tapioca//lib/tapioca/cli.rb#10 +Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/cli_helper.rb#5 +module Tapioca::CliHelper + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#33 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } + def netrc_file(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#26 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } + def rbi_formatter(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#12 + sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } + def say_error(message = T.unsafe(nil), *color); end +end + +# source://tapioca//lib/tapioca/commands.rb#5 +module Tapioca::Commands; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#6 +class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#33 + sig do + params( + requested_constants: T::Array[::String], + requested_paths: T::Array[::Pathname], + outpath: ::Pathname, + only: T::Array[::String], + exclude: T::Array[::String], + file_header: T::Boolean, + tapioca_path: ::String, + skip_constant: T::Array[::String], + quiet: T::Boolean, + verbose: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + gem_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + app_root: ::String, + halt_upon_load_error: T::Boolean, + compiler_options: T::Hash[::String, T.untyped] + ).void + end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#100 + sig { returns(T::Array[::String]) } + def all_requested_constants; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#217 + sig do + params( + constant_name: ::String, + rbi: ::RBI::File, + outpath: ::Pathname, + quiet: T::Boolean + ).returns(T.nilable(::Pathname)) + end + def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#154 + sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } + def constantize(constant_names, ignore_missing: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#177 + sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def constantize_compilers(compiler_names); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#353 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#123 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#256 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#140 + sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#348 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#76 + sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } + def generate_dsl_rbi_files(outpath, quiet:); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#113 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#108 + sig { returns(::Tapioca::Dsl::Pipeline) } + def pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#244 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#343 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#324 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#302 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#197 + sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } + def resolve(name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#331 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#261 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/abstract_gem.rb#6 +class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + abstract! + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#32 + sig do + params( + gem_names: T::Array[::String], + exclude: T::Array[::String], + include_dependencies: T::Boolean, + prerequire: T.nilable(::String), + postrequire: ::String, + typed_overrides: T::Hash[::String, ::String], + outpath: ::Pathname, + file_header: T::Boolean, + include_doc: T::Boolean, + include_loc: T::Boolean, + include_exported_rbis: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + dsl_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#223 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#284 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#110 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#218 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#266 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#230 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#272 + sig { returns(T::Hash[::String, ::String]) } + def expected_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#98 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + dependencies: T::Array[::Tapioca::Gemfile::GemSpec] + ).returns(T::Array[::Tapioca::Gemfile::GemSpec]) + end + def gem_dependencies(gem, dependencies = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#235 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#279 + sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } + def gem_rbi_filename(gem_name, version); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#77 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#289 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } + def merge_with_exported_rbi(gem, file); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#260 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#170 + sig { void } + def perform_additions; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#143 + sig { void } + def perform_removals; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#213 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#240 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + +# source://tapioca//lib/tapioca/commands/annotations.rb#6 +class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/annotations.rb#18 + sig do + params( + central_repo_root_uris: T::Array[::String], + auth: T.nilable(::String), + netrc_file: T.nilable(::String), + central_repo_index_path: ::String, + typed_overrides: T::Hash[::String, ::String] + ).void + end + def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/annotations.rb#197 + sig { params(name: ::String, content: ::String).returns(::String) } + def add_header(name, content); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#217 + sig { params(name: ::String, content: ::String).returns(::String) } + def apply_typed_override(name, content); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#39 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#136 + sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).void } + def fetch_annotation(repo_uris, gem_info); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#113 + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } + def fetch_annotations(project_gems); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#156 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#173 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_http_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#102 + sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } + def fetch_index(repo_uri, repo_number:); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#81 + sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } + def fetch_indexes; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#165 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_local_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#229 + sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } + def filter_versions(gem_version, content); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#50 + sig { returns(T::Array[::Tapioca::GemInfo]) } + def list_gemfile_gems; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#237 + sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } + def merge_files(gem_name, contents); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#60 + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } + def remove_expired_annotations(project_gems); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#264 + sig { returns(T::Hash[::String, T.nilable(::String)]) } + def repo_tokens; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#292 + sig { params(path: ::String, repo_uri: ::String, message: ::String).void } + def say_http_error(path, repo_uri, message:); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#276 + sig { params(repo_uri: ::String).returns(T.nilable(::String)) } + def token_for(repo_uri); end +end + +# source://tapioca//lib/tapioca/commands/check_shims.rb#6 +class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # source://tapioca//lib/tapioca/commands/check_shims.rb#22 + sig do + params( + gem_rbi_dir: ::String, + dsl_rbi_dir: ::String, + annotations_rbi_dir: ::String, + shim_rbi_dir: ::String, + todo_rbi_file: ::String, + payload: T::Boolean, + number_of_workers: T.nilable(::Integer) + ).void + end + def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end + + private + + # source://tapioca//lib/tapioca/commands/check_shims.rb#44 + sig { override.void } + def execute; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command.rb#6 +class Tapioca::Commands::Command + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # source://tapioca//lib/tapioca/commands/command.rb#20 + sig { void } + def initialize; end + + # source://thor/1.3.2/lib/thor/base.rb#155 + sig { returns(::Thor::Actions) } + def file_writer; end + + # source://tapioca//lib/tapioca/commands/command.rb#25 + sig(:final) { void } + def run; end + + private + + # source://tapioca//lib/tapioca/commands/command.rb#53 + sig do + params( + path: T.any(::Pathname, ::String), + content: ::String, + force: T::Boolean, + skip: T::Boolean, + verbose: T::Boolean + ).void + end + def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/command.rb#37 + sig { params(command: ::Symbol, args: ::String).returns(::String) } + def default_command(command, *args); end + + # @abstract + # + # source://tapioca//lib/tapioca/commands/command.rb#34 + sig { abstract.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/command.rb#63 + sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } + def remove_file(path, verbose: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/commands/command.rb#10 +class Tapioca::Commands::Command::FileWriter < ::Thor + include ::Thor::Actions + extend ::Thor::Actions::ClassMethods +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#6 +class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command + abstract! + + # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 + sig { void } + def initialize; end +end + +# source://tapioca//lib/tapioca/commands/configure.rb#6 +class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/configure.rb#14 + sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } + def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end + + private + + # source://tapioca//lib/tapioca/commands/configure.rb#79 + sig { void } + def create_binstub; end + + # source://tapioca//lib/tapioca/commands/configure.rb#69 + sig { void } + def create_post_require; end + + # source://tapioca//lib/tapioca/commands/configure.rb#40 + sig { void } + def create_sorbet_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#50 + sig { void } + def create_tapioca_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#32 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/configure.rb#92 + sig { returns(::Bundler::Installer) } + def installer; end + + # source://tapioca//lib/tapioca/commands/configure.rb#97 + sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } + def spec; end +end + +# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#6 +class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6 +class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6 +class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_generate.rb#6 +class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem + private + + # source://tapioca//lib/tapioca/commands/gem_generate.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_sync.rb#6 +class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem + private + + # source://tapioca//lib/tapioca/commands/gem_sync.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_verify.rb#6 +class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem + private + + # source://tapioca//lib/tapioca/commands/gem_verify.rb#10 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/gem_verify.rb#17 + sig { void } + def perform_sync_verification; end +end + +# source://tapioca//lib/tapioca/commands/require.rb#6 +class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/require.rb#13 + sig { params(requires_path: ::String, sorbet_config_path: ::String).void } + def initialize(requires_path:, sorbet_config_path:); end + + private + + # source://tapioca//lib/tapioca/commands/require.rb#23 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/todo.rb#6 +class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + + # source://tapioca//lib/tapioca/commands/todo.rb#26 + sig { params(todo_file: ::String, file_header: T::Boolean).void } + def initialize(todo_file:, file_header:); end + + # source://tapioca//lib/tapioca/commands/todo.rb#34 + sig { void } + def run_with_deprecation; end + + private + + # source://tapioca//lib/tapioca/commands/todo.rb#44 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/todo.rb#68 + sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } + def rbi(constants, command:); end + + # source://tapioca//lib/tapioca/commands/todo.rb#88 + sig { returns(T::Array[::String]) } + def unresolved_constants; end +end + +# source://tapioca//lib/tapioca/commands/todo.rb#9 +Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#5 +module Tapioca::ConfigHelper + requires_ancestor { Thor } + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#18 + sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void } + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#12 + sig { returns(::String) } + def command_name; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#15 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def defaults; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#34 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def options; end + + private + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#153 + sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } + def build_error(msg); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#178 + sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } + def build_error_message(config_file, errors); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#56 + sig do + params( + options: ::Thor::CoreExt::HashWithIndifferentAccess + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def config_options(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#46 + sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } + def filter_defaults(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#196 + sig do + params( + options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def merge_options(*options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#70 + sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } + def validate_config!(config_file, config); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#102 + sig do + params( + command_options: T::Hash[::Symbol, ::Thor::Option], + config_key: ::String, + config_options: T::Hash[T.untyped, T.untyped] + ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError]) + end + def validate_config_options(command_options, config_key, config_options); end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#148 +class Tapioca::ConfigHelper::ConfigError < ::T::Struct + const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#143 +class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct + const :message, ::String + const :colors, T::Array[::Symbol] + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca.rb#44 +Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#40 +Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#56 +Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#41 +Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#46 +Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) + +# source://tapioca//lib/tapioca.rb#38 +Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#39 +Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/rbi_formatter.rb#31 +Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) + +# source://tapioca//lib/tapioca.rb#55 +Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca.rb#42 +Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#43 +Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/dsl/compilers.rb#5 +module Tapioca::Dsl; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/dsl/compiler.rb#6 +class Tapioca::Dsl::Compiler + extend T::Generic + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + abstract! + + ConstantType = type_member { { upper: Module } } + + # source://tapioca//lib/tapioca/dsl/compiler.rb#74 + sig do + params( + pipeline: ::Tapioca::Dsl::Pipeline, + root: ::RBI::Tree, + constant: ConstantType, + options: T::Hash[::String, T.untyped] + ).void + end + def initialize(pipeline, root, constant, options = T.unsafe(nil)); end + + # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#92 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#83 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#20 + sig { returns(ConstantType) } + def constant; end + + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#88 + sig { abstract.void } + def decorate; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#26 + sig { returns(T::Hash[::String, T.untyped]) } + def options; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#23 + sig { returns(::RBI::Tree) } + def root; end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#141 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } + def compile_method_parameters_to_rbi(method_def); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#177 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } + def compile_method_return_type_to_rbi(method_def); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#131 + sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } + def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end + + # Get the types of each parameter from a method signature + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#105 + sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } + def parameters_types_from_signature(method_def, signature); end + + class << self + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + sig { abstract.returns(T::Enumerable[::Module]) } + def gather_constants; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#32 + sig { params(constant: ::Module).returns(T::Boolean) } + def handles?(constant); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#40 + sig { returns(T::Set[::Module]) } + def processable_constants; end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + sig { returns(T::Enumerable[T::Class[T.anything]]) } + def all_classes; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#58 + sig { returns(T::Enumerable[::Module]) } + def all_modules; end + end +end + +# source://tapioca//lib/tapioca/dsl/compilers.rb#6 +module Tapioca::Dsl::Compilers; end + +# DSL compilers are either built-in to Tapioca and live under the +# `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and +# can be referred to by just using the class name, or they live in +# a different namespace and can only be referred to using their fully +# qualified name. This constant encapsulates that dual lookup when +# a compiler needs to be resolved by name. +# +# source://tapioca//lib/tapioca/dsl/compilers.rb#13 +Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/dsl/pipeline.rb#6 +class Tapioca::Dsl::Pipeline + # source://tapioca//lib/tapioca/dsl/pipeline.rb#39 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname], + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + error_handler: T.proc.params(error: ::String).void, + skipped_constants: T::Array[::Module], + number_of_workers: T.nilable(::Integer), + compiler_options: T::Hash[::String, T.untyped] + ).void + end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 + sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } + def active_compilers; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#102 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#116 + sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def compilers; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#25 + sig { returns(T::Array[::String]) } + def errors; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 + sig { returns(T::Array[::Module]) } + def requested_constants; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 + sig { returns(T::Array[::Pathname]) } + def requested_paths; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#67 + sig do + type_parameters(:T) + .params( + blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T)) + ).returns(T::Array[T.type_parameter(:T)]) + end + def run(&blk); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + sig { returns(T::Array[::Module]) } + def skipped_constants; end + + private + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#223 + sig { void } + def abort_if_pending_migrations!; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#168 + sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } + def filter_anonymous_and_reloaded_constants(constants); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#133 + sig do + params( + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)] + ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) + end + def gather_active_compilers(requested_compilers, excluded_compilers); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#147 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname], + skipped_constants: T::Array[::Module] + ).returns(T::Set[::Module]) + end + def gather_constants(requested_constants, requested_paths, skipped_constants); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#197 + sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } + def rbi_for_constant(constant); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#216 + sig { params(error: ::String).returns(T.noreturn) } + def report_error(error); end +end + +# source://tapioca//lib/tapioca/helpers/env_helper.rb#5 +module Tapioca::EnvHelper + requires_ancestor { Thor } + + # source://tapioca//lib/tapioca/helpers/env_helper.rb#12 + sig { params(options: T::Hash[::Symbol, T.untyped]).void } + def set_environment(options); end +end + +class Tapioca::Error < ::StandardError; end + +# source://tapioca//lib/tapioca/executor.rb#5 +class Tapioca::Executor + # source://tapioca//lib/tapioca/executor.rb#11 + sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } + def initialize(queue, number_of_workers: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/executor.rb#28 + sig do + type_parameters(:T) + .params( + block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T)) + ).returns(T::Array[T.type_parameter(:T)]) + end + def run_in_parallel(&block); end + + private + + # source://tapioca//lib/tapioca/executor.rb#37 + sig { returns(::Integer) } + def max_processors; end +end + +# source://tapioca//lib/tapioca/executor.rb#8 +Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca/gem/events.rb#5 +module Tapioca::Gem; end + +# source://tapioca//lib/tapioca/gem/events.rb#77 +class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#84 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#81 + sig { returns(::RBI::Const) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#26 +class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#36 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#33 + sig { returns(::BasicObject) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#30 + sig { returns(::String) } + def symbol; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#6 +class Tapioca::Gem::Event + abstract! +end + +# source://tapioca//lib/tapioca/gem/events.rb#43 +class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound + # source://tapioca//lib/tapioca/gem/events.rb#52 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#47 + sig { override.returns(::Module) } + def constant; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#103 +class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end + +# source://tapioca//lib/tapioca/gem/listeners/base.rb#6 +module Tapioca::Gem::Listeners; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/listeners/base.rb#7 +class Tapioca::Gem::Listeners::Base + abstract! + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#14 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#19 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def dispatch(event); end + + private + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#49 + sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#37 + sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#45 + sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 + sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7 +class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#7 +class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 + sig { params(location: ::String).returns(T::Boolean) } + def mixed_in_by_gem?(location); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/methods.rb#7 +class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#35 + sig do + params( + tree: ::RBI::Tree, + module_name: ::String, + mod: ::Module, + for_visibility: T::Array[::Symbol], + attached_class: T.nilable(::Module) + ).void + end + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#71 + sig do + params( + tree: ::RBI::Tree, + symbol_name: ::String, + constant: ::Module, + method: T.nilable(::UnboundMethod), + visibility: ::RBI::Visibility + ).void + end + def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#211 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#204 + sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } + def initialize_method_for(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172 + sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } + def method_names_by_visibility(mod); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#196 + sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + def method_new_in_abstract_class?(attached_class, method_name); end + + # Check whether the method is defined by the constant. + # + # In most cases, it works to check that the constant is the method owner. However, + # in the case that a method is also defined in a module prepended to the constant, it + # will be owned by the prepended module, not the constant. + # + # This method implements a better way of checking whether a constant defines a method. + # It walks up the ancestor tree via the `super_method` method; if any of the super + # methods are owned by the constant, it means that the constant declares the method. + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#158 + sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } + def method_owned_by_constant?(method, constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#16 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#181 + sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } + def struct_method?(constant, method_name); end +end + +# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#7 +class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42 + sig do + params( + tree: ::RBI::Tree, + constant: ::Module, + mods: T::Array[::Module], + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).void + end + def add_mixins(tree, constant, mods, mixin_type); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84 + sig { params(mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(mixin_name); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def interesting_ancestors_of(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).returns(T::Boolean) + end + def mixed_in_by_gem?(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#7 +class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#7 +class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#7 +class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7 +class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#7 +class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#7 +class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26 + sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } + def compile_signature(signature, parameters); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#79 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68 + sig { params(signature: T.untyped).returns(T::Boolean) } + def signature_final?(signature); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#13 +Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#7 +class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27 + sig { params(tree: ::RBI::Tree, constant: ::Module).void } + def compile_type_variable_declarations(tree, constant); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } + def node_from_type_variable(type_variable); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#7 +class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41 + sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } + def add_source_location_comment(node, file, line); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#7 +class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#36 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7 +class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + private + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55 + sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def documentation_comments(name, sigs: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10 +Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 +Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#105 +class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#130 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def initialize(symbol, constant, method, node, signature, parameters); end + + # source://tapioca//lib/tapioca/gem/events.rb#109 + sig { returns(::UnboundMethod) } + def method; end + + # source://tapioca//lib/tapioca/gem/events.rb#112 + sig { returns(::RBI::Method) } + def node; end + + # source://tapioca//lib/tapioca/gem/events.rb#118 + sig { returns(T::Array[[::Symbol, ::String]]) } + def parameters; end + + # source://tapioca//lib/tapioca/gem/events.rb#115 + sig { returns(T.untyped) } + def signature; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#57 +class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event + abstract! + + # source://tapioca//lib/tapioca/gem/events.rb#70 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#67 + sig { returns(::Module) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#64 + sig { returns(::String) } + def symbol; end +end + +# source://tapioca//lib/tapioca/gem/pipeline.rb#6 +class Tapioca::Gem::Pipeline + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + # source://tapioca//lib/tapioca/gem/pipeline.rb#17 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } + def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#48 + sig { returns(::RBI::Tree) } + def compile; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#119 + sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } + def constant_in_gem?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#14 + sig { returns(::Tapioca::Gemfile::GemSpec) } + def gem; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#137 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_in_gem?(method); end + + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#147 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def name_of(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#71 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + def push_const(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#61 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def push_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#66 + sig { params(symbol: ::String, constant: ::Module).void } + def push_foreign_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#85 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def push_foreign_scope(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#99 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def push_method(symbol, constant, method, node, signature, parameters); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#78 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def push_scope(symbol, constant, node); end + + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#56 + sig { params(symbol: ::String).void } + def push_symbol(symbol); end + + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#106 + sig { params(symbol_name: ::String).returns(T::Boolean) } + def symbol_in_payload?(symbol_name); end + + private + + # source://tapioca//lib/tapioca/gem/pipeline.rb#440 + sig { params(name: ::String).void } + def add_to_alias_namespace(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#445 + sig { params(name: ::String).returns(T::Boolean) } + def alias_namespaced?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#244 + sig { params(name: ::String, constant: ::Module).void } + def compile_alias(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#230 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def compile_constant(symbol, constant); end + + # Compiling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#219 + sig { params(symbol: ::String, constant: ::Module).void } + def compile_foreign_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#298 + sig { params(name: ::String, constant: ::Module).void } + def compile_module(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#265 + sig { params(name: ::String, value: ::BasicObject).void } + def compile_object(name, value); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#309 + sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } + def compile_scope(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#323 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } + def compile_superclass(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#421 + sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } + def defined_in_gem?(constant, strict: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#177 + sig { params(event: ::Tapioca::Gem::Event).void } + def dispatch(event); end + + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#464 + sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } + def generic_name_of(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#433 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def get_file_candidates(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#162 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def load_bootstrap_symbols(gem); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#480 + sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } + def name_of_proxy_target(constant, class_name); end + + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#172 + sig { returns(::Tapioca::Gem::Event) } + def next_event; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#200 + sig { params(event: ::Tapioca::Gem::ConstantFound).void } + def on_constant(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#212 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def on_node(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#191 + sig { params(event: ::Tapioca::Gem::SymbolFound).void } + def on_symbol(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#452 + sig { params(name: ::String).void } + def seen!(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#457 + sig { params(name: ::String).returns(T::Boolean) } + def seen?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#391 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_alias?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#379 + sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } + def skip_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#408 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_foreign_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#413 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_module?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#400 + sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } + def skip_object?(name, constant); end + + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#374 + sig { params(name: ::String).returns(T::Boolean) } + def skip_symbol?(name); end +end + +# this looks something like: +# "(eval at /path/to/file.rb:123)" +# and we are just interested in the "/path/to/file.rb" part +# +# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://tapioca//lib/tapioca/gem/pipeline.rb#11 +Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#90 +class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#97 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#94 + sig { returns(::RBI::Scope) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#13 +class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#20 + sig { params(symbol: ::String).void } + def initialize(symbol); end + + # source://tapioca//lib/tapioca/gem/events.rb#17 + sig { returns(::String) } + def symbol; end +end + +# source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 +module Tapioca::GemHelper + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 + sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) } + def gem_in_app_dir?(app_dir, full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#17 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_bundle_path?(full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#22 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_ruby_path?(full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#27 + sig { params(path: T.any(::Pathname, ::String)).returns(::String) } + def to_realpath(path); end + + private + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#36 + sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } + def path_in_dir?(path, dir); end +end + +# source://tapioca//lib/tapioca/gem_info.rb#5 +class Tapioca::GemInfo < ::T::Struct + const :name, ::String + const :version, ::Gem::Version + + class << self + # source://tapioca//lib/tapioca/gem_info.rb#13 + sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } + def from_spec(spec); end + + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca/gemfile.rb#7 +class Tapioca::Gemfile + # source://tapioca//lib/tapioca/gemfile.rb#27 + sig { params(excluded_gems: T::Array[::String]).void } + def initialize(excluded_gems); end + + # source://tapioca//lib/tapioca/gemfile.rb#18 + sig { returns(::Bundler::Definition) } + def definition; end + + # source://tapioca//lib/tapioca/gemfile.rb#21 + sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#40 + sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } + def gem(gem_name); end + + # source://tapioca//lib/tapioca/gemfile.rb#24 + sig { returns(T::Array[::String]) } + def missing_specs; end + + # source://tapioca//lib/tapioca/gemfile.rb#45 + sig { void } + def require_bundle; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#92 + sig { returns(::String) } + def dir; end + + # source://tapioca//lib/tapioca/gemfile.rb#54 + sig { returns(::File) } + def gemfile; end + + # source://tapioca//lib/tapioca/gemfile.rb#87 + sig { returns(T::Array[::Symbol]) } + def groups; end + + # source://tapioca//lib/tapioca/gemfile.rb#57 + sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } + def load_dependencies; end + + # @return [File] + # + # source://tapioca//lib/tapioca/gemfile.rb#54 + def lockfile; end + + # source://tapioca//lib/tapioca/gemfile.rb#68 + sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } + def materialize_deps; end + + # source://tapioca//lib/tapioca/gemfile.rb#82 + sig { returns(::Bundler::Runtime) } + def runtime; end +end + +# source://tapioca//lib/tapioca/gemfile.rb#96 +class Tapioca::Gemfile::GemSpec + include ::Tapioca::GemHelper + + # source://tapioca//lib/tapioca/gemfile.rb#136 + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } + def initialize(spec); end + + # source://tapioca//lib/tapioca/gemfile.rb#146 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://tapioca//lib/tapioca/gemfile.rb#171 + sig { params(path: ::String).returns(T::Boolean) } + def contains_path?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#161 + sig { returns(T::Array[::Gem::Dependency]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#201 + sig { returns(T::Boolean) } + def export_rbi_files?; end + + # source://tapioca//lib/tapioca/gemfile.rb#196 + sig { returns(T::Array[::String]) } + def exported_rbi_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#206 + sig { returns(::RBI::MergeTree) } + def exported_rbi_tree; end + + # source://tapioca//lib/tapioca/gemfile.rb#133 + sig { returns(T::Array[::Pathname]) } + def files; end + + # source://tapioca//lib/tapioca/gemfile.rb#130 + sig { returns(::String) } + def full_gem_path; end + + # source://tapioca//lib/tapioca/gemfile.rb#151 + sig { params(gemfile_dir: ::String).returns(T::Boolean) } + def ignore?(gemfile_dir); end + + # source://tapioca//lib/tapioca/gemfile.rb#156 + sig { returns(::String) } + def name; end + + # source://tapioca//lib/tapioca/gemfile.rb#180 + sig { void } + def parse_yard_docs; end + + # source://tapioca//lib/tapioca/gemfile.rb#166 + sig { returns(::String) } + def rbi_file_name; end + + # source://tapioca//lib/tapioca/gemfile.rb#218 + sig { params(file: ::Pathname).returns(::Pathname) } + def relative_path_for(file); end + + # @return [String] + # + # source://tapioca//lib/tapioca/gemfile.rb#130 + def version; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#229 + sig { returns(T::Array[::Pathname]) } + def collect_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#244 + sig { returns(T.nilable(T::Boolean)) } + def default_gem?; end + + # source://tapioca//lib/tapioca/gemfile.rb#303 + sig { returns(T::Boolean) } + def gem_ignored?; end + + # source://tapioca//lib/tapioca/gemfile.rb#282 + sig { params(path: ::String).returns(T::Boolean) } + def has_parent_gemspec?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#249 + sig { returns(::Regexp) } + def require_paths_prefix_matcher; end + + # source://tapioca//lib/tapioca/gemfile.rb#261 + sig { params(file: ::String).returns(::Pathname) } + def resolve_to_ruby_lib_dir(file); end + + # source://tapioca//lib/tapioca/gemfile.rb#275 + sig { returns(::String) } + def version_string; end + + class << self + # source://tapioca//lib/tapioca/gemfile.rb#104 + sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } + def spec_lookup_by_file_path; end + end +end + +# source://tapioca//lib/tapioca/gemfile.rb#116 +Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gemfile.rb#10 +Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } + +# source://tapioca//lib/tapioca/loaders/loader.rb#5 +module Tapioca::Loaders; end + +# source://tapioca//lib/tapioca/loaders/dsl.rb#6 +class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader + # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#27 + sig { override.void } + def load; end + + protected + + # source://tapioca//lib/tapioca/loaders/dsl.rb#81 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#63 + sig { void } + def load_dsl_compilers; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#48 + sig { void } + def load_dsl_extensions; end + + class << self + # source://tapioca//lib/tapioca/loaders/dsl.rb#15 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + end +end + +# source://tapioca//lib/tapioca/loaders/gem.rb#6 +class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader + # source://tapioca//lib/tapioca/loaders/gem.rb#49 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + + # source://tapioca//lib/tapioca/loaders/gem.rb#34 + sig { override.void } + def load; end + + protected + + # source://tapioca//lib/tapioca/loaders/gem.rb#80 + sig { params(file: ::String, error: ::LoadError).void } + def explain_failed_require(file, error); end + + # source://tapioca//lib/tapioca/loaders/gem.rb#60 + sig { void } + def require_gem_file; end + + class << self + # source://tapioca//lib/tapioca/loaders/gem.rb#21 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/loaders/loader.rb#6 +class Tapioca::Loaders::Loader + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + include ::Tapioca::GemHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # @abstract + # + # source://tapioca//lib/tapioca/loaders/loader.rb#17 + sig { abstract.void } + def load; end + + private + + # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality. + # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some + # engine paths. The following commit is the change: + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + # + # source://tapioca//lib/tapioca/loaders/loader.rb#223 + sig { params(engine: T.class_of(Rails::Engine)).returns(T::Array[::String]) } + def eager_load_paths(engine); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#188 + sig { void } + def eager_load_rails_app; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/loaders/loader.rb#167 + def engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#29 + sig do + params( + gemfile: ::Tapioca::Gemfile, + initialize_file: T.nilable(::String), + require_file: T.nilable(::String), + halt_upon_load_error: T::Boolean + ).void + end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#125 + sig { void } + def load_engines_in_classic_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#103 + sig { void } + def load_engines_in_zeitwerk_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#49 + sig do + params( + environment_load: T::Boolean, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#78 + sig { void } + def load_rails_engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#209 + sig { params(file: T.nilable(::String)).void } + def require_helper(file); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#92 + def run_initializers; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#181 + sig { params(path: ::String).void } + def safe_require(path); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#150 + sig { params(blk: T.proc.void).void } + def with_rails_application(&blk); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#143 + sig { returns(T::Boolean) } + def zeitwerk_mode?; end +end + +# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 +module Tapioca::RBIFilesHelper + requires_ancestor { Tapioca::SorbetHelper } + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48 + sig do + params( + index: ::RBI::Index, + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Hash[::String, T::Array[::RBI::Node]]) + end + def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13 + sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void } + def index_rbi(index, kind, file); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25 + sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void } + def index_rbis(index, kind, dir, number_of_workers:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65 + sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } + def location_to_payload_url(loc, path_prefix:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86 + sig do + params( + command: ::String, + gem_dir: ::String, + dsl_dir: ::String, + auto_strictness: T::Boolean, + gems: T::Array[::Tapioca::Gemfile::GemSpec], + compilers: T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)] + ).void + end + def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#223 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } + def extract_empty_scopes(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#228 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } + def extract_methods_and_attrs(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#238 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } + def extract_mixins(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#248 + sig do + params( + nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] + ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) + end + def extract_nodes_with_sigs(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#216 + sig do + params( + nodes: T::Array[::RBI::Node], + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Array[::RBI::Node]) + end + def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#280 + sig { params(path: ::String).returns(::String) } + def gem_name_from_rbi_path(path); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155 + sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } + def parse_and_index_files(index, files, number_of_workers:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171 + sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } + def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#253 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } + def update_gem_rbis_strictnesses(errors, gem_dir); end +end + +# source://tapioca//lib/tapioca/rbi_formatter.rb#5 +class Tapioca::RBIFormatter < ::RBI::Formatter + # source://tapioca//lib/tapioca/rbi_formatter.rb#24 + sig { params(file: ::RBI::File).void } + def write_empty_body_comment!(file); end + + # source://tapioca//lib/tapioca/rbi_formatter.rb#15 + sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } + def write_header!(file, command, reason: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#5 +module Tapioca::RBIHelper + include ::Tapioca::SorbetHelper + extend ::Tapioca::SorbetHelper + extend ::Tapioca::RBIHelper + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91 + sig { params(type: ::String).returns(::String) } + def as_nilable_type(type); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + sig { params(type: ::String).returns(::String) } + def as_non_nilable_type(type); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_block_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_kw_opt_param(name, type:, default:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_rest_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_opt_param(name, type:, default:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_rest_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77 + sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } + def create_typed_param(param, type); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82 + sig { params(sig_string: ::String).returns(::String) } + def sanitize_signature_types(sig_string); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109 + sig { params(name: ::String).returns(T::Boolean) } + def valid_method_name?(name); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#123 + sig { params(name: ::String).returns(T::Boolean) } + def valid_parameter_name?(name); end + + class << self + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 + sig do + params( + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).returns(::String) + end + def serialize_type_variable(type, variance, fixed, upper, lower); end + end +end + +# source://tapioca//lib/tapioca/repo_index.rb#5 +class Tapioca::RepoIndex + # source://tapioca//lib/tapioca/repo_index.rb#26 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/repo_index.rb#31 + sig { params(gem_name: ::String).void } + def <<(gem_name); end + + # source://tapioca//lib/tapioca/repo_index.rb#36 + sig { returns(T::Enumerable[::String]) } + def gems; end + + # source://tapioca//lib/tapioca/repo_index.rb#41 + sig { params(gem_name: ::String).returns(T::Boolean) } + def has_gem?(gem_name); end + + class << self + # source://tapioca//lib/tapioca/repo_index.rb#18 + sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } + def from_hash(hash); end + + # source://tapioca//lib/tapioca/repo_index.rb#13 + sig { params(json: ::String).returns(Tapioca::RepoIndex) } + def from_json(json); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 +module Tapioca::Runtime; end + +# This module should only be included when running versions of Ruby +# older than 3.2. Because the Class#attached_object method is not +# available, it implements finding the attached class of a singleton +# class by iterating through ObjectSpace. +module Tapioca::Runtime::AttachedClassOf + # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 + sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } + def attached_class_of(singleton_class); end +end + +# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6 +class Tapioca::Runtime::DynamicMixinCompiler + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 + sig { params(constant: ::Module).void } + def initialize(constant); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + sig { returns(T::Array[::Symbol]) } + def class_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 + sig { params(tree: ::RBI::Tree).void } + def compile_class_attributes(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 + sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } + def compile_mixes_in_class_methods(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + sig { returns(T::Array[::Module]) } + def dynamic_extends; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + def dynamic_includes; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 + sig { returns(T::Boolean) } + def empty_attributes?; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 + sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(qualified_mixin_name); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + sig { returns(T::Array[::Symbol]) } + def instance_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 + sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } + def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end +end + +# This class is responsible for storing and looking up information related to generic types. +# +# The class stores 2 different kinds of data, in two separate lookup tables: +# 1. a lookup of generic type instances by name: `@generic_instances` +# 2. a lookup of type variable serializer by constant and type variable +# instance: `@type_variables` +# +# By storing the above data, we can cheaply query each constant against this registry +# to see if it declares any generic type variables. This becomes a simple lookup in the +# `@type_variables` hash table with the given constant. +# +# If there is no entry, then we can cheaply know that we can skip generic type +# information generation for this type. +# +# On the other hand, if we get a result, then the result will be a hash of type +# variable to type variable serializers. This allows us to associate type variables +# to the constant names that represent them, easily. +# +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 +module Tapioca::Runtime::GenericTypeRegistry + class << self + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 + sig { params(instance: ::Object).returns(T::Boolean) } + def generic_type_instance?(instance); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 + sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } + def lookup_type_variables(constant); end + + # This method is responsible for building the name of the instantiated concrete type + # and cloning the given constant so that we can return a type that is the same + # as the current type but is a different instance and has a different name method. + # + # We cache those cloned instances by their name in `@generic_instances`, so that + # we don't keep instantiating a new type every single time it is referenced. + # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only + # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and + # 2 hash lookups (for the other two `Foo[Integer]`s). + # + # This method returns the created or cached clone of the constant. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 + sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } + def register_type(constant, types); end + + # This method is called from intercepted calls to `type_member` and `type_template`. + # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable` + # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`. + # + # This method creates a `String` with that data and stores it in the + # `@type_variables` lookup table, keyed by the `constant` and `type_variable`. + # + # Finally, the original `type_variable` is returned from this method, so that the caller + # can return it from the original methods as well. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 + sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } + def register_type_variable(constant, type_variable); end + + private + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 + sig { params(constant: ::Module, name: ::String).returns(::Module) } + def create_generic_type(constant, name); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 + sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } + def create_safe_subclass(constant); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 + sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } + def lookup_or_initialize_type_variables(constant); end + end +end + +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 + sig { params(raw_type: ::Module, underlying_type: ::Module).void } + def initialize(raw_type, underlying_type); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 + sig { params(obj: T.untyped).returns(T::Boolean) } + def valid?(obj); end +end + +module Tapioca::Runtime::Reflection + include ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + sig { params(constant: ::Module).returns(T.untyped) } + def abstract_type_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#77 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def ancestors_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#92 + sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } + def are_equal?(object, other); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#56 + sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } + def class_of(object); end + + # @param constant [BasicObject] + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#38 + def constant_defined?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#49 + sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) } + def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#61 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def constants_of(constant); end + + # Returns an array with all classes that are < than the supplied class. + # + # class C; end + # descendants_of(C) # => [] + # + # class B < C; end + # descendants_of(C) # => [B] + # + # class A < B; end + # descendants_of(C) # => [B, A] + # + # class D < C; end + # descendants_of(C) # => [B, A, D] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#167 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#189 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def file_candidates_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + sig { params(constant: ::Module).returns(T::Boolean) } + def final_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#112 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def inherited_ancestors_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#145 + sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } + def method_of(constant, method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#66 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def name_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#140 + sig { params(type: ::T::Types::Base).returns(::String) } + def name_of_type(type); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#87 + sig { params(object: ::BasicObject).returns(::Integer) } + def object_id_of(object); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#107 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def private_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#102 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def protected_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#97 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def public_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#121 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def qualified_name_of(constant); end + + # Examines the call stack to identify the closest location where a "require" is performed + # by searching for the label "". If none is found, it returns the location + # labeled "
    ", which is the original call site. + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#179 + sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } + def resolve_loc(locations); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + sig { params(constant: ::Module).returns(T::Boolean) } + def sealed_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + def signature_of(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#72 + sig { params(constant: ::Module).returns(T::Class[T.anything]) } + def singleton_class_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#82 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) } + def superclass_of(constant); end + + private + + # source://tapioca//lib/tapioca/runtime/reflection.rb#244 + sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } + def child_module_for_parent_with_name(parent, name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#260 + sig { params(name: ::String).returns(T::Boolean) } + def has_aliased_namespace?(name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_defined_by_forwardable_module?(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#230 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def methods_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def relevant_methods_for(constant); end +end + +# source://tapioca//lib/tapioca/runtime/reflection.rb#25 +Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#21 +Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#22 +Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#28 +Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#32 +Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#23 +Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#27 +Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#31 +Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#30 +Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#29 +Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#35 +Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#24 +Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#26 +Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 +module Tapioca::Runtime::Trackers + class << self + # source://tapioca//lib/tapioca/runtime/trackers.rb#34 + sig { void } + def disable_all!; end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#39 + sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void } + def register_tracker(tracker); end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#21 + sig do + type_parameters(:Return) + .params( + blk: T.proc.returns(T.type_parameter(:Return)) + ).returns(T.type_parameter(:Return)) + end + def with_trackers_enabled(&blk); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#7 +module Tapioca::Runtime::Trackers::Autoload + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 + sig { void } + def eager_load_all!; end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 + sig { params(constant_name: ::String).void } + def register(constant_name); end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_disabled_exits(&block); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11 +Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) + +# Registers a TracePoint immediately upon load to track points at which +# classes and modules are opened for definition. This is used to track +# correspondence between classes/modules and files, as this information isn't +# available in the ruby runtime without extra accounting. +module Tapioca::Runtime::Trackers::ConstantDefinition + extend ::Tapioca::Runtime::Trackers::Tracker + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#61 + def build_constant_location(tp, locations); end + + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#55 + def disable!; end + + # Returns the files in which this class or module was opened. Doesn't know + # about situations where the class was opened prior to +require+ing, + # or where metaprogramming was used via +eval+, etc. + # + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#71 + def files_for(klass); end + + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75 + def locations_for(klass); end + end +end + +module Tapioca::Runtime::Trackers::Mixin + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def constants_with_mixin(mixin); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61 + sig do + params( + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + constant: ::Module + ).returns(T.nilable(::String)) + end + def mixin_location(mixin, mixin_type, constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35 + sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void } + def register(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43 + def resolve_to_attached_class(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_disabled_registration(&block); end + + private + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def find_or_initialize_mixin_lookup(mixin); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + location: ::String + ).void + end + def register_with_location(constant, mixin, mixin_type, location); end + end +end + +class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum + enums do + Prepend = new + Include = new + Extend = new + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#7 +module Tapioca::Runtime::Trackers::RequiredAncestor + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15 + sig { params(requiring: ::T::Helpers, block: T.proc.void).void } + def register(requiring, block); end + + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23 + sig { params(mod: ::Module).returns(T::Array[T.proc.void]) } + def required_ancestors_blocks_by(mod); end + + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28 + sig { params(mod: ::Module).returns(T::Array[T.untyped]) } + def required_ancestors_by(mod); end + end +end + +# @abstract Subclasses must implement the `abstract` methods below. +module Tapioca::Runtime::Trackers::Tracker + abstract! + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26 + sig { void } + def disable!; end + + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#30 + def enabled?; end + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#34 + def with_disabled_tracker(&block); end + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17 + sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void } + def extended(base); end + end +end + +# source://tapioca//lib/tapioca.rb#33 +Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#32 +Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 +module Tapioca::SorbetHelper + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#32 + sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } + def sorbet(*sorbet_args); end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37 + sig { returns(::String) } + def sorbet_path; end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44 + sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } + def sorbet_supports?(feature, version: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24 +Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13 +Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 +Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8 +Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20 +Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 +Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5 +module Tapioca::Static; end + +# source://tapioca//lib/tapioca/static/requires_compiler.rb#6 +class Tapioca::Static::RequiresCompiler + # source://tapioca//lib/tapioca/static/requires_compiler.rb#10 + sig { params(sorbet_path: ::String).void } + def initialize(sorbet_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#15 + sig { returns(::String) } + def compile; end + + private + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#29 + sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } + def collect_files(config); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#44 + sig { params(file_path: ::String).returns(T::Enumerable[::String]) } + def collect_requires(file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#51 + sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } + def file_ignored_by_sorbet?(config, file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#80 + sig { params(path: ::Pathname).returns(T::Array[::String]) } + def path_parts(path); end +end + +# source://tapioca//lib/tapioca/static/symbol_loader.rb#6 +module Tapioca::Static::SymbolLoader + extend ::Tapioca::SorbetHelper + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + class << self + # source://tapioca//lib/tapioca/static/symbol_loader.rb#23 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def engine_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#48 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def gem_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#13 + sig { returns(T::Set[::String]) } + def payload_symbols; end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#53 + sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } + def symbols_from_paths(paths); end + + private + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#69 + sig { returns(T::Array[T.class_of(Rails::Engine)]) } + def engines; end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 + sig { params(input: ::String, table_type: ::String).returns(::String) } + def symbol_table_json_from(input, table_type: T.unsafe(nil)); end + end +end + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6 +class Tapioca::Static::SymbolTableParser + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 + sig { params(name: ::String).returns(::String) } + def fully_qualified_name(name); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36 + sig { params(object: T::Hash[::String, T.untyped]).void } + def parse_object(object); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27 + sig { returns(T::Set[::String]) } + def symbols; end + + class << self + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15 + sig { params(json_string: ::String).returns(T::Set[::String]) } + def parse_json(json_string); end + end +end + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 +Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca.rb#35 +Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#34 +Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 +class Tapioca::TypeVariable < ::T::Types::TypeVariable + # @return [TypeVariable] a new instance of TypeVariable + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#109 + def initialize(name, variance); end + + # Returns the value of attribute name. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#114 + def name; end +end + +# This is subclassing from `Module` so that instances of this type will be modules. +# The reason why we want that is because that means those instances will automatically +# get bound to the constant names they are assigned to by Ruby. As a result, we don't +# need to do any matching of constants to type variables to bind their names, Ruby will +# do that automatically for us and we get the `name` method for free from `Module`. +# +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122 +class Tapioca::TypeVariableModule < ::Module + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146 + sig do + params( + context: ::Module, + type: ::Tapioca::TypeVariableModule::Type, + variance: ::Symbol, + bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) + ).void + end + def initialize(context, type, variance, bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181 + sig { returns(::Tapioca::TypeVariable) } + def coerce_to_type_variable; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161 + sig { returns(T::Boolean) } + def fixed?; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155 + sig { returns(T.nilable(::String)) } + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166 + sig { returns(::String) } + def serialize; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 + sig { returns(::Tapioca::TypeVariableModule::Type) } + def type; end + + private + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def bounds; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133 +Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 +class Tapioca::TypeVariableModule::Type < ::T::Enum + enums do + Member = new + Template = new + HasAttachedClass = new + end +end + +# source://tapioca//lib/tapioca/version.rb#5 +Tapioca::VERSION = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/source_uri.rb#7 +class URI::Source < ::URI::File + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri/0.13.1/lib/uri/generic.rb#243 + def gem_name; end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri/0.13.1/lib/uri/generic.rb#283 + def line_number; end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://tapioca//lib/tapioca/helpers/source_uri.rb#10 +URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/thor@1.3.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/thor@1.3.2.rbi new file mode 100644 index 0000000..10202a5 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/thor@1.3.2.rbi @@ -0,0 +1,4378 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `thor` gem. +# Please instead update this file by running `bin/tapioca gem thor`. + + +# source://thor//lib/thor/shell/lcs_diff.rb#1 +module LCSDiff + protected + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/lcs_diff.rb#6 + def show_diff(destination, content); end + + private + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/lcs_diff.rb#37 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/lcs_diff.rb#21 + def output_diff_line(diff); end +end + +# source://thor//lib/thor/command.rb#1 +class Thor + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + # source://thor//lib/thor.rb#663 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + class << self + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def at_least_one(*args, &block); end + + # Extend check unknown options to accept a hash of conditions. + # + # === Parameters + # options: A hash containing :only and/or :except keys + # + # source://thor//lib/thor.rb#350 + def check_unknown_options!(options = T.unsafe(nil)); end + + # Overwrite check_unknown_options? to take subcommands and options into account. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#363 + def check_unknown_options?(config); end + + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#449 + def command_exists?(command_name); end + + # Prints help information for the given command. + # + # ==== Parameters + # shell + # command_name + # + # source://thor//lib/thor.rb#258 + def command_help(shell, command_name); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_command(meth = T.unsafe(nil)); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_task(meth = T.unsafe(nil)); end + + # source://thor//lib/thor/base.rb#26 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage + # description + # options + # + # source://thor//lib/thor.rb#54 + def desc(usage, description, options = T.unsafe(nil)); end + + # Disable the check for required options for the given commands. + # This is useful if you have a command that does not need the required options + # to work, like help. + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#434 + def disable_required_check!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#438 + def disable_required_check?(command); end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def exclusive(*args, &block); end + + # Prints help information for this class. + # + # ==== Parameters + # shell + # + # source://thor//lib/thor.rb#288 + def help(shell, subcommand = T.unsafe(nil)); end + + # Defines the long description of the next command. + # + # Long description is by default indented, line-wrapped and repeated whitespace merged. + # In order to print long description verbatim, with indentation and spacing exactly + # as found in the code, use the +wrap+ option + # + # long_desc 'your very long description', wrap: false + # + # ==== Parameters + # long description + # options + # + # source://thor//lib/thor.rb#78 + def long_desc(long_description, options = T.unsafe(nil)); end + + # Maps an input to a command. If you define: + # + # map "-T" => "list" + # + # Running: + # + # thor -T + # + # Will invoke the list command. + # + # ==== Parameters + # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. + # + # source://thor//lib/thor.rb#101 + def map(mappings = T.unsafe(nil), **kw); end + + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def method_at_least_one(*args, &block); end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def method_exclusive(*args, &block); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#163 + def method_option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#129 + def method_options(options = T.unsafe(nil)); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#163 + def option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#129 + def options(options = T.unsafe(nil)); end + + # Allows for custom "Command" package naming. + # + # === Parameters + # name + # options + # + # source://thor//lib/thor.rb#12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#309 + def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#309 + def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Registers another Thor subclass as a command. + # + # ==== Parameters + # klass:: Thor subclass to register + # command:: Subcommand name to use + # usage:: Short usage for the subcommand + # description:: Description for the subcommand + # + # source://thor//lib/thor.rb#37 + def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end + + # Stop parsing of options as soon as an unknown option or a regular + # argument is encountered. All remaining arguments are passed to the command. + # This is useful if you have a command that can receive arbitrary additional + # options, and where those additional options should not be handled by + # Thor. + # + # ==== Example + # + # To better understand how this is useful, let's consider a command that calls + # an external command. A user may want to pass arbitrary options and + # arguments to that command. The command itself also accepts some options, + # which should be handled by Thor. + # + # class_option "verbose", :type => :boolean + # stop_on_unknown_option! :exec + # check_unknown_options! :except => :exec + # + # desc "exec", "Run a shell command" + # def exec(*args) + # puts "diagnostic output" if options[:verbose] + # Kernel.exec(*args) + # end + # + # Here +exec+ can be called with +--verbose+ to get diagnostic output, + # e.g.: + # + # $ thor exec --verbose echo foo + # diagnostic output + # foo + # + # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: + # + # $ thor exec echo --verbose foo + # --verbose foo + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#420 + def stop_on_unknown_option!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#424 + def stop_on_unknown_option?(command); end + + # source://thor//lib/thor.rb#329 + def subcommand(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#325 + def subcommand_classes; end + + # source://thor//lib/thor.rb#320 + def subcommands; end + + # source://thor//lib/thor.rb#329 + def subtask(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#320 + def subtasks; end + + # Prints help information for the given command. + # + # ==== Parameters + # shell + # command_name + # + # source://thor//lib/thor.rb#258 + def task_help(shell, command_name); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. It receives + # the command that is going to be invoked and a boolean which indicates if + # the namespace should be displayed as arguments. + # + # source://thor//lib/thor.rb#546 + def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#552 + def baseclass; end + + # source://thor//lib/thor.rb#560 + def create_command(meth); end + + # source://thor//lib/thor.rb#560 + def create_task(meth); end + + # help command has the required check disabled by default. + # + # source://thor//lib/thor.rb#478 + def disable_required_check; end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor.rb#505 + def dispatch(meth, given_args, given_opts, config); end + + # source://thor//lib/thor.rb#556 + def dynamic_command_class; end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#626 + def find_command_possibilities(meth); end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#626 + def find_task_possibilities(meth); end + + # source://thor//lib/thor.rb#586 + def initialize_added; end + + # Returns this class at least one of required options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#469 + def method_at_least_one_option_names; end + + # Returns this class exclusive options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#460 + def method_exclusive_option_names; end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#605 + def normalize_command_name(meth); end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#605 + def normalize_task_name(meth); end + + # source://thor//lib/thor.rb#493 + def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#482 + def print_exclusive_options(shell, command = T.unsafe(nil)); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#592 + def retrieve_command_name(args); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#592 + def retrieve_task_name(args); end + + # Sort the commands, lexicographically by default. + # + # Can be overridden in the subclass to change the display order of the + # commands. + # + # source://thor//lib/thor.rb#653 + def sort_commands!(list); end + + # source://thor//lib/thor.rb#473 + def stop_on_unknown_option; end + + # source://thor//lib/thor.rb#641 + def subcommand_help(cmd); end + + # source://thor//lib/thor.rb#641 + def subtask_help(cmd); end + end +end + +# source://thor//lib/thor/actions/empty_directory.rb#2 +module Thor::Actions + mixes_in_class_methods ::Thor::Actions::ClassMethods + + # Extends initializer to add more configuration options. + # + # ==== Configuration + # behavior:: The actions default behavior. Can be :invoke or :revoke. + # It also accepts :force, :skip and :pretend to set the behavior + # and the respective option. + # + # destination_root:: The root directory needed for some actions. + # + # source://thor//lib/thor/actions.rb#72 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Wraps an action object and call it accordingly to the thor class behavior. + # + # source://thor//lib/thor/actions.rb#89 + def action(instance); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def add_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def add_link(destination, *args); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#192 + def append_file(path, *args, &block); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#192 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path:: The path to the file to execute. Can be a web address or + # a relative path from the source root. + # + # ==== Examples + # + # apply "http://gist.github.com/103208" + # + # apply "recipes/jquery.rb" + # + # source://thor//lib/thor/actions.rb#216 + def apply(path, config = T.unsafe(nil)); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions.rb#10 + def behavior; end + + # Sets the attribute behavior + # + # @param value the value to set the attribute behavior to. + # + # source://thor//lib/thor/actions.rb#10 + def behavior=(_arg0); end + + # Changes the mode of the given file or directory. + # + # ==== Parameters + # mode:: the file mode + # path:: the name of the file to change mode + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # chmod "script/server", 0755 + # + # source://thor//lib/thor/actions/file_manipulation.rb#145 + def chmod(path, mode, config = T.unsafe(nil)); end + + # Comment all lines matching a given regex. It will leave the space + # which existed before the beginning of the line in tact and will insert + # a single space after the comment hash. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to comment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # comment_lines 'config/initializers/session_store.rb', /cookie_store/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#308 + def comment_lines(path, flag, *args); end + + # Copies the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status, and + # :mode => :preserve, to preserve the file mode from the source. + # + # ==== Examples + # + # copy_file "README", "doc/README" + # + # copy_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#20 + def copy_file(source, *args, &block); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def create_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def create_link(destination, *args); end + + # Returns the root for this thor class (also aliased as destination root). + # + # source://thor//lib/thor/actions.rb#99 + def destination_root; end + + # Sets the root for this thor class. Relatives path are added to the + # directory where the script was invoked and expanded. + # + # source://thor//lib/thor/actions.rb#106 + def destination_root=(root); end + + # Copies recursively the files from source directory to root directory. + # If any of the files finishes with .tt, it's considered to be a template + # and is placed in the destination without the extension .tt. If any + # empty directory is found, it's copied and all .empty_directory files are + # ignored. If any file name is wrapped within % signs, the text within + # the % signs will be executed as a method and replaced with the returned + # value. Let's suppose a doc directory with the following files: + # + # doc/ + # components/.empty_directory + # README + # rdoc.rb.tt + # %app_name%.rb + # + # When invoked as: + # + # directory "doc" + # + # It will create a doc directory in the destination with the following + # files (assuming that the `app_name` method returns the value "blog"): + # + # doc/ + # components/ + # README + # rdoc.rb + # blog.rb + # + # Encoded path note: Since Thor internals use Object#respond_to? to check if it can + # expand %something%, this `something` should be a public method in the class calling + # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # If :recursive => false, does not look for paths recursively. + # If :mode => :preserve, preserve the file mode from the source. + # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. + # + # ==== Examples + # + # directory "doc" + # directory "doc", "docs", :recursive => false + # + # source://thor//lib/thor/actions/directory.rb#49 + def directory(source, *args, &block); end + + # Creates an empty directory. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # empty_directory "doc" + # + # source://thor//lib/thor/actions/empty_directory.rb#13 + def empty_directory(destination, config = T.unsafe(nil)); end + + # Receives a file or directory and search for it in the source paths. + # + # @raise [Error] + # + # source://thor//lib/thor/actions.rb#133 + def find_in_source_paths(file); end + + # Gets the content at the given address and places it at the given relative + # destination. If a block is given instead of destination, the content of + # the url is yielded and used as location. + # + # +get+ relies on open-uri, so passing application user input would provide + # a command injection attack vector. + # + # ==== Parameters + # source:: the address of the given content. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status, and + # :http_headers => to add headers to an http request. + # + # ==== Examples + # + # get "http://gist.github.com/103208", "doc/README" + # + # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"} + # + # get "http://gist.github.com/103208" do |content| + # content.split("\n").first + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#81 + def get(source, *args, &block); end + + # Run a regular expression replacement on a file. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string to be replaced + # replacement:: the replacement, can be also given as a block + # config:: give :verbose => false to not log the status, and + # :force => true, to force the replacement regardless of runner behavior. + # + # ==== Example + # + # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' + # + # gsub_file 'README', /rake/, :green do |match| + # match << " no more. Use thor!" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#262 + def gsub_file(path, flag, *args, &block); end + + # Goes to the root and execute the given block. + # + # source://thor//lib/thor/actions.rb#200 + def in_root; end + + # Injects text right after the class definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # klass:: the class to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do + # " filter_parameter :password\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#216 + def inject_into_class(path, klass, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def inject_into_file(destination, *args, &block); end + + # Injects text right after the module definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # module_name:: the module to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do + # " def help; 'help'; end\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#239 + def inject_into_module(path, module_name, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def insert_into_file(destination, *args, &block); end + + # Do something in the root or on a provided subfolder. If a relative path + # is given it's referenced from the current root. The full path is yielded + # to the block you provide. The path is set back to the previous path when + # the method exits. + # + # Returns the value yielded by the block. + # + # ==== Parameters + # dir:: the directory to move to. + # config:: give :verbose => true to log and use padding. + # + # source://thor//lib/thor/actions.rb#170 + def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Links the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # link_file "README", "doc/README" + # + # link_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#50 + def link_file(source, *args); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#170 + def prepend_file(path, *args, &block); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#170 + def prepend_to_file(path, *args, &block); end + + # Returns the given path relative to the absolute root (ie, root where + # the script started). + # + # source://thor//lib/thor/actions.rb#114 + def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#325 + def remove_dir(path, config = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#325 + def remove_file(path, config = T.unsafe(nil)); end + + # Executes a command returning the contents of the command. + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with + # to append an executable to command execution. + # + # ==== Example + # + # inside('vendor') do + # run('ln -s ~/edge rails') + # end + # + # source://thor//lib/thor/actions.rb#248 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status. + # + # source://thor//lib/thor/actions.rb#285 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # source://thor//lib/thor/actions.rb#127 + def source_paths; end + + # Gets an ERB template at the relative source, executes it and makes a copy + # at the relative destination. If the destination is not given it's assumed + # to be equal to the source removing .tt from the filename. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # template "README", "doc/README" + # + # template "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#117 + def template(source, *args, &block); end + + # Run a thor command. A hash of options can be given and it's converted to + # switches. + # + # ==== Parameters + # command:: the command to be invoked + # args:: arguments to the command + # config:: give :verbose => false to not log the status, :capture => true to hide to output. + # Other options are given as parameter to Thor. + # + # + # ==== Examples + # + # thor :install, "http://gist.github.com/103208" + # #=> thor install http://gist.github.com/103208 + # + # thor :list, :all => true, :substring => 'rails' + # #=> thor list --all --substring=rails + # + # source://thor//lib/thor/actions.rb#308 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. Preserves indentation before + # the comment hash and removes the hash and any immediate following space. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to uncomment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # uncomment_lines 'config/initializers/session_store.rb', /active_record/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#289 + def uncomment_lines(path, flag, *args); end + + protected + + # source://thor//lib/thor/actions.rb#329 + def _cleanup_options_and_set(options, key); end + + # Allow current root to be shared between invocations. + # + # source://thor//lib/thor/actions.rb#325 + def _shared_configuration; end + + private + + # source://thor//lib/thor/actions/file_manipulation.rb#346 + def capture(*args); end + + # source://thor//lib/thor/actions/file_manipulation.rb#342 + def concat(string); end + + # Returns the value of attribute output_buffer. + # + # source://thor//lib/thor/actions/file_manipulation.rb#337 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://thor//lib/thor/actions/file_manipulation.rb#337 + def output_buffer=(_arg0); end + + # source://thor//lib/thor/actions/file_manipulation.rb#350 + def with_output_buffer(buf = T.unsafe(nil)); end + + class << self + # source://thor//lib/thor/actions.rb#12 + def included(base); end + end +end + +# Thor::Actions#capture depends on what kind of buffer is used in ERB. +# Thus CapturableERB fixes ERB to use String buffer. +# +# source://thor//lib/thor/actions/file_manipulation.rb#362 +class Thor::Actions::CapturableERB < ::ERB + # source://thor//lib/thor/actions/file_manipulation.rb#363 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# source://thor//lib/thor/actions.rb#17 +module Thor::Actions::ClassMethods + # Add runtime options that help actions execution. + # + # source://thor//lib/thor/actions.rb#48 + def add_runtime_options!; end + + # Hold source paths for one Thor instance. source_paths_for_search is the + # method responsible to gather source_paths from this current class, + # inherited paths and the source root. + # + # source://thor//lib/thor/actions.rb#22 + def source_paths; end + + # Returns the source paths in the following order: + # + # 1) This class source paths + # 2) Source root + # 3) Parents source paths + # + # source://thor//lib/thor/actions.rb#38 + def source_paths_for_search; end + + # Stores and return the source root for this class + # + # source://thor//lib/thor/actions.rb#27 + def source_root(path = T.unsafe(nil)); end +end + +# CreateFile is a subset of Template, which instead of rendering a file with +# ERB, it gets the content from the user. +# +# source://thor//lib/thor/actions/create_file.rb#32 +class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory + # @return [CreateFile] a new instance of CreateFile + # + # source://thor//lib/thor/actions/create_file.rb#35 + def initialize(base, destination, data, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/create_file.rb#33 + def data; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#45 + def identical?; end + + # source://thor//lib/thor/actions/create_file.rb#60 + def invoke!; end + + # Holds the content to be added to the file. + # + # source://thor//lib/thor/actions/create_file.rb#52 + def render; end + + protected + + # Shows the file collision menu to the user and gets the result. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#100 + def force_on_collision?; end + + # If force is true, run the action, otherwise check if it's not being + # skipped. If both are false, show the file_collision menu, if the menu + # returns true, force it, otherwise skip. + # + # source://thor//lib/thor/actions/create_file.rb#86 + def force_or_skip_or_conflict(force, skip, &block); end + + # Now on conflict we check if the file is identical or not. + # + # source://thor//lib/thor/actions/create_file.rb#73 + def on_conflict_behavior(&block); end +end + +# CreateLink is a subset of CreateFile, which instead of taking a block of +# data, just takes a source string from the user. +# +# source://thor//lib/thor/actions/create_link.rb#27 +class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile + # source://thor//lib/thor/actions/create_link.rb#28 + def data; end + + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#56 + def exists?; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#35 + def identical?; end + + # source://thor//lib/thor/actions/create_link.rb#40 + def invoke!; end +end + +# source://thor//lib/thor/actions/directory.rb#55 +class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory + # @return [Directory] a new instance of Directory + # + # source://thor//lib/thor/actions/directory.rb#58 + def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # source://thor//lib/thor/actions/directory.rb#64 + def invoke!; end + + # source://thor//lib/thor/actions/directory.rb#69 + def revoke!; end + + # Returns the value of attribute source. + # + # source://thor//lib/thor/actions/directory.rb#56 + def source; end + + protected + + # source://thor//lib/thor/actions/directory.rb#75 + def execute!; end + + # source://thor//lib/thor/actions/directory.rb#99 + def file_level_lookup(previous_lookup); end + + # source://thor//lib/thor/actions/directory.rb#103 + def files(lookup); end +end + +# source://thor//lib/thor/actions/empty_directory.rb#23 +class Thor::Actions::EmptyDirectory + # Initializes given the source and destination. + # + # ==== Parameters + # base:: A Thor::Base instance + # source:: Relative path to the source of this file + # destination:: Relative path to the destination of this file + # config:: give :verbose => false to not log the status. + # + # @return [EmptyDirectory] a new instance of EmptyDirectory + # + # source://thor//lib/thor/actions/empty_directory.rb#34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def base; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def config; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def destination; end + + # Checks if the destination file already exists. + # + # ==== Returns + # Boolean:: true if the file exists, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#45 + def exists?; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def given_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#49 + def invoke!; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def relative_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#56 + def revoke!; end + + protected + + # Filenames in the encoded form are converted. If you have a file: + # + # %file_name%.rb + # + # It calls #file_name from the base and replaces %-string with the + # return value (should be String) of #file_name: + # + # user.rb + # + # The method referenced can be either public or private. + # + # source://thor//lib/thor/actions/empty_directory.rb#103 + def convert_encoded_instructions(filename); end + + # Sets the absolute destination value from a relative destination value. + # It also stores the given and relative destination. Let's suppose our + # script is being executed on "dest", it sets the destination root to + # "dest". The destination, given_destination and relative_destination + # are related in the following way: + # + # inside "bar" do + # empty_directory "baz" + # end + # + # destination #=> dest/bar/baz + # relative_destination #=> bar/baz + # given_destination #=> baz + # + # source://thor//lib/thor/actions/empty_directory.rb#85 + def destination=(destination); end + + # Receives a hash of options and just execute the block if some + # conditions are met. + # + # source://thor//lib/thor/actions/empty_directory.rb#113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # source://thor//lib/thor/actions/empty_directory.rb#132 + def on_conflict_behavior; end + + # source://thor//lib/thor/actions/empty_directory.rb#126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # source://thor//lib/thor/actions/empty_directory.rb#138 + def say_status(status, color); end +end + +# source://thor//lib/thor/actions/inject_into_file.rb#36 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # @return [InjectIntoFile] a new instance of InjectIntoFile + # + # source://thor//lib/thor/actions/inject_into_file.rb#39 + def initialize(base, destination, data, config); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def behavior; end + + # Returns the value of attribute flag. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def flag; end + + # source://thor//lib/thor/actions/inject_into_file.rb#52 + def invoke!; end + + # Returns the value of attribute replacement. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def replacement; end + + # source://thor//lib/thor/actions/inject_into_file.rb#74 + def revoke!; end + + protected + + # source://thor//lib/thor/actions/inject_into_file.rb#110 + def content; end + + # Adds the content to the file. + # + # source://thor//lib/thor/actions/inject_into_file.rb#120 + def replace!(regexp, string, force); end + + # @return [Boolean] + # + # source://thor//lib/thor/actions/inject_into_file.rb#114 + def replacement_present?; end + + # source://thor//lib/thor/actions/inject_into_file.rb#90 + def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end +end + +# Injects the given content into a file. Different from gsub_file, this +# method is reversible. +# +# ==== Parameters +# destination:: Relative path to the destination root +# data:: Data to add to the file. Can be given as a block. +# config:: give :verbose => false to not log the status and the flag +# for injection (:after or :before) or :force => true for +# insert two or more times the same content. +# +# ==== Examples +# +# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" +# +# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do +# gems = ask "Which gems would you like to add?" +# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") +# end +# +# source://thor//lib/thor/actions/inject_into_file.rb#24 +Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) + +# source://thor//lib/thor/error.rb#57 +class Thor::AmbiguousCommandError < ::Thor::Error; end + +# source://thor//lib/thor/error.rb#59 +Thor::AmbiguousTaskError = Thor::AmbiguousCommandError + +# source://thor//lib/thor/parser/argument.rb#2 +class Thor::Argument + # @raise [ArgumentError] + # @return [Argument] a new instance of Argument + # + # source://thor//lib/thor/parser/argument.rb#8 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute banner. + # + # source://thor//lib/thor/parser/argument.rb#5 + def banner; end + + # Returns the value of attribute default. + # + # source://thor//lib/thor/parser/argument.rb#5 + def default; end + + # Returns the value of attribute description. + # + # source://thor//lib/thor/parser/argument.rb#5 + def description; end + + # Returns the value of attribute enum. + # + # source://thor//lib/thor/parser/argument.rb#5 + def enum; end + + # source://thor//lib/thor/parser/argument.rb#52 + def enum_to_s; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def human_name; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def name; end + + # source://thor//lib/thor/parser/argument.rb#27 + def print_default; end + + # Returns the value of attribute required. + # + # source://thor//lib/thor/parser/argument.rb#5 + def required; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#39 + def required?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#43 + def show_default?; end + + # Returns the value of attribute type. + # + # source://thor//lib/thor/parser/argument.rb#5 + def type; end + + # source://thor//lib/thor/parser/argument.rb#35 + def usage; end + + protected + + # source://thor//lib/thor/parser/argument.rb#71 + def default_banner; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#67 + def valid_type?(type); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/argument.rb#62 + def validate!; end +end + +# source://thor//lib/thor/parser/argument.rb#3 +Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/arguments.rb#2 +class Thor::Arguments + # Takes an array of Thor::Argument objects. + # + # @return [Arguments] a new instance of Arguments + # + # source://thor//lib/thor/parser/arguments.rb#26 + def initialize(arguments = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/arguments.rb#40 + def parse(args); end + + # source://thor//lib/thor/parser/arguments.rb#53 + def remaining; end + + private + + # Raises an error if @non_assigned_required array is not empty. + # + # @raise [RequiredArgumentMissingError] + # + # source://thor//lib/thor/parser/arguments.rb#186 + def check_requirement!; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#84 + def current_is_value?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#64 + def last?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#59 + def no_or_skip?(arg); end + + # Runs through the argument array getting all strings until no string is + # found or a switch is found. + # + # ["a", "b", "c"] + # + # And returns it as an array: + # + # ["a", "b", "c"] + # + # source://thor//lib/thor/parser/arguments.rb#118 + def parse_array(name); end + + # Runs through the argument array getting strings that contains ":" and + # mark it as a hash: + # + # [ "name:string", "age:integer" ] + # + # Becomes: + # + # { "name" => "string", "age" => "integer" } + # + # source://thor//lib/thor/parser/arguments.rb#97 + def parse_hash(name); end + + # Check if the peek is numeric format and return a Float or Integer. + # Check if the peek is included in enum if enum is provided. + # Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#139 + def parse_numeric(name); end + + # Parse string: + # for --string-arg, just return the current value in the pile + # for --no-string-arg, nil + # Check if the peek is included in enum if enum is provided. Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#158 + def parse_string(name); end + + # source://thor//lib/thor/parser/arguments.rb#68 + def peek; end + + # source://thor//lib/thor/parser/arguments.rb#72 + def shift; end + + # source://thor//lib/thor/parser/arguments.rb#76 + def unshift(arg); end + + # Raises an error if the switch is an enum and the values aren't included on it. + # + # source://thor//lib/thor/parser/arguments.rb#172 + def validate_enum_value!(name, value, message); end + + class << self + # source://thor//lib/thor/parser/arguments.rb#19 + def parse(*args); end + + # Receives an array of args and returns two arrays, one with arguments + # and one with switches. + # + # source://thor//lib/thor/parser/arguments.rb#8 + def split(args); end + end +end + +# source://thor//lib/thor/parser/arguments.rb#3 +Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/error.rb#104 +class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end + +# source://thor//lib/thor/shell.rb#4 +module Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + + mixes_in_class_methods ::Thor::Base::ClassMethods + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # It receives arguments in an Array and two hashes, one for options and + # other for configuration. + # + # Notice that it does not check if all required arguments were supplied. + # It should be done by the parser. + # + # ==== Parameters + # args:: An array of objects. The objects are applied to their + # respective accessors declared with argument. + # + # options:: An options hash that will be available as self.options. + # The hash given is converted to a hash with indifferent + # access, magic predicates (options.skip?) and then frozen. + # + # config:: Configuration for this Thor class. + # + # source://thor//lib/thor/base.rb#53 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://thor//lib/thor/base.rb#35 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://thor//lib/thor/base.rb#35 + def args=(_arg0); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/base.rb#35 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://thor//lib/thor/base.rb#35 + def options=(_arg0); end + + # Returns the value of attribute parent_options. + # + # source://thor//lib/thor/base.rb#35 + def parent_options; end + + # Sets the attribute parent_options + # + # @param value the value to set the attribute parent_options to. + # + # source://thor//lib/thor/base.rb#35 + def parent_options=(_arg0); end + + class << self + # source://thor//lib/thor/base.rb#116 + def included(base); end + + # Whenever a class inherits from Thor or Thor::Group, we should track the + # class and the file on Thor::Base. This is the method responsible for it. + # + # source://thor//lib/thor/base.rb#144 + def register_klass_file(klass); end + + # Returns the shell used in all Thor classes. If you are in a Unix platform + # it will use a colored log, otherwise it will use a basic one without color. + # + # source://thor//lib/thor/shell.rb#11 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#6 + def shell=(_arg0); end + + # Returns the files where the subclasses are kept. + # + # ==== Returns + # Hash[path => Class] + # + # source://thor//lib/thor/base.rb#137 + def subclass_files; end + + # Returns the classes that inherits from Thor or Thor::Group. + # + # ==== Returns + # Array[Class] + # + # source://thor//lib/thor/base.rb#128 + def subclasses; end + end +end + +# source://thor//lib/thor/base.rb#153 +module Thor::Base::ClassMethods + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#482 + def all_commands; end + + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#482 + def all_tasks; end + + # If you want to use defaults that don't match the type of an option, + # either specify `check_default_type: false` or call `allow_incompatible_default_type!` + # + # source://thor//lib/thor/base.rb#189 + def allow_incompatible_default_type!; end + + # Adds an argument to the class and creates an attr_accessor for it. + # + # Arguments are different from options in several aspects. The first one + # is how they are parsed from the command line, arguments are retrieved + # from position: + # + # thor command NAME + # + # Instead of: + # + # thor command --name=NAME + # + # Besides, arguments are used inside your code as an accessor (self.argument), + # while options are all kept in a hash (self.options). + # + # Finally, arguments cannot have type :default or :boolean but can be + # optional (supplying :optional => :true or :required => false), although + # you cannot have a required argument after a non-required argument. If you + # try it, an error is raised. + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :optional - If the argument is optional or not. + # :type - The type of the argument, can be :string, :hash, :array, :numeric. + # :default - Default value for this argument. It cannot be required and have default values. + # :banner - String to show on usage notes. + # + # ==== Errors + # ArgumentError:: Raised if you supply a required argument after a non required one. + # + # source://thor//lib/thor/base.rb#261 + def argument(name, options = T.unsafe(nil)); end + + # Returns this class arguments, looking up in the ancestors chain. + # + # ==== Returns + # Array[Thor::Argument] + # + # source://thor//lib/thor/base.rb#293 + def arguments; end + + # source://thor//lib/thor/base.rb#162 + def attr_accessor(*_arg0); end + + # source://thor//lib/thor/base.rb#154 + def attr_reader(*_arg0); end + + # source://thor//lib/thor/base.rb#158 + def attr_writer(*_arg0); end + + # source://thor//lib/thor/base.rb#193 + def check_default_type; end + + # If you want to raise an error when the default value of an option does not match + # the type call check_default_type! + # This will be the default; for compatibility a deprecation warning is issued if necessary. + # + # source://thor//lib/thor/base.rb#183 + def check_default_type!; end + + # source://thor//lib/thor/base.rb#172 + def check_unknown_options; end + + # If you want to raise an error for unknown options, call check_unknown_options! + # This is disabled by default to allow dynamic invocations. + # + # source://thor//lib/thor/base.rb#168 + def check_unknown_options!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#176 + def check_unknown_options?(config); end + + # Adds and declares option group for required at least one of options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Examples + # + # class_at_least_one do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use class_at_least_one and class_exclusive at the same time. + # + # class_exclusive do + # class_at_least_one do + # class_option :one + # class_option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor/base.rb#392 + def class_at_least_one(*args, &block); end + + # Returns this class at least one of required options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#411 + def class_at_least_one_option_names; end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Parameters + # Array[Thor::Option.name] + # + # ==== Examples + # + # class_exclusive do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor/base.rb#357 + def class_exclusive(*args, &block); end + + # Returns this class exclusive options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#402 + def class_exclusive_option_names; end + + # Adds an option to the set of class options + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc:: -- Description for the argument. + # :required:: -- If the argument is required or not. + # :default:: -- Default value for this argument. + # :group:: -- The group for this options. Use by class options to output options in different levels. + # :aliases:: -- Aliases for this option. Note: Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. + # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner:: -- String to show on usage notes. + # :hide:: -- If you want to hide this option from the help. + # + # source://thor//lib/thor/base.rb#328 + def class_option(name, options = T.unsafe(nil)); end + + # Adds a bunch of options to the set of class options. + # + # class_options :foo => false, :bar => :required, :baz => :string + # + # If you prefer more detailed declaration, check class_option. + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#306 + def class_options(options = T.unsafe(nil)); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#471 + def commands; end + + # If true, option set will not suspend the execution of the command when + # a required option is not provided. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#207 + def disable_required_check?(command_name); end + + # A flag that makes the process exit with status 1 if any error happens. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#628 + def exit_on_failure?; end + + # Defines the group. This is used when thor list is invoked so you can specify + # that only commands from a pre-defined group will be shown. Defaults to standard. + # + # ==== Parameters + # name + # + # source://thor//lib/thor/base.rb#457 + def group(name = T.unsafe(nil)); end + + # @raise [InvocationError] + # + # source://thor//lib/thor/base.rb#618 + def handle_argument_error(command, error, args, arity); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#613 + def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#613 + def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end + + # Sets the namespace for the Thor or Thor::Group class. By default the + # namespace is retrieved from the class name. If your Thor class is named + # Scripts::MyScript, the help method, for example, will be called as: + # + # thor scripts:my_script -h + # + # If you change the namespace: + # + # namespace :my_scripts + # + # You change how your commands are invoked: + # + # thor my_scripts -h + # + # Finally, if you change your namespace to default: + # + # namespace :default + # + # Your commands can be invoked with a shortcut. Instead of: + # + # thor :my_command + # + # source://thor//lib/thor/base.rb#566 + def namespace(name = T.unsafe(nil)); end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#530 + def no_commands(&block); end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#540 + def no_commands?; end + + # source://thor//lib/thor/base.rb#536 + def no_commands_context; end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#530 + def no_tasks(&block); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#606 + def public_command(*names); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#606 + def public_task(*names); end + + # Removes a previous defined argument. If :undefine is given, undefine + # accessors as well. + # + # ==== Parameters + # names:: Arguments to be removed + # + # ==== Examples + # + # remove_argument :foo + # remove_argument :foo, :bar, :baz, :undefine => true + # + # source://thor//lib/thor/base.rb#426 + def remove_argument(*names); end + + # Removes a previous defined class option. + # + # ==== Parameters + # names:: Class options to be removed + # + # ==== Examples + # + # remove_class_option :foo + # remove_class_option :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#445 + def remove_class_option(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#500 + def remove_command(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#500 + def remove_task(*names); end + + # Parses the command and options from the given args, instantiate the class + # and invoke the command. This method is used when the arguments must be parsed + # from an array. If you are inside Ruby and want to use a Thor class, you + # can simply initialize it: + # + # script = MyScript.new(args, options, config) + # script.invoke(:command, first_arg, second_arg, third_arg) + # + # source://thor//lib/thor/base.rb#582 + def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end + + # If true, option parsing is suspended as soon as an unknown option or a + # regular argument is encountered. All remaining arguments are passed to + # the command as regular arguments. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#201 + def stop_on_unknown_option?(command_name); end + + # source://thor//lib/thor/base.rb#218 + def strict_args_position; end + + # If you want only strict string args (useful when cascading thor classes), + # call strict_args_position! This is disabled by default to allow dynamic + # invocations. + # + # source://thor//lib/thor/base.rb#214 + def strict_args_position!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#222 + def strict_args_position?(config); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#471 + def tasks; end + + protected + + # SIGNATURE: Sets the baseclass. This is where the superclass lookup + # finishes. + # + # source://thor//lib/thor/base.rb#777 + def baseclass; end + + # The basename of the program invoking the thor class. + # + # source://thor//lib/thor/base.rb#771 + def basename; end + + # Build an option and adds it to the given scope. + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described in both class_option and method_option. + # scope:: Options hash that is being built up + # + # source://thor//lib/thor/base.rb#688 + def build_option(name, options, scope); end + + # Receives a hash of options, parse them and add to the scope. This is a + # fast way to set a bunch of options: + # + # build_options :foo => true, :bar => :required, :baz => :string + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#699 + def build_options(options, scope); end + + # Get target(method_options or class_options) options + # of before and after by block evaluation. + # + # source://thor//lib/thor/base.rb#808 + def built_option_names(target, opt = T.unsafe(nil), &block); end + + # Prints the class options per group. If an option does not belong to + # any group, it's printed as Class option. + # + # source://thor//lib/thor/base.rb#638 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # Get command scope member by name. + # + # source://thor//lib/thor/base.rb#816 + def command_scope_member(name, options = T.unsafe(nil)); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#782 + def create_command(meth); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#782 + def create_task(meth); end + + # SIGNATURE: The hook invoked by start. + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/base.rb#792 + def dispatch(command, given_args, given_opts, config); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#708 + def find_and_refresh_command(name); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#708 + def find_and_refresh_task(name); end + + # Retrieves a value from superclass. If it reaches the baseclass, + # returns default. + # + # source://thor//lib/thor/base.rb#749 + def from_superclass(method, default = T.unsafe(nil)); end + + # Every time someone inherits from a Thor class, register the klass + # and file into baseclass. + # + # source://thor//lib/thor/base.rb#721 + def inherited(klass); end + + # SIGNATURE: Defines behavior when the initialize method is added to the + # class. + # + # source://thor//lib/thor/base.rb#788 + def initialize_added; end + + # Raises an error if the word given is a Thor reserved word. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#677 + def is_thor_reserved_word?(word, type); end + + # Fire this callback whenever a method is added. Added methods are + # tracked as commands by invoking the create_command method. + # + # source://thor//lib/thor/base.rb#729 + def method_added(meth); end + + # Receives a set of options and print them. + # + # source://thor//lib/thor/base.rb#656 + def print_options(shell, options, group_name = T.unsafe(nil)); end + + # Register a relation of options for target(method_option/class_option) + # by args and block. + # + # source://thor//lib/thor/base.rb#798 + def register_options_relation_for(target, relation, *args, &block); end +end + +# source://thor//lib/thor/command.rb#2 +class Thor::Command < ::Struct + # @return [Command] a new instance of Command + # + # source://thor//lib/thor/command.rb#5 + def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end + + # Returns the formatted usage by injecting given required arguments + # and required options into the given usage. + # + # source://thor//lib/thor/command.rb#42 + def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#15 + def hidden?; end + + # source://thor//lib/thor/command.rb#70 + def method_at_least_one_option_names; end + + # source://thor//lib/thor/command.rb#66 + def method_exclusive_option_names; end + + # By default, a command invokes a method in the thor class. You can change this + # implementation to create custom commands. + # + # source://thor//lib/thor/command.rb#21 + def run(instance, args = T.unsafe(nil)); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#114 + def handle_argument_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#121 + def handle_no_method_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#104 + def local_method?(instance, name); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#87 + def not_debugging?(instance); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#100 + def private_method?(instance); end + + # Given a target, checks if this class name is a public method. + # + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#96 + def public_method?(instance); end + + # Add usage with required arguments + # + # source://thor//lib/thor/command.rb#77 + def required_arguments_for(klass, usage); end + + # source://thor//lib/thor/command.rb#91 + def required_options; end + + # source://thor//lib/thor/command.rb#109 + def sans_backtrace(backtrace, caller); end + + private + + # source://thor//lib/thor/command.rb#9 + def initialize_copy(other); end +end + +# source://thor//lib/thor/command.rb#3 +Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2 +module Thor::CoreExt; end + +# A hash with indifferent access and magic predicates. +# +# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true +# +# hash[:foo] #=> 'bar' +# hash['foo'] #=> 'bar' +# hash.foo? #=> true +# +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11 +class Thor::CoreExt::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12 + def initialize(hash = T.unsafe(nil)); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19 + def [](key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23 + def []=(key, value); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27 + def delete(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31 + def except(*keys); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37 + def fetch(key, *args); end + + # @return [Boolean] + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + def key?(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + def merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#57 + def merge!(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72 + def replace(other_hash); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + def reverse_merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + def reverse_merge!(other_hash); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def slice(*keys); end + + # Convert to a Hash with String keys. + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77 + def to_hash; end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + def values_at(*indices); end + + protected + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83 + def convert_key(key); end + + # Magic predicates. For instance: + # + # options.force? # => !!options['force'] + # options.shebang # => "/usr/lib/local/ruby" + # options.test_framework?(:rspec) # => options[:test_framework] == :rspec + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#93 + def method_missing(method, *args); end +end + +# source://thor//lib/thor/error.rb#3 +module Thor::Correctable + # source://thor//lib/thor/error.rb#8 + def corrections; end + + # source://thor//lib/thor/error.rb#4 + def to_s; end +end + +# A dynamic command that handles method missing scenarios. +# +# source://thor//lib/thor/command.rb#137 +class Thor::DynamicCommand < ::Thor::Command + # @return [DynamicCommand] a new instance of DynamicCommand + # + # source://thor//lib/thor/command.rb#138 + def initialize(name, options = T.unsafe(nil)); end + + # source://thor//lib/thor/command.rb#142 + def run(instance, args = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#150 +Thor::DynamicTask = Thor::DynamicCommand + +# Thor::Error is raised when it's caused by wrong usage of thor classes. Those +# errors have their backtrace suppressed and are nicely shown to the user. +# +# Errors that are caused by the developer, like declaring a method which +# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we +# ensure that developer errors are shown with full backtrace. +# +# source://thor//lib/thor/error.rb#20 +class Thor::Error < ::StandardError; end + +# source://thor//lib/thor/error.rb#101 +class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end + +# Thor has a special class called Thor::Group. The main difference to Thor class +# is that it invokes all commands at once. It also include some methods that allows +# invocations to be done at the class method, which are not available to Thor +# commands. +# +# source://thor//lib/thor/group.rb#7 +class Thor::Group + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + protected + + # Shortcut to invoke with padding and block handling. Use internally by + # invoke and invoke_from_option class methods. + # + # source://thor//lib/thor/group.rb#276 + def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end + + class << self + # Overwrite class options help to allow invoked generators options to be + # shown recursively when invoking a generator. + # + # source://thor//lib/thor/group.rb#161 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/group.rb#221 + def command_exists?(command_name); end + + # The description for this Thor::Group. If none is provided, but a source root + # exists, tries to find the USAGE one folder above it, otherwise searches + # in the superclass. + # + # ==== Parameters + # description:: The description for this Thor::Group. + # + # source://thor//lib/thor/group.rb#16 + def desc(description = T.unsafe(nil)); end + + # Get invocations array and merge options from invocations. Those + # options are added to group_options hash. Options that already exists + # in base_options are not added twice. + # + # source://thor//lib/thor/group.rb#172 + def get_options_from_invocations(group_options, base_options); end + + # @raise [error] + # + # source://thor//lib/thor/group.rb#207 + def handle_argument_error(command, error, _args, arity); end + + # Prints help information. + # + # ==== Options + # short:: When true, shows only usage. + # + # source://thor//lib/thor/group.rb#29 + def help(shell); end + + # Stores invocation blocks used on invoke_from_option. + # + # source://thor//lib/thor/group.rb#45 + def invocation_blocks; end + + # Stores invocations for this class merging with superclass values. + # + # source://thor//lib/thor/group.rb#39 + def invocations; end + + # Invoke the given namespace or class given. It adds an instance + # method that will invoke the klass and command. You can give a block to + # configure how it will be invoked. + # + # The namespace/class given will have its options showed on the help + # usage. Check invoke_from_option for more information. + # + # source://thor//lib/thor/group.rb#56 + def invoke(*names, &block); end + + # Invoke a thor class based on the value supplied by the user to the + # given option named "name". A class option must be created before this + # method is invoked for each name given. + # + # ==== Examples + # + # class GemGenerator < Thor::Group + # class_option :test_framework, :type => :string + # invoke_from_option :test_framework + # end + # + # ==== Boolean options + # + # In some cases, you want to invoke a thor class if some option is true or + # false. This is automatically handled by invoke_from_option. Then the + # option name is used to invoke the generator. + # + # ==== Preparing for invocation + # + # In some cases you want to customize how a specified hook is going to be + # invoked. You can do that by overwriting the class method + # prepare_for_invocation. The class method must necessarily return a klass + # and an optional command. + # + # ==== Custom invocations + # + # You can also supply a block to customize how the option is going to be + # invoked. The block receives two parameters, an instance of the current + # class and the klass to be invoked. + # + # source://thor//lib/thor/group.rb#110 + def invoke_from_option(*names, &block); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_commands(*_arg0); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_tasks(*_arg0); end + + # Remove a previously added invocation. + # + # ==== Examples + # + # remove_invocation :test_framework + # + # source://thor//lib/thor/group.rb#149 + def remove_invocation(*names); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. + # + # source://thor//lib/thor/group.rb#249 + def banner; end + + # source://thor//lib/thor/group.rb#259 + def baseclass; end + + # source://thor//lib/thor/group.rb#263 + def create_command(meth); end + + # source://thor//lib/thor/group.rb#263 + def create_task(meth); end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor/group.rb#228 + def dispatch(command, given_args, given_opts, config); end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#254 + def self_command; end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#254 + def self_task; end + end +end + +# Shortcuts for help. +# +# source://thor//lib/thor/base.rb#17 +Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) + +# A command that is hidden in help messages but still invocable. +# +# source://thor//lib/thor/command.rb#129 +class Thor::HiddenCommand < ::Thor::Command + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#130 + def hidden?; end +end + +# source://thor//lib/thor/command.rb#134 +Thor::HiddenTask = Thor::HiddenCommand + +# source://thor//lib/thor/invocation.rb#2 +module Thor::Invocation + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # Make initializer aware of invocations and the initialization args. + # + # source://thor//lib/thor/invocation.rb#23 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Make the current command chain accessible with in a Thor-(sub)command + # + # source://thor//lib/thor/invocation.rb#30 + def current_command_chain; end + + # Receives a name and invokes it. The name can be a string (either "command" or + # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the + # command cannot be guessed by name, it can also be supplied as second argument. + # + # You can also supply the arguments, options and configuration values for + # the command to be invoked, if none is given, the same values used to + # initialize the invoker are used to initialize the invoked. + # + # When no name is given, it will invoke the default command of the current class. + # + # ==== Examples + # + # class A < Thor + # def foo + # invoke :bar + # invoke "b:hello", ["Erik"] + # end + # + # def bar + # invoke "b:hello", ["Erik"] + # end + # end + # + # class B < Thor + # def hello(name) + # puts "hello #{name}" + # end + # end + # + # You can notice that the method "foo" above invokes two commands: "bar", + # which belongs to the same class and "hello" which belongs to the class B. + # + # By using an invocation system you ensure that a command is invoked only once. + # In the example above, invoking "foo" will invoke "b:hello" just once, even + # if it's invoked later by "bar" method. + # + # When class A invokes class B, all arguments used on A initialization are + # supplied to B. This allows lazy parse of options. Let's suppose you have + # some rspec commands: + # + # class Rspec < Thor::Group + # class_option :mock_framework, :type => :string, :default => :rr + # + # def invoke_mock_framework + # invoke "rspec:#{options[:mock_framework]}" + # end + # end + # + # As you noticed, it invokes the given mock framework, which might have its + # own options: + # + # class Rspec::RR < Thor::Group + # class_option :style, :type => :string, :default => :mock + # end + # + # Since it's not rspec concern to parse mock framework options, when RR + # is invoked all options are parsed again, so RR can extract only the options + # that it's going to use. + # + # If you want Rspec::RR to be initialized with its own set of options, you + # have to do that explicitly: + # + # invoke "rspec:rr", [], :style => :foo + # + # Besides giving an instance, you can also give a class to invoke: + # + # invoke Rspec::RR, [], :style => :foo + # + # source://thor//lib/thor/invocation.rb#102 + def invoke(name = T.unsafe(nil), *args); end + + # Invoke all commands for the current instance. + # + # source://thor//lib/thor/invocation.rb#133 + def invoke_all; end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_command(command, *args); end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_task(command, *args); end + + # Invokes using shell padding. + # + # source://thor//lib/thor/invocation.rb#138 + def invoke_with_padding(*args); end + + protected + + # Initialize klass using values stored in the @_initializer. + # + # source://thor//lib/thor/invocation.rb#166 + def _parse_initialization_options(args, opts, config); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end + + # Configuration values that are shared between invocations. + # + # source://thor//lib/thor/invocation.rb#145 + def _shared_configuration; end + + class << self + # source://thor//lib/thor/invocation.rb#3 + def included(base); end + end +end + +# source://thor//lib/thor/invocation.rb#8 +module Thor::Invocation::ClassMethods + # This method is responsible for receiving a name and find the proper + # class and command for it. The key is an optional parameter which is + # available only in class methods invocations (i.e. in Thor::Group). + # + # source://thor//lib/thor/invocation.rb#12 + def prepare_for_invocation(key, name); end +end + +# Raised when a command was found, but not invoked properly. +# +# source://thor//lib/thor/error.rb#62 +class Thor::InvocationError < ::Thor::Error; end + +# source://thor//lib/thor/line_editor/basic.rb#2 +module Thor::LineEditor + class << self + # source://thor//lib/thor/line_editor.rb#10 + def best_available; end + + # source://thor//lib/thor/line_editor.rb#6 + def readline(prompt, options = T.unsafe(nil)); end + end +end + +# source://thor//lib/thor/line_editor/basic.rb#3 +class Thor::LineEditor::Basic + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/line_editor/basic.rb#10 + def initialize(prompt, options); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def options; end + + # Returns the value of attribute prompt. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def prompt; end + + # source://thor//lib/thor/line_editor/basic.rb#15 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#32 + def echo?; end + + # source://thor//lib/thor/line_editor/basic.rb#22 + def get_input; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#6 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#3 +class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic + # source://thor//lib/thor/line_editor/readline.rb#13 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#28 + def add_to_history?; end + + # source://thor//lib/thor/line_editor/readline.rb#42 + def completion_options; end + + # source://thor//lib/thor/line_editor/readline.rb#32 + def completion_proc; end + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#46 + def use_path_completion?; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#4 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#50 +class Thor::LineEditor::Readline::PathCompletion + # @return [PathCompletion] a new instance of PathCompletion + # + # source://thor//lib/thor/line_editor/readline.rb#54 + def initialize(text); end + + # source://thor//lib/thor/line_editor/readline.rb#58 + def matches; end + + private + + # source://thor//lib/thor/line_editor/readline.rb#68 + def absolute_matches; end + + # source://thor//lib/thor/line_editor/readline.rb#82 + def base_path; end + + # source://thor//lib/thor/line_editor/readline.rb#78 + def glob_pattern; end + + # source://thor//lib/thor/line_editor/readline.rb#64 + def relative_matches; end + + # Returns the value of attribute text. + # + # source://thor//lib/thor/line_editor/readline.rb#51 + def text; end +end + +# source://thor//lib/thor/error.rb#98 +class Thor::MalformattedArgumentError < ::Thor::InvocationError; end + +# source://thor//lib/thor/nested_context.rb#2 +class Thor::NestedContext + # @return [NestedContext] a new instance of NestedContext + # + # source://thor//lib/thor/nested_context.rb#3 + def initialize; end + + # source://thor//lib/thor/nested_context.rb#7 + def enter; end + + # @return [Boolean] + # + # source://thor//lib/thor/nested_context.rb#15 + def entered?; end + + private + + # source://thor//lib/thor/nested_context.rb#25 + def pop; end + + # source://thor//lib/thor/nested_context.rb#21 + def push; end +end + +# source://thor//lib/thor/parser/option.rb#2 +class Thor::Option < ::Thor::Argument + # @return [Option] a new instance of Option + # + # source://thor//lib/thor/parser/option.rb#7 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute aliases. + # + # source://thor//lib/thor/parser/option.rb#3 + def aliases; end + + # source://thor//lib/thor/parser/option.rb#99 + def aliases_for_usage; end + + # source://thor//lib/thor/parser/option.rb#118 + def array?; end + + # source://thor//lib/thor/parser/option.rb#118 + def boolean?; end + + # Returns the value of attribute group. + # + # source://thor//lib/thor/parser/option.rb#3 + def group; end + + # source://thor//lib/thor/parser/option.rb#118 + def hash?; end + + # Returns the value of attribute hide. + # + # source://thor//lib/thor/parser/option.rb#3 + def hide; end + + # source://thor//lib/thor/parser/option.rb#79 + def human_name; end + + # Returns the value of attribute lazy_default. + # + # source://thor//lib/thor/parser/option.rb#3 + def lazy_default; end + + # source://thor//lib/thor/parser/option.rb#118 + def numeric?; end + + # Returns the value of attribute repeatable. + # + # source://thor//lib/thor/parser/option.rb#3 + def repeatable; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#107 + def show_default?; end + + # source://thor//lib/thor/parser/option.rb#118 + def string?; end + + # source://thor//lib/thor/parser/option.rb#75 + def switch_name; end + + # source://thor//lib/thor/parser/option.rb#83 + def usage(padding = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/option.rb#168 + def dasherize(str); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#160 + def dasherized?; end + + # source://thor//lib/thor/parser/option.rb#164 + def undasherize(str); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/option.rb#126 + def validate!; end + + # source://thor//lib/thor/parser/option.rb#131 + def validate_default_type!; end + + private + + # source://thor//lib/thor/parser/option.rb#174 + def normalize_aliases(aliases); end + + class << self + # This parse quick options given as method_options. It makes several + # assumptions, but you can be more specific using the option method. + # + # parse :foo => "bar" + # #=> Option foo with default value bar + # + # parse [:foo, :baz] => "bar" + # #=> Option foo with default value bar and alias :baz + # + # parse :foo => :required + # #=> Required option foo without default value + # + # parse :foo => 2 + # #=> Option foo with default value 2 and type numeric + # + # parse :foo => :numeric + # #=> Option foo without default value and type numeric + # + # parse :foo => true + # #=> Option foo with default value true and type boolean + # + # The valid types are :boolean, :numeric, :hash, :array and :string. If none + # is given a default type is assumed. This default type accepts arguments as + # string (--foo=value) or booleans (just --foo). + # + # By default all options are optional, unless :required is given. + # + # source://thor//lib/thor/parser/option.rb#45 + def parse(key, value); end + end +end + +# source://thor//lib/thor/parser/option.rb#5 +Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/options.rb#2 +class Thor::Options < ::Thor::Arguments + # Takes a hash of Thor::Option and a hash with defaults. + # + # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters + # an unknown option or a regular argument. + # + # @return [Options] a new instance of Options + # + # source://thor//lib/thor/parser/options.rb#32 + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/options.rb#156 + def check_at_least_one!; end + + # source://thor//lib/thor/parser/options.rb#144 + def check_exclusive!; end + + # @raise [UnknownArgumentError] + # + # source://thor//lib/thor/parser/options.rb#168 + def check_unknown!; end + + # source://thor//lib/thor/parser/options.rb#89 + def parse(args); end + + # source://thor//lib/thor/parser/options.rb#65 + def peek; end + + # source://thor//lib/thor/parser/options.rb#61 + def remaining; end + + # source://thor//lib/thor/parser/options.rb#79 + def shift; end + + # source://thor//lib/thor/parser/options.rb#84 + def unshift(arg, is_value: T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/options.rb#189 + def assign_result!(option, result); end + + # Check if the current value in peek is a registered switch. + # + # Two booleans are returned. The first is true if the current value + # starts with a hyphen; the second is true if it is a registered switch. + # + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#203 + def current_is_switch?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#215 + def current_is_switch_formatted?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#225 + def current_is_value?; end + + # Option names changes to swith name or human name + # + # source://thor//lib/thor/parser/options.rb#179 + def names_to_switch_names(names = T.unsafe(nil)); end + + # Check if the given argument is actually a shortcut. + # + # source://thor//lib/thor/parser/options.rb#244 + def normalize_switch(arg); end + + # Parse boolean values which can be given as --foo=true or --foo for true values, or + # --foo=false, --no-foo or --skip-foo for false values. + # + # source://thor//lib/thor/parser/options.rb#256 + def parse_boolean(switch); end + + # Parse the value at the peek analyzing if it requires an input or not. + # + # source://thor//lib/thor/parser/options.rb#274 + def parse_peek(switch, option); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#248 + def parsing_options?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#230 + def switch?(arg); end + + # source://thor//lib/thor/parser/options.rb#234 + def switch_option(arg); end + + class << self + # Receives a hash and makes it switches. + # + # source://thor//lib/thor/parser/options.rb#11 + def to_switches(options); end + end +end + +# source://thor//lib/thor/parser/options.rb#5 +Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#3 +Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#8 +Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/parser/options.rb#7 +Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#4 +Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) + +# Allow either -x -v or -xv style for single char args +# +# source://thor//lib/thor/parser/options.rb#6 +Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) + +# Adds a compatibility layer to your Thor classes which allows you to use +# rake package tasks. For example, to use rspec rake tasks, one can do: +# +# require 'thor/rake_compat' +# require 'rspec/core/rake_task' +# +# class Default < Thor +# include Thor::RakeCompat +# +# RSpec::Core::RakeTask.new(:spec) do |t| +# t.spec_opts = ['--options', './.rspec'] +# t.spec_files = FileList['spec/**/*_spec.rb'] +# end +# end +# +# source://thor//lib/thor/rake_compat.rb#20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # @private + # + # source://thor//lib/thor/rake_compat.rb#27 + def included(base); end + + # source://thor//lib/thor/rake_compat.rb#23 + def rake_classes; end + end +end + +# source://thor//lib/thor/error.rb#95 +class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end + +# source://thor//lib/thor/util.rb#4 +module Thor::Sandbox; end + +# source://thor//lib/thor/shell.rb#23 +module Thor::Shell + # Add shell to initialize config values. + # + # ==== Configuration + # shell:: An instance of the shell to be used. + # + # ==== Examples + # + # class MyScript < Thor + # argument :first, :type => :numeric + # end + # + # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new + # + # source://thor//lib/thor/shell.rb#44 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://thor//lib/thor/shell.rb#59 + def ask(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def file_collision(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def no?(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_in_columns(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_table(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_wrapped(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_status(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def set_color(*args, &block); end + + # Holds the shell for the given Thor instance. If no shell is given, + # it gets a default shell from Thor::Base.shell. + # + # source://thor//lib/thor/shell.rb#52 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#25 + def shell=(_arg0); end + + # source://thor//lib/thor/shell.rb#59 + def terminal_width(*args, &block); end + + # Yields the given block with padding. + # + # source://thor//lib/thor/shell.rb#66 + def with_padding; end + + # source://thor//lib/thor/shell.rb#59 + def yes?(*args, &block); end + + protected + + # Allow shell to be shared between invocations. + # + # source://thor//lib/thor/shell.rb#77 + def _shared_configuration; end +end + +# source://thor//lib/thor/shell/basic.rb#7 +class Thor::Shell::Basic + # Initialize base, mute and padding to nil. + # + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/shell/basic.rb#13 + def initialize; end + + # Asks something to the user and receives a response. + # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # + # If asked to limit the correct responses, you can pass in an + # array of acceptable answers. If one of those is not supplied, + # they will be shown a message stating that one of those answers + # must be given and re-asked the question. + # + # If asking for sensitive information, the :echo option can be set + # to false to mask user input from $stdin. + # + # If the required input is a path, then set the path option to + # true. This will enable tab completion for file paths relative + # to the current working directory on systems that support + # Readline. + # + # ==== Example + # ask("What is your name?") + # + # ask("What is the planet furthest from the sun?", :default => "Neptune") + # + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # + # ask("What is your password?", :echo => false) + # + # ask("Where should the file be saved?", :path => true) + # + # source://thor//lib/thor/shell/basic.rb#80 + def ask(statement, *args); end + + # Returns the value of attribute base. + # + # source://thor//lib/thor/shell/basic.rb#8 + def base; end + + # Sets the attribute base + # + # @param value the value to set the attribute base to. + # + # source://thor//lib/thor/shell/basic.rb#8 + def base=(_arg0); end + + # Called if something goes wrong during the execution. This is used by Thor + # internally and should not be used inside your scripts. If something went + # wrong, you can always raise an exception. If you raise a Thor::Error, it + # will be rescued and wrapped in the method below. + # + # source://thor//lib/thor/shell/basic.rb#251 + def error(statement); end + + # Deals with file collision and returns true if the file should be + # overwritten and false otherwise. If a block is given, it uses the block + # response as the content for the diff. + # + # ==== Parameters + # destination:: the destination file to solve conflicts + # block:: an optional block that returns the value to be used in diff and merge + # + # source://thor//lib/thor/shell/basic.rb#207 + def file_collision(destination); end + + # Sets the output padding while executing a block and resets it. + # + # source://thor//lib/thor/shell/basic.rb#43 + def indent(count = T.unsafe(nil)); end + + # Mute everything that's inside given block + # + # source://thor//lib/thor/shell/basic.rb#22 + def mute; end + + # Check if base is muted + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#31 + def mute?; end + + # Asks the user a question and returns true if the user replies "n" or + # "no". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#156 + def no?(statement, color = T.unsafe(nil)); end + + # Returns the value of attribute padding. + # + # source://thor//lib/thor/shell/basic.rb#9 + def padding; end + + # Sets the output padding, not allowing less than zero values. + # + # source://thor//lib/thor/shell/basic.rb#37 + def padding=(value); end + + # Prints values in columns + # + # ==== Parameters + # Array[String, String, ...] + # + # source://thor//lib/thor/shell/basic.rb#165 + def print_in_columns(array); end + + # Prints a table. + # + # ==== Parameters + # Array[Array[String, String, ...]] + # + # ==== Options + # indent:: Indent the first column by indent value. + # colwidth:: Force the first column to colwidth spaces wide. + # borders:: Adds ascii borders. + # + # source://thor//lib/thor/shell/basic.rb#180 + def print_table(array, options = T.unsafe(nil)); end + + # Prints a long string, word-wrapping the text to the current width of the + # terminal display. Ideal for printing heredocs. + # + # ==== Parameters + # String + # + # ==== Options + # indent:: Indent each line of the printed paragraph by indent value. + # + # source://thor//lib/thor/shell/basic.rb#194 + def print_wrapped(message, options = T.unsafe(nil)); end + + # Say (print) something to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say("I know you knew that.") + # + # source://thor//lib/thor/shell/basic.rb#98 + def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say (print) an error to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say_error("error: something went wrong") + # + # source://thor//lib/thor/shell/basic.rb#115 + def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say a status with the given color and appends the message. Since this + # method is used frequently by actions, it allows nil or false to be given + # in log_status, avoiding the message from being shown. If a Symbol is + # given in log_status, it's used as the color. + # + # source://thor//lib/thor/shell/basic.rb#130 + def say_status(status, message, log_status = T.unsafe(nil)); end + + # Apply color to the given string with optional bold. Disabled in the + # Thor::Shell::Basic class. + # + # source://thor//lib/thor/shell/basic.rb#258 + def set_color(string, *_arg1); end + + # Asks the user a question and returns true if the user replies "y" or + # "yes". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#149 + def yes?(statement, color = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/shell/basic.rb#362 + def answer_match(possibilities, answer, case_insensitive); end + + # source://thor//lib/thor/shell/basic.rb#349 + def ask_filtered(statement, color, options); end + + # source://thor//lib/thor/shell/basic.rb#332 + def ask_simply(statement, color, options); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#269 + def can_display_colors?; end + + # source://thor//lib/thor/shell/basic.rb#296 + def file_collision_help(block_given); end + + # source://thor//lib/thor/shell/basic.rb#383 + def git_merge_tool; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#286 + def is?(value); end + + # source://thor//lib/thor/shell/basic.rb#273 + def lookup_color(color); end + + # source://thor//lib/thor/shell/basic.rb#370 + def merge(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#379 + def merge_tool; end + + # source://thor//lib/thor/shell/basic.rb#264 + def prepare_message(message, *color); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#324 + def quiet?; end + + # source://thor//lib/thor/shell/basic.rb#313 + def show_diff(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#282 + def stderr; end + + # source://thor//lib/thor/shell/basic.rb#278 + def stdout; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#328 + def unix?; end +end + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/color.rb#9 +class Thor::Shell::Color < ::Thor::Shell::Basic + include ::LCSDiff + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # Pass foreground, background and bold options to this method as + # symbols. + # + # Example: + # + # set_color "Hi!", :red, :on_white, :bold + # + # The available colors are: + # + # :bold + # :black + # :red + # :green + # :yellow + # :blue + # :magenta + # :cyan + # :white + # :on_black + # :on_red + # :on_green + # :on_yellow + # :on_blue + # :on_magenta + # :on_cyan + # :on_white + # + # source://thor//lib/thor/shell/color.rb#82 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#110 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#106 + def are_colors_supported?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#102 + def can_display_colors?; end +end + +# Set the terminal's foreground ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#18 +Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#26 +Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) + +# The start of an ANSI bold sequence. +# +# source://thor//lib/thor/shell/color.rb#15 +Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://thor//lib/thor/shell/color.rb#13 +Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#30 +Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#22 +Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#28 +Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#35 +Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#43 +Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#47 +Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#39 +Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#45 +Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#37 +Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#49 +Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#41 +Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#20 +Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#32 +Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#24 +Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/shell/column_printer.rb#5 +class Thor::Shell::ColumnPrinter + # @return [ColumnPrinter] a new instance of ColumnPrinter + # + # source://thor//lib/thor/shell/column_printer.rb#8 + def initialize(stdout, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def options; end + + # source://thor//lib/thor/shell/column_printer.rb#14 + def print(array); end + + # Returns the value of attribute stdout. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def stdout; end +end + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/html.rb#9 +class Thor::Shell::HTML < ::Thor::Shell::Basic + include ::LCSDiff + + # Ask something to the user and receives a response. + # + # ==== Example + # ask("What is your name?") + # + # TODO: Implement #ask for Thor::Shell::HTML + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/shell/html.rb#73 + def ask(statement, color = T.unsafe(nil)); end + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # source://thor//lib/thor/shell/html.rb#54 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#79 + def can_display_colors?; end +end + +# Set the terminal's foreground HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#16 +Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#24 +Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) + +# The start of an HTML bold sequence. +# +# source://thor//lib/thor/shell/html.rb#13 +Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#28 +Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#20 +Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#26 +Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#33 +Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#41 +Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#45 +Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#37 +Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#43 +Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#35 +Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#47 +Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#39 +Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#18 +Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#30 +Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#22 +Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/shell.rb#24 +Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/shell/table_printer.rb#6 +class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter + # @return [TablePrinter] a new instance of TablePrinter + # + # source://thor//lib/thor/shell/table_printer.rb#9 + def initialize(stdout, options = T.unsafe(nil)); end + + # source://thor//lib/thor/shell/table_printer.rb#18 + def print(array); end + + private + + # source://thor//lib/thor/shell/table_printer.rb#72 + def format_cell(column, row_size, index); end + + # source://thor//lib/thor/shell/table_printer.rb#113 + def indentation; end + + # source://thor//lib/thor/shell/table_printer.rb#47 + def prepare(array); end + + # source://thor//lib/thor/shell/table_printer.rb#96 + def print_border_separator; end + + # source://thor//lib/thor/shell/table_printer.rb#103 + def truncate(string); end +end + +# source://thor//lib/thor/shell/table_printer.rb#7 +Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol) + +# source://thor//lib/thor/shell/terminal.rb#3 +module Thor::Shell::Terminal + class << self + # source://thor//lib/thor/shell/terminal.rb#9 + def terminal_width; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/terminal.rb#20 + def unix?; end + + private + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/terminal.rb#27 + def dynamic_width; end + + # source://thor//lib/thor/shell/terminal.rb#31 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/terminal.rb#35 + def dynamic_width_tput; end + end +end + +# source://thor//lib/thor/shell/terminal.rb#4 +Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://thor//lib/thor/shell/wrapped_printer.rb#6 +class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter + # source://thor//lib/thor/shell/wrapped_printer.rb#7 + def print(message); end +end + +# source://thor//lib/thor/base.rb#23 +Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) + +# Thor methods that should not be overwritten by the user. +# +# source://thor//lib/thor/base.rb#20 +Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/command.rb#126 +Thor::Task = Thor::Command + +# Raised when a command was not found. +# +# source://thor//lib/thor/error.rb#24 +class Thor::UndefinedCommandError < ::Thor::Error + include ::Thor::Correctable + + # @return [UndefinedCommandError] a new instance of UndefinedCommandError + # + # source://thor//lib/thor/error.rb#43 + def initialize(command, all_commands, namespace); end + + # Returns the value of attribute all_commands. + # + # source://thor//lib/thor/error.rb#41 + def all_commands; end + + # Returns the value of attribute command. + # + # source://thor//lib/thor/error.rb#41 + def command; end +end + +# source://thor//lib/thor/error.rb#25 +class Thor::UndefinedCommandError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#28 + def initialize(error); end + + # source://thor//lib/thor/error.rb#32 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#26 + def error; end + + # source://thor//lib/thor/error.rb#36 + def spell_checker; end +end + +# source://thor//lib/thor/error.rb#55 +Thor::UndefinedTaskError = Thor::UndefinedCommandError + +# source://thor//lib/thor/error.rb#65 +class Thor::UnknownArgumentError < ::Thor::Error + include ::Thor::Correctable + + # @return [UnknownArgumentError] a new instance of UnknownArgumentError + # + # source://thor//lib/thor/error.rb#85 + def initialize(switches, unknown); end + + # Returns the value of attribute switches. + # + # source://thor//lib/thor/error.rb#83 + def switches; end + + # Returns the value of attribute unknown. + # + # source://thor//lib/thor/error.rb#83 + def unknown; end +end + +# source://thor//lib/thor/error.rb#66 +class Thor::UnknownArgumentError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#69 + def initialize(error); end + + # source://thor//lib/thor/error.rb#73 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#67 + def error; end + + # source://thor//lib/thor/error.rb#78 + def spell_checker; end +end + +# This module holds several utilities: +# +# 1) Methods to convert thor namespaces to constants and vice-versa. +# +# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" +# +# 2) Loading thor files and sandboxing: +# +# Thor::Util.load_thorfile("~/.thor/foo") +# +# source://thor//lib/thor/util.rb#17 +module Thor::Util + class << self + # Receives a string and convert it to camel case. camel_case returns CamelCase. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#104 + def camel_case(str); end + + # Returns a string that has had any glob characters escaped. + # The glob characters are `* ? { } [ ]`. + # + # ==== Examples + # + # Thor::Util.escape_globs('[apps]') # => '\[apps\]' + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#264 + def escape_globs(path); end + + # Returns a string that has had any HTML characters escaped. + # + # ==== Examples + # + # Thor::Util.escape_html('
    ') # => "<div>" + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#280 + def escape_html(string); end + + # Receives a namespace and search for it in the Thor::Base subclasses. + # + # ==== Parameters + # namespace:: The namespace to search for. + # + # source://thor//lib/thor/util.rb#24 + def find_by_namespace(namespace); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # source://thor//lib/thor/util.rb#213 + def globs_for(path); end + + # Receives a path and load the thor file in the path. The file is evaluated + # inside the sandbox to avoid namespacing conflicts. + # + # source://thor//lib/thor/util.rb#153 + def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Receives a constant and converts it to a Thor namespace. Since Thor + # commands can be added to a sandbox, this method is also responsible for + # removing the sandbox namespace. + # + # This method should not be used in general because it's used to deal with + # older versions of Thor. On current versions, if you need to get the + # namespace from a class, just call namespace on it. + # + # ==== Parameters + # constant:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # source://thor//lib/thor/util.rb#43 + def namespace_from_thor_class(constant); end + + # Given the contents, evaluate it inside the sandbox and returns the + # namespaces defined in the sandbox. + # + # ==== Parameters + # contents + # + # ==== Returns + # Array[Object] + # + # source://thor//lib/thor/util.rb#58 + def namespaces_in_content(contents, file = T.unsafe(nil)); end + + # Return the path to the ruby interpreter taking into account multiple + # installations and windows extensions. + # + # source://thor//lib/thor/util.rb#221 + def ruby_command; end + + # Receives a string and convert it to snake case. SnakeCase returns snake_case. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#90 + def snake_case(str); end + + # Returns the thor classes declared inside the given class. + # + # source://thor//lib/thor/util.rb#74 + def thor_classes_in(klass); end + + # Returns the root where thor files are located, depending on the OS. + # + # source://thor//lib/thor/util.rb#192 + def thor_root; end + + # Returns the files in the thor root. On Windows thor_root will be something + # like this: + # + # C:\Documents and Settings\james\.thor + # + # If we don't #gsub the \ character, Dir.glob will fail. + # + # source://thor//lib/thor/util.rb#203 + def thor_root_glob; end + + # source://thor//lib/thor/util.rb#168 + def user_home; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/thruster@0.1.8.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/thruster@0.1.8.rbi new file mode 100644 index 0000000..7e5fb95 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/thruster@0.1.8.rbi @@ -0,0 +1,12 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `thruster` gem. +# Please instead update this file by running `bin/tapioca gem thruster`. + + +# source://thruster//lib/thruster.rb#1 +module Thruster; end + +# source://thruster//lib/thruster/version.rb#2 +Thruster::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/timeout@0.4.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/timeout@0.4.1.rbi new file mode 100644 index 0000000..c296682 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/timeout@0.4.1.rbi @@ -0,0 +1,149 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `timeout` gem. +# Please instead update this file by running `bin/tapioca gem timeout`. + + +# source://timeout//lib/timeout.rb#25 +module Timeout + private + + # Perform an operation in a block, raising an error if it takes longer than + # +sec+ seconds to complete. + # + # +sec+:: Number of seconds to wait for the block to terminate. Any number + # may be used, including Floats to specify fractional seconds. A + # value of 0 or +nil+ will execute the block without any timeout. + # +klass+:: Exception Class to raise if the block fails to terminate + # in +sec+ seconds. Omitting will use the default, Timeout::Error + # +message+:: Error message to raise with Exception Class. + # Omitting will use the default, "execution expired" + # + # Returns the result of the block *if* the block completed before + # +sec+ seconds, otherwise throws an exception, based on the value of +klass+. + # + # The exception thrown to terminate the given block cannot be rescued inside + # the block unless +klass+ is given explicitly. However, the block can use + # ensure to prevent the handling of the exception. For that reason, this + # method cannot be relied on to enforce timeouts for untrusted blocks. + # + # If a scheduler is defined, it will be used to handle the timeout by invoking + # Scheduler#timeout_after. + # + # Note that this is both a method of module Timeout, so you can include + # Timeout into your classes so they have a #timeout method, as well as + # a module method, so you can call it directly as Timeout.timeout(). + # + # source://timeout//lib/timeout.rb#169 + def timeout(sec, klass = T.unsafe(nil), message = T.unsafe(nil), &block); end + + class << self + # source://timeout//lib/timeout.rb#127 + def ensure_timeout_thread_created; end + + # Perform an operation in a block, raising an error if it takes longer than + # +sec+ seconds to complete. + # + # +sec+:: Number of seconds to wait for the block to terminate. Any number + # may be used, including Floats to specify fractional seconds. A + # value of 0 or +nil+ will execute the block without any timeout. + # +klass+:: Exception Class to raise if the block fails to terminate + # in +sec+ seconds. Omitting will use the default, Timeout::Error + # +message+:: Error message to raise with Exception Class. + # Omitting will use the default, "execution expired" + # + # Returns the result of the block *if* the block completed before + # +sec+ seconds, otherwise throws an exception, based on the value of +klass+. + # + # The exception thrown to terminate the given block cannot be rescued inside + # the block unless +klass+ is given explicitly. However, the block can use + # ensure to prevent the handling of the exception. For that reason, this + # method cannot be relied on to enforce timeouts for untrusted blocks. + # + # If a scheduler is defined, it will be used to handle the timeout by invoking + # Scheduler#timeout_after. + # + # Note that this is both a method of module Timeout, so you can include + # Timeout into your classes so they have a #timeout method, as well as + # a module method, so you can call it directly as Timeout.timeout(). + # + # source://timeout//lib/timeout.rb#169 + def timeout(sec, klass = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # source://timeout//lib/timeout.rb#97 + def create_timeout_thread; end + end +end + +# :stopdoc: +# +# source://timeout//lib/timeout.rb#50 +Timeout::CONDVAR = T.let(T.unsafe(nil), Thread::ConditionVariable) + +# Raised by Timeout.timeout when the block times out. +# +# source://timeout//lib/timeout.rb#36 +class Timeout::Error < ::RuntimeError + class << self + # source://timeout//lib/timeout.rb#37 + def handle_timeout(message); end + end +end + +# Internal error raised to when a timeout is triggered. +# +# source://timeout//lib/timeout.rb#29 +class Timeout::ExitException < ::Exception + # source://timeout//lib/timeout.rb#30 + def exception(*_arg0); end +end + +# We keep a private reference so that time mocking libraries won't break +# Timeout. +# +# source://timeout//lib/timeout.rb#139 +Timeout::GET_TIME = T.let(T.unsafe(nil), Method) + +# source://timeout//lib/timeout.rb#51 +Timeout::QUEUE = T.let(T.unsafe(nil), Thread::Queue) + +# source://timeout//lib/timeout.rb#52 +Timeout::QUEUE_MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://timeout//lib/timeout.rb#57 +class Timeout::Request + # @return [Request] a new instance of Request + # + # source://timeout//lib/timeout.rb#60 + def initialize(thread, timeout, exception_class, message); end + + # Returns the value of attribute deadline. + # + # source://timeout//lib/timeout.rb#58 + def deadline; end + + # @return [Boolean] + # + # source://timeout//lib/timeout.rb#70 + def done?; end + + # @return [Boolean] + # + # source://timeout//lib/timeout.rb#76 + def expired?(now); end + + # source://timeout//lib/timeout.rb#89 + def finished; end + + # source://timeout//lib/timeout.rb#80 + def interrupt; end +end + +# source://timeout//lib/timeout.rb#53 +Timeout::TIMEOUT_THREAD_MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://timeout//lib/timeout.rb#26 +Timeout::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/tzinfo@2.0.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/tzinfo@2.0.6.rbi new file mode 100644 index 0000000..f8f9c81 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/tzinfo@2.0.6.rbi @@ -0,0 +1,5918 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tzinfo` gem. +# Please instead update this file by running `bin/tapioca gem tzinfo`. + + +# The top level module for TZInfo. +# +# source://tzinfo//lib/tzinfo.rb#5 +module TZInfo + class << self + # Instructs the current {DataSource} to load all timezone and country data + # into memory (initializing the {DataSource} first if not previously + # accessed or set). + # + # This may be desirable in production environments to improve copy-on-write + # performance and to avoid flushing the constant cache every time a new + # timezone or country is loaded from {DataSources::RubyDataSource}. + # + # source://tzinfo//lib/tzinfo.rb#14 + def eager_load!; end + end +end + +# Defines transitions that occur on the zero-based nth day of the year. +# +# Day 0 is 1 January. +# +# Leap days are counted. Day 59 will be 29 February on a leap year and 1 March +# on a non-leap year. Day 365 will be 31 December on a leap year and 1 January +# the following year on a non-leap year. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#129 +class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule + # Initializes a new {AbsoluteDayOfYearTransitionRule}. + # + # @param day [Integer] the zero-based day of the year on which the + # transition occurs (0 to 365 inclusive). + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @raise [ArgumentError] if `day` is less than 0 or greater than 365. + # @return [AbsoluteDayOfYearTransitionRule] a new instance of AbsoluteDayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#130 + def initialize(day, transition_at = T.unsafe(nil)); end + + # Determines if this {AbsoluteDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {AbsoluteDayOfYearTransitionRule} + # with the same {transition_at} and day as this + # {AbsoluteDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#153 + def ==(r); end + + # Determines if this {AbsoluteDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {AbsoluteDayOfYearTransitionRule} + # with the same {transition_at} and day as this + # {AbsoluteDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#153 + def eql?(r); end + + # @return [Boolean] `true` if the day specified by this transition is the + # first in the year (a day number of 0), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#137 + def is_always_first_day_of_year?; end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#142 + def is_always_last_day_of_year?; end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#168 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#173 + def hash_args; end +end + +# {AmbiguousTime} is raised to indicate that a specified local time has more +# than one possible equivalent UTC time. Such ambiguities arise when the +# clocks are set back in a time zone, most commonly during the repeated hour +# when transitioning from daylight savings time to standard time. +# +# {AmbiguousTime} is raised by {Timezone#local_datetime}, +# {Timezone#local_time}, {Timezone#local_timestamp}, {Timezone#local_to_utc} +# and {Timezone#period_for_local} when using an ambiguous time and not +# specifying how to resolve the ambiguity. +# +# source://tzinfo//lib/tzinfo/timezone.rb#16 +class TZInfo::AmbiguousTime < ::StandardError; end + +# A set of rules that define when transitions occur in time zones with +# annually occurring daylight savings time. +# +# @private +# +# source://tzinfo//lib/tzinfo/annual_rules.rb#9 +class TZInfo::AnnualRules + # Initializes a new {AnnualRules} instance. + # + # @param std_offset [TimezoneOffset] the standard offset that applies when + # daylight savings time is not in force. + # @param dst_offset [TimezoneOffset] the offset that applies when daylight + # savings time is in force. + # @param dst_start_rule [TransitionRule] the rule that determines when + # daylight savings time starts. + # @param dst_end_rule [TransitionRule] the rule that determines when daylight + # savings time ends. + # @return [AnnualRules] a new instance of AnnualRules + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#36 + def initialize(std_offset, dst_offset, dst_start_rule, dst_end_rule); end + + # @return [TransitionRule] the rule that determines when daylight savings + # time ends. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#24 + def dst_end_rule; end + + # @return [TimezoneOffset] the offset that applies when daylight savings + # time is in force. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#16 + def dst_offset; end + + # @return [TransitionRule] the rule that determines when daylight savings + # time starts. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#20 + def dst_start_rule; end + + # @return [TimezoneOffset] the standard offset that applies when daylight + # savings time is not in force. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#12 + def std_offset; end + + # Returns the transitions between standard and daylight savings time for a + # given year. The results are ordered by time of occurrence (earliest to + # latest). + # + # @param year [Integer] the year to calculate transitions for. + # @return [Array] the transitions for the year. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#49 + def transitions(year); end + + private + + # Applies a given rule between offsets on a year. + # + # @param rule [TransitionRule] the rule to apply. + # @param from_offset [TimezoneOffset] the offset the rule transitions from. + # @param to_offset [TimezoneOffset] the offset the rule transitions to. + # @param year [Integer] the year when the transition occurs. + # @return [TimezoneTransition] the transition determined by the rule. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#65 + def apply_rule(rule, from_offset, to_offset, year); end +end + +# A thread-safe version of {StringDeduper}. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#50 +class TZInfo::ConcurrentStringDeduper < ::TZInfo::StringDeduper + protected + + # source://tzinfo//lib/tzinfo/string_deduper.rb#53 + def create_hash(&block); end +end + +# The {Country} class represents an ISO 3166-1 country. It can be used to +# obtain a list of time zones observed by a country. For example: +# +# united_states = Country.get('US') +# united_states.zone_identifiers +# united_states.zones +# united_states.zone_info +# +# The {Country} class is thread-safe. It is safe to use class and instance +# methods of {Country} in concurrently executing threads. Instances of +# {Country} can be shared across thread boundaries. +# +# Country information available through TZInfo is intended as an aid for +# users, to help them select time zone data appropriate for their practical +# needs. It is not intended to take or endorse any position on legal or +# territorial claims. +# +# source://tzinfo//lib/tzinfo/country.rb#26 +class TZInfo::Country + include ::Comparable + + # Initializes a new {Country} based upon a {DataSources::CountryInfo} + # instance. + # + # {Country} instances should not normally be constructed directly. Use + # the {Country.get} method to obtain instances instead. + # + # @param info [DataSources::CountryInfo] the data to base the new {Country} + # instance upon. + # @return [Country] a new instance of Country + # + # source://tzinfo//lib/tzinfo/country.rb#72 + def initialize(info); end + + # Compares this {Country} with another based on their {code}. + # + # @param c [Object] an `Object` to compare this {Country} with. + # @return [Integer] -1 if `c` is less than `self`, 0 if `c` is equal to + # `self` and +1 if `c` is greater than `self`, or `nil` if `c` is not an + # instance of {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#162 + def <=>(c); end + + # Matches `regexp` against the {code} of this {Country}. + # + # @param regexp [Regexp] a `Regexp` to match against the {code} of + # this {Country}. + # @return [Integer] the position the match starts, or `nil` if there is no + # match. + # + # source://tzinfo//lib/tzinfo/country.rb#185 + def =~(regexp); end + + # Returns a serialized representation of this {Country}. This method is + # called when using `Marshal.dump` with an instance of {Country}. + # + # @param limit [Integer] the maximum depth to dump - ignored. + # @return [String] a serialized representation of this {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#194 + def _dump(limit); end + + # @return [String] the ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/country.rb#77 + def code; end + + # @param c [Object] an `Object` to compare this {Country} with. + # @return [Boolean] `true` if `c` is an instance of {Country} and has the + # same code as `self`, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/country.rb#170 + def eql?(c); end + + # @return [Integer] a hash based on the {code}. + # + # source://tzinfo//lib/tzinfo/country.rb#175 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/country.rb#94 + def inspect; end + + # @return [String] the name of the country. + # + # source://tzinfo//lib/tzinfo/country.rb#82 + def name; end + + # @return [String] a `String` representation of this {Country} (the name of + # the country). + # + # source://tzinfo//lib/tzinfo/country.rb#88 + def to_s; end + + # Returns an `Array` containing the identifier for each time zone observed + # by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # Returned zone identifiers may refer to cities and regions outside of the + # country. This will occur if the zone covers multiple countries. Any zones + # referring to a city or region in a different country will be listed after + # those relating to this country. + # + # @return [Array] an `Array` containing the identifier for each time + # zone observed by the country + # + # source://tzinfo//lib/tzinfo/country.rb#111 + def zone_identifiers; end + + # Returns a frozen `Array` containing a {CountryTimezone} instance for each + # time zone observed by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # The {CountryTimezone} instances can be used to obtain the location and + # descriptions of the observed time zones. + # + # Identifiers and descriptions of the time zones returned may refer to + # cities and regions outside of the country. This will occur if the time + # zone covers multiple countries. Any zones referring to a city or region in + # a different country will be listed after those relating to this country. + # + # @return [Array] a frozen `Array` containing a + # {CountryTimezone} instance for each time zone observed by the country. + # + # source://tzinfo//lib/tzinfo/country.rb#152 + def zone_info; end + + # Returns an `Array` containing the identifier for each time zone observed + # by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # Returned zone identifiers may refer to cities and regions outside of the + # country. This will occur if the zone covers multiple countries. Any zones + # referring to a city or region in a different country will be listed after + # those relating to this country. + # + # @return [Array] an `Array` containing the identifier for each time + # zone observed by the country + # + # source://tzinfo//lib/tzinfo/country.rb#111 + def zone_names; end + + # Returns An `Array` containing a {Timezone} instance for each time zone + # observed by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # The identifiers of the time zones returned may refer to cities and regions + # outside of the country. This will occur if the time zone covers multiple + # countries. Any zones referring to a city or region in a different country + # will be listed after those relating to this country. + # + # The results are actually instances of {TimezoneProxy} in order to defer + # loading of the time zone transition data until it is first needed. + # + # @return [Array] an `Array` containing a {Timezone} instance for + # each time zone observed by the country. + # + # source://tzinfo//lib/tzinfo/country.rb#132 + def zones; end + + class << self + # Loads a {Country} from the serialized representation returned by {_dump}. + # This is method is called when using `Marshal.load` or `Marshal.restore` + # to restore a serialized {Country}. + # + # @param data [String] a serialized representation of a {Country}. + # @return [Country] the result of converting `data` back into a {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#204 + def _load(data); end + + # @return [Array] an `Array` containing one {Country} instance + # for each defined country. + # + # source://tzinfo//lib/tzinfo/country.rb#52 + def all; end + + # @return [Array] an `Array` containing all the valid ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/country.rb#46 + def all_codes; end + + # Gets a {Country} by its ISO 3166-1 alpha-2 code. + # + # The {Country.all_codes} method can be used to obtain a list of valid ISO + # 3166-1 alpha-2 codes. + # + # @param code [String] An ISO 3166-1 alpha-2 code. + # @raise [InvalidCountryCode] If {code} is not a valid ISO 3166-1 alpha-2 + # code it couldn't be found. + # @return [Country] a {Country} instance representing the ISO-3166-1 + # country identified by the `code` parameter. + # + # source://tzinfo//lib/tzinfo/country.rb#40 + def get(code); end + + private + + # @return [DataSource] the current DataSource. + # + # source://tzinfo//lib/tzinfo/country.rb#59 + def data_source; end + end +end + +# Alias used by TZInfo::Data format1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#62 +TZInfo::CountryIndexDefinition = TZInfo::Format1::CountryIndexDefinition + +# Information about a time zone used by a {Country}. +# +# source://tzinfo//lib/tzinfo/country_timezone.rb#5 +class TZInfo::CountryTimezone + # Creates a new {CountryTimezone}. + # + # The passed in identifier and description instances will be frozen. + # + # {CountryTimezone} instances should normally only be constructed + # by implementations of {DataSource}. + # + # @param identifier [String] the {Timezone} identifier. + # @param latitude [Rational] the latitude of the time zone. + # @param longitude [Rational] the longitude of the time zone. + # @param description [String] an optional description of the time zone. + # @return [CountryTimezone] a new instance of CountryTimezone + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#44 + def initialize(identifier, latitude, longitude, description = T.unsafe(nil)); end + + # Tests if the given object is equal to the current instance (has the same + # identifier, latitude, longitude and description). + # + # @param ct [Object] the object to be compared. + # @return [TrueClass] `true` if `ct` is equal to the current instance. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#72 + def ==(ct); end + + # A description of this time zone in relation to the country, e.g. "Eastern + # Time". This is usually `nil` for countries that have a single time zone. + # + # @return [String] an optional description of the time zone. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#31 + def description; end + + # @return [String] the {description} if present, otherwise a human-readable + # representation of the identifier (using {Timezone#friendly_identifier}). + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#63 + def description_or_friendly_identifier; end + + # Tests if the given object is equal to the current instance (has the same + # identifier, latitude, longitude and description). + # + # @param ct [Object] the object to be compared. + # @return [Boolean] `true` if `ct` is equal to the current instance. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#83 + def eql?(ct); end + + # {longitude} and {description}. + # + # @return [Integer] a hash based on the {identifier}, {latitude}, + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#89 + def hash; end + + # @return [String] the identifier of the {Timezone} being described. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#7 + def identifier; end + + # The latitude of this time zone in degrees. Positive numbers are degrees + # north and negative numbers are degrees south. + # + # Note that depending on the data source, the position given by {#latitude} + # and {#longitude} may not be within the country. + # + # @return [Rational] the latitude in degrees. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#16 + def latitude; end + + # The longitude of this time zone in degrees. Positive numbers are degrees + # east and negative numbers are degrees west. + # + # Note that depending on the data source, the position given by {#latitude} + # and {#longitude} may not be within the country. + # + # @return [Rational] the longitude in degrees. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#25 + def longitude; end + + # Returns the associated {Timezone}. + # + # The result is actually an instance of {TimezoneProxy} in order to defer + # loading of the time zone transition data until it is first needed. + # + # @return [Timezone] the associated {Timezone}. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#57 + def timezone; end +end + +# TZInfo can be used with different data sources for time zone and country +# data. Each source of data is implemented as a subclass of {DataSource}. +# +# To choose a data source and override the default selection, use the +# {DataSource.set} method. +# +# @abstract To create a custom data source, create a subclass of {DataSource} +# and implement the {load_timezone_info}, {data_timezone_identifiers}, +# {linked_timezone_identifiers}, {load_country_info} and {country_codes} +# methods. +# +# source://tzinfo//lib/tzinfo/data_source.rb#29 +class TZInfo::DataSource + # Initializes a new {DataSource} instance. Typically only called via + # subclasses of {DataSource}. + # + # @return [DataSource] a new instance of DataSource + # + # source://tzinfo//lib/tzinfo/data_source.rb#166 + def initialize; end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_source.rb#246 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers for + # data time zones (i.e. those that actually contain definitions). The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available time zone + # identifiers for data time zones. + # + # source://tzinfo//lib/tzinfo/data_source.rb#218 + def data_timezone_identifiers; end + + # Loads all timezone and country data into memory. + # + # This may be desirable in production environments to improve copy-on-write + # performance and to avoid flushing the constant cache every time a new + # timezone or country is loaded from {DataSources::RubyDataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#255 + def eager_load!; end + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_source.rb#237 + def get_country_info(code); end + + # Returns a {DataSources::TimezoneInfo} instance for the given identifier. + # The result will derive from either {DataSources::DataTimezoneInfo} for + # time zones that define their own data or {DataSources::LinkedTimezoneInfo} + # for links or aliases to other time zones. + # + # {get_timezone_info} calls {load_timezone_info} to create the + # {DataSources::TimezoneInfo} instance. The returned instance is cached and + # returned in subsequent calls to {get_timezone_info} for the identifier. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} instance + # for a given identifier. + # + # source://tzinfo//lib/tzinfo/data_source.rb#184 + def get_timezone_info(identifier); end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#268 + def inspect; end + + # Returns a frozen `Array` of all the available time zone identifiers that + # are links to other time zones. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available time zone + # identifiers that are links to other time zones. + # + # source://tzinfo//lib/tzinfo/data_source.rb#228 + def linked_timezone_identifiers; end + + # @return [Array] a frozen `Array`` of all the available time zone + # identifiers. The identifiers are sorted according to `String#<=>`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#204 + def timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#262 + def to_s; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_source.rb#294 + def load_country_info(code); end + + # Returns a {DataSources::TimezoneInfo} instance for the given time zone + # identifier. The result should derive from either + # {DataSources::DataTimezoneInfo} for time zones that define their own data + # or {DataSources::LinkedTimezoneInfo} for links to or aliases for other + # time zones. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} instance + # for the given time zone identifier. + # + # source://tzinfo//lib/tzinfo/data_source.rb#285 + def load_timezone_info(identifier); end + + # Looks up a given code in the given hash of code to + # {DataSources::CountryInfo} mappings. If the code is found the + # {DataSources::CountryInfo} is returned. Otherwise an {InvalidCountryCode} + # exception is raised. + # + # @param hash [String, DataSources::CountryInfo] a mapping from ISO 3166-1 + # alpha-2 country codes to {DataSources::CountryInfo} instances. + # @param code [String] a country code to lookup. + # @param encoding [Encoding] the encoding used for the country codes in + # `hash`. + # @raise [InvalidCountryCode] if `code` was not found in `hash`. + # @return [DataSources::CountryInfo] the {DataSources::CountryInfo} instance + # corresponding to `code`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#337 + def lookup_country_info(hash, code, encoding = T.unsafe(nil)); end + + # @return [Encoding] the `Encoding` used by the `String` instances returned + # by {data_timezone_identifiers} and {linked_timezone_identifiers}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#300 + def timezone_identifier_encoding; end + + # Checks that the given identifier is a valid time zone identifier (can be + # found in the {timezone_identifiers} `Array`). If the identifier is valid, + # the `String` instance representing that identifier from + # `timezone_identifiers` is returned. Otherwise an + # {InvalidTimezoneIdentifier} exception is raised. + # + # @param identifier [String] a time zone identifier to be validated. + # @raise [InvalidTimezoneIdentifier] if `identifier` was not found in + # {timezone_identifiers}. + # @return [String] the `String` instance equivalent to `identifier` from + # {timezone_identifiers}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#315 + def validate_timezone_identifier(identifier); end + + private + + # Combines {data_timezone_identifiers} and {linked_timezone_identifiers} + # to create an `Array` containing all valid time zone identifiers. If + # {linked_timezone_identifiers} is empty, the {data_timezone_identifiers} + # instance is returned. + # + # The returned `Array` is frozen. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array] an `Array` containing all valid time zone + # identifiers. + # + # source://tzinfo//lib/tzinfo/data_source.rb#366 + def build_timezone_identifiers; end + + # If the given `identifier` is contained within the {timezone_identifiers} + # `Array`, the `String` instance representing that identifier from + # {timezone_identifiers} is returned. Otherwise, `nil` is returned. + # + # :nocov_array_bsearch: + # + # @param identifier [String] A time zone identifier to search for. + # @return [String] the `String` instance representing `identifier` from + # {timezone_identifiers} if found, or `nil` if not found. + # + # source://tzinfo//lib/tzinfo/data_source.rb#382 + def find_timezone_identifier(identifier); end + + # Raises {InvalidDataSource} to indicate that a method has not been + # overridden by a particular data source implementation. + # + # @raise [InvalidDataSource] always. + # + # source://tzinfo//lib/tzinfo/data_source.rb#352 + def raise_invalid_data_source(method_name); end + + # Tries an operation using `string` directly. If the operation fails, the + # string is copied and encoded with `encoding` and the operation is tried + # again. + # + # fails and `string` is already encoded with `encoding`. + # + # @param string [String] The `String` to perform the operation on. + # @param encoding [Encoding] The `Encoding` to use if the initial attempt + # fails. + # @return [Object] the result of the operation or `nil` if the first attempt + # @yield [s] the caller will be yielded to once or twice to attempt the + # operation. + # @yieldparam s [String] either `string` or an encoded copy of `string`. + # @yieldreturn [Object] The result of the operation. Must be truthy if + # successful. + # + # source://tzinfo//lib/tzinfo/data_source.rb#436 + def try_with_encoding(string, encoding); end + + class << self + # @return [DataSource] the currently selected source of data. + # + # source://tzinfo//lib/tzinfo/data_source.rb#42 + def get; end + + # Sets the currently selected data source for time zone and country data. + # + # This should usually be set to one of the two standard data source types: + # + # * `:ruby` - read data from the Ruby modules included in the TZInfo::Data + # library (tzinfo-data gem). + # * `:zoneinfo` - read data from the zoneinfo files included with most + # Unix-like operating systems (e.g. in /usr/share/zoneinfo). + # + # To set TZInfo to use one of the standard data source types, call + # `TZInfo::DataSource.set`` in one of the following ways: + # + # TZInfo::DataSource.set(:ruby) + # TZInfo::DataSource.set(:zoneinfo) + # TZInfo::DataSource.set(:zoneinfo, zoneinfo_dir) + # TZInfo::DataSource.set(:zoneinfo, zoneinfo_dir, iso3166_tab_file) + # + # `DataSource.set(:zoneinfo)` will automatically search for the zoneinfo + # directory by checking the paths specified in + # {DataSources::ZoneinfoDataSource.search_path}. + # {DataSources::ZoneinfoDirectoryNotFound} will be raised if no valid + # zoneinfo directory could be found. + # + # `DataSource.set(:zoneinfo, zoneinfo_dir)` uses the specified + # `zoneinfo_dir` directory as the data source. If the directory is not a + # valid zoneinfo directory, a {DataSources::InvalidZoneinfoDirectory} + # exception will be raised. + # + # `DataSource.set(:zoneinfo, zoneinfo_dir, iso3166_tab_file)` uses the + # specified `zoneinfo_dir` directory as the data source, but loads the + # `iso3166.tab` file from the path given by `iso3166_tab_file`. If the + # directory is not a valid zoneinfo directory, a + # {DataSources::InvalidZoneinfoDirectory} exception will be raised. + # + # Custom data sources can be created by subclassing TZInfo::DataSource and + # implementing the following methods: + # + # * {load_timezone_info} + # * {data_timezone_identifiers} + # * {linked_timezone_identifiers} + # * {load_country_info} + # * {country_codes} + # + # To have TZInfo use the custom data source, call {DataSource.set}, + # passing an instance of the custom data source implementation as follows: + # + # TZInfo::DataSource.set(CustomDataSource.new) + # + # Calling {DataSource.set} will only affect instances of {Timezone} and + # {Country} obtained with {Timezone.get} and {Country.get} subsequent to + # the {DataSource.set} call. Existing {Timezone} and {Country} instances + # will be unaffected. + # + # If {DataSource.set} is not called, TZInfo will by default attempt to use + # TZInfo::Data as the data source. If TZInfo::Data is not available (i.e. + # if `require 'tzinfo/data'` fails), then TZInfo will search for a + # zoneinfo directory instead (using the search path specified by + # {DataSources::ZoneinfoDataSource.search_path}). + # + # @param data_source_or_type [Object] either `:ruby`, `:zoneinfo` or an + # instance of a {DataSource}. + # @param args [Array] when `data_source_or_type` is a symbol, + # optional arguments to use when initializing the data source. + # @raise [ArgumentError] if `data_source_or_type` is not `:ruby`, + # `:zoneinfo` or an instance of {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#127 + def set(data_source_or_type, *args); end + + private + + # Creates a {DataSource} instance for use as the default. Used if no + # preference has been specified manually. + # + # @return [DataSource] the newly created default {DataSource} instance. + # + # source://tzinfo//lib/tzinfo/data_source.rb#145 + def create_default_data_source; end + end +end + +# {DataSourceNotFound} is raised if no data source could be found (i.e. if +# `'tzinfo/data'` cannot be found on the load path and no valid zoneinfo +# directory can be found on the system). +# +# source://tzinfo//lib/tzinfo/data_source.rb#16 +class TZInfo::DataSourceNotFound < ::StandardError; end + +# {DataSource} implementations and classes used by {DataSource} +# implementations. +# +# source://tzinfo//lib/tzinfo/data_sources.rb#6 +module TZInfo::DataSources; end + +# Represents a data time zone defined by a constantly observed offset. +# +# source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#7 +class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo + # Initializes a new {ConstantOffsetDataTimezoneInfo}. + # + # The passed in `identifier` instance will be frozen. A reference to the + # passed in {TimezoneOffset} will be retained. + # + # @param identifier [String] the identifier of the time zone. + # @param constant_offset [TimezoneOffset] the constantly observed offset. + # @raise [ArgumentError] if `identifier` or `constant_offset` is `nil`. + # @return [ConstantOffsetDataTimezoneInfo] a new instance of ConstantOffsetDataTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#19 + def initialize(identifier, constant_offset); end + + # @return [TimezoneOffset] the offset that is constantly observed. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#9 + def constant_offset; end + + # @param timestamp [Timestamp] ignored. + # @return [TimezonePeriod] an unbounded {TimezonePeriod} for the time + # zone's constantly observed offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#28 + def period_for(timestamp); end + + # @param local_timestamp [Timestamp] ignored. + # @return [Array] an `Array` containing a single unbounded + # {TimezonePeriod} for the time zone's constantly observed offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#35 + def periods_for_local(local_timestamp); end + + # @param to_timestamp [Timestamp] ignored. + # @param from_timestamp [Timestamp] ignored. + # @return [Array] an empty `Array`, since there are no transitions in time + # zones that observe a constant offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#43 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # @return [TimezonePeriod] an unbounded {TimezonePeriod} with the constant + # offset of this timezone. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#51 + def constant_period; end +end + +# Represents a country and references to its time zones as returned by a +# {DataSource}. +# +# source://tzinfo//lib/tzinfo/data_sources/country_info.rb#8 +class TZInfo::DataSources::CountryInfo + # Initializes a new {CountryInfo}. The passed in `code`, `name` and + # `zones` instances will be frozen. + # + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @param name [String] the name of the country. + # @param zones [Array] the time zones observed in the + # country. + # @raise [ArgumentError] if `code`, `name` or `zones` is `nil`. + # @return [CountryInfo] a new instance of CountryInfo + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#26 + def initialize(code, name, zones); end + + # @return [String] the ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#10 + def code; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#37 + def inspect; end + + # @return [String] the name of the country. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#13 + def name; end + + # @return [Array] the time zones observed in the country. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#16 + def zones; end +end + +# The base class for time zones defined as either a series of transitions +# ({TransitionsDataTimezoneInfo}) or a constantly observed offset +# ({ConstantOffsetDataTimezoneInfo}). +# +# @abstract Data sources return instances of {DataTimezoneInfo} subclasses. +# +# source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#11 +class TZInfo::DataSources::DataTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo + # @return [DataTimezone] a new {DataTimezone} instance for the time zone + # represented by this {DataTimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#76 + def create_timezone; end + + # @param timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `timestamp` is `nil` or does not + # have a specified {Timestamp#utc_offset utc_offset}. + # @return [TimezonePeriod] the {TimezonePeriod} observed at the time + # specified by `timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#18 + def period_for(timestamp); end + + # Returns an `Array` containing the {TimezonePeriod TimezonePeriods} that + # could be observed at the local time specified by `local_timestamp`. The + # results are are ordered by increasing UTC start date. An empty `Array` + # is returned if no periods are found for the given local time. + # + # @param local_timestamp [Timestamp] a {Timestamp} representing a local + # time - must have an unspecified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `local_timestamp` is `nil`, or + # has a specified {Timestamp#utc_offset utc_offset}. + # @return [Array] an `Array` containing the + # {TimezonePeriod TimezonePeriods} that could be observed at the local + # time specified by `local_timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#34 + def periods_for_local(local_timestamp); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the time zone changes. + # + # Transitions are returned up to a given {Timestamp} (`to_timestamp`). + # + # A from {Timestamp} may also be supplied using the `from_timestamp` + # parameter. If `from_timestamp` is specified, only transitions from that + # time onwards will be returned. + # + # Comparisons with `to_timestamp` are exclusive. Comparisons with + # `from_timestamp` are inclusive. If a transition falls precisely on + # `to_timestamp`, it will be excluded. If a transition falls on + # `from_timestamp`, it will be included. + # + # Transitions returned are ordered by when they occur, from earliest to + # latest. + # + # @param to_timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. Transitions are returned if they + # occur before this time. + # @param from_timestamp [Timestamp] an optional {Timestamp} with a + # specified {Timestamp#utc_offset utc_offset}. If specified, transitions + # are returned if they occur at or after this time. + # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does + # not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but does not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but is not earlier than or at the same time as `to_timestamp`. + # @return [Array] an `Array` of {TimezoneTransition} + # instances representing the times where the UTC offset of the time zone + # changes. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#70 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # Raises a {NotImplementedError} to indicate that the base class is + # incorrectly being used directly. + # + # raise [NotImplementedError] always. + # + # @raise [NotImplementedError] + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#86 + def raise_not_implemented(method_name); end +end + +# An {InvalidPosixTimeZone} exception is raised if an invalid POSIX-style +# time zone string is encountered. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#12 +class TZInfo::DataSources::InvalidPosixTimeZone < ::StandardError; end + +# An {InvalidZoneinfoDirectory} exception is raised if {ZoneinfoDataSource} +# is initialized with a specific zoneinfo path that is not a valid zoneinfo +# directory. A valid zoneinfo directory is one that contains time zone +# files, a country code index file named iso3166.tab and a time zone index +# file named zone1970.tab or zone.tab. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#11 +class TZInfo::DataSources::InvalidZoneinfoDirectory < ::StandardError; end + +# An {InvalidZoneinfoFile} exception is raised if an attempt is made to load +# an invalid zoneinfo file. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#8 +class TZInfo::DataSources::InvalidZoneinfoFile < ::StandardError; end + +# Represents a time zone that is defined as a link to or alias of another +# zone. +# +# source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#7 +class TZInfo::DataSources::LinkedTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo + # Initializes a new {LinkedTimezoneInfo}. The passed in `identifier` and + # `link_to_identifier` instances will be frozen. + # + # `nil`. + # + # @param identifier [String] the identifier of the time zone. + # @param link_to_identifier [String] the identifier of the time zone that + # this zone link to. + # @raise [ArgumentError] if `identifier` or `link_to_identifier` are + # @return [LinkedTimezoneInfo] a new instance of LinkedTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#20 + def initialize(identifier, link_to_identifier); end + + # @return [LinkedTimezone] a new {LinkedTimezone} instance for the time + # zone represented by this {LinkedTimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#28 + def create_timezone; end + + # (that this zone links to or is an alias for). + # + # @return [String] the identifier of the time zone that provides the data + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#10 + def link_to_identifier; end +end + +# A parser for POSIX-style TZ strings used in zoneinfo files and specified +# by tzfile.5 and tzset.3. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#20 +class TZInfo::DataSources::PosixTimeZoneParser + # Initializes a new {PosixTimeZoneParser}. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # to dedupe abbreviations. + # @return [PosixTimeZoneParser] a new instance of PosixTimeZoneParser + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#25 + def initialize(string_deduper); end + + # Parses a POSIX-style TZ string. + # + # @param tz_string [String] the string to parse. + # @raise [InvalidPosixTimeZone] if `tz_string` is not a `String`. + # @raise [InvalidPosixTimeZone] if `tz_string` is is not valid. + # @return [Object] either a {TimezoneOffset} for a constantly applied + # offset or an {AnnualRules} instance representing the rules. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#36 + def parse(tz_string); end + + private + + # Scans for a pattern and raises an exception if the pattern does not + # match the input. + # + # @param s [StringScanner] the `StringScanner` to scan. + # @param pattern [Regexp] the pattern to match. + # @raise [InvalidPosixTimeZone] if the pattern does not match the input. + # @return [String] the result of the scan. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#169 + def check_scan(s, pattern); end + + # Returns an offset in seconds from hh:mm:ss values. The value can be + # negative. -02:33:12 would represent 2 hours, 33 minutes and 12 seconds + # ahead of UTC. + # + # @param h [String] the hours. + # @param m [String] the minutes. + # @param s [String] the seconds. + # @raise [InvalidPosixTimeZone] if the mm and ss values are greater than + # 59. + # @return [Integer] the offset. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#132 + def get_offset_from_hms(h, m, s); end + + # Returns the seconds from midnight from hh:mm:ss values. Hours can exceed + # 24 for a time on the following day. Hours can be negative to subtract + # hours from midnight on the given day. -02:33:12 represents 22:33:12 on + # the prior day. + # + # @param h [String] the hour. + # @param m [String] the minutes past the hour. + # @param s [String] the seconds past the minute. + # @raise [InvalidPosixTimeZone] if the mm and ss values are greater than + # 59. + # @return [Integer] the number of seconds after midnight. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#153 + def get_seconds_after_midnight_from_hms(h, m, s); end + + # Parses a rule. + # + # @param s [StringScanner] the `StringScanner` to read the rule from. + # @param type [String] the type of rule (either `'start'` or `'end'`). + # @raise [InvalidPosixTimeZone] if the rule is not valid. + # @return [TransitionRule] the parsed rule. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#92 + def parse_rule(s, type); end +end + +# A DataSource implementation that loads data from the set of Ruby modules +# included in the tzinfo-data gem. +# +# TZInfo will use {RubyDataSource} by default if the tzinfo-data gem +# is available on the load path. It can also be selected by calling +# {DataSource.set} as follows: +# +# TZInfo::DataSource.set(:ruby) +# +# source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#20 +class TZInfo::DataSources::RubyDataSource < ::TZInfo::DataSource + # Initializes a new {RubyDataSource} instance. + # + # @raise [TZInfoDataNotFound] if the tzinfo-data gem could not be found + # (i.e. `require 'tzinfo/data'` failed). + # @return [RubyDataSource] a new instance of RubyDataSource + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#34 + def initialize; end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#28 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers for + # data time zones (i.e. those that actually contain definitions). The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available time zone + # identifiers for data time zones. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#22 + def data_timezone_identifiers; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#72 + def inspect; end + + # Returns a frozen `Array` of all the available time zone identifiers that + # are links to other time zones. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available time zone + # identifiers that are links to other time zones. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#25 + def linked_timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#67 + def to_s; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#104 + def load_country_info(code); end + + # Returns a {TimezoneInfo} instance for the given time zone identifier. + # The result will either be a {ConstantOffsetDataTimezoneInfo}, a + # {TransitionsDataTimezoneInfo} or a {LinkedTimezoneInfo} depending on the + # type of time zone. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [TimezoneInfo] a {TimezoneInfo} instance for the given time zone + # identifier. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#88 + def load_timezone_info(identifier); end + + private + + # Requires a file from tzinfo/data. + # + # @param file [Array] a relative path to a file to be required. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#128 + def require_data(*file); end + + # Requires a zone definition by its identifier (split on /). + # + # @param identifier [Array] the component parts of a time zone + # identifier (split on /). This must have already been validated. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#114 + def require_definition(identifier); end + + # Requires an index by its name. + # + # @param name [String] an index name. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#121 + def require_index(name); end + + # @return [String] a `String` containing TZInfo::Data version infomation + # for inclusion in the #to_s and #inspect output. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#134 + def version_info; end +end + +# A {TZInfoDataNotFound} exception is raised if the tzinfo-data gem could +# not be found (i.e. `require 'tzinfo/data'` failed) when selecting the Ruby +# data source. +# +# source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#9 +class TZInfo::DataSources::TZInfoDataNotFound < ::StandardError; end + +# Represents a time zone defined by a data source. +# +# @abstract Data sources return instances of {TimezoneInfo} subclasses. +# +# source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#9 +class TZInfo::DataSources::TimezoneInfo + # Initializes a new TimezoneInfo. The passed in `identifier` instance will + # be frozen. + # + # @param identifier [String] the identifier of the time zone. + # @raise [ArgumentError] if `identifier` is `nil`. + # @return [TimezoneInfo] a new instance of TimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#18 + def initialize(identifier); end + + # @return [Timezone] a new {Timezone} instance for the time zone + # represented by this {TimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#31 + def create_timezone; end + + # @return [String] the identifier of the time zone. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#11 + def identifier; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#25 + def inspect; end + + private + + # Raises a {NotImplementedError}. + # + # @param method_name [String] the name of the method that must be + # overridden. + # @raise NotImplementedError always. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#42 + def raise_not_implemented(method_name); end +end + +# Represents a data time zone defined by a list of transitions that change +# the locally observed time. +# +# source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#8 +class TZInfo::DataSources::TransitionsDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo + # Initializes a new {TransitionsDataTimezoneInfo}. + # + # The passed in `identifier` instance will be frozen. A reference to the + # passed in `Array` will be retained. + # + # The `transitions` `Array` must be sorted in order of ascending + # timestamp. Each transition must have a + # {TimezoneTransition#timestamp_value timestamp_value} that is greater + # than the {TimezoneTransition#timestamp_value timestamp_value} of the + # prior transition. + # + # @param identifier [String] the identifier of the time zone. + # @param transitions [Array] an `Array` of + # transitions that each indicate when a change occurs in the locally + # observed time. + # @raise [ArgumentError] if `identifier` is `nil`. + # @raise [ArgumentError] if `transitions` is `nil`. + # @raise [ArgumentError] if `transitions` is an empty `Array`. + # @return [TransitionsDataTimezoneInfo] a new instance of TransitionsDataTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#31 + def initialize(identifier, transitions); end + + # @param timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `timestamp` is `nil` or does not + # have a specified {Timestamp#utc_offset utc_offset}. + # @return [TimezonePeriod] the {TimezonePeriod} observed at the time + # specified by `timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#39 + def period_for(timestamp); end + + # Returns an `Array` containing the {TimezonePeriod TimezonePeriods} that + # could be observed at the local time specified by `local_timestamp`. The + # results are are ordered by increasing UTC start date. An empty `Array` + # is returned if no periods are found for the given local time. + # + # @param local_timestamp [Timestamp] a {Timestamp} representing a local + # time - must have an unspecified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `local_timestamp` is `nil`, or + # has a specified {Timestamp#utc_offset utc_offset}. + # @return [Array] an `Array` containing the + # {TimezonePeriod TimezonePeriods} that could be observed at the local + # time specified by `local_timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#70 + def periods_for_local(local_timestamp); end + + # @return [Array] the transitions that define this + # time zone in order of ascending timestamp. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#11 + def transitions; end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the time zone changes. + # + # Transitions are returned up to a given {Timestamp} (`to_timestamp`). + # + # A from {Timestamp} may also be supplied using the `from_timestamp` + # parameter. If `from_timestamp` is specified, only transitions from that + # time onwards will be returned. + # + # Comparisons with `to_timestamp` are exclusive. Comparisons with + # `from_timestamp` are inclusive. If a transition falls precisely on + # `to_timestamp`, it will be excluded. If a transition falls on + # `from_timestamp`, it will be included. + # + # Transitions returned are ordered by when they occur, from earliest to + # latest. + # + # @param to_timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. Transitions are returned if they + # occur before this time. + # @param from_timestamp [Timestamp] an optional {Timestamp} with a + # specified {Timestamp#utc_offset utc_offset}. If specified, transitions + # are returned if they occur at or after this time. + # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does + # not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but does not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but is not earlier than or at the same time as `to_timestamp`. + # @return [Array] an `Array` of {TimezoneTransition} + # instances representing the times where the UTC offset of the time zone + # changes. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#111 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # Performs a binary search on {transitions} to find the index of the + # earliest transition satisfying a condition. + # + # :nocov_array_bsearch_index: + # + # @return [Integer] the index of the earliest transition safisfying + # the condition or `nil` if there are no such transitions. + # @yield [transition] the caller will be yielded to to test the search + # condition. + # @yieldparam transition [TimezoneTransition] a {TimezoneTransition} + # instance from {transitions}. + # @yieldreturn [Boolean] `true` for the earliest transition that + # satisfies the condition and return `true` for all subsequent + # transitions. In all other cases, the result of the block must be + # `false`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#159 + def find_minimum_transition(&block); end + + # Determines if a transition occurs at or after a given {Timestamp}, + # taking the {Timestamp#sub_second sub_second} into consideration. + # + # @param transition [TimezoneTransition] the transition to compare. + # @param timestamp [Timestamp] the timestamp to compare. + # @return [Boolean] `true` if `transition` occurs at or after `timestamp`, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#207 + def transition_on_or_after_timestamp?(transition, timestamp); end +end + +# A DataSource implementation that loads data from a 'zoneinfo' directory +# containing compiled "TZif" version 3 (or earlier) files in addition to +# iso3166.tab and zone1970.tab or zone.tab index files. +# +# To have TZInfo load the system zoneinfo files, call +# {TZInfo::DataSource.set} as follows: +# +# TZInfo::DataSource.set(:zoneinfo) +# +# To load zoneinfo files from a particular directory, pass the directory to +# {TZInfo::DataSource.set}: +# +# TZInfo::DataSource.set(:zoneinfo, directory) +# +# To load zoneinfo files from a particular directory, but load the +# iso3166.tab index file from a separate location, pass the directory and +# path to the iso3166.tab file to {TZInfo::DataSource.set}: +# +# TZInfo::DataSource.set(:zoneinfo, directory, iso3166_path) +# +# Please note that versions of the 'zic' tool (used to build zoneinfo files) +# that were released prior to February 2006 created zoneinfo files that used +# 32-bit integers for transition timestamps. Later versions of zic produce +# zoneinfo files that use 64-bit integers. If you have 32-bit zoneinfo files +# on your system, then any queries falling outside of the range 1901-12-13 +# 20:45:52 to 2038-01-19 03:14:07 may be inaccurate. +# +# Most modern platforms include 64-bit zoneinfo files. However, Mac OS X (up +# to at least 10.8.4) still uses 32-bit zoneinfo files. +# +# To check whether your zoneinfo files contain 32-bit or 64-bit transition +# data, you can run the following code (substituting the identifier of the +# zone you want to test for `zone_identifier`): +# +# TZInfo::DataSource.set(:zoneinfo) +# dir = TZInfo::DataSource.get.zoneinfo_dir +# File.open(File.join(dir, zone_identifier), 'r') {|f| f.read(5) } +# +# If the last line returns `"TZif\\x00"`, then you have a 32-bit zoneinfo +# file. If it returns `"TZif2"` or `"TZif3"` then you have a 64-bit zoneinfo +# file. +# +# It is also worth noting that as of the 2017c release of the IANA Time Zone +# Database, 64-bit zoneinfo files only include future transitions up to +# 2038-01-19 03:14:07. Any queries falling after this time may be +# inaccurate. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#68 +class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource + # Initializes a new {ZoneinfoDataSource}. + # + # If `zoneinfo_dir` is specified, it will be checked and used as the + # source of zoneinfo files. + # + # The directory must contain a file named iso3166.tab and a file named + # either zone1970.tab or zone.tab. These may either be included in the + # root of the directory or in a 'tab' sub-directory and named country.tab + # and zone_sun.tab respectively (as is the case on Solaris). + # + # Additionally, the path to iso3166.tab can be overridden using the + # `alternate_iso3166_tab_path` parameter. + # + # If `zoneinfo_dir` is not specified or `nil`, the paths referenced in + # {search_path} are searched in order to find a valid zoneinfo directory + # (one that contains zone1970.tab or zone.tab and iso3166.tab files as + # above). + # + # The paths referenced in {alternate_iso3166_tab_search_path} are also + # searched to find an iso3166.tab file if one of the searched zoneinfo + # directories doesn't contain an iso3166.tab file. + # + # @param zoneinfo_dir [String] an optional path to a directory to use as + # the source of zoneinfo files. + # @param alternate_iso3166_tab_path [String] an optional path to the + # iso3166.tab file. + # @raise [InvalidZoneinfoDirectory] if the iso3166.tab and zone1970.tab or + # zone.tab files cannot be found using the `zoneinfo_dir` and + # `alternate_iso3166_tab_path` parameters. + # @raise [ZoneinfoDirectoryNotFound] if no valid directory can be found + # by searching. + # @return [ZoneinfoDataSource] a new instance of ZoneinfoDataSource + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#237 + def initialize(zoneinfo_dir = T.unsafe(nil), alternate_iso3166_tab_path = T.unsafe(nil)); end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#204 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers. The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array] a frozen `Array` of all the available time zone + # identifiers. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#271 + def data_timezone_identifiers; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#290 + def inspect; end + + # Returns an empty `Array`. There is no information about linked/aliased + # time zones in the zoneinfo files. When using {ZoneinfoDataSource}, every + # time zone will be returned as a {DataTimezone}. + # + # @return [Array] an empty `Array`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#280 + def linked_timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#285 + def to_s; end + + # @return [String] the zoneinfo directory being used. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#201 + def zoneinfo_dir; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#326 + def load_country_info(code); end + + # Returns a {TimezoneInfo} instance for the given time zone identifier. + # The result will either be a {ConstantOffsetDataTimezoneInfo} or a + # {TransitionsDataTimezoneInfo}. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found, the + # identifier is invalid, the zoneinfo file cannot be opened or the + # zoneinfo file is not valid. + # @return [TimezoneInfo] a {TimezoneInfo} instance for the given time zone + # identifier. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#306 + def load_timezone_info(identifier); end + + private + + # Converts degrees, minutes and seconds to a Rational. + # + # @param sign [String] `'-'` or `'+'`. + # @param degrees [String] the number of degrees. + # @param minutes [String] the number of minutes. + # @param seconds [String] the number of seconds (optional). + # @return [Rational] the result of converting from degrees, minutes and + # seconds to a `Rational`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#579 + def dms_to_rational(sign, degrees, minutes, seconds = T.unsafe(nil)); end + + # Recursively enumerate a directory of time zones. + # + # @param dir [Array] the directory to enumerate as an `Array` of + # path components. + # @param exclude [Array] file names to exclude when scanning + # `dir`. + # @yield [path] the path of each time zone file found is passed to + # the block. + # @yieldparam path [Array] the path of a time zone file as an + # `Array` of path components. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#434 + def enum_timezones(dir, exclude = T.unsafe(nil), &block); end + + # Finds a zoneinfo directory using {search_path} and + # {alternate_iso3166_tab_search_path}. + # + # @return [Array] an `Array` containing the iso3166.tab and + # zone.tab paths if a zoneinfo directory was found, otherwise `nil`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#389 + def find_zoneinfo_dir; end + + # Uses the iso3166.tab and zone1970.tab or zone.tab files to return a Hash + # mapping country codes to CountryInfo instances. + # + # @param iso3166_tab_path [String] the path to the iso3166.tab file. + # @param zone_tab_path [String] the path to the zone.tab file. + # @return [Hash] a mapping from ISO 3166-1 alpha-2 + # country codes to {CountryInfo} instances. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#463 + def load_countries(iso3166_tab_path, zone_tab_path); end + + # Scans @zoneinfo_dir and returns an `Array` of available time zone + # identifiers. The result is sorted according to `String#<=>`. + # + # @return [Array] an `Array` containing all the time zone + # identifiers found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#414 + def load_timezone_identifiers; end + + # Attempts to resolve the path to a tab file given its standard names and + # tab sub-directory name (as used on Solaris). + # + # @param zoneinfo_path [String] the path to a zoneinfo directory. + # @param standard_names [Array] the standard names for the tab + # file. + # @param tab_name [String] the alternate name for the tab file to check in + # the tab sub-directory. + # @return [String] the path to the tab file. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#372 + def resolve_tab_path(zoneinfo_path, standard_names, tab_name); end + + # Validates a zoneinfo directory and returns the paths to the iso3166.tab + # and zone1970.tab or zone.tab files if valid. If the directory is not + # valid, returns `nil`. + # + # The path to the iso3166.tab file may be overridden by passing in a path. + # This is treated as either absolute or relative to the current working + # directory. + # + # @param path [String] the path to a possible zoneinfo directory. + # @param iso3166_tab_path [String] an optional path to an external + # iso3166.tab file. + # @return [Array] an `Array` containing the iso3166.tab and + # zone.tab paths if the directory is valid, otherwise `nil`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#345 + def validate_zoneinfo_dir(path, iso3166_tab_path = T.unsafe(nil)); end + + class << self + # An `Array` of paths that will be checked to find an alternate + # iso3166.tab file if one was not included in the zoneinfo directory + # (for example, on FreeBSD and OpenBSD systems). + # + # Paths are checked in the order they appear in the `Array`. + # + # The default value is `['/usr/share/misc/iso3166.tab', + # '/usr/share/misc/iso3166']`. + # + # @return [Array] an `Array` of paths to check in order to + # locate an iso3166.tab file. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#156 + def alternate_iso3166_tab_search_path; end + + # Sets the paths to check to locate an alternate iso3166.tab file if one + # was not included in the zoneinfo directory. + # + # Can be set to an `Array` of paths or a `String` containing paths + # separated with `File::PATH_SEPARATOR`. + # + # Paths are checked in the order they appear in the array. + # + # Set to `nil` to revert to the default paths. + # + # @param alternate_iso3166_tab_search_path [Object] either `nil` or a + # list of paths to check as either an `Array` of `String` or a + # `File::PATH_SEPARATOR` separated `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#173 + def alternate_iso3166_tab_search_path=(alternate_iso3166_tab_search_path); end + + # An `Array` of directories that will be checked to find the system + # zoneinfo directory. + # + # Directories are checked in the order they appear in the `Array`. + # + # The default value is `['/usr/share/zoneinfo', + # '/usr/share/lib/zoneinfo', '/etc/zoneinfo']`. + # + # @return [Array] an `Array` of directories to check in order to + # find the system zoneinfo directory. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#123 + def search_path; end + + # Sets the directories to be checked when locating the system zoneinfo + # directory. + # + # Can be set to an `Array` of directories or a `String` containing + # directories separated with `File::PATH_SEPARATOR`. + # + # Directories are checked in the order they appear in the `Array` or + # `String`. + # + # Set to `nil` to revert to the default paths. + # + # @param search_path [Object] either `nil` or a list of directories to + # check as either an `Array` of `String` or a `File::PATH_SEPARATOR` + # separated `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#141 + def search_path=(search_path); end + + private + + # Processes a path for use as the {search_path} or + # {alternate_iso3166_tab_search_path}. + # + # @param path [Object] either `nil` or a list of paths to check as + # either an `Array` of `String` or a `File::PATH_SEPARATOR` separated + # `String`. + # @param default [Array] the default value. + # @return [Array] the processed path. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#187 + def process_search_path(path, default); end + end +end + +# The default value of {ZoneinfoDataSource.alternate_iso3166_tab_search_path}. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#74 +TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = T.let(T.unsafe(nil), Array) + +# The default value of {ZoneinfoDataSource.search_path}. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#70 +TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_SEARCH_PATH = T.let(T.unsafe(nil), Array) + +# Files and directories in the top level zoneinfo directory that will be +# excluded from the list of available time zones: +# +# - +VERSION is included on Mac OS X. +# - leapseconds is a list of leap seconds. +# - localtime is the current local timezone (may be a link). +# - posix, posixrules and right are directories containing other +# versions of the zoneinfo files. +# - SECURITY is included in the Arch Linux tzdata package. +# - src is a directory containing the tzdata source included on Solaris. +# - timeconfig is a symlink included on Slackware. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#88 +TZInfo::DataSources::ZoneinfoDataSource::EXCLUDED_FILENAMES = T.let(T.unsafe(nil), Array) + +# A {ZoneinfoDirectoryNotFound} exception is raised if no valid zoneinfo +# directory could be found when checking the paths listed in +# {ZoneinfoDataSource.search_path}. A valid zoneinfo directory is one that +# contains time zone files, a country code index file named iso3166.tab and +# a time zone index file named zone1970.tab or zone.tab. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#19 +class TZInfo::DataSources::ZoneinfoDirectoryNotFound < ::StandardError; end + +# Reads compiled zoneinfo TZif (\0, 2 or 3) files. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#12 +class TZInfo::DataSources::ZoneinfoReader + # Initializes a new {ZoneinfoReader}. + # + # @param posix_tz_parser [PosixTimeZoneParser] a {PosixTimeZoneParser} + # instance to use to parse POSIX-style TZ strings. + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # to dedupe abbreviations. + # @return [ZoneinfoReader] a new instance of ZoneinfoReader + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#25 + def initialize(posix_tz_parser, string_deduper); end + + # Reads a zoneinfo structure from the given path. Returns either a + # {TimezoneOffset} that is constantly observed or an `Array` + # {TimezoneTransition}s. + # + # @param file_path [String] the path of a zoneinfo file. + # @raise [SecurityError] if safe mode is enabled and `file_path` is + # tainted. + # @raise [InvalidZoneinfoFile] if `file_path`` does not refer to a valid + # zoneinfo file. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#41 + def read(file_path); end + + private + + # Apply the rules from the TZ string when there were defined + # transitions. Checks for a matching offset with the last transition. + # Redefines the last transition if required and if the rules don't + # specific a constant offset, generates transitions until 100 years into + # the future (at the time of loading zoneinfo_reader.rb). + # + # @param file [IO] the file being processed. + # @param transitions [Array] the defined transitions. + # @param offsets [Array] the offsets used by the defined + # transitions. + # @param rules [Object] a {TimezoneOffset} specifying a constant offset or + # {AnnualRules} instance specfying transitions. + # @raise [InvalidZoneinfoFile] if the first offset does not match the + # rules. + # @raise [InvalidZoneinfoFile] if the previous offset of the first + # generated transition does not match the offset of the last defined + # transition. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#311 + def apply_rules_with_transitions(file, transitions, offsets, rules); end + + # Apply the rules from the TZ string when there were no defined + # transitions. Checks for a matching offset. Returns the rules-based + # constant offset or generates transitions from 1970 until 100 years into + # the future (at the time of loading zoneinfo_reader.rb). + # + # @param file [IO] the file being processed. + # @param first_offset [TimezoneOffset] the first offset included in the + # file that would normally apply without the rules. + # @param rules [Object] a {TimezoneOffset} specifying a constant offset or + # {AnnualRules} instance specfying transitions. + # @raise [InvalidZoneinfoFile] if the first offset does not match the + # rules. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#199 + def apply_rules_without_transitions(file, first_offset, rules); end + + # Reads the given number of bytes from the given file and checks that the + # correct number of bytes could be read. + # + # @param file [IO] the file to read from. + # @param bytes [Integer] the number of bytes to read. + # @raise [InvalidZoneinfoFile] if the number of bytes available didn't + # match the number requested. + # @return [String] the bytes that were read. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#76 + def check_read(file, bytes); end + + # Zoneinfo files don't include the offset from standard time (std_offset) + # for DST periods. Derive the base offset (base_utc_offset) where DST is + # observed from either the previous or next non-DST period. + # + # @param transitions [Array] an `Array` of transition hashes. + # @param offsets [Array] an `Array` of offset hashes. + # @return [Integer] the index of the offset to be used prior to the first + # transition. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#94 + def derive_offsets(transitions, offsets); end + + # Finds an offset that is equivalent to the one specified in the given + # `Array`. Matching is performed with {TimezoneOffset#==}. + # + # @param offsets [Array] an `Array` to search. + # @param offset [TimezoneOffset] the offset to search for. + # @return [TimezoneOffset] the matching offset from `offsets` or `nil` + # if not found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#233 + def find_existing_offset(offsets, offset); end + + # Translates an unsigned 32-bit integer (as returned by unpack) to signed + # 32-bit. + # + # @param long [Integer] an unsigned 32-bit integer. + # @return [Integer] {long} translated to signed 32-bit. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#52 + def make_signed_int32(long); end + + # Translates a pair of unsigned 32-bit integers (as returned by unpack, + # most significant first) to a signed 64-bit integer. + # + # @param high [Integer] the most significant 32-bits. + # @param low [Integer] the least significant 32-bits. + # @return [Integer] {high} and {low} combined and translated to signed + # 64-bit. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#63 + def make_signed_int64(high, low); end + + # Determines if the offset from a transition matches the offset from a + # rule. This is a looser match than equality, not requiring that the + # base_utc_offset and std_offset both match (which have to be derived for + # transitions, but are known for rules. + # + # @param offset [TimezoneOffset] an offset from a transition. + # @param rule_offset [TimezoneOffset] an offset from a rule. + # @return [Boolean] whether the offsets match. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#179 + def offset_matches_rule?(offset, rule_offset); end + + # Parses a zoneinfo file and returns either a {TimezoneOffset} that is + # constantly observed or an `Array` of {TimezoneTransition}s. + # + # @param file [IO] the file to be read. + # @raise [InvalidZoneinfoFile] if the file is not a valid zoneinfo file. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#343 + def parse(file); end + + # Returns a new AnnualRules instance with standard and daylight savings + # offsets replaced with equivalents from an array. This reduces the memory + # requirement for loaded time zones by reusing offsets for rule-generated + # transitions. + # + # @param offsets [Array] an `Array` to search for + # equivalent offsets. + # @param annual_rules [AnnualRules] the {AnnualRules} instance to check. + # @return [AnnualRules] either a new {AnnualRules} instance with either + # the {AnnualRules#std_offset std_offset} or {AnnualRules#dst_offset + # dst_offset} replaced, or the original instance if no equivalent for + # either {AnnualRules#std_offset std_offset} or {AnnualRules#dst_offset + # dst_offset} could be found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#250 + def replace_with_existing_offsets(offsets, annual_rules); end + + # Validates the offset indicated to be observed by the rules before the + # first generated transition against the offset of the last defined + # transition. + # + # Fix the last defined transition if it differ on just base/std offsets + # (which are derived). Raise an error if the observed UTC offset or + # abbreviations differ. + # + # @param file [IO] the file being processed. + # @param last_defined [TimezoneTransition] the last defined transition in + # the file. + # @param first_rule_offset [TimezoneOffset] the offset the rules indicate + # is observed prior to the first rules generated transition. + # @raise [InvalidZoneinfoFile] if the offset of {last_defined} and + # {first_rule_offset} do not match. + # @return [TimezoneTransition] the last defined transition (either the + # original instance or a replacement). + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#278 + def validate_and_fix_last_defined_transition_offset(file, last_defined, first_rule_offset); end +end + +# The year to generate transitions up to. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#16 +TZInfo::DataSources::ZoneinfoReader::GENERATE_UP_TO = T.let(T.unsafe(nil), Integer) + +# Represents time zones that are defined by rules that set out when +# transitions occur. +# +# source://tzinfo//lib/tzinfo/data_timezone.rb#7 +class TZInfo::DataTimezone < ::TZInfo::InfoTimezone + # Returns the canonical {Timezone} instance for this {DataTimezone}. + # + # For a {DataTimezone}, this is always `self`. + # + # @return [Timezone] `self`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#40 + def canonical_zone; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#9 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#17 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#23 + def transitions_up_to(to, from = T.unsafe(nil)); end +end + +# A subclass of `DateTime` used to represent local times. {DateTimeWithOffset} +# holds a reference to the related {TimezoneOffset} and overrides various +# methods to return results appropriate for the {TimezoneOffset}. Certain +# operations will clear the associated {TimezoneOffset} (if the +# {TimezoneOffset} would not necessarily be valid for the result). Once the +# {TimezoneOffset} has been cleared, {DateTimeWithOffset} behaves identically +# to `DateTime`. +# +# Arithmetic performed on {DateTimeWithOffset} instances is _not_ time +# zone-aware. Regardless of whether transitions in the time zone are crossed, +# results of arithmetic operations will always maintain the same offset from +# UTC (`offset`). The associated {TimezoneOffset} will aways be cleared. +# +# source://tzinfo//lib/tzinfo/datetime_with_offset.rb#19 +class TZInfo::DateTimeWithOffset < ::DateTime + include ::TZInfo::WithOffset + + # An overridden version of `DateTime#downto` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#61 + def downto(min); end + + # An overridden version of `DateTime#england` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#75 + def england; end + + # An overridden version of `DateTime#gregorian` that preserves the + # associated {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#85 + def gregorian; end + + # An overridden version of `DateTime#italy` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#95 + def italy; end + + # An overridden version of `DateTime#julian` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#105 + def julian; end + + # An overridden version of `DateTime#new_start` that preserves the + # associated {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#115 + def new_start(start = T.unsafe(nil)); end + + # Sets the associated {TimezoneOffset}. + # + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the + # time and for the offset of this {DateTimeWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @raise [ArgumentError] if `timezone_offset.observed_utc_offset` does not + # equal `self.offset * 86400`. + # @return [DateTimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#34 + def set_timezone_offset(timezone_offset); end + + # An overridden version of `DateTime#step` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#121 + def step(limit, step = T.unsafe(nil)); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#24 + def timezone_offset; end + + # An overridden version of `DateTime#to_time` that, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [Time] if there is an associated {TimezoneOffset}, a + # {TimeWithOffset} representation of this {DateTimeWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#48 + def to_time; end + + # An overridden version of `DateTime#upto` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#133 + def upto(max); end + + protected + + # Clears the associated {TimezoneOffset}. + # + # @return [DateTimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#148 + def clear_timezone_offset; end +end + +# A rule that transitions on the nth occurrence of a particular day of week +# of a calendar month. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#339 +class TZInfo::DayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule + # Initializes a new {DayOfMonthTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param week [Integer] the week of the month when the transition occurs (1 + # to 4). + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `week` is less than 1 or greater than 4. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `week` is not an `Integer`. + # @return [DayOfMonthTransitionRule] a new instance of DayOfMonthTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#340 + def initialize(month, week, day_of_week, transition_at = T.unsafe(nil)); end + + # Determines if this {DayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfMonthTransitionRule} with the + # same {transition_at}, month, week and day of week as this + # {DayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#353 + def ==(r); end + + # Determines if this {DayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfMonthTransitionRule} with the + # same {transition_at}, month, week and day of week as this + # {DayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#353 + def eql?(r); end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#372 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#386 + def hash_args; end + + # @return [Integer] the day the week starts on for a month starting on a + # Sunday. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#362 + def offset_start; end +end + +# A base class for rules that transition on a particular day of week of a +# given week (subclasses specify which week of the month). +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#273 +class TZInfo::DayOfWeekTransitionRule < ::TZInfo::TransitionRule + # Initializes a new {DayOfWeekTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @return [DayOfWeekTransitionRule] a new instance of DayOfWeekTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#274 + def initialize(month, day_of_week, transition_at); end + + # Determines if this {DayOfWeekTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfWeekTransitionRule} with the + # same {transition_at}, month and day of week as this + # {DayOfWeekTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#299 + def ==(r); end + + # Determines if this {DayOfWeekTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfWeekTransitionRule} with the + # same {transition_at}, month and day of week as this + # {DayOfWeekTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#299 + def eql?(r); end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#283 + def is_always_first_day_of_year?; end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#288 + def is_always_last_day_of_year?; end + + protected + + # @return [Integer] the day of the week (0 to 6 for Sunday to Monday). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#310 + def day_of_week; end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#313 + def hash_args; end + + # @return [Integer] the month of the year (1 to 12). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#307 + def month; end +end + +# A base class for transition rules that activate based on an integer day of +# the year. +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#81 +class TZInfo::DayOfYearTransitionRule < ::TZInfo::TransitionRule + # Initializes a new {DayOfYearTransitionRule}. + # + # @param day [Integer] the day of the year on which the transition occurs. + # The precise meaning is defined by subclasses. + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @return [DayOfYearTransitionRule] a new instance of DayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#82 + def initialize(day, transition_at); end + + # Determines if this {DayOfYearTransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfYearTransitionRule} with the + # same {transition_at} and day as this {DayOfYearTransitionRule}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#94 + def ==(r); end + + # Determines if this {DayOfYearTransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfYearTransitionRule} with the + # same {transition_at} and day as this {DayOfYearTransitionRule}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#94 + def eql?(r); end + + protected + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#105 + def hash_args; end + + # @return [Integer] the day multipled by the number of seconds in a day. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#102 + def seconds; end +end + +# Modules and classes used by the format 1 version of TZInfo::Data. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1.rb#7 +module TZInfo::Format1; end + +# Instances of {Format1::CountryDefiner} are yielded to the format 1 version +# of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefinition} to allow +# the zones of a country to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_definer.rb#11 +class TZInfo::Format1::CountryDefiner < ::TZInfo::Format2::CountryDefiner + # Initializes a new {CountryDefiner}. + # + # @return [CountryDefiner] a new instance of CountryDefiner + # + # source://tzinfo//lib/tzinfo/format1/country_definer.rb#12 + def initialize(identifier_deduper, description_deduper); end +end + +# The format 1 TZInfo::Data country index file includes +# {Format1::CountryIndexDefinition}, which provides a +# {CountryIndexDefinition::ClassMethods#country country} method used to +# define each country in the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#11 +module TZInfo::Format1::CountryIndexDefinition + mixes_in_class_methods ::TZInfo::Format1::CountryIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#16 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#25 +module TZInfo::Format1::CountryIndexDefinition::ClassMethods + # @return [Hash] a frozen `Hash` + # of all the countries that have been defined in the index keyed by + # their codes. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#29 + def countries; end + + private + + # Defines a country with an ISO 3166-1 alpha-2 country code and name. + # + # @param code [String] the ISO 3166-1 alpha-2 country code. + # @param name [String] the name of the country. + # @yield [definer] (optional) to obtain the time zones for the country. + # @yieldparam definer [CountryDefiner] a {CountryDefiner} instance. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#42 + def country(code, name); end +end + +# Instances of {Format1::TimezoneDefiner} are yielded to TZInfo::Data +# format 1 modules by {TimezoneDefinition} to allow the offsets and +# transitions of the time zone to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#11 +class TZInfo::Format1::TimezoneDefiner < ::TZInfo::Format2::TimezoneDefiner + # Defines an offset. + # + # @param id [Symbol] an arbitrary value used identify the offset in + # subsequent calls to transition. It must be unique. + # @param utc_offset [Integer] the base offset from UTC of the zone in + # seconds. This does not include daylight savings time. + # @param std_offset [Integer] the daylight savings offset from the base + # offset in seconds. Typically either 0 or 3600. + # @param abbreviation [Symbol] an abbreviation for the offset, for + # example, `:EST` or `:EDT`. + # @raise [ArgumentError] if another offset has already been defined with + # the given id. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#26 + def offset(id, utc_offset, std_offset, abbreviation); end + + # Defines a transition to a given offset. + # + # Transitions must be defined in increasing time order. + # + # @param year [Integer] the UTC year in which the transition occurs. Used + # in earlier versions of TZInfo, but now ignored. + # @param month [Integer] the UTC month in which the transition occurs. + # Used in earlier versions of TZInfo, but now ignored. + # @param offset_id [Symbol] references the id of a previously defined + # offset (see #offset). + # @param timestamp_value [Integer] the time the transition occurs as an + # Integer number of seconds since 1970-01-01 00:00:00 UTC ignoring leap + # seconds (i.e. each day is treated as if it were 86,400 seconds long). + # @param datetime_numerator [Integer] the time of the transition as the + # numerator of the `Rational` returned by `DateTime#ajd`. Used in + # earlier versions of TZInfo, but now ignored. + # @param datetime_denominator [Integer] the time of the transition as the + # denominator of the `Rational` returned by `DateTime#ajd`. Used in + # earlier versions of TZInfo, but now ignored. + # @raise [ArgumentError] if `offset_id` does not reference a defined + # offset. + # @raise [ArgumentError] if `timestamp_value` is not greater than the + # `timestamp_value` of the previously defined transition. + # @raise [ArgumentError] if `datetime_numerator` is specified, but + # `datetime_denominator` is not. In older versions of TZInfo, it was + # possible to define a transition with the `DateTime` numerator as the + # 4th parameter and the denominator as the 5th parameter. This style of + # definition is not used in released versions of TZInfo::Data. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#58 + def transition(year, month, offset_id, timestamp_value, datetime_numerator = T.unsafe(nil), datetime_denominator = T.unsafe(nil)); end +end + +# {Format1::TimezoneDefinition} is included into format 1 time zone +# definition modules and provides the methods for defining time zones. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#9 +module TZInfo::Format1::TimezoneDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneDefinition::ClassMethods + mixes_in_class_methods ::TZInfo::Format1::TimezoneDefinition::ClassMethods + + class << self + # Adds class methods to the includee. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#13 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#22 +module TZInfo::Format1::TimezoneDefinition::ClassMethods + private + + # {Format2::TimezoneDefinition::ClassMethods#timezone}. + # + # @return the class to be instantiated and yielded by + # + # source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#27 + def timezone_definer_class; end +end + +# The format 1 TZInfo::Data time zone index file includes +# {Format1::TimezoneIndexDefinition}, which provides methods used to define +# time zones in the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#10 +module TZInfo::Format1::TimezoneIndexDefinition + mixes_in_class_methods ::TZInfo::Format1::TimezoneIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#15 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#28 +module TZInfo::Format1::TimezoneIndexDefinition::ClassMethods + # @return [Array] a frozen `Array` containing the identifiers of + # all data time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#32 + def data_timezones; end + + # @return [Array] a frozen `Array` containing the identifiers of + # all linked time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#42 + def linked_timezones; end + + private + + # Adds a linked time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#63 + def linked_timezone(identifier); end + + # Adds a data time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#54 + def timezone(identifier); end +end + +# Modules and classes used by the format 2 version of TZInfo::Data. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2.rb#7 +module TZInfo::Format2; end + +# Instances of {Format2::CountryDefiner} are yielded to the format 2 version +# of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefiner} to allow +# the zones of a country to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_definer.rb#11 +class TZInfo::Format2::CountryDefiner + # Initializes a new {CountryDefiner}. + # + # @param shared_timezones [Hash] a `Hash` + # containing time zones shared by more than one country, keyed by a + # unique reference. + # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone identifiers. + # @param description_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone descriptions. + # @return [CountryDefiner] a new instance of CountryDefiner + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#24 + def initialize(shared_timezones, identifier_deduper, description_deduper); end + + # @overload timezone + # @overload timezone + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#46 + def timezone(identifier_or_reference, latitude_numerator = T.unsafe(nil), latitude_denominator = T.unsafe(nil), longitude_numerator = T.unsafe(nil), longitude_denominator = T.unsafe(nil), description = T.unsafe(nil)); end + + # @return [Array] the time zones observed in the country. + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#13 + def timezones; end +end + +# Instances of {Format2::CountryIndexDefiner} are yielded to the format 2 +# version of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefinition} +# to allow countries and their time zones to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#10 +class TZInfo::Format2::CountryIndexDefiner + # Initializes a new {CountryIndexDefiner}. + # + # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone identifiers. + # @param description_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone descriptions. + # @return [CountryIndexDefiner] a new instance of CountryIndexDefiner + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#21 + def initialize(identifier_deduper, description_deduper); end + + # @return [Hash] a `Hash` of all the countries that + # have been defined in the index keyed by their codes. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#13 + def countries; end + + # Defines a country. + # + # @param code [String] The ISO 3166-1 alpha-2 code of the country. + # @param name [String] Then name of the country. + # @yield [definer] yields (optional) to obtain the time zones for the + # country. + # @yieldparam definer [CountryDefiner] a {CountryDefiner} + # instance that should be used to specify the time zones of the country. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#56 + def country(code, name); end + + # Defines a time zone shared by many countries with an reference for + # subsequent use in country definitions. The latitude and longitude are + # given as the numerator and denominator of a `Rational`. + # + # @param reference [Symbol] a unique reference for the time zone. + # @param identifier [String] the time zone identifier. + # @param latitude_numerator [Integer] the numerator of the latitude. + # @param latitude_denominator [Integer] the denominator of the latitude. + # @param longitude_numerator [Integer] the numerator of the longitude. + # @param longitude_denominator [Integer] the denominator of the longitude. + # @param description [String] an optional description for the time zone. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#39 + def timezone(reference, identifier, latitude_numerator, latitude_denominator, longitude_numerator, longitude_denominator, description = T.unsafe(nil)); end +end + +# The format 2 country index file includes +# {Format2::CountryIndexDefinition}, which provides a +# {CountryIndexDefinition::ClassMethods#country_index country_index} method +# used to define the country index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#11 +module TZInfo::Format2::CountryIndexDefinition + mixes_in_class_methods ::TZInfo::Format2::CountryIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#16 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#25 +module TZInfo::Format2::CountryIndexDefinition::ClassMethods + # @return [Hash] a frozen `Hash` + # of all the countries that have been defined in the index keyed by + # their codes. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#29 + def countries; end + + private + + # Defines the index. + # + # @yield [definer] yields to allow the index to be defined. + # @yieldparam definer [CountryIndexDefiner] a {CountryIndexDefiner} + # instance that should be used to define the index. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#38 + def country_index; end +end + +# Instances of {TimezoneDefiner} are yielded to TZInfo::Data modules by +# {TimezoneDefinition} to allow the offsets and transitions of the time zone +# to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#11 +class TZInfo::Format2::TimezoneDefiner + # Initializes a new TimezoneDefiner. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # when deduping abbreviations. + # @return [TimezoneDefiner] a new instance of TimezoneDefiner + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#20 + def initialize(string_deduper); end + + # Returns the first offset to be defined or `nil` if no offsets have been + # defined. The first offset is observed before the time of the first + # transition. + # + # @return [TimezoneOffset] the first offset to be defined or `nil` if no + # offsets have been defined. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#32 + def first_offset; end + + # Defines an offset. + # + # @param id [Symbol] an arbitrary value used identify the offset in + # subsequent calls to transition. It must be unique. + # @param base_utc_offset [Integer] the base offset from UTC of the zone in + # seconds. This does not include daylight savings time. + # @param std_offset [Integer] the daylight savings offset from the base + # offset in seconds. Typically either 0 or 3600. + # @param abbreviation [String] an abbreviation for the offset, for + # example, EST or EDT. + # @raise [ArgumentError] if another offset has already been defined with + # the given id. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#49 + def offset(id, base_utc_offset, std_offset, abbreviation); end + + # Defines the rules that will be used for handling instants after the last + # transition. + # + # This method is currently just a placeholder for forward compatibility + # that accepts and ignores any arguments passed. + # + # Support for subsequent rules will be added in a future version of TZInfo + # and the rules will be included in format 2 releases of TZInfo::Data. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#90 + def subsequent_rules(*args); end + + # Defines a transition to a given offset. + # + # Transitions must be defined in increasing time order. + # + # @param offset_id [Symbol] references the id of a previously defined + # offset. + # @param timestamp_value [Integer] the time the transition occurs as a + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds + # (i.e. each day is treated as if it were 86,400 seconds long). + # @raise [ArgumentError] if `offset_id` does not reference a defined + # offset. + # @raise [ArgumentError] if `timestamp_value` is not greater than the + # `timestamp_value` of the previously defined transition. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#74 + def transition(offset_id, timestamp_value); end + + # @return [Array] the defined transitions of the time + # zone. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#14 + def transitions; end +end + +# {Format2::TimezoneDefinition} is included into format 2 time zone +# definition modules and provides methods for defining time zones. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#9 +module TZInfo::Format2::TimezoneDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneDefinition::ClassMethods + + class << self + # Adds class methods to the includee. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#13 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#21 +module TZInfo::Format2::TimezoneDefinition::ClassMethods + # @return [TimezoneInfo] the last time zone to be defined. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#23 + def get; end + + private + + # Defines a linked time zone. + # + # @param identifier [String] the identifier of the time zone being + # defined. + # @param link_to_identifier [String] the identifier the new time zone + # links to (is an alias for). + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#64 + def linked_timezone(identifier, link_to_identifier); end + + # Defines a data time zone. + # + # @param identifier [String] the identifier of the time zone. + # @yield [definer] yields to the caller to define the time zone. + # @yieldparam definer [Object] an instance of the class returned by + # {#timezone_definer_class}, typically {TimezoneDefiner}. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#41 + def timezone(identifier); end + + # @return [Class] the class to be instantiated and yielded by + # {#timezone}. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#31 + def timezone_definer_class; end +end + +# Instances of {TimezoneIndexDefiner} are yielded by +# {TimezoneIndexDefinition} to allow the time zone index to be defined. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#9 +class TZInfo::Format2::TimezoneIndexDefiner + # Initializes a new TimezoneDefiner. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # when deduping identifiers. + # @return [TimezoneIndexDefiner] a new instance of TimezoneIndexDefiner + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#20 + def initialize(string_deduper); end + + # Adds a data time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#29 + def data_timezone(identifier); end + + # @return [Array] the identifiers of all data time zones. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#11 + def data_timezones; end + + # Adds a linked time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#38 + def linked_timezone(identifier); end + + # @return [Array] the identifiers of all linked time zones. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#14 + def linked_timezones; end +end + +# The format 2 time zone index file includes {TimezoneIndexDefinition}, +# which provides the {TimezoneIndexDefinition::ClassMethods#timezone_index +# timezone_index} method used to define the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#10 +module TZInfo::Format2::TimezoneIndexDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#15 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#29 +module TZInfo::Format2::TimezoneIndexDefinition::ClassMethods + # @return [Array] a frozen `Array` containing the identifiers of + # all data time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#33 + def data_timezones; end + + # @return [Array] a frozen `Array` containing the identifiers of + # all linked time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#38 + def linked_timezones; end + + # Defines the index. + # + # @yield [definer] yields to the caller to allow the index to be + # defined. + # @yieldparam definer [TimezoneIndexDefiner] a {TimezoneIndexDefiner} + # instance that should be used to define the index. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#46 + def timezone_index; end +end + +# A {Timezone} based on a {DataSources::TimezoneInfo}. +# +# @abstract +# +# source://tzinfo//lib/tzinfo/info_timezone.rb#8 +class TZInfo::InfoTimezone < ::TZInfo::Timezone + # Initializes a new {InfoTimezone}. + # + # {InfoTimezone} instances should not normally be created directly. Use + # the {Timezone.get} method to obtain {Timezone} instances. + # + # @param info [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} + # instance supplied by a {DataSource} that will be used as the source of + # data for this {InfoTimezone}. + # @return [InfoTimezone] a new instance of InfoTimezone + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#17 + def initialize(info); end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#23 + def identifier; end + + protected + + # @return [DataSources::TimezoneInfo] the {DataSources::TimezoneInfo} this + # {InfoTimezone} is based on. + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#31 + def info; end +end + +# {InvalidCountryCode} is raised by {Country#get} if the code given is not a +# valid ISO 3166-1 alpha-2 code. +# +# source://tzinfo//lib/tzinfo/country.rb#7 +class TZInfo::InvalidCountryCode < ::StandardError; end + +# {InvalidDataSource} is raised if the selected {DataSource} doesn't implement +# one of the required methods. +# +# source://tzinfo//lib/tzinfo/data_source.rb#10 +class TZInfo::InvalidDataSource < ::StandardError; end + +# {InvalidTimezoneIdentifier} is raised by {Timezone.get} if the identifier +# given is not valid. +# +# source://tzinfo//lib/tzinfo/timezone.rb#26 +class TZInfo::InvalidTimezoneIdentifier < ::StandardError; end + +# Defines transitions that occur on the one-based nth Julian day of the year. +# +# Leap days are not counted. Day 1 is 1 January. Day 60 is always 1 March. +# Day 365 is always 31 December. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#185 +class TZInfo::JulianDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule + # Initializes a new {JulianDayOfYearTransitionRule}. + # + # @param day [Integer] the one-based Julian day of the year on which the + # transition occurs (1 to 365 inclusive). + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @raise [ArgumentError] if `day` is less than 1 or greater than 365. + # @return [JulianDayOfYearTransitionRule] a new instance of JulianDayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#202 + def initialize(day, transition_at = T.unsafe(nil)); end + + # Determines if this {JulianDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {JulianDayOfYearTransitionRule} with + # the same {transition_at} and day as this + # {JulianDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#226 + def ==(r); end + + # Determines if this {JulianDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {JulianDayOfYearTransitionRule} with + # the same {transition_at} and day as this + # {JulianDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#226 + def eql?(r); end + + # @return [Boolean] `true` if the day specified by this transition is the + # first in the year (a day number of 1), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#209 + def is_always_first_day_of_year?; end + + # @return [Boolean] `true` if the day specified by this transition is the + # last in the year (a day number of 365), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#215 + def is_always_last_day_of_year?; end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#241 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#250 + def hash_args; end +end + +# The 60 days in seconds. +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#186 +TZInfo::JulianDayOfYearTransitionRule::LEAP = T.let(T.unsafe(nil), Integer) + +# The length of a non-leap year in seconds. +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#190 +TZInfo::JulianDayOfYearTransitionRule::YEAR = T.let(T.unsafe(nil), Integer) + +# A rule that transitions on the last occurrence of a particular day of week +# of a calendar month. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#408 +class TZInfo::LastDayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule + # Initializes a new {LastDayOfMonthTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @return [LastDayOfMonthTransitionRule] a new instance of LastDayOfMonthTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#409 + def initialize(month, day_of_week, transition_at = T.unsafe(nil)); end + + # Determines if this {LastDayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {LastDayOfMonthTransitionRule} with + # the same {transition_at}, month and day of week as this + # {LastDayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#420 + def ==(r); end + + # Determines if this {LastDayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {LastDayOfMonthTransitionRule} with + # the same {transition_at}, month and day of week as this + # {LastDayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#420 + def eql?(r); end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#435 + def get_day(offset, year); end +end + +# Represents time zones that are defined as a link to or alias for another +# time zone. +# +# source://tzinfo//lib/tzinfo/linked_timezone.rb#6 +class TZInfo::LinkedTimezone < ::TZInfo::InfoTimezone + # Initializes a new {LinkedTimezone}. + # + # {LinkedTimezone} instances should not normally be created directly. Use + # the {Timezone.get} method to obtain {Timezone} instances. + # + # @param info [DataSources::LinkedTimezoneInfo] a + # {DataSources::LinkedTimezoneInfo} instance supplied by a {DataSource} + # that will be used as the source of data for this {LinkedTimezone}. + # @return [LinkedTimezone] a new instance of LinkedTimezone + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#15 + def initialize(info); end + + # Returns the canonical {Timezone} instance for this {LinkedTimezone}. + # + # For a {LinkedTimezone}, this is the canonical zone of the link target. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#40 + def canonical_zone; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#21 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#26 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#31 + def transitions_up_to(to, from = T.unsafe(nil)); end +end + +# Represents the infinite period of time in a time zone that constantly +# observes the same offset from UTC (has an unbounded start and end). +# +# source://tzinfo//lib/tzinfo/offset_timezone_period.rb#6 +class TZInfo::OffsetTimezonePeriod < ::TZInfo::TimezonePeriod + # Initializes an {OffsetTimezonePeriod}. + # + # @param offset [TimezoneOffset] the offset that is constantly observed. + # @raise [ArgumentError] if `offset` is `nil`. + # @return [OffsetTimezonePeriod] a new instance of OffsetTimezonePeriod + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#11 + def initialize(offset); end + + # Determines if this {OffsetTimezonePeriod} is equal to another instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {OffsetTimezonePeriod} with the same + # {offset}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#32 + def ==(p); end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod}, always `nil` for {OffsetTimezonePeriod}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#23 + def end_transition; end + + # Determines if this {OffsetTimezonePeriod} is equal to another instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {OffsetTimezonePeriod} with the same + # {offset}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#32 + def eql?(p); end + + # @return [Integer] a hash based on {offset}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#38 + def hash; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod}, always `nil` for {OffsetTimezonePeriod}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#17 + def start_transition; end +end + +# {PeriodNotFound} is raised to indicate that no {TimezonePeriod} matching a +# given time could be found. +# +# source://tzinfo//lib/tzinfo/timezone.rb#21 +class TZInfo::PeriodNotFound < ::StandardError; end + +# Methods to support different versions of Ruby. +# +# @private +# +# source://tzinfo//lib/tzinfo/ruby_core_support.rb#6 +module TZInfo::RubyCoreSupport + class << self + # source://tzinfo//lib/tzinfo/ruby_core_support.rb#17 + def untaint(o); end + end +end + +# Maintains a pool of `String` instances. The {#dedupe} method will return +# either a pooled copy of a given `String` or add the instance to the pool. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#11 +class TZInfo::StringDeduper + # Initializes a new {StringDeduper}. + # + # @return [StringDeduper] a new instance of StringDeduper + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#20 + def initialize; end + + # @param string [String] the string to deduplicate. + # @return [bool] `string` if it is frozen, otherwise a frozen, possibly + # pre-existing copy of `string`. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#30 + def dedupe(string); end + + protected + + # Creates a `Hash` to store pooled `String` instances. + # + # @param block [Proc] Default value block to be passed to `Hash.new`. + # @return [Hash] a `Hash` to store pooled `String` instances. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#41 + def create_hash(&block); end + + class << self + # @return [StringDeduper] a globally available singleton instance of + # {StringDeduper}. This instance is safe for use in concurrently + # executing threads. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#16 + def global; end + end +end + +# A subclass of `Time` used to represent local times. {TimeWithOffset} holds a +# reference to the related {TimezoneOffset} and overrides various methods to +# return results appropriate for the {TimezoneOffset}. Certain operations will +# clear the associated {TimezoneOffset} (if the {TimezoneOffset} would not +# necessarily be valid for the result). Once the {TimezoneOffset} has been +# cleared, {TimeWithOffset} behaves identically to `Time`. +# +# Arithmetic performed on {TimeWithOffset} instances is _not_ time zone-aware. +# Regardless of whether transitions in the time zone are crossed, results of +# arithmetic operations will always maintain the same offset from UTC +# (`utc_offset`). The associated {TimezoneOffset} will aways be cleared. +# +# source://tzinfo//lib/tzinfo/time_with_offset.rb#16 +class TZInfo::TimeWithOffset < ::Time + include ::TZInfo::WithOffset + + # An overridden version of `Time#dst?` that, if there is an associated + # {TimezoneOffset}, returns the result of calling {TimezoneOffset#dst? dst?} + # on that offset. + # + # @return [Boolean] `true` if daylight savings time is being observed, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#43 + def dst?; end + + # An overridden version of `Time#getlocal` that clears the associated + # {TimezoneOffset} if the base implementation of `getlocal` returns a + # {TimeWithOffset}. + # + # @return [Time] a representation of the {TimeWithOffset} using either the + # local time zone or the given offset. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#55 + def getlocal(*args); end + + # An overridden version of `Time#gmtime` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#69 + def gmtime; end + + # An overridden version of `Time#dst?` that, if there is an associated + # {TimezoneOffset}, returns the result of calling {TimezoneOffset#dst? dst?} + # on that offset. + # + # @return [Boolean] `true` if daylight savings time is being observed, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#43 + def isdst; end + + # An overridden version of `Time#localtime` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#79 + def localtime(*args); end + + # An overridden version of `Time#round` that, if there is an associated + # {TimezoneOffset}, returns a {TimeWithOffset} preserving that offset. + # + # @return [Time] the rounded time. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#89 + def round(ndigits = T.unsafe(nil)); end + + # Marks this {TimeWithOffset} as a local time with the UTC offset of a given + # {TimezoneOffset} and sets the associated {TimezoneOffset}. + # + # @param timezone_offset [TimezoneOffset] the {TimezoneOffset} to use to set + # the offset of this {TimeWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#30 + def set_timezone_offset(timezone_offset); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#21 + def timezone_offset; end + + # An overridden version of `Time#to_a`. The `isdst` (index 8) and `zone` + # (index 9) elements of the array are set according to the associated + # {TimezoneOffset}. + # + # @return [Array] an `Array` representation of the {TimeWithOffset}. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#98 + def to_a; end + + # An overridden version of `Time#to_datetime` that, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [DateTime] if there is an associated {TimezoneOffset}, a + # {DateTimeWithOffset} representation of this {TimeWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#135 + def to_datetime; end + + # An overridden version of `Time#utc` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#110 + def utc; end + + # An overridden version of `Time#zone` that, if there is an associated + # {TimezoneOffset}, returns the {TimezoneOffset#abbreviation abbreviation} + # of that offset. + # + # @return [String] the {TimezoneOffset#abbreviation abbreviation} of the + # associated {TimezoneOffset}, or the result from `Time#zone` if there is + # no such offset. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#123 + def zone; end + + protected + + # Clears the associated {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#149 + def clear_timezone_offset; end +end + +# A time represented as an `Integer` number of seconds since 1970-01-01 +# 00:00:00 UTC (ignoring leap seconds and using the proleptic Gregorian +# calendar), the fraction through the second (sub_second as a `Rational`) and +# an optional UTC offset. Like Ruby's `Time` class, {Timestamp} can +# distinguish between a local time with a zero offset and a time specified +# explicitly as UTC. +# +# source://tzinfo//lib/tzinfo/timestamp.rb#11 +class TZInfo::Timestamp + include ::Comparable + + # Initializes a new {Timestamp}. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # @param sub_second [Numeric] the fractional part of the second as either a + # `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` and + # not the `Symbol` `:utc`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `value` is not an `Integer`. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @return [Timestamp] a new instance of Timestamp + # + # source://tzinfo//lib/tzinfo/timestamp.rb#344 + def initialize(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # Compares this {Timestamp} with another. + # + # {Timestamp} instances without a defined UTC offset are not comparable with + # {Timestamp} instances that have a defined UTC offset. + # + # @param t [Timestamp] the {Timestamp} to compare this instance with. + # @return [Integer] -1, 0 or 1 depending if this instance is earlier, equal + # or later than `t` respectively. Returns `nil` when comparing a + # {Timestamp} that does not have a defined UTC offset with a {Timestamp} + # that does have a defined UTC offset. Returns `nil` if `t` is not a + # {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#454 + def <=>(t); end + + # Adds a number of seconds to the {Timestamp} value, setting the UTC offset + # of the result. + # + # @param seconds [Integer] the number of seconds to be added. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # @raise [ArgumentError] if `seconds` is not an `Integer`. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` and + # not the `Symbol` `:utc`. + # @return [Timestamp] the result of adding `seconds` to the + # {Timestamp} value as a new {Timestamp} instance with the chosen + # `utc_offset`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#372 + def add_and_set_utc_offset(seconds, utc_offset); end + + def eql?(_arg0); end + + # @return [Integer] a hash based on the value, sub-second and whether there + # is a defined UTC offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#468 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#474 + def inspect; end + + # Formats this {Timestamp} according to the directives in the given format + # string. + # + # @param format [String] the format string. Please refer to `Time#strftime` + # for a list of supported format directives. + # @raise [ArgumentError] if `format` is not specified. + # @return [String] the formatted {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#426 + def strftime(format); end + + # @return [Numeric] the fraction of a second elapsed since timestamp as + # either a `Rational` or the `Integer` 0. Always greater than or equal to + # 0 and less than 1. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#321 + def sub_second; end + + # Converts this {Timestamp} to a Gregorian `DateTime`. + # + # @return [DateTime] a Gregorian `DateTime` representation of this + # {Timestamp}. If the UTC offset of this {Timestamp} is not specified, a + # UTC `DateTime` will be returned. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#406 + def to_datetime; end + + # Converts this {Timestamp} to an `Integer` number of seconds since + # 1970-01-01 00:00:00 UTC (ignoring leap seconds). + # + # @return [Integer] an `Integer` representation of this {Timestamp} (the + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#415 + def to_i; end + + # @return [String] a `String` representation of this {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#432 + def to_s; end + + # Converts this {Timestamp} to a `Time`. + # + # @return [Time] a `Time` representation of this {Timestamp}. If the UTC + # offset of this {Timestamp} is not specified, a UTC `Time` will be + # returned. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#391 + def to_time; end + + # @return [Timestamp] a UTC {Timestamp} equivalent to this instance. Returns + # `self` if {#utc? self.utc?} is `true`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#381 + def utc; end + + # @return [Boolean] `true` if this {Timestamp} represents UTC, `false` if + # the {Timestamp} wasn't specified as UTC or `nil` if the {Timestamp} has + # no specified offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#355 + def utc?; end + + # @return [Integer] the offset from UTC in seconds or `nil` if the + # {Timestamp} doesn't have a specified offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#325 + def utc_offset; end + + # @return [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds (i.e. each day is treated as if it were 86,400 + # seconds long). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#316 + def value; end + + protected + + # Constructs a new instance of a `DateTime` or `DateTime`-like class with + # the same {value}, {sub_second} and {utc_offset} as this {Timestamp}. + # + # @param klass [Class] the class to instantiate. + # @private + # + # source://tzinfo//lib/tzinfo/timestamp.rb#496 + def new_datetime(klass = T.unsafe(nil)); end + + # Creates a new instance of a `Time` or `Time`-like class matching the + # {value} and {sub_second} of this {Timestamp}, but not setting the offset. + # + # @param klass [Class] the class to instantiate. + # @private + # + # source://tzinfo//lib/tzinfo/timestamp.rb#486 + def new_time(klass = T.unsafe(nil)); end + + private + + # Initializes a new {Timestamp} without validating the parameters. This + # method is used internally within {Timestamp} to avoid the overhead of + # checking parameters. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either a + # `Rational` that is greater than or equal to 0 and less than 1, or the + # `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#538 + def initialize!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # Converts the {sub_second} value to a `String` suitable for appending to + # the `String` representation of a {Timestamp}. + # + # @return [String] a `String` representation of {sub_second}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#518 + def sub_second_to_s; end + + # Converts the value and sub-seconds to a `String`, adding on the given + # offset. + # + # @param offset [Integer] the offset to add to the value. + # @return [String] the value and sub-seconds. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#510 + def value_and_sub_second_to_s(offset = T.unsafe(nil)); end + + class << self + # Returns a new {Timestamp} representing the (proleptic Gregorian + # calendar) date and time specified by the supplied parameters. + # + # If `utc_offset` is `nil`, `:utc` or 0, the date and time parameters will + # be interpreted as representing a UTC date and time. Otherwise the date + # and time parameters will be interpreted as a local date and time with + # the given offset. + # + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number + # of seconds or the `Symbol` `:utc`). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [Timestamp] a new {Timestamp} representing the specified + # (proleptic Gregorian calendar) date and time. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#55 + def create(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # When used without a block, returns a {Timestamp} representation of a + # given `Time`, `DateTime` or {Timestamp}. + # + # When called with a block, the {Timestamp} representation of `value` is + # passed to the block. The block must then return a {Timestamp}, which + # will be converted back to the type of the initial value. If the initial + # value was a {Timestamp}, the block result will be returned. If the + # initial value was a `DateTime`, a Gregorian `DateTime` will be returned. + # + # The UTC offset of `value` can either be preserved (the {Timestamp} + # representation will have the same UTC offset as `value`), ignored (the + # {Timestamp} representation will have no defined UTC offset), or treated + # as though it were UTC (the {Timestamp} representation will have a + # {utc_offset} of 0 and {utc?} will return `true`). + # + # @param value [Object] a `Time`, `DateTime` or {Timestamp}. + # @param offset [Symbol] either `:preserve` to preserve the offset of + # `value`, `:ignore` to ignore the offset of `value` and create a + # {Timestamp} with an unspecified offset, or `:treat_as_utc` to treat + # the offset of `value` as though it were UTC and create a UTC + # {Timestamp}. + # @raise [ArgumentError] + # @return [Object] if called without a block, the {Timestamp} + # representation of `value`, otherwise the result of the block, + # converted back to the type of `value`. + # @yield [timestamp] if a block is provided, the {Timestamp} + # representation is passed to the block. + # @yieldparam timestamp [Timestamp] the {Timestamp} representation of + # `value`. + # @yieldreturn [Timestamp] a {Timestamp} to be converted back to the type + # of `value`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#112 + def for(value, offset = T.unsafe(nil)); end + + # Creates a new UTC {Timestamp}. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 + # UTC ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @raise [ArgumentError] if `value` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#172 + def utc(value, sub_second = T.unsafe(nil)); end + + private + + # Creates a {Timestamp} that represents a given `DateTime`, optionally + # ignoring the offset. + # + # @param datetime [DateTime] a `DateTime`. + # @param ignore_offset [Boolean] whether to ignore the offset of + # `datetime`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `datetime`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#231 + def for_datetime(datetime, ignore_offset, target_utc_offset); end + + # Creates a {Timestamp} that represents a given `Time`, optionally + # ignoring the offset. + # + # @param time [Time] a `Time`. + # @param ignore_offset [Boolean] whether to ignore the offset of `time`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `time`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#206 + def for_time(time, ignore_offset, target_utc_offset); end + + # Creates a {Timestamp} that represents a given `Time`-like object, + # optionally ignoring the offset (if the `time_like` responds to + # `utc_offset`). + # + # @param time_like [Object] a `Time`-like object. + # @param ignore_offset [Boolean] whether to ignore the offset of `time`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `time_like`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#296 + def for_time_like(time_like, ignore_offset, target_utc_offset); end + + # Returns a {Timestamp} that represents another {Timestamp}, optionally + # ignoring the offset. If the result would be identical to `value`, the + # same instance is returned. If the passed in value is an instance of a + # subclass of {Timestamp}, then a new {Timestamp} will always be returned. + # + # @param timestamp [Timestamp] a {Timestamp}. + # @param ignore_offset [Boolean] whether to ignore the offset of + # `timestamp`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] a [Timestamp] representation of `timestamp`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#256 + def for_timestamp(timestamp, ignore_offset, target_utc_offset); end + + # Determines if an object is like a `Time` (for the purposes of converting + # to a {Timestamp} with {for}), responding to `to_i` and `subsec`. + # + # @param value [Object] an object to test. + # @return [Boolean] `true` if the object is `Time`-like, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#283 + def is_time_like?(value); end + + # Constructs a new instance of `self` (i.e. {Timestamp} or a subclass of + # {Timestamp}) without validating the parameters. This method is used + # internally within {Timestamp} to avoid the overhead of checking + # parameters. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 + # UTC ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number + # of seconds or the `Symbol` `:utc`). + # @return [Timestamp] a new instance of `self`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#192 + def new!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + end +end + +# The Unix epoch (1970-01-01 00:00:00 UTC) as a chronological Julian day +# number. +# +# source://tzinfo//lib/tzinfo/timestamp.rb#16 +TZInfo::Timestamp::JD_EPOCH = T.let(T.unsafe(nil), Integer) + +# A subclass of {Timestamp} used to represent local times. +# {TimestampWithOffset} holds a reference to the related {TimezoneOffset} and +# overrides various methods to return results appropriate for the +# {TimezoneOffset}. Certain operations will clear the associated +# {TimezoneOffset} (if the {TimezoneOffset} would not necessarily be valid for +# the result). Once the {TimezoneOffset} has been cleared, +# {TimestampWithOffset} behaves identically to {Timestamp}. +# +# source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#12 +class TZInfo::TimestampWithOffset < ::TZInfo::Timestamp + include ::TZInfo::WithOffset + + # Sets the associated {TimezoneOffset} of this {TimestampWithOffset}. + # + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the time + # and for the offset of this {TimestampWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @raise [ArgumentError] if {utc? self.utc?} is `true`. + # @raise [ArgumentError] if `timezone_offset.observed_utc_offset` does not equal + # `self.utc_offset`. + # @return [TimestampWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#47 + def set_timezone_offset(timezone_offset); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#17 + def timezone_offset; end + + # An overridden version of {Timestamp#to_datetime}, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [DateTime] if there is an associated {TimezoneOffset}, a + # {DateTimeWithOffset} representation of this {TimestampWithOffset}, + # otherwise a `DateTime` representation. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#76 + def to_datetime; end + + # An overridden version of {Timestamp#to_time} that, if there is an + # associated {TimezoneOffset}, returns a {TimeWithOffset} with that offset. + # + # @return [Time] if there is an associated {TimezoneOffset}, a + # {TimeWithOffset} representation of this {TimestampWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#60 + def to_time; end + + class << self + # Creates a new {TimestampWithOffset} from a given {Timestamp} and + # {TimezoneOffset}. + # + # time of `timestamp`. + # + # @param timestamp [Timestamp] a {Timestamp}. + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the + # @raise [ArgumentError] if `timestamp` or `timezone_offset` is `nil`. + # @return [TimestampWithOffset] a {TimestampWithOffset} that has the same + # {value value} and {sub_second sub_second} as the `timestamp` parameter, + # a {utc_offset utc_offset} equal to the + # {TimezoneOffset#observed_utc_offset observed_utc_offset} of the + # `timezone_offset` parameter and {timezone_offset timezone_offset} set to + # the `timezone_offset` parameter. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#32 + def set_timezone_offset(timestamp, timezone_offset); end + end +end + +# The {Timezone} class represents a time zone. It provides a factory method, +# {get}, to retrieve {Timezone} instances by their identifier. +# +# The {Timezone#to_local} method can be used to convert `Time` and `DateTime` +# instances to the local time for the zone. For example: +# +# tz = TZInfo::Timezone.get('America/New_York') +# local_time = tz.to_local(Time.utc(2005,8,29,15,35,0)) +# local_datetime = tz.to_local(DateTime.new(2005,8,29,15,35,0)) +# +# Local `Time` and `DateTime` instances returned by `Timezone` have the +# correct local offset. +# +# The {Timezone#local_to_utc} method can by used to convert local `Time` and +# `DateTime` instances to UTC. {Timezone#local_to_utc} ignores the UTC offset +# of the supplied value and treats if it is a local time for the zone. For +# example: +# +# tz = TZInfo::Timezone.get('America/New_York') +# utc_time = tz.local_to_utc(Time.new(2005,8,29,11,35,0)) +# utc_datetime = tz.local_to_utc(DateTime.new(2005,8,29,11,35,0)) +# +# Each time zone is treated as sequence of periods of time ({TimezonePeriod}) +# that observe the same offset ({TimezoneOffset}). Transitions +# ({TimezoneTransition}) denote the end of one period and the start of the +# next. The {Timezone} class has methods that allow the periods, offsets and +# transitions of a time zone to be interrogated. +# +# All methods that take `Time` objects as parameters can be used with +# arbitrary `Time`-like objects that respond to both `to_i` and `subsec` and +# optionally `utc_offset`. +# +# The {Timezone} class is thread-safe. It is safe to use class and instance +# methods of {Timezone} in concurrently executing threads. Instances of +# {Timezone} can be shared across thread boundaries. +# +# The IANA Time Zone Database maintainers recommend that time zone identifiers +# are not made visible to end-users (see [Names of +# timezones](https://data.iana.org/time-zones/theory.html#naming)). The +# {Country} class can be used to obtain lists of time zones by country, +# including user-friendly descriptions and approximate locations. +# +# @abstract The {get} method returns an instance of either {DataTimezone} or +# {LinkedTimezone}. The {get_proxy} method and other methods returning +# collections of time zones return instances of {TimezoneProxy}. +# +# source://tzinfo//lib/tzinfo/timezone.rb#80 +class TZInfo::Timezone + include ::Comparable + + # Compares this {Timezone} with another based on the {identifier}. + # + # @param tz [Object] an `Object` to compare this {Timezone} with. + # @return [Integer] -1 if `tz` is less than `self`, 0 if `tz` is equal to + # `self` and +1 if `tz` is greater than `self`, or `nil` if `tz` is not an + # instance of {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1105 + def <=>(tz); end + + # Matches `regexp` against the {identifier} of this {Timezone}. + # + # @param regexp [Regexp] a `Regexp` to match against the {identifier} of + # this {Timezone}. + # @return [Integer] the position the match starts, or `nil` if there is no + # match. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1128 + def =~(regexp); end + + # Returns a serialized representation of this {Timezone}. This method is + # called when using `Marshal.dump` with an instance of {Timezone}. + # + # @param limit [Integer] the maximum depth to dump - ignored. + # @return [String] a serialized representation of this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1137 + def _dump(limit); end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the abbreviation of this {Timezone} at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1048 + def abbr(time = T.unsafe(nil)); end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the abbreviation of this {Timezone} at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1048 + def abbreviation(time = T.unsafe(nil)); end + + # Returns the base offset from UTC in seconds at the given time. This does + # not include any adjustment made for daylight savings time and will + # typically remain constant throughout the year. + # + # To obtain the observed offset from UTC, including the effect of daylight + # savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the base offset from UTC in seconds at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1081 + def base_utc_offset(time = T.unsafe(nil)); end + + # Returns the canonical identifier of this time zone. + # + # This is a shortcut for calling `canonical_zone.identifier`. Please refer + # to the {canonical_zone} documentation for further information. + # + # @return [String] the canonical identifier of this time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#987 + def canonical_identifier; end + + # Returns the canonical {Timezone} instance for this {Timezone}. + # + # The IANA Time Zone database contains two types of definition: Zones and + # Links. Zones are defined by rules that set out when transitions occur. + # Links are just references to fully defined Zone, creating an alias for + # that Zone. + # + # Links are commonly used where a time zone has been renamed in a release of + # the Time Zone database. For example, the US/Eastern Zone was renamed as + # America/New_York. A US/Eastern Link was added in its place, linking to + # (and creating an alias for) America/New_York. + # + # Links are also used for time zones that are currently identical to a full + # Zone, but that are administered separately. For example, Europe/Vatican is + # a Link to (and alias for) Europe/Rome. + # + # For a full Zone (implemented by {DataTimezone}), {canonical_zone} returns + # self. + # + # For a Link (implemented by {LinkedTimezone}), {canonical_zone} returns a + # {Timezone} instance representing the full Zone that the link targets. + # + # TZInfo can be used with different data sources (see the documentation for + # {TZInfo::DataSource}). Some DataSource implementations may not support + # distinguishing between full Zones and Links and will treat all time zones + # as full Zones. In this case, {canonical_zone} will always return `self`. + # + # There are two built-in DataSource implementations. + # {DataSources::RubyDataSource} (which will be used if the tzinfo-data gem + # is available) supports Link zones. {DataSources::ZoneinfoDataSource} + # returns Link zones as if they were full Zones. If the {canonical_zone} or + # {canonical_identifier} methods are needed, the tzinfo-data gem should be + # installed. + # + # The {TZInfo::DataSource.get} method can be used to check which DataSource + # implementation is being used. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#412 + def canonical_zone; end + + # @return [TimezonePeriod] the current {TimezonePeriod} for the time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#997 + def current_period; end + + # Returns the current local time and {TimezonePeriod} for the time zone as + # an `Array`. The first element is the time as a {TimeWithOffset}. The + # second element is the period. + # + # @return [Array] an `Array` containing the current {TimeWithOffset} for the + # time zone as the first element and the current {TimezonePeriod} for the + # time zone as the second element. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1008 + def current_period_and_time; end + + # Returns the current local time and {TimezonePeriod} for the time zone as + # an `Array`. The first element is the time as a {TimeWithOffset}. The + # second element is the period. + # + # @return [Array] an `Array` containing the current {TimeWithOffset} for the + # time zone as the first element and the current {TimezonePeriod} for the + # time zone as the second element. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1008 + def current_time_and_period; end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Boolean] whether daylight savings time is in effect at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1059 + def dst?(time = T.unsafe(nil)); end + + # @param tz [Object] an `Object` to compare this {Timezone} with. + # @return [Boolean] `true` if `tz` is an instance of {Timezone} and has the + # same {identifier} as `self`, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1113 + def eql?(tz); end + + # Returns {identifier}, modified to make it more readable. Set + # `skip_first_part` to omit the first part of the identifier (typically a + # region name) where there is more than one part. + # + # For example: + # + # TZInfo::Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" + # TZInfo::Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" + # TZInfo::Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" + # TZInfo::Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" + # + # @param skip_first_part [Boolean] whether the first part of the identifier + # (typically a region name) should be omitted. + # @return [String] the modified identifier. + # + # source://tzinfo//lib/tzinfo/timezone.rb#277 + def friendly_identifier(skip_first_part = T.unsafe(nil)); end + + # @return [Integer] a hash based on the {identifier}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1118 + def hash; end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#241 + def identifier; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#259 + def inspect; end + + # Creates a `DateTime` object based on the given (Gregorian calendar) date + # and time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate `offset` and + # {DateTimeWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_datetime(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # values, interpreted as a local time in the time zone. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [DateTimeWithOffset] a new `DateTime` object based on the given + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#831 + def local_datetime(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Creates a `Time` object based on the given (Gregorian calendar) date and + # time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate `utc_offset`, `zone` and + # {TimeWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_time(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [TimeWithOffset] a new `Time` object based on the given values, + # interpreted as a local time in the time zone. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#743 + def local_time(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Creates a {Timestamp} object based on the given (Gregorian calendar) date + # and time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate {Timestamp#utc_offset + # utc_offset} and {TimestampWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_timestamp(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [TimestampWithOffset] a new {Timestamp} object based on the given + # values, interpreted as a local time in the time zone. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#919 + def local_timestamp(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Converts a local time for the time zone to UTC. + # + # The result will either be a `Time`, `DateTime` or {Timestamp} according to + # the type of the `local_time` parameter. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # _Warning:_ There are local times that have no equivalent UTC times (for + # example, during the transition from standard time to daylight savings + # time). There are also local times that have more than one UTC equivalent + # (for example, during the transition from daylight savings time to standard + # time). + # + # In the first case (no equivalent UTC time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.period_for_local(Time.new(2004,10,31,1,30,0)) + # + # Specifying `dst = true` would select the daylight savings period from + # April to October 2004. Specifying `dst = false` would return the + # standard time period from October 2004 to April 2005. + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [PeriodNotFound] if `local_time` is not valid for the time zone + # (there is no equivalent UTC time). + # @raise [AmbiguousTime] if `local_time` was ambiguous for the time zone and + # the `dst` parameter or block did not resolve the ambiguity. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Object] the UTC equivalent of `local_time` as a `Time`, + # `DateTime` or {Timestamp}. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#645 + def local_to_utc(local_time, dst = T.unsafe(nil)); end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#247 + def name; end + + # @return [TimeWithOffset] the current local time in the time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#992 + def now; end + + # Returns the observed offset from UTC in seconds at the given time. This + # includes adjustments made for daylight savings time. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the observed offset from UTC in seconds at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1094 + def observed_utc_offset(time = T.unsafe(nil)); end + + # Returns the unique offsets used by the time zone up to a given time (`to`) + # as an `Array` of {TimezoneOffset} instances. + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only offsets used from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) offset to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) offset to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array] the offsets that are used earlier than + # `to` and, if specified, at or later than `from`. Offsets may be returned + # in any order. + # + # source://tzinfo//lib/tzinfo/timezone.rb#947 + def offsets_up_to(to, from = T.unsafe(nil)); end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#319 + def period_for(time); end + + # Returns the {TimezonePeriod} that is valid at the given local time. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). Use the {period_for} + # method instead if the the UTC offset of the time needs to be taken into + # consideration. + # + # _Warning:_ There are local times that have no equivalent UTC times (for + # example, during the transition from standard time to daylight savings + # time). There are also local times that have more than one UTC equivalent + # (for example, during the transition from daylight savings time to standard + # time). + # + # In the first case (no equivalent UTC time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.period_for_local(Time.new(2004,10,31,1,30,0)) + # + # Specifying `dst = true` would select the daylight savings period from + # April to October 2004. Specifying `dst = false` would return the + # standard time period from October 2004 to April 2005. + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [PeriodNotFound] if `local_time` is not valid for the time zone + # (there is no equivalent UTC time). + # @raise [AmbiguousTime] if `local_time` was ambiguous for the time zone and + # the `dst` parameter or block did not resolve the ambiguity. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at + # `local_time`. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#494 + def period_for_local(local_time, dst = T.unsafe(nil)); end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # The UTC offset of the `utc_time` parameter is ignored (it is treated as a + # UTC time). Use the {period_for} method instead if the UTC offset of the + # time needs to be taken into consideration. + # + # @param utc_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `utc_time` is `nil`. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `utc_time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#425 + def period_for_utc(utc_time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#342 + def periods_for_local(local_time); end + + # Converts a time to local time for the time zone and returns a `String` + # representation of the local time according to the given format. + # + # `Timezone#strftime` first expands any occurrences of `%Z` in the format + # string to the time zone abbreviation for the local time (for example, EST + # or EDT). Depending on the type of `time` parameter, the result of the + # expansion is then passed to either `Time#strftime`, `DateTime#strftime` or + # `Timestamp#strftime` to handle any other format directives. + # + # This method is equivalent to the following: + # + # time_zone.to_local(time).strftime(format) + # + # @param format [String] the format string. + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `format` or `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the formatted local time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1039 + def strftime(format, time = T.unsafe(nil)); end + + # Converts a time to the local time for the time zone. + # + # The result will be of type {TimeWithOffset} (if passed a `Time`), + # {DateTimeWithOffset} (if passed a `DateTime`) or {TimestampWithOffset} (if + # passed a {Timestamp}). {TimeWithOffset}, {DateTimeWithOffset} and + # {TimestampWithOffset} are subclasses of `Time`, `DateTime` and {Timestamp} + # that provide additional information about the local result. + # + # Unlike {utc_to_local}, {to_local} takes the UTC offset of the given time + # into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} that does not have a + # specified UTC offset. + # @return [Object] the local equivalent of `time` as a {TimeWithOffset}, + # {DateTimeWithOffset} or {TimestampWithOffset}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#548 + def to_local(time); end + + # @return [String] {identifier}, modified to make it more readable. + # + # source://tzinfo//lib/tzinfo/timezone.rb#253 + def to_s; end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/timezone.rb#370 + def transitions_up_to(to, from = T.unsafe(nil)); end + + # Returns the observed offset from UTC in seconds at the given time. This + # includes adjustments made for daylight savings time. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the observed offset from UTC in seconds at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1094 + def utc_offset(time = T.unsafe(nil)); end + + # Converts a time in UTC to the local time for the time zone. + # + # The result will be of type {TimeWithOffset} (if passed a `Time`), + # {DateTimeWithOffset} (if passed a `DateTime`) or {TimestampWithOffset} (if + # passed a {Timestamp}). {TimeWithOffset}, {DateTimeWithOffset} and + # {TimestampWithOffset} are subclasses of `Time`, `DateTime` and {Timestamp} + # that provide additional information about the local result. + # + # The UTC offset of the `utc_time` parameter is ignored (it is treated as a + # UTC time). Use the {to_local} method instead if the the UTC offset of the + # time needs to be taken into consideration. + # + # @param utc_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `utc_time` is `nil`. + # @return [Object] the local equivalent of `utc_time` as a {TimeWithOffset}, + # {DateTimeWithOffset} or {TimestampWithOffset}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#572 + def utc_to_local(utc_time); end + + private + + # Raises an {UnknownTimezone} exception. + # + # @raise [UnknownTimezone] always. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1156 + def raise_unknown_timezone; end + + class << self + # Loads a {Timezone} from the serialized representation returned by {_dump}. + # This is method is called when using `Marshal.load` or `Marshal.restore` + # to restore a serialized {Timezone}. + # + # @param data [String] a serialized representation of a {Timezone}. + # @return [Timezone] the result of converting `data` back into a {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1147 + def _load(data); end + + # Returns an `Array` of all the available time zones. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array] all available time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#151 + def all; end + + # Returns an `Array` of the identifiers of all the time zones that are + # observed by at least one {Country}. This is not the complete set of time + # zone identifiers as some are not country specific (e.g. `'Etc/GMT'`). + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # zones that are observed by at least one {Country}. + # + # @return [Array] an `Array` of the identifiers of all the time + # + # source://tzinfo//lib/tzinfo/timezone.rb#219 + def all_country_zone_identifiers; end + + # Returns an `Array` of all the time zones that are observed by at least + # one {Country}. This is not the complete set of time zones as some are + # not country specific (e.g. `'Etc/GMT'`). + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array] an `Array` of all the time zones that are + # observed by at least one {Country}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#206 + def all_country_zones; end + + # time zones that are defined by offsets and transitions. + # + # @return [Array] an `Array` of the identifiers of all available + # + # source://tzinfo//lib/tzinfo/timezone.rb#175 + def all_data_zone_identifiers; end + + # Returns an `Array` of all the available time zones that are + # defined by offsets and transitions. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array] an `Array` of all the available time zones + # that are defined by offsets and transitions. + # + # source://tzinfo//lib/tzinfo/timezone.rb#169 + def all_data_zones; end + + # @return [Array] an `Array` containing the identifiers of all the + # available time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#157 + def all_identifiers; end + + # time zones that are defined as links to / aliases for other time zones. + # + # @return [Array] an `Array` of the identifiers of all available + # + # source://tzinfo//lib/tzinfo/timezone.rb#193 + def all_linked_zone_identifiers; end + + # Returns an `Array` of all the available time zones that are + # defined as links to / aliases for other time zones. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array] an `Array` of all the available time zones + # that are defined as links to / aliases for other time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#187 + def all_linked_zones; end + + # Returns the default value of the optional `dst` parameter of the + # {local_time}, {local_datetime} and {local_timestamp}, {local_to_utc} + # and {period_for_local} methods (`nil`, `true` or `false`). + # + # {default_dst} defaults to `nil` unless changed with {default_dst=}. + # + # @return [Boolean] the default value of the optional `dst` parameter of + # the {local_time}, {local_datetime} and {local_timestamp}, + # {local_to_utc} and {period_for_local} methods (`nil`, `true` or + # `false`). + # + # source://tzinfo//lib/tzinfo/timezone.rb#110 + def default_dst; end + + # Sets the default value of the optional `dst` parameter of the + # {local_datetime}, {local_time}, {local_timestamp}, {local_to_utc} and + # {period_for_local} methods. Can be set to `nil`, `true` or `false`. + # + # @param value [Boolean] `nil`, `true` or `false`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#96 + def default_dst=(value); end + + # Returns a time zone by its IANA Time Zone Database identifier (e.g. + # `"Europe/London"` or `"America/Chicago"`). Call {all_identifiers} for a + # list of all the valid identifiers. + # + # The {get} method will return a subclass of {Timezone}, either a + # {DataTimezone} (for a time zone defined by rules that set out when + # transitions occur) or a {LinkedTimezone} (for a time zone that is just a + # link to or alias for a another time zone). + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @raise [InvalidTimezoneIdentifier] if the `identifier` is not valid. + # @return [Timezone] the {Timezone} with the given `identifier`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#127 + def get(identifier); end + + # Returns a proxy for the time zone with the given identifier. This allows + # loading of the time zone data to be deferred until it is first needed. + # + # The identifier will not be validated. If an invalid identifier is + # specified, no exception will be raised until the proxy is used. + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @return [TimezoneProxy] a proxy for the time zone with the given + # `identifier`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#141 + def get_proxy(identifier); end + + private + + # @return [DataSource] the current DataSource. + # + # source://tzinfo//lib/tzinfo/timezone.rb#234 + def data_source; end + + # @param identifiers [Enumerable] an `Enumerable` of time zone + # identifiers. + # @return [Array] an `Array` of {TimezoneProxy} + # instances corresponding to the given identifiers. + # + # source://tzinfo//lib/tzinfo/timezone.rb#229 + def get_proxies(identifiers); end + end +end + +# Alias used by TZInfo::Data format1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#37 +TZInfo::TimezoneDefinition = TZInfo::Format1::TimezoneDefinition + +# Alias used by TZInfo::Data format 1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#75 +TZInfo::TimezoneIndexDefinition = TZInfo::Format1::TimezoneIndexDefinition + +# Represents an offset from UTC observed by a time zone. +# +# source://tzinfo//lib/tzinfo/timezone_offset.rb#6 +class TZInfo::TimezoneOffset + # Initializes a new {TimezoneOffset}. + # + # {TimezoneOffset} instances should not normally be constructed manually. + # + # The passed in `abbreviation` instance will be frozen. + # + # @param base_utc_offset [Integer] the base offset from UTC in seconds. + # @param std_offset [Integer] the offset from standard time in seconds. + # @param abbreviation [String] the abbreviation identifying the offset. + # @return [TimezoneOffset] a new instance of TimezoneOffset + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#62 + def initialize(base_utc_offset, std_offset, abbreviation); end + + # Determines if this {TimezoneOffset} is equal to another instance. + # + # @param toi [Object] the instance to test for equality. + # @return [Boolean] `true` if `toi` is a {TimezoneOffset} with the same + # {utc_offset}, {std_offset} and {abbreviation} as this {TimezoneOffset}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#84 + def ==(toi); end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#50 + def abbr; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#50 + def abbreviation; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#21 + def base_utc_offset; end + + # Determines if daylight savings is in effect (i.e. if {std_offset} is + # non-zero). + # + # @return [Boolean] `true` if {std_offset} is non-zero, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#74 + def dst?; end + + # Determines if this {TimezoneOffset} is equal to another instance. + # + # @param toi [Object] the instance to test for equality. + # @return [Boolean] `true` if `toi` is a {TimezoneOffset} with the same + # {utc_offset}, {std_offset} and {abbreviation} as this {TimezoneOffset}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#95 + def eql?(toi); end + + # @return [Integer] a hash based on {utc_offset}, {std_offset} and + # {abbreviation}. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#101 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#107 + def inspect; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#43 + def observed_utc_offset; end + + # Returns the offset from the time zone's standard time in seconds + # (`observed_utc_offset - base_utc_offset`). Zero when daylight savings time + # is not in effect. Non-zero (usually 3600 = 1 hour) if daylight savings is + # being observed. + # + # If you require accurate {std_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of {std_offset} + # has to be derived from changes to the observed UTC offset and DST status + # since it is not included in zoneinfo files. + # + # @return [Integer] the offset from the time zone's standard time in + # seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#37 + def std_offset; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#21 + def utc_offset; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#43 + def utc_total_offset; end +end + +# {TimezonePeriod} represents a period of time for a time zone where the same +# offset from UTC applies. It provides access to the observed offset, time +# zone abbreviation, start time and end time. +# +# The period of time can be unbounded at the start, end, or both the start +# and end. +# +# @abstract Time zone period data will returned as an instance of one of the +# subclasses of {TimezonePeriod}. +# +# source://tzinfo//lib/tzinfo/timezone_period.rb#14 +class TZInfo::TimezonePeriod + # Initializes a {TimezonePeriod}. + # + # @param offset [TimezoneOffset] the offset that is observed for the period + # of time. + # @raise [ArgumentError] if `offset` is `nil`. + # @return [TimezonePeriod] a new instance of TimezonePeriod + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#23 + def initialize(offset); end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def abbr; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def abbreviation; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#54 + def base_utc_offset; end + + # Determines if daylight savings is in effect (i.e. if {std_offset} is + # non-zero). + # + # @return [Boolean] `true` if {std_offset} is non-zero, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#99 + def dst?; end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod} (`nil` if the end is unbounded). + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#36 + def end_transition; end + + # Returns the UTC end time of the period or `nil` if the end of the period + # is unbounded. + # + # The result is returned as a {Timestamp}. To obtain the end time as a + # `Time` or `DateTime`, call either {Timestamp#to_time to_time} or + # {Timestamp#to_datetime to_datetime} on the result. + # + # @return [Timestamp] the UTC end time of the period or `nil` if the end of + # the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#125 + def ends_at; end + + # Returns the local end time of the period or `nil` if the end of the period + # is unbounded. + # + # The result is returned as a {TimestampWithOffset}. To obtain the end time + # as a `Time` or `DateTime`, call either {TimestampWithOffset#to_time + # to_time} or {TimestampWithOffset#to_datetime to_datetime} on the result. + # + # @return [TimestampWithOffset] the local end time of the period or `nil` if + # the end of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#151 + def local_ends_at; end + + # Returns the local start time of the period or `nil` if the start of the + # period is unbounded. + # + # The result is returned as a {TimestampWithOffset}. To obtain the start + # time as a `Time` or `DateTime`, call either {TimestampWithOffset#to_time + # to_time} or {TimestampWithOffset#to_datetime to_datetime} on the result. + # + # @return [TimestampWithOffset] the local start time of the period or `nil` + # if the start of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#138 + def local_starts_at; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#90 + def observed_utc_offset; end + + # @return [TimezoneOffset] the offset that applies in the period of time. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#16 + def offset; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod} (`nil` if the start is unbounded). + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#30 + def start_transition; end + + # Returns the UTC start time of the period or `nil` if the start of the + # period is unbounded. + # + # The result is returned as a {Timestamp}. To obtain the start time as a + # `Time` or `DateTime`, call either {Timestamp#to_time to_time} or + # {Timestamp#to_datetime to_datetime} on the result. + # + # @return [Timestamp] the UTC start time of the period or `nil` if the start + # of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#112 + def starts_at; end + + # Returns the offset from the time zone's standard time in seconds + # (`observed_utc_offset - base_utc_offset`). Zero when daylight savings time + # is not in effect. Non-zero (usually 3600 = 1 hour) if daylight savings is + # being observed. + # + # If you require accurate {std_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of {std_offset} + # has to be derived from changes to the observed UTC offset and DST status + # since it is not included in zoneinfo files. + # + # @return [Integer] the offset from the time zone's standard time in + # seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#72 + def std_offset; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#54 + def utc_offset; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#90 + def utc_total_offset; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def zone_identifier; end + + private + + # Raises a {NotImplementedError} to indicate that subclasses should override + # a method. + # + # @raise [NotImplementedError] always. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#161 + def raise_not_implemented(method_name); end + + # @param transition [TimezoneTransition] a transition or `nil`. + # @return [Timestamp] the {Timestamp} representing when a transition occurs, + # or `nil` if `transition` is `nil`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#168 + def timestamp(transition); end + + # @param transition [TimezoneTransition] a transition or `nil`. + # @return [TimestampWithOffset] a {Timestamp} representing when a transition + # occurs with offset set to {#offset}, or `nil` if `transition` is `nil`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#175 + def timestamp_with_offset(transition); end +end + +# A proxy class standing in for a {Timezone} with a given identifier. +# {TimezoneProxy} inherits from {Timezone} and can be treated identically to +# {Timezone} instances loaded with {Timezone.get}. +# +# {TimezoneProxy} instances are used to avoid the performance overhead of +# loading time zone data into memory, for example, by {Timezone.all}. +# +# The first time an attempt is made to access the data for the time zone, the +# real {Timezone} will be loaded is loaded. If the proxy's identifier was not +# valid, then an exception will be raised at this point. +# +# source://tzinfo//lib/tzinfo/timezone_proxy.rb#15 +class TZInfo::TimezoneProxy < ::TZInfo::Timezone + # Initializes a new {TimezoneProxy}. + # + # The `identifier` parameter is not checked when initializing the proxy. It + # will be validated when the real {Timezone} instance is loaded. + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @return [TimezoneProxy] a new instance of TimezoneProxy + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#23 + def initialize(identifier); end + + # Returns a serialized representation of this {TimezoneProxy}. This method + # is called when using `Marshal.dump` with an instance of {TimezoneProxy}. + # + # @param limit [Integer] the maximum depth to dump - ignored. @return + # [String] a serialized representation of this {TimezoneProxy}. + # @return [String] a serialized representation of this {TimezoneProxy}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#60 + def _dump(limit); end + + # Returns the canonical {Timezone} instance for this {Timezone}. + # + # The IANA Time Zone database contains two types of definition: Zones and + # Links. Zones are defined by rules that set out when transitions occur. + # Links are just references to fully defined Zone, creating an alias for + # that Zone. + # + # Links are commonly used where a time zone has been renamed in a release of + # the Time Zone database. For example, the US/Eastern Zone was renamed as + # America/New_York. A US/Eastern Link was added in its place, linking to + # (and creating an alias for) America/New_York. + # + # Links are also used for time zones that are currently identical to a full + # Zone, but that are administered separately. For example, Europe/Vatican is + # a Link to (and alias for) Europe/Rome. + # + # For a full Zone (implemented by {DataTimezone}), {canonical_zone} returns + # self. + # + # For a Link (implemented by {LinkedTimezone}), {canonical_zone} returns a + # {Timezone} instance representing the full Zone that the link targets. + # + # TZInfo can be used with different data sources (see the documentation for + # {TZInfo::DataSource}). Some DataSource implementations may not support + # distinguishing between full Zones and Links and will treat all time zones + # as full Zones. In this case, {canonical_zone} will always return `self`. + # + # There are two built-in DataSource implementations. + # {DataSources::RubyDataSource} (which will be used if the tzinfo-data gem + # is available) supports Link zones. {DataSources::ZoneinfoDataSource} + # returns Link zones as if they were full Zones. If the {canonical_zone} or + # {canonical_identifier} methods are needed, the tzinfo-data gem should be + # installed. + # + # The {TZInfo::DataSource.get} method can be used to check which DataSource + # implementation is being used. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#50 + def canonical_zone; end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#30 + def identifier; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#35 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#40 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#45 + def transitions_up_to(to, from = T.unsafe(nil)); end + + private + + # Returns the real {Timezone} instance being proxied. + # + # The real {Timezone} is loaded using {Timezone.get} on the first access. + # + # @return [Timezone] the real {Timezone} instance being proxied. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#82 + def real_timezone; end + + class << self + # Loads a {TimezoneProxy} from the serialized representation returned by + # {_dump}. This is method is called when using `Marshal.load` or + # `Marshal.restore` to restore a serialized {Timezone}. + # + # @param data [String] a serialized representation of a {TimezoneProxy}. + # @return [TimezoneProxy] the result of converting `data` back into a + # {TimezoneProxy}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#71 + def _load(data); end + end +end + +# Represents a transition from one observed UTC offset ({TimezoneOffset} to +# another for a time zone. +# +# source://tzinfo//lib/tzinfo/timezone_transition.rb#7 +class TZInfo::TimezoneTransition + # Initializes a new {TimezoneTransition}. + # + # {TimezoneTransition} instances should not normally be constructed + # manually. + # + # @param offset [TimezoneOffset] the offset the transition changes to. + # @param previous_offset [TimezoneOffset] the offset the transition changes + # from. + # @param timestamp_value [Integer] when the transition occurs as a + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds + # (i.e. each day is treated as if it were 86,400 seconds long). + # @return [TimezoneTransition] a new instance of TimezoneTransition + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#34 + def initialize(offset, previous_offset, timestamp_value); end + + # Determines if this {TimezoneTransition} is equal to another instance. + # + # @param tti [Object] the instance to test for equality. + # @return [Boolean] `true` if `tti` is a {TimezoneTransition} with the same + # {offset}, {previous_offset} and {timestamp_value} as this + # {TimezoneTransition}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#86 + def ==(tti); end + + # Returns a {Timestamp} instance representing the UTC time when this + # transition occurs. + # + # To obtain the result as a `Time` or `DateTime`, call either + # {Timestamp#to_time to_time} or {Timestamp#to_datetime to_datetime} on the + # {Timestamp} instance that is returned. + # + # @return [Timestamp] the UTC time when this transition occurs. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#48 + def at; end + + # Determines if this {TimezoneTransition} is equal to another instance. + # + # @param tti [Object] the instance to test for equality. + # @return [Boolean] `true` if `tti` is a {TimezoneTransition} with the same + # {offset}, {previous_offset} and {timestamp_value} as this + # {TimezoneTransition}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#86 + def eql?(tti); end + + # @return [Integer] a hash based on {offset}, {previous_offset} and + # {timestamp_value}. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#94 + def hash; end + + # Returns a {TimestampWithOffset} instance representing the local time when + # this transition causes the previous observance to end (calculated from + # {at} using {previous_offset}). + # + # To obtain the result as a `Time` or `DateTime`, call either + # {TimestampWithOffset#to_time to_time} or {TimestampWithOffset#to_datetime + # to_datetime} on the {TimestampWithOffset} instance that is returned. + # + # @return [TimestampWithOffset] the local time when this transition causes + # the previous observance to end. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#62 + def local_end_at; end + + # Returns a {TimestampWithOffset} instance representing the local time when + # this transition causes the next observance to start (calculated from {at} + # using {offset}). + # + # To obtain the result as a `Time` or `DateTime`, call either + # {TimestampWithOffset#to_time to_time} or {TimestampWithOffset#to_datetime + # to_datetime} on the {TimestampWithOffset} instance that is returned. + # + # @return [TimestampWithOffset] the local time when this transition causes + # the next observance to start. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#76 + def local_start_at; end + + # @return [TimezoneOffset] the offset this transition changes to. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#9 + def offset; end + + # @return [TimezoneOffset] the offset this transition changes from. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#12 + def previous_offset; end + + # When this transition occurs as an `Integer` number of seconds since + # 1970-01-01 00:00:00 UTC ignoring leap seconds (i.e. each day is treated as + # if it were 86,400 seconds long). Equivalent to the result of calling the + # {Timestamp#value value} method on the {Timestamp} returned by {at}. + # + # @return [Integer] when this transition occurs as a number of seconds since + # 1970-01-01 00:00:00 UTC ignoring leap seconds. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#21 + def timestamp_value; end +end + +# Base class for rules definining the transition between standard and daylight +# savings time. +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#10 +class TZInfo::TransitionRule + # Initializes a new {TransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @return [TransitionRule] a new instance of TransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#25 + def initialize(transition_at); end + + # Determines if this {TransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {TransitionRule} with the same + # {transition_at} as this {TransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#47 + def ==(r); end + + # Calculates the time of the transition from a given offset on a given year. + # + # @param offset [TimezoneOffset] the current offset at the time the rule + # will transition. + # @param year [Integer] the year in which the transition occurs (local + # time). + # @return [TimestampWithOffset] the time at which the transition occurs. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#37 + def at(offset, year); end + + # Determines if this {TransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {TransitionRule} with the same + # {transition_at} as this {TransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#47 + def eql?(r); end + + # @return [Integer] a hash based on {hash_args} (defaulting to + # {transition_at}). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#54 + def hash; end + + # Returns the number of seconds after midnight local time on the day + # identified by the rule at which the transition occurs. Can be negative to + # denote a time on the prior day. Can be greater than or equal to 86,400 to + # denote a time of the following day. + # + # @return [Integer] the time in seconds after midnight local time at which + # the transition occurs. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#18 + def transition_at; end + + protected + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#62 + def hash_args; end +end + +# Represents a period of time in a time zone where the same offset from UTC +# applies. The period of time is bounded at at least one end, either having a +# start transition, end transition or both start and end transitions. +# +# source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#8 +class TZInfo::TransitionsTimezonePeriod < ::TZInfo::TimezonePeriod + # Initializes a {TransitionsTimezonePeriod}. + # + # At least one of `start_transition` and `end_transition` must be specified. + # + # @param start_transition [TimezoneTransition] the transition that defines + # the start of the period, or `nil` if the start is unbounded. + # @param end_transition [TimezoneTransition] the transition that defines the + # end of the period, or `nil` if the end is unbounded. + # @raise [ArgumentError] if both `start_transition` and `end_transition` are + # `nil`. + # @return [TransitionsTimezonePeriod] a new instance of TransitionsTimezonePeriod + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#27 + def initialize(start_transition, end_transition); end + + # Determines if this {TransitionsTimezonePeriod} is equal to another + # instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {TransitionsTimezonePeriod} with the + # same {offset}, {start_transition} and {end_transition}, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#47 + def ==(p); end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod} (`nil` if the end is unbounded). + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#15 + def end_transition; end + + # Determines if this {TransitionsTimezonePeriod} is equal to another + # instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {TransitionsTimezonePeriod} with the + # same {offset}, {start_transition} and {end_transition}, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#47 + def eql?(p); end + + # @return [Integer] a hash based on {start_transition} and {end_transition}. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#53 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#59 + def inspect; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod} (`nil` if the start is unbounded). + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#11 + def start_transition; end +end + +# An implementation of {StringDeduper} using the `String#-@` method where +# that method performs deduplication (Ruby 2.5 and later). +# +# Note that this is slightly different to the plain {StringDeduper} +# implementation. In this implementation, frozen literal strings are already +# in the pool and are candidates for being returned, even when passed +# another equal frozen non-literal string. {StringDeduper} will always +# return frozen strings. +# +# There are also differences in encoding handling. This implementation will +# treat strings with different encodings as different strings. +# {StringDeduper} will treat strings with the compatible encodings as the +# same string. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#90 +class TZInfo::UnaryMinusGlobalStringDeduper + # @param string [String] the string to deduplicate. + # @return [bool] `string` if it is frozen, otherwise a frozen, possibly + # pre-existing copy of `string`. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#94 + def dedupe(string); end +end + +# {UnknownTimezone} is raised when calling methods on an instance of +# {Timezone} that was created directly. To obtain {Timezone} instances the +# {Timezone.get} method should be used instead. +# +# source://tzinfo//lib/tzinfo/timezone.rb#32 +class TZInfo::UnknownTimezone < ::StandardError; end + +# The TZInfo version number. +# +# source://tzinfo//lib/tzinfo/version.rb#6 +TZInfo::VERSION = T.let(T.unsafe(nil), String) + +# The {WithOffset} module is included in {TimeWithOffset}, +# {DateTimeWithOffset} and {TimestampWithOffset}. It provides an override for +# the {strftime} method that handles expanding the `%Z` directive according to +# the {TimezoneOffset#abbreviation abbreviation} of the {TimezoneOffset} +# associated with a local time. +# +# source://tzinfo//lib/tzinfo/with_offset.rb#10 +module TZInfo::WithOffset + # Overrides the `Time`, `DateTime` or {Timestamp} version of `strftime`, + # replacing `%Z` with the {TimezoneOffset#abbreviation abbreviation} of the + # associated {TimezoneOffset}. If there is no associated offset, `%Z` is + # expanded by the base class instead. + # + # All the format directives handled by the base class are supported. + # + # @param format [String] the format string. + # @raise [ArgumentError] if `format` is `nil`. + # @return [String] the formatted time. + # + # source://tzinfo//lib/tzinfo/with_offset.rb#21 + def strftime(format); end + + protected + + # Performs a calculation if there is an associated {TimezoneOffset}. + # + # @param result [Object] a result value that can be manipulated by the block + # if there is an associated {TimezoneOffset}. + # @private + # @return [Object] the result of the block if there is an associated + # {TimezoneOffset}, otherwise the `result` parameter. + # @yield [period, result] if there is an associated {TimezoneOffset}, the + # block is yielded to in order to calculate the method result. + # @yieldparam period [TimezoneOffset] the associated {TimezoneOffset}. + # @yieldparam result [Object] the `result` parameter. + # @yieldreturn [Object] the result of the calculation performed if there is + # an associated {TimezoneOffset}. + # + # source://tzinfo//lib/tzinfo/with_offset.rb#56 + def if_timezone_offset(result = T.unsafe(nil)); end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi new file mode 100644 index 0000000..2aaad23 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi @@ -0,0 +1,66 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-display_width` gem. +# Please instead update this file by running `bin/tapioca gem unicode-display_width`. + + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 +module Unicode; end + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 +class Unicode::DisplayWidth + # @return [DisplayWidth] a new instance of DisplayWidth + # + # source://unicode-display_width//lib/unicode/display_width.rb#104 + def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#110 + def get_config(**kwargs); end + + # source://unicode-display_width//lib/unicode/display_width.rb#118 + def of(string, **kwargs); end + + class << self + # source://unicode-display_width//lib/unicode/display_width/index.rb#14 + def decompress_index(index, level); end + + # source://unicode-display_width//lib/unicode/display_width.rb#86 + def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#12 + def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end + + # Same as .width_no_overwrite - but with applying overwrites for each char + # + # source://unicode-display_width//lib/unicode/display_width.rb#57 + def width_all_features(string, ambiguous, overwrite, options); end + + # source://unicode-display_width//lib/unicode/display_width.rb#30 + def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end + end +end + +# source://unicode-display_width//lib/unicode/display_width.rb#9 +Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 +Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#10 +Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/index.rb#11 +Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 +Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#8 +Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 +Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 +Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/unparser@0.6.15.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/unparser@0.6.15.rbi new file mode 100644 index 0000000..96b1212 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/unparser@0.6.15.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unparser` gem. +# Please instead update this file by running `bin/tapioca gem unparser`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/uri@0.13.1.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/uri@0.13.1.rbi new file mode 100644 index 0000000..48a67e6 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/uri@0.13.1.rbi @@ -0,0 +1,2432 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `uri` gem. +# Please instead update this file by running `bin/tapioca gem uri`. + + +# module URI +# +# source://uri//lib/uri/common.rb#831 +module Kernel + private + + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri//lib/uri/common.rb#844 + def URI(uri); end + + class << self + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri//lib/uri/common.rb#844 + def URI(uri); end + end +end + +# source://uri//lib/uri.rb#90 +module URI + include ::URI::RFC2396_REGEXP + + class << self + # Like URI.decode_www_form_component, except that '+' is preserved. + # + # source://uri//lib/uri/common.rb#381 + def decode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns name/value pairs derived from the given string +str+, + # which must be an ASCII string. + # + # The method may be used to decode the body of Net::HTTPResponse object +res+ + # for which res['Content-Type'] is 'application/x-www-form-urlencoded'. + # + # The returned data is an array of 2-element subarrays; + # each subarray is a name/value pair (both are strings). + # Each returned string has encoding +enc+, + # and has had invalid characters removed via + # {String#scrub}[https://docs.ruby-lang.org/en/master/String.html#method-i-scrub]. + # + # A simple example: + # + # URI.decode_www_form('foo=0&bar=1&baz') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # The returned strings have certain conversions, + # similar to those performed in URI.decode_www_form_component: + # + # URI.decode_www_form('f%23o=%2F&b-r=%24&b+z=%40') + # # => [["f#o", "/"], ["b-r", "$"], ["b z", "@"]] + # + # The given string may contain consecutive separators: + # + # URI.decode_www_form('foo=0&&bar=1&&baz=2') + # # => [["foo", "0"], ["", ""], ["bar", "1"], ["", ""], ["baz", "2"]] + # + # A different separator may be specified: + # + # URI.decode_www_form('foo=0--bar=1--baz', separator: '--') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # @raise [ArgumentError] + # + # source://uri//lib/uri/common.rb#556 + def decode_www_form(str, enc = T.unsafe(nil), separator: T.unsafe(nil), use__charset_: T.unsafe(nil), isindex: T.unsafe(nil)); end + + # Returns a string decoded from the given \URL-encoded string +str+. + # + # The given string is first encoded as Encoding::ASCII-8BIT (using String#b), + # then decoded (as below), and finally force-encoded to the given encoding +enc+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.decode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character '+' to character ' '. + # - Each "percent notation" to an ASCII character. + # + # Example: + # + # URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A') + # # => "Here are some punctuation characters: ,;?:" + # + # Related: URI.decode_uri_component (preserves '+'). + # + # source://uri//lib/uri/common.rb#370 + def decode_www_form_component(str, enc = T.unsafe(nil)); end + + # Like URI.encode_www_form_component, except that ' ' (space) + # is encoded as '%20' (instead of '+'). + # + # source://uri//lib/uri/common.rb#376 + def encode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given + # {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html#module-Enumerable-label-Enumerable+in+Ruby+Classes] + # +enum+. + # + # The result is suitable for use as form data + # for an \HTTP request whose Content-Type is + # 'application/x-www-form-urlencoded'. + # + # The returned string consists of the elements of +enum+, + # each converted to one or more URL-encoded strings, + # and all joined with character '&'. + # + # Simple examples: + # + # URI.encode_www_form([['foo', 0], ['bar', 1], ['baz', 2]]) + # # => "foo=0&bar=1&baz=2" + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The returned string is formed using method URI.encode_www_form_component, + # which converts certain characters: + # + # URI.encode_www_form('f#o': '/', 'b-r': '$', 'b z': '@') + # # => "f%23o=%2F&b-r=%24&b+z=%40" + # + # When +enum+ is Array-like, each element +ele+ is converted to a field: + # + # - If +ele+ is an array of two or more elements, + # the field is formed from its first two elements + # (and any additional elements are ignored): + # + # name = URI.encode_www_form_component(ele[0], enc) + # value = URI.encode_www_form_component(ele[1], enc) + # "#{name}=#{value}" + # + # Examples: + # + # URI.encode_www_form([%w[foo bar], %w[baz bat bah]]) + # # => "foo=bar&baz=bat" + # URI.encode_www_form([['foo', 0], ['bar', :baz, 'bat']]) + # # => "foo=0&bar=baz" + # + # - If +ele+ is an array of one element, + # the field is formed from ele[0]: + # + # URI.encode_www_form_component(ele[0]) + # + # Example: + # + # URI.encode_www_form([['foo'], [:bar], [0]]) + # # => "foo&bar&0" + # + # - Otherwise the field is formed from +ele+: + # + # URI.encode_www_form_component(ele) + # + # Example: + # + # URI.encode_www_form(['foo', :bar, 0]) + # # => "foo&bar&0" + # + # The elements of an Array-like +enum+ may be mixture: + # + # URI.encode_www_form([['foo', 0], ['bar', 1, 2], ['baz'], :bat]) + # # => "foo=0&bar=1&baz&bat" + # + # When +enum+ is Hash-like, + # each +key+/+value+ pair is converted to one or more fields: + # + # - If +value+ is + # {Array-convertible}[https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html#label-Array-Convertible+Objects], + # each element +ele+ in +value+ is paired with +key+ to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(ele, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: [:bar, 1], baz: [:bat, :bam, 2]}) + # # => "foo=bar&foo=1&baz=bat&baz=bam&baz=2" + # + # - Otherwise, +key+ and +value+ are paired to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(value, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The elements of a Hash-like +enum+ may be mixture: + # + # URI.encode_www_form({foo: [0, 1], bar: 2}) + # # => "foo=0&foo=1&bar=2" + # + # source://uri//lib/uri/common.rb#503 + def encode_www_form(enum, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given string +str+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.encode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character ' ' to character '+'. + # - Any other character to "percent notation"; + # the percent notation for character c is '%%%X' % c.ord. + # + # Example: + # + # URI.encode_www_form_component('Here are some punctuation characters: ,;?:') + # # => "Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A" + # + # Encoding: + # + # - If +str+ has encoding Encoding::ASCII_8BIT, argument +enc+ is ignored. + # - Otherwise +str+ is converted first to Encoding::UTF_8 + # (with suitable character replacements), + # and then to encoding +enc+. + # + # In either case, the returned string has forced encoding Encoding::US_ASCII. + # + # Related: URI.encode_uri_component (encodes ' ' as '%20'). + # + # source://uri//lib/uri/common.rb#337 + def encode_www_form_component(str, enc = T.unsafe(nil)); end + + # == Synopsis + # + # URI::extract(str[, schemes][,&blk]) + # + # == Args + # + # +str+:: + # String to extract URIs from. + # +schemes+:: + # Limit URI matching to specific schemes. + # + # == Description + # + # Extracts URIs from a string. If block given, iterates through all matched URIs. + # Returns nil if block given or array with matches. + # + # == Usage + # + # require "uri" + # + # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") + # # => ["http://foo.example.com/bla", "mailto:test@example.com"] + # + # source://uri//lib/uri/common.rb#241 + def extract(str, schemes = T.unsafe(nil), &block); end + + # Returns a new object constructed from the given +scheme+, +arguments+, + # and +default+: + # + # - The new object is an instance of URI.scheme_list[scheme.upcase]. + # - The object is initialized by calling the class initializer + # using +scheme+ and +arguments+. + # See URI::Generic.new. + # + # Examples: + # + # values = ['john.doe', 'www.example.com', '123', nil, '/forum/questions/', nil, 'tag=networking&order=newest', 'top'] + # URI.for('https', *values) + # # => # + # URI.for('foo', *values, default: URI::HTTP) + # # => # + # + # source://uri//lib/uri/common.rb#125 + def for(scheme, *arguments, default: T.unsafe(nil)); end + + # return encoding or nil + # http://encoding.spec.whatwg.org/#concept-encoding-get + # + # source://uri//lib/uri/common.rb#826 + def get_encoding(label); end + + # Merges the given URI strings +str+ + # per {RFC 2396}[https://www.rfc-editor.org/rfc/rfc2396.html]. + # + # Each string in +str+ is converted to an + # {RFC3986 URI}[https://www.rfc-editor.org/rfc/rfc3986.html] before being merged. + # + # Examples: + # + # URI.join("http://example.com/","main.rbx") + # # => # + # + # URI.join('http://example.com', 'foo') + # # => # + # + # URI.join('http://example.com', '/foo', '/bar') + # # => # + # + # URI.join('http://example.com', '/foo', 'bar') + # # => # + # + # URI.join('http://example.com', '/foo/', 'bar') + # # => # + # + # source://uri//lib/uri/common.rb#213 + def join(*str); end + + # Returns a new \URI object constructed from the given string +uri+: + # + # URI.parse('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # + # It's recommended to first ::escape string +uri+ + # if it may contain invalid URI characters. + # + # source://uri//lib/uri/common.rb#186 + def parse(uri); end + + # == Synopsis + # + # URI::regexp([match_schemes]) + # + # == Args + # + # +match_schemes+:: + # Array of schemes. If given, resulting regexp matches to URIs + # whose scheme is one of the match_schemes. + # + # == Description + # + # Returns a Regexp object which matches to URI-like strings. + # The Regexp object returned by this method includes arbitrary + # number of capture group (parentheses). Never rely on its number. + # + # == Usage + # + # require 'uri' + # + # # extract first URI from html_string + # html_string.slice(URI.regexp) + # + # # remove ftp URIs + # html_string.sub(URI.regexp(['ftp']), '') + # + # # You should not rely on the number of parentheses + # html_string.scan(URI.regexp) do |*matches| + # p $& + # end + # + # source://uri//lib/uri/common.rb#278 + def regexp(schemes = T.unsafe(nil)); end + + # Registers the given +klass+ as the class to be instantiated + # when parsing a \URI with the given +scheme+: + # + # URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic + # URI.scheme_list['MS_SEARCH'] # => URI::Generic + # + # Note that after calling String#upcase on +scheme+, it must be a valid + # constant name. + # + # source://uri//lib/uri/common.rb#81 + def register_scheme(scheme, klass); end + + # Returns a hash of the defined schemes: + # + # URI.scheme_list + # # => + # {"MAILTO"=>URI::MailTo, + # "LDAPS"=>URI::LDAPS, + # "WS"=>URI::WS, + # "HTTP"=>URI::HTTP, + # "HTTPS"=>URI::HTTPS, + # "LDAP"=>URI::LDAP, + # "FILE"=>URI::File, + # "FTP"=>URI::FTP} + # + # Related: URI.register_scheme. + # + # source://uri//lib/uri/common.rb#99 + def scheme_list; end + + # Returns a 9-element array representing the parts of the \URI + # formed from the string +uri+; + # each array element is a string or +nil+: + # + # names = %w[scheme userinfo host port registry path opaque query fragment] + # values = URI.split('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # names.zip(values) + # # => + # [["scheme", "https"], + # ["userinfo", "john.doe"], + # ["host", "www.example.com"], + # ["port", "123"], + # ["registry", nil], + # ["path", "/forum/questions/"], + # ["opaque", nil], + # ["query", "tag=networking&order=newest"], + # ["fragment", "top"]] + # + # source://uri//lib/uri/common.rb#172 + def split(uri); end + + private + + # @raise [ArgumentError] + # + # source://uri//lib/uri/common.rb#399 + def _decode_uri_component(regexp, str, enc); end + + # source://uri//lib/uri/common.rb#385 + def _encode_uri_component(regexp, table, str, enc); end + end +end + +# FTP URI syntax is defined by RFC1738 section 3.2. +# +# This class will be redesigned because of difference of implementations; +# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it +# is a good summary about the de facto spec. +# http://tools.ietf.org/html/draft-hoffman-ftp-uri-04 +# +# source://uri//lib/uri/ftp.rb#22 +class URI::FTP < ::URI::Generic + # == Description + # + # Creates a new URI::FTP object from generic URL components with no + # syntax checking. + # + # Unlike build(), this method does not escape the path component as + # required by RFC1738; instead it is treated as per RFC2396. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # @raise [InvalidURIError] + # @return [FTP] a new instance of FTP + # + # source://uri//lib/uri/ftp.rb#133 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # source://uri//lib/uri/ftp.rb#214 + def merge(oth); end + + # Returns the path from an FTP URI. + # + # RFC 1738 specifically states that the path for an FTP URI does not + # include the / which separates the URI path from the URI host. Example: + # + # ftp://ftp.example.com/pub/ruby + # + # The above URI indicates that the client should connect to + # ftp.example.com then cd to pub/ruby from the initial login directory. + # + # If you want to cd to an absolute directory, you must include an + # escaped / (%2F) in the path. Example: + # + # ftp://ftp.example.com/%2Fpub/ruby + # + # This method will then return "/pub/ruby". + # + # source://uri//lib/uri/ftp.rb#240 + def path; end + + # Returns a String representation of the URI::FTP. + # + # source://uri//lib/uri/ftp.rb#251 + def to_s; end + + # typecode accessor. + # + # See URI::FTP::COMPONENT. + # + # source://uri//lib/uri/ftp.rb#161 + def typecode; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the typecode +v+ + # (with validation). + # + # See also URI::FTP.check_typecode. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("ftp://john@ftp.example.com/my_file.img") + # #=> # + # uri.typecode = "i" + # uri + # #=> # + # + # source://uri//lib/uri/ftp.rb#208 + def typecode=(typecode); end + + protected + + # Private setter for the path of the URI::FTP. + # + # source://uri//lib/uri/ftp.rb#245 + def set_path(v); end + + # Private setter for the typecode +v+. + # + # See also URI::FTP.typecode=. + # + # source://uri//lib/uri/ftp.rb#180 + def set_typecode(v); end + + private + + # Validates typecode +v+, + # returns +true+ or +false+. + # + # source://uri//lib/uri/ftp.rb#166 + def check_typecode(v); end + + class << self + # == Description + # + # Creates a new URI::FTP object from components, with syntax checking. + # + # The components accepted are +userinfo+, +host+, +port+, +path+, and + # +typecode+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, typecode]. + # + # If the path supplied is absolute, it will be escaped in order to + # make it absolute in the URI. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, + # '/path/file.zip', 'i']) + # uri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" + # + # uri2 = URI::FTP.build({:host => 'ftp.example.com', + # :path => 'ruby/src'}) + # uri2.to_s # => "ftp://ftp.example.com/ruby/src" + # + # source://uri//lib/uri/ftp.rb#96 + def build(args); end + + # source://uri//lib/uri/ftp.rb#47 + def new2(user, password, host, port, path, typecode = T.unsafe(nil), arg_check = T.unsafe(nil)); end + end +end + +# The "file" URI is defined by RFC8089. +# +# source://uri//lib/uri/file.rb#10 +class URI::File < ::URI::Generic + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#82 + def check_password(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#77 + def check_user(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#72 + def check_userinfo(user); end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri//lib/uri/file.rb#62 + def set_host(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#95 + def set_password(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#68 + def set_port(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#91 + def set_user(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#87 + def set_userinfo(v); end + + class << self + # == Description + # + # Creates a new URI::File object from components, with syntax checking. + # + # The components accepted are +host+ and +path+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, path]. + # + # A path from e.g. the File class should be escaped before + # being passed. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::File.build(['host.example.com', '/path/file.zip']) + # uri1.to_s # => "file://host.example.com/path/file.zip" + # + # uri2 = URI::File.build({:host => 'host.example.com', + # :path => '/ruby/src'}) + # uri2.to_s # => "file://host.example.com/ruby/src" + # + # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')}) + # uri3.to_s # => "file:///path/my%20file.txt" + # + # source://uri//lib/uri/file.rb#53 + def build(args); end + end +end + +# An Array of the available components for URI::File. +# +# source://uri//lib/uri/file.rb#17 +URI::File::COMPONENT = T.let(T.unsafe(nil), Array) + +# A Default port of nil for URI::File. +# +# source://uri//lib/uri/file.rb#12 +URI::File::DEFAULT_PORT = T.let(T.unsafe(nil), T.untyped) + +class URI::GID < ::URI::Generic + # source://uri//lib/uri/generic.rb#243 + def app; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#107 + def deconstruct_keys(_keys); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def model_id; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def model_name; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def params; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#102 + def to_s; end + + protected + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#118 + def query=(query); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#129 + def set_params(params); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#112 + def set_path(path); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#124 + def set_query(query); end + + private + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#136 + def check_host(host); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#141 + def check_path(path); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#146 + def check_scheme(scheme); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#195 + def parse_query_params(query); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#154 + def set_model_components(path, validate = T.unsafe(nil)); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#174 + def validate_component(component); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#188 + def validate_model_id(model_id_part); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#181 + def validate_model_id_section(model_id, model_name); end + + class << self + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#88 + def build(args); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#72 + def create(app, model, params = T.unsafe(nil)); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#64 + def parse(uri); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#48 + def validate_app(app); end + end +end + +# Base class for all URI classes. +# Implements generic URI syntax as per RFC 2396. +# +# source://uri//lib/uri/generic.rb#21 +class URI::Generic + include ::URI::RFC2396_REGEXP + include ::URI + + # == Args + # + # +scheme+:: + # Protocol scheme, i.e. 'http','ftp','mailto' and so on. + # +userinfo+:: + # User name and password, i.e. 'sdmitry:bla'. + # +host+:: + # Server host name. + # +port+:: + # Server port. + # +registry+:: + # Registry of naming authorities. + # +path+:: + # Path on server. + # +opaque+:: + # Opaque part. + # +query+:: + # Query data. + # +fragment+:: + # Part of the URI after '#' character. + # +parser+:: + # Parser for internal use [URI::DEFAULT_PARSER by default]. + # +arg_check+:: + # Check arguments [false by default]. + # + # == Description + # + # Creates a new URI::Generic instance from ``generic'' components without check. + # + # @return [Generic] a new instance of Generic + # + # source://uri//lib/uri/generic.rb#169 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # merge + # + # source://uri//lib/uri/generic.rb#1109 + def +(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri//lib/uri/generic.rb#1262 + def -(oth); end + + # Compares two URIs. + # + # source://uri//lib/uri/generic.rb#1384 + def ==(oth); end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#972 + def absolute; end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#972 + def absolute?; end + + # == Args + # + # +v+:: + # URI or String + # + # == Description + # + # Attempts to parse other URI +oth+, + # returns [parsed_oth, self]. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.coerce("http://foo.com") + # #=> [#, #] + # + # source://uri//lib/uri/generic.rb#1474 + def coerce(oth); end + + # Components of the URI in the order. + # + # source://uri//lib/uri/generic.rb#313 + def component; end + + # Returns the password component after URI decoding. + # + # source://uri//lib/uri/generic.rb#583 + def decoded_password; end + + # Returns the user component after URI decoding. + # + # source://uri//lib/uri/generic.rb#578 + def decoded_user; end + + # Returns default port. + # + # source://uri//lib/uri/generic.rb#39 + def default_port; end + + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#1396 + def eql?(oth); end + + # Returns a proxy URI. + # The proxy URI is obtained from environment variables such as http_proxy, + # ftp_proxy, no_proxy, etc. + # If there is no proper proxy, nil is returned. + # + # If the optional parameter +env+ is specified, it is used instead of ENV. + # + # Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) + # are examined, too. + # + # But http_proxy and HTTP_PROXY is treated specially under CGI environment. + # It's because HTTP_PROXY may be set by Proxy: header. + # So HTTP_PROXY is not used. + # http_proxy is not used too if the variable is case insensitive. + # CGI_HTTP_PROXY can be used instead. + # + # @raise [BadURIError] + # + # source://uri//lib/uri/generic.rb#1500 + def find_proxy(env = T.unsafe(nil)); end + + # Returns the fragment component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies" + # + # source://uri//lib/uri/generic.rb#283 + def fragment; end + + # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT. + # + # + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the fragment component +v+ + # (with validation). + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25#time=1305212049") + # uri.fragment = "time=1305212086" + # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086" + # + # source://uri//lib/uri/generic.rb#929 + def fragment=(v); end + + # source://uri//lib/uri/generic.rb#1392 + def hash; end + + # Returns true if URI is hierarchical. + # + # == Description + # + # URI has components listed in order of decreasing significance from left to right, + # see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/") + # uri.hierarchical? + # #=> true + # uri = URI.parse("mailto:joe@example.com") + # uri.hierarchical? + # #=> false + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#961 + def hierarchical?; end + + # Returns the host component of the URI. + # + # URI("http://foo/bar/baz").host #=> "foo" + # + # It returns nil if no host component exists. + # + # URI("mailto:foo@example.org").host #=> nil + # + # The component does not contain the port number. + # + # URI("http://foo:8080/bar/baz").host #=> "foo" + # + # Since IPv6 addresses are wrapped with brackets in URIs, + # this method returns IPv6 addresses wrapped with brackets. + # This form is not appropriate to pass to socket methods such as TCPSocket.open. + # If unwrapped host names are required, use the #hostname method. + # + # URI("http://[::1]/bar/baz").host #=> "[::1]" + # URI("http://[::1]/bar/baz").hostname #=> "::1" + # + # source://uri//lib/uri/generic.rb#243 + def host; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the host component +v+ + # (with validation). + # + # See also URI::Generic.check_host. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.host = "foo.com" + # uri.to_s #=> "http://foo.com" + # + # source://uri//lib/uri/generic.rb#639 + def host=(v); end + + # Extract the host part of the URI and unwrap brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host except + # brackets for IPv6 (and future IP) addresses are removed. + # + # uri = URI("http://[::1]/bar") + # uri.hostname #=> "::1" + # uri.host #=> "[::1]" + # + # source://uri//lib/uri/generic.rb#654 + def hostname; end + + # Sets the host part of the URI as the argument with brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host= except + # the argument can be a bare IPv6 address. + # + # uri = URI("http://foo/bar") + # uri.hostname = "::1" + # uri.to_s #=> "http://[::1]/bar" + # + # If the argument seems to be an IPv6 address, + # it is wrapped with brackets. + # + # source://uri//lib/uri/generic.rb#671 + def hostname=(v); end + + # source://uri//lib/uri/generic.rb#1451 + def inspect; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # + # source://uri//lib/uri/generic.rb#1109 + def merge(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Destructive form of #merge. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge!("/main.rbx?page=1") + # uri.to_s # => "http://my.example.com/main.rbx?page=1" + # + # source://uri//lib/uri/generic.rb#1081 + def merge!(oth); end + + # Returns normalized URI. + # + # require 'uri' + # + # URI("HTTP://my.EXAMPLE.com").normalize + # #=> # + # + # Normalization here means: + # + # * scheme and host are converted to lowercase, + # * an empty path component is set to "/". + # + # source://uri//lib/uri/generic.rb#1319 + def normalize; end + + # Destructive version of #normalize. + # + # source://uri//lib/uri/generic.rb#1328 + def normalize!; end + + # Returns the opaque part of the URI. + # + # URI("mailto:foo@example.org").opaque #=> "foo@example.org" + # URI("http://foo/bar/baz").opaque #=> nil + # + # The portion of the path that does not make use of the slash '/'. + # The path typically refers to an absolute path or an opaque part. + # (See RFC2396 Section 3 and 5.2.) + # + # source://uri//lib/uri/generic.rb#277 + def opaque; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the opaque component +v+ + # (with validation). + # + # See also URI::Generic.check_opaque. + # + # source://uri//lib/uri/generic.rb#901 + def opaque=(v); end + + # Returns the parser to be used. + # + # Unless a URI::Parser is defined, DEFAULT_PARSER is used. + # + # source://uri//lib/uri/generic.rb#289 + def parser; end + + # Returns the password component (without URI decoding). + # + # source://uri//lib/uri/generic.rb#573 + def password; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +password+ component + # (with validation). + # + # See also URI::Generic.check_password. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.password = "V3ry_S3nsit1ve" + # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com" + # + # source://uri//lib/uri/generic.rb#498 + def password=(password); end + + # Returns the path component of the URI. + # + # URI("http://foo/bar/baz").path #=> "/bar/baz" + # + # source://uri//lib/uri/generic.rb#260 + def path; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the path component +v+ + # (with validation). + # + # See also URI::Generic.check_path. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/pub/files") + # uri.path = "/faq/" + # uri.to_s #=> "http://my.example.com/faq/" + # + # source://uri//lib/uri/generic.rb#815 + def path=(v); end + + # Returns the port component of the URI. + # + # URI("http://foo/bar/baz").port #=> 80 + # URI("http://foo:8080/bar/baz").port #=> 8080 + # + # source://uri//lib/uri/generic.rb#250 + def port; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the port component +v+ + # (with validation). + # + # See also URI::Generic.check_port. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.port = 8080 + # uri.to_s #=> "http://my.example.com:8080" + # + # source://uri//lib/uri/generic.rb#729 + def port=(v); end + + # Returns the query component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar" + # + # source://uri//lib/uri/generic.rb#266 + def query; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the query component +v+. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25") + # uri.query = "id=1" + # uri.to_s #=> "http://my.example.com/?id=1" + # + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#839 + def query=(v); end + + # source://uri//lib/uri/generic.rb#252 + def registry; end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#745 + def registry=(v); end + + # Returns true if URI does not have a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#984 + def relative?; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri//lib/uri/generic.rb#1262 + def route_from(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path to oth from self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com') + # uri.route_to('http://my.example.com/main.rbx?page=1') + # #=> # + # + # source://uri//lib/uri/generic.rb#1302 + def route_to(oth); end + + # Returns the scheme component of the URI. + # + # URI("http://foo/bar/baz").scheme #=> "http" + # + # source://uri//lib/uri/generic.rb#221 + def scheme; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the scheme component +v+ + # (with validation). + # + # See also URI::Generic.check_scheme. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.scheme = "https" + # uri.to_s #=> "https://my.example.com" + # + # source://uri//lib/uri/generic.rb#360 + def scheme=(v); end + + # == Args + # + # +components+:: + # Multiple Symbol arguments defined in URI::HTTP. + # + # == Description + # + # Selects specified components from URI. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') + # uri.select(:userinfo, :host, :path) + # # => ["myuser:mypass", "my.example.com", "/test.rbx"] + # + # source://uri//lib/uri/generic.rb#1440 + def select(*components); end + + # Constructs String from URI. + # + # source://uri//lib/uri/generic.rb#1343 + def to_s; end + + # Constructs String from URI. + # + # source://uri//lib/uri/generic.rb#1343 + def to_str; end + + # Returns the user component (without URI decoding). + # + # source://uri//lib/uri/generic.rb#568 + def user; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +user+ component + # (with validation). + # + # See also URI::Generic.check_user. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.user = "sam" + # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com" + # + # source://uri//lib/uri/generic.rb#471 + def user=(user); end + + # Returns the userinfo, either as 'user' or 'user:password'. + # + # source://uri//lib/uri/generic.rb#557 + def userinfo; end + + # Sets userinfo, argument is string like 'name:pass'. + # + # source://uri//lib/uri/generic.rb#441 + def userinfo=(userinfo); end + + protected + + # Returns an Array of the components defined from the COMPONENT Array. + # + # source://uri//lib/uri/generic.rb#1416 + def component_ary; end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri//lib/uri/generic.rb#613 + def set_host(v); end + + # Protected setter for the opaque component +v+. + # + # See also URI::Generic.opaque=. + # + # source://uri//lib/uri/generic.rb#883 + def set_opaque(v); end + + # Protected setter for the password component +v+. + # + # See also URI::Generic.password=. + # + # source://uri//lib/uri/generic.rb#534 + def set_password(v); end + + # Protected setter for the path component +v+. + # + # See also URI::Generic.path=. + # + # source://uri//lib/uri/generic.rb#789 + def set_path(v); end + + # Protected setter for the port component +v+. + # + # See also URI::Generic.port=. + # + # source://uri//lib/uri/generic.rb#702 + def set_port(v); end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#740 + def set_registry(v); end + + # Protected setter for the scheme component +v+. + # + # See also URI::Generic.scheme=. + # + # source://uri//lib/uri/generic.rb#334 + def set_scheme(v); end + + # Protected setter for the user component +v+. + # + # See also URI::Generic.user=. + # + # source://uri//lib/uri/generic.rb#524 + def set_user(v); end + + # Protected setter for the +user+ component, and +password+ if available + # (with validation). + # + # See also URI::Generic.userinfo=. + # + # source://uri//lib/uri/generic.rb#509 + def set_userinfo(user, password = T.unsafe(nil)); end + + private + + # Checks the host +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :HOST. + # + # Can not have a registry or opaque component defined, + # with a host component defined. + # + # source://uri//lib/uri/generic.rb#594 + def check_host(v); end + + # Checks the opaque +v+ component for RFC2396 compliance and + # against the URI::Parser Regexp for :OPAQUE. + # + # Can not have a host, port, user, or path component defined, + # with an opaque component defined. + # + # source://uri//lib/uri/generic.rb#861 + def check_opaque(v); end + + # Checks the password +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri//lib/uri/generic.rb#417 + def check_password(v, user = T.unsafe(nil)); end + + # Checks the path +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp + # for :ABS_PATH and :REL_PATH. + # + # Can not have a opaque component defined, + # with a path component defined. + # + # source://uri//lib/uri/generic.rb#757 + def check_path(v); end + + # Checks the port +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :PORT. + # + # Can not have a registry or opaque component defined, + # with a port component defined. + # + # source://uri//lib/uri/generic.rb#683 + def check_port(v); end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#735 + def check_registry(v); end + + # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME. + # + # source://uri//lib/uri/generic.rb#320 + def check_scheme(v); end + + # Checks the user +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri//lib/uri/generic.rb#393 + def check_user(v); end + + # Checks the +user+ and +password+. + # + # If +password+ is not provided, then +user+ is + # split, using URI::Generic.split_userinfo, to + # pull +user+ and +password. + # + # See also URI::Generic.check_user, URI::Generic.check_password. + # + # source://uri//lib/uri/generic.rb#375 + def check_userinfo(user, password = T.unsafe(nil)); end + + # Escapes 'user:password' +v+ based on RFC 1738 section 3.1. + # + # source://uri//lib/uri/generic.rb#551 + def escape_userpass(v); end + + # Merges a base path +base+, with relative path +rel+, + # returns a modified base path. + # + # source://uri//lib/uri/generic.rb#1000 + def merge_path(base, rel); end + + # Replaces self by other URI object. + # + # source://uri//lib/uri/generic.rb#299 + def replace!(oth); end + + # :stopdoc: + # + # source://uri//lib/uri/generic.rb#1194 + def route_from0(oth); end + + # :stopdoc: + # + # source://uri//lib/uri/generic.rb#1155 + def route_from_path(src, dst); end + + # Returns an Array of the path split on '/'. + # + # source://uri//lib/uri/generic.rb#991 + def split_path(path); end + + # Returns the userinfo +ui+ as [user, password] + # if properly formatted as 'user:password'. + # + # source://uri//lib/uri/generic.rb#542 + def split_userinfo(ui); end + + class << self + # == Synopsis + # + # See ::new. + # + # == Description + # + # Creates a new URI::Generic instance from components of URI::Generic + # with check. Components are: scheme, userinfo, host, port, registry, path, + # opaque, query, and fragment. You can provide arguments either by an Array or a Hash. + # See ::new for hash keys to use or for order of array items. + # + # source://uri//lib/uri/generic.rb#116 + def build(args); end + + # == Synopsis + # + # See ::new. + # + # == Description + # + # At first, tries to create a new URI::Generic instance using + # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, + # then it does URI::Escape.escape all URI components and tries again. + # + # source://uri//lib/uri/generic.rb#78 + def build2(args); end + + # Components of the URI in the order. + # + # source://uri//lib/uri/generic.rb#57 + def component; end + + # Returns default port. + # + # source://uri//lib/uri/generic.rb#32 + def default_port; end + + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#1566 + def use_proxy?(hostname, addr, port, no_proxy); end + + # source://uri//lib/uri/generic.rb#63 + def use_registry; end + end +end + +# The syntax of HTTP URIs is defined in RFC1738 section 3.3. +# +# Note that the Ruby URI library allows HTTP URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri//lib/uri/http.rb#22 +class URI::HTTP < ::URI::Generic + # == Description + # + # Returns the authority for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com" + # + # source://uri//lib/uri/http.rb#97 + def authority; end + + # == Description + # + # Returns the origin for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc6454. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com" + # + # source://uri//lib/uri/http.rb#119 + def origin; end + + # == Description + # + # Returns the full path for an HTTP request, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri//lib/uri/http.rb#77 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::HTTP object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, query, and + # fragment. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query, fragment]. + # + # Example: + # + # uri = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::HTTP.build([nil, "www.example.com", nil, "/path", + # "query", 'fragment']) + # + # Currently, if passed userinfo components this method generates + # invalid HTTP URIs as per RFC 1738. + # + # source://uri//lib/uri/http.rb#59 + def build(args); end + end +end + +# source://uri//lib/uri/common.rb#105 +URI::INITIAL_SCHEMES = T.let(T.unsafe(nil), Hash) + +# LDAP URI SCHEMA (described in RFC2255). +# -- +# ldap:///[?[?[?[?]]]] +# ++ +# +# source://uri//lib/uri/ldap.rb#23 +class URI::LDAP < ::URI::Generic + # == Description + # + # Creates a new URI::LDAP object from generic URI components as per + # RFC 2396. No LDAP-specific syntax checking is performed. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # Example: + # + # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, + # "/dc=example;dc=com", nil, "query", nil) + # + # See also URI::Generic.new. + # + # @return [LDAP] a new instance of LDAP + # + # source://uri//lib/uri/ldap.rb#108 + def initialize(*arg); end + + # Returns attributes. + # + # source://uri//lib/uri/ldap.rb#178 + def attributes; end + + # Setter for attributes +val+. + # + # source://uri//lib/uri/ldap.rb#191 + def attributes=(val); end + + # Returns dn. + # + # source://uri//lib/uri/ldap.rb#159 + def dn; end + + # Setter for dn +val+. + # + # source://uri//lib/uri/ldap.rb#172 + def dn=(val); end + + # Returns extensions. + # + # source://uri//lib/uri/ldap.rb#235 + def extensions; end + + # Setter for extensions +val+. + # + # source://uri//lib/uri/ldap.rb#248 + def extensions=(val); end + + # Returns filter. + # + # source://uri//lib/uri/ldap.rb#216 + def filter; end + + # Setter for filter +val+. + # + # source://uri//lib/uri/ldap.rb#229 + def filter=(val); end + + # Checks if URI has a path. + # For URI::LDAP this will return +false+. + # + # @return [Boolean] + # + # source://uri//lib/uri/ldap.rb#255 + def hierarchical?; end + + # Returns scope. + # + # source://uri//lib/uri/ldap.rb#197 + def scope; end + + # Setter for scope +val+. + # + # source://uri//lib/uri/ldap.rb#210 + def scope=(val); end + + protected + + # Private setter for attributes +val+. + # + # source://uri//lib/uri/ldap.rb#183 + def set_attributes(val); end + + # Private setter for dn +val+. + # + # source://uri//lib/uri/ldap.rb#164 + def set_dn(val); end + + # Private setter for extensions +val+. + # + # source://uri//lib/uri/ldap.rb#240 + def set_extensions(val); end + + # Private setter for filter +val+. + # + # source://uri//lib/uri/ldap.rb#221 + def set_filter(val); end + + # Private setter for scope +val+. + # + # source://uri//lib/uri/ldap.rb#202 + def set_scope(val); end + + private + + # Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+. + # + # source://uri//lib/uri/ldap.rb#146 + def build_path_query; end + + # Private method to cleanup +dn+ from using the +path+ component attribute. + # + # @raise [InvalidURIError] + # + # source://uri//lib/uri/ldap.rb#120 + def parse_dn; end + + # Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+ + # from using the +query+ component attribute. + # + # source://uri//lib/uri/ldap.rb#128 + def parse_query; end + + class << self + # == Description + # + # Creates a new URI::LDAP object from components, with syntax checking. + # + # The components accepted are host, port, dn, attributes, + # scope, filter, and extensions. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, port, dn, attributes, scope, filter, extensions]. + # + # Example: + # + # uri = URI::LDAP.build({:host => 'ldap.example.com', + # :dn => '/dc=example'}) + # + # uri = URI::LDAP.build(["ldap.example.com", nil, + # "/dc=example;dc=com", "query", nil, nil, nil]) + # + # source://uri//lib/uri/ldap.rb#74 + def build(args); end + end +end + +# RFC6068, the mailto URL scheme. +# +# source://uri//lib/uri/mailto.rb#17 +class URI::MailTo < ::URI::Generic + # == Description + # + # Creates a new URI::MailTo object from generic URL components with + # no syntax checking. + # + # This method is usually called from URI::parse, which checks + # the validity of each component. + # + # @return [MailTo] a new instance of MailTo + # + # source://uri//lib/uri/mailto.rb#132 + def initialize(*arg); end + + # E-mail headers set by the URL, as an Array of Arrays. + # + # source://uri//lib/uri/mailto.rb#166 + def headers; end + + # Setter for headers +v+. + # + # source://uri//lib/uri/mailto.rb#232 + def headers=(v); end + + # The primary e-mail address of the URL, as a String. + # + # source://uri//lib/uri/mailto.rb#163 + def to; end + + # Setter for to +v+. + # + # source://uri//lib/uri/mailto.rb#200 + def to=(v); end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri//lib/uri/mailto.rb#268 + def to_mailtext; end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri//lib/uri/mailto.rb#268 + def to_rfc822text; end + + # Constructs String from URI. + # + # source://uri//lib/uri/mailto.rb#239 + def to_s; end + + protected + + # Private setter for headers +v+. + # + # source://uri//lib/uri/mailto.rb#221 + def set_headers(v); end + + # Private setter for to +v+. + # + # source://uri//lib/uri/mailto.rb#194 + def set_to(v); end + + private + + # Checks the headers +v+ component against either + # * HEADER_REGEXP + # + # source://uri//lib/uri/mailto.rb#208 + def check_headers(v); end + + # Checks the to +v+ component. + # + # source://uri//lib/uri/mailto.rb#169 + def check_to(v); end + + class << self + # == Description + # + # Creates a new URI::MailTo object from components, with syntax checking. + # + # Components can be provided as an Array or Hash. If an Array is used, + # the components must be supplied as [to, headers]. + # + # If a Hash is used, the keys are the component names preceded by colons. + # + # The headers can be supplied as a pre-encoded string, such as + # "subject=subscribe&cc=address", or as an Array of Arrays + # like [['subject', 'subscribe'], ['cc', 'address']]. + # + # Examples: + # + # require 'uri' + # + # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) + # m1.to_s # => "mailto:joe@example.com?subject=Ruby" + # + # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) + # m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" + # + # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) + # m3.to_s # => "mailto:listman@example.com?subject=subscribe" + # + # source://uri//lib/uri/mailto.rb#85 + def build(args); end + end +end + +# source://uri//lib/uri/common.rb#22 +URI::RFC2396_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# Class that parses String's into URI's. +# +# It contains a Hash set of patterns and Regexp's that match and validate. +# +# source://uri//lib/uri/rfc2396_parser.rb#64 +class URI::RFC2396_Parser + include ::URI::RFC2396_REGEXP + + # == Synopsis + # + # URI::Parser.new([opts]) + # + # == Args + # + # The constructor accepts a hash as options for parser. + # Keys of options are pattern names of URI components + # and values of options are pattern strings. + # The constructor generates set of regexps for parsing URIs. + # + # You can use the following keys: + # + # * :ESCAPED (URI::PATTERN::ESCAPED in default) + # * :UNRESERVED (URI::PATTERN::UNRESERVED in default) + # * :DOMLABEL (URI::PATTERN::DOMLABEL in default) + # * :TOPLABEL (URI::PATTERN::TOPLABEL in default) + # * :HOSTNAME (URI::PATTERN::HOSTNAME in default) + # + # == Examples + # + # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") + # u = p.parse("http://example.jp/%uABCD") #=> # + # URI.parse(u.to_s) #=> raises URI::InvalidURIError + # + # s = "http://example.com/ABCD" + # u1 = p.parse(s) #=> # + # u2 = URI.parse(s) #=> # + # u1 == u2 #=> true + # u1.eql?(u2) #=> false + # + # @return [RFC2396_Parser] a new instance of RFC2396_Parser + # + # source://uri//lib/uri/rfc2396_parser.rb#99 + def initialize(opts = T.unsafe(nil)); end + + # :call-seq: + # escape( str ) + # escape( str, unsafe ) + # + # == Args + # + # +str+:: + # String to make safe + # +unsafe+:: + # Regexp to apply. Defaults to +self.regexp[:UNSAFE]+ + # + # == Description + # + # Constructs a safe String from +str+, removing unsafe characters, + # replacing them with codes. + # + # source://uri//lib/uri/rfc2396_parser.rb#287 + def escape(str, unsafe = T.unsafe(nil)); end + + # :call-seq: + # extract( str ) + # extract( str, schemes ) + # extract( str, schemes ) {|item| block } + # + # == Args + # + # +str+:: + # String to search + # +schemes+:: + # Patterns to apply to +str+ + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # If no +block+ given, then returns the result, + # else it calls +block+ for each element in result. + # + # See also URI::Parser.make_regexp. + # + # source://uri//lib/uri/rfc2396_parser.rb#249 + def extract(str, schemes = T.unsafe(nil)); end + + # source://uri//lib/uri/rfc2396_parser.rb#326 + def inspect; end + + # == Args + # + # +uris+:: + # an Array of Strings + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # + # source://uri//lib/uri/rfc2396_parser.rb#223 + def join(*uris); end + + # Returns Regexp that is default +self.regexp[:ABS_URI_REF]+, + # unless +schemes+ is provided. Then it is a Regexp.union with +self.pattern[:X_ABS_URI]+. + # + # source://uri//lib/uri/rfc2396_parser.rb#262 + def make_regexp(schemes = T.unsafe(nil)); end + + # == Args + # + # +uri+:: + # String + # + # == Description + # + # Parses +uri+ and constructs either matching URI scheme object + # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic. + # + # == Usage + # + # p = URI::Parser.new + # p.parse("ldap://ldap.example.com/dc=example?user=john") + # #=> # + # + # source://uri//lib/uri/rfc2396_parser.rb#209 + def parse(uri); end + + # The Hash of patterns. + # + # See also URI::Parser.initialize_pattern. + # + # source://uri//lib/uri/rfc2396_parser.rb#112 + def pattern; end + + # The Hash of Regexp. + # + # See also URI::Parser.initialize_regexp. + # + # source://uri//lib/uri/rfc2396_parser.rb#117 + def regexp; end + + # Returns a split URI against +regexp[:ABS_URI]+. + # + # source://uri//lib/uri/rfc2396_parser.rb#120 + def split(uri); end + + # :call-seq: + # unescape( str ) + # unescape( str, escaped ) + # + # == Args + # + # +str+:: + # String to remove escapes from + # +escaped+:: + # Regexp to apply. Defaults to +self.regexp[:ESCAPED]+ + # + # == Description + # + # Removes escapes from +str+. + # + # source://uri//lib/uri/rfc2396_parser.rb#318 + def unescape(str, escaped = T.unsafe(nil)); end + + private + + # source://uri//lib/uri/rfc2396_parser.rb#527 + def convert_to_uri(uri); end + + # Constructs the default Hash of patterns. + # + # source://uri//lib/uri/rfc2396_parser.rb#338 + def initialize_pattern(opts = T.unsafe(nil)); end + + # Constructs the default Hash of Regexp's. + # + # source://uri//lib/uri/rfc2396_parser.rb#496 + def initialize_regexp(pattern); end +end + +# source://uri//lib/uri/rfc3986_parser.rb#3 +class URI::RFC3986_Parser + # @return [RFC3986_Parser] a new instance of RFC3986_Parser + # + # source://uri//lib/uri/rfc3986_parser.rb#73 + def initialize; end + + # source://uri//lib/uri/rfc3986_parser.rb#146 + def inspect; end + + # source://uri//lib/uri/rfc3986_parser.rb#139 + def join(*uris); end + + # source://uri//lib/uri/rfc3986_parser.rb#134 + def parse(uri); end + + # Returns the value of attribute regexp. + # + # source://uri//lib/uri/rfc3986_parser.rb#71 + def regexp; end + + # source://uri//lib/uri/rfc3986_parser.rb#77 + def split(uri); end + + private + + # source://uri//lib/uri/rfc3986_parser.rb#171 + def convert_to_uri(uri); end + + # source://uri//lib/uri/rfc3986_parser.rb#157 + def default_regexp; end +end + +# source://uri//lib/uri/rfc3986_parser.rb#33 +URI::RFC3986_Parser::FRAGMENT = T.let(T.unsafe(nil), String) + +# URI defined in RFC3986 +# +# source://uri//lib/uri/rfc3986_parser.rb#5 +URI::RFC3986_Parser::HOST = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/rfc3986_parser.rb#54 +URI::RFC3986_Parser::RFC3986_relative_ref = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/rfc3986_parser.rb#30 +URI::RFC3986_Parser::SCHEME = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#31 +URI::RFC3986_Parser::SEG = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#32 +URI::RFC3986_Parser::SEG_NC = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#28 +URI::RFC3986_Parser::USERINFO = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/common.rb#69 +module URI::Schemes; end + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::FILE = URI::File + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::FTP = URI::FTP + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::GID = URI::GID + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::HTTP = URI::HTTP + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::HTTPS = URI::HTTPS + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::LDAP = URI::LDAP + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::LDAPS = URI::LDAPS + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::MAILTO = URI::MailTo + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::SOURCE = URI::Source + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::WS = URI::WS + +# source://uri//lib/uri/common.rb#82 +URI::Schemes::WSS = URI::WSS + +class URI::Source < ::URI::File + # source://tapioca/0.15.0/lib/tapioca/helpers/source_uri.rb#58 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri//lib/uri/generic.rb#243 + def gem_name; end + + # source://tapioca/0.15.0/lib/tapioca/helpers/source_uri.rb#25 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri//lib/uri/generic.rb#283 + def line_number; end + + # source://tapioca/0.15.0/lib/tapioca/helpers/source_uri.rb#51 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://tapioca/0.15.0/lib/tapioca/helpers/source_uri.rb#70 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca/0.15.0/lib/tapioca/helpers/source_uri.rb#38 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://uri//lib/uri/common.rb#287 +URI::TBLENCURICOMP_ = T.let(T.unsafe(nil), Hash) + +# source://uri//lib/uri/common.rb#37 +module URI::Util + private + + # source://uri//lib/uri/common.rb#38 + def make_components_hash(klass, array_hash); end + + class << self + # source://uri//lib/uri/common.rb#38 + def make_components_hash(klass, array_hash); end + end +end + +# The syntax of WS URIs is defined in RFC6455 section 3. +# +# Note that the Ruby URI library allows WS URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri//lib/uri/ws.rb#22 +class URI::WS < ::URI::Generic + # == Description + # + # Returns the full path for a WS URI, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::WS.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri//lib/uri/ws.rb#74 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::WS object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, and query. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query]. + # + # Example: + # + # uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"]) + # + # Currently, if passed userinfo components this method generates + # invalid WS URIs as per RFC 1738. + # + # source://uri//lib/uri/ws.rb#56 + def build(args); end + end +end + +# The default port for WSS URIs is 443, and the scheme is 'wss:' rather +# than 'ws:'. Other than that, WSS URIs are identical to WS URIs; +# see URI::WS. +# +# source://uri//lib/uri/wss.rb#17 +class URI::WSS < ::URI::WS; end + +# A Default port of 443 for URI::WSS +# +# source://uri//lib/uri/wss.rb#19 +URI::WSS::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/useragent@0.16.10.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/useragent@0.16.10.rbi new file mode 100644 index 0000000..bf7b53f --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/useragent@0.16.10.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `useragent` gem. +# Please instead update this file by running `bin/tapioca gem useragent`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/webrick@1.8.2.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/webrick@1.8.2.rbi new file mode 100644 index 0000000..719a439 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/webrick@1.8.2.rbi @@ -0,0 +1,2622 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `webrick` gem. +# Please instead update this file by running `bin/tapioca gem webrick`. + + +# AccessLog provides logging to various files in various formats. +# +# Multiple logs may be written to at the same time: +# +# access_log = [ +# [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT], +# [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT], +# ] +# +# server = WEBrick::HTTPServer.new :AccessLog => access_log +# +# Custom log formats may be defined. WEBrick::AccessLog provides a subset +# of the formatting from Apache's mod_log_config +# http://httpd.apache.org/docs/mod/mod_log_config.html#formats. See +# AccessLog::setup_params for a list of supported options +# +# source://webrick//lib/webrick/accesslog.rb#30 +module WEBrick::AccessLog + private + + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from req.attributes + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + + class << self + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from req.attributes + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + end +end + +# A generic logging class +# +# source://webrick//lib/webrick/log.rb#17 +class WEBrick::BasicLog + # Initializes a new logger for +log_file+ that outputs messages at +level+ + # or higher. +log_file+ can be a filename, an IO-like object that + # responds to #<< or nil which outputs to $stderr. + # + # If no level is given INFO is chosen by default + # + # @return [BasicLog] a new instance of BasicLog + # + # source://webrick//lib/webrick/log.rb#50 + def initialize(log_file = T.unsafe(nil), level = T.unsafe(nil)); end + + # Synonym for log(INFO, obj.to_s) + # + # source://webrick//lib/webrick/log.rb#84 + def <<(obj); end + + # Closes the logger (also closes the log device associated to the logger) + # + # source://webrick//lib/webrick/log.rb#66 + def close; end + + # Shortcut for logging a DEBUG message + # + # source://webrick//lib/webrick/log.rb#97 + def debug(msg); end + + # Will the logger output DEBUG messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#108 + def debug?; end + + # Shortcut for logging an ERROR message + # + # source://webrick//lib/webrick/log.rb#91 + def error(msg); end + + # Will the logger output ERROR messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#102 + def error?; end + + # Shortcut for logging a FATAL message + # + # source://webrick//lib/webrick/log.rb#89 + def fatal(msg); end + + # Will the logger output FATAL messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#100 + def fatal?; end + + # Shortcut for logging an INFO message + # + # source://webrick//lib/webrick/log.rb#95 + def info(msg); end + + # Will the logger output INFO messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#106 + def info?; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level=(_arg0); end + + # Logs +data+ at +level+ if the given level is above the current log + # level. + # + # source://webrick//lib/webrick/log.rb#75 + def log(level, data); end + + # Shortcut for logging a WARN message + # + # source://webrick//lib/webrick/log.rb#93 + def warn(msg); end + + # Will the logger output WARN messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#104 + def warn?; end + + private + + # Formats +arg+ for the logger + # + # * If +arg+ is an Exception, it will format the error message and + # the back trace. + # * If +arg+ responds to #to_str, it will return it. + # * Otherwise it will return +arg+.inspect. + # + # source://webrick//lib/webrick/log.rb#119 + def format(arg); end +end + +# -- +# Updates WEBrick::GenericServer with SSL functionality +# +# source://webrick//lib/webrick/server.rb#56 +class WEBrick::GenericServer + # Creates a new generic server from +config+. The default configuration + # comes from +default+. + # + # @return [GenericServer] a new instance of GenericServer + # + # source://webrick//lib/webrick/server.rb#88 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Retrieves +key+ from the configuration + # + # source://webrick//lib/webrick/server.rb#121 + def [](key); end + + # The server configuration + # + # source://webrick//lib/webrick/server.rb#66 + def config; end + + # Updates +listen+ to enable SSL when the SSL configuration is active. + # + # source://webrick//lib/webrick/server.rb#129 + def listen(address, port); end + + # Sockets listening for connections. + # + # source://webrick//lib/webrick/server.rb#82 + def listeners; end + + # The server logger. This is independent from the HTTP access log. + # + # source://webrick//lib/webrick/server.rb#71 + def logger; end + + # You must subclass GenericServer and implement \#run which accepts a TCP + # client socket + # + # source://webrick//lib/webrick/server.rb#244 + def run(sock); end + + # Shuts down the server and all listening sockets. New listeners must be + # provided to restart the server. + # + # source://webrick//lib/webrick/server.rb#234 + def shutdown; end + + # Starts the server and runs the +block+ for each connection. This method + # does not return until the server is stopped from a signal handler or + # another thread using #stop or #shutdown. + # + # If the block raises a subclass of StandardError the exception is logged + # and ignored. If an IOError or Errno::EBADF exception is raised the + # exception is ignored. If an Exception subclass is raised the exception + # is logged and re-raised which stops the server. + # + # To completely shut down a server call #shutdown from ensure: + # + # server = WEBrick::GenericServer.new + # # or WEBrick::HTTPServer.new + # + # begin + # server.start + # ensure + # server.shutdown + # end + # + # @raise [ServerError] + # + # source://webrick//lib/webrick/server.rb#154 + def start(&block); end + + # The server status. One of :Stop, :Running or :Shutdown + # + # source://webrick//lib/webrick/server.rb#61 + def status; end + + # Stops the server from accepting new connections. + # + # source://webrick//lib/webrick/server.rb#222 + def stop; end + + # Tokens control the number of outstanding clients. The + # :MaxClients configuration sets this. + # + # source://webrick//lib/webrick/server.rb#77 + def tokens; end + + private + + # Accepts a TCP client socket from the TCP server socket +svr+ and returns + # the client socket. + # + # source://webrick//lib/webrick/server.rb#256 + def accept_client(svr); end + + # source://webrick//lib/webrick/server.rb#347 + def alarm_shutdown_pipe; end + + # Calls the callback +callback_name+ from the configuration with +args+ + # + # source://webrick//lib/webrick/server.rb#334 + def call_callback(callback_name, *args); end + + # source://webrick//lib/webrick/server.rb#359 + def cleanup_listener; end + + # source://webrick//lib/webrick/server.rb#342 + def cleanup_shutdown_pipe(shutdown_pipe); end + + # source://webrick//lib/webrick/server.rb#338 + def setup_shutdown_pipe; end + + # Starts a server thread for the client socket +sock+ that runs the given + # +block+. + # + # Sets the socket to the :WEBrickSocket thread local variable + # in the thread. + # + # If any errors occur in the block they are logged and handled. + # + # source://webrick//lib/webrick/server.rb#288 + def start_thread(sock, &block); end +end + +# source://webrick//lib/webrick/htmlutils.rb#13 +module WEBrick::HTMLUtils + private + + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + + class << self + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + end +end + +# HTTPAuth provides both basic and digest authentication. +# +# To enable authentication for requests in WEBrick you will need a user +# database and an authenticator. To start, here's an Htpasswd database for +# use with a DigestAuth authenticator: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# The +:Realm+ is used to provide different access to different groups +# across several resources on a server. Typically you'll need only one +# realm for a server. +# +# This database can be used to create an authenticator: +# +# config[:UserDB] = htpasswd +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# To authenticate a request call #authenticate with a request and response +# object in a servlet: +# +# def do_GET req, res +# @authenticator.authenticate req, res +# end +# +# For digest authentication the authenticator must not be created every +# request, it must be passed in as an option via WEBrick::HTTPServer#mount. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#12 +module WEBrick::HTTPAuth + private + + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + + class << self + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + end +end + +# Module providing generic support for both Digest and Basic +# authentication schemes. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#18 +module WEBrick::HTTPAuth::Authenticator + # The logger for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#43 + def logger; end + + # The realm this authenticator covers + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#33 + def realm; end + + # The user database for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#38 + def userdb; end + + private + + # Initializes the authenticator from +config+ + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#52 + def check_init(config); end + + # Ensures +req+ has credentials that can be authenticated. + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#72 + def check_scheme(req); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#91 + def error(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#97 + def info(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#85 + def log(meth, fmt, *args); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#23 +WEBrick::HTTPAuth::Authenticator::AuthException = WEBrick::HTTPStatus::Unauthorized + +# Basic Authentication for WEBrick +# +# Use this class to add basic authentication to a WEBrick servlet. +# +# Here is an example of how to set up a BasicAuth: +# +# config = { :Realm => 'BasicAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file', password_hash: :bcrypt +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# config[:UserDB] = htpasswd +# +# basic_auth = WEBrick::HTTPAuth::BasicAuth.new config +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#35 +class WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new BasicAuth instance. + # + # See WEBrick::Config::BasicAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htpasswd instance should be used. + # + # @return [BasicAuth] a new instance of BasicAuth + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#61 + def initialize(config, default = T.unsafe(nil)); end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#70 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#103 + def challenge(req, res); end + + # Returns the value of attribute logger. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def logger; end + + # Returns the value of attribute realm. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def realm; end + + # Returns the value of attribute userdb. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def userdb; end + + class << self + # Used by UserDB to create a basic password entry + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#43 + def make_passwd(realm, user, pass); end + end +end + +# RFC 2617 Digest Access Authentication for WEBrick +# +# Use this class to add digest authentication to a WEBrick servlet. +# +# Here is an example of how to set up DigestAuth: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htdigest.set_passwd config[:Realm], 'username', 'password' +# htdigest.flush +# +# config[:UserDB] = htdigest +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# When using this as with a servlet be sure not to create a new DigestAuth +# object in the servlet's #initialize. By default WEBrick creates a new +# servlet instance for every request and the DigestAuth object must be +# used across requests. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#46 +class WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new DigestAuth instance. Be sure to use the same DigestAuth + # instance for multiple requests as it saves state between requests in + # order to perform authentication. + # + # See WEBrick::Config::DigestAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htdigest instance should be used. + # + # @return [DigestAuth] a new instance of DigestAuth + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#87 + def initialize(config, default = T.unsafe(nil)); end + + # Digest authentication algorithm + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#59 + def algorithm; end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#121 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#134 + def challenge(req, res, stale = T.unsafe(nil)); end + + # Quality of protection. RFC 2617 defines "auth" and "auth-int" + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#64 + def qop; end + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#163 + def _authenticate(req, res); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#306 + def check_nonce(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#349 + def check_opaque(opaque_struct, req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#365 + def check_uri(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#299 + def generate_next_nonce(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#332 + def generate_opaque(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#376 + def hexdigest(*args); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#291 + def split_param_value(string); end + + class << self + # Used by UserDB to create a digest password entry + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#69 + def make_passwd(realm, user, pass); end + end +end + +# Htdigest accesses apache-compatible digest password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# digest password database should be stored outside of the paths available +# to the HTTP server. +# +# Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and +# stores passwords using cryptographic hashes. +# +# htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htdigest.rb#31 +class WEBrick::HTTPAuth::Htdigest + include ::WEBrick::HTTPAuth::UserDB + + # Open a digest password database at +path+ + # + # @return [Htdigest] a new instance of Htdigest + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#37 + def initialize(path); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#113 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#122 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#72 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#91 + def get_passwd(realm, user, reload_db); end + + # Reloads passwords from the database + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#50 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#101 + def set_passwd(realm, user, pass); end +end + +# Htgroup accesses apache-compatible group files. Htgroup can be used to +# provide group-based authentication for users. Currently Htgroup is not +# directly integrated with any authenticators in WEBrick. For security, +# the path for a digest password database should be stored outside of the +# paths available to the HTTP server. +# +# Example: +# +# htgroup = WEBrick::HTTPAuth::Htgroup.new 'my_group_file' +# htgroup.add 'superheroes', %w[spiderman batman] +# +# htgroup.members('superheroes').include? 'magneto' # => false +# +# source://webrick//lib/webrick/httpauth/htgroup.rb#30 +class WEBrick::HTTPAuth::Htgroup + # Open a group database at +path+ + # + # @return [Htgroup] a new instance of Htgroup + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#35 + def initialize(path); end + + # Add an Array of +members+ to +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#92 + def add(group, members); end + + # Flush the group database. If +output+ is given the database will be + # written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#64 + def flush(output = T.unsafe(nil)); end + + # Retrieve the list of members from +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#84 + def members(group); end + + # Reload groups from the database + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#46 + def reload; end +end + +# Htpasswd accesses apache-compatible password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# password database should be stored outside of the paths available to the +# HTTP server. +# +# Htpasswd is intended for use with WEBrick::HTTPAuth::BasicAuth. +# +# To create an Htpasswd database with a single user: +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htpasswd.rb#32 +class WEBrick::HTTPAuth::Htpasswd + include ::WEBrick::HTTPAuth::UserDB + + # Open a password database at +path+ + # + # @return [Htpasswd] a new instance of Htpasswd + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#38 + def initialize(path, password_hash: T.unsafe(nil)); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#144 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#151 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#103 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#122 + def get_passwd(realm, user, reload_db); end + + # Reload passwords from the database + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#68 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#130 + def set_passwd(realm, user, pass); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#114 +WEBrick::HTTPAuth::ProxyAuthenticator::AuthException = WEBrick::HTTPStatus::ProxyAuthenticationRequired + +# Basic authentication for proxy servers. See BasicAuth for details. +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#112 +class WEBrick::HTTPAuth::ProxyBasicAuth < ::WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator +end + +# Digest authentication for proxy servers. See DigestAuth for details. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#386 +class WEBrick::HTTPAuth::ProxyDigestAuth < ::WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#390 + def check_uri(req, auth_req); end +end + +# User database mixin for HTTPAuth. This mixin dispatches user record +# access to the underlying auth_type for this database. +# +# source://webrick//lib/webrick/httpauth/userdb.rb#18 +module WEBrick::HTTPAuth::UserDB + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type; end + + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type=(_arg0); end + + # Retrieves a password in +realm+ for +user+ for the auth_type of this + # database. +reload_db+ is a dummy value. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#48 + def get_passwd(realm, user, reload_db = T.unsafe(nil)); end + + # Creates an obscured password in +realm+ with +user+ and +password+ + # using the auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#32 + def make_passwd(realm, user, pass); end + + # Sets a password in +realm+ with +user+ and +password+ for the + # auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#40 + def set_passwd(realm, user, pass); end +end + +# -- +# Adds SSL functionality to WEBrick::HTTPRequest +# +# source://webrick//lib/webrick/httprequest.rb#25 +class WEBrick::HTTPRequest + # Creates a new HTTP request. WEBrick::Config::HTTP is the default + # configuration. + # + # @return [HTTPRequest] a new instance of HTTPRequest + # + # source://webrick//lib/webrick/httprequest.rb#153 + def initialize(config); end + + # Retrieves +header_name+ + # + # source://webrick//lib/webrick/httprequest.rb#318 + def [](header_name); end + + # The Accept header value + # + # source://webrick//lib/webrick/httprequest.rb#100 + def accept; end + + # The Accept-Charset header value + # + # source://webrick//lib/webrick/httprequest.rb#105 + def accept_charset; end + + # The Accept-Encoding header value + # + # source://webrick//lib/webrick/httprequest.rb#110 + def accept_encoding; end + + # The Accept-Language header value + # + # source://webrick//lib/webrick/httprequest.rb#115 + def accept_language; end + + # The socket address of the server + # + # source://webrick//lib/webrick/httprequest.rb#127 + def addr; end + + # Hash of request attributes + # + # source://webrick//lib/webrick/httprequest.rb#137 + def attributes; end + + # Returns the request body. + # + # source://webrick//lib/webrick/httprequest.rb#255 + def body(&block); end + + # Prepares the HTTPRequest object for use as the + # source for IO.copy_stream + # + # source://webrick//lib/webrick/httprequest.rb#265 + def body_reader; end + + # The content-length header + # + # source://webrick//lib/webrick/httprequest.rb#304 + def content_length; end + + # The content-type header + # + # source://webrick//lib/webrick/httprequest.rb#311 + def content_type; end + + # Generate HTTP/1.1 100 continue response if the client expects it, + # otherwise does nothing. + # + # source://webrick//lib/webrick/httprequest.rb#245 + def continue; end + + # The parsed request cookies + # + # source://webrick//lib/webrick/httprequest.rb#95 + def cookies; end + + # Iterates over the request headers + # + # source://webrick//lib/webrick/httprequest.rb#328 + def each; end + + # Consumes any remaining body and updates keep-alive status + # + # source://webrick//lib/webrick/httprequest.rb#390 + def fixup; end + + # The parsed header of the request + # + # source://webrick//lib/webrick/httprequest.rb#90 + def header; end + + # The host this request is for + # + # source://webrick//lib/webrick/httprequest.rb#340 + def host; end + + # The HTTP version of the request + # + # source://webrick//lib/webrick/httprequest.rb#51 + def http_version; end + + # Is this a keep-alive connection? + # + # source://webrick//lib/webrick/httprequest.rb#142 + def keep_alive; end + + # Should the connection this request was made on be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#375 + def keep_alive?; end + + # This method provides the metavariables defined by the revision 3 + # of "The WWW Common Gateway Interface Version 1.1" + # To browse the current document of CGI Version 1.1, see below: + # https://www.rfc-editor.org/rfc/rfc3875 + # + # source://webrick//lib/webrick/httprequest.rb#407 + def meta_vars; end + + # Parses a request from +socket+. This is called internally by + # WEBrick::HTTPServer. + # + # source://webrick//lib/webrick/httprequest.rb#193 + def parse(socket = T.unsafe(nil)); end + + # The request path + # + # source://webrick//lib/webrick/httprequest.rb#63 + def path; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info=(_arg0); end + + # The socket address of the client + # + # source://webrick//lib/webrick/httprequest.rb#132 + def peeraddr; end + + # The port this request is for + # + # source://webrick//lib/webrick/httprequest.rb#347 + def port; end + + # Request query as a Hash + # + # source://webrick//lib/webrick/httprequest.rb#294 + def query; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string=(_arg0); end + + # The raw header of the request + # + # source://webrick//lib/webrick/httprequest.rb#85 + def raw_header; end + + # for IO.copy_stream. + # + # source://webrick//lib/webrick/httprequest.rb#278 + def readpartial(size, buf = T.unsafe(nil)); end + + # The client's IP address + # + # source://webrick//lib/webrick/httprequest.rb#361 + def remote_ip; end + + # The complete request line such as: + # + # GET / HTTP/1.1 + # + # source://webrick//lib/webrick/httprequest.rb#36 + def request_line; end + + # The request method, GET, POST, PUT, etc. + # + # source://webrick//lib/webrick/httprequest.rb#41 + def request_method; end + + # The local time this request was received + # + # source://webrick//lib/webrick/httprequest.rb#147 + def request_time; end + + # The parsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#58 + def request_uri; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name=(_arg0); end + + # The server name this request is for + # + # source://webrick//lib/webrick/httprequest.rb#354 + def server_name; end + + # Is this an SSL request? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#368 + def ssl?; end + + # source://webrick//lib/webrick/httprequest.rb#379 + def to_s; end + + # The unparsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#46 + def unparsed_uri; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user=(_arg0); end + + private + + # source://webrick//lib/webrick/httprequest.rb#594 + def _read_data(io, method, *arg); end + + # source://webrick//lib/webrick/httprequest.rb#527 + def parse_host_request_line(host); end + + # source://webrick//lib/webrick/httprequest.rb#614 + def parse_query; end + + # source://webrick//lib/webrick/httprequest.rb#503 + def parse_uri(str, scheme = T.unsafe(nil)); end + + # source://webrick//lib/webrick/httprequest.rb#531 + def read_body(socket, block); end + + # source://webrick//lib/webrick/httprequest.rb#559 + def read_chunk_size(socket); end + + # source://webrick//lib/webrick/httprequest.rb#570 + def read_chunked(socket, block); end + + # source://webrick//lib/webrick/httprequest.rb#610 + def read_data(io, size); end + + # source://webrick//lib/webrick/httprequest.rb#471 + def read_header(socket); end + + # source://webrick//lib/webrick/httprequest.rb#606 + def read_line(io, size = T.unsafe(nil)); end + + # @raise [HTTPStatus::EOFError] + # + # source://webrick//lib/webrick/httprequest.rb#451 + def read_request_line(socket); end + + # It's said that all X-Forwarded-* headers will contain more than one + # (comma-separated) value if the original request already contained one of + # these headers. Since we could use these values as Host header, we choose + # the initial(first) value. (apr_table_mergen() adds new value after the + # existing value with ", " prefix) + # + # source://webrick//lib/webrick/httprequest.rb#642 + def setup_forwarded_info; end +end + +# source://webrick//lib/webrick/httprequest.rb#526 +WEBrick::HTTPRequest::HOST_PATTERN = T.let(T.unsafe(nil), Regexp) + +# same as Mongrel, Thin and Puma +# +# source://webrick//lib/webrick/httprequest.rb#449 +WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) + +# An HTTP response. This is filled in by the service or do_* methods of a +# WEBrick HTTP Servlet. +# +# source://webrick//lib/webrick/httpresponse.rb#24 +class WEBrick::HTTPResponse + # Creates a new HTTP response object. WEBrick::Config::HTTP is the + # default configuration. + # + # @return [HTTPResponse] a new instance of HTTPResponse + # + # source://webrick//lib/webrick/httpresponse.rb#117 + def initialize(config); end + + # Retrieves the response header +field+ + # + # source://webrick//lib/webrick/httpresponse.rb#155 + def [](field); end + + # Sets the response header +field+ to +value+ + # + # source://webrick//lib/webrick/httpresponse.rb#162 + def []=(field, value); end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or header['content-length'] explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body; end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or header['content-length'] explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body=(_arg0); end + + # Enables chunked transfer encoding. + # + # source://webrick//lib/webrick/httpresponse.rb#214 + def chunked=(val); end + + # Will this response body be returned using chunked transfer-encoding? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpresponse.rb#207 + def chunked?; end + + # Configuration for this response + # + # source://webrick//lib/webrick/httpresponse.rb#101 + def config; end + + # The content-length header + # + # source://webrick//lib/webrick/httpresponse.rb#170 + def content_length; end + + # Sets the content-length header to +len+ + # + # source://webrick//lib/webrick/httpresponse.rb#179 + def content_length=(len); end + + # The content-type header + # + # source://webrick//lib/webrick/httpresponse.rb#186 + def content_type; end + + # Sets the content-type header to +type+ + # + # source://webrick//lib/webrick/httpresponse.rb#193 + def content_type=(type); end + + # Response cookies + # + # source://webrick//lib/webrick/httpresponse.rb#46 + def cookies; end + + # Iterates over each header in the response + # + # source://webrick//lib/webrick/httpresponse.rb#200 + def each; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename=(_arg0); end + + # Response header + # + # source://webrick//lib/webrick/httpresponse.rb#41 + def header; end + + # HTTP Response version + # + # source://webrick//lib/webrick/httpresponse.rb#31 + def http_version; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive=(_arg0); end + + # Will this response's connection be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpresponse.rb#221 + def keep_alive?; end + + # source://webrick//lib/webrick/httpresponse.rb#325 + def make_body_tempfile; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase=(_arg0); end + + # source://webrick//lib/webrick/httpresponse.rb#343 + def remove_body_tempfile; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version=(_arg0); end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method; end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method=(_arg0); end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri; end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri=(_arg0); end + + # Sends the body on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#378 + def send_body(socket); end + + # Sends the headers on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#355 + def send_header(socket); end + + # Sends the response on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#238 + def send_response(socket); end + + # Bytes sent in this response + # + # source://webrick//lib/webrick/httpresponse.rb#106 + def sent_size; end + + # Creates an error page for exception +ex+ with an optional +backtrace+ + # + # source://webrick//lib/webrick/httpresponse.rb#405 + def set_error(ex, backtrace = T.unsafe(nil)); end + + # Redirects to +url+ with a WEBrick::HTTPStatus::Redirect +status+. + # + # Example: + # + # res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect + # + # source://webrick//lib/webrick/httpresponse.rb#395 + def set_redirect(status, url); end + + # Sets up the headers for sending + # + # source://webrick//lib/webrick/httpresponse.rb#255 + def setup_header; end + + # Response status code (200) + # + # source://webrick//lib/webrick/httpresponse.rb#36 + def status; end + + # Sets the response's status to the +status+ code + # + # source://webrick//lib/webrick/httpresponse.rb#147 + def status=(status); end + + # The response's HTTP status line + # + # source://webrick//lib/webrick/httpresponse.rb#140 + def status_line; end + + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade; end + + # Sets the response to be a streaming/upgrade response. + # This will disable keep-alive and chunked transfer encoding. + # + # source://webrick//lib/webrick/httpresponse.rb#229 + def upgrade!(protocol); end + + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade=(_arg0); end + + private + + # preserved for compatibility with some 3rd-party handlers + # + # source://webrick//lib/webrick/httpresponse.rb#581 + def _write_data(socket, data); end + + # source://webrick//lib/webrick/httpresponse.rb#432 + def check_header(header_value); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpresponse.rb#443 + def error_body(backtrace, ex, host, port); end + + # source://webrick//lib/webrick/httpresponse.rb#473 + def send_body_io(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#535 + def send_body_proc(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#513 + def send_body_string(socket); end +end + +# source://webrick//lib/webrick/httpresponse.rb#555 +class WEBrick::HTTPResponse::ChunkedWrapper + # @return [ChunkedWrapper] a new instance of ChunkedWrapper + # + # source://webrick//lib/webrick/httpresponse.rb#556 + def initialize(socket, resp); end + + # source://webrick//lib/webrick/httpresponse.rb#574 + def <<(*buf); end + + # source://webrick//lib/webrick/httpresponse.rb#561 + def write(buf); end +end + +# An HTTP Server +# +# source://webrick//lib/webrick/httpserver.rb#27 +class WEBrick::HTTPServer < ::WEBrick::GenericServer + # Creates a new HTTP server according to +config+ + # + # An HTTP server uses the following attributes: + # + # :AccessLog:: An array of access logs. See WEBrick::AccessLog + # :BindAddress:: Local address for the server to bind to + # :DocumentRoot:: Root path to serve files from + # :DocumentRootOptions:: Options for the default HTTPServlet::FileHandler + # :HTTPVersion:: The HTTP version of this server + # :Port:: Port to listen on + # :RequestCallback:: Called with a request and response before each + # request is serviced. + # :RequestTimeout:: Maximum time to wait between requests + # :ServerAlias:: Array of alternate names for this server for virtual + # hosting + # :ServerName:: Name for this server for virtual hosting + # + # @return [HTTPServer] a new instance of HTTPServer + # + # source://webrick//lib/webrick/httpserver.rb#46 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Logs +req+ and +res+ in the access logs. +config+ is used for the + # server name. + # + # source://webrick//lib/webrick/httpserver.rb#220 + def access_log(config, req, res); end + + # Creates the HTTPRequest used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#230 + def create_request(with_webrick_config); end + + # Creates the HTTPResponse used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#237 + def create_response(with_webrick_config); end + + # The default OPTIONS request handler says GET, HEAD, POST and OPTIONS + # requests are allowed. + # + # source://webrick//lib/webrick/httpserver.rb#147 + def do_OPTIONS(req, res); end + + # Finds the appropriate virtual host to handle +req+ + # + # source://webrick//lib/webrick/httpserver.rb#207 + def lookup_server(req); end + + # Mounts +servlet+ on +dir+ passing +options+ to the servlet at creation + # time + # + # source://webrick//lib/webrick/httpserver.rb#155 + def mount(dir, servlet, *options); end + + # Mounts +proc+ or +block+ on +dir+ and calls it with a + # WEBrick::HTTPRequest and WEBrick::HTTPResponse + # + # @raise [HTTPServerError] + # + # source://webrick//lib/webrick/httpserver.rb#164 + def mount_proc(dir, proc = T.unsafe(nil), &block); end + + # Processes requests on +sock+ + # + # source://webrick//lib/webrick/httpserver.rb#69 + def run(sock); end + + # Finds a servlet for +path+ + # + # source://webrick//lib/webrick/httpserver.rb#182 + def search_servlet(path); end + + # Services +req+ and fills in +res+ + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpserver.rb#125 + def service(req, res); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def umount(dir); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def unmount(dir); end + + # Adds +server+ as a virtual host. + # + # source://webrick//lib/webrick/httpserver.rb#193 + def virtual_host(server); end +end + +# Mount table for the path a servlet is mounted on in the directory space +# of the server. Users of WEBrick can only access this indirectly via +# WEBrick::HTTPServer#mount, WEBrick::HTTPServer#unmount and +# WEBrick::HTTPServer#search_servlet +# +# source://webrick//lib/webrick/httpserver.rb#247 +class WEBrick::HTTPServer::MountTable + # @return [MountTable] a new instance of MountTable + # + # source://webrick//lib/webrick/httpserver.rb#248 + def initialize; end + + # source://webrick//lib/webrick/httpserver.rb#253 + def [](dir); end + + # source://webrick//lib/webrick/httpserver.rb#258 + def []=(dir, val); end + + # source://webrick//lib/webrick/httpserver.rb#265 + def delete(dir); end + + # source://webrick//lib/webrick/httpserver.rb#272 + def scan(path); end + + private + + # source://webrick//lib/webrick/httpserver.rb#279 + def compile; end + + # source://webrick//lib/webrick/httpserver.rb#287 + def normalize(dir); end +end + +# AbstractServlet allows HTTP server modules to be reused across multiple +# servers and allows encapsulation of functionality. +# +# By default a servlet will respond to GET, HEAD (through an alias to GET) +# and OPTIONS requests. +# +# By default a new servlet is initialized for every request. A servlet +# instance can be reused by overriding ::get_instance in the +# AbstractServlet subclass. +# +# == A Simple Servlet +# +# class Simple < WEBrick::HTTPServlet::AbstractServlet +# def do_GET request, response +# status, content_type, body = do_stuff_with request +# +# response.status = status +# response['Content-Type'] = content_type +# response.body = body +# end +# +# def do_stuff_with request +# return 200, 'text/plain', 'you got a page' +# end +# end +# +# This servlet can be mounted on a server at a given path: +# +# server.mount '/simple', Simple +# +# == Servlet Configuration +# +# Servlets can be configured via initialize. The first argument is the +# HTTP server the servlet is being initialized for. +# +# class Configurable < Simple +# def initialize server, color, size +# super server +# @color = color +# @size = size +# end +# +# def do_stuff_with request +# content = "

    Hello, World!" +# +# return 200, "text/html", content +# end +# end +# +# This servlet must be provided two arguments at mount time: +# +# server.mount '/configurable', Configurable, 'red', '2em' +# +# source://webrick//lib/webrick/httpservlet/abstract.rb#76 +class WEBrick::HTTPServlet::AbstractServlet + # Initializes a new servlet for +server+ using +options+ which are + # stored as-is in +@options+. +@logger+ is also provided. + # + # @return [AbstractServlet] a new instance of AbstractServlet + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#91 + def initialize(server, *options); end + + # Raises a NotFound exception + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#115 + def do_GET(req, res); end + + # Dispatches to do_GET + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#122 + def do_HEAD(req, res); end + + # Returns the allowed HTTP request methods + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#129 + def do_OPTIONS(req, res); end + + # Dispatches to a +do_+ method based on +req+ if such a method is + # available. (+do_GET+ for a GET request). Raises a MethodNotAllowed + # exception if the method is not implemented. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#102 + def service(req, res); end + + private + + # Redirects to a path ending in / + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#140 + def redirect_to_directory_uri(req, res); end + + class << self + # Factory for servlet instances that will handle a request from +server+ + # using +options+ from the mount point. By default a new servlet + # instance is created for every call. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#83 + def get_instance(server, *options); end + end +end + +# Servlet for handling CGI scripts +# +# Example: +# +# server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler, +# '/path/to/my_script') +# +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#28 +class WEBrick::HTTPServlet::CGIHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new CGI script servlet for the script at +name+ + # + # @return [CGIHandler] a new instance of CGIHandler + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#36 + def initialize(server, name); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_GET(req, res); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_POST(req, res); end +end + +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#31 +WEBrick::HTTPServlet::CGIHandler::CGIRunnerArray = T.let(T.unsafe(nil), Array) + +# Servlet for serving a single file. You probably want to use the +# FileHandler servlet instead as it handles directories and fancy indexes. +# +# Example: +# +# server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, +# '/path/to/my_page.txt') +# +# This servlet handles If-Modified-Since and Range requests. +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#32 +class WEBrick::HTTPServlet::DefaultFileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a DefaultFileHandler instance for the file at +local_path+. + # + # @return [DefaultFileHandler] a new instance of DefaultFileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#37 + def initialize(server, local_path); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#44 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#118 + def make_partial_content(req, res, filename, filesize); end + + # returns a lambda for webrick/httpresponse.rb send_body_proc + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#90 + def multipart_body(body, parts, boundary, mtype, filesize); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#64 + def not_modified?(req, res, mtime, etag); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#155 + def prepare_range(range, filesize); end +end + +# ERBHandler evaluates an ERB file and returns the result. This handler +# is automatically used if there are .rhtml files in a directory served by +# the FileHandler. +# +# ERBHandler supports GET and POST methods. +# +# The ERB file is evaluated with the local variables +servlet_request+ and +# +servlet_response+ which are a WEBrick::HTTPRequest and +# WEBrick::HTTPResponse respectively. +# +# Example .rhtml file: +# +# Request to <%= servlet_request.request_uri %> +# +# Query params <%= servlet_request.query.inspect %> +# +# source://webrick//lib/webrick/httpservlet/erbhandler.rb#36 +class WEBrick::HTTPServlet::ERBHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new ERBHandler on +server+ that will evaluate and serve the + # ERB file +name+ + # + # @return [ERBHandler] a new instance of ERBHandler + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#42 + def initialize(server, name); end + + # Handles GET requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_GET(req, res); end + + # Handles GET requests + # + # Handles POST requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_POST(req, res); end + + private + + # Evaluates +erb+ providing +servlet_request+ and +servlet_response+ as + # local variables. + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#79 + def evaluate(erb, servlet_request, servlet_response); end +end + +# Serves a directory including fancy indexing and a variety of other +# options. +# +# Example: +# +# server.mount('/assets', WEBrick::HTTPServlet::FileHandler, +# '/path/to/assets') +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#175 +class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a FileHandler servlet on +server+ that serves files starting + # at directory +root+ + # + # +options+ may be a Hash containing keys from + # WEBrick::Config::FileHandler or +true+ or +false+. + # + # If +options+ is true or false then +:FancyIndexing+ is enabled or + # disabled respectively. + # + # @return [FileHandler] a new instance of FileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#203 + def initialize(server, root, options = T.unsafe(nil), default = T.unsafe(nil)); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#245 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#257 + def do_OPTIONS(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#251 + def do_POST(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#224 + def service(req, res); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#215 + def set_filesystem_encoding(str); end + + private + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#416 + def call_callback(callback_name, req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#369 + def check_filename(req, res, name); end + + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#309 + def exec_handler(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#322 + def get_handler(req, res); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#428 + def nondisclosure_name?(name); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#286 + def prevent_directory_traversal(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#394 + def search_file(req, res, basename); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#385 + def search_index_file(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#437 + def set_dir_list(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#335 + def set_filename(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#376 + def shift_path_info(req, res, path_info, base = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#277 + def trailing_pathsep?(path); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#422 + def windows_ambiguous_name?(name); end + + class << self + # Allow custom handling of requests for files with +suffix+ by class + # +handler+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#182 + def add_handler(suffix, handler); end + + # Remove custom handling of requests for files with +suffix+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#189 + def remove_handler(suffix); end + end +end + +# Mounts a proc at a path that accepts a request and response. +# +# Instead of mounting this servlet with WEBrick::HTTPServer#mount use +# WEBrick::HTTPServer#mount_proc: +# +# server.mount_proc '/' do |req, res| +# res.body = 'it worked!' +# res.status = 200 +# end +# +# source://webrick//lib/webrick/httpservlet/prochandler.rb#28 +class WEBrick::HTTPServlet::ProcHandler < ::WEBrick::HTTPServlet::AbstractServlet + # @return [ProcHandler] a new instance of ProcHandler + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#34 + def initialize(proc); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_GET(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_POST(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_PUT(request, response); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#30 + def get_instance(server, *options); end +end + +# This module is used to manager HTTP status codes. +# +# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more +# information. +# +# source://webrick//lib/webrick/httpstatus.rb#21 +module WEBrick::HTTPStatus + private + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + + class << self + # Returns the status class corresponding to +code+ + # + # WEBrick::HTTPStatus[302] + # => WEBrick::HTTPStatus::NotFound + # + # source://webrick//lib/webrick/httpstatus.rb#186 + def [](code); end + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + end +end + +# Root of the HTTP status class hierarchy +# +# source://webrick//lib/webrick/httpstatus.rb#25 +class WEBrick::HTTPStatus::Status < ::StandardError + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def code; end + + # Returns the HTTP status description + # + # source://webrick//lib/webrick/httpstatus.rb#34 + def reason_phrase; end + + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def to_i; end + + class << self + # source://webrick//lib/webrick/httpstatus.rb#27 + def code; end + + # source://webrick//lib/webrick/httpstatus.rb#27 + def reason_phrase; end + end +end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# source://webrick//lib/webrick/httputils.rb#25 +module WEBrick::HTTPUtils + private + + # source://webrick//lib/webrick/httputils.rb#474 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#472 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#473 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#480 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # source://webrick//lib/webrick/httputils.rb#254 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#498 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#539 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#512 + def escape_form(str); end + + # Escapes path +str+ + # + # source://webrick//lib/webrick/httputils.rb#528 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # source://webrick//lib/webrick/httputils.rb#122 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # source://webrick//lib/webrick/httputils.rb#144 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # source://webrick//lib/webrick/httputils.rb#426 + def parse_form_data(io, boundary); end + + # source://webrick//lib/webrick/httputils.rb#171 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # source://webrick//lib/webrick/httputils.rb#402 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # source://webrick//lib/webrick/httputils.rb#233 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # source://webrick//lib/webrick/httputils.rb#215 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # source://webrick//lib/webrick/httputils.rb#264 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # source://webrick//lib/webrick/httputils.rb#206 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#505 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#521 + def unescape_form(str); end + + class << self + # source://webrick//lib/webrick/httputils.rb#474 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#472 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#473 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#480 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # source://webrick//lib/webrick/httputils.rb#254 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#498 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#539 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#512 + def escape_form(str); end + + # Escapes path +str+ + # + # source://webrick//lib/webrick/httputils.rb#528 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # source://webrick//lib/webrick/httputils.rb#122 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # source://webrick//lib/webrick/httputils.rb#144 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # source://webrick//lib/webrick/httputils.rb#426 + def parse_form_data(io, boundary); end + + # source://webrick//lib/webrick/httputils.rb#171 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # source://webrick//lib/webrick/httputils.rb#402 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # source://webrick//lib/webrick/httputils.rb#233 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # source://webrick//lib/webrick/httputils.rb#215 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # source://webrick//lib/webrick/httputils.rb#264 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # source://webrick//lib/webrick/httputils.rb#206 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#505 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#521 + def unescape_form(str); end + end +end + +# source://webrick//lib/webrick/httputils.rb#161 +class WEBrick::HTTPUtils::CookieHeader < ::Array + # source://webrick//lib/webrick/httputils.rb#162 + def join(separator = T.unsafe(nil)); end +end + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# source://webrick//lib/webrick/httputils.rb#273 +class WEBrick::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # + # source://webrick//lib/webrick/httputils.rb#298 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # source://webrick//lib/webrick/httputils.rb#331 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # source://webrick//lib/webrick/httputils.rb#317 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # source://webrick//lib/webrick/httputils.rb#351 + def append_data(data); end + + # Yields each entry in this FormData + # + # source://webrick//lib/webrick/httputils.rb#366 + def each_data; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#285 + def filename; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#285 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # source://webrick//lib/webrick/httputils.rb#378 + def list; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#280 + def name; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#280 + def name=(_arg0); end + + # source://webrick//lib/webrick/httputils.rb#287 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # + # A FormData will behave like an Array + # + # source://webrick//lib/webrick/httputils.rb#378 + def to_ary; end + + # This FormData's body + # + # source://webrick//lib/webrick/httputils.rb#394 + def to_s; end + + protected + + # source://webrick//lib/webrick/httputils.rb#287 + def next_data; end +end + +# source://webrick//lib/webrick/httputils.rb#167 +WEBrick::HTTPUtils::HEADER_CLASSES = T.let(T.unsafe(nil), Hash) + +# Parses an HTTP header +raw+ into a hash of header fields with an Array +# of values. +# +# source://webrick//lib/webrick/httputils.rb#155 +class WEBrick::HTTPUtils::SplitHeader < ::Array + # source://webrick//lib/webrick/httputils.rb#156 + def join(separator = T.unsafe(nil)); end +end + +# source://webrick//lib/webrick/utils.rb#17 +module WEBrick::Utils + private + + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + + class << self + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + end +end + +# Class used to manage timeout handlers across multiple threads. +# +# Timeout handlers should be managed by using the class methods which are +# synchronized. +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 20 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will raise Timeout::Error +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 5 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will print 'foo' +# +# source://webrick//lib/webrick/utils.rb#118 +class WEBrick::Utils::TimeoutHandler + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # Creates a new TimeoutHandler. You should use ::register and ::cancel + # instead of creating the timeout handler directly. + # + # @return [TimeoutHandler] a new instance of TimeoutHandler + # + # source://webrick//lib/webrick/utils.rb#148 + def initialize; end + + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#226 + def cancel(thread, id); end + + # Interrupts the timeout handler +id+ and raises +exception+ + # + # source://webrick//lib/webrick/utils.rb#203 + def interrupt(thread, id, exception); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#214 + def register(thread, time, exception); end + + # source://webrick//lib/webrick/utils.rb#240 + def terminate; end + + private + + # source://webrick//lib/webrick/utils.rb#158 + def watch; end + + # source://webrick//lib/webrick/utils.rb#193 + def watcher; end + + class << self + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#137 + def cancel(id); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#130 + def register(seconds, exception); end + + # source://webrick//lib/webrick/utils.rb#141 + def terminate; end + end +end diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-driver@0.7.6.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-driver@0.7.6.rbi new file mode 100644 index 0000000..4398b19 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-driver@0.7.6.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `websocket-driver` gem. +# Please instead update this file by running `bin/tapioca gem websocket-driver`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi new file mode 100644 index 0000000..58f2322 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `websocket-extensions` gem. +# Please instead update this file by running `bin/tapioca gem websocket-extensions`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi new file mode 100644 index 0000000..cafd6c2 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -0,0 +1,435 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem yard-sorbet`. + + +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARDSorbet::Handlers::StructClassHandler +end + +# Types are documentation +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#5 +module YARDSorbet; end + +# Extract & re-add directives to a docstring +# +# source://yard-sorbet//lib/yard-sorbet/directives.rb#6 +module YARDSorbet::Directives + class << self + # source://yard-sorbet//lib/yard-sorbet/directives.rb#21 + sig { params(docstring: ::String, directives: T::Array[::String]).void } + def add_directives(docstring, directives); end + + # source://yard-sorbet//lib/yard-sorbet/directives.rb#10 + sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) } + def extract_directives(docstring); end + end +end + +# Custom YARD Handlers +# +# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 +module YARDSorbet::Handlers; end + +# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 +class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21 + sig { void } + def process; end +end + +# Extra text for class namespaces +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18 +YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String) + +# The text accompanying the `@abstract` tag. +# +# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16 +YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String) + +# Handle `enums` calls, registering enum values as constants +# +# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7 +class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def const_assign_node?(node); end +end + +# Extends any modules included via `mixes_in_class_methods` +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9 +class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28 + sig { returns(::YARD::CodeObjects::NamespaceObject) } + def included_in; end +end + +# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler} +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 +class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21 + sig { void } + def process; end + + class << self + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18 + sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) } + def mixed_in_class_methods(code_obj); end + end +end + +# A YARD Handler for Sorbet type declarations +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7 +class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base + # Swap the method definition docstring and the sig docstring. + # Parse relevant parts of the `sig` and include them as well. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 + sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } + def document_attrs(method_objects); end + + # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* + # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* + # declarations. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } + def merged_into_attr?(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76 + sig do + params( + attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), + docstring: T.nilable(::String), + include_params: T::Boolean + ).void + end + def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_params(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_return(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85 + sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } + def parse_sig(docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void } + def process_attr(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36 + sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void } + def process_def(def_node); end +end + +# YARD types that can have docstrings attached to them +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14 +YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation +# this needs to be injected as a module otherwise the default Class handler will overwrite documentation +# +# @note this module is included in `YARD::Handlers::Ruby::ClassHandler` +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10 +module YARDSorbet::Handlers::StructClassHandler + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50 + sig do + params( + object: ::YARD::CodeObjects::MethodObject, + props: T::Array[::YARDSorbet::TStructProp], + docstring: ::YARD::Docstring, + directives: T::Array[::String] + ).void + end + def decorate_t_struct_init(object, props, docstring, directives); end + + # Create a virtual `initialize` method with all the `prop`/`const` arguments + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30 + sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void } + def process_t_struct_props(props, class_ns); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60 + sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) } + def to_object_parameters(props); end +end + +# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level +# in creating a constructor +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8 +class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15 + sig { void } + def process; end + + private + + # Add the source and docstring to the method object + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28 + sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void } + def decorate_object(object, prop); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38 + sig { returns(T::Boolean) } + def immutable?; end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42 + sig { params(kwd: ::String).returns(T.nilable(::String)) } + def kw_arg(kwd); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45 + sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } + def make_prop(name); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56 + sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } + def params; end + + # Register the field explicitly as an attribute. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } + def register_attrs(object, name); end + + # Store the prop for use in the constructor definition + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68 + sig { params(prop: ::YARDSorbet::TStructProp).void } + def update_state(prop); end +end + +# Helper methods for working with `YARD` AST Nodes +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6 +module YARDSorbet::NodeUtils + class << self + # Traverse AST nodes in breadth-first order + # + # @note This will skip over some node types. + # @yield [YARD::Parser::Ruby::AstNode] + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode, + _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void + ).void + end + def bfs_traverse(node, &_blk); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31 + sig { params(node: ::YARD::Parser::Ruby::AstNode).void } + def delete_node(node); end + + # Enqueue the eligible children of a node in the BFS queue + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35 + sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void } + def enqueue_children(queue, node); end + + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode + ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode)) + end + def get_method_node(node); end + + # Find and return the adjacent node (ascending) + # + # @raise [IndexError] if the node does not have an adjacent sibling (ascending) + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } + def sibling_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def sigable_node?(node); end + + # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def validated_attribute_names(attr_node); end + end +end + +# Command node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10 +YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) + +# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc` +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12 +YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array) + +# Node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14 +YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Translate `sig` type syntax to `YARD` type syntax. +# +# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6 +module YARDSorbet::SigToYARD + class << self + # @see https://yardoc.org/types.html + # + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert(node); end + + private + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } + def build_generic_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_aref(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_array(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_collection(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_hash(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_list(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107 + sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def convert_t_method(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_unknown(node); end + end +end + +# Used to store the details of a `T::Struct` `prop` definition +# +# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6 +class YARDSorbet::TStructProp < ::T::Struct + const :default, T.nilable(::String) + const :doc, ::String + const :prop_name, ::String + const :source, ::String + const :types, T::Array[::String] + + class << self + # source://sorbet-runtime/0.5.11463/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Helper methods for working with `YARD` tags +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6 +module YARDSorbet::TagUtils + class << self + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + name: T.nilable(::String) + ).returns(T.nilable(::YARD::Tags::Tag)) + end + def find_tag(docstring, tag_name, name); end + + # Create or update a `YARD` tag with type information + # + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + types: T.nilable(T::Array[::String]), + name: T.nilable(::String), + text: ::String + ).void + end + def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end + end +end + +# The `void` return type, as a constant to reduce array allocations +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10 +YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array) + +# {https://rubygems.org/gems/yard-sorbet Version history} +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#7 +YARDSorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/yard@0.9.36.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/yard@0.9.36.rbi new file mode 100644 index 0000000..966826a --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/yard@0.9.36.rbi @@ -0,0 +1,18412 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard` gem. +# Please instead update this file by running `bin/tapioca gem yard`. + + +# source://yard//lib/yard.rb#61 +::RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +::RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# source://yard//lib/yard/core_ext/array.rb#2 +class Array + include ::Enumerable + + # Places values before or after another object (by value) in + # an array. This is used in tandem with the before and after + # methods of the {Insertion} class. + # + # @example Places an item before another + # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] + # @example Places an item after another + # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] + # @param values [Array] value to insert + # @return [Insertion] an insertion object to + # @see Insertion#before + # @see Insertion#after + # + # source://yard//lib/yard/core_ext/array.rb#15 + def place(*values); end +end + +# source://yard//lib/yard/core_ext/file.rb#4 +class File < ::IO + class << self + # Cleans a path by removing extraneous '..', '.' and '/' characters + # + # @example Clean a path + # File.cleanpath('a/b//./c/../e') # => "a/b/e" + # @param path [String] the path to clean + # @param rel_root [Boolean] allows relative path above root value + # @return [String] the sanitized path + # + # source://yard//lib/yard/core_ext/file.rb#37 + def cleanpath(path, rel_root = T.unsafe(nil)); end + + # Forces opening a file (for writing) by first creating the file's directory + # + # @param file [String] the filename to open + # @since 0.5.2 + # + # source://yard//lib/yard/core_ext/file.rb#57 + def open!(file, *args, &block); end + + # Reads a file with binary encoding + # + # @return [String] the ascii-8bit encoded data + # @since 0.5.3 + # + # source://yard//lib/yard/core_ext/file.rb#66 + def read_binary(file); end + + # Turns a path +to+ into a relative path from starting + # point +from+. The argument +from+ is assumed to be + # a filename. To treat it as a directory, make sure it + # ends in +File::SEPARATOR+ ('/' on UNIX filesystems). + # + # @param from [String] the starting filename + # (or directory with +from_isdir+ set to +true+). + # @param to [String] the final path that should be made relative. + # @return [String] the relative path from +from+ to +to+. + # + # source://yard//lib/yard/core_ext/file.rb#19 + def relative_path(from, to); end + end +end + +# source://yard//lib/yard/core_ext/file.rb#5 +File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/core_ext/file.rb#6 +File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) + +# :stopdoc: +# +# source://yard//lib/yard/rubygems/backports/gem.rb#2 +module Gem + class << self + # Returns the Gem::SourceIndex of specifications that are in the Gem.path + # + # source://yard//lib/yard/rubygems/backports/gem.rb#6 + def source_index; end + end +end + +# Cache is an alias for SourceIndex to allow older YAMLized source index +# objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#363 +Gem::Cache = Gem::SourceIndex + +# The SourceIndex object indexes all the gems available from a +# particular source (e.g. a list of gem directories, or a remote +# source). A SourceIndex maps a gem full name to a gem +# specification. +# +# NOTE:: The class used to be named Cache, but that became +# confusing when cached source fetchers where introduced. The +# constant Gem::Cache is an alias for this class to allow old +# YAMLized source index objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#21 +class Gem::SourceIndex + include ::Enumerable + + # Constructs a source index instance from the provided specifications, which + # is a Hash of gem full names and Gem::Specifications. + # -- + # TODO merge @gems and @prerelease_gems and provide a separate method + # #prerelease_gems + # + # @return [SourceIndex] a new instance of SourceIndex + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#102 + def initialize(specifications = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#348 + def ==(other); end + + # Add a gem specification to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#193 + def add_spec(gem_spec, name = T.unsafe(nil)); end + + # Add gem specifications to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#202 + def add_specs(*gem_specs); end + + # TODO: remove method + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#109 + def all_gems; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#352 + def dump; end + + # Iterate over the specifications in the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#218 + def each(&block); end + + # Find a gem by an exact match on the short name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#256 + def find_name(gem_name, requirement = T.unsafe(nil)); end + + # The signature for the given gem specification. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#242 + def gem_signature(gem_full_name); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#34 + def gems; end + + # The signature for the source index. Changes in the signature indicate a + # change in the index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#233 + def index_signature; end + + # Returns an Array specifications for the latest released versions + # of each gem in this index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#143 + def latest_specs(include_prerelease = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def length; end + + # Reconstruct the source index from the specifications in +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#124 + def load_gems_in(*spec_dirs); end + + # Returns an Array of Gem::Specifications that are not up to date. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#330 + def outdated; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#113 + def prerelease_gems; end + + # An array including only the prerelease gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#179 + def prerelease_specs; end + + # Replaces the gems in the source index from specifications in the + # directories this source index was created from. Raises an exception if + # this source index wasn't created from a directory (via from_gems_in or + # from_installed_gems, or having spec_dirs set). + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#322 + def refresh!; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#117 + def released_gems; end + + # An array including only the released gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#186 + def released_specs; end + + # Remove a gem specification named +full_name+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#211 + def remove_spec(full_name); end + + # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ + # is true, only gems matching Gem::Platform.local will be returned. An + # Array of matching Gem::Specification objects is returned. + # + # For backwards compatibility, a String or Regexp pattern may be passed as + # +gem_pattern+, and a Gem::Requirement for +platform_only+. This + # behavior is deprecated and will be removed. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#270 + def search(gem_pattern, platform_only = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def size; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs=(_arg0); end + + # The gem specification given a full gem spec name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#225 + def specification(full_name); end + + class << self + # Creates a new SourceIndex from the ruby format gem specifications in + # +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#80 + def from_gems_in(*spec_dirs); end + + # Factory method to construct a source index instance for a given + # path. + # + # deprecated:: + # If supplied, from_installed_gems will act just like + # +from_gems_in+. This argument is deprecated and is provided + # just for backwards compatibility, and should not generally + # be used. + # + # return:: + # SourceIndex instance + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#61 + def from_installed_gems(*deprecated); end + + # Returns a list of directories from Gem.path that contain specifications. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#72 + def installed_spec_directories; end + + # Loads a ruby-format specification from +file_name+ and returns the + # loaded spec. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#90 + def load_specification(file_name); end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17 +class IRB::SLex + # @return [SLex] a new instance of SLex + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#25 + def initialize; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#60 + def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#29 + def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#36 + def def_rules(*tokens, &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#77 + def inspect; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#64 + def match(token); end + + # need a check? + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#51 + def postproc(token); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#45 + def preproc(token, proc); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#56 + def search(token); end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#18 +IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#20 +IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#21 +IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#19 +IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# ---------------------------------------------------------------------- +# +# class Node - +# +# ---------------------------------------------------------------------- +# +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#86 +class IRB::SLex::Node + # if postproc is nil, this node is an abstract node. + # if postproc is non-nil, this node is a real node. + # + # @return [Node] a new instance of Node + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#89 + def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#113 + def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # chrs: String + # character array + # io must have getc()/ungetc(); and ungetc() must be + # able to be called arbitrary number of times. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#161 + def match(chrs, op = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#198 + def match_io(io, op = T.unsafe(nil)); end + + # Returns the value of attribute postproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc; end + + # Sets the attribute postproc + # + # @param value the value to set the attribute postproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc=(_arg0); end + + # Returns the value of attribute preproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc; end + + # Sets the attribute preproc + # + # @param value the value to set the attribute preproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#98 + def search(chrs, opt = T.unsafe(nil)); end +end + +# The Insertion class inserts a value before or after another +# value in a list. +# +# @example +# Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] +# +# source://yard//lib/yard/core_ext/insertion.rb#7 +class Insertion + # Creates an insertion object on a list with a value to be + # inserted. To finalize the insertion, call {#before} or + # {#after} on the object. + # + # @param list [Array] the list to perform the insertion on + # @param value [Object] the value to insert + # @return [Insertion] a new instance of Insertion + # + # source://yard//lib/yard/core_ext/insertion.rb#14 + def initialize(list, value); end + + # Inserts the value after +val+. + # + # @example If subsections are ignored + # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] + # @param val [Object] the object the value will be inserted after + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#30 + def after(val, recursive = T.unsafe(nil)); end + + # Alias for {#after} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#38 + def after_any(val); end + + # Inserts the value before +val+ + # + # @param val [Object] the object the value will be inserted before + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#22 + def before(val, recursive = T.unsafe(nil)); end + + # Alias for {#before} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#34 + def before_any(val); end + + private + + # This method performs the actual insertion + # + # @param val [Object] the value to insert + # @param rel [Fixnum] the relative index (0 or 1) of where the object + # should be placed + # @param recursive [Boolean] look inside sublists + # @param list [Array] the list to place objects into + # + # source://yard//lib/yard/core_ext/insertion.rb#49 + def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end +end + +# source://yard//lib/yard/core_ext/module.rb#2 +class Module + # Returns the class name of a full module namespace path + # + # @example + # module A::B::C; class_name end # => "C" + # @return [String] the last part of a module path + # + # source://yard//lib/yard/core_ext/module.rb#8 + def class_name; end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://yard//lib/yard/globals.rb#8 + def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end + + # source://yard//lib/yard/globals.rb#20 + def log; end +end + +# Keep track of Ruby version for compatibility code +# +# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. +# +# source://yard//lib/yard.rb#61 +RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# @private +# +# source://yard//lib/yard/server/rack_adapter.rb#93 +class Rack::Request + # source://rack/3.1.7/lib/rack/request.rb#62 + def initialize(env); end + + # source://rack/3.1.7/lib/rack/request.rb#76 + def delete_param(k); end + + # source://rack/3.1.7/lib/rack/request.rb#67 + def params; end + + # source://rack/3.1.7/lib/rack/request.rb#67 + def query; end + + # source://rack/3.1.7/lib/rack/request.rb#71 + def update_param(k, v); end + + # Returns the value of attribute version_supplied. + # + # source://yard//lib/yard/server/rack_adapter.rb#94 + def version_supplied; end + + # Sets the attribute version_supplied + # + # @param value the value to set the attribute version_supplied to. + # + # source://yard//lib/yard/server/rack_adapter.rb#94 + def version_supplied=(_arg0); end + + # @return [Boolean] + # + # source://yard//lib/yard/server/rack_adapter.rb#96 + def xhr?; end + + class << self + # source://rack/3.1.7/lib/rack/request.rb#31 + def forwarded_priority; end + + # source://rack/3.1.7/lib/rack/request.rb#31 + def forwarded_priority=(_arg0); end + + # source://rack/3.1.7/lib/rack/request.rb#18 + def ip_filter; end + + # source://rack/3.1.7/lib/rack/request.rb#18 + def ip_filter=(_arg0); end + + # source://rack/3.1.7/lib/rack/request.rb#40 + def x_forwarded_proto_priority; end + + # source://rack/3.1.7/lib/rack/request.rb#40 + def x_forwarded_proto_priority=(_arg0); end + end +end + +# source://yard//lib/yard/core_ext/string.rb#2 +class String + include ::Comparable + + # Splits text into tokens the way a shell would, handling quoted + # text as a single token. Use '\"' and "\'" to escape quotes and + # '\\' to escape a backslash. + # + # @return [Array] an array representing the tokens + # + # source://yard//lib/yard/core_ext/string.rb#8 + def shell_split; end +end + +# A subclass of Hash where all keys are converted into Symbols, and +# optionally, all String values are converted into Symbols. +# +# source://yard//lib/yard/core_ext/symbol_hash.rb#4 +class SymbolHash < ::Hash + # Creates a new SymbolHash object + # + # @param symbolize_value [Boolean] converts any String values into Symbols + # if this is set to +true+. + # @return [SymbolHash] a new instance of SymbolHash + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#9 + def initialize(symbolize_value = T.unsafe(nil)); end + + # Accessed a symbolized key + # + # @param key [#to_sym] the key to access + # @return [Object] the value associated with the key + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#49 + def [](key); end + + # Assigns a value to a symbolized key + # + # @param key [#to_sym] the key + # @param value [Object] the value to be assigned. If this is a String and + # values are set to be symbolized, it will be converted into a Symbol. + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#42 + def []=(key, value); end + + # Deleted a key and value associated with it + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#54 + def delete(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def has_key?(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def key?(key); end + + # Merges the contents of another hash into a new SymbolHash object + # + # @param hash [Hash] the hash of objects to copy + # @return [SymbolHash] a new SymbolHash containing the merged data + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#74 + def merge(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def merge!(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def update(hash); end + + class << self + # @overload [] + # @overload [] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#28 + def [](*hsh); end + end +end + +# @private +# +# source://yard//lib/yard/server/webrick_adapter.rb#42 +class WEBrick::HTTPRequest + # Returns the value of attribute version_supplied. + # + # source://yard//lib/yard/server/webrick_adapter.rb#43 + def version_supplied; end + + # Sets the attribute version_supplied + # + # @param value the value to set the attribute version_supplied to. + # + # source://yard//lib/yard/server/webrick_adapter.rb#43 + def version_supplied=(_arg0); end + + # @return [Boolean] + # + # source://yard//lib/yard/server/webrick_adapter.rb#44 + def xhr?; end +end + +# Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems +# upon gem installation. +# +# This file is automatically required by RubyGems 1.9 and newer. +# +# source://yard//lib/yard.rb#2 +module YARD + class << self + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @deprecated Use {Config.load_plugins} + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # + # source://yard//lib/yard.rb#31 + def load_plugins; end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a glob of files + # YARD.parse('lib/**/*.rb') + # @see Parser::SourceParser.parse + # + # source://yard//lib/yard.rb#20 + def parse(*args); end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a string of input + # YARD.parse_string('class Foo; end') + # @see Parser::SourceParser.parse_string + # + # source://yard//lib/yard.rb#27 + def parse_string(*args); end + + # @return [Boolean] whether YARD is being run in Ruby 1.8 mode + # + # source://yard//lib/yard.rb#44 + def ruby18?; end + + # @return [Boolean] whether YARD is being run in Ruby 1.9 mode + # + # source://yard//lib/yard.rb#47 + def ruby19?; end + + # @return [Boolean] whether YARD is being run in Ruby 2.0 + # + # source://yard//lib/yard.rb#50 + def ruby2?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.1 + # + # source://yard//lib/yard.rb#56 + def ruby31?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.0 + # + # source://yard//lib/yard.rb#53 + def ruby3?; end + + # @return [Boolean] whether YARD is being run inside of Windows + # + # source://yard//lib/yard.rb#34 + def windows?; end + end +end + +# Namespace for command-line interface components +# +# source://yard//lib/yard/autoload.rb#6 +module YARD::CLI; end + +# Abstract base class for CLI utilities. Provides some helper methods for +# the option parser +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/cli/command.rb#11 +class YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#16 + def description; end + + protected + + # Adds a set of common options to the tail of the OptionParser + # + # @param opts [OptionParser] the option parser object + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#24 + def common_options(opts); end + + # Loads a Ruby script. If Config.options[:safe_mode] is enabled, + # this method will do nothing. + # + # @param file [String] the path to the script to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/command.rb#68 + def load_script(file); end + + # Parses the option and gracefully handles invalid switches + # + # @param opts [OptionParser] the option parser object + # @param args [Array] the arguments passed from input. This + # array will be modified. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#55 + def parse_options(opts, args); end + + # Callback when an unrecognize option is parsed + # + # @param err [OptionParser::ParseError] the exception raised by the + # option parser + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#80 + def unrecognized_option(err); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#14 + def run(*args); end + end +end + +# This class parses a command name out of the +yard+ CLI command and calls +# that command in the form: +# +# $ yard command_name [options] +# +# If no command or arguments are specified, or if the arguments immediately +# begin with a +--opt+ (not +--help+), the {default_command} will be used +# (which itself defaults to +:doc+). +# +# == Adding a Command +# +# To add a custom command via plugin, create a mapping in {commands} from +# the Symbolic command name to the {Command} class that implements the +# command. To implement a command, see the documentation for the {Command} +# class. +# +# @see Command +# @see commands +# @see default_command +# +# source://yard//lib/yard/cli/command_parser.rb#23 +class YARD::CLI::CommandParser + # @return [CommandParser] a new instance of CommandParser + # + # source://yard//lib/yard/cli/command_parser.rb#56 + def initialize; end + + # Runs the {Command} object matching the command name of the first + # argument. + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#63 + def run(*args); end + + private + + # source://yard//lib/yard/cli/command_parser.rb#80 + def commands; end + + # source://yard//lib/yard/cli/command_parser.rb#82 + def list_commands; end + + class << self + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands; end + + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands=(_arg0); end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command; end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command=(_arg0); end + + # Convenience method to create a new CommandParser and call {#run} + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#54 + def run(*args); end + end +end + +# CLI command to view or edit configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/cli/config.rb#6 +class YARD::CLI::Config < ::YARD::CLI::Command + # @return [Config] a new instance of Config + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#26 + def initialize; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append=(_arg0); end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list; end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#36 + def description; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd=(_arg0); end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key; end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key=(_arg0); end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset; end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#40 + def run(*args); end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values; end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values=(_arg0); end + + private + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#57 + def configure_gemrc; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#111 + def encode_value(value); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#103 + def encode_values; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#97 + def list_configuration; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#78 + def modify_item; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#120 + def optparse(*args); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#92 + def view_item; end +end + +# CLI command to return the objects that were added/removed from 2 versions +# of a project (library, gem, working copy). +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/diff.rb#11 +class YARD::CLI::Diff < ::YARD::CLI::Command + # @return [Diff] a new instance of Diff + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#12 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#24 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#28 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#83 + def added_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#78 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#233 + def cleanup(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#175 + def expand_and_parse(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#187 + def expand_gem(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#181 + def generate_yardoc(dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#118 + def load_gem_data(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#102 + def load_git_commit(commit); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#87 + def modified_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#239 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#98 + def removed_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#225 + def require_rubygems; end +end + +# Display one object +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/display.rb#6 +class YARD::CLI::Display < ::YARD::CLI::Yardoc + # @return [Display] a new instance of Display + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#9 + def initialize(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#7 + def description; end + + # @return [String] the output data for all formatted objects + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#27 + def format_objects; end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#61 + def output_options(opts); end + + # Parses commandline options. + # + # @param args [Array] each tokenized argument + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#46 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and displaying an object + # from the {Registry}. + # + # @param args [Array] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#21 + def run(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#33 + def wrap_layout(contents); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/gems.rb#5 +class YARD::CLI::Gems < ::YARD::CLI::Command + # @return [Gems] a new instance of Gems + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#6 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#11 + def description; end + + # Runs the commandline utility, parsing arguments and generating + # YARD indexes for gems. + # + # @param args [Array] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#18 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#47 + def add_gems(gems); end + + # Builds .yardoc files for all non-existing gems + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#27 + def build_gems; end + + # Parses options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#61 + def optparse(*args); end +end + +# A command-line utility to generate Graphviz graphs from +# a set of objects +# +# @see Graph#run +# @since 0.6.0 +# +# source://yard//lib/yard/cli/graph.rb#24 +class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the command-line utility + # + # @return [Graph] a new instance of Graph + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#34 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#42 + def description; end + + # The set of objects to include in the graph. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#31 + def objects; end + + # The options parsed out of the commandline. + # Default options are: + # :format => :dot + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#28 + def options; end + + # Runs the command-line utility. + # + # @example + # grapher = Graph.new + # grapher.run('--private') + # @param args [Array] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#52 + def run(*args); end + + private + + # Parses commandline options. + # + # @param args [Array] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#69 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#65 + def unrecognized_option(err); end +end + +# Options to pass to the {Graph} CLI. +# +# source://yard//lib/yard/cli/graph.rb#5 +class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents; end + + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents=(_arg0); end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies; end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies=(_arg0); end + + # @return [:dot] the default output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full; end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full=(_arg0); end +end + +# Handles help for commands +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/help.rb#6 +class YARD::CLI::Help < ::YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#7 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#9 + def run(*args); end +end + +# CLI command to support internationalization (a.k.a. i18n). +# I18n feature is based on gettext technology. +# This command generates .pot file from docstring and extra +# documentation. +# +# @since 0.8.0 +# @todo Support msgminit and msgmerge features? +# +# source://yard//lib/yard/cli/i18n.rb#13 +class YARD::CLI::I18n < ::YARD::CLI::Yardoc + # @return [I18n] a new instance of I18n + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#14 + def initialize; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#19 + def description; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#23 + def run(*args); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#44 + def general_options(opts); end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#61 + def generate_pot(relative_base_path); end +end + +# Lists all constant and method names in the codebase. Uses {Yardoc} --list. +# +# source://yard//lib/yard/cli/list.rb#5 +class YARD::CLI::List < ::YARD::CLI::Command + # source://yard//lib/yard/cli/list.rb#6 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of objects + # + # @param args [Array] the list of arguments. + # @return [void] + # + # source://yard//lib/yard/cli/list.rb#13 + def run(*args); end +end + +# Lists all markup types +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/markup_types.rb#6 +class YARD::CLI::MarkupTypes < ::YARD::CLI::Command + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#7 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of markup types + # + # @param args [Array] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#14 + def run(*args); end +end + +# A local documentation server +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/server.rb#7 +class YARD::CLI::Server < ::YARD::CLI::Command + # Creates a new instance of the Server command line utility + # + # @return [Server] a new instance of Server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#29 + def initialize; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#41 + def description; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries=(_arg0); end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options; end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#45 + def run(*args); end + + # @return [Array] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts; end + + # @return [Array] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts=(_arg0); end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options; end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options=(_arg0); end + + # @return [Array] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths; end + + # @return [Array] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#131 + def add_gems; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#140 + def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#76 + def add_libraries(args); end + + # @param library [String] The library name. + # @param dir [String, nil] The argument provided on the CLI after the + # library name. Is supposed to point to either a project directory + # with a Yard options file, or a yardoc db. + # @return [LibraryVersion, nil] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#115 + def create_library_version_if_yardopts_exist(library, dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#249 + def extract_db_from_options_file(options_file); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#239 + def generate_doc_for_first_time(libver); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#56 + def load_scripts; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#60 + def load_template_paths; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#156 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#66 + def select_adapter; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#5 +class YARD::CLI::Stats < ::YARD::CLI::Yardoc + include ::YARD::Templates::Helpers::BaseHelper + + # @param parse [Boolean] whether to parse and load registry (see {#parse}) + # @return [Stats] a new instance of Stats + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#18 + def initialize(parse = T.unsafe(nil)); end + + # @return [Array] all the parsed objects in the registry, + # removing any objects that are not visible (private, protected) depending + # on the arguments passed to the command. + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#108 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#25 + def description; end + + # Prints a statistic to standard out. This method is optimized for + # getting Integer values, though it allows any data to be printed. + # + # @param name [String] the statistic name + # @param data [Integer, String] the numeric (or any) data representing + # the statistic. If +data+ is an Integer, it should represent the + # total objects of a type. + # @param undoc [Integer, nil] number of undocumented objects for the type + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#162 + def output(name, data, undoc = T.unsafe(nil)); end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse; end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse=(_arg0); end + + # Prints statistics for different object types + # + # To add statistics for a specific type, add a method +#stats_for_TYPE+ + # to this class that calls {#output}. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#54 + def print_statistics; end + + # Prints list of undocumented objects + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#79 + def print_undocumented_objects; end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#34 + def run(*args); end + + # Statistics for attributes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#135 + def stats_for_attributes; end + + # Statistics for classes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#125 + def stats_for_classes; end + + # Statistics for constants + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#130 + def stats_for_constants; end + + # Statistics for files + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#113 + def stats_for_files; end + + # Statistics for methods + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#144 + def stats_for_methods; end + + # Statistics for modules + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#120 + def stats_for_modules; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#199 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#185 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#176 + def type_statistics(type); end +end + +# Maintains the order in which +stats_for_+ statistics methods should be +# printed. +# +# @see #print_statistics +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#12 +YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) + +# A tool to view documentation in the console like `ri` +# +# source://yard//lib/yard/cli/yri.rb#7 +class YARD::CLI::YRI < ::YARD::CLI::Command + # @return [YRI] a new instance of YRI + # + # source://yard//lib/yard/cli/yri.rb#31 + def initialize; end + + # source://yard//lib/yard/cli/yri.rb#41 + def description; end + + # Runs the command-line utility. + # + # @example + # YRI.new.run('String#reverse') + # @param args [Array] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#50 + def run(*args); end + + protected + + # Caches the .yardoc file where an object can be found in the {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#85 + def cache_object(name, path); end + + # Locates an object by name starting in the cached paths and then + # searching through any search paths. + # + # @param name [String] the full name of the object + # @return [CodeObjects::Base] an object if found + # @return [nil] if no object is found + # + # source://yard//lib/yard/cli/yri.rb#113 + def find_object(name); end + + # @param object [CodeObjects::Base] the object to print. + # @return [String] the formatted output for an object. + # + # source://yard//lib/yard/cli/yri.rb#98 + def print_object(object); end + + # Prints the command usage + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yri.rb#78 + def print_usage; end + + private + + # Adds paths in {SEARCH_PATHS_FILE} + # + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yri.rb#181 + def add_default_paths; end + + # Adds all RubyGems yardoc files to search paths + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#161 + def add_gem_paths; end + + # Loads {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#151 + def load_cache; end + + # Parses commandline options. + # + # @param args [Array] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#190 + def optparse(*args); end + + # Tries to load the object with name. If successful, caches the object + # with the cache_path + # + # @param name [String] the object path + # @param cache_path [String] the location of the yardoc + # db containing the object to cache for future lookups. + # No caching is done if this is nil. + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#143 + def try_load_object(name, cache_path); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # + # source://yard//lib/yard/cli/yri.rb#29 + def run(*args); end + end +end + +# The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded +# from. +# +# source://yard//lib/yard/cli/yri.rb#10 +YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String) + +# Default search paths that should be loaded dynamically into YRI. These paths +# take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems +# paths). To add a path, call: +# +# DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") +# +# @return [Array] a list of extra search paths +# @since 0.6.0 +# +# source://yard//lib/yard/cli/yri.rb#25 +YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) + +# A file containing all paths, delimited by newlines, to search for +# yardoc databases. +# +# @since 0.5.1 +# +# source://yard//lib/yard/cli/yri.rb#15 +YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/cli/yardoc.rb#145 +class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the commandline utility + # + # @return [Yardoc] a new instance of Yardoc + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#207 + def initialize; end + + # The list of all objects to process. Override this method to change + # which objects YARD should generate documentation for. + # + # @deprecated To hide methods use the +@private+ tag instead. + # @return [Array] a list of code objects to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#330 + def all_objects; end + + # Keep track of which APIs are to be shown + # + # @return [Array] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis; end + + # Keep track of which APIs are to be shown + # + # @return [Array] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis=(_arg0); end + + # @return [Array] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets; end + + # @return [Array] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets=(_arg0); end + + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#234 + def description; end + + # @return [Array] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded; end + + # @return [Array] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded=(_arg0); end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning; end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning=(_arg0); end + + # @return [Array] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files; end + + # @return [Array] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files=(_arg0); end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate; end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate=(_arg0); end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup; end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup=(_arg0); end + + # Keep track of which APIs are to be hidden + # + # @return [Array] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis; end + + # Keep track of which APIs are to be hidden + # + # @return [Array] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis=(_arg0); end + + # @return [Array] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags; end + + # @return [Array] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags=(_arg0); end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list; end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list=(_arg0); end + + # @return [Hash] the hash of options passed to the template. + # @see Templates::Engine#render + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#148 + def options; end + + # Parses commandline arguments + # + # @param args [Array] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#291 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array] the list of arguments. If the list only + # contains a single nil value, skip calling of {#parse_arguments} + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#244 + def run(*args); end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc; end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc=(_arg0); end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics; end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics=(_arg0); end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache; end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache=(_arg0); end + + # Keep track of which visibilities are to be shown + # + # @return [Array] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities; end + + # Keep track of which visibilities are to be shown + # + # @return [Array] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities=(_arg0); end + + private + + # Adds verifier rule for APIs + # + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#474 + def add_api_verifier; end + + # Adds a set of extra documentation files to be processed + # + # @param files [Array] the set of documentation files + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#413 + def add_extra_files(*files); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#507 + def add_tag(tag_data, factory_method = T.unsafe(nil)); end + + # Adds verifier rule for visibilities + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#466 + def add_visibility_verifier; end + + # Applies the specified locale to collected objects + # + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardoc.rb#494 + def apply_locale; end + + # Copies any assets to the output directory + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#389 + def copy_assets; end + + # @param file [String] the filename to validate + # @param check_exists [Boolean] whether the file should exist on disk + # @return [Boolean] whether the file is allowed to be used + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#425 + def extra_file_valid?(file, check_exists = T.unsafe(nil)); end + + # Adds general options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#541 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array] each tokenized argument + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#516 + def optparse(*args); end + + # Adds output options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#586 + def output_options(opts); end + + # Parses the file arguments into Ruby files and extra files, which are + # separated by a '-' element. + # + # @example Parses a set of Ruby source files + # parse_files %w(file1 file2 file3) + # @example Parses a set of Ruby files with a separator and extra files + # parse_files %w(file1 file2 - extrafile1 extrafile2) + # @param files [Array] the list of files to parse + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#446 + def parse_files(*files); end + + # Prints a list of all objects + # + # @return [void] + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#403 + def print_list; end + + # Generates output for objects + # + # @param checksums [Hash, nil] if supplied, a list of checksums for files. + # @return [void] + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yardoc.rb#340 + def run_generate(checksums); end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array] a list of code objects + # @return [Array] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/cli/yardoc.rb#502 + def run_verifier(list); end + + # Adds tag options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#753 + def tag_options(opts); end + + # Verifies that the markup options are valid before parsing any code. + # Failing early is better than failing late. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#364 + def verify_markup_options; end +end + +# Default options used in +yard doc+ command. +# +# source://yard//lib/yard/cli/yardoc.rb#8 +class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file; end + + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file=(_arg0); end + + # @return [Array] the list of extra files rendered along with objects + # + # source://yard//lib/yard/options.rb#82 + def files; end + + # source://yard//lib/yard/options.rb#82 + def files=(_arg0); end + + # @return [Symbol] the default output format (:html). + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index; end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index=(_arg0); end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item; end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item=(_arg0); end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale; end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale=(_arg0); end + + # @return [Array] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects; end + + # @return [Array] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects=(_arg0); end + + # @return [Boolean] whether the data should be rendered in a single page, + # if the template supports it. + # + # source://yard//lib/yard/options.rb#82 + def onefile; end + + # source://yard//lib/yard/options.rb#82 + def onefile=(_arg0); end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme; end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme=(_arg0); end + + # @return [Serializers::Base] the default serializer for generating output + # to disk. + # + # source://yard//lib/yard/options.rb#82 + def serializer; end + + # source://yard//lib/yard/options.rb#82 + def serializer=(_arg0); end + + # @return [String] the default title appended to each generated page + # + # source://yard//lib/yard/options.rb#82 + def title; end + + # source://yard//lib/yard/options.rb#82 + def title=(_arg0); end + + # @return [Verifier] the default verifier object to filter queries + # + # source://yard//lib/yard/options.rb#82 + def verifier; end + + # source://yard//lib/yard/options.rb#82 + def verifier=(_arg0); end +end + +# Abstract base class for command that reads .yardopts file +# +# @abstract +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#10 +class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command + # Creates a new command that reads .yardopts + # + # @return [YardoptsCommand] a new instance of YardoptsCommand + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#25 + def initialize; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file=(_arg0); end + + # Parses commandline arguments + # + # @param args [Array] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardopts_command.rb#36 + def parse_arguments(*args); end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file; end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file=(_arg0); end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file; end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file=(_arg0); end + + protected + + # Adds --[no-]yardopts / --[no-]document + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#48 + def yardopts_options(opts); end + + private + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#92 + def parse_rdoc_document_file(file = T.unsafe(nil)); end + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#96 + def parse_yardopts(file = T.unsafe(nil)); end + + # Parses out the yardopts/document options + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#78 + def parse_yardopts_options(*args); end + + # Reads a .document file in the directory to get source file globs + # + # @return [Array] an array of files parsed from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#102 + def support_rdoc_document_file!(file = T.unsafe(nil)); end + + # Parses the .yardopts file for default yard options + # + # @return [Array] an array of options parsed from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#70 + def yardopts(file = T.unsafe(nil)); end +end + +# The configuration filename to load extra options from +# +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#12 +YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String) + +# @deprecated Use {Config::CONFIG_DIR} +# +# source://yard//lib/yard.rb#13 +YARD::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# A "code object" is defined as any entity in the Ruby language. +# Classes, modules, methods, class variables and constants are the +# major objects, but DSL languages can create their own by inheriting +# from {CodeObjects::Base}. +# +# source://yard//lib/yard/autoload.rb#29 +module YARD::CodeObjects + extend ::YARD::CodeObjects::NamespaceMapper +end + +# All builtin Ruby classes and modules. +# +# source://yard//lib/yard/code_objects/base.rb#91 +YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array) + +# All builtin Ruby classes for inheritance tree. +# +# @note MatchingData is a 1.8.x legacy class +# +# source://yard//lib/yard/code_objects/base.rb#78 +YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array) + +# All builtin Ruby exception classes for inheritance tree. +# +# source://yard//lib/yard/code_objects/base.rb#67 +YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups) +# +# source://yard//lib/yard/code_objects/base.rb#94 +YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash) + +# All builtin Ruby modules for mixin handling. +# +# source://yard//lib/yard/code_objects/base.rb#87 +YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) + +# +Base+ is the superclass of all code objects recognized by YARD. A code +# object is any entity in the Ruby language (class, method, module). A +# DSL might subclass +Base+ to create a new custom object representing +# a new entity type. +# +# == Registry Integration +# Any created object associated with a namespace is immediately registered +# with the registry. This allows the Registry to act as an identity map +# to ensure that no object is represented by more than one Ruby object +# in memory. A unique {#path} is essential for this identity map to work +# correctly. +# +# == Custom Attributes +# Code objects allow arbitrary custom attributes to be set using the +# {#[]=} assignment method. +# +# == Namespaces +# There is a special type of object called a "namespace". These are subclasses +# of the {NamespaceObject} and represent Ruby entities that can have +# objects defined within them. Classically these are modules and classes, +# though a DSL might create a custom {NamespaceObject} to describe a +# specific set of objects. +# +# == Separators +# Custom classes with different separator tokens should define their own +# separators using the {NamespaceMapper.register_separator} method. The +# standard Ruby separators have already been defined ('::', '#', '.', etc). +# +# @abstract This class should not be used directly. Instead, create a +# subclass that implements {#path}, {#sep} or {#type}. You might also +# need to register custom separators if {#sep} uses alternate separator +# tokens. +# @see Registry +# @see #path +# @see #[]= +# @see NamespaceObject +# @see NamespaceMapper.register_separator +# +# source://yard//lib/yard/code_objects/base.rb#133 +class YARD::CodeObjects::Base + # Creates a new code object + # + # @example Create a method in the root namespace + # CodeObjects::Base.new(:root, '#method') # => # + # @example Create class Z inside namespace X::Y + # CodeObjects::Base.new(P("X::Y"), :Z) # or + # CodeObjects::Base.new(Registry.root, "X::Y") + # @param namespace [NamespaceObject] the namespace the object belongs in, + # {Registry.root} or :root should be provided if it is associated with + # the top level namespace. + # @param name [Symbol, String] the name (or complex path) of the object. + # @return [Base] the newly created object + # @yield [self] a block to perform any extra initialization on the object + # @yieldparam self [Base] the newly initialized code object + # + # source://yard//lib/yard/code_objects/base.rb#238 + def initialize(namespace, name, *_arg2); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#323 + def ==(other); end + + # Accesses a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @return [Object, nil] the custom attribute or nil if not found. + # @see #[]= + # + # source://yard//lib/yard/code_objects/base.rb#343 + def [](key); end + + # Sets a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @param value [Object] the value to associate + # @return [void] + # @see #[] + # + # source://yard//lib/yard/code_objects/base.rb#356 + def []=(key, value); end + + # Associates a file with a code object, optionally adding the line where it was defined. + # By convention, '' should be used to associate code that comes form standard input. + # + # @param file [String] the filename ('' for standard input) + # @param line [Fixnum, nil] the line number where the object lies in the file + # @param has_comments [Boolean] whether or not the definition has comments associated. This + # will allow {#file} to return the definition where the comments were made instead + # of any empty definitions that might have been parsed before (module namespaces for instance). + # @raise [ArgumentError] + # + # source://yard//lib/yard/code_objects/base.rb#290 + def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end + + # Add tags to the {#docstring} + # + # @see Docstring#add_tag + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#561 + def add_tag(*tags); end + + # The non-localized documentation string associated with the object + # + # @return [Docstring] the documentation string + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#166 + def base_docstring; end + + # Copies all data in this object to another code object, except for + # uniquely identifying information (path, namespace, name, scope). + # + # @param other [Base] the object to copy data to + # @return [Base] the other object + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#263 + def copy_to(other); end + + # The documentation string associated with the object + # + # @param locale [String, I18n::Locale] (I18n::Locale.default) + # the locale of the documentation string. + # @return [Docstring] the documentation string + # + # source://yard//lib/yard/code_objects/base.rb#405 + def docstring(locale = T.unsafe(nil)); end + + # Attaches a docstring to a code object by parsing the comments attached to the statement + # and filling the {#tags} and {#docstring} methods with the parsed information. + # + # @param comments [String, Array, Docstring] the comments attached to the code object to be parsed + # into a docstring and meta tags. + # + # source://yard//lib/yard/code_objects/base.rb#427 + def docstring=(comments); end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic; end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic=(_arg0); end + + # Is the object defined conditionally at runtime? + # + # @return [Boolean] + # @see #dynamic + # + # source://yard//lib/yard/code_objects/base.rb#178 + def dynamic?; end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#323 + def eql?(other); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#323 + def equal?(other); end + + # Returns the filename the object was first parsed at, taking + # definitions with docstrings first. + # + # @return [String] a filename + # @return [nil] if there is no file associated with the object + # + # source://yard//lib/yard/code_objects/base.rb#307 + def file; end + + # The files the object was defined in. To add a file, use {#add_file}. + # + # @return [Array] a list of files + # @see #add_file + # + # source://yard//lib/yard/code_objects/base.rb#137 + def files; end + + # Renders the object using the {Templates::Engine templating system}. + # + # @example Formats a class in plaintext + # puts P('MyClass').format + # @example Formats a method in html with rdoc markup + # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a set of options to pass to the template + # @return [String] the rendered template + # @see Templates::Engine#render + # + # source://yard//lib/yard/code_objects/base.rb#505 + def format(options = T.unsafe(nil)); end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group; end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group=(_arg0); end + + # Tests if the {#docstring} has a tag + # + # @return [Boolean] + # @see Docstring#has_tag? + # + # source://yard//lib/yard/code_objects/base.rb#556 + def has_tag?(name); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/base.rb#334 + def hash; end + + # Inspects the object, returning the type and path + # + # @return [String] a string describing the object + # + # source://yard//lib/yard/code_objects/base.rb#513 + def inspect; end + + # Returns the line the object was first parsed at (or nil) + # + # @return [Fixnum] the line where the object was first defined. + # @return [nil] if there is no line associated with the object + # + # source://yard//lib/yard/code_objects/base.rb#315 + def line; end + + # @overload dynamic_attr_name + # @overload dynamic_attr_name= + # + # source://yard//lib/yard/code_objects/base.rb#373 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/base.rb#278 + def name(prefix = T.unsafe(nil)); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def namespace; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#522 + def namespace=(obj); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def parent; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#522 + def parent=(obj); end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#453 + def path; end + + # @param other [Base, String] another code object (or object path) + # @return [String] the shortest relative path from this object to +other+ + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/base.rb#475 + def relative_path(other); end + + # @return [Boolean] whether or not this object is a RootObject + # + # source://yard//lib/yard/code_objects/base.rb#567 + def root?; end + + # Override this method with a custom component separator. For instance, + # {MethodObject} implements sep as '#' or '.' (depending on if the + # method is instance or class respectively). {#path} depends on this + # value to generate the full path in the form: namespace.path + sep + name + # + # @return [String] the component that separates the namespace path + # and the name (default is {NSEP}) + # + # source://yard//lib/yard/code_objects/base.rb#576 + def sep; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature=(_arg0); end + + # The source code associated with the object + # + # @return [String, nil] source, if present, or nil + # + # source://yard//lib/yard/code_objects/base.rb#146 + def source; end + + # Attaches source code to a code object with an optional file location + # + # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source + # as a +String+ for the definition of the code object only (not the block) + # + # source://yard//lib/yard/code_objects/base.rb#388 + def source=(statement); end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type; end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type=(_arg0); end + + # Gets a tag from the {#docstring} + # + # @see Docstring#tag + # + # source://yard//lib/yard/code_objects/base.rb#548 + def tag(name); end + + # Gets a list of tags from the {#docstring} + # + # @see Docstring#tags + # + # source://yard//lib/yard/code_objects/base.rb#552 + def tags(name = T.unsafe(nil)); end + + # @note Override this method if your object has a special title that does + # not match the {#path} attribute value. This title will be used + # when linking or displaying the object. + # @return [String] the display title for an object + # @see 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#468 + def title; end + + # @return [nil] this object does not turn into an array + # + # source://yard//lib/yard/code_objects/base.rb#337 + def to_ary; end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#453 + def to_s; end + + # Default type is the lowercase class name without the "Object" suffix. + # Override this method to provide a custom object type + # + # @return [Symbol] the type of code object this represents + # + # source://yard//lib/yard/code_objects/base.rb#437 + def type; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#181 + def visibility; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#183 + def visibility=(v); end + + protected + + # Override this method if your code object subclass does not allow + # copying of certain attributes. + # + # @return [Array] the list of instance variable names (without + # "@" prefix) that should be copied when {#copy_to} is called + # @see #copy_to + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#587 + def copyable_attributes; end + + private + + # Formats source code by removing leading indentation + # + # @param source [String] the source code to format + # @return [String] formatted source + # + # source://yard//lib/yard/code_objects/base.rb#599 + def format_source(source); end + + # source://yard//lib/yard/code_objects/base.rb#606 + def translate_docstring(locale); end + + class << self + # Compares the class with subclasses + # + # @param other [Object] the other object to compare classes with + # @return [Boolean] true if other is a subclass of self + # + # source://yard//lib/yard/code_objects/base.rb#219 + def ===(other); end + + # Allocates a new code object + # + # @raise [ArgumentError] + # @return [Base] + # @see #initialize + # @yield [obj] + # + # source://yard//lib/yard/code_objects/base.rb#189 + def new(namespace, name, *args, &block); end + end +end + +# Regular expression to match constant name +# +# source://yard//lib/yard/code_objects/base.rb#52 +YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match the beginning of a constant +# +# source://yard//lib/yard/code_objects/base.rb#55 +YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp) + +# Class method separator +# +# source://yard//lib/yard/code_objects/base.rb#46 +YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted class method separator +# +# source://yard//lib/yard/code_objects/base.rb#49 +YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) + +# A ClassObject represents a Ruby class in source code. It is a {ModuleObject} +# with extra inheritance semantics through the superclass. +# +# source://yard//lib/yard/code_objects/class_object.rb#7 +class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject + # Creates a new class object in +namespace+ with +name+ + # + # @return [ClassObject] a new instance of ClassObject + # @see Base.new + # + # source://yard//lib/yard/code_objects/class_object.rb#15 + def initialize(namespace, name, *args, &block); end + + # Returns the list of constants matching the options hash. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array] the list of constant that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#101 + def constants(opts = T.unsafe(nil)); end + + # Returns the inheritance tree of the object including self. + # + # @param include_mods [Boolean] whether or not to include mixins in the + # inheritance tree. + # @return [Array] the list of code objects that make up + # the inheritance tree. + # + # source://yard//lib/yard/code_objects/class_object.rb#45 + def inheritance_tree(include_mods = T.unsafe(nil)); end + + # Returns only the constants that were inherited. + # + # @return [Array] the list of inherited constant objects + # + # source://yard//lib/yard/code_objects/class_object.rb#109 + def inherited_constants; end + + # Returns only the methods that were inherited. + # + # @return [Array] the list of inherited method objects + # + # source://yard//lib/yard/code_objects/class_object.rb#79 + def inherited_meths(opts = T.unsafe(nil)); end + + # Whether or not the class is a Ruby Exception + # + # @return [Boolean] whether the object represents a Ruby exception + # + # source://yard//lib/yard/code_objects/class_object.rb#35 + def is_exception?; end + + # Returns the list of methods matching the options hash. Returns + # all methods if hash is empty. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array] the list of methods that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#66 + def meths(opts = T.unsafe(nil)); end + + # The {ClassObject} that this class object inherits from in Ruby source. + # + # @return [ClassObject] a class object that is the superclass of this one + # + # source://yard//lib/yard/code_objects/class_object.rb#10 + def superclass; end + + # Sets the superclass of the object + # + # @param object [Base, Proxy, String, Symbol, nil] the superclass value + # @return [void] + # + # source://yard//lib/yard/code_objects/class_object.rb#125 + def superclass=(object); end +end + +# Represents a class variable inside a namespace. The path is expressed +# in the form "A::B::@@classvariable" +# +# source://yard//lib/yard/code_objects/class_variable_object.rb#7 +class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value; end + + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value=(_arg0); end +end + +# A list of code objects. This array acts like a set (no unique items) +# but also disallows any {Proxy} objects from being added. +# +# source://yard//lib/yard/code_objects/base.rb#6 +class YARD::CodeObjects::CodeObjectList < ::Array + # Creates a new object list associated with a namespace + # + # @param owner [NamespaceObject] the namespace the list should be associated with + # @return [CodeObjectList] + # + # source://yard//lib/yard/code_objects/base.rb#11 + def initialize(owner = T.unsafe(nil)); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def <<(value); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def push(value); end +end + +# A +ConstantObject+ represents a Ruby constant (not a module or class). +# To access the constant's (source code) value, use {#value}. +# +# source://yard//lib/yard/code_objects/constant_object.rb#7 +class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base + # The source code representing the constant's value + # + # @return [String] the value the constant is set to + # + # source://yard//lib/yard/code_objects/constant_object.rb#10 + def value; end + + # source://yard//lib/yard/code_objects/constant_object.rb#12 + def value=(value); end +end + +# Represents an instance method of a module that was mixed into the class +# scope of another namespace. +# +# @see MethodObject +# +# source://yard//lib/yard/code_objects/extended_method_object.rb#7 +class YARD::CodeObjects::ExtendedMethodObject + # Sets up a delegate for {MethodObject} obj. + # + # @param obj [MethodObject] the instance method to treat as a mixed in + # class method on another namespace. + # @return [ExtendedMethodObject] a new instance of ExtendedMethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#17 + def initialize(obj); end + + # Sends all methods to the {MethodObject} assigned in {#initialize} + # + # @see #initialize + # @see MethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#22 + def method_missing(sym, *args, &block); end + + # @return [Symbol] always +:class+ + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#11 + def scope; end +end + +# An ExtraFileObject represents an extra documentation file (README or other +# file). It is not strictly a CodeObject (does not inherit from `Base`) although +# it implements `path`, `name` and `type`, and therefore should be structurally +# compatible with most CodeObject interfaces. +# +# source://yard//lib/yard/code_objects/extra_file_object.rb#7 +class YARD::CodeObjects::ExtraFileObject + # Creates a new extra file object. + # + # @param filename [String] the location on disk of the file + # @param contents [String] the file contents. If not set, the contents + # will be read from disk using the +filename+. + # @return [ExtraFileObject] a new instance of ExtraFileObject + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#18 + def initialize(filename, contents = T.unsafe(nil)); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def ==(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#30 + def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#9 + def attributes=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#39 + def contents; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#44 + def contents=(contents); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def eql?(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def equal?(other); end + + # Returns the value of attribute filename. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename; end + + # Sets the attribute filename + # + # @param value the value to set the attribute filename to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#70 + def hash; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def inspect; end + + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#12 + def locale; end + + # @param locale [String] the locale name to be translated. + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#52 + def locale=(locale); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name=(_arg0); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def path; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#35 + def title; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def to_s; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#62 + def type; end + + private + + # source://yard//lib/yard/code_objects/extra_file_object.rb#74 + def ensure_parsed; end + + # @param data [String] the file contents + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#81 + def parse_contents(data); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#129 + def translate(data); end +end + +# Instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#40 +YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String) + +# Regex-quoted instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#43 +YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String) + +# Regular expression to match a fully qualified method def (self.foo, Class.foo). +# +# source://yard//lib/yard/code_objects/base.rb#64 +YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match a method name +# +# source://yard//lib/yard/code_objects/base.rb#61 +YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) + +# A MacroObject represents a docstring defined through +@!macro NAME+ and can be +# reused by specifying the tag +@!macro NAME+. You can also provide the +# +attached+ type flag to the macro definition to have it attached to the +# specific DSL method so it will be implicitly reused. +# +# Macros are fully described in the {file:docs/Tags.md#macro Tags Overview} +# document. +# +# @example Creating a basic named macro +# # @!macro prop +# # @!method $1(${3-}) +# # @return [$2] the value of the $0 +# property :foo, String, :a, :b +# +# # @!macro prop +# property :bar, Numeric, :value +# @example Creating a macro that is attached to the method call +# # @!macro [attach] prop2 +# # @!method $1(value) +# property :foo +# +# # Extra data added to docstring +# property :bar +# +# source://yard//lib/yard/code_objects/macro_object.rb#30 +class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base + # @return [Boolean] whether this macro is attached to a method + # + # source://yard//lib/yard/code_objects/macro_object.rb#149 + def attached?; end + + # Expands the macro using + # + # @example Expanding a Macro + # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> + # "...macro data interpolating this line of code..." + # @param call_params [Array] a list of tokens that are passed + # to the method call + # @param full_source [String] the full method call (not including the block) + # @param block_source [String] the source passed in the block of the method + # call, if there is a block. + # @see expand + # + # source://yard//lib/yard/code_objects/macro_object.rb#167 + def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data; end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data=(_arg0); end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object; end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object=(_arg0); end + + # Overrides {Base#path} so the macro path is ".macro.MACRONAME" + # + # source://yard//lib/yard/code_objects/macro_object.rb#152 + def path; end + + # Overrides the separator to be '.' + # + # source://yard//lib/yard/code_objects/macro_object.rb#155 + def sep; end + + class << self + # Applies a macro on a docstring by creating any macro data inside of + # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} + # on the new macro object. + # + # @param docstring [Docstring] the docstring to create a macro out of + # @param call_params [Array] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # @see find_or_create + # + # source://yard//lib/yard/code_objects/macro_object.rb#120 + def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end + + # Applies a macro to a docstring, interpolating the macro's data on the + # docstring and appending any extra local docstring data that was in + # the original +docstring+ object. + # + # @param macro [MacroObject] the macro object + # @param call_params [Array] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # + # source://yard//lib/yard/code_objects/macro_object.rb#136 + def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Creates a new macro and fills in the relevant properties. + # + # @param macro_name [String] the name of the macro, must be unique. + # @param data [String] the data the macro should expand when re-used + # @param method_object [CodeObjects::Base] an object to attach this + # macro to. If supplied, {#attached?} will be true + # @return [MacroObject] the newly created object + # + # source://yard//lib/yard/code_objects/macro_object.rb#40 + def create(macro_name, data, method_object = T.unsafe(nil)); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end + + # Expands +macro_data+ using the interpolation parameters. + # + # Interpolation rules: + # * $0, $1, $2, ... = the Nth parameter in +call_params+ + # * $* = the full statement source (excluding block) + # * Also supports $!{N-M} ranges, as well as negative indexes on N or M + # * Use \$ to escape the variable name in a macro. + # + # @param macro_data [String] the macro data to expand (taken from {#macro_data}) + # + # source://yard//lib/yard/code_objects/macro_object.rb#93 + def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Finds a macro using +macro_name+ + # + # @param macro_name [#to_s] the name of the macro + # @return [MacroObject] if a macro is found + # @return [nil] if there is no registered macro by that name + # + # source://yard//lib/yard/code_objects/macro_object.rb#51 + def find(macro_name); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end + end +end + +# source://yard//lib/yard/code_objects/macro_object.rb#31 +YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) + +# Represents a Ruby method in source +# +# source://yard//lib/yard/code_objects/method_object.rb#7 +class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base + # Creates a new method object in +namespace+ with +name+ and an instance + # or class +scope+ + # + # If scope is +:module+, this object is instantiated as a public + # method in +:class+ scope, but also creates a new (empty) method + # as a private +:instance+ method on the same class or module. + # + # @param namespace [NamespaceObject] the namespace + # @param name [String, Symbol] the method name + # @param scope [Symbol] +:instance+, +:class+, or +:module+ + # @return [MethodObject] a new instance of MethodObject + # + # source://yard//lib/yard/code_objects/method_object.rb#37 + def initialize(namespace, name, scope = T.unsafe(nil), &block); end + + # Returns all alias names of the object + # + # @return [Array] the alias names + # + # source://yard//lib/yard/code_objects/method_object.rb#149 + def aliases; end + + # Returns the read/writer info for the attribute if it is one + # + # @return [SymbolHash] if there is information about the attribute + # @return [nil] if the method is not an attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#93 + def attr_info; end + + # @return [Boolean] whether or not the method is the #initialize constructor method + # + # source://yard//lib/yard/code_objects/method_object.rb#78 + def constructor?; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit=(_arg0); end + + # Tests if the object is defined as an alias of another method + # + # @return [Boolean] whether the object is an alias + # + # source://yard//lib/yard/code_objects/method_object.rb#126 + def is_alias?; end + + # Tests if the object is defined as an attribute in the namespace + # + # @return [Boolean] whether the object is an attribute + # + # source://yard//lib/yard/code_objects/method_object.rb#114 + def is_attribute?; end + + # Tests boolean {#explicit} value. + # + # @return [Boolean] whether the method is explicitly defined in source + # + # source://yard//lib/yard/code_objects/method_object.rb#134 + def is_explicit?; end + + # @return [Boolean] whether or not this method was created as a module + # function + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#85 + def module_function?; end + + # Returns the name of the object. + # + # @example The name of an instance method (with prefix) + # an_instance_method.name(true) # => "#mymethod" + # @example The name of a class method (with prefix) + # a_class_method.name(true) # => "mymethod" + # @param prefix [Boolean] whether or not to show the prefix + # @return [String] returns {#sep} + +name+ for an instance method if + # prefix is true + # @return [Symbol] the name without {#sep} if prefix is set to false + # + # source://yard//lib/yard/code_objects/method_object.rb#175 + def name(prefix = T.unsafe(nil)); end + + # @return [MethodObject] the object that this method overrides + # @return [nil] if it does not override a method + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#141 + def overridden_method; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters=(_arg0); end + + # Override path handling for instance methods in the root namespace + # (they should still have a separator as a prefix). + # + # @return [String] the path of a method + # + # source://yard//lib/yard/code_objects/method_object.rb#161 + def path; end + + # @return [Boolean] whether the method is a reader attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#107 + def reader?; end + + # The scope of the method (+:class+ or +:instance+) + # + # @return [Symbol] the scope + # + # source://yard//lib/yard/code_objects/method_object.rb#11 + def scope; end + + # Changes the scope of an object from :instance or :class + # + # @param v [Symbol] the new scope + # + # source://yard//lib/yard/code_objects/method_object.rb#58 + def scope=(v); end + + # Override separator to differentiate between class and instance + # methods. + # + # @return [String] "#" for an instance method, "." for class + # + # source://yard//lib/yard/code_objects/method_object.rb#182 + def sep; end + + # @return [Boolean] whether the method is a writer attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#100 + def writer?; end + + protected + + # source://yard//lib/yard/code_objects/method_object.rb#192 + def copyable_attributes; end +end + +# Represents a Ruby module. +# +# source://yard//lib/yard/code_objects/module_object.rb#6 +class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject + # Returns the inheritance tree of mixins. + # + # @param include_mods [Boolean] if true, will include mixed in + # modules (which is likely what is wanted). + # @return [Array] a list of namespace objects + # + # source://yard//lib/yard/code_objects/module_object.rb#12 + def inheritance_tree(include_mods = T.unsafe(nil)); end +end + +# Regular expression to match namespaces (const A or complex path A::B) +# +# source://yard//lib/yard/code_objects/base.rb#58 +YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp) + +# Namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#34 +YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#37 +YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String) + +# This module controls registration and accessing of namespace separators +# for {Registry} lookup. +# +# @since 0.9.1 +# +# source://yard//lib/yard/code_objects/namespace_mapper.rb#8 +module YARD::CodeObjects::NamespaceMapper + # Clears the map of separators. + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#55 + def clear_separators; end + + # Gets or sets the default separator value to use when no + # separator for the namespace can be determined. + # + # @example + # default_separator "::" + # @param value [String, nil] the default separator, or nil to return the + # value + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#68 + def default_separator(value = T.unsafe(nil)); end + + # Registers a separator with an optional set of valid types that + # must follow the separator lexically. + # + # Calls all callbacks defined by {NamespaceMapper.on_invalidate} after + # the separator is registered. + # + # @example Registering separators for a method object + # # Anything after a "#" denotes a method object + # register_separator "#", :method + # # Anything after a "." denotes a method object + # register_separator ".", :method + # @param sep [String] the separator string for the namespace + # @param valid_types [Array] a list of object types that + # must follow the separator. If the list is empty, any type can + # follow the separator. + # @see .on_invalidate + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#27 + def register_separator(sep, *valid_types); end + + # @return [Array] all of the registered separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#80 + def separators; end + + # @param type [String] the type to return separators for + # @return [Array] a list of separators registered to a type + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#97 + def separators_for_type(type); end + + # @return [Regexp] the regexp match of all separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#85 + def separators_match; end + + # @param sep [String] the separator to return types for + # @return [Array] a list of types registered to a separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#91 + def types_for_separator(sep); end + + # Unregisters a separator by a type. + # + # @param type [Symbol] the type to unregister + # @see #register_separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#43 + def unregister_separator_by_type(type); end + + class << self + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator; end + + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator=(_arg0); end + + # Invalidates all separators + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#125 + def invalidate; end + + # @return [Hash] a mapping of types to separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#114 + def map; end + + # @return [Regexp] the full list of separators as a regexp match + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#131 + def map_match; end + + # Adds a callback that triggers when a new separator is registered or + # the cache is cleared by invalidation. + # + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#107 + def on_invalidate(&block); end + + # @return [Hash] a reverse mapping of separators to types + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#119 + def rev_map; end + end +end + +# A "namespace" is any object that can store other objects within itself. +# The two main Ruby objects that can act as namespaces are modules +# ({ModuleObject}) and classes ({ClassObject}). +# +# source://yard//lib/yard/code_objects/namespace_object.rb#9 +class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base + # Creates a new namespace object inside +namespace+ with +name+. + # + # @return [NamespaceObject] a new instance of NamespaceObject + # @see Base#initialize + # + # source://yard//lib/yard/code_objects/namespace_object.rb#56 + def initialize(namespace, name, *args, &block); end + + # A hash containing two keys, :class and :instance, each containing + # a hash of objects and their alias names. + # + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#44 + def aliases; end + + # A hash containing two keys, class and instance, each containing + # the attribute name with a { :read, :write } hash for the read and + # write objects respectively. + # + # @example The attributes of an object + # >> Registry.at('YARD::Docstring').attributes + # => { + # :class => { }, + # :instance => { + # :ref_tags => { + # :read => #, + # :write => nil + # }, + # :object => { + # :read => #, + # :write => # + # }, + # ... + # } + # } + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#39 + def attributes; end + + # Looks for a child that matches the attributes specified by +opts+. + # + # @example Finds a child by name and scope + # namespace.child(:name => :to_s, :scope => :instance) + # # => # + # @return [Base, nil] the first matched child object, or nil + # + # source://yard//lib/yard/code_objects/namespace_object.rb#86 + def child(opts = T.unsafe(nil)); end + + # The list of objects defined in this namespace + # + # @return [Array] a list of objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#16 + def children; end + + # Only the class attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#69 + def class_attributes; end + + # Class mixins + # + # @return [Array] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#48 + def class_mixins; end + + # Returns all constants in the namespace + # + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#164 + def constants(opts = T.unsafe(nil)); end + + # Returns class variables defined in this namespace. + # + # @return [Array] a list of class variable objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#186 + def cvars; end + + # @return [Array] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups; end + + # @return [Array] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups=(_arg0); end + + # Returns constants included from any mixins + # + # @return [Array] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#172 + def included_constants; end + + # Returns methods included from any mixins that match the attributes + # specified by +opts+. If no options are specified, returns all included + # methods. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @see #meths + # + # source://yard//lib/yard/code_objects/namespace_object.rb#144 + def included_meths(opts = T.unsafe(nil)); end + + # Only the instance attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#76 + def instance_attributes; end + + # Instance mixins + # + # @return [Array] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#52 + def instance_mixins; end + + # Returns all methods that match the attributes specified by +opts+. If + # no options are provided, returns all methods. + # + # @example Finds all private and protected class methods + # namespace.meths(:visibility => [:private, :protected], :scope => :class) + # # => [#, #] + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array] a list of method objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#113 + def meths(opts = T.unsafe(nil)); end + + # Returns for specific scopes. If no scopes are provided, returns all mixins. + # + # @param scopes [Array] a list of scopes (:class, :instance) to + # return mixins for. If this is empty, all scopes will be returned. + # @return [Array] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#194 + def mixins(*scopes); end +end + +# @private +# +# source://yard//lib/yard/code_objects/proxy.rb#8 +YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) + +# The Proxy class is a way to lazily resolve code objects in +# cases where the object may not yet exist. A proxy simply stores +# an unresolved path until a method is called on the object, at which +# point it does a lookup using {Registry.resolve}. If the object is +# not found, a warning is raised and {ProxyMethodError} might be raised. +# +# @example Creates a Proxy to the String class from a module +# # When the String class is parsed this method will +# # begin to act like the String ClassObject. +# Proxy.new(mymoduleobj, "String") +# @see Registry.resolve +# @see ProxyMethodError +# +# source://yard//lib/yard/code_objects/proxy.rb#24 +class YARD::CodeObjects::Proxy + # Creates a new Proxy + # + # @raise [ArgumentError] if namespace is not a NamespaceObject + # @return [Proxy] self + # + # source://yard//lib/yard/code_objects/proxy.rb#34 + def initialize(namespace, name, type = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#118 + def <=>(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def ==(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#113 + def ===(other); end + + # Returns the class name of the object the proxy is mimicking, if + # resolved. Otherwise returns +Proxy+. + # + # @return [Class] the resolved object's class or +Proxy+ + # + # source://yard//lib/yard/code_objects/proxy.rb#142 + def class; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def equal?(other); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/proxy.rb#137 + def hash; end + + # Returns a text representation of the Proxy + # + # @return [String] the object's #inspect method or P(OBJECTPATH) + # + # source://yard//lib/yard/code_objects/proxy.rb#91 + def inspect; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#161 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#108 + def is_a?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#166 + def kind_of?(klass); end + + # Dispatches the method to the resolved object. + # + # @raise [ProxyMethodError] if the proxy cannot find the real object + # + # source://yard//lib/yard/code_objects/proxy.rb#178 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/proxy.rb#85 + def name(prefix = T.unsafe(nil)); end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def namespace; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def parent; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#171 + def respond_to?(meth, include_private = T.unsafe(nil)); end + + # This class is never a root object + # + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#200 + def root?; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def title; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_s; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_str; end + + # Returns the type of the proxy. If it cannot be resolved at the + # time of the call, it will either return the inferred proxy type + # (see {#type=}) or +:proxy+ + # + # @return [Symbol] the Proxy's type + # @see #type= + # + # source://yard//lib/yard/code_objects/proxy.rb#151 + def type; end + + # Allows a parser to infer the type of the proxy by its path. + # + # @param type [#to_sym] the proxy's inferred type + # @return [void] + # + # source://yard//lib/yard/code_objects/proxy.rb#158 + def type=(type); end + + private + + # source://yard//lib/yard/code_objects/proxy.rb#228 + def proxy_path; end + + # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136 + # + # source://yard//lib/yard/code_objects/proxy.rb#205 + def to_ary; end + + # Attempts to find the object that this unresolved object + # references by checking if any objects by this name are + # registered all the way up the namespace tree. + # + # @return [Base, nil] the registered code object or nil + # + # source://yard//lib/yard/code_objects/proxy.rb#212 + def to_obj; end + + class << self + # source://yard//lib/yard/code_objects/proxy.rb#25 + def ===(other); end + end +end + +# A special type of +NoMethodError+ when raised from a {Proxy} +# +# source://yard//lib/yard/code_objects/proxy.rb#5 +class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end + +# Represents the root namespace object (the invisible Ruby module that +# holds all top level modules, class and other objects). +# +# source://yard//lib/yard/code_objects/root_object.rb#6 +class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#12 + def equal?(other); end + + # source://yard//lib/yard/code_objects/root_object.rb#16 + def hash; end + + # source://yard//lib/yard/code_objects/root_object.rb#8 + def inspect; end + + # source://yard//lib/yard/code_objects/root_object.rb#7 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#9 + def root?; end + + # source://yard//lib/yard/code_objects/root_object.rb#10 + def title; end +end + +# This class maintains all system-wide configuration for YARD and handles +# the loading of plugins. To access options call {options}, and to load +# a plugin use {load_plugin}. All other public methods are used by YARD +# during load time. +# +# == User Configuration Files +# +# Persistent user configuration files can be stored in the file +# +~/.yard/config+, which is read when YARD first loads. The file should +# be formatted as YAML, and should contain a map of keys and values. +# +# Although you can specify any key-value mapping in the configuration file, +# YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}. +# +# An example of a configuration file is listed below: +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# +# == Automatic Loading of Plugins +# +# YARD 0.6.2 will no longer automatically load all plugins by default. This +# option can be reset by setting 'load_plugins' to true in the configuration +# file. In addition, you can specify a set of specific plugins to load on +# load through the 'autoload_plugins' list setting. This setting is +# independent of the 'load_plugins' value and will always be processed. +# +# == Ignored Plugins File +# +# YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify +# plugins to be ignored at load time. Ignored plugins in 0.6.2 and above +# should now be specified in the main configuration file, though YARD +# will support the +ignored_plugins+ file until 0.7.x. +# +# == Safe Mode +# +# YARD supports running in safe-mode. By doing this, it will avoid executing +# any user code such as require files or queries. Plugins will still be +# loaded with safe mode on, because plugins are properly namespaced with +# a 'yard-' prefix, must be installed as a gem, and therefore cannot be +# touched by the user. To specify safe mode, use the +safe_mode+ key. +# +# == Plugin Specific Configuration +# +# Additional settings can be defined within the configuration file +# specifically to provide configuration for a plugin. A plugin that utilizes +# the YARD configuration is strongly encouraged to utilize namespacing of +# their configuration content. +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# # Plugin Specific Configuration +# yard-sample-plugin: +# show-results-inline: true +# +# As the configuration is available system wide, it can be +# accessed within the plugin code. +# +# +# if YARD::Config.options['yard-sample-plugin'] and +# YARD::Config.options['yard-sample-plugin']['show-results-inline'] +# # ... perform the action that places the results inline ... +# else +# # ... do the default behavior of not showing the results inline ... +# end +# +# When accessing the configuration, be aware that this file is user managed +# so configuration keys and values may not be present. Make no assumptions and +# instead ensure that you check for the existence of keys before proceeding to +# retrieve values. +# +# @see options +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#86 +class YARD::Config + class << self + # Legacy support for {IGNORED_PLUGINS} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#221 + def add_ignored_plugins_file; end + + # @return [Array] arguments from commandline and yardopts file + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#268 + def arguments; end + + # Loads settings from {CONFIG_FILE}. This method is called by YARD at + # load time and should not be called by the user. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#119 + def load; end + + # Load plugins set in :autoload_plugins + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#189 + def load_autoload_plugins; end + + # Load plugins from {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#194 + def load_commandline_plugins; end + + # Check for command-line safe_mode switch in {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#204 + def load_commandline_safemode; end + + # Load gem plugins if :load_plugins is true + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#169 + def load_gem_plugins; end + + # Loads an individual plugin by name. It is not necessary to include the + # +yard-+ plugin prefix here. + # + # @param name [String] the name of the plugin (with or without +yard-+ prefix) + # @return [Boolean] whether the plugin was successfully loaded + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#157 + def load_plugin(name); end + + # Print a warning if the plugin failed to load + # + # @return [false] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#214 + def load_plugin_failed(name, exception); end + + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#146 + def load_plugins; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options=(_arg0); end + + # Loads the YAML configuration file into memory + # + # @return [Hash] the contents of the YAML file from disk + # @see CONFIG_FILE + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#236 + def read_config_file; end + + # Saves settings to {CONFIG_FILE}. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#135 + def save; end + + # Sanitizes and normalizes a plugin name to include the 'yard-' prefix. + # + # @param name [String] the plugin name + # @return [String] the sanitized and normalized plugin name. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#252 + def translate_plugin_name(name); end + + # Translates plugin names to add yard- prefix. + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#228 + def translate_plugin_names; end + + # Temporarily loads .yardopts file into @yardopts + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#259 + def with_yardopts; end + end +end + +# The location where YARD stores user-specific settings +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#95 +YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# The main configuration YAML file. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#98 +YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String) + +# Default configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#105 +YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash) + +# File listing all ignored plugins +# +# @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead. +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#102 +YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String) + +# The prefix used for YARD plugins. Name your gem with this prefix +# to allow it to be used as a plugin. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#114 +YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp) + +# A documentation string, or "docstring" for short, encapsulates the +# comments and metadata, or "tags", of an object. Meta-data is expressed +# in the form +@tag VALUE+, where VALUE can span over multiple lines as +# long as they are indented. The following +@example+ tag shows how tags +# can be indented: +# +# # @example My example +# # a = "hello world" +# # a.reverse +# # @version 1.0 +# +# Tags can be nested in a documentation string, though the {Tags::Tag} +# itself is responsible for parsing the inner tags. +# +# source://yard//lib/yard/docstring.rb#16 +class YARD::Docstring < ::String + # Creates a new docstring with the raw contents attached to an optional + # object. Parsing will be done by the {DocstringParser} class. + # + # @example + # Docstring.new("hello world\n@return Object return", someobj) + # @note To properly parse directives with proper parser context within + # handlers, you should not use this method to create a Docstring. + # Instead, use the {parser}, which takes a handler object that + # can pass parser state onto directives. If a Docstring is created + # with this method, directives do not have access to any parser + # state, and may not function as expected. + # @param content [String] the raw comments to be parsed into a docstring + # and associated meta-data. + # @param object [CodeObjects::Base] an object to associate the docstring + # with. + # @return [Docstring] a new instance of Docstring + # + # source://yard//lib/yard/docstring.rb#103 + def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end + + # Adds another {Docstring}, copying over tags. + # + # @param other [Docstring, String] the other docstring (or string) to + # add. + # @return [Docstring] a new docstring with both docstrings combines + # + # source://yard//lib/yard/docstring.rb#116 + def +(other); end + + # Adds a tag or reftag object to the tag list. If you want to parse + # tag data based on the {Tags::DefaultFactory} tag factory, use + # {DocstringParser} instead. + # + # @param tags [Tags::Tag, Tags::RefTag] list of tag objects to add + # @return [void] + # + # source://yard//lib/yard/docstring.rb#242 + def add_tag(*tags); end + + # @return [String] the raw documentation (including raw tag text) + # + # source://yard//lib/yard/docstring.rb#53 + def all; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def all=(content, parse = T.unsafe(nil)); end + + # Returns true if the docstring has no content that is visible to a template. + # + # @param only_visible_tags [Boolean] whether only {Tags::Library.visible_tags} + # should be checked, or if all tags should be considered. + # @return [Boolean] whether or not the docstring has content + # + # source://yard//lib/yard/docstring.rb#310 + def blank?(only_visible_tags = T.unsafe(nil)); end + + # Deletes all tags where the block returns true + # + # @return [void] + # @since 0.7.0 + # @yieldparam tag [Tags::Tag] the tag that is being tested + # @yieldreturn [Boolean] true if the tag should be deleted + # + # source://yard//lib/yard/docstring.rb#300 + def delete_tag_if(&block); end + + # Delete all tags with +name+ + # + # @param name [String] the tag name + # @return [void] + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#291 + def delete_tags(name); end + + # Deep-copies a docstring + # + # @note This method creates a new docstring with new tag lists, but does + # not create new individual tags. Modifying the tag objects will still + # affect the original tags. + # @return [Docstring] a new copied docstring + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#153 + def dup; end + + # Returns true if at least one tag by the name +name+ was declared + # + # @param name [String] the tag name to search for + # @return [Boolean] whether or not the tag +name+ was declared + # + # source://yard//lib/yard/docstring.rb#283 + def has_tag?(name); end + + # @return [Boolean] whether the docstring was started with "##" + # + # source://yard//lib/yard/docstring.rb#56 + def hash_flag; end + + # source://yard//lib/yard/docstring.rb#57 + def hash_flag=(v); end + + # @return [Fixnum] the first line of the {#line_range} + # @return [nil] if there is no associated {#line_range} + # + # source://yard//lib/yard/docstring.rb#167 + def line; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range=(_arg0); end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object; end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object=(_arg0); end + + # @return [Array] the list of reference tags + # + # source://yard//lib/yard/docstring.rb#44 + def ref_tags; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def replace(content, parse = T.unsafe(nil)); end + + # Resolves unresolved other docstring reference if there is + # unresolved reference. Does nothing if there is no unresolved + # reference. + # + # Normally, you don't need to call this method + # explicitly. Resolving unresolved reference is done implicitly. + # + # @return [void] + # + # source://yard//lib/yard/docstring.rb#328 + def resolve_reference; end + + # Gets the first line of a docstring to the period or the first paragraph. + # + # @return [String] The first line or paragraph of the docstring; always ends with a period. + # + # source://yard//lib/yard/docstring.rb#173 + def summary; end + + # Convenience method to return the first tag + # object in the list of tag objects of that name + # + # @example + # doc = Docstring.new("@return zero when nil") + # doc.tag(:return).text # => "zero when nil" + # @param name [#to_s] the tag name to return data for + # @return [Tags::Tag] the first tag in the list of {#tags} + # + # source://yard//lib/yard/docstring.rb#265 + def tag(name); end + + # Returns a list of tags specified by +name+ or all tags if +name+ is not specified. + # + # @param name [#to_s] the tag name to return data for, or nil for all tags + # @return [Array] the list of tags by the specified tag name + # + # source://yard//lib/yard/docstring.rb#273 + def tags(name = T.unsafe(nil)); end + + # Reformats and returns a raw representation of the tag data using the + # current tag and docstring data, not the original text. + # + # @return [String] the updated raw formatted docstring data + # @since 0.7.0 + # @todo Add Tags::Tag#to_raw and refactor + # + # source://yard//lib/yard/docstring.rb#207 + def to_raw; end + + # source://yard//lib/yard/docstring.rb#125 + def to_s; end + + private + + # Maps valid reference tags + # + # @return [Array] the list of valid reference tags + # + # source://yard//lib/yard/docstring.rb#344 + def convert_ref_tags; end + + # Parses out comments split by newlines into a new code object + # + # @param comments [String] the newline delimited array of comments. If the comments + # are passed as a String, they will be split by newlines. + # @return [String] the non-metadata portion of the comments to + # be used as a docstring + # + # source://yard//lib/yard/docstring.rb#369 + def parse_comments(comments); end + + # A stable sort_by method. + # + # @param list [Enumerable] the list to sort. + # @return [Array] a stable sorted list. + # + # source://yard//lib/yard/docstring.rb#382 + def stable_sort_by(list); end + + class << self + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser; end + + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser=(_arg0); end + + # Creates a new docstring without performing any parsing through + # a {DocstringParser}. This method is called by +DocstringParser+ + # when creating the new docstring object. + # + # @param text [String] the textual portion of the docstring + # @param tags [Array] the list of tag objects in the docstring + # @param object [CodeObjects::Base, nil] the object associated with the + # docstring. May be nil. + # @param raw_data [String] the complete docstring, including all + # original formatting and any unparsed tags/directives. + # @param ref_object [CodeObjects::Base, nil] a reference object used for + # the base set of documentation / tag information. + # + # source://yard//lib/yard/docstring.rb#77 + def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end + + # Creates a parser object using the current {default_parser}. + # Equivalent to: + # Docstring.default_parser.new(*args) + # + # @param args arguments are passed to the {DocstringParser} + # class. See {DocstringParser#initialize} for details on + # arguments. + # @return [DocstringParser] the parser object used to parse a + # docstring. + # + # source://yard//lib/yard/docstring.rb#38 + def parser(*args); end + end +end + +# Matches a tag at the start of a comment line +# +# @deprecated Use {DocstringParser::META_MATCH} +# +# source://yard//lib/yard/docstring.rb#61 +YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# Parses text and creates a {Docstring} object to represent documentation +# for a {CodeObjects::Base}. To create a new docstring, you should initialize +# the parser and call {#parse} followed by {#to_docstring}. +# +# == Subclassing Notes +# +# The DocstringParser can be subclassed and substituted during parsing by +# setting the {Docstring.default_parser} attribute with the name of the +# subclass. This allows developers to change the way docstrings are +# parsed, allowing for completely different docstring syntaxes. +# +# @example Creating a Docstring with a DocstringParser +# DocstringParser.new.parse("text here").to_docstring +# @example Creating a Custom DocstringParser +# # Parses docstrings backwards! +# class ReverseDocstringParser +# def parse_content(content) +# super(content.reverse) +# end +# end +# +# # Set the parser as default when parsing +# YARD::Docstring.default_parser = ReverseDocstringParser +# @see #parse_content +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#30 +class YARD::DocstringParser + # Creates a new parser to parse docstring data + # + # @param library [Tags::Library] a tag library for recognizing + # tags. + # @return [DocstringParser] a new instance of DocstringParser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#81 + def initialize(library = T.unsafe(nil)); end + + # Creates a new directive using the registered {#library} + # + # @return [Tags::Directive] the directive object that is created + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#232 + def create_directive(tag_name, tag_buf); end + + # Creates a {Tags::RefTag} + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#226 + def create_ref_tag(tag_name, name, object_name); end + + # Creates a tag from the {Tags::DefaultFactory tag factory}. + # + # To add an already created tag object, append it to {#tags}. + # + # @param tag_name [String] the tag name + # @param tag_buf [String] the text attached to the tag with newlines removed. + # @return [Tags::Tag, Tags::RefTag] a tag + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#209 + def create_tag(tag_name, tag_buf = T.unsafe(nil)); end + + # @return [Array] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives; end + + # @return [Array] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives=(_arg0); end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler; end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler=(_arg0); end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library; end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library=(_arg0); end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object; end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object=(_arg0); end + + # Parses all content and returns itself. + # + # @param content [String] the docstring text to parse + # @param object [CodeObjects::Base] the object that the docstring + # is attached to. Will be passed to directives to act on + # this object. + # @param handler [Handlers::Base, nil] the handler object that is + # parsing this object. May be nil if this parser is not being + # called from a {Parser::SourceParser} context. + # @return [self] the parser object. To get the docstring, + # call {#to_docstring}. + # @see #to_docstring + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#113 + def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end + + # Parses a given block of text. + # + # @note Subclasses can override this method to perform custom + # parsing of content data. + # @param content [String] the content to parse + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#129 + def parse_content(content); end + + # Call post processing callbacks on parser. + # This is called implicitly by parser. Use this when + # manually configuring a {Docstring} object. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#196 + def post_process; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text=(_arg0); end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference; end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference=(_arg0); end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state; end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state=(_arg0); end + + # Backward compatibility to detect old tags that should be specified + # as directives in 0.8 and onward. + # + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#252 + def tag_is_directive?(tag_name); end + + # @return [Array] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags; end + + # @return [Array] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags=(_arg0); end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text; end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text=(_arg0); end + + # @return [Docstring] translates parsed text into + # a Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#95 + def to_docstring; end + + private + + # Calls all {after_parse} callbacks + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#324 + def call_after_parse_callbacks; end + + # Calls the {Tags::Directive#after_parse} callback on all the + # created directives. + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#319 + def call_directives_after_parse; end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#305 + def detect_reference(content); end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#301 + def namespace; end + + class << self + # Creates a callback that is called after a docstring is successfully + # parsed. Use this method to perform sanity checks on a docstring's + # tag data, or add any extra tags automatically to a docstring. + # + # @return [void] + # @since 0.8.0 + # @yield [parser] a block to be called after a docstring is parsed + # @yieldparam parser [DocstringParser] the docstring parser object + # with all directives and tags created. + # @yieldreturn [void] + # + # source://yard//lib/yard/docstring_parser.rb#266 + def after_parse(&block); end + + # @return [Array] the {after_parse} callback proc objects + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#271 + def after_parse_callbacks; end + end +end + +# The regular expression to match the tag syntax +# +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#73 +YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/gem_index.rb#6 +module YARD::GemIndex + private + + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + + class << self + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + end +end + +# Handlers are called during the data processing part of YARD's +# parsing phase. This allows YARD as well as any custom extension to +# analyze source and generate {CodeObjects} to be stored for later use. +# +# source://yard//lib/yard/autoload.rb#66 +module YARD::Handlers; end + +# Handlers are pluggable semantic parsers for YARD's code generation +# phase. They allow developers to control what information gets +# generated by YARD, giving them the ability to, for instance, document +# any Ruby DSLs that a customized framework may use. A good example +# of this would be the ability to document and generate meta data for +# the 'describe' declaration of the RSpec testing framework by simply +# adding a handler for such a keyword. Similarly, any Ruby API that +# takes advantage of class level declarations could add these to the +# documentation in a very explicit format by treating them as first- +# class objects in any outputted documentation. +# +# == Overview of a Typical Handler Scenario +# +# Generally, a handler class will declare a set of statements which +# it will handle using the {handles} class declaration. It will then +# implement the {#process} method to do the work. The processing would +# usually involve the manipulation of the {#namespace}, {#owner} +# {CodeObjects::Base code objects} or the creation of new ones, in +# which case they should be registered by {#register}, a method that +# sets some basic attributes for the new objects. +# +# Handlers are usually simple and take up to a page of code to process +# and register a new object or add new attributes to the current +namespace+. +# +# == Setting up a Handler for Use +# +# A Handler is automatically registered when it is subclassed from the +# base class. The only other thing that needs to be done is to specify +# which statement the handler will process. This is done with the +handles+ +# declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`. +# Here is a simple example which processes module statements. +# +# class MyModuleHandler < YARD::Handlers::Base +# handles TkMODULE +# +# def process +# # do something +# end +# end +# +# == Processing Handler Data +# +# The goal of a specific handler is really up to the developer, and as +# such there is no real guideline on how to process the data. However, +# it is important to know where the data is coming from to be able to use +# it. +# +# === +statement+ Attribute +# +# The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object +# containing a set of tokens parsed in by the parser. This is the main set +# of data to be analyzed and processed. The comments attached to the statement +# can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally +# the data to be processed will live in the +tokens+ attribute. This list +# can be converted to a +String+ using +#to_s+ to parse the data with +# regular expressions (or other text processing mechanisms), if needed. +# +# === +namespace+ Attribute +# +# The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object} +# which represents the current namespace that the parser is in. For instance: +# +# module SomeModule +# class MyClass +# def mymethod; end +# end +# end +# +# If a handler was to parse the 'class MyClass' statement, it would +# be necessary to know that it belonged inside the SomeModule module. +# This is the value that +namespace+ would return when processing such +# a statement. If the class was then entered and another handler was +# called on the method, the +namespace+ would be set to the 'MyClass' +# code object. +# +# === +owner+ Attribute +# +# The +owner+ attribute is similar to the +namespace+ attribute in that +# it also follows the scope of the code during parsing. However, a namespace +# object is loosely defined as a module or class and YARD has the ability +# to parse beyond module and class blocks (inside methods, for instance), +# so the +owner+ attribute would not be limited to modules and classes. +# +# To put this into context, the example from above will be used. If a method +# handler was added to the mix and decided to parse inside the method body, +# the +owner+ would be set to the method object but the namespace would remain +# set to the class. This would allow the developer to process any method +# definitions set inside a method (def x; def y; 2 end end) by adding them +# to the correct namespace (the class, not the method). +# +# In summary, the distinction between +namespace+ and +owner+ can be thought +# of as the difference between first-class Ruby objects (namespaces) and +# second-class Ruby objects (methods). +# +# === +visibility+ and +scope+ Attributes +# +# Mainly needed for parsing methods, the +visibility+ and +scope+ attributes +# refer to the public/protected/private and class/instance values (respectively) +# of the current parsing position. +# +# == Parsing Blocks in Statements +# +# In addition to parsing a statement and creating new objects, some +# handlers may wish to continue parsing the code inside the statement's +# block (if there is one). In this context, a block means the inside +# of any statement, be it class definition, module definition, if +# statement or classic 'Ruby block'. +# +# For example, a class statement would be "class MyClass" and the block +# would be a list of statements including the method definitions inside +# the class. For a class handler, the programmer would execute the +# {#parse_block} method to continue parsing code inside the block, with +# the +namespace+ now pointing to the class object the handler created. +# +# YARD has the ability to continue into any block: class, module, method, +# even if statements. For this reason, the block parsing method must be +# invoked explicitly out of efficiency sake. +# +# @abstract Subclass this class to provide a handler for YARD to use +# during the processing phase. +# @see CodeObjects::Base +# @see CodeObjects::NamespaceObject +# @see handles +# @see #namespace +# @see #owner +# @see #register +# @see #parse_block +# +# source://yard//lib/yard/handlers/base.rb#149 +class YARD::Handlers::Base + include ::YARD::CodeObjects + include ::YARD::Parser + + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/handlers/base.rb#276 + def initialize(source_parser, stmt); end + + # Aborts a handler by raising {Handlers::HandlerAborted}. + # An exception will only be logged in debugging mode for + # this kind of handler exit. + # + # @raise [Handlers::HandlerAborted] + # @since 0.8.4 + # + # source://yard//lib/yard/handlers/base.rb#355 + def abort!; end + + # @abstract Implement this method to return the parameters in a method call + # statement. It should return an empty list if the statement is not a + # method call. + # @raise [NotImplementedError] + # @return [Array] a list of argument names + # + # source://yard//lib/yard/handlers/base.rb#581 + def call_params; end + + # @abstract Implement this method to return the method being called in + # a method call. It should return nil if the statement is not a method + # call. + # @raise [NotImplementedError] + # @return [String] the method name being called + # @return [nil] if the statement is not a method call + # + # source://yard//lib/yard/handlers/base.rb#590 + def caller_method; end + + # Ensures that a specific +object+ has been parsed and loaded into the + # registry. This is necessary when adding data to a namespace, for instance, + # since the namespace may not have been processed yet (it can be located + # in a file that has not been handled). + # + # Calling this method defers the handler until all other files have been + # processed. If the object gets resolved, the rest of the handler continues, + # otherwise an exception is raised. + # + # @example Adding a mixin to the String class programmatically + # ensure_loaded! P('String') + # # "String" is now guaranteed to be loaded + # P('String').mixins << P('MyMixin') + # @param object [Proxy, CodeObjects::Base] the object to resolve. + # @param max_retries [Integer] the number of times to defer the handler + # before raising a +NamespaceMissingError+. + # @raise [NamespaceMissingError] if the object is not resolved within + # +max_retries+ attempts, this exception is raised and the handler + # finishes processing. + # + # source://yard//lib/yard/handlers/base.rb#561 + def ensure_loaded!(object, max_retries = T.unsafe(nil)); end + + # Returns the value of attribute extra_state. + # + # source://yard//lib/yard/handlers/base.rb#348 + def extra_state; end + + # Returns the value of attribute globals. + # + # source://yard//lib/yard/handlers/base.rb#347 + def globals; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/handlers/base.rb#341 + def namespace; end + + # Sets the attribute namespace + # + # @param value the value to set the attribute namespace to. + # + # source://yard//lib/yard/handlers/base.rb#342 + def namespace=(v); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/handlers/base.rb#339 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/handlers/base.rb#340 + def owner=(v); end + + # Parses the semantic "block" contained in the statement node. + # + # @abstract Subclasses should call {Processor#process parser.process} + # @raise [NotImplementedError] + # + # source://yard//lib/yard/handlers/base.rb#304 + def parse_block(*_arg0); end + + # @return [Processor] the processor object that manages all global state + # during handling. + # + # source://yard//lib/yard/handlers/base.rb#310 + def parser; end + + # The main handler method called by the parser on a statement + # that matches the {handles} declaration. + # + # Subclasses should override this method to provide the handling + # functionality for the class. + # + # @raise [NotImplementedError] + # @return [Array, CodeObjects::Base, Object] If this method returns a code object (or a list of them), + # they are passed to the +#register+ method which adds basic + # attributes. It is not necessary to return any objects and in + # some cases you may want to explicitly avoid the returning of + # any objects for post-processing by the register method. + # @see handles + # @see #register + # + # source://yard//lib/yard/handlers/base.rb#297 + def process; end + + # Executes a given block with specific state values for {#owner}, + # {#namespace} and {#scope}. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @yield a block to execute with the given state values. + # + # source://yard//lib/yard/handlers/base.rb#370 + def push_state(opts = T.unsafe(nil)); end + + # Do some post processing on a list of code objects. + # Adds basic attributes to the list of objects like + # the filename, line number, {CodeObjects::Base#dynamic}, + # source code and {CodeObjects::Base#docstring}, + # but only if they don't exist. + # + # @param objects [Array] the list of objects to post-process. + # @return [CodeObjects::Base, Array] returns whatever is passed in, for chainability. + # + # source://yard//lib/yard/handlers/base.rb#407 + def register(*objects); end + + # Registers any docstring found for the object and expands macros + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#450 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # Registers the object as dynamic if the object is defined inside + # a method or block (owner != namespace) + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#537 + def register_dynamic(object); end + + # Ensures that the object's namespace is loaded before attaching it + # to the namespace. + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#429 + def register_ensure_loaded(object); end + + # Registers the file/line of the declaration with the object + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#441 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Registers the object as being inside a specific group + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#473 + def register_group(object, group = T.unsafe(nil)); end + + # Registers the same method information on the module function, if + # the object was defined as a module function. + # + # @param object [CodeObjects::Base] the possible module function object + # to copy data for + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#523 + def register_module_function(object); end + + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#499 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # Registers any transitive tags from the namespace on the object + # + # @param object [CodeObjects::Base, nil] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#487 + def register_transitive_tags(object); end + + # Registers visibility on a method object. If the object does not + # respond to setting visibility, nothing is done. + # + # @param object [#visibility=] the object to register + # @param visibility [Symbol] the visibility to set on the object + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#511 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # Returns the value of attribute scope. + # + # source://yard//lib/yard/handlers/base.rb#345 + def scope; end + + # Sets the attribute scope + # + # @param value the value to set the attribute scope to. + # + # source://yard//lib/yard/handlers/base.rb#346 + def scope=(v); end + + # @return [Object] the statement object currently being processed. Usually + # refers to one semantic language statement, though the strict definition + # depends on the parser used. + # + # source://yard//lib/yard/handlers/base.rb#315 + def statement; end + + # Returns the value of attribute visibility. + # + # source://yard//lib/yard/handlers/base.rb#343 + def visibility; end + + # Sets the attribute visibility + # + # @param value the value to set the attribute visibility to. + # + # source://yard//lib/yard/handlers/base.rb#344 + def visibility=(v); end + + class << self + # Clear all registered subclasses. Testing purposes only + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#159 + def clear_subclasses; end + + # @return [Array] a list of matchers for the handler object. + # @see handles? + # + # source://yard//lib/yard/handlers/base.rb#211 + def handlers; end + + # Declares the statement type which will be processed + # by this handler. + # + # A match need not be unique to a handler. Multiple + # handlers can process the same statement. However, + # in this case, care should be taken to make sure that + # {#parse_block} would only be executed by one of + # the handlers, otherwise the same code will be parsed + # multiple times and slow YARD down. + # + # @param matches [Parser::Ruby::Legacy::RubyToken, Symbol, String, Regexp] statements that match the declaration will be + # processed by this handler. A {String} match is + # equivalent to a +/\Astring/+ regular expression + # (match from the beginning of the line), and all + # token matches match only the first token of the + # statement. + # + # source://yard//lib/yard/handlers/base.rb#192 + def handles(*matches); end + + # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}. + # To implement a base handler class for another language, implement + # this method to return true if the handler should process the given + # statement object. Use {handlers} to enumerate the matchers declared + # for the handler class. + # + # @param statement a statement object or node (depends on language type) + # @raise [NotImplementedError] + # @return [Boolean] whether or not this handler object should process + # the given statement + # + # source://yard//lib/yard/handlers/base.rb#205 + def handles?(statement); end + + # Declares that a handler should only be called when inside a filename + # by its basename or a regex match for the full path. + # + # @param filename [String, Regexp] a matching filename or regex + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#235 + def in_file(filename); end + + # @private + # + # source://yard//lib/yard/handlers/base.rb#169 + def inherited(subclass); end + + # @return [Boolean] whether the filename matches the declared file + # match for a handler. If no file match is specified, returns true. + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#242 + def matches_file?(filename); end + + # Declares that the handler should only be called when inside a + # {CodeObjects::NamespaceObject}, not a method body. + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#219 + def namespace_only; end + + # @return [Boolean] whether the handler should only be processed inside + # a namespace. + # + # source://yard//lib/yard/handlers/base.rb#225 + def namespace_only?; end + + # Generates a +process+ method, equivalent to +def process; ... end+. + # Blocks defined with this syntax will be wrapped inside an anonymous + # module so that the handler class can be extended with mixins that + # override the +process+ method without alias chaining. + # + # @return [void] + # @see #process + # @since 0.5.4 + # + # source://yard//lib/yard/handlers/base.rb#269 + def process(&block); end + + # Returns all registered handler subclasses. + # + # @return [Array] a list of handlers + # + # source://yard//lib/yard/handlers/base.rb#165 + def subclasses; end + end +end + +# CRuby Handlers +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#74 +module YARD::Handlers::C; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#2 +class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#3 +YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#2 +class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#3 +YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#5 +class YARD::Handlers::C::Base < ::YARD::Handlers::Base + include ::YARD::Parser::C + include ::YARD::Handlers::Common::MethodHandler + include ::YARD::Handlers::C::HandlerMethods + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#77 + def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#64 + def namespace_for_variable(var); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#94 + def namespaces; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#60 + def override_comments; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#104 + def parse_block(opts = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#113 + def process_file(file, object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#98 + def processed_files; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#38 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#42 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#46 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#50 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#56 + def symbols; end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#158 + def remove_var_prefix(var); end + + class << self + # @return [Boolean] whether the handler handles this statement + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#10 + def handles?(statement, processor); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#28 + def statement_class(type = T.unsafe(nil)); end + end +end + +# Generated by update_error_map.rb (Copy+past results) +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#131 +YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#2 +class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#3 +YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#9 +YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#2 +class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#3 +YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/handler_methods.rb#5 +module YARD::Handlers::C::HandlerMethods + include ::YARD::Parser::C + include ::YARD::CodeObjects + include ::YARD::Handlers::Common::MethodHandler + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#86 + def handle_alias(var_name, new_name, old_name); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#75 + def handle_attribute(var_name, name, read, write); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#10 + def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#109 + def handle_constants(type, var_name, const_name, value); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#46 + def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#33 + def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#123 + def find_constant_docstring(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#154 + def find_method_body(object, symbol); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#196 + def record_parameters(object, symbol, src); end +end + +# Handles the Init_Libname() method +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#3 +class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#4 +YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#2 +class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#3 +YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#14 +YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#18 +YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#2 +class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#3 +YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#2 +class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#3 +YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#4 +YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# Parses comments +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/override_comment_handler.rb#3 +class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#24 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#28 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end +end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#2 +class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#3 +YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#2 +class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#3 +YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Keeps track of function bodies for symbol lookup during Ruby method declarations +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#3 +class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#4 +YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Shared logic between C and Ruby handlers. +# +# source://yard//lib/yard/autoload.rb#68 +module YARD::Handlers::Common; end + +# Shared functionality between Ruby and C method handlers. +# +# source://yard//lib/yard/handlers/common/method_handler.rb#6 +module YARD::Handlers::Common::MethodHandler + # @param obj [MethodObject] + # + # source://yard//lib/yard/handlers/common/method_handler.rb#8 + def add_predicate_return_tag(obj); end +end + +# Raise this error when a handler should exit before completing. +# The exception will be silenced, allowing the next handler(s) in the +# queue to be executed. +# +# @since 0.8.4 +# +# source://yard//lib/yard/handlers/base.rb#8 +class YARD::Handlers::HandlerAborted < ::RuntimeError; end + +# Raised during processing phase when a handler needs to perform +# an operation on an object's namespace but the namespace could +# not be resolved. +# +# source://yard//lib/yard/handlers/base.rb#13 +class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError + # @return [NamespaceMissingError] a new instance of NamespaceMissingError + # + # source://yard//lib/yard/handlers/base.rb#18 + def initialize(object); end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object; end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object=(_arg0); end +end + +# Iterates over all statements in a file and delegates them to the +# {Handlers::Base} objects that are registered to handle the statement. +# +# This class is passed to each handler and keeps overall processing state. +# For example, if the {#visibility} is set in a handler, all following +# statements will have access to this state. This allows "public", +# "protected" and "private" statements to be handled in classes and modules. +# In addition, the {#namespace} can be set during parsing to control +# where objects are being created from. You can also access extra stateful +# properties that any handler can set during the duration of the post +# processing of a file from {#extra_state}. If you need to access state +# across different files, look at {#globals}. +# +# @see Handlers::Base +# +# source://yard//lib/yard/handlers/processor.rb#20 +class YARD::Handlers::Processor + # Creates a new Processor for a +file+. + # + # @param parser [Parser::SourceParser] the parser used to initialize the processor + # @return [Processor] a new instance of Processor + # + # source://yard//lib/yard/handlers/processor.rb#92 + def initialize(parser); end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state; end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state=(_arg0); end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file; end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file=(_arg0); end + + # Searches for all handlers in {Base.subclasses} that match the +statement+ + # + # @param statement the statement object to match. + # @return [Array] a list of handlers to process the statement with. + # + # source://yard//lib/yard/handlers/processor.rb#151 + def find_handlers(statement); end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals; end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals=(_arg0); end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace; end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace=(_arg0); end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner; end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner=(_arg0); end + + # Continue parsing the remainder of the files in the +globals.ordered_parser+ + # object. After the remainder of files are parsed, processing will continue + # on the current file. + # + # @return [void] + # @see Parser::OrderedParser + # + # source://yard//lib/yard/handlers/processor.rb#140 + def parse_remaining_files; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type=(_arg0); end + + # Processes a list of statements by finding handlers to process each + # one. + # + # @param statements [Array] a list of statements + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#110 + def process(statements); end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope; end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope=(_arg0); end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility; end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility=(_arg0); end + + private + + # Returns the handler base class + # + # @return [Base] the base class + # + # source://yard//lib/yard/handlers/processor.rb#172 + def handler_base_class; end + + # The module holding the handlers to be loaded + # + # @return [Module] the module containing the handlers depending on + # {#parser_type}. + # + # source://yard//lib/yard/handlers/processor.rb#180 + def handler_base_namespace; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/processor.rb#161 + def handles?(handler, statement); end + + # Loads handlers from {#handler_base_namespace}. This ensures that + # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount + # of modules that are loaded + # + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#188 + def load_handlers; end + + class << self + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#33 + def namespace_for_handler; end + + # Registers a new namespace for handlers of the given type. + # + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#24 + def register_handler_namespace(type, ns); end + end +end + +# All Ruby handlers +# +# source://yard//lib/yard/autoload.rb#92 +module YARD::Handlers::Ruby; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/alias_handler.rb#3 +class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/attribute_handler.rb#3 +class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base + protected + + # Strips out any non-essential arguments from the attr statement. + # + # @param params [Array] a list of the parameters + # in the attr call. + # @raise [Parser::UndocumentableError] if the arguments are not valid. + # @return [Array] the validated attribute names + # + # source://yard//lib/yard/handlers/ruby/attribute_handler.rb#75 + def validated_attribute_names(params); end +end + +# This is the base handler class for the new-style (1.9) Ruby parser. +# All handlers that subclass this base class will be used when the +# new-style parser is used. For implementing legacy handlers, see +# {Legacy::Base}. +# +# @abstract See {Handlers::Base} for subclassing information. +# @see Handlers::Base +# @see Legacy::Base +# +# source://yard//lib/yard/handlers/ruby/base.rb#65 +class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby + extend ::YARD::Parser::Ruby + + # source://yard//lib/yard/handlers/ruby/base.rb#144 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/base.rb#155 + def caller_method; end + + # source://yard//lib/yard/handlers/ruby/base.rb#135 + def parse_block(inner_node, opts = T.unsafe(nil)); end + + class << self + # @return [Boolean] whether or not an {AstNode} object should be + # handled by this handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#113 + def handles?(node); end + + # Matcher for handling a node with a specific meta-type. An {AstNode} + # has a {AstNode#type} to define its type but can also be associated + # with a set of types. For instance, +:if+ and +:unless+ are both + # of the meta-type +:condition+. + # + # A meta-type is any method on the {AstNode} class ending in "?", + # though you should not include the "?" suffix in your declaration. + # Some examples are: "condition", "call", "literal", "kw", "token", + # "ref". + # + # @example Handling any conditional statement (if, unless) + # handles meta_type(:condition) + # @param type [Symbol] the meta-type to match. A meta-type can be + # any method name + "?" that {AstNode} responds to. + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#105 + def meta_type(type); end + + # Matcher for handling any type of method call. Method calls can + # be expressed by many {AstNode} types depending on the syntax + # with which it is called, so YARD allows you to use this matcher + # to simplify matching a method call. + # + # @example Match the "describe" method call + # handles method_call(:describe) + # + # # The following will be matched: + # # describe(...) + # # object.describe(...) + # # describe "argument" do ... end + # @param name [#to_s] matches the method call of this name + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#86 + def method_call(name = T.unsafe(nil)); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# +# source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#12 +class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#36 + def parse_condition; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#87 + def parse_else_block; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#83 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/class_handler.rb#3 +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#73 + def create_struct_superclass(superclass, superclass_def); end + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/class_handler.rb#67 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#92 + def parse_struct_superclass(klass, superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#98 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#82 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/comment_handler.rb#3 +class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/constant_handler.rb#3 +class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#49 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#21 + def process_constant(statement); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#33 + def process_structclass(statement); end +end + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/dsl_handler.rb#6 +class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#5 +module YARD::Handlers::Ruby::DSLHandlerMethods + include ::YARD::CodeObjects + include ::YARD::Parser + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#14 + def handle_comments; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#48 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#72 + def find_attached_macro; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#54 + def implicit_docstring?; end + + # @return [Boolean] whether caller method matches a macro or + # its alias names. + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#85 + def macro_name_matches(macro); end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#59 + def method_name; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#68 + def method_signature; end +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#9 +YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash) + +# Helper methods to assist with processing decorators. +# +# source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#3 +module YARD::Handlers::Ruby::DecoratorHandlerMethods + # @overload process_decorator + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#43 + def process_decorator(*nodes, &block); end + + private + + # @yield [method, node, name.to_sym] + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#78 + def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/exception_handler.rb#3 +class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/extend_handler.rb#4 +class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#8 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#12 + def process_mixin(mixin); end +end + +# To implement a custom handler matcher, subclass this class and implement +# {#matches?} to return whether a node matches the handler. +# +# @example A Custom Handler Matcher Extension +# # Implements a handler that checks for a specific string +# # in the node's source. +# class MyExtension < HandlesExtension +# def matches?(node) node.source.include?(name) end +# end +# +# # This handler will handle any node where the source includes 'foo' +# class MyHandler < Handlers::Ruby::Base +# handles MyExtension.new('foo') +# end +# +# source://yard//lib/yard/handlers/ruby/base.rb#19 +class YARD::Handlers::Ruby::HandlesExtension + # Creates a new extension with a specific matcher value +name+ + # + # @param name [Object] the matcher value to check against {#matches?} + # @return [HandlesExtension] a new instance of HandlesExtension + # + # source://yard//lib/yard/handlers/ruby/base.rb#22 + def initialize(name); end + + # Tests if the node matches the handler + # + # @param node [Parser::Ruby::AstNode] a Ruby node + # @raise [NotImplementedError] + # @return [Boolean] whether the +node+ matches the handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#27 + def matches?(node); end + + protected + + # @return [String] the extension matcher value + # + # source://yard//lib/yard/handlers/ruby/base.rb#34 + def name; end +end + +# Handlers for old Ruby 1.8 parser +# +# source://yard//lib/yard/autoload.rb#93 +module YARD::Handlers::Ruby::Legacy; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/legacy/alias_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/legacy/attribute_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# This is the base handler for the legacy parser. To implement a legacy +# handler, subclass this class. +# +# @abstract See {Handlers::Base} for subclassing information. +# +# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9 +class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#44 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#53 + def caller_method; end + + # Parses a statement's block with a set of state values. If the + # statement has no block, nothing happens. A description of state + # values can be found at {Handlers::Base#push_state} + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] State options + # @see Handlers::Base#push_state #push_state + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#35 + def parse_block(opts = T.unsafe(nil)); end + + private + + # Extracts method information for macro expansion only + # + # @return [Array>>] the method name followed by method + # arguments (name and optional value) + # @todo This is a duplicate implementation of {MethodHandler}. Refactor. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#68 + def extract_method_details; end + + # The string value of a token. For example, the return value for the symbol :sym + # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal + # +"foo #{ bar}"+ without any interpolation. The return value of the identifier + # 'test' would be the same value: 'test'. Here is a list of common types and + # their return values: + # + # @example + # tokval(TokenList.new('"foo"').first) => "foo" + # tokval(TokenList.new(':foo').first) => :foo + # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT" + # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" + # tokval(TokenList.new('3.25').first) => 3.25 + # tokval(TokenList.new('/xyz/i').first) => /xyz/i + # @param token [Token] The token of the class + # @param accepted_types [Array>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}]. + # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return + # the token's value if it is either of those types. If +TkVal+ is accepted, + # +TkNode+ is also accepted. + # + # Certain symbol keys are allowed to specify multiple types in one fell swoop. + # These symbols are: + # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+ + # :attr => +TkSYMBOL+ and +TkSTRING+ + # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. + # :number => +TkFLOAT+, +TkINTEGER+ + # @return [Object] if the token is one of the accepted types, in its real value form. + # It should be noted that identifiers and constants are kept in String form. + # @return [nil] if the token is not any of the specified accepted types + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#112 + def tokval(token, *accepted_types); end + + # Returns a list of symbols or string values from a statement. + # The list must be a valid comma delimited list, and values + # will only be returned to the end of the list only. + # + # Example: + # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd'] + # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c'] + # + # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above + # code would be the {#tokval} value of :a, 'b', + # :c and :d. + # + # It should also be noted that this function stops immediately at + # any ruby keyword encountered: + # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] + # + # @param tokenlist [TokenList] The list of tokens to process. + # @param accepted_types [Array>] passed to {#tokval} + # @return [Array] the list of tokvalues in the list. + # @return [Array] if there are no symbols or Strings in the list + # @see #tokval + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#178 + def tokval_list(tokenlist, *accepted_types); end + + class << self + # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled + # by this handler. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#15 + def handles?(stmt); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# @since 0.5.4 +# +# source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#4 +class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#29 + def parse_condition; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#73 + def parse_else_block; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#68 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#74 + def create_struct_superclass(superclass, superclass_def); end + + # Extracts the parameter list from the Struct.new declaration and returns it + # formatted as a list of member names. Expects the user will have used symbols + # to define the struct member names + # + # @param superstring [String] the string declaring the superclass + # @return [Array] a list of member names + # + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#69 + def extract_parameters(superstring); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#95 + def parse_struct_subclass(klass, superclass_def); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#102 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#83 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#4 +YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/legacy/comment_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#25 + def extract_parameters(parameters); end + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#20 + def process_structclass(classname, parameters); end +end + +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#5 +YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/legacy/dsl_handler.rb#7 +class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/legacy/exception_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#7 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#11 + def process_mixin(mixin); end +end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/legacy/method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#26 + def process_mixin(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/legacy/module_function_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/legacy/module_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#15 + def privatize_class_method(name); end +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#15 + def privatize_constant(name); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/legacy/visibility_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/legacy/yield_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/base.rb#37 +class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#38 + def matches?(node); end +end + +# Handles a conditional inside a method +# +# source://yard//lib/yard/handlers/ruby/method_condition_handler.rb#3 +class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/method_handler.rb#3 +class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Common::MethodHandler + + # source://yard//lib/yard/handlers/ruby/method_handler.rb#69 + def format_args; end +end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/mixin_handler.rb#3 +class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base + protected + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 + def process_mixin(mixin); end + + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 + def recipient(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/module_function_handler.rb#4 +class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # source://yard//lib/yard/handlers/ruby/module_function_handler.rb#34 + def make_module_function(instance_method, namespace); end +end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/module_handler.rb#3 +class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#6 +class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base + private + + # source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#28 + def privatize_constant(node); end +end + +# Sets visibility of a class method to public. +# +# source://yard//lib/yard/handlers/ruby/public_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Helper methods to parse @attr_* tags on a class. +# +# @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of +# the +@!attribute+ directive. This module should not be relied on. +# @since 0.5.6 +# +# source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#7 +module YARD::Handlers::Ruby::StructHandlerMethods + include ::YARD::CodeObjects + + # Creates the auto-generated docstring for the getter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the getter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#62 + def add_reader_tags(klass, new_method, member); end + + # Creates the auto-generated docstring for the setter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the setter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#77 + def add_writer_tags(klass, new_method, member); end + + # Creates the given member methods and attaches them to the given ClassObject. + # + # @param klass [ClassObject] the class to generate attributes for + # @param members [Array] a list of member names + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#134 + def create_attributes(klass, members); end + + # Creates and registers a class object with the given name and superclass name. + # Returns it for further use. + # + # @param classname [String] the name of the class + # @param superclass [String] the name of the superclass + # @return [ClassObject] the class object for further processing/method attaching + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#92 + def create_class(classname, superclass); end + + # Determines whether to create an attribute method based on the class's + # tags. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] (:read) reader method, or writer method? + # @return [Boolean] should the attribute be created? + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#38 + def create_member_method?(klass, member, type = T.unsafe(nil)); end + + # Creates the getter (reader) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#121 + def create_reader(klass, member); end + + # Creates the setter (writer) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#104 + def create_writer(klass, member); end + + # Extracts the user's defined @member tag for a given class and its member. Returns + # nil if the user did not define a @member tag for this struct entry. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] reader method, or writer method? + # @return [Tags::Tag, nil] the tag matching the request, or nil if not found + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#17 + def member_tag_for_member(klass, member, type = T.unsafe(nil)); end + + # Retrieves all members defined in @attr* tags + # + # @param klass [ClassObject] the class with the attributes + # @return [Array] the list of members defined as attributes on the class + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#26 + def members_from_tags(klass); end + + # Gets the return type for the member in a nicely formatted string. Used + # to be injected into auto-generated docstrings. + # + # @param member_tag [Tags::Tag] the tag object to check for types + # @return [String] the user-declared type of the struct member, or [Object] if + # the user did not define a type for this member. + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#51 + def return_type_from_tag(member_tag); end +end + +# source://yard//lib/yard/handlers/ruby/base.rb#53 +class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#54 + def matches?(node); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 +class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/yield_handler.rb#3 +class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end + +# Namespace for internationalization (i18n) +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#151 +module YARD::I18n; end + +# +Locale+ is a unit of translation. It has {#name} and a set of +# messages. +# +# @since 0.8.2 +# +# source://yard//lib/yard/i18n/locale.rb#8 +class YARD::I18n::Locale + # Creates a locale for +name+ locale. + # + # @param name [String] the locale name. + # @return [Locale] a new instance of Locale + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#34 + def initialize(name); end + + # Loads translation messages from +locale_directory+/{#name}.po. + # + # @param locale_directory [String] the directory path that has + # {#name}.po. + # @return [Boolean] +true+ if PO file exists, +false+ otherwise. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#44 + def load(locale_directory); end + + # @return [String] the name of the locale. It used IETF language + # tag format +[language[_territory][.codeset][@modifier]]+. + # @see http://tools.ietf.org/rfc/bcp/bcp47.txt BCP 47 - Tags for Identifying Languages + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#29 + def name; end + + # @param message [String] the translation target message. + # @return [String] translated message. If translation isn't + # registered, the +message+ is returned. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#62 + def translate(message); end + + class << self + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#15 + def default; end + + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#20 + def default=(locale); end + end +end + +# +Message+ is a translation target message. It has message ID as +# {#id} and some properties {#locations} and {#comments}. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/message.rb#10 +class YARD::I18n::Message + # Creates a translate target message for message ID +id+. + # + # @param id [String] the message ID of the translate target message. + # @return [Message] a new instance of Message + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#24 + def initialize(id); end + + # @param other [Message] the +Message+ to be compared. + # @return [Boolean] checks whether this message is equal to another. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#49 + def ==(other); end + + # Adds a comment for the message. + # + # @param comment [String] the comment for the message to be added. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#43 + def add_comment(comment); end + + # Adds location information for the message. + # + # @param path [String] the path where the message appears. + # @param line [Integer] the line number where the message appears. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#35 + def add_location(path, line); end + + # @return [Set] the set of comments for the messages. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#19 + def comments; end + + # @return [String] the message ID of the translation target message. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#12 + def id; end + + # path and line number where the message is appeared. + # + # @return [Set] the set of locations. Location is an array of + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#16 + def locations; end +end + +# Acts as a container for {Message} objects. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/messages.rb#7 +class YARD::I18n::Messages + include ::Enumerable + + # Creates a new container. + # + # @return [Messages] a new instance of Messages + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#11 + def initialize; end + + # Checks if this messages list is equal to another messages list. + # + # @param other [Messages] the container to compare. + # @return [Boolean] whether +self+ and +other+ is equivalence or not. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#45 + def ==(other); end + + # @param id [String] the message ID to perform a lookup on. + # @return [Message, nil] a registered message for the given +id+, + # or nil if no message for the ID is found. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#27 + def [](id); end + + # Enumerates each {Message} in the container. + # + # @return [void] + # @since 0.8.1 + # @yieldparam message [Message] the next message object in + # the enumeration. + # + # source://yard//lib/yard/i18n/messages.rb#20 + def each(&block); end + + # Registers a {Message}, the message ID of which is +id+. If + # corresponding +Message+ is already registered, the previously + # registered object is returned. + # + # @param id [String] the ID of the message to be registered. + # @return [Message] the registered +Message+. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#37 + def register(id); end + + protected + + # @return [Hash{String=>Message}] the set of message objects + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#53 + def messages; end +end + +# The +PotGenerator+ generates POT format string from +# {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. +# +# == POT and PO +# +# POT is an acronym for "Portable Object Template". POT is a +# template file to create PO file. The extension for POT is +# ".pot". PO file is an acronym for "Portable Object". PO file has +# many parts of message ID (msgid) that is translation target +# message and message string (msgstr) that is translated message +# of message ID. If you want to translate "Hello" in English into +# "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is +# msgstr. The extension for PO is ".po". +# +# == How to extract msgids +# +# The +PotGenerator+ has two parse methods: +# +# * {#parse_objects} for {CodeObjects::Base} +# * {#parse_files} for {CodeObjects::ExtraFileObject} +# +# {#parse_objects} extracts msgids from docstring and tags of +# {CodeObjects::Base} objects. The docstring of +# {CodeObjects::Base} object is parsed and a paragraph is +# extracted as a msgid. Tag name and tag text are extracted as +# msgids from a tag. +# +# {#parse_files} extracts msgids from +# {CodeObjects::ExtraFileObject} objects. The file content of +# {CodeObjects::ExtraFileObject} object is parsed and a paragraph +# is extracted as a msgid. +# +# == Usage +# +# To create a .pot file by +PotGenerator+, instantiate a +# +PotGenerator+ with a relative working directory path from a +# directory path that has created .pot file, parse +# {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject} +# objects, generate a POT and write the generated POT to a .pot +# file. The relative working directory path is ".." when the +# working directory path is "." and the POT is wrote into +# "po/yard.pot". +# +# @example Generate a .pot file +# po_file_path = "po/yard.pot" +# po_file_directory_pathname = Pathname.new(po_file_path).directory) +# working_directory_pathname = Pathname.new(".") +# relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s +# # relative_base_path -> ".." +# generator = YARD::I18n::PotGenerator.new(relative_base_path) +# generator.parse_objects(objects) +# generator.parse_files(files) +# pot = generator.generate +# po_file_directory_pathname.mkpath +# File.open(po_file_path, "w") do |pot_file| +# pot_file.print(pot) +# end +# @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html GNU gettext manual about details of PO file +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/pot_generator.rb#65 +class YARD::I18n::PotGenerator + # Creates a POT generator that uses +relative_base_path+ to + # generate locations for a msgid. +relative_base_path+ is + # prepended to all locations. + # + # @param relative_base_path [String] a relative working + # directory path from a directory path that has created .pot + # file. + # @return [PotGenerator] a new instance of PotGenerator + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#79 + def initialize(relative_base_path); end + + # Generates POT from +@messages+. + # + # One PO file entry is generated from a +Message+ in + # +@messages+. + # + # Locations of the +Message+ are used to generate the reference + # line that is started with "#: ". +relative_base_path+ passed + # when the generator is created is prepended to each path in location. + # + # Comments of the +Message+ are used to generate the + # translator-comment line that is started with "# ". + # + # @return [String] POT format string + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#122 + def generate; end + + # Extracted messages. + # + # @return [Messages] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/pot_generator.rb#70 + def messages; end + + # Parses {CodeObjects::ExtraFileObject} objects and stores + # extracted msgids into {#messages}. + # + # @param files [Array] a list + # of {CodeObjects::ExtraFileObject} objects to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#103 + def parse_files(files); end + + # Parses {CodeObjects::Base} objects and stores extracted msgids + # into {#messages} + # + # @param objects [Array] a list of + # {CodeObjects::Base} to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#91 + def parse_objects(objects); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#160 + def current_time; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#183 + def escape_message_id(message_id); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#194 + def extract_documents(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#268 + def extract_paragraphs(file); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#235 + def extract_tag_documents(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#242 + def extract_tag_name(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#255 + def extract_tag_text(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#168 + def generate_message(pot, message); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#164 + def generate_pot_creation_date_value; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#136 + def header; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#190 + def register_message(id); end +end + +# Provides some convenient features for translating a text. +# +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/text.rb#5 +class YARD::I18n::Text + # Creates a text object that has translation related features for + # the input text. + # + # @option options + # @param input [#each_line] a text to be translated. + # @param options [Hash] a customizable set of options + # @return [Text] a new instance of Text + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#12 + def initialize(input, options = T.unsafe(nil)); end + + # Extracts translation target messages from +@input+. + # + # @return [void] + # @since 0.8.0 + # @yield [:attribute, name, value, line_no] the block that + # receives extracted an attribute in header. It may called many + # times. + # @yield [:paragraph, text, start_line_no] the block that + # receives extracted a paragraph in body. Paragraph is a text + # block separated by one or more empty lines. Empty line is a + # line that contains only zero or more whitespaces. It may + # called many times. + # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam start_line_no [Integer] the start line number of + # extracted paragraph. + # @yieldparam name [String] the name of extracted attribute. + # @yieldparam value [String] the value of extracted attribute. + # @yieldparam line_no [Integer] the defined line number of extracted + # attribute. + # + # source://yard//lib/yard/i18n/text.rb#35 + def extract_messages; end + + # Translates into +locale+. + # + # @param locale [Locale] the translation target locale. + # @return [String] translated text. + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#52 + def translate(locale); end + + private + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#134 + def emit_attribute_event(match_data, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#147 + def emit_empty_line_event(line, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#125 + def emit_markup_event(line, line_no); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#156 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#76 + def parse(&block); end +end + +# Handles console logging for info, warnings and errors. +# Uses the stdlib Logger class in Ruby for all the backend logic. +# +# source://yard//lib/yard/logging.rb#9 +class YARD::Logger < ::Logger + # Creates a new logger + # + # @return [Logger] a new instance of Logger + # + # source://yard//lib/yard/logging.rb#43 + def initialize(pipe, *args); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def <<(msg = T.unsafe(nil)); end + + # Prints the backtrace +exc+ to the logger as error data. + # + # @param exc [Array] the backtrace list + # @param level_meth [Symbol] the level to log backtrace at + # @return [void] + # + # source://yard//lib/yard/logging.rb#154 + def backtrace(exc, level_meth = T.unsafe(nil)); end + + # Captures the duration of a block of code for benchmark analysis. Also + # calls {#progress} on the message to display it to the user. + # + # @param msg [String] the message to display + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @todo Implement capture storage for reporting of benchmarks + # @yield a block of arbitrary code to benchmark + # + # source://yard//lib/yard/logging.rb#80 + def capture(msg, nontty_log = T.unsafe(nil)); end + + # Clears the progress indicator in the TTY display. + # + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#121 + def clear_progress; end + + # Changes the debug level to DEBUG if $DEBUG is set + # and writes a debugging message. + # + # source://yard//lib/yard/logging.rb#59 + def debug(*args); end + + # Sets the logger level for the duration of the block + # + # @example + # log.enter_level(Logger::ERROR) do + # YARD.parse_string "def x; end" + # end + # @param new_level [Fixnum] the logger level for the duration of the block. + # values can be found in Ruby's Logger class. + # @yield the block with the logger temporarily set to +new_level+ + # + # source://yard//lib/yard/logging.rb#179 + def enter_level(new_level = T.unsafe(nil)); end + + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#17 + def io; end + + # source://yard//lib/yard/logging.rb#18 + def io=(pipe); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def print(msg = T.unsafe(nil)); end + + # Displays a progress indicator for a given message. This progress report + # is only displayed on TTY displays, otherwise the message is passed to + # the +nontty_log+ level. + # + # @param msg [String] the message to log + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#96 + def progress(msg, nontty_log = T.unsafe(nil)); end + + # Displays an unformatted line to the logger output stream, adding + # a newline. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#132 + def puts(msg = T.unsafe(nil)); end + + # @return [Boolean] whether backtraces should be shown (by default + # this is on). + # + # source://yard//lib/yard/logging.rb#22 + def show_backtraces; end + + # Sets the attribute show_backtraces + # + # @param value the value to set the attribute show_backtraces to. + # + # source://yard//lib/yard/logging.rb#23 + def show_backtraces=(_arg0); end + + # @return [Boolean] whether progress indicators should be shown when + # logging CLIs (by default this is off). + # + # source://yard//lib/yard/logging.rb#27 + def show_progress; end + + # Sets the attribute show_progress + # + # @param value the value to set the attribute show_progress to. + # + # source://yard//lib/yard/logging.rb#34 + def show_progress=(_arg0); end + + # Remembers when a warning occurs and writes a warning message. + # + # source://yard//lib/yard/logging.rb#65 + def warn(*args); end + + # Warns that the Ruby environment does not support continuations. Applies + # to JRuby, Rubinius and MacRuby. This warning will only display once + # per Ruby process. + # + # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @return [void] + # + # source://yard//lib/yard/logging.rb#167 + def warn_no_continuations; end + + # Returns the value of attribute warned. + # + # source://yard//lib/yard/logging.rb#69 + def warned; end + + # Sets the attribute warned + # + # @param value the value to set the attribute warned to. + # + # source://yard//lib/yard/logging.rb#69 + def warned=(_arg0); end + + private + + # Override this internal Logger method to clear line + # + # source://yard//lib/yard/logging.rb#190 + def add(*args); end + + # source://yard//lib/yard/logging.rb#195 + def clear_line; end + + # Log format (from Logger implementation). Used by Logger internally + # + # source://yard//lib/yard/logging.rb#201 + def format_log(sev, _time, _prog, msg); end + + # source://logger/1.6.1/lib/logger.rb#689 + def print_no_newline(msg); end + + class << self + # The logger instance + # + # @return [Logger] the logger instance + # + # source://yard//lib/yard/logging.rb#38 + def instance(pipe = T.unsafe(nil)); end + end +end + +# The list of characters displayed beside the progress bar to indicate +# "movement". +# +# @since 0.8.2 +# +# source://yard//lib/yard/logging.rb#13 +YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) + +# Generalized options class for passing around large amounts of options between objects. +# +# The options class exists for better visibility and documentability of options being +# passed through to other objects. Because YARD has parser and template architectures +# that are heavily reliant on options, it is necessary to make these option keys easily +# visible and understood by developers. Since the options class is more than just a +# basic Hash, the subclass can provide aliasing and convenience methods to simplify +# option property access, and, if needed, support backward-compatibility for deprecated +# key names. +# +# == Hash and OpenStruct-like Access +# +# Although the options class allows for Hash-like access (opts[:key]), the recommended +# mechanism for accessing an option key will be via standard method calls on attributes +# +# The options class can also act as an open ended key value storage structure (like a +# Hash or OpenStruct), and allows for setting and getting of unregistered option keys. +# This methodology is not recommended, however, and is only supported for backward +# compatibility inside YARD. Whenever possible, developers should define all keys used +# by an options class. +# +# == Declaring Default Values +# +# Note that the options class can contain default value definitions for certain options, +# but to initialize these defaults, {#reset_defaults} must be called manually after +# initialization; the options object is always created empty until defaults are applied. +# +# @abstract Subclasses should define (and document) custom attributes that are expected +# to be made available as option keys. +# @example Defining an Options class with custom option keys +# class TemplateOptions < YARD::Options +# # @return [Symbol] the output format to generate templates in +# attr_accessor :format +# +# # @return [Symbol] the template to use when generating output +# attr_accessor :template +# end +# @example Initializing default option values +# class TemplateOptions < YARD::Options +# def reset_defaults +# super +# self.format = :html +# self.template = :default +# self.highlight = true +# # ... +# end +# end +# @example Using +default_attr+ to create default attributes +# class TemplateOptions < YARD::Options +# default_attr :format, :html +# default_attr :template, :default +# default_attr :highlight, true +# end +# @example Deprecating an option while still supporting it +# class TemplateOptions < YARD::Options +# # @return [Boolean] if syntax highlighting should be performed on code blocks. +# # Defaults to true. +# attr_accessor :highlight +# +# # @deprecated Use {#highlight} instead. +# # @return [Boolean] if no syntax highlighting should be performs on code blocks. +# # Defaults to false. +# attr_accessor :no_highlight +# def no_highlight=(value) @highlight = !value end +# def no_highlight; !highlight end +# end +# +# source://yard//lib/yard/options.rb#69 +class YARD::Options + # @return [Boolean] whether another Options object equals the + # keys and values of this options object + # + # source://yard//lib/yard/options.rb#157 + def ==(other); end + + # Delegates calls with Hash syntax to actual method with key name + # + # @example Calling on an option key with Hash syntax + # options[:format] # equivalent to: options.format + # @param key [Symbol, String] the option name to access + # @return the value of the option named +key+ + # + # source://yard//lib/yard/options.rb#91 + def [](key); end + + # Delegates setter calls with Hash syntax to the attribute setter with the key name + # + # @example Setting an option with Hash syntax + # options[:format] = :html # equivalent to: options.format = :html + # @param key [Symbol, String] the option to set + # @param value [Object] the value to set for the option + # @return [Object] the value being set + # + # source://yard//lib/yard/options.rb#100 + def []=(key, value); end + + # Deletes an option value for +key+ + # + # @param key [Symbol, String] the key to delete a value for + # @return [Object] the value that was deleted + # + # source://yard//lib/yard/options.rb#207 + def delete(key); end + + # Yields over every option key and value + # + # @return [void] + # @yield [key, value] every option key and value + # @yieldparam key [Symbol] the option key + # @yieldparam value [Object] the option value + # + # source://yard//lib/yard/options.rb#143 + def each; end + + # Inspects the object + # + # source://yard//lib/yard/options.rb#151 + def inspect; end + + # Creates a new options object and sets options hash or object value + # onto that object. + # + # @param opts [Options, Hash] + # @return [Options] the newly created options object + # @see #update + # + # source://yard//lib/yard/options.rb#123 + def merge(opts); end + + # Handles setting and accessing of unregistered keys similar + # to an OpenStruct object. + # + # @note It is not recommended to set and access unregistered keys on + # an Options object. Instead, register the attribute before using it. + # + # source://yard//lib/yard/options.rb#170 + def method_missing(meth, *args, &block); end + + # Resets all values to their defaults. + # + # @abstract Subclasses should override this method to perform custom + # value initialization if not using {default_attr}. Be sure to call + # +super+ so that default initialization can take place. + # @return [void] + # + # source://yard//lib/yard/options.rb#188 + def reset_defaults; end + + # @return [Hash] Converts options object to an options hash. All keys + # will be symbolized. + # + # source://yard//lib/yard/options.rb#129 + def to_hash; end + + # Updates values from an options hash or options object on this object. + # All keys passed should be key names defined by attributes on the class. + # + # @example Updating a set of options on an Options object + # opts.update(:template => :guide, :type => :fulldoc) + # @param opts [Hash, Options] + # @return [self] + # + # source://yard//lib/yard/options.rb#109 + def update(opts); end + + class << self + # Defines an attribute named +key+ and sets a default value for it + # + # @example Defining a default option key + # default_attr :name, 'Default Name' + # default_attr :time, lambda { Time.now } + # @param key [Symbol] the option key name + # @param default [Object, Proc] the default object value. If the default + # value is a proc, it is executed upon initialization. + # + # source://yard//lib/yard/options.rb#80 + def default_attr(key, default); end + end +end + +# The parser namespace holds all parsing engines used by YARD. +# Currently only Ruby and C (Ruby) parsers are implemented. +# +# source://yard//lib/yard/autoload.rb#161 +module YARD::Parser; end + +# Represents the abstract base parser class that parses source code in +# a specific way. A parser should implement {#parse}, {#tokenize} and +# {#enumerator}. +# +# == Registering a Custom Parser +# To register a parser, see {SourceParser.register_parser_type} +# +# @abstract +# @see #parse +# @see #tokenize +# @see #enumerator +# @since 0.5.6 +# +# source://yard//lib/yard/parser/base.rb#16 +class YARD::Parser::Base + # This default constructor does nothing. The subclass is responsible for + # storing the source contents and filename if they are required. + # + # @param source [String] the source contents + # @param filename [String] the name of the file if from disk + # @raise [NotImplementedError] + # @return [Base] a new instance of Base + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#26 + def initialize(source, filename); end + + # This method should be implemented to return a list of semantic tokens + # representing the source code to be post-processed. Otherwise the method + # should return nil. + # + # @abstract + # @return [Array] a list of semantic tokens representing the source code + # to be post-processed + # @return [nil] if no post-processing should be done + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#52 + def enumerator; end + + # This method should be implemented to parse the source and return itself. + # + # @abstract + # @raise [NotImplementedError] + # @return [Base] this method should return itself + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#33 + def parse; end + + # This method should be implemented to tokenize given source + # + # @abstract + # @raise [NotImplementedError] + # @return [Array] a list/tree of lexical tokens + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#40 + def tokenize; end + + class << self + # Convenience method to create a new parser and {#parse} + # + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#18 + def parse(source, filename = T.unsafe(nil)); end + end +end + +# CRuby Parsing components +# +# source://yard//lib/yard/autoload.rb#162 +module YARD::Parser::C; end + +# source://yard//lib/yard/parser/c/statement.rb#41 +class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments=(_arg0); end +end + +# source://yard//lib/yard/parser/c/c_parser.rb#5 +class YARD::Parser::C::CParser < ::YARD::Parser::Base + # @return [CParser] a new instance of CParser + # + # source://yard//lib/yard/parser/c/c_parser.rb#6 + def initialize(source, file = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#24 + def enumerator; end + + # source://yard//lib/yard/parser/c/c_parser.rb#19 + def parse; end + + # @raise [NotImplementedError] + # + # source://yard//lib/yard/parser/c/c_parser.rb#28 + def tokenize; end + + private + + # source://yard//lib/yard/parser/c/c_parser.rb#213 + def advance(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#216 + def advance_loop; end + + # source://yard//lib/yard/parser/c/c_parser.rb#195 + def attach_comment(statement); end + + # source://yard//lib/yard/parser/c/c_parser.rb#214 + def back(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#225 + def char(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#96 + def consume_body_statements; end + + # source://yard//lib/yard/parser/c/c_parser.rb#136 + def consume_comment(add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#59 + def consume_directive; end + + # source://yard//lib/yard/parser/c/c_parser.rb#47 + def consume_quote(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#73 + def consume_toplevel_statement; end + + # source://yard//lib/yard/parser/c/c_parser.rb#169 + def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#132 + def consume_whitespace; end + + # source://yard//lib/yard/parser/c/c_parser.rb#227 + def nextchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#220 + def nextline; end + + # source://yard//lib/yard/parser/c/c_parser.rb#34 + def parse_toplevel; end + + # source://yard//lib/yard/parser/c/c_parser.rb#226 + def prevchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#118 + def strip_non_statement_data; end + + # source://yard//lib/yard/parser/c/c_parser.rb#229 + def struct; end +end + +# source://yard//lib/yard/parser/c/statement.rb#51 +class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement + include ::YARD::Parser::C::CommentParser + + # @return [Comment] a new instance of Comment + # + # source://yard//lib/yard/parser/c/statement.rb#58 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/statement.rb#62 + def comments; end + + # Returns the value of attribute overrides. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides; end + + # Sets the attribute overrides + # + # @param value the value to set the attribute overrides to. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides=(_arg0); end + + # Returns the value of attribute statement. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement; end + + # Sets the attribute statement + # + # @param value the value to set the attribute statement to. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement=(_arg0); end + + # Returns the value of attribute type. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type=(_arg0); end +end + +# source://yard//lib/yard/parser/c/comment_parser.rb#5 +module YARD::Parser::C::CommentParser + protected + + # source://yard//lib/yard/parser/c/comment_parser.rb#8 + def parse_comments(comments); end + + private + + # source://yard//lib/yard/parser/c/comment_parser.rb#42 + def parse_callseq(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#30 + def parse_overrides(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#87 + def parse_types(types); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#126 + def remove_private_comments(comment); end +end + +# source://yard//lib/yard/parser/c/statement.rb#5 +class YARD::Parser::C::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/c/statement.rb#16 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#26 + def comments_range; end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group=(_arg0); end + + # Returns the value of attribute line. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line; end + + # Sets the attribute line + # + # @param value the value to set the attribute line to. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#22 + def line_range; end + + # source://yard//lib/yard/parser/c/statement.rb#36 + def show; end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def signature; end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source=(_arg0); end +end + +# source://yard//lib/yard/parser/c/statement.rb#45 +class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block=(_arg0); end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments=(_arg0); end + + # Returns the value of attribute declaration. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration; end + + # Sets the attribute declaration + # + # @param value the value to set the attribute declaration to. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration=(_arg0); end +end + +# Responsible for parsing a list of files in order. The +# {#parse} method of this class can be called from the +# {SourceParser#globals} globals state list to re-enter +# parsing for the remainder of files in the list recursively. +# +# @see Processor#parse_remaining_files +# +# source://yard//lib/yard/parser/source_parser.rb#21 +class YARD::Parser::OrderedParser + # Creates a new OrderedParser with the global state and a list + # of files to parse. + # + # @note OrderedParser sets itself as the +ordered_parser+ key on + # global_state for later use in {Handlers::Processor}. + # @param global_state [OpenStruct] a structure containing all global + # state during parsing + # @param files [Array] the list of files to parse + # @return [OrderedParser] a new instance of OrderedParser + # + # source://yard//lib/yard/parser/source_parser.rb#33 + def initialize(global_state, files); end + + # @return [Array] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files; end + + # @return [Array] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files=(_arg0); end + + # Parses the remainder of the {#files} list. + # + # @see Processor#parse_remaining_files + # + # source://yard//lib/yard/parser/source_parser.rb#42 + def parse; end +end + +# Raised when the parser sees a Ruby syntax error +# +# source://yard//lib/yard/parser/source_parser.rb#13 +class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end + +# Ruby parsing components. +# +# source://yard//lib/yard/autoload.rb#171 +module YARD::Parser::Ruby + # Builds and s-expression by creating {AstNode} objects with + # the type provided by the first argument. + # + # @example An implicit list of keywords + # ast = s(s(:kw, "if"), s(:kw, "else")) + # ast.type # => :list + # @example A method call + # s(:command, s(:var_ref, "mymethod")) + # @overload s + # @overload s + # @see AstNode#initialize + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#25 + def s(*args); end +end + +# An AST node is characterized by a type and a list of children. It +# is most easily represented by the s-expression {#s} such as: +# # AST for "if true; 5 end": +# s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil)) +# +# The node type is not considered part of the list, only its children. +# So +ast[0]+ does not refer to the type, but rather the first child +# (or object). Items that are not +AstNode+ objects can be part of the +# list, like Strings or Symbols representing names. To return only +# the AstNode children of the node, use {#children}. +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#41 +class YARD::Parser::Ruby::AstNode < ::Array + # Creates a new AST node + # + # @option opts + # @option opts + # @option opts + # @option opts + # @option opts + # @param type [Symbol] the type of node being created + # @param arr [Array] the child nodes + # @param opts [Hash] any extra line options + # @return [AstNode] a new instance of AstNode + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#153 + def initialize(type, arr, opts = T.unsafe(nil)); end + + # @private + # @return [Boolean] whether the node is equal to another by checking + # the list and type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#167 + def ==(other); end + + # @return [Boolean] whether the node has a block + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#261 + def block?; end + + # @return [Boolean] whether the node is a method call + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#241 + def call?; end + + # @return [Array] the {AstNode} children inside the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#199 + def children; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments; end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def comments_hash_flag; end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments_range; end + + # @return [Boolean] whether the node is a if/elsif/else condition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#251 + def condition?; end + + # @return [Boolean] whether the node is a method definition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#246 + def def?; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring; end + + # Sets the attribute docstring + # + # @param value the value to set the attribute docstring to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring=(_arg0); end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag; end + + # Sets the attribute docstring_hash_flag + # + # @param value the value to set the attribute docstring_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag=(_arg0); end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range; end + + # Sets the attribute docstring_range + # + # @param value the value to set the attribute docstring_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range=(_arg0); end + + # @return [String] the filename the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#76 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def file=(_arg0); end + + # @return [String] the first line of source represented by the node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#278 + def first_line; end + + # @return [String] the full source that the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#82 + def full_source; end + + # Sets the attribute full_source + # + # @param value the value to set the attribute full_source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def full_source=(_arg0); end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group=(_arg0); end + + # @return [Boolean] whether the node has a {#line_range} set + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#268 + def has_line?; end + + # @return [String] inspects the object + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#323 + def inspect; end + + # Searches through the node and all descendants and returns the + # first node with a type matching any of +node_types+, otherwise + # returns the original node (self). + # + # @example Returns the first method definition in a block of code + # ast = YARD.parse_string("if true; def x; end end").ast + # ast.jump(:def) + # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, + # # nil), s(s(:void_stmt, ))) + # @example Returns first 'def' or 'class' statement + # ast = YARD.parse_string("class X; def y; end end") + # ast.jump(:def, :class).first + # # => + # @example If the node types are not present in the AST + # ast = YARD.parse("def x; end") + # ast.jump(:def) + # @param node_types [Array] a set of node types to match + # @return [AstNode] the matching node, if one was found + # @return [self] if no node was found + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#193 + def jump(*node_types); end + + # @return [Boolean] whether the node is a keyword + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#236 + def kw?; end + + # @return [Fixnum] the starting line number of the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#273 + def line; end + + # @return [Range] the line range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#70 + def line_range; end + + # Sets the attribute line_range + # + # @param value the value to set the attribute line_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def line_range=(_arg0); end + + # @return [Boolean] whether the node is a literal value + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#231 + def literal?; end + + # @return [Boolean] whether the node is a loop + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#256 + def loop?; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent=(_arg0); end + + # @return [nil] pretty prints the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#290 + def pretty_print(q); end + + # @return [Boolean] whether the node is a reference (variable, + # constant name) + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#226 + def ref?; end + + # @return [String] the first line of source the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#285 + def show; end + + # @return [String] the parse of {#full_source} that the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#89 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def source=(_arg0); end + + # @return [Range] the character range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#63 + def source_range; end + + # Sets the attribute source_range + # + # @param value the value to set the attribute source_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def source_range=(_arg0); end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def to_s; end + + # @return [Boolean] whether the node is a token + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#220 + def token?; end + + # Traverses the object and yields each node (including descendants) in order. + # + # @return [void] + # @yield each descendant node in order + # @yieldparam self, [AstNode] or a child/descendant node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#208 + def traverse; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type=(_arg0); end + + # Resets node state in tree + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#331 + def unfreeze; end + + private + + # Resets line information + # + # @return [void] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#341 + def reset_line_info; end + + class << self + # Finds the node subclass that should be instantiated for a specific + # node type + # + # @param type [Symbol] the node type to find a subclass for + # @return [Class] a subclass of AstNode to instantiate the node with. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#111 + def node_class_for(type); end + end +end + +# List of all known keywords +# +# @return [Hash] +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#96 +YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/ast_node.rb#530 +class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#533 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#531 + def class_name; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#532 + def superclass; end +end + +# Represents a lone comment block in source +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#548 +class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def comments; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def docstring; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#550 + def docstring=(value); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#554 + def first_line; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#553 + def source; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#515 +class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#517 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#516 + def condition?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#520 + def else_block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#518 + def then_block; end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#527 + def cmod?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#376 +class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#377 + def kw?; end +end + +# Handles Ruby parsing in Ruby 1.8. +# +# source://yard//lib/yard/autoload.rb#172 +module YARD::Parser::Ruby::Legacy; end + +# Lexical analyzer for Ruby source +# +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#314 +class YARD::Parser::Ruby::Legacy::RubyLex + include ::YARD::Parser::Ruby::Legacy::RubyToken + include ::IRB + + # @return [RubyLex] a new instance of RubyLex + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#437 + def initialize(content); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#472 + def char_no; end + + # Returns the value of attribute continue. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 + def continue; end + + # Returns the value of attribute exception_on_syntax_error. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error; end + + # Sets the attribute exception_on_syntax_error + # + # @param value the value to set the attribute exception_on_syntax_error to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#476 + def get_read; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#480 + def getc; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#484 + def getc_of_rests; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 + def gets; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + def identify_comment; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 + def identify_gvar; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1062 + def identify_here_document; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 + def identify_identifier; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + def identify_number(start); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + def identify_quotation(initial_char); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end + + # Returns the value of attribute indent. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#465 + def indent; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#510 + def lex; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#586 + def lex_init; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#759 + def lex_int2; end + + # Returns the value of attribute lex_state. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#431 + def lex_state; end + + # io functions + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#468 + def line_no; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#506 + def peek(i = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#502 + def peek_equal?(str); end + + # Returns the value of attribute read_auto_clean_up. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up; end + + # Sets the attribute read_auto_clean_up + # + # @param value the value to set the attribute read_auto_clean_up to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + def read_escape; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + def skip_inner_expression; end + + # Returns the value of attribute skip_space. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space; end + + # Sets the attribute skip_space + # + # @param value the value to set the attribute skip_space to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#526 + def token; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#498 + def ungetc(c = T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#433 + def debug?; end + end +end + +# , "when" +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#552 +YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array) + +# Read an input stream character by character. We allow for unlimited +# ungetting of characters just read. +# +# We simplify the implementation greatly by reading the entire input +# into a buffer initially, and then simply traversing it using +# pointers. +# +# We also have to allow for the here document diversion. This +# little gem comes about when the lexer encounters a here +# document. At this point we effectively need to split the input +# stream into two parts: one to read the body of the here document, +# the other to read the rest of the input line where the here +# document was initially encountered. For example, we might have +# +# do_something(<<-A, <<-B) +# stuff +# for +# A +# stuff +# for +# B +# +# When the lexer encounters the < token_class } +# { reading => [token_class, *opt] } +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#271 +YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# Represents an end statement +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#59 +class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#60 + def text; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#272 +YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#107 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkUnknownChar] a new instance of TkUnknownChar + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#108 + def initialize(line_no, char_no, _id); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#112 + def name; end +end + +# Represents a Ruby value +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#85 +class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkVal] a new instance of TkVal + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#86 + def initialize(line_no, char_no, value = T.unsafe(nil)); end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents whitespace +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#68 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents a token in the Ruby lexer +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#16 +class YARD::Parser::Ruby::Legacy::RubyToken::Token + # Creates a new Token object + # + # @param line_no [Integer] the line number to initialize the token to + # @param char_no [Integer] the char number to initialize the token to + # @return [Token] a new instance of Token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37 + def initialize(line_no, char_no); end + + # @return [Integer] the character number in the file/stream the token + # is located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#23 + def char_no; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state=(_arg0); end + + # @return [Integer] the line number in the file/stream the token is + # located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#19 + def line_no; end + + # Chainable way to sets the text attribute + # + # @param text [String] the new text + # @return [Token] this token object + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#47 + def set_text(text); end + + # @return [String] the token text value + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#26 + def text; end +end + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#32 +YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String) + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#147 +YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/statement.rb#4 +class YARD::Parser::Ruby::Legacy::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#14 + def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def block; end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def comments; end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag=(_arg0); end + + # Returns the value of attribute comments_range. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range; end + + # Sets the attribute comments_range + # + # @param value the value to set the attribute comments_range to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#34 + def inspect; end + + # @return [Fixnum] the first line of Ruby source + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#46 + def line; end + + # @return [Range] the first to last lines of Ruby source + # @since 0.5.4 + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#52 + def line_range; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#41 + def show; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def signature; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def source(include_block = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def to_s(include_block = T.unsafe(nil)); end + + # Returns the value of attribute tokens. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def tokens; end + + private + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#58 + def clean_tokens(tokens); end +end + +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#4 +class YARD::Parser::Ruby::Legacy::StatementList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # Creates a new statement list + # + # @param content [TokenList, String] the tokens to create the list from + # @return [StatementList] a new instance of StatementList + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#17 + def initialize(content); end + + # Returns the value of attribute encoding_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line; end + + # Sets the attribute encoding_line + # + # @param value the value to set the attribute encoding_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line=(_arg0); end + + # Returns the value of attribute shebang_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line; end + + # Sets the attribute shebang_line + # + # @param value the value to set the attribute shebang_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line=(_arg0); end + + private + + # Handles the balancing of parentheses and blocks + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not the current statement's parentheses and blocks + # are balanced after +tk+ + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#362 + def balances?(tk); end + + # Returns the next statement in the token stream + # + # @return [Statement] the next statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#45 + def next_statement; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#34 + def parse_statements; end + + # Returns the next token in the stream that's not a space + # + # @return [RubyToken::Token] the next non-space token + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#388 + def peek_no_space; end + + # Processes a token in a block + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#194 + def process_block_token(tk); end + + # Processes a complex block-opening token; + # that is, a block opener such as +while+ or +for+ + # that is followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#293 + def process_complex_block_opener(tk); end + + # Processes a comment token that comes before a statement + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not +tk+ was processed as an initial comment + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#213 + def process_initial_comment(tk); end + + # Processes a simple block-opening token; + # that is, a block opener such as +begin+ or +do+ + # that isn't followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#268 + def process_simple_block_opener(tk); end + + # Processes a token that closes a statement + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#305 + def process_statement_end(tk); end + + # Processes a single token + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#130 + def process_token(tk); end + + # Adds a token to the current statement, + # unless it's a newline, semicolon, or comment + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#380 + def push_token(tk); end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#111 + def sanitize_block; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#96 + def sanitize_statement_end; end +end + +# The following list of tokens will require a block to be opened +# if used at the beginning of a statement. +# +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#11 +YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/token_list.rb#4 +class YARD::Parser::Ruby::Legacy::TokenList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # @return [TokenList] a new instance of TokenList + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#7 + def initialize(content = T.unsafe(nil)); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def <<(*tokens); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def push(*tokens); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#37 + def squeeze(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#11 + def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#53 + def convert_token(lex, tk); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#44 + def parse_content(content); end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#372 +class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#373 + def literal?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#541 +class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#544 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#543 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#542 + def loop?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#438 +class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#464 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#462 + def block_param; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#439 + def call?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#442 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#440 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#453 + def parameters(include_block_param = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#474 + def call_has_paren?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#470 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#479 +class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode + def block(n = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#481 + def def?; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#480 + def kw?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#484 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#482 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#489 + def parameters(include_block_param = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#495 + def signature; end + + private + + # source://yard//lib/yard/parser/ruby/ast_node.rb#510 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#536 +class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#538 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#537 + def module_name; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#380 +class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#430 + def args_forward; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#426 + def block_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#414 + def double_splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#396 + def named_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#406 + def splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#410 + def unnamed_end_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#385 + def unnamed_optional_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#381 + def unnamed_required_params; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#360 +class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#367 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#363 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#361 + def ref?; end +end + +# Internal parser class +# +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#27 +class YARD::Parser::Ruby::RipperParser < ::Ripper + # @return [RipperParser] a new instance of RipperParser + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#32 + def initialize(source, filename, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def ast; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def charno; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def encoding_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#64 + def enumerator; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def file; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#68 + def file_encoding; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_BEGIN(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_CHAR(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_END(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on___end__(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_alias_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_arg_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_arg_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_args_forward(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_args_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_aryptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assoc_splat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_backref(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_backtick(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_begin(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_binary(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_block_var(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_blockarg(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_brace_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_break(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_case(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_class(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_class_name_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_comma(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_const(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_path_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_cvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_def(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defined(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defs(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_do_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot2(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot3(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_else(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_elsif(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_embexpr_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embexpr_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_ensure(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_excessed_comma(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_float(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fndptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_for(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_gvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_heredoc_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_heredoc_dedent(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_heredoc_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_hshptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ident(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_if(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_if_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_ifop(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_ignored_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ignored_sp(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_imaginary(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_in(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_int(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ivar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_kw(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_kwrest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_label_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_magic_comment(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_massign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_arg(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_post(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mlhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mlhs_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_module(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mrhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mrhs_new_from_args(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_next(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_nokw_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_op(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_opassign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_operator_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_param_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_period(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qsymbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qsymbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qsymbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qwords_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qwords_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qwords_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rational(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_redo(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_regexp_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_regexp_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_regexp_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_regexp_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_regexp_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_rescue_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_rest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_retry(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_sclass(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_semicolon(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_stmts_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_stmts_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_string_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_concat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_dvar(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_string_embexpr(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_super(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_symbol(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_symbol_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_symbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_symbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tlambda(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tlambeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_top_const_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tstring_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_content(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_undef(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_unless(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_unless_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_until(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_until_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_vcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_when(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_while(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_while_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_word_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_word_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_words_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_words_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_words_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_words_sep(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_xstring_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_xstring_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_xstring_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_zsuper(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#55 + def parse; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def root; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def shebang_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def tokens; end + + private + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 + def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 + def add_token(token, data); end + + # @return [Boolean] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 + def comment_starts_line?(charno); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def compile_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 + def freeze_tree(node = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 + def insert_comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 + def on_aref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 + def on_aref_field(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 + def on_array(other); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 + def on_assoc_new(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 + def on_assoclist_from_args(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 + def on_bare_assoc_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_body_stmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_bodystmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 + def on_comment(comment); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 + def on_const_path_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 + def on_dyna_symbol(sym); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 + def on_embdoc(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 + def on_embdoc_beg(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 + def on_embdoc_end(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 + def on_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 + def on_label(data); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 + def on_lambda(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 + def on_lbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 + def on_params(*args); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def on_parse_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 + def on_program(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 + def on_rbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 + def on_rescue(exc, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 + def on_sp(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 + def on_string_content(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 + def on_string_literal(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 + def on_top_const_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 + def on_unary(op, val); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 + def on_void_stmt; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 + def visit_event(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 + def visit_event_arr(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 + def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end +end + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 +YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 +YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 +YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#131 +YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Ruby 1.9 parser +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#12 +class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base + # @return [RubyParser] a new instance of RubyParser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#13 + def initialize(source, filename); end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#21 + def encoding_line; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#19 + def enumerator; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#22 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#17 + def parse; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#20 + def shebang_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#18 + def tokenize; end +end + +# Supports {#each} enumeration over a source's tokens, yielding +# the token and a possible {CodeObjects::Base} associated with the +# constant or identifier token. +# +# source://yard//lib/yard/parser/ruby/token_resolver.rb#8 +class YARD::Parser::Ruby::TokenResolver + include ::Enumerable + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a token resolver for given source. + # + # @param source [String] the source code to tokenize + # @param namespace [CodeObjects::Base] the object/namespace to resolve from + # @raise [ParserSyntaxError] + # @return [TokenResolver] a new instance of TokenResolver + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#16 + def initialize(source, namespace = T.unsafe(nil)); end + + # Iterates over each token, yielding the token and a possible code + # object that is associated with the token. + # + # @example Yielding code objects + # r = TokenResolver.new("A::B::C") + # r.each do |tok, obj| + # if obj + # puts "#{tok[0]} -> #{obj.path.inspect}" + # else + # puts "No object: #{tok.inspect}" + # end + # end + # + # # Prints: + # # :const -> "A" + # # No object: [:op, "::"] + # # :const -> "A::B" + # # No object: [:op, "::"] + # # :const -> "A::B::C" + # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the + # current token object being iterated + # @yieldparam object [CodeObjects::Base, nil] the fully qualified code + # object associated with the current token, or nil if there is no object + # for the yielded token. + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#46 + def each; end + + protected + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def last_sep; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def last_sep=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def next_object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def next_object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def skip_group; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def skip_group=(v); end + + private + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#112 + def lookup(toktype, name); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#134 + def object_resolved_types(obj = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#106 + def pop_state; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#102 + def push_state; end + + class << self + # source://yard//lib/yard/parser/ruby/token_resolver.rb#92 + def state_attr(*attrs); end + end +end + +# Responsible for parsing a source file into the namespace. Parsing +# also invokes handlers to process the parsed statements and generate +# any code objects that may be recognized. +# +# == Custom Parsers +# SourceParser allows custom parsers to be registered and called when +# a certain filetype is recognized. To register a parser and hook it +# up to a set of file extensions, call {register_parser_type} +# +# @see register_parser_type +# @see Handlers::Base +# @see CodeObjects::Base +# +# source://yard//lib/yard/parser/source_parser.rb#64 +class YARD::Parser::SourceParser + # @overload initialize + # @return [SourceParser] a new instance of SourceParser + # + # source://yard//lib/yard/parser/source_parser.rb#406 + def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end + + # @return [String] the contents of the file to be parsed + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#399 + def contents; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file=(_arg0); end + + # @return [OpenStruct] an open struct containing arbitrary global state + # shared between files and handlers. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#395 + def globals; end + + # The main parser method. This should not be called directly. Instead, + # use the class methods {parse} and {parse_string}. + # + # @param content [String, #read, Object] the source file to parse + # @return [Object, nil] the parser object used to parse the source + # + # source://yard//lib/yard/parser/source_parser.rb#418 + def parse(content = T.unsafe(nil)); end + + # @return [Symbol] the parser type associated with the parser instance. + # This should be set by the {#initialize constructor}. + # + # source://yard//lib/yard/parser/source_parser.rb#390 + def parser_type; end + + # Tokenizes but does not parse the block of code using the current {#parser_type} + # + # @param content [String] the block of code to tokenize + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#462 + def tokenize(content); end + + private + + # Searches for encoding line and forces encoding + # + # @since 0.5.3 + # + # source://yard//lib/yard/parser/source_parser.rb#471 + def convert_encoding(content); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#515 + def parser_class; end + + # source://yard//lib/yard/parser/source_parser.rb#500 + def parser_type=(value); end + + # Guesses the parser type to use depending on the file extension. + # + # @param filename [String] the filename to use to guess the parser type + # @return [Symbol] a parser type that matches the filename + # + # source://yard//lib/yard/parser/source_parser.rb#508 + def parser_type_for_filename(filename); end + + # Runs a {Handlers::Processor} object to post process the parsed statements. + # + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#490 + def post_process; end + + class << self + # Registers a callback to be called after an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called after the entire list of files + # is processed, see {after_parse_list}. + # + # @example Printing the length of each file after it is parsed + # SourceParser.after_parse_file do |parser| + # puts "#{parser.file} is #{parser.contents.size} characters" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "lib/foo.rb is 1240 characters" + # "lib/foo_bar.rb is 248 characters" + # @return [Proc] the yielded block + # @see before_parse_file + # @see after_parse_list + # @since 0.7.0 + # @yield [parser] the yielded block is called once after each file + # that is parsed. This might happen many times for a single codebase. + # @yieldparam parser [SourceParser] the parser object that parsed + # the file. + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#324 + def after_parse_file(&block); end + + # @return [Array] the list of callbacks to be called after + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#352 + def after_parse_file_callbacks; end + + # Registers a callback to be called after a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Printing results after parsing occurs + # SourceParser.after_parse_list do + # puts "Finished parsing!" + # end + # YARD.parse + # # Prints "Finished parsing!" after parsing files + # @return [Proc] the yielded block + # @see before_parse_list + # @see before_parse_file + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#258 + def after_parse_list(&block); end + + # @return [Array] the list of callbacks to be called after + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#338 + def after_parse_list_callbacks; end + + # Registers a callback to be called before an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called before the entire list of files + # is processed, see {before_parse_list}. + # + # @example Cancel parsing of any test_*.rb files + # SourceParser.before_parse_file do |parser| + # return false if parser.file =~ /^test_.+\.rb$/ + # end + # @example Installing a simple callback + # SourceParser.before_parse_file do |parser| + # puts "I'm parsing #{parser.file}" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "I'm parsing lib/foo.rb" + # "I'm parsing lib/foo_bar.rb" + # "I'm parsing lib/last_file.rb" + # @return [Proc] the yielded block + # @see before_parse_list + # @see after_parse_file + # @since 0.7.0 + # @yield [parser] the yielded block is called once before each + # file that is parsed. This might happen many times for a single + # codebase. + # @yieldparam parser [SourceParser] the parser object that will {#parse} + # the file. + # @yieldreturn [Boolean] if the block returns +false+, parsing for + # the file is cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#295 + def before_parse_file(&block); end + + # @return [Array] the list of callbacks to be called before + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#345 + def before_parse_file_callbacks; end + + # Registers a callback to be called before a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Setting global state + # SourceParser.before_parse_list do |files, globals| + # globals.method_count = 0 + # end + # SourceParser.after_parse_list do |files, globals| + # puts "Found #{globals.method_count} methods" + # end + # class MyCountHandler < Handlers::Ruby::Base + # handles :def, :defs + # process { globals.method_count += 1 } + # end + # YARD.parse + # # Prints: "Found 37 methods" + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." + # @example Using a global callback to cancel parsing + # SourceParser.before_parse_list do |files, globals| + # return false if files.include?('foo.rb') + # end + # + # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method + # YARD.parse('bar.rb') # parses normally + # @return [Proc] the yielded block + # @see before_parse_file + # @see after_parse_list + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [Boolean] if the block returns +false+, parsing is + # cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#234 + def before_parse_list(&block); end + + # @return [Array] the list of callbacks to be called before + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#331 + def before_parse_list_callbacks; end + + # Parses a path or set of paths + # + # @param paths [String, Array] a path, glob, or list of paths to + # parse + # @param excluded [Array] a list of excluded path matchers + # @param level [Fixnum] the logger level to use during parsing. See + # {YARD::Logger} + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#100 + def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end + + # Parses a string +content+ + # + # @param content [String] the block of code to parse + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return the parser object that was used to parse +content+ + # + # source://yard//lib/yard/parser/source_parser.rb#123 + def parse_string(content, ptype = T.unsafe(nil)); end + + # @return [Symbol] the default parser type (defaults to :ruby) + # + # source://yard//lib/yard/parser/source_parser.rb#86 + def parser_type; end + + # source://yard//lib/yard/parser/source_parser.rb#88 + def parser_type=(value); end + + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#163 + def parser_type_extensions; end + + # source://yard//lib/yard/parser/source_parser.rb#164 + def parser_type_extensions=(value); end + + # Finds a parser type that is registered for the extension. If no + # type is found, the default Ruby type is returned. + # + # @return [Symbol] the parser type to be used for the extension + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#171 + def parser_type_for_extension(extension); end + + # @private + # @return [Hash{Symbol=>Object}] a list of registered parser types + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#157 + def parser_types; end + + # source://yard//lib/yard/parser/source_parser.rb#158 + def parser_types=(value); end + + # Registers a new parser type. + # + # @example Registering a parser for "java" files + # SourceParser.register_parser_type :java, JavaParser, 'java' + # @param type [Symbol] a symbolic name for the parser type + # @param parser_klass [Base] a class that implements parsing and tokenization + # @param extensions [Array, String, Regexp] a list of extensions or a + # regex to match against the file extension + # @return [void] + # @see Parser::Base + # + # source://yard//lib/yard/parser/source_parser.rb#146 + def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end + + # Tokenizes but does not parse the block of code + # + # @param content [String] the block of code to tokenize + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#132 + def tokenize(content, ptype = T.unsafe(nil)); end + + # Returns the validated parser type. Basically, enforces that :ruby + # type is never set if the Ripper library is not available + # + # @param type [Symbol] the parser type to set + # @private + # @return [Symbol] the validated parser type + # + # source://yard//lib/yard/parser/source_parser.rb#184 + def validated_parser_type(type); end + + private + + # Parses a list of files in a queue. + # + # @param files [Array] a list of files to queue for parsing + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#364 + def parse_in_order(*files); end + end +end + +# The default glob of files to be parsed. +# +# @since 0.9.0 +# +# source://yard//lib/yard/parser/source_parser.rb#71 +YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) + +# Byte order marks for various encodings +# +# @since 0.7.0 +# +# source://yard//lib/yard/parser/source_parser.rb#75 +YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/source_parser.rb#66 +YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#67 +YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#65 +YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) + +# Raised when an object is recognized but cannot be documented. This +# generally occurs when the Ruby syntax used to declare an object is +# too dynamic in nature. +# +# source://yard//lib/yard/parser/source_parser.rb#10 +class YARD::Parser::UndocumentableError < ::RuntimeError; end + +# The root path for YARD source libraries +# +# source://yard//lib/yard.rb#4 +YARD::ROOT = T.let(T.unsafe(nil), String) + +# Holds Rake tasks used by YARD +# +# source://yard//lib/yard/autoload.rb#192 +module YARD::Rake; end + +# The rake task to run {CLI::Yardoc} and generate documentation. +# +# source://yard//lib/yard/rake/yardoc_task.rb#8 +class YARD::Rake::YardocTask < ::Rake::TaskLib + # Creates a new task with name +name+. + # + # @param name [String, Symbol] the name of the rake task + # @return [YardocTask] a new instance of YardocTask + # @yield a block to allow any options to be modified on the task + # @yieldparam _self [YardocTask] the task object to allow any parameters + # to be changed. + # + # source://yard//lib/yard/rake/yardoc_task.rb#50 + def initialize(name = T.unsafe(nil)); end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after; end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after=(_arg0); end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before; end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before=(_arg0); end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files; end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files=(_arg0); end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name; end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name=(_arg0); end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options; end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options=(_arg0); end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options; end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options=(_arg0); end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier; end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier=(_arg0); end + + protected + + # Defines the rake task + # + # @return [void] + # + # source://yard//lib/yard/rake/yardoc_task.rb#68 + def define; end +end + +# The +Registry+ is the centralized data store for all {CodeObjects} created +# during parsing. The storage is a key value store with the object's path +# (see {CodeObjects::Base#path}) as the key and the object itself as the value. +# Object paths must be unique to be stored in the Registry. All lookups for +# objects are done on the singleton Registry instance using the {Registry.at} +# or {Registry.resolve} methods. +# +# == Saving / Loading a Registry +# The registry is saved to a "yardoc file" (actually a directory), which can +# be loaded back to perform any lookups. See {Registry.load!} and +# {Registry.save} for information on saving and loading of a yardoc file. +# +# == Threading Notes +# The registry class is a singleton class that is accessed directly in many +# places across YARD. To mitigate threading issues, YARD (0.6.5+) makes +# the Registry thread local. This means all access to a registry for a specific +# object set must occur in the originating thread. +# +# @example Loading the Registry +# Registry.load!('/path/to/yardocfile') # loads all objects into memory +# Registry.at('YARD::CodeObjects::Base').docstring +# # => "+Base+ is the superclass of all code objects ..." +# @example Getting an object by a specific path +# Registry.at('YARD::CodeObjects::Base#docstring') +# @example Performing a lookup on a method anywhere in the inheritance tree +# Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) +# +# source://yard//lib/yard/registry.rb#32 +module YARD::Registry + extend ::Enumerable + + class << self + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def [](path); end + + # Returns all objects in the registry that match one of the types provided + # in the +types+ list (if +types+ is provided). + # + # @example Returns all objects + # Registry.all + # @example Returns all classes and modules + # Registry.all(:class, :module) + # @param types [Array] an optional list of types to narrow the + # objects down by. Equivalent to performing a select: + # +Registry.all.select {|o| types.include(o.type) }+ + # @return [Array] the list of objects found + # @see CodeObjects::Base#type + # + # source://yard//lib/yard/registry.rb#237 + def all(*types); end + + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def at(path); end + + # @param data [String] data to checksum + # @return [String] the SHA1 checksum for data + # + # source://yard//lib/yard/registry.rb#318 + def checksum_for(data); end + + # @return [Hash{String => String}] a set of checksums for files + # + # source://yard//lib/yard/registry.rb#312 + def checksums; end + + # Clears the registry + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#200 + def clear; end + + # Deletes an object from the registry + # + # @param object [CodeObjects::Base] the object to remove + # @return [void] + # + # source://yard//lib/yard/registry.rb#194 + def delete(object); end + + # Deletes the yardoc file from disk + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#176 + def delete_from_disk; end + + # Iterates over {all} with no arguments + # + # source://yard//lib/yard/registry.rb#221 + def each(&block); end + + # The registry singleton instance. + # + # @deprecated use Registry.methodname directly. + # @return [Registry] returns the registry instance + # + # source://yard//lib/yard/registry.rb#363 + def instance; end + + # Loads the registry and/or parses a list of files + # + # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) + # Registry.load(['a', 'b', 'c']) + # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists + # Registry.load(['a', 'b'], true) + # @param files [String, Array] if +files+ is an Array, it should represent + # a list of files that YARD should parse into the registry. If reload is + # set to false and the yardoc file already exists, these files are skipped. + # If files is a String, it should represent the yardoc file to load + # into the registry. + # @param reparse [Boolean] if reparse is false and a yardoc file already + # exists, any files passed in will be ignored. + # @raise [ArgumentError] if files is not a String or Array + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#109 + def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end + + # Loads a yardoc file and forces all objects cached on disk into + # memory. Equivalent to calling {load_yardoc} followed by {load_all} + # + # @param file [String] the yardoc file to load + # @return [Registry] the registry object (for chaining) + # @see #load_yardoc + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#144 + def load!(file = T.unsafe(nil)); end + + # Forces all objects cached on disk into memory + # + # @example Loads all objects from disk + # Registry.load + # Registry.all.count #=> 0 + # Registry.load_all + # Registry.all.count #=> 17 + # @return [Registry] the registry object (for chaining) + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#159 + def load_all; end + + # Loads a yardoc file directly + # + # @param file [String] the yardoc file to load. + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#130 + def load_yardoc(file = T.unsafe(nil)); end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry.rb#271 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see locked_for_writing? + # + # source://yard//lib/yard/registry.rb#209 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry.rb#214 + def locked_for_writing?(file = T.unsafe(nil)); end + + # Returns the paths of all of the objects in the registry. + # + # @param reload [Boolean] whether to load entire database + # @return [Array] all of the paths in the registry. + # + # source://yard//lib/yard/registry.rb#252 + def paths(reload = T.unsafe(nil)); end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#353 + def po_dir; end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#351 + def po_dir=(dir); end + + # The assumed types of a list of paths. This method is used by CodeObjects::Base + # + # @deprecated The registry no longer globally tracks proxy types. + # @private + # @return [{String => Symbol}] a set of unresolved paths and their assumed type + # + # source://yard//lib/yard/registry.rb#341 + def proxy_types; end + + # Registers a new object with the registry + # + # @param object [CodeObjects::Base] the object to register + # @return [CodeObjects::Base] the registered object + # + # source://yard//lib/yard/registry.rb#186 + def register(object); end + + # Attempts to find an object by name starting at +namespace+, performing + # a lookup similar to Ruby's method of resolving a constant in a namespace. + # + # @example Looks for a constant in the root namespace + # Registry.resolve(nil, 'CONSTANT') + # @example Looks for a class method respecting the inheritance tree + # Registry.resolve(myclass, 'mymethod', true) + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") + # @example Looks for a constant but returns a proxy if not found + # Registry.resolve(P('A::B::C'), 'D', false, true) # => # + # @example Looks for a complex path from a namespace + # Registry.resolve(P('A::B'), 'B::D') # => # + # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) + # when performing name resolution if set to +true+. + # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace + # (module or class). If +nil+ or +:root+, starts from the {root} object. + # @param name [String, Symbol] the name (or complex path) to look for from + # +namespace+. + # @param proxy_fallback [Boolean] If +true+, returns a proxy representing + # the unresolved path (namespace + name) if no object is found. + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to. No type checking if nil. + # @return [CodeObjects::Base] the object if it is found + # @return [CodeObjects::Proxy] a Proxy representing the object if + # +proxy_fallback+ is +true+. + # @return [nil] if +proxy_fallback+ is +false+ and no object was found. + # @see P + # + # source://yard//lib/yard/registry.rb#303 + def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end + + # The root namespace object. + # + # @return [CodeObjects::RootObject] the root object in the namespace + # + # source://yard//lib/yard/registry.rb#266 + def root; end + + # Saves the registry to +file+ + # + # @param file [String] the yardoc file to save to + # @return [Boolean] true if the file was saved + # + # source://yard//lib/yard/registry.rb#170 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#335 + def single_object_db; end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#334 + def single_object_db=(v); end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#88 + def yardoc_file; end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#86 + def yardoc_file=(v); end + + # Returns the .yardoc file associated with a gem. + # + # @param gem [String] the name of the gem to search for + # @param ver_require [String] an optional Gem version requirement + # @param for_writing [Boolean] whether or not the method should search + # for writable locations + # @return [String] if +for_writing+ is set to +true+, returns the best + # location suitable to write the .yardoc file. Otherwise, the first + # existing location associated with the gem's .yardoc file. + # @return [nil] if +for_writing+ is set to false and no yardoc file + # is found, returns nil. + # + # source://yard//lib/yard/registry.rb#53 + def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/registry.rb#390 + def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#410 + def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#403 + def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # Attempts to resolve a name in a namespace + # + # @param namespace [CodeObjects::NamespaceObject] the starting namespace + # @param name [String] the name to look for + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to + # + # source://yard//lib/yard/registry.rb#375 + def partial_resolve(namespace, name, type = T.unsafe(nil)); end + + # @since 0.9.1 + # + # source://yard//lib/yard/registry.rb#434 + def thread_local_resolver; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#424 + def thread_local_store; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#429 + def thread_local_store=(value); end + end +end + +# source://yard//lib/yard/registry.rb#35 +YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#33 +YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#34 +YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String) + +# Handles all logic for complex lexical and inherited object resolution. +# Used by {Registry.resolve}, so there is no need to use this class +# directly. +# +# @see Registry.resolve +# @since 0.9.1 +# +# source://yard//lib/yard/registry_resolver.rb#9 +class YARD::RegistryResolver + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a new resolver object for a registry. + # + # @param registry [Registry] only set this if customizing the registry + # object + # @return [RegistryResolver] a new instance of RegistryResolver + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#16 + def initialize(registry = T.unsafe(nil)); end + + # Performs a lookup on a given path in the registry. Resolution will occur + # in a similar way to standard Ruby identifier resolution, doing lexical + # lookup, as well as (optionally) through the inheritance chain. A proxy + # object can be returned if the lookup fails for future resolution. The + # proxy will be type hinted with the +type+ used in the original lookup. + # + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) + # @example A lookup from root + # resolver.lookup_by_path("A::B::C") + # @example A lookup from the A::B namespace + # resolver.lookup_by_path("C", namespace: P("A::B")) + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object + # that matches the path lookup. If proxy_fallback is provided, a proxy + # object will be returned in the event of no match, otherwise nil will + # be returned. + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#50 + def lookup_by_path(path, opts = T.unsafe(nil)); end + + private + + # Collects and returns all inherited namespaces for a given object + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#181 + def collect_namespaces(object); end + + # Performs a lexical lookup from a namespace for a path and a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#104 + def lookup_path_direct(namespace, path, type); end + + # Performs a lookup through the inheritance chain on a path with a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#121 + def lookup_path_inherited(namespace, path, type); end + + # @return [Regexp] the regexp that can be used to split a string on all + # occurrences of separator tokens + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#206 + def split_on_separators_match; end + + # @return [Regexp] the regexp match of the default separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#194 + def starts_with_default_separator_match; end + + # @return [Regexp] the regexp that matches strings starting with + # a separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#200 + def starts_with_separator_match; end + + # return [Boolean] if the obj's type matches the provided type. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#99 + def validate(obj, type); end +end + +# The data store for the {Registry}. +# +# @see Registry +# @see Serializers::YardocSerializer +# +# source://yard//lib/yard/registry_store.rb#9 +class YARD::RegistryStore + # @return [RegistryStore] a new instance of RegistryStore + # + # source://yard//lib/yard/registry_store.rb#14 + def initialize; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def [](key); end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def []=(key, value); end + + # Returns the value of attribute checksums. + # + # source://yard//lib/yard/registry_store.rb#12 + def checksums; end + + # Deletes an object at a given path + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#75 + def delete(key); end + + # Deletes the .yardoc database on disk + # + # @param force [Boolean] if force is not set to true, the file/directory + # will only be removed if it ends with .yardoc. This helps with + # cases where the directory might have been named incorrectly. + # @return [Boolean] true if the .yardoc database was deleted, false + # otherwise. + # + # source://yard//lib/yard/registry_store.rb#218 + def destroy(force = T.unsafe(nil)); end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/registry_store.rb#12 + def file; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def get(key); end + + # Gets all path names from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array] the path names of all the code objects + # + # source://yard//lib/yard/registry_store.rb#88 + def keys(reload = T.unsafe(nil)); end + + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # + # source://yard//lib/yard/registry_store.rb#128 + def load(file = T.unsafe(nil)); end + + # Loads the .yardoc file and loads all cached objects into memory + # automatically. + # + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry_store.rb#142 + def load!(file = T.unsafe(nil)); end + + # Loads all cached objects into memory + # + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#153 + def load_all; end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry_store.rb#122 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @param file [String] if supplied, the path to the database + # @see #locked_for_writing? + # + # source://yard//lib/yard/registry_store.rb#201 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @param file [String] if supplied, the path to the database + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry_store.rb#207 + def locked_for_writing?(file = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array] a list of object paths with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#102 + def paths_for_type(type, reload = T.unsafe(nil)); end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#11 + def proxy_types; end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def put(key, value); end + + # @return [CodeObjects::RootObject] the root object + # + # source://yard//lib/yard/registry_store.rb#117 + def root; end + + # Saves the database to disk + # + # @param merge [Boolean] if true, merges the data in memory with the + # data on disk, otherwise the data on disk is deleted. + # @param file [String, nil] if supplied, the name of the file to save to + # @return [Boolean] whether the database was saved + # + # source://yard//lib/yard/registry_store.rb#177 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Gets all code objects from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array] all the code objects + # + # source://yard//lib/yard/registry_store.rb#96 + def values(reload = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array] a list of objects with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#111 + def values_for_type(type, reload = T.unsafe(nil)); end + + protected + + # source://yard//lib/yard/registry_store.rb#243 + def checksums_path; end + + # source://yard//lib/yard/registry_store.rb#251 + def load_yardoc; end + + # source://yard//lib/yard/registry_store.rb#247 + def object_types_path; end + + # source://yard//lib/yard/registry_store.rb#234 + def objects_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#239 + def proxy_types_path; end + + private + + # source://yard//lib/yard/registry_store.rb#319 + def all_disk_objects; end + + # source://yard//lib/yard/registry_store.rb#291 + def load_checksums; end + + # source://yard//lib/yard/registry_store.rb#313 + def load_locale(name); end + + # source://yard//lib/yard/registry_store.rb#281 + def load_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#276 + def load_proxy_types; end + + # source://yard//lib/yard/registry_store.rb#299 + def load_root; end + + # source://yard//lib/yard/registry_store.rb#271 + def load_yardoc_old; end + + # source://yard//lib/yard/registry_store.rb#332 + def write_checksums; end + + # source://yard//lib/yard/registry_store.rb#338 + def write_complete_lock; end + + # source://yard//lib/yard/registry_store.rb#328 + def write_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#324 + def write_proxy_types; end +end + +# Namespace for components that serialize to various endpoints +# +# source://yard//lib/yard/autoload.rb#196 +module YARD::Serializers; end + +# The abstract base serializer. Serializers allow templates to be +# rendered to various endpoints. For instance, a {FileSystemSerializer} +# would allow template contents to be written to the filesystem +# +# To implement a custom serializer, override the following methods: +# * {#serialize} +# * {#serialized_path} +# +# Optionally, a serializer can implement before and after filters: +# * {#before_serialize} +# * {#after_serialize} +# +# @abstract Override this class to implement a custom serializer. +# +# source://yard//lib/yard/serializers/base.rb#17 +class YARD::Serializers::Base + # Creates a new serializer with options + # + # @param opts [Hash] the options to assign to {#options} + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/serializers/base.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # Called after serialization. + # + # @abstract Should run code after serialization. + # @param data [String] the data that was serialized. + # @return [void] + # + # source://yard//lib/yard/serializers/base.rb#80 + def after_serialize(data); end + + # Called before serialization. + # + # @abstract Should run code before serialization. Should return false + # if serialization should not occur. + # @return [Boolean] whether or not serialization should occur + # + # source://yard//lib/yard/serializers/base.rb#73 + def before_serialize; end + + # Returns whether an object has been serialized + # + # @abstract This method should return whether the endpoint already exists. + # For instance, a file system serializer would check if the file exists + # on disk. You will most likely use +#basepath+ and {#serialized_path} to + # get the endpoint's location. + # @param object [CodeObjects::Base] the object to check existence of + # @return [Boolean] whether the endpoint exists. + # @since 0.6.0 + # + # source://yard//lib/yard/serializers/base.rb#62 + def exists?(object); end + + # All serializer options are saved so they can be passed to other serializers. + # + # @return [SymbolHash] the serializer options + # + # source://yard//lib/yard/serializers/base.rb#21 + def options; end + + # Serializes an object. + # + # @abstract This method should implement the logic that serializes + # +data+ to the respective endpoint. This method should also call + # the before and after callbacks {#before_serialize} and {#after_serialize} + # @param object [CodeObjects::Base, String] the object to serialize the + # data for. The object can also be a string (for non-object serialization) + # @param data [String] the contents that should be serialized + # + # source://yard//lib/yard/serializers/base.rb#42 + def serialize(object, data); end + + # The serialized path of an object + # + # @abstract This method should return the path of the object on the + # endpoint. For instance, for a file serializer, this should return + # the filename that represents the object on disk. + # @param object [CodeObjects::Base] the object to return a path for + # @return [String] the serialized path of an object + # + # source://yard//lib/yard/serializers/base.rb#51 + def serialized_path(object); end +end + +# Implements a serializer that reads from and writes to the filesystem. +# +# source://yard//lib/yard/serializers/file_system_serializer.rb#5 +class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base + # Creates a new FileSystemSerializer with options + # + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [FileSystemSerializer] a new instance of FileSystemSerializer + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # The base path to write data to. + # + # @return [String] a base path + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#8 + def basepath; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#10 + def basepath=(value); end + + # Checks the disk for an object and returns whether it was serialized. + # + # @param object [CodeObjects::Base] the object to check + # @return [Boolean] whether an object has been serialized to disk + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#71 + def exists?(object); end + + # The extension of the filename (defaults to +html+) + # + # @return [String] the extension of the file. Empty string for no extension. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#17 + def extension; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#19 + def extension=(value); end + + # Serializes object with data to its serialized path (prefixed by the +#basepath+). + # + # @return [String] the written data (for chaining) + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#38 + def serialize(object, data); end + + # Implements the serialized path of a code object. + # + # @param object [CodeObjects::Base, CodeObjects::ExtraFileObject, String] the object to get a path for. The path of a string is the string itself. + # @return [String] if object is a String, returns + # object, otherwise the path on disk (without the basepath). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#50 + def serialized_path(object); end + + private + + # Builds a filename mapping from object paths to filesystem path names. + # Needed to handle case sensitive YARD objects mapped into a case + # insensitive filesystem. Uses with {#mapped_name} to determine the + # mapping name for a given object. + # + # @note In order to use filesystem name mapping, you must initialize + # the serializer object after preparing the {YARD::Registry}. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#84 + def build_filename_map; end + + # Remove special chars from filenames. + # Windows disallows \ / : * ? " < > | but we will just remove any + # non alphanumeric (plus period, underscore and dash). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#111 + def encode_path_components(*components); end + + # @return [String] the filesystem mapped name of a given object. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#102 + def mapped_name(object); end +end + +# Serializes an object to a process (like less) +# +# @example Serializing to a pager (less) +# serializer = ProcessSerializer.new('less') +# serializer.serialize(object, "data!") +# +# source://yard//lib/yard/serializers/process_serializer.rb#9 +class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base + # Creates a new ProcessSerializer for the shell command +cmd+ + # + # @param cmd [String] the command that will accept data on stdin + # @return [ProcessSerializer] a new instance of ProcessSerializer + # + # source://yard//lib/yard/serializers/process_serializer.rb#13 + def initialize(cmd); end + + # Overrides serialize behaviour and writes data to standard input + # of the associated command + # + # source://yard//lib/yard/serializers/process_serializer.rb#19 + def serialize(_object, data); end +end + +# A serializer that writes data to standard output. +# +# source://yard//lib/yard/serializers/stdout_serializer.rb#5 +class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base + # Creates a serializer to print text to stdout + # + # @param wrap [Fixnum, nil] if wrap is a number, wraps text to +wrap+ + # columns, otherwise no wrapping is done. + # @return [StdoutSerializer] a new instance of StdoutSerializer + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#10 + def initialize(wrap = T.unsafe(nil)); end + + # Overrides serialize behaviour to write data to standard output + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#15 + def serialize(_object, data); end + + private + + # Wraps text to a specific column length + # + # @param text [String] the text to wrap + # @param _length [Fixnum] the column length to wrap to + # @return [String] the wrapped text + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#26 + def word_wrap(text, _length = T.unsafe(nil)); end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#32 +class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [YardocSerializer] a new instance of YardocSerializer + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#33 + def initialize(yfile); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#40 + def checksums_path; end + + # @return [Boolean] + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#45 + def complete?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#42 + def complete_lock_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#101 + def deserialize(path, is_path = T.unsafe(nil)); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see #locked_for_writing? + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#54 + def lock_for_writing; end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#62 + def locked_for_writing?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#41 + def object_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#37 + def objects_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#43 + def processing_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#39 + def proxy_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#93 + def serialize(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#66 + def serialized_path(object); end + + private + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#114 + def dump(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#119 + def internal_dump(object, first_object = T.unsafe(nil)); end +end + +# Namespace for classes and modules that handle serving documentation over HTTP +# +# == Implementing a Custom Server +# To customize the YARD server, see the {Adapter} and {Router} classes. +# +# == Rack Middleware +# If you want to use the YARD server as a Rack middleware, see the documentation +# in {RackMiddleware}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#214 +module YARD::Server + class << self + # Registers a static path to be used in static asset lookup. + # + # @param path [String] the pathname to register + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/server.rb#8 + def register_static_path(path); end + end +end + +# This class implements the bridge between the {Router} and the server +# backend for a specific server type. YARD implements concrete adapters +# for WEBrick and Rack respectively, though other adapters can be made +# for other server architectures. +# +# == Subclassing Notes +# To create a concrete adapter class, implement the {#start} method to +# initiate the server backend. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#23 +class YARD::Server::Adapter + # Creates a new adapter object + # + # @option opts + # @option opts + # @option opts + # @param libs [Hash{String=>Array}] a list of libraries, + # see {#libraries} for formulating this list. + # @param opts [Hash] extra options to pass to the adapter + # @return [Adapter] a new instance of Adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#71 + def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end + + # Adds a library to the {#libraries} mapping for a given library object. + # + # @example Adding a new library to an adapter + # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc') + # @param library [LibraryVersion] a library to add + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#88 + def add_library(library); end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root; end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root=(_arg0); end + + # @return [Hash{String=>Array}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries; end + + # @return [Hash{String=>Array}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries=(_arg0); end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options; end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options=(_arg0); end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router; end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router=(_arg0); end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options; end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options=(_arg0); end + + # Implement this method to connect your adapter to your server. + # + # @abstract + # @raise [NotImplementedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#95 + def start; end + + class << self + # Performs any global initialization for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#48 + def setup; end + + # Performs any global shutdown procedures for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#56 + def shutdown; end + end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#16 +YARD::Server::CR = T.let(T.unsafe(nil), String) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#18 +YARD::Server::CRLF = T.let(T.unsafe(nil), String) + +# Commands implement specific kinds of server responses which are routed +# to by the {Router} class. To implement a custom command, subclass {Commands::Base}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#219 +module YARD::Server::Commands; end + +# This is the base command class used to implement custom commands for +# a server. A command will be routed to by the {Router} class and return +# a Rack-style response. +# +# == Attribute Initializers +# All attributes can be initialized via options passed into the {#initialize} +# method. When creating a custom command, the {Adapter#options} will +# automatically be mapped to attributes by the same name on your class. +# +# class MyCommand < Base +# attr_accessor :myattr +# end +# +# Adapter.new(libs, {:myattr => 'foo'}).start +# +# # when a request comes in, cmd.myattr == 'foo' +# +# == Subclassing Notes +# To implement a custom command, override the {#run} method, not {#call}. +# In your implementation, you should set the body and status for requests. +# See details in the +#run+ method documentation. +# +# Note that if your command deals directly with libraries, you should +# consider subclassing the more specific {LibraryCommand} class instead. +# +# @abstract +# @see #run +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/base.rb#34 +class YARD::Server::Commands::Base + # Creates a new command object, setting attributes named by keys + # in the options hash. After initialization, the options hash + # is saved in {#command_options} for further inspection. + # + # @example Creating a Command + # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib) + # cmd.library # => mylib + # cmd.command_options # => {:caching => true, :library => mylib} + # @param opts [Hash] the options hash, saved to {#command_options} + # after initialization. + # @return [Base] a new instance of Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#75 + def initialize(opts = T.unsafe(nil)); end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter; end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter=(_arg0); end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body; end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body=(_arg0); end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching; end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching=(_arg0); end + + # The main method called by a router with a request object. + # + # @note This command should not be overridden by subclasses. Implement + # the callback method {#run} instead. + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array)] a Rack-style response + # of status, headers, and body wrapped in an array. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#89 + def call(request); end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options; end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options=(_arg0); end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers; end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers=(_arg0); end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path; end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path=(_arg0); end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request; end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request=(_arg0); end + + # Subclass this method to implement a custom command. This method + # should set the {#status} and {#body}, and optionally modify the + # {#headers}. Note that +#status+ defaults to 200. + # + # @abstract + # @example A custom command + # class ErrorCommand < Base + # def run + # self.body = 'ERROR! The System is down!' + # self.status = 500 + # self.headers['Content-Type'] = 'text/plain' + # end + # end + # @raise [NotImplementedError] + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#128 + def run; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status=(_arg0); end + + protected + + # Override this method to implement custom caching mechanisms for + # + # @example Caching to memory + # $memory_cache = {} + # def cache(data) + # $memory_cache[path] = data + # end + # @param data [String] the data to cache + # @return [String] the same cached data (for chaining) + # @see StaticCaching + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#165 + def cache(data); end + + # Sets the body and headers for a 404 response. Does not modify the + # body if already set. + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#180 + def not_found; end + + # Sets the headers and status code for a redirection to a given URL + # + # @param url [String] the URL to redirect to + # @raise [FinishRequest] causes the request to terminate. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#192 + def redirect(url); end + + # Renders a specific object if provided, or a regular template rendering + # if object is not provided. + # + # @param object [CodeObjects::Base, nil] calls {CodeObjects::Base#format} if + # an object is provided, or {Templates::Engine.render} if object is nil. Both + # receive +#options+ as an argument. + # @return [String] the resulting output to display + # @since 0.6.0 + # @todo This method is dependent on +#options+, it should be in {LibraryCommand}. + # + # source://yard//lib/yard/server/commands/base.rb#144 + def render(object = T.unsafe(nil)); end + + private + + # Add a conservative cache control policy to reduce load on + # requests served with "?1234567890" style timestamp query strings. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#202 + def add_cache_control; end +end + +# Displays a README or extra file. +# +# @since 0.6.0 +# @todo Implement better support for detecting binary (image) filetypes +# +# source://yard//lib/yard/server/commands/display_file_command.rb#8 +class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index=(_arg0); end + + # @raise [NotFoundError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#11 + def run; end +end + +# Displays documentation for a specific object identified by the path +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/display_object_command.rb#6 +class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#36 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#47 + def not_found; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#9 + def run; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#54 + def object_path; end +end + +# Displays an object wrapped in frames +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/frames_command.rb#6 +class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/frames_command.rb#7 + def run; end +end + +# This is the base command for all commands that deal directly with libraries. +# Some commands do not, but most (like {DisplayObjectCommand}) do. If your +# command deals with libraries directly, subclass this class instead. +# See {Base} for notes on how to subclass a command. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#32 +class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base + # @return [LibraryCommand] a new instance of LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#63 + def initialize(opts = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#68 + def call(request); end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental; end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental=(_arg0); end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library; end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library=(_arg0); end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options; end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options=(_arg0); end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer; end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer=(_arg0); end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library; end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library=(_arg0); end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork; end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#96 + def call_with_fork(request, &block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#83 + def call_without_fork(request); end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#109 + def can_fork?; end + + # Hack to load a custom fulldoc template object that does + # not do any rendering/generation. We need this to access the + # generate_*_list methods. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#171 + def fulldoc_template; end + + # @raise [LibraryNotPreparedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#147 + def load_yardoc; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#159 + def not_prepared; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#118 + def restore_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#113 + def save_default_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#123 + def setup_library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#130 + def setup_yardopts; end +end + +# source://yard//lib/yard/server/commands/library_command.rb#35 +YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass) + +# Returns the index of libraries served by the server. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#13 +class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#16 + def run; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#5 +class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def template; end + + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def type; end + + # source://yard//lib/yard/options.rb#82 + def type=(_arg0); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#7 +class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#8 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command=(_arg0); end + + # @since 0.6.0 + # @yield [:adapter, adapter] + # + # source://yard//lib/yard/server/commands/library_command.rb#17 + def each(&block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#9 + def library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#12 + def serialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#11 + def serializer; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#10 + def single_library; end +end + +# Returns a list of objects of a specific type +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/list_command.rb#6 +class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/list_command.rb#9 + def run; end +end + +# Serves requests from the root of the server +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/root_request_command.rb#6 +class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/root_request_command.rb#9 + def run; end +end + +# Performs a search over the objects inside of a library and returns +# the results as HTML or plaintext +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/search_command.rb#7 +class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#14 + def run; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#26 + def visible_results; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#58 + def search_for_object; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#47 + def serve_normal; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#37 + def serve_xhr; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#32 + def url_for(object); end +end + +# Serves static content when no other router matches a request +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#6 +class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_command.rb#17 + def run; end +end + +# Defines the paths used to search for static assets. To define an +# extra path, use {YARD::Server.register_static_path} rather than +# modifying this constant directly. Also note that files in the +# document root will always take precedence over these paths. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#15 +YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array) + +# Include this module to get access to {#static_template_file?} +# and {favicon?} helpers. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 +module YARD::Server::Commands::StaticFileHelpers + include ::YARD::Server::HTTPUtils + + # Serves an empty favicon. + # + # @raise [FinishRequest] finalizes an empty body if the path matches + # /favicon.ico so browsers don't complain. + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 + def favicon?; end + + # Attempts to route a path to a static template file. + # + # @raise [FinishRequest] if a file was found and served + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 + def static_template_file?; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + end +end + +# A module that is mixed into {Templates::Template} in order to customize +# certain template methods. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_helper.rb#6 +module YARD::Server::DocServerHelper + # @param path_components [Array] components of a URL + # @return [String] the absolute path from any mounted base URI. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#61 + def abs_url(*path_components); end + + # @example The base path for a library 'foo' + # base_path('docs') # => 'docs/foo' + # @param path [String] the path prefix for a base path URI + # @return [String] the base URI for a library with an extra +path+ prefix + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#69 + def base_path(path); end + + # @return [String] a timestamp for a given file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#78 + def mtime(file); end + + # @return [String] a URL for a file with a timestamp + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#84 + def mtime_url(file); end + + # @return [Router] convenience method for accessing the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#75 + def router; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead + # of a disk location. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#11 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead + # of a disk location. + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#24 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the frames URL for the page + # + # @return [String] the URL pointing to the frames page + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#43 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#55 + def url_for_index; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL + # based on the list prefix instead of a HTML filename. + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#37 + def url_for_list(type); end + + # Returns the main URL, first checking a readme and then linking to the index + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#49 + def url_for_main; end +end + +# A custom {Serializers::Base serializer} which returns resource URLs instead of +# static relative paths to files on disk. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_serializer.rb#6 +class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [DocServerSerializer] a new instance of DocServerSerializer + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#7 + def initialize(_command = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#11 + def serialized_path(object); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#31 + def urlencode(name); end +end + +# Short circuits a request by raising an error. This exception is caught +# by {Commands::Base#call} to immediately end a request and return a response. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#6 +class YARD::Server::FinishRequest < ::RuntimeError; end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#25 +module YARD::Server::HTTPUtils + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + end +end + +# Default mime types +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#47 +YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#459 +YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#242 +class YARD::Server::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#267 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#300 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#286 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#320 + def append_data(data); end + + # Yields each entry in this FormData + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#335 + def each_data; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def list; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # A FormData will behave like an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def to_ary; end + + # This FormData's body + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#363 + def to_s; end + + protected + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#244 +YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#243 +YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#458 +YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#456 +YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#457 +YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#460 +YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#17 +YARD::Server::LF = T.let(T.unsafe(nil), String) + +# This exception is raised when {LibraryVersion#prepare!} fails, or discovers +# that the library is not "prepared" to be served by +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#9 +class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end + +# A library version encapsulates a library's documentation at a specific version. +# Although the version is optional, this allows for creating multiple documentation +# points for a specific library, each representing a unique version. The term +# "library" used in other parts of the YARD::Server documentation refers to +# objects of this class unless otherwise noted. +# +# A library points to a location where a {#yardoc_file} is located so that +# its documentation may be loaded and served. Optionally, a {#source_path} is +# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) +# should be loaded from. Both of these methods may not be known immediately, +# since the yardoc file may not be built until later. Resolving the yardoc +# file and source path are dependent on the specific library "source type" used. +# Source types (known as "library source") are discussed in detail below. +# +# == Using with Adapters +# A list of libraries need to be passed into adapters upon creation. In +# most cases, you will never do this manually, but if you use a {RackMiddleware}, +# you will need to pass in this list yourself. To build this list of libraries, +# you should create a hash of library names mapped to an *Array* of LibraryVersion +# objects. For example: +# +# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), +# LibraryVersion.new('mylib', '2.0', ...)]} +# +# Note that you can also use {Adapter#add_library} for convenience. +# +# The "array" part is required, even for just one library version. +# +# == Library Sources +# The {#source} method represents the library source type, ie. where the +# library "comes from". It might come from "disk", or it might come from a +# "gem" (technically the disk, but a separate type nonetheless). In these +# two cases, the yardoc file sits somewhere on your filesystem, though +# it may also be built dynamically if it does not yet exist. This behaviour +# is controlled through the {#prepare!} method, which prepares the yardoc file +# given a specific library source. We will see how this works in detail in +# the following section. +# +# == Implementing a Custom Library Source +# YARD can be extended to support custom library sources in order to +# build or retrieve a yardoc file at runtime from many different locations. +# +# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ +# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and +# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source +# type used in {#source} when creating the library object. The +# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon +# creation and should return the location where the source code for the library +# lives. The load method is called from {#prepare!} if there is no yardoc file +# and should set {#yardoc_file}. Below is a full example for +# implementing a custom library source, +:http+, which reads packaged .yardoc +# databases from zipped archives off of an HTTP server. +# +# Note that only +#load_yardoc_from_SOURCE+ is required. The other two +# methods are optional and can be set manually (via {#source_path=} and +# {#yardoc_file=}) on the object at any time. +# +# @example Implementing a Custom Library Source +# # Adds the source type "http" for .yardoc files zipped on HTTP servers +# class LibraryVersion +# def load_yardoc_from_http +# Thread.new do +# # zip/unzip method implementations are not shown +# download_zip_file("http://mysite.com/yardocs/#{self}.zip") +# unzip_file_to("/path/to/yardocs/#{self}") +# end +# +# # tell the server it's not ready yet (but it might be next time) +# raise LibraryNotPreparedError +# end +# +# def yardoc_file_for_http +# "/path/to/yardocs/#{self}/.yardoc" +# end +# +# def source_path_for_http +# File.dirname(yardoc_file) +# end +# end +# +# # Creating a library of this source type: +# LibraryVersion.new('name', '1.0', nil, :http) +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#94 +class YARD::Server::LibraryVersion + # @param name [String] the name of the library + # @param version [String] the specific (usually, but not always, numeric) library + # version + # @param yardoc [String] the location of the yardoc file, or nil if it is + # generated later + # @param source [Symbol] the location of the files used to build the yardoc. + # Builtin source types are +:disk+ or +:gem+. + # @return [LibraryVersion] a new instance of LibraryVersion + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#134 + def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def ==(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def eql?(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def equal?(other); end + + # @return [Gem::Specification] a gemspec object for a given library. Used + # for :gem source types. + # @return [nil] if there is no installed gem for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#191 + def gemspec; end + + # @return [Fixnum] used for Hash mapping. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#150 + def hash; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name=(_arg0); end + + # Prepares a library to be displayed by the server. This callback is + # performed before each request on a library to ensure that it is loaded + # and ready to be viewed. If any steps need to be performed prior to loading, + # they are performed through this method (though they should be implemented + # through the +load_yardoc_from_SOURCE+ method). + # + # @note You should not directly override this method. Instead, implement + # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific + # source type. See the {LibraryVersion} documentation for "Implementing + # a Custom Library Source" + # @raise [LibraryNotPreparedError] if the library is not ready to be + # displayed. Usually when raising this error, you would simultaneously + # begin preparing the library for subsequent requests, although this + # is not necessary. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#182 + def prepare!; end + + # @return [Boolean] whether the library has been completely processed + # and is ready to be served + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#162 + def ready?; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source=(_arg0); end + + # @return [String] the location of the source code for a library. This + # value is filled by calling +#source_path_for_SOURCE+ on this class. + # @return [nil] if there is no source code + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#122 + def source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#125 + def source_path=(_arg0); end + + # @param url_format [Boolean] if true, returns the string in a URI-compatible + # format (for appending to a URL). Otherwise, it is given in a more human + # readable format. + # @return [String] the string representation of the library. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#145 + def to_s(url_format = T.unsafe(nil)); end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version; end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version=(_arg0); end + + # @note To implement a custom yardoc file getter, implement + # @return [String] the location of the yardoc file used to load the object + # information from. + # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will + # be called on this library to build the yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#106 + def yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#109 + def yardoc_file=(_arg0); end + + protected + + # Called when a library of source type "disk" is to be prepared. In this + # case, the {#yardoc_file} should already be set, but the library may not + # be prepared. Run preparation if not done. + # + # @raise [LibraryNotPreparedError] if the yardoc file has not been + # prepared. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#206 + def load_yardoc_from_disk; end + + # Called when a library of source type "gem" is to be prepared. In this + # case, the {#yardoc_file} needs to point to the correct location for + # the installed gem. The yardoc file is built if it has not been done. + # + # @raise [LibraryNotPreparedError] if the gem does not have an existing + # yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#226 + def load_yardoc_from_gem; end + + # @return [String] the source path for a disk source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#243 + def source_path_for_disk; end + + # @return [String] the source path for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#248 + def source_path_for_gem; end + + # @return [String] the yardoc file for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#253 + def yardoc_file_for_gem; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#261 + def load_source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#266 + def load_yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#271 + def serializer; end +end + +# Raises an error if a resource is not found. This exception is caught by +# {Commands::Base#call} to immediately end a request and return a 404 response +# code. If a message is provided, the body is set to the exception message. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#11 +class YARD::Server::NotFoundError < ::RuntimeError; end + +# A server adapter to respond to requests using the Rack server infrastructure. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/rack_adapter.rb#52 +class YARD::Server::RackAdapter < ::YARD::Server::Adapter + include ::YARD::Server::HTTPUtils + + # Responds to Rack requests and builds a response with the {Router}. + # + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @since 0.6.0 + # + # source://yard//lib/yard/server/rack_adapter.rb#57 + def call(env); end + + # Starts the Rack server. This method will pass control to the server and + # block. + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/rack_adapter.rb#70 + def start; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/rack_adapter.rb#79 + def print_start_message(server); end +end + +# This class wraps the {RackAdapter} into a Rack-compatible middleware. +# See {#initialize} for a list of options to pass via Rack's +#use+ method. +# +# @example Using the RackMiddleware in a Rack application +# libraries = {:mylib => [YARD::Server::LibraryVersion.new('mylib', nil, '/path/to/.yardoc')]} +# use YARD::Server::RackMiddleware, :libraries => libraries +# @note You must pass a +:libraries+ option to the RackMiddleware via +#use+. To +# read about how to return a list of libraries, see {LibraryVersion} or look +# at the example below. +# @since 0.6.0 +# +# source://yard//lib/yard/server/rack_adapter.rb#25 +class YARD::Server::RackMiddleware + # Creates a new Rack-based middleware for serving YARD documentation. + # + # @option opts + # @option opts + # @option opts + # @param app the next Rack middleware in the stack + # @param opts [Hash] a customizable set of options + # @return [RackMiddleware] a new instance of RackMiddleware + # @since 0.6.0 + # + # source://yard//lib/yard/server/rack_adapter.rb#35 + def initialize(app, opts = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/rack_adapter.rb#41 + def call(env); end +end + +# source://yard//lib/yard/server/rack_adapter.rb#8 +YARD::Server::RackServer = Rackup::Server + +# A router class implements the logic used to recognize a request for a specific +# URL and run specific {Commands::Base commands}. +# +# == Subclassing Notes +# To create a custom router, subclass this class and pass it into the adapter +# options through {Adapter#initialize} or by directly modifying {Adapter#router}. +# +# The most general customization is to change the URL prefixes recognized by +# routing, which can be done by overriding {#docs_prefix}, {#list_prefix}, +# {#static_prefix}, and {#search_prefix}. +# +# == Implementing Custom Caching +# By default, the Router class performs static disk-based caching on all +# requests through the +#check_static_cache+. To override this behaviour, +# or create your own caching mechanism, mixin your own custom module with +# this method implemented as per {StaticCaching#check_static_cache}. +# +# @example Creating a subclassed router +# # Adds 'my' to all routing prefixes +# class MyRouter < YARD::Server::Router +# def docs_prefix; 'mydocs' end +# def list_prefix; 'mylist' end +# def static_prefix; 'mystatic' end +# def search_prefix; 'mysearch' end +# end +# +# # Using it: +# WebrickAdapter.new(libraries, :router => MyRouter).start +# @since 0.6.0 +# +# source://yard//lib/yard/server/router.rb#32 +class YARD::Server::Router + include ::YARD::Server::StaticCaching + include ::YARD::Server::Commands + + # Creates a new router for a specific adapter + # + # @param adapter [Adapter] the adapter to route requests to + # @return [Router] a new instance of Router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#45 + def initialize(adapter); end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter; end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter=(_arg0); end + + # Perform routing on a specific request, serving the request as a static + # file through {Commands::RootRequestCommand} if no route is found. + # + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array)] the Rack-style server response data + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#54 + def call(request); end + + # @return [String] the URI prefix for all object documentation requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#63 + def docs_prefix; end + + # @return [String] the URI prefix for all class/method/file list requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#66 + def list_prefix; end + + # @return [Array(LibraryVersion, Array)] the library followed + # by the rest of the path components in the request path. LibraryVersion + # will be nil if no matching library was found. + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#79 + def parse_library_from_path(paths); end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request; end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request=(_arg0); end + + # @return [String] the URI prefix for all search requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#69 + def search_prefix; end + + # @return [String] the URI prefix for all static assets (templates) + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#72 + def static_prefix; end + + protected + + # Adds extra :library/:path option keys to the adapter options. + # Use this method when passing options to a command. + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array] path components (split by '/') + # @return [Hash] finalized options + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#181 + def final_options(library, paths); end + + # Performs routing algorithm to find which prefix is called, first + # parsing out library name/version information. + # + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#105 + def route(path = T.unsafe(nil)); end + + # Routes requests from {#docs_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#128 + def route_docs(library, paths); end + + # Routes for the index of a library / multiple libraries + # + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#146 + def route_index; end + + # Routes requests from {#list_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#157 + def route_list(library, paths); end + + # Routes requests from {#search_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#165 + def route_search(library, paths); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#170 + def route_static(library, paths); end +end + +# Implements static caching for requests. +# +# @see Router Router documentation for "Caching" +# @since 0.6.0 +# +# source://yard//lib/yard/server/static_caching.rb#7 +module YARD::Server::StaticCaching + # Called by a router to return the cached object. By default, this + # method performs disk-based caching. To perform other forms of caching, + # implement your own +#check_static_cache+ method and mix the module into + # the Router class. + # + # Note that caching does not occur here. This method simply checks for + # the existence of cached data. To actually cache a response, see + # {Commands::Base#cache}. + # + # @example Implementing In-Memory Cache Checking + # module MemoryCaching + # def check_static_cache + # # $memory_cache is filled by {Commands::Base#cache} + # cached_data = $memory_cache[request.path] + # if cached_data + # [200, {'Content-Type' => 'text/html'}, [cached_data]] + # else + # nil + # end + # end + # end + # + # class YARD::Server::Router; include MemoryCaching; end + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no cache is available and routing should continue + # @see Commands::Base#cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/static_caching.rb#34 + def check_static_cache; end +end + +# The main adapter to initialize a WEBrick server. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/webrick_adapter.rb#7 +class YARD::Server::WebrickAdapter < ::YARD::Server::Adapter + # Initializes a WEBrick server. If {Adapter#server_options} contains a + # +:daemonize+ key set to true, the server will be daemonized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#10 + def start; end +end + +# The main WEBrick servlet implementation, accepting only GET requests. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/webrick_adapter.rb#20 +class YARD::Server::WebrickServlet < ::WEBrick::HTTPServlet::AbstractServlet + # @return [WebrickServlet] a new instance of WebrickServlet + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#23 + def initialize(server, adapter); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#21 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#21 + def adapter=(_arg0); end + + # @private + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#29 + def do_GET(request, response); end +end + +# Stubs marshal dumps and acts a delegate class for an object by path +# +# @private +# +# source://yard//lib/yard/serializers/yardoc_serializer.rb#6 +class YARD::StubProxy + # @return [StubProxy] a new instance of StubProxy + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#13 + def initialize(path, transient = T.unsafe(nil)); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#9 + def _dump(_depth); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#11 + def hash; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#18 + def method_missing(meth, *args, &block); end + + class << self + # source://yard//lib/yard/serializers/yardoc_serializer.rb#10 + def _load(str); end + end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#28 +YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer) + +# The root path for YARD builtin templates +# +# source://yard//lib/yard.rb#10 +YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) + +# Namespace for Tag components +# +# source://yard//lib/yard/autoload.rb#248 +module YARD::Tags; end + +# Defines an attribute with a given name, using indented block data as the +# attribute's docstring. If the type specifier is supplied with "r", "w", or +# "rw", the attribute is made readonly, writeonly or readwrite respectively. +# A readwrite attribute is the default, if no type is specified. The comment +# containing this directive does not need to be attached to any source, but +# if it is, that source code will be used as the method's source. +# +# To define a regular method, see {tag:!method} +# +# @example Defining a simple readonly attribute +# # @!attribute [r] count +# # @return [Fixnum] the size of the list +# @example Defining a simple readwrite attribute +# # @!attribute name +# # @return [String] the name of the user +# @note This directive should only be used if there is no explicit +attr_*+ +# declaration for the attribute in any source files (i.e., the attribute +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the attribute declaration itself. +# @note For backwards compatibility support, you do not need to indent +# the attribute's docstring text. If an +@!attribute+ directive is seen with +# no indented block, the entire docstring is used as the new attribute's +# docstring text. +# @see tag:!method +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#461 +class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#462 + def after_parse; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#470 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#476 + def method_signature; end + + private + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#486 + def create_attribute_data(object); end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#516 + def readable?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#512 + def writable?; end +end + +# source://yard//lib/yard/tags/default_factory.rb#4 +class YARD::Tags::DefaultFactory + # Parses tag text and creates a new tag with descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#13 + def parse_tag(tag_name, text); end + + # Parses tag text and creates a new tag with a key name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#22 + def parse_tag_with_name(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#89 + def parse_tag_with_options(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#70 + def parse_tag_with_title_and_text(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types and + # descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @raise [TagFormatError] + # @return [Tag] a tag object with the tag_name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#33 + def parse_tag_with_types(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a key + # name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#45 + def parse_tag_with_types_and_name(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a title + # on the first line and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#57 + def parse_tag_with_types_and_title(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#75 + def parse_tag_with_types_name_and_default(tag_name, text); end + + private + + # Extracts the name from raw tag text returning the name and remaining value + # + # @param text [String] the raw tag text + # @return [Array] an array holding the name as the first element and the + # value as the second element + # + # source://yard//lib/yard/tags/default_factory.rb#101 + def extract_name_from_text(text); end + + # @raise [TagFormatError] + # + # source://yard//lib/yard/tags/default_factory.rb#105 + def extract_title_and_desc_from_text(text); end + + # Parses a [], <>, {} or () block at the beginning of a line of text + # into a list of comma delimited values. + # + # @example + # obj.parse_types('[String, Array, nil]') # => [nil, ['String', 'Array', 'nil'], ""] + # obj.parse_types('b A string') # => ['b', ['String'], 'A string'] + # @return [Array(String, Array, String)] the text before the type + # list (or nil), followed by the type list parsed into an array of + # strings, followed by the text following the type list. + # + # source://yard//lib/yard/tags/default_factory.rb#129 + def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/default_factory.rb#138 + def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end +end + +# source://yard//lib/yard/tags/default_factory.rb#6 +YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_factory.rb#5 +YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_tag.rb#4 +class YARD::Tags::DefaultTag < ::YARD::Tags::Tag + # @return [DefaultTag] a new instance of DefaultTag + # + # source://yard//lib/yard/tags/default_tag.rb#7 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # Returns the value of attribute defaults. + # + # source://yard//lib/yard/tags/default_tag.rb#5 + def defaults; end +end + +# The base directive class. Subclass this class to create a custom +# directive, registering it with {Library.define_directive}. Directive +# classes are executed via the {#call} method, which perform all directive +# processing on the object. +# +# If processing occurs within a handler, the {#handler} attribute is +# available to access more information about parsing context and state. +# Handlers are only available when parsing from {Parser::SourceParser}, +# not when parsing directly from {DocstringParser}. If the docstring is +# attached to an object declaration, {#object} will be set and available +# to modify the generated code object directly. Note that both of these +# attributes may be nil, and directives should test their existence +# before attempting to use them. +# +# @abstract Subclasses should implement {#call}. +# @see Library.define_directive +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#23 +class YARD::Tags::Directive + # @param tag [Tag] the meta-data tag containing all input to the docstring + # @param parser [DocstringParser] the docstring parser object + # @return [Directive] a new instance of Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#55 + def initialize(tag, parser); end + + # Called after parsing all directives and tags in the docstring. Used + # to perform any cleanup after all directives perform their main task. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#74 + def after_parse; end + + # Called when processing the directive. Subclasses should implement + # this method to perform all functionality of the directive. + # + # @abstract implement this method to perform all data processing for + # the directive. + # @raise [NotImplementedError] + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#69 + def call; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text=(_arg0); end + + # @return [Handlers::Base, nil] the handler object the docstring parser + # might be attached to. May be nil. Only available when parsing + # through {Parser::SourceParser}. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#49 + def handler; end + + # @return [CodeObjects::Base, nil] the object the parent docstring is + # attached to. May be nil. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#43 + def object; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser=(_arg0); end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag; end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag=(_arg0); end + + protected + + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#80 + def inside_directive?; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser; end +end + +# Ends a group listing definition. Group definition automatically end +# when class or module blocks are closed, and defining a new group overrides +# the last group definition, but occasionally you need to end the current +# group to return to the default listing. Use {tag:!group} to begin a +# group listing. +# +# @example +# class Controller +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# +# # @!endgroup +# +# def index; end +# end +# @see tag:!group +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#105 +class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#106 + def call; end +end + +# Defines a group listing. All methods (and attributes) seen after this +# directive are placed into a group with the given description as the +# group name. The group listing is used by templates to organize methods +# and attributes into respective logical groups. To end a group listing +# use {tag:!endgroup}. +# +# @example +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# @note A group definition only applies to the scope it is defined in. +# If a new class or module is opened after the directive, this directive +# will not apply to methods in that class or module. +# @see tag:!endgroup +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#128 +class YARD::Tags::GroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#129 + def call; end +end + +# Keeps track of all the registered meta-data tags and directives. +# Also allows for defining of custom tags and customizing the tag parsing +# syntax. +# +# == Defining Custom Meta-Data Tags +# +# To define a custom tag, use {define_tag}. You should pass the tag +# name and the factory method to use when creating the tag. If you do not +# provide a factory method to use, it will default to {DefaultFactory#parse_tag} +# +# You can also define tag objects manually by simply implementing a "tagname_tag" +# method that returns a {Tag} object, but they will not take advantage of tag factory +# parsing: +# +# def mytag_tag(text) +# Tag.new(:mytag, text) +# end +# +# == Defining Custom Directives +# +# Directives can be defined by calling the {define_directive} method, taking +# the directive name, an optional tag factory parser method (to parse the +# data in the directive into a temporary {Tag} object) and a {Directive} subclass +# that performs the directive processing. For more information on creating a +# Directive subclass, see the {Directive} class documentation. +# +# Similar to tags, Directives can also be defined manually, in this case using +# the method name "mydirective_directive" and returning a new {Directive} object: +# +# def mydirective_directive(tag, parser) +# MyDirective.new(tag, parser) +# end +# +# == Namespaced Tags +# +# In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended +# to namespace project specific tags, like +@yard.tag_name+, so that tags do not +# collide with other plugins or new built-in tags. +# +# == Adding/Changing the Tag Syntax +# +# If you have specialized tag parsing needs you can substitute the {#factory} +# object with your own by setting {Library.default_factory= Library.default_factory} +# to a new class with its own parsing methods before running YARD. This is useful +# if you want to change the syntax of existing tags (@see, @since, etc.) +# +# @example Defining a custom tag +# define_tag "Parameter", :param, :with_types_and_name +# define_tag "Author", :author +# @example Defining a custom directive +# define_directive :method, :with_title_and_text, MethodDirective +# @see DefaultFactory +# @see define_tag +# @see define_directive +# @see Directive +# +# source://yard//lib/yard/tags/library.rb#59 +class YARD::Tags::Library + # @return [Library] a new instance of Library + # + # source://yard//lib/yard/tags/library.rb#260 + def initialize(factory = T.unsafe(nil)); end + + # Marks a class/module/method as abstract with optional + # implementor information. + # + # @example + # # @abstract Subclass and override {#run} to implement + # # a custom Threadable class. + # class Runnable + # def run; raise NotImplementedError end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def abstract_tag(text); end + + # Declares the API that the object belongs to. Does not display in + # output, but useful for performing queries (+yardoc --query+). Any text is + # allowable in this tag, and there are no predefined values. + # + # @example + # class Post + # # @api private + # def reset_table!; table.flush end + # end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @note The special name +@api private+ does display a notice in + # documentation if it is listed, letting users know that the + # method is not to be used by external components. + # + # source://yard//lib/yard/tags/library.rb#168 + def api_tag(text); end + + # Declares a readonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_reader_tag(text); end + + # Declares a readwrite attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr [String] name the name of the structure + # # @attr [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_tag(text); end + + # Declares a writeonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_writer_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def attribute_directive(tag, parser); end + + # List the author or authors of a class, module, or method. + # + # @example + # # @author Foo Bar + # class MyClass; end + # + # source://yard//lib/yard/tags/library.rb#168 + def author_tag(text); end + + # Marks a method/class as deprecated with an optional description. + # The description should be used to inform users of the recommended + # migration path, and/or any useful information about why the object + # was marked as deprecated. + # + # @example Deprecate a method with a replacement API + # # @deprecated Use {#bar} instead. + # def foo; end + # @example Deprecate a method with no replacement + # class Thread + # # @deprecated Exiting a thread in this way is not reliable and + # # can cause a program crash. + # def kill; end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def deprecated_tag(text); end + + # Creates a new directive with tag information and a docstring parser + # object. + # + # @param tag_name [String] the name of the tag + # @param tag_buf [String] the tag data + # @param parser [DocstringParser] the parser object parsing the docstring + # @return [Directive] the newly created directive + # + # source://yard//lib/yard/tags/library.rb#290 + def directive_create(tag_name, tag_buf, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def endgroup_directive(tag, parser); end + + # Show an example snippet of code for an object. The first line + # is an optional title. + # + # @example + # # @example Reverse a String + # # "mystring".reverse #=> "gnirtsym" + # def reverse; end + # + # source://yard//lib/yard/tags/library.rb#168 + def example_tag(text); end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory; end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory=(_arg0); end + + # source://yard//lib/yard/tags/library.rb#202 + def group_directive(tag, parser); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a directive by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#280 + def has_directive?(tag_name); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a tag by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#267 + def has_tag?(tag_name); end + + # source://yard//lib/yard/tags/library.rb#202 + def macro_directive(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def method_directive(tag, parser); end + + # Adds an emphasized note at the top of the docstring for the object + # + # @example + # # @note This method should only be used in outer space. + # def eject; end + # @see tag:todo + # + # source://yard//lib/yard/tags/library.rb#168 + def note_tag(text); end + + # Describe an options hash in a method. The tag takes the + # name of the options parameter first, followed by optional types, + # the option key name, a default value for the key and a + # description of the option. The default value should be placed within + # parentheses and is optional (can be omitted). + # + # Note that a +@param+ tag need not be defined for the options + # hash itself, though it is useful to do so for completeness. + # + # @example + # # @param [Hash] opts the options to create a message with. + # # @option opts [String] :subject The subject + # # @option opts [String] :from ('nobody') From address + # # @option opts [String] :to Recipient email + # # @option opts [String] :body ('') The email's body + # def send_email(opts = {}) end + # @note For keyword parameters, use +@param+, not +@option+. + # + # source://yard//lib/yard/tags/library.rb#168 + def option_tag(text); end + + # Describe that your method can be used in various + # contexts with various parameters or return types. The first + # line should declare the new method signature, and the following + # indented tag data will be a new documentation string with its + # own tags adding metadata for such an overload. + # + # @example + # # @overload set(key, value) + # # Sets a value on key + # # @param key [Symbol] describe key param + # # @param value [Object] describe value param + # # @overload set(value) + # # Sets a value on the default key +:foo+ + # # @param value [Object] describe value param + # def set(*args) end + # + # source://yard//lib/yard/tags/library.rb#161 + def overload_tag(text); end + + # Documents a single method parameter (either regular or keyword) with a given name, type + # and optional description. + # + # @example + # # @param url [String] the URL of the page to download + # # @param directory [String] the name of the directory to save to + # def load_page(url, directory: 'pages') end + # + # source://yard//lib/yard/tags/library.rb#168 + def param_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def parse_directive(tag, parser); end + + # Declares that the _logical_ visibility of an object is private. + # In other words, it specifies that this method should be marked + # private but cannot due to Ruby's visibility restrictions. This + # exists for classes, modules and constants that do not obey Ruby's + # visibility rules. For instance, an inner class might be considered + # "private", though Ruby would make no such distinction. + # + # This tag is meant to be used in conjunction with the +--no-private+ + # command-line option, and is required to actually remove these objects + # from documentation output. See {file:README.md} for more information on + # switches. + # + # If you simply want to set the API visibility of a method, you should + # look at the {tag:api} tag instead. + # + # @example + # # @private + # class InteralImplementation; end + # @note This method is not recommended for hiding undocumented or + # "unimportant" methods. This tag should only be used to mark objects + # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you + # can use +private_constant+ to declare constants (like classes or + # modules) as private, and should be used instead of +@private+. + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @see tag:api + # + # source://yard//lib/yard/tags/library.rb#168 + def private_tag(text); end + + # Describes that a method may raise a given exception, with + # an optional description of what it may mean. + # + # @example + # # @raise [AccountBalanceError] if the account does not have + # # sufficient funds to perform the transaction + # def withdraw(amount) end + # + # source://yard//lib/yard/tags/library.rb#168 + def raise_tag(text); end + + # Describes the return value (and type or types) of a method. + # You can list multiple return tags for a method in the case + # where a method has distinct return cases. In this case, each + # case should begin with "if ...". + # + # @example A regular return value + # # @return [Fixnum] the size of the file + # def size; @file.size end + # @example A method returns an Array or a single object + # # @return [String] if a single object was returned + # # from the database. + # # @return [Array] if multiple objects were + # # returned. + # def find(query) end + # + # source://yard//lib/yard/tags/library.rb#168 + def return_tag(text); end + + # Sets the scope of a DSL method. Only applicable to DSL method + # calls. Acceptable values are 'class' or 'instance' + # + # source://yard//lib/yard/tags/library.rb#202 + def scope_directive(tag, parser); end + + # "See Also" references for an object. Accepts URLs or + # other code objects with an optional description at the end. + # Note that the URL or object will be automatically linked by + # YARD and does not need to be formatted with markup. + # + # @example + # # Synchronizes system time using NTP. + # # @see http://ntp.org/documentation.html NTP Documentation + # # @see NTPHelperMethods + # class NTPUpdater; end + # + # source://yard//lib/yard/tags/library.rb#168 + def see_tag(text); end + + # Lists the version that the object was first added. + # + # @example + # # @since 1.2.4 + # def clear_routes; end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # + # source://yard//lib/yard/tags/library.rb#168 + def since_tag(text); end + + # Creates a new {Tag} object with a given tag name and data + # + # @return [Tag] the newly created tag object + # + # source://yard//lib/yard/tags/library.rb#273 + def tag_create(tag_name, tag_buf); end + + # Marks a TODO note in the object being documented. + # For reference, objects with TODO items can be enumerated + # from the command line with a simple command: + # + # !!!sh + # mocker$ yard list --query '@todo' + # lib/mocker/mocker.rb:15: Mocker + # lib/mocker/report/html.rb:5: Mocker::Report::Html + # + # YARD can also be used to enumerate the TODO items from + # a short script: + # + # !!!ruby + # require 'yard' + # YARD::Registry.load!.all.each do |o| + # puts o.tag(:todo).text if o.tag(:todo) + # end + # + # @example + # # @todo Add support for Jabberwocky service. + # # There is an open source Jabberwocky library available + # # at http://jbrwcky.org that can be easily integrated. + # class Wonderlander; end + # @see tag:note + # + # source://yard//lib/yard/tags/library.rb#168 + def todo_tag(text); end + + # Lists the version of a class, module or method. This is + # similar to a library version, but at finer granularity. + # In some cases, version of specific modules, classes, methods + # or generalized components might change independently between + # releases. A version tag is used to infer the API compatibility + # of a specific object. + # + # @example + # # The public REST API for http://jbrwcky.org + # # @version 2.0 + # class JabberwockyAPI; end + # + # source://yard//lib/yard/tags/library.rb#168 + def version_tag(text); end + + # Sets the visibility of a DSL method. Only applicable to + # DSL method calls. Acceptable values are public, protected, or private. + # + # source://yard//lib/yard/tags/library.rb#202 + def visibility_directive(tag, parser); end + + # Describes what a method might yield to a given block. + # The types specifier list should not list types, but names + # of the parameters yielded to the block. If you define + # parameters with +@yieldparam+, you do not need to define + # the parameters in the type specification of +@yield+ as + # well. + # + # @example + # # For a block {|a,b,c| ... } + # # @yield [a, b, c] Gives 3 random numbers to the block + # def provide3values(&block) yield(42, 42, 42) end + # @see tag:yieldparam + # @see tag:yieldreturn + # + # source://yard//lib/yard/tags/library.rb#168 + def yield_tag(text); end + + # Defines a parameter yielded by a block. If you define the + # parameters with +@yieldparam+, you do not need to define + # them via +@yield+ as well. + # + # @example + # # @yieldparam [String] name the name that is yielded + # def with_name(name) yield(name) end + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldparam_tag(text); end + + # Documents the value and type that the block is expected + # to return to the method. + # + # @example + # # @yieldreturn [Fixnum] the number to add 5 to. + # def add5_block(&block) 5 + yield end + # @see tag:return + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldreturn_tag(text); end + + private + + # @return [Directive] + # + # source://yard//lib/yard/tags/library.rb#244 + def directive_call(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#233 + def send_to_factory(tag_name, meth, text); end + + class << self + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#83 + def default_factory; end + + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#87 + def default_factory=(factory); end + + # @overload define_directive + # + # source://yard//lib/yard/tags/library.rb#196 + def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end + + # Convenience method to define a new tag using one of {Tag}'s factory methods, or the + # regular {DefaultFactory#parse_tag} factory method if none is supplied. + # + # @param label [#to_s] the label used when displaying the tag in templates + # @param tag [#to_s] the tag name to create + # @param meth [#to_s, Class] the {Tag} factory method to call when + # creating the tag or the name of the class to directly create a tag for + # + # source://yard//lib/yard/tags/library.rb#157 + def define_tag(label, tag, meth = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/library.rb#220 + def directive_method_name(tag_name); end + + # Returns the factory method used to parse the tag text for a specific tag + # + # @param tag [Symbol] the tag name + # @return [Symbol] the factory method name for the tag + # @return [Class, Symbol] the Tag class to use to parse the tag + # or the method to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#99 + def factory_method_for(tag); end + + # Returns the factory method used to parse the tag text for a specific + # directive + # + # @param directive [Symbol] the directive name + # @return [Symbol] the factory method name for the tag + # @return [Class, Symbol] the Tag class to use to parse the tag or + # the methods to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.8.0 + # + # source://yard//lib/yard/tags/library.rb#112 + def factory_method_for_directive(directive); end + + # @return [Library] the main Library instance object. + # + # source://yard//lib/yard/tags/library.rb#67 + def instance; end + + # @return [SymbolHash{Symbol=>String}] the map of tag names and their + # respective display labels. + # + # source://yard//lib/yard/tags/library.rb#63 + def labels; end + + # Sorts the labels lexically by their label name, often used when displaying + # the tags. + # + # @return [Array, String] the sorted labels as an array of the tag name and label + # + # source://yard//lib/yard/tags/library.rb#142 + def sorted_labels; end + + # source://yard//lib/yard/tags/library.rb#216 + def tag_method_name(tag_name); end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags; end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags=(_arg0); end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags; end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags=(_arg0); end + + private + + # source://yard//lib/yard/tags/library.rb#226 + def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end + end +end + +# Defines a block of text to be expanded whenever the macro is called by name +# in subsequent docstrings. The macro data can be any arbitrary text data, be +# it regular documentation, meta-data tags or directives. +# +# == Defining a Macro +# +# A macro must first be defined in order to be used. Note that a macro is also +# expanded upon definition if it defined on an object (the docstring of a +# method, class, module or constant object as opposed to a free standing +# comment). To define a macro, use the "new" or "attach" identifier in the +# types specifier list. A macro will also automatically be created if an +# indented macro data block is given, so the keywords are not strictly needed. +# +# === Anonymous Macros +# +# In addition to standard named macros, macros can be defined anonymously if +# no name is given. In this case, they can not be re-used in future docstrings, +# but they will expand in the first definition. This is useful when needing +# to take advantage of the macro expansion variables (described below). +# +# == Using a Macro +# +# To re-use a macro in another docstring after it is defined, simply use +# @!macro the_name with no indented block of macro data. The resulting +# data will be expanded in place. +# +# == Attaching a Macro to a DSL Method +# +# Macros can be defined to auto-expand on DSL-style class method calls. To +# define a macro to be auto expanded in this way, use the "attach" keyword +# in the type specifier list ("new" is implied). +# +# Attached macros can also be attached directly on the class method declaration +# that provides the DSL method to its subclasses. The syntax in either case +# is the same. +# +# == Macro Expansion Variables +# +# In the case of using macros on DSL-style method calls, a number of expansion +# variables can be used for interpolation inside of the macro data. The variables, +# similar in syntax to Ruby's global variables, are as follows: +# +# * $0 - the method name being called +# * $1, $2, $3, ... - the Nth argument in the method call +# * $& - the full source line +# +# The following example shows what the expansion variables might hold for a given +# DSL method call: +# +# property :foo, :a, :b, :c, String +# # $0 => "property" +# # $1 => "foo" +# # $2 => "a" +# # $& => "property :foo, :a, :b, :c, String" +# +# === Ranges +# +# Ranges are also acceptable with the syntax ${N-M}. Negative values +# on either N or M are valid, and refer to indexes from the end of the list. +# Consider a DSL method that creates a method using the first argument with +# argument names following, ending with the return type of the method. This +# could be documented as: +# +# # @!macro dsl_method +# # @!method $1(${2--2}) +# # @return [${-1}] the return value of $0 +# create_method_with_args :foo, :a, :b, :c, String +# +# As described, the method is using the signature foo(a, b, c) and the return +# type from the last argument, +String+. When using ranges, tokens are joined +# with commas. Note that this includes using $0: +# +# !!!plain +# $0-1 # => Interpolates to "create_method_with_args, foo" +# +# If you want to separate them with spaces, use $1 $2 $3 $4 .... Note that +# if the token cannot be expanded, it will return the empty string (not an error), +# so it would be safe to list $1 $2 ... $10, for example. +# +# === Escaping Interpolation +# +# Interpolation can be escaped by prefixing the +$+ with +\\\+, like so: +# +# # @!macro foo +# # I have \$2.00 USD. +# +# @example Defining a simple macro +# # @!macro [new] returnself +# # @return [self] returns itself +# @example Using a simple macro in multiple docstrings +# # Documentation for map +# # ... +# # @macro returnself +# def map; end +# +# # Documentation for filter +# # ... +# # @macro returnself +# def filter; end +# @example Attaching a macro to a class method (for DSL usage) +# class Resource +# # Defines a new property +# # @param [String] name the property name +# # @param [Class] type the property's type +# # @!macro [attach] property +# # @return [$2] the $1 property +# def self.property(name, type) end +# end +# +# class Post < Resource +# property :title, String +# property :view_count, Integer +# end +# @example Attaching a macro directly to a DSL method +# class Post < Resource +# # @!macro [attach] property +# # @return [$2] the $1 property +# property :title, String +# +# # Macro will expand on this definition too +# property :view_count, Integer +# end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#258 +class YARD::Tags::MacroDirective < ::YARD::Tags::Directive + # @raise [TagFormatError] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#259 + def call; end + + private + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#288 + def anonymous?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#277 + def attach?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#283 + def class_method?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#292 + def expand(macro_data); end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#308 + def find_or_create; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#272 + def new?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#332 + def warn; end +end + +# Defines a method object with a given method signature, using indented +# block data as the method's docstring. The signature is similar to the +# {tag:overload} tag. The comment containing this directive does not need +# to be attached to any source, but if it is, that source code will be +# used as the method's source. +# +# To define an attribute method, see {tag:!attribute} +# +# @example Defining a simple method +# # @!method quit(username, message = "Quit") +# # Sends a quit message to the server for a +username+. +# # @param [String] username the username to quit +# # @param [String] message the quit message +# quit_message_method +# @example Attaching multiple methods to the same source +# # @!method method1 +# # @!method method2 +# create_methods :method1, :method2 +# @note This directive should only be used if there is no explicit +# declaration for the method in any source files (i.e., the method +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the method definition itself. +# @note For backwards compatibility support, you do not need to indent +# the method's docstring text. If a +@!method+ directive is seen with +# no indented block, the entire docstring is used as the new method's +# docstring text. +# @see tag:!attribute +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#368 +class YARD::Tags::MethodDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#373 + def after_parse; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#371 + def call; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#413 + def create_object; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#381 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#390 + def method_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#394 + def sanitized_tag_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#403 + def use_indented_text; end +end + +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#369 +YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/tags/option_tag.rb#4 +class YARD::Tags::OptionTag < ::YARD::Tags::Tag + # @return [OptionTag] a new instance of OptionTag + # + # source://yard//lib/yard/tags/option_tag.rb#7 + def initialize(tag_name, name, pair); end + + # Returns the value of attribute pair. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair; end + + # Sets the attribute pair + # + # @param value the value to set the attribute pair to. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair=(_arg0); end +end + +# source://yard//lib/yard/tags/overload_tag.rb#4 +class YARD::Tags::OverloadTag < ::YARD::Tags::Tag + # @return [OverloadTag] a new instance of OverloadTag + # + # source://yard//lib/yard/tags/overload_tag.rb#7 + def initialize(tag_name, text); end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def docstring; end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#15 + def has_tag?(name); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def is_a?(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def kind_of?(other); end + + # source://yard//lib/yard/tags/overload_tag.rb#28 + def method_missing(*args, &block); end + + # source://yard//lib/yard/tags/overload_tag.rb#23 + def name(prefix = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#17 + def object=(value); end + + # Returns the value of attribute parameters. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def parameters; end + + # Returns the value of attribute signature. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#13 + def tag(name); end + + # source://yard//lib/yard/tags/overload_tag.rb#14 + def tags(name = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#32 + def type; end + + private + + # source://yard//lib/yard/tags/overload_tag.rb#53 + def parse_signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#43 + def parse_tag(text); end +end + +# Parses a block of code as if it were present in the source file at that +# location. This directive is useful if a class has dynamic meta-programmed +# behaviour that cannot be recognized by YARD. +# +# You can specify the language of the code block using the types +# specification list. By default, the code language is "ruby". +# +# @example Documenting dynamic module inclusion +# class User +# # includes "UserMixin" and extends "UserMixin::ClassMethods" +# # using the UserMixin.included callback. +# # @!parse include UserMixin +# # @!parse extend UserMixin::ClassMethods +# end +# @example Declaring a method as an attribute +# # This should really be an attribute +# # @!parse attr_reader :foo +# def object; @parent.object end +# @example Parsing C code +# # @!parse [c] +# # void Init_Foo() { +# # rb_define_method(rb_cFoo, "method", method, 0); +# # } +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#545 +class YARD::Tags::ParseDirective < ::YARD::Tags::Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#546 + def call; end +end + +# source://yard//lib/yard/tags/ref_tag.rb#4 +module YARD::Tags::RefTag + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner=(_arg0); end +end + +# source://yard//lib/yard/tags/ref_tag_list.rb#4 +class YARD::Tags::RefTagList + # @return [RefTagList] a new instance of RefTagList + # + # source://yard//lib/yard/tags/ref_tag_list.rb#7 + def initialize(tag_name, owner, name = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name=(_arg0); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner=(_arg0); end + + # Returns the value of attribute tag_name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name; end + + # Sets the attribute tag_name + # + # @param value the value to set the attribute tag_name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name=(_arg0); end + + # source://yard//lib/yard/tags/ref_tag_list.rb#13 + def tags; end +end + +# Modifies the current parsing scope (class or instance). If this +# directive is defined on a docstring attached to an object definition, +# it is applied only to that object. Otherwise, it applies the scope +# to all future objects in the namespace. +# +# @example Modifying the scope of a DSL method +# # @!scope class +# cattr_accessor :subclasses +# @example Modifying the scope of a set of methods +# # @!scope class +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#579 +class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#580 + def call; end +end + +# Represents a metadata tag value (+@tag+). Tags can have any combination of +# {#types}, {#name} and {#text}, or none of the above. +# +# @example Programmatic tag creation +# # The following docstring syntax: +# # @param [String, nil] arg an argument +# # +# # is equivalent to: +# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg') +# +# source://yard//lib/yard/tags/tag.rb#13 +class YARD::Tags::Tag + # Creates a new tag object with a tag name and text. Optionally, formally declared types + # and a key name can be specified. + # + # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc. + # + # Key names are for tags that declare meta data for a specific key or name, such as +param+, + # +raise+, etc. + # + # @param tag_name [#to_s] the tag name to create the tag for + # @param text [String] the descriptive text for this tag + # @param types [Array] optional type list of formally declared types + # for the tag + # @param name [String] optional key name which the tag refers to + # @return [Tag] a new instance of Tag + # + # source://yard//lib/yard/tags/tag.rb#44 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/tag.rb#65 + def explain_types; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name=(_arg0); end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object; end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object=(_arg0); end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name; end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name=(_arg0); end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text; end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text=(_arg0); end + + # Convenience method to access the first type specified. This should mainly + # be used for tags that only specify one type. + # + # @return [String] the first of the list of specified types + # @see #types + # + # source://yard//lib/yard/tags/tag.rb#56 + def type; end + + # @return [Array] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types; end + + # @return [Array] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types=(_arg0); end +end + +# source://yard//lib/yard/tags/tag_format_error.rb#4 +class YARD::Tags::TagFormatError < ::RuntimeError; end + +# source://yard//lib/yard/tags/types_explainer.rb#6 +class YARD::Tags::TypesExplainer + class << self + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array] a list of types to parse and summarize + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#9 + def explain(*types); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array] a list of types to parse and summarize + # @raise [SyntaxError] if the types are not parsable + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#17 + def explain!(*types); end + + private + + def new(*_arg0); end + end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#58 +class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [CollectionType] a new instance of CollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#61 + def initialize(name, types); end + + # source://yard//lib/yard/tags/types_explainer.rb#66 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types; end + + # Sets the attribute types + # + # @param value the value to set the attribute types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#72 +class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType + # source://yard//lib/yard/tags/types_explainer.rb#73 + def to_s(_singular = T.unsafe(nil)); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#79 +class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [HashCollectionType] a new instance of HashCollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#82 + def initialize(name, key_types, value_types); end + + # Returns the value of attribute key_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types; end + + # Sets the attribute key_types + # + # @param value the value to set the attribute key_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#88 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute value_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types; end + + # Sets the attribute value_types + # + # @param value the value to set the attribute value_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#96 +class YARD::Tags::TypesExplainer::Parser + include ::YARD::CodeObjects + + # @return [Parser] a new instance of Parser + # + # source://yard//lib/yard/tags/types_explainer.rb#117 + def initialize(string); end + + # source://yard//lib/yard/tags/types_explainer.rb#121 + def parse; end + + class << self + # source://yard//lib/yard/tags/types_explainer.rb#113 + def parse(string); end + end +end + +# source://yard//lib/yard/tags/types_explainer.rb#99 +YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#26 +class YARD::Tags::TypesExplainer::Type + # @return [Type] a new instance of Type + # + # source://yard//lib/yard/tags/types_explainer.rb#29 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#33 + def to_s(singular = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/tags/types_explainer.rb#45 + def list_join(list); end +end + +# Modifies the current parsing visibility (public, protected, or private). +# If this directive is defined on a docstring attached to an object +# definition, it is applied only to that object. Otherwise, it applies +# the visibility to all future objects in the namespace. +# +# @example Modifying the visibility of a DSL method +# # @!visibility private +# cattr_accessor :subclasses +# @example Modifying the visibility of a set of methods +# # Note that Ruby's "protected" is recommended over this directive +# # @!visibility protected +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#611 +class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#612 + def call; end +end + +# Namespace for templating system +# +# source://yard//lib/yard/autoload.rb#271 +module YARD::Templates; end + +# This module manages all creation, handling and rendering of {Template} +# objects. +# +# * To create a template object at a path, use {template}. +# * To render a template, call {render}. +# * To register a template path in the lookup paths, call {register_template_path}. +# +# source://yard//lib/yard/templates/engine.rb#12 +module YARD::Templates::Engine + class << self + # Passes a set of objects to the +:fulldoc+ template for full documentation generation. + # This is called by {CLI::Yardoc} to most commonly perform HTML + # documentation generation. + # + # @param objects [Array] a list of {CodeObjects::Base} + # objects to pass to the template + # @param options [Hash] (see {render}) + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#101 + def generate(objects, options = T.unsafe(nil)); end + + # Registers a new template path in {template_paths} + # + # @param path [String] a new template path + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#21 + def register_template_path(path); end + + # Renders a template on a {CodeObjects::Base code object} using + # a set of default (overridable) options. Either the +:object+ + # or +:type+ keys must be provided. + # + # If a +:serializer+ key is provided and +:serialize+ is not set to + # false, the rendered contents will be serialized through the {Serializers::Base} + # object. See {with_serializer}. + # + # @example Renders an object with html formatting + # Engine.render(:format => :html, :object => obj) + # @example Renders without an object + # Engine.render(:type => :fulldoc, :otheropts => somevalue) + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [String] the rendered template + # + # source://yard//lib/yard/templates/engine.rb#82 + def render(options = T.unsafe(nil)); end + + # Creates a template module representing the path. Searches on disk + # for the first directory named +path+ (joined by '/') within the + # template paths and builds a template module for. All other matching + # directories in other template paths will be included in the + # generated module as mixins (for overriding). + # + # @param path [Array] a list of path components + # @raise [ArgumentError] if the path does not exist within one of the + # {template_paths} on disk. + # @return [Template] the module representing the template + # + # source://yard//lib/yard/templates/engine.rb#35 + def template(*path); end + + # Forces creation of a template at +path+ within a +full_path+. + # + # @param path [String] the path name of the template + # @param full_paths [Array] the full path on disk of the template + # @return [Template] the template module representing the +path+ + # + # source://yard//lib/yard/templates/engine.rb#53 + def template!(path, full_paths = T.unsafe(nil)); end + + # @return [Array] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths; end + + # @return [Array] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths=(_arg0); end + + # Serializes the results of a block with a +serializer+ object. + # + # @param object [CodeObjects::Base] the code object to serialize + # @param serializer [Serializers::Base] the serializer object + # @see Serializers::Base + # @yield a block whose result will be serialize + # @yieldreturn [String] the contents to serialize + # + # source://yard//lib/yard/templates/engine.rb#115 + def with_serializer(object, serializer); end + + private + + # Searches through the registered {template_paths} and returns + # all full directories that have the +path+ within them on disk. + # + # @param from_template [Template] if provided, allows a relative + # path to be specified from this template's full path. + # @param path [String] the path component to search for in the + # {template_paths} + # @return [Array] a list of full paths that are existing + # candidates for a template module + # + # source://yard//lib/yard/templates/engine.rb#161 + def find_template_paths(from_template, path); end + + # Sets default options on the options hash + # + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#141 + def set_default_options(options = T.unsafe(nil)); end + + # The name of the module that represents a +path+ + # + # @param path [String] the path to generate a module name for + # @return [String] the module name + # + # source://yard//lib/yard/templates/engine.rb#176 + def template_module_name(path); end + end +end + +# @since 0.5.4 +# +# source://yard//lib/yard/templates/erb_cache.rb#5 +module YARD::Templates::ErbCache + class << self + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#17 + def clear!; end + + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#6 + def method_for(filename); end + end +end + +# Namespace for template helpers +# +# source://yard//lib/yard/autoload.rb#272 +module YARD::Templates::Helpers; end + +# The base helper module included in all templates. +# +# source://yard//lib/yard/templates/helpers/base_helper.rb#4 +module YARD::Templates::Helpers::BaseHelper + # @example + # s = format_object_title ModuleObject.new(:root, :MyModuleName) + # s # => "Module: MyModuleName" + # @param object [CodeObjects::Base] the object to retrieve a title for + # @return [String] the page title name for a given object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#196 + def format_object_title(object); end + + # @example Formatted type of an exception class + # o = ClassObject.new(:root, :MyError) + # o.superclass = P('RuntimeError') + # format_object_type(o) # => "Exception" + # @example Formatted type of a method + # o = MethodObject.new(:root, :to_s) + # format_object_type(o) # => "Method" + # @param object [CodeObjects::Base] the object to retrieve the type for + # @return [String] the human-readable formatted {CodeObjects::Base#type #type} + # for the object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#182 + def format_object_type(object); end + + # Indents and formats source code + # + # @param value [String] the input source code + # @return [String] formatted source code + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#209 + def format_source(value); end + + # Formats a list of return types for output and links each type. + # + # @example Formatting types + # format_types(['String', 'Array']) #=> "(String, Array)" + # @example Formatting types without surrounding brackets + # format_types(['String', 'Array'], false) #=> "String, Array" + # @param list [Array] a list of types + # @param brackets [Boolean] whether to surround the types in brackets + # @return [String] the formatted list of Ruby types + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#168 + def format_types(list, brackets = T.unsafe(nil)); end + + # An object that keeps track of global state throughout the entire template + # rendering process (including any sub-templates). + # + # @return [OpenStruct] a struct object that stores state + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#20 + def globals; end + + # Escapes text. This is used a lot by the HtmlHelper and there should + # be some helper to "clean up" text for whatever, this is it. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#38 + def h(text); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#152 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#113 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#105 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#122 + def link_object(obj, title = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#141 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # Links objects or URLs. This method will delegate to the correct +link_+ + # method depending on the arguments passed in. + # + # @example Linking a URL + # linkify('http://example.com') + # @example Including docstring contents of an object + # linkify('include:YARD::Docstring') + # @example Linking to an extra file + # linkify('file:README') + # @example Linking an object by path + # linkify('YARD::Docstring') + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#55 + def linkify(*args); end + + # Returns the value of attribute object. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object=(_arg0); end + + # @return [CodeObjects::Base] the object representing the current generated + # page. Might not be the current {#object} when inside sub-templates. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#11 + def owner; end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array] a list of code objects + # @return [Array] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#30 + def run_verifier(list); end + + # Returns the value of attribute serializer. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer; end + + # Sets the attribute serializer + # + # @param value the value to set the attribute serializer to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer=(_arg0); end +end + +# Helpers for various object types +# +# source://yard//lib/yard/templates/helpers/filter_helper.rb#5 +module YARD::Templates::Helpers::FilterHelper + # @return [Boolean] whether an object is a class + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#17 + def is_class?(object); end + + # @return [Boolean] whether an object is a method + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#7 + def is_method?(object); end + + # @return [Boolean] whether an object is a module + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#22 + def is_module?(object); end + + # @return [Boolean] whether an object is a namespace + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#12 + def is_namespace?(object); end +end + +# The helper module for HTML templates. +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#7 +module YARD::Templates::Helpers::HtmlHelper + include ::YARD::Templates::Helpers::MarkupHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + + # @param object [CodeObjects::Base] the object to get an anchor for + # @return [String] the anchor for a specific object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#347 + def anchor_for(object); end + + # Returns the current character set. The default value can be overridden + # by setting the +LANG+ environment variable or by overriding this + # method. In Ruby 1.9 you can also modify this value by setting + # +Encoding.default_external+. + # + # @return [String] the current character set + # @since 0.5.4 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#574 + def charset; end + + # Formats a list of objects and links them + # + # @return [String] a formatted list of objects + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#458 + def format_object_name_list(objects); end + + # Formats a list of types from a tag. + # + # @param typelist [Array, FalseClass] the list of types to be formatted. + # @param brackets [Boolean] omits the surrounding + # brackets if +brackets+ is set to +false+. + # @return [String] the list of types formatted + # as [Type1, Type2, ...] with the types linked + # to their respective descriptions. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#476 + def format_types(typelist, brackets = T.unsafe(nil)); end + + # Escapes HTML entities + # + # @param text [String] the text to escape + # @return [String] the HTML with escaped entities + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#23 + def h(text); end + + # Converts Asciidoc to HTML + # + # @param text [String] input Asciidoc text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#109 + def html_markup_asciidoc(text); end + + # Converts HTML to HTML + # + # @param text [String] input html + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#168 + def html_markup_html(text); end + + # Converts Markdown to HTML + # + # @param text [String] input Markdown text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#78 + def html_markup_markdown(text); end + + # @return [String] the same text with no markup + # @since 0.6.6 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#160 + def html_markup_none(text); end + + # Converts org-mode to HTML + # + # @param text [String] input org-mode text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#102 + def html_markup_org(text); end + + # Converts plaintext to pre-formatted HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#146 + def html_markup_pre(text); end + + # Converts RDoc formatting (SimpleMarkup) to HTML + # + # @param text [String] the input RDoc formatted text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#136 + def html_markup_rdoc(text); end + + # Highlights Ruby source. Similar to {#html_syntax_highlight}, but + # this method is meant to be called from {#htmlify} when markup is + # set to "ruby". + # + # @param source [String] the Ruby source + # @return [String] the highlighted HTML + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#179 + def html_markup_ruby(source); end + + # Converts plaintext to regular HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#154 + def html_markup_text(text); end + + # Converts Textile to HTML + # + # @param text [String] the input Textile text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#118 + def html_markup_textile(text); end + + # Converts plaintext to strict Textile (hard breaks) + # + # @param text [String] the input textile data + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#128 + def html_markup_textile_strict(text); end + + # Syntax highlights +source+ in language +type+. + # + # @note To support a specific language +type+, implement the method + # +html_syntax_highlight_TYPE+ in this class. + # @param source [String] the source code to highlight + # @param type [Symbol, String] the language type (:ruby, :plain, etc). Use + # :plain for no syntax highlighting. + # @return [String] the highlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#199 + def html_syntax_highlight(source, type = T.unsafe(nil)); end + + # @return [String] unhighlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#210 + def html_syntax_highlight_plain(source); end + + # Turns text into HTML using +markup+ style formatting. + # + # @param text [String] the text to format + # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+. + # To add a custom markup type, see {MarkupHelper} + # @return [String] the HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#57 + def htmlify(text, markup = T.unsafe(nil)); end + + # @return [String] HTMLified text as a single line (paragraphs removed) + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#184 + def htmlify_line(*args); end + + # Inserts an include link while respecting inlining + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#296 + def insert_include(text, markup = T.unsafe(nil)); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#270 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#282 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#291 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#301 + def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#332 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://yard//lib/yard/templates/helpers/html_helper.rb#400 + def mtime(_file); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Resolves any text in the form of +{Name}+ to the object specified by + # Name. Also supports link titles in the form +{Name title}+. + # + # @example Linking to an instance method + # resolve_links("{MyClass#method}") # => "MyClass#method" + # @example Linking to a class with a title + # resolve_links("{A::B::C the C class}") # => "the c class" + # @param text [String] the text to resolve links in + # @return [String] HTML with linkified references + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#225 + def resolve_links(text); end + + # Formats the signature of method +meth+. + # + # @param meth [CodeObjects::MethodObject] the method object to list + # the signature of + # @param link [Boolean] whether to link the method signature to the details view + # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info) + # @param full_attr_name [Boolean] whether to show the full attribute name + # ("name=" instead of "name") + # @return [String] the formatted method signature + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#529 + def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end + + # Get the return types for a method signature. + # + # @param meth [CodeObjects::MethodObject] the method object + # @param link [Boolean] whether to link the types + # @return [String] the signature types + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#492 + def signature_types(meth, link = T.unsafe(nil)); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Returns the URL for a specific file + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#407 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the URL for the frameset page + # + # @return [String] the URL pointing to the frames page + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#434 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#450 + def url_for_index; end + + # Returns the URL for a list type + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#426 + def url_for_list(type); end + + # Returns the URL for the main page (README or alphabetic index) + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#442 + def url_for_main; end + + private + + # Converts a {CodeObjects::MethodObject} into an overload object + # + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#609 + def convert_method_to_overload(meth); end + + # Parses code block's HTML attributes in order to detect the programming + # language of what's enclosed in that code block. + # + # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element + # @param code_html_attrs [String, nil] HTML attribute list of +code+ + # element + # @return [String, nil] detected programming language + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#664 + def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end + + # Parses code blocks out of html and performs syntax highlighting + # on code inside of the blocks. + # + # @param html [String] the html to search for code in + # @return [String] highlighted html + # @see #html_syntax_highlight + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#640 + def parse_codeblocks(html); end + + # Parses !!!lang out of codeblock, returning the codeblock language + # followed by the source code. + # + # @param source [String] the source code whose language to determine + # @return [Array(String, String)] the language, if any, and the + # remaining source + # @since 0.7.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#624 + def parse_lang_for_codeblock(source); end + + # Converts a set of hash options into HTML attributes for a tag + # + # @param opts [Hash{String => String}] the tag options + # @return [String] the tag attributes of an HTML tag + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#603 + def tag_attrs(opts = T.unsafe(nil)); end + + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + + class << self + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + end +end + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#15 +YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#12 +YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) + +# Helper methods for syntax highlighting. +# +# source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#6 +module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + include ::YARD::Templates::Helpers::ModuleHelper + + # Highlights Ruby source + # + # @param source [String] the Ruby source code + # @return [String] the highlighted Ruby source + # + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#12 + def html_syntax_highlight_ruby(source); end + + private + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#63 + def clean_token_object(token_obj); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#45 + def html_syntax_highlight_ruby_legacy(source); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#22 + def html_syntax_highlight_ruby_ripper(source); end +end + +# Namespace for markup providers +# +# source://yard//lib/yard/autoload.rb#273 +module YARD::Templates::Helpers::Markup; end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkdown] a new instance of RDocMarkdown + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14 + def initialize(text); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18 + def fix_typewriter(html); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +class YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkup] a new instance of RDocMarkup + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 + def initialize(text); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path=(_arg0); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 + def to_html; end + + private + + # Don't allow -- to turn into — element. The chances of this being + # some --option is far more likely than the typographical meaning. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 + def fix_dash_dash(text); end + + # Fixes RDoc behaviour with ++ only supporting alphanumeric text. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 + def fix_typewriter(text); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 + def initialize; end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 + def accept_paragraph(*args); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path=(_arg0); end + + # Disable auto-link of URLs + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 + def handle_special_HYPERLINK(special); end +end + +# Helper methods for loading and managing markup types. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#7 +module YARD::Templates::Helpers::MarkupHelper + # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}. + # If a provider is specified, immediately try to load it. + # + # On success this sets `@markup_provider` and `@markup_class` to + # the provider name and library constant class/module respectively for + # the loaded provider. + # + # On failure this method will inform the user that no provider could be + # found and exit the program. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#87 + def load_markup_provider(type = T.unsafe(nil)); end + + # Gets the markup provider class/module constant for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Class] the markup class + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#158 + def markup_class(type = T.unsafe(nil)); end + + # Strips any shebang lines on the file contents that pertain to + # markup or preprocessing data. + # + # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead + # @return [String] the file contents minus any preprocessing tags + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#149 + def markup_file_contents(contents); end + + # Checks for a shebang or looks at the file extension to determine + # the markup type for the file contents. File extensions are registered + # for a markup type in {MARKUP_EXTENSIONS}. + # + # A shebang should be on the first line of a file and be in the form: + # + # #!markup_type + # + # Standard markup types are text, html, rdoc, markdown, textile + # + # @param contents [String] Unused. Was necessary prior to 0.7.0. + # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents} + # @return [Symbol] the markup type recognized for the file + # @see MARKUP_EXTENSIONS + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#133 + def markup_for_file(contents, filename); end + + # Gets the markup provider name for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Symbol] the markup provider name (usually the gem name of the library) + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#168 + def markup_provider(type = T.unsafe(nil)); end + + class << self + # Clears the markup provider cache information. Mainly used for testing. + # + # @return [void] + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#11 + def clear_markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache=(_arg0); end + end +end + +# Returns a list of extensions for various markup types. To register +# extensions for a type, add them to the array of extensions for the +# type. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#61 +YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# Contains the Regexp object that matches the shebang line of extra +# files to detect the markup type. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#74 +YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp) + +# The default list of markup providers for each markup type +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#24 +YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash) + +# Helper methods for method objects. +# +# source://yard//lib/yard/templates/helpers/method_helper.rb#5 +module YARD::Templates::Helpers::MethodHelper + # @return [String] formatted arguments for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#7 + def format_args(object); end + + # @return [String] formatted block if one exists + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#35 + def format_block(object); end + + # @return [String] formats source of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#57 + def format_code(object, _show_lines = T.unsafe(nil)); end + + # @return [String] formats source code of a constant value + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#68 + def format_constant(value); end + + # @return [String] formats line numbers for source code of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#50 + def format_lines(object); end + + # @return [String] formatted and linked return types for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#28 + def format_return_types(object); end +end + +# Helper methods for managing module objects. +# +# source://yard//lib/yard/templates/helpers/module_helper.rb#6 +module YARD::Templates::Helpers::ModuleHelper + # Prunes the method listing by running the verifier and removing attributes/aliases + # + # @param list [Array] a list of methods + # @param hide_attributes [Boolean] whether to prune attribute methods from the list + # @return [Array] a pruned list of methods + # + # source://yard//lib/yard/templates/helpers/module_helper.rb#11 + def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end +end + +# Helper methods for text template formats. +# +# source://yard//lib/yard/templates/helpers/text_helper.rb#6 +module YARD::Templates::Helpers::TextHelper + # @return [String] aligns text to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#39 + def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end + + # @return [String] escapes text + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#8 + def h(text); end + + # @return [String] returns a horizontal rule for output + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#45 + def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end + + # @return [String] indents +text+ by +len+ characters. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#29 + def indent(text, len = T.unsafe(nil)); end + + # @return [String] the formatted signature for a method + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#50 + def signature(meth); end + + # @return [String] aligns a title to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#34 + def title_align_right(text, col = T.unsafe(nil)); end + + # @return [String] wraps text at +col+ columns. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#24 + def wrap(text, col = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/helpers/text_helper.rb#98 + def resolve_links(text); end +end + +# Helpers for UML template format +# +# source://yard//lib/yard/templates/helpers/uml_helper.rb#5 +module YARD::Templates::Helpers::UMLHelper + # Formats the path of an object for Graphviz syntax + # + # @param object [CodeObjects::Base] an object to format the path of + # @return [String] the encoded path + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#20 + def format_path(object); end + + # Encodes text in escaped Graphviz syntax + # + # @param text [String] text to encode + # @return [String] the encoded text + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#27 + def h(text); end + + # Tidies data by formatting and indenting text + # + # @param data [String] pre-formatted text + # @return [String] tidied text. + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#34 + def tidy(data); end + + # Official UML visibility prefix syntax for an object given its visibility + # + # @param object [CodeObjects::Base] the object to retrieve visibility for + # @return [String] the UML visibility prefix + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#9 + def uml_visibility(object); end +end + +# Abstracts the structure for a section and its subsections into an ordered +# list of sections and subsections. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/section.rb#7 +class YARD::Templates::Section < ::Array + # @return [Section] a new instance of Section + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#10 + def initialize(name, *args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def <<(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#34 + def ==(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#21 + def [](*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#74 + def any(item); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#15 + def dup; end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#30 + def eql?(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#54 + def inspect; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#60 + def place(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def push(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#64 + def to_a; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#50 + def unshift(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#84 + def parse_sections(args); end +end + +# source://yard//lib/yard/templates/template.rb#6 +module YARD::Templates::Template + include ::YARD::Templates::ErbCache + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::MethodHelper + + mixes_in_class_methods ::YARD::Templates::Template::ClassMethods + + # source://yard//lib/yard/templates/template.rb#186 + def initialize(opts = T.unsafe(nil)); end + + # Loads a template specified by path. If +:template+ or +:format+ is + # specified in the {#options} hash, they are prepended and appended + # to the path respectively. + # + # @param path [Array] the path of the template + # @return [Template] the loaded template module + # + # source://yard//lib/yard/templates/template.rb#204 + def T(*path); end + + # Returns the value of attribute class. + # + # source://yard//lib/yard/templates/template.rb#7 + def class; end + + # Sets the attribute class + # + # @param value the value to set the attribute class to. + # + # source://yard//lib/yard/templates/template.rb#7 + def class=(_arg0); end + + # @param section [String, Symbol] the section name + # @return [String] the contents of the ERB rendered section + # @yield calls subsections to be rendered + # + # source://yard//lib/yard/templates/template.rb#285 + def erb(section, &block); end + + # Returns the contents of a file. If +allow_inherited+ is set to +true+, + # use +{{{__super__}}}+ inside the file contents to insert the contents + # of the file from an inherited template. For instance, if +templates/b+ + # inherits from +templates/a+ and file "test.css" exists in both directories, + # both file contents can be retrieved by having +templates/b/test.css+ look + # like: + # + # {{{__super__}}} + # ... + # body { css styles here } + # p.class { other styles } + # + # @param basename [String] the name of the file + # @param allow_inherited [Boolean] whether inherited templates can + # be inserted with +{{{__super__}}}+ + # @raise [ArgumentError] + # @return [String] the contents of a file identified by +basename+. All + # template paths (including any mixed in templates) are searched for + # the file + # @see ClassMethods#find_file + # @see ClassMethods#find_nth_file + # + # source://yard//lib/yard/templates/template.rb#312 + def file(basename, allow_inherited = T.unsafe(nil)); end + + # Initialization called on the template. Override this in a 'setup.rb' + # file in the template's path to implement a template + # + # @example A default set of sections + # def init + # sections :section1, :section2, [:subsection1, :etc] + # end + # @see #sections + # + # source://yard//lib/yard/templates/template.rb#239 + def init; end + + # source://yard//lib/yard/templates/template.rb#342 + def inspect; end + + # Returns the value of attribute options. + # + # source://yard//lib/yard/templates/template.rb#8 + def options; end + + # source://yard//lib/yard/templates/template.rb#337 + def options=(value); end + + # Runs a template on +sects+ using extra options. This method should + # not be called directly. Instead, call the class method {ClassMethods#run} + # + # @param opts [Hash, nil] any extra options to apply to sections + # @param sects [Section, Array] a section list of sections to render + # @param start_at [Fixnum] the index in the section list to start from + # @param break_first [Boolean] if true, renders only the first section + # @return [String] the rendered sections joined together + # @yield [opts] calls for the subsections to be rendered + # @yieldparam opts [Hash] any extra options to yield + # + # source://yard//lib/yard/templates/template.rb#252 + def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end + + # Returns the value of attribute section. + # + # source://yard//lib/yard/templates/template.rb#7 + def section; end + + # Sets the attribute section + # + # @param value the value to set the attribute section to. + # + # source://yard//lib/yard/templates/template.rb#7 + def section=(_arg0); end + + # Sets the sections (and subsections) to be rendered for the template + # + # @example Sets a set of erb sections + # sections :a, :b, :c # searches for a.erb, b.erb, c.erb + # @example Sets a set of method and erb sections + # sections :a, :b, :c # a is a method, the rest are erb files + # @example Sections with subsections + # sections :header, [:name, :children] + # # the above will call header.erb and only renders the subsections + # # if they are yielded by the template (see #yieldall) + # @param args [Array] the sections + # to use to render the template. For symbols and strings, the + # section will be executed as a method (if one exists), or rendered + # from the file "name.erb" where name is the section name. For + # templates, they will have {Template::ClassMethods#run} called on them. + # Any subsections can be yielded to using yield or {#yieldall} + # + # source://yard//lib/yard/templates/template.rb#226 + def sections(*args); end + + # Calls the ERB file from the last inherited template with {#section}.erb + # + # @param sect [Symbol, String] if provided, uses a specific section name + # @return [String] the rendered ERB file in any of the inherited template + # paths. + # + # source://yard//lib/yard/templates/template.rb#330 + def superb(sect = T.unsafe(nil), &block); end + + # Yields all subsections with any extra options + # + # @param opts [Hash] extra options to be applied to subsections + # + # source://yard//lib/yard/templates/template.rb#278 + def yieldall(opts = T.unsafe(nil), &block); end + + protected + + # source://yard//lib/yard/templates/template.rb#348 + def erb_file_for(section); end + + # source://yard//lib/yard/templates/template.rb#352 + def erb_with(content, filename = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/template.rb#399 + def add_options(opts = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://yard//lib/yard/templates/template.rb#378 + def cache(section); end + + # source://yard//lib/yard/templates/template.rb#388 + def cache_filename(section); end + + # source://yard//lib/yard/templates/template.rb#364 + def render_section(section, &block); end + + # source://yard//lib/yard/templates/template.rb#393 + def set_ivars; end + + # source://yard//lib/yard/templates/template.rb#412 + def with_section; end + + class << self + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes; end + + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes=(_arg0); end + + # Includes the {extra_includes} modules into the template object. + # + # @param template [Template] the template object to mixin the extra includes. + # @param options [SymbolHash] the options hash containing all template information + # @return [void] + # + # source://yard//lib/yard/templates/template.rb#38 + def include_extra(template, options); end + + # @private + # @private + # + # source://yard//lib/yard/templates/template.rb#29 + def included(klass); end + end +end + +# source://yard//lib/yard/templates/template.rb#59 +module YARD::Templates::Template::ClassMethods + # source://yard//lib/yard/templates/template.rb#81 + def initialize(path, full_paths); end + + # Alias for creating a {Section} with arguments + # + # @see Section#initialize + # @since 0.6.0 + # + # source://yard//lib/yard/templates/template.rb#149 + def S(*args); end + + # Alias for creating {Engine.template}. + # + # source://yard//lib/yard/templates/template.rb#142 + def T(*path); end + + # Searches for a file identified by +basename+ in the template's + # path as well as any mixed in template paths. Equivalent to calling + # {ClassMethods#find_nth_file} with index of 1. + # + # @param basename [String] the filename to search for + # @return [String] the full path of a file on disk with filename + # +basename+ in one of the template's paths. + # @see find_nth_file + # + # source://yard//lib/yard/templates/template.rb#98 + def find_file(basename); end + + # Searches for the nth file (where n = +index+) identified + # by basename in the template's path and any mixed in template paths. + # + # @param basename [String] the filename to search for + # @param index [Fixnum] the nth existing file to return + # @return [String] the full path of the nth file on disk with + # filename +basename+ in one of the template paths + # + # source://yard//lib/yard/templates/template.rb#109 + def find_nth_file(basename, index = T.unsafe(nil)); end + + # Returns the value of attribute full_path. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path; end + + # Sets the attribute full_path + # + # @param value the value to set the attribute full_path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path=(_arg0); end + + # @note This method caches path results. Paths should not be modified + # after this method is called; call {#reset_full_paths} to reset cache. + # @return [Array] a list of full paths + # + # source://yard//lib/yard/templates/template.rb#65 + def full_paths; end + + # @return [Boolean] + # + # source://yard//lib/yard/templates/template.rb#122 + def is_a?(klass); end + + # Creates a new template object to be rendered with {Template#run} + # + # source://yard//lib/yard/templates/template.rb#128 + def new(*args); end + + # Returns the value of attribute path. + # + # source://yard//lib/yard/templates/template.rb#60 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def path=(_arg0); end + + # Resets cache for {#full_paths} + # + # source://yard//lib/yard/templates/template.rb#77 + def reset_full_paths; end + + # source://yard//lib/yard/templates/template.rb#135 + def run(*args); end + + private + + # source://yard//lib/yard/templates/template.rb#170 + def include_inherited(full_paths); end + + # source://yard//lib/yard/templates/template.rb#157 + def include_parent; end + + # source://yard//lib/yard/templates/template.rb#176 + def load_setup_rb; end +end + +# An Options class containing default options for base template rendering. For +# options specific to generation of HTML output, see {CLI::YardocOptions}. +# +# @see CLI::YardocOptions +# +# source://yard//lib/yard/templates/template_options.rb#10 +class YARD::Templates::TemplateOptions < ::YARD::Options + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def __globals; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return=(_arg0); end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins; end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins=(_arg0); end + + # @param mixin [CodeObjects::Base] accepts any code object, but returns + # nil unless the object is a module. + # @return [Boolean] whether a mixin matches the embed_mixins list + # @return [nil] if the mixin is not a module object + # + # source://yard//lib/yard/templates/template_options.rb#78 + def embed_mixins_match?(mixin); end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals; end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals=(_arg0); end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return; end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return=(_arg0); end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight; end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight=(_arg0); end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index; end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index=(_arg0); end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup; end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup=(_arg0); end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider; end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider=(_arg0); end + + # @deprecated use {#highlight} instead. + # @return [Boolean] whether highlighting should be ignored + # + # source://yard//lib/yard/templates/template_options.rb#57 + def no_highlight; end + + # source://yard//lib/yard/templates/template_options.rb#58 + def no_highlight=(value); end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object; end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object=(_arg0); end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner; end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner=(_arg0); end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title; end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title=(_arg0); end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer; end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer=(_arg0); end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template; end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type; end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type=(_arg0); end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier; end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier=(_arg0); end +end + +# source://yard//lib/yard/version.rb#5 +YARD::VERSION = T.let(T.unsafe(nil), String) + +# Similar to a Proc, but runs a set of Ruby expressions using a small +# DSL to make tag lookups easier. +# +# The syntax is as follows: +# * All syntax is Ruby compatible +# * +object+ (+o+ for short) exist to access the object being verified +# * +@TAGNAME+ is translated into +object.tag('TAGNAME')+ +# * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ +# * +object+ can be omitted as target for method calls (it is implied) +# +# @example Create a verifier to check for objects that don't have @private tags +# verifier = Verifier.new('!@private') +# verifier.call(object) # => true (no @private tag) +# @example Create a verifier to find any return tag with an empty description +# Verifier.new('@return.text.empty?') +# # Equivalent to: +# Verifier.new('object.tag(:return).text.empty?') +# @example Check if there are any @param tags +# Verifier.new('@@param.empty?') +# # Equivalent to: +# Verifier.new('object.tags(:param).empty?') +# @example Using +object+ or +o+ to look up object attributes directly +# Verifier.new('object.docstring == "hello world"') +# # Equivalent to: +# Verifier.new('o.docstring == "hello world"') +# @example Without using +object+ or +o+ +# Verifier.new('tag(:return).size == 1 || has_tag?(:author)') +# @example Specifying multiple expressions +# Verifier.new('@return', '@param', '@yield') +# # Equivalent to: +# Verifier.new('@return && @param && @yield') +# +# source://yard//lib/yard/verifier.rb#34 +class YARD::Verifier + # Creates a verifier from a set of expressions + # + # @param expressions [Array] a list of Ruby expressions to + # parse. + # @return [Verifier] a new instance of Verifier + # + # source://yard//lib/yard/verifier.rb#48 + def initialize(*expressions); end + + # Adds a set of expressions and recompiles the verifier + # + # @param expressions [Array] a list of expressions + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#58 + def add_expressions(*expressions); end + + # Tests the expressions on the object. + # + # @note If the object is a {CodeObjects::Proxy} the result will always be true. + # @param object [CodeObjects::Base] the object to verify + # @return [Boolean] the result of the expressions + # + # source://yard//lib/yard/verifier.rb#76 + def call(object); end + + # @return [Array] a list of all expressions the verifier checks for + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#37 + def expressions; end + + # source://yard//lib/yard/verifier.rb#39 + def expressions=(value); end + + # Passes any method calls to the object from the {#call} + # + # source://yard//lib/yard/verifier.rb#63 + def method_missing(sym, *args, &block); end + + # Runs a list of objects against the verifier and returns the subset + # of verified objects. + # + # @param list [Array] a list of code objects + # @return [Array] a list of code objects that match + # the verifier. + # + # source://yard//lib/yard/verifier.rb#91 + def run(list); end + + protected + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def o; end + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def object; end + + private + + # Creates the +__execute+ method by evaluating the expressions + # as Ruby code + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#130 + def create_method_from_expressions; end + + # Modifies nil to not throw NoMethodErrors. This allows + # syntax like object.tag(:return).text to work if the #tag + # call returns nil, which means users don't need to perform + # stringent nil checking + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#112 + def modify_nilclass; end + + # Parses a single expression, handling some of the DSL syntax. + # + # The syntax "@tag" should be turned into object.tag(:tag), + # and "@@tag" should be turned into object.tags(:tag) + # + # @return [String] the parsed expression + # + # source://yard//lib/yard/verifier.rb#145 + def parse_expression(expr); end + + # Returns the state of NilClass back to normal + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#120 + def unmodify_nilclass; end +end + +# @private +# +# source://yard//lib/yard/verifier.rb#104 +YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/gems/zeitwerk@2.6.18.rbi b/apps/govquests-api/rails_app/sorbet/rbi/gems/zeitwerk@2.6.18.rbi new file mode 100644 index 0000000..5712fcd --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/gems/zeitwerk@2.6.18.rbi @@ -0,0 +1,1051 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `zeitwerk` gem. +# Please instead update this file by running `bin/tapioca gem zeitwerk`. + + +# source://zeitwerk//lib/zeitwerk/kernel.rb#3 +module Kernel + private + + # source://zeitwerk//lib/zeitwerk/kernel.rb#23 + def require(path); end + + class << self + # source://zeitwerk//lib/zeitwerk/kernel.rb#23 + def require(path); end + end +end + +# source://zeitwerk//lib/zeitwerk.rb#3 +module Zeitwerk + class << self + # This is a dangerous method. + # + # source://zeitwerk//lib/zeitwerk.rb#22 + def with_loader; end + end +end + +# This private class encapsulates pairs (mod, cname). +# +# Objects represent the constant cname in the class or module object mod, and +# have API to manage them that encapsulates the constants API. Examples: +# +# cref.path +# cref.set(value) +# cref.get +# +# The constant may or may not exist in mod. +# +# source://zeitwerk//lib/zeitwerk/cref.rb#13 +class Zeitwerk::Cref + include ::Zeitwerk::RealModName + + # The type of the first argument is Module because Class < Module, class + # objects are also valid. + # + # @return [Cref] a new instance of Cref + # + # source://zeitwerk//lib/zeitwerk/cref.rb#23 + def initialize(mod, cname); end + + # source://zeitwerk//lib/zeitwerk/cref.rb#74 + def autoload(abspath); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#68 + def autoload?; end + + # Returns the value of attribute cname. + # + # source://zeitwerk//lib/zeitwerk/cref.rb#17 + def cname; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#79 + def defined?; end + + # @raise [NameError] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#90 + def get; end + + # source://zeitwerk//lib/zeitwerk/cref.rb#34 + def path; end + + # @raise [NameError] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#96 + def remove; end + + # source://zeitwerk//lib/zeitwerk/cref.rb#84 + def set(value); end +end + +# source://zeitwerk//lib/zeitwerk/error.rb#4 +class Zeitwerk::Error < ::StandardError; end + +# Centralizes the logic for the trace point used to detect the creation of +# explicit namespaces, needed to descend into matching subdirectories right +# after the constant has been defined. +# +# The implementation assumes an explicit namespace is managed by one loader. +# Loaders that reopen namespaces owned by other projects are responsible for +# loading their constant before setup. This is documented. +# +# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#11 +module Zeitwerk::ExplicitNamespace + extend ::Zeitwerk::RealModName + + class << self + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35 + def __register(cpath, loader); end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53 + def __registered?(cpath); end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45 + def __unregister_loader(loader); end + + private + + # Maps constant paths that correspond to explicit namespaces according to + # the file system, to the loader responsible for them. + # + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#20 + def cpaths; end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#58 + def disable_tracer_if_unneeded; end + + # Returns the value of attribute mutex. + # + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#24 + def mutex; end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35 + def register(cpath, loader); end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53 + def registered?(cpath); end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#65 + def tracepoint_class_callback(event); end + + # Returns the value of attribute tracer. + # + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#28 + def tracer; end + + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45 + def unregister_loader(loader); end + end +end + +# source://zeitwerk//lib/zeitwerk/gem_inflector.rb#4 +class Zeitwerk::GemInflector < ::Zeitwerk::Inflector + # @return [GemInflector] a new instance of GemInflector + # + # source://zeitwerk//lib/zeitwerk/gem_inflector.rb#6 + def initialize(root_file); end + + # source://zeitwerk//lib/zeitwerk/gem_inflector.rb#13 + def camelize(basename, abspath); end +end + +# @private +# +# source://zeitwerk//lib/zeitwerk/gem_loader.rb#5 +class Zeitwerk::GemLoader < ::Zeitwerk::Loader + # @return [GemLoader] a new instance of GemLoader + # + # source://zeitwerk//lib/zeitwerk/gem_loader.rb#19 + def initialize(root_file, namespace:, warn_on_extra_files:); end + + # source://zeitwerk//lib/zeitwerk/gem_loader.rb#34 + def setup; end + + private + + # source://zeitwerk//lib/zeitwerk/gem_loader.rb#42 + def warn_on_extra_files; end + + class << self + # @private + # + # source://zeitwerk//lib/zeitwerk/gem_loader.rb#14 + def __new(root_file, namespace:, warn_on_extra_files:); end + + private + + def new(*_arg0); end + end +end + +# source://zeitwerk//lib/zeitwerk/inflector.rb#4 +class Zeitwerk::Inflector + # Very basic snake case -> camel case conversion. + # + # inflector = Zeitwerk::Inflector.new + # inflector.camelize("post", ...) # => "Post" + # inflector.camelize("users_controller", ...) # => "UsersController" + # inflector.camelize("api", ...) # => "Api" + # + # Takes into account hard-coded mappings configured with `inflect`. + # + # source://zeitwerk//lib/zeitwerk/inflector.rb#15 + def camelize(basename, _abspath); end + + # Configures hard-coded inflections: + # + # inflector = Zeitwerk::Inflector.new + # inflector.inflect( + # "html_parser" => "HTMLParser", + # "mysql_adapter" => "MySQLAdapter" + # ) + # + # inflector.camelize("html_parser", abspath) # => "HTMLParser" + # inflector.camelize("mysql_adapter", abspath) # => "MySQLAdapter" + # inflector.camelize("users_controller", abspath) # => "UsersController" + # + # source://zeitwerk//lib/zeitwerk/inflector.rb#32 + def inflect(inflections); end + + private + + # Hard-coded basename to constant name user maps that override the default + # inflection logic. + # + # source://zeitwerk//lib/zeitwerk/inflector.rb#42 + def overrides; end +end + +# This is a private module. +# +# source://zeitwerk//lib/zeitwerk/internal.rb#4 +module Zeitwerk::Internal + # source://zeitwerk//lib/zeitwerk/internal.rb#5 + def internal(method_name); end +end + +# source://zeitwerk//lib/zeitwerk/loader.rb#7 +class Zeitwerk::Loader + include ::Zeitwerk::RealModName + include ::Zeitwerk::Loader::Callbacks + include ::Zeitwerk::Loader::Helpers + include ::Zeitwerk::Loader::Config + include ::Zeitwerk::Loader::EagerLoad + extend ::Zeitwerk::Internal + extend ::Zeitwerk::RealModName + + # @return [Loader] a new instance of Loader + # + # source://zeitwerk//lib/zeitwerk/loader.rb#100 + def initialize; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#42 + def __autoloaded_dirs; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#32 + def __autoloads; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#78 + def __namespace_dirs; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#344 + def __shadowed_file?(file); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#89 + def __shadowed_files; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#60 + def __to_unload; end + + # Returns a hash that maps the absolute paths of the managed files and + # directories to their respective expected constant paths. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#238 + def all_expected_cpaths; end + + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader.rb#268 + def cpath_expected_at(path); end + + # Unloads all loaded code, and calls setup again so that the loader is able + # to pick any changes in the file system. + # + # This method is not thread-safe, please see how this can be achieved by + # client code in the README of the project. + # + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader.rb#224 + def reload; end + + # Sets autoloads in the root namespaces. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#120 + def setup; end + + # Removes loaded constants and configured autoloads. + # + # The objects the constants stored are no longer reachable through them. In + # addition, since said objects are normally not referenced from anywhere + # else, they are eligible for garbage collection, which would effectively + # unload them. + # + # This method is public but undocumented. Main interface is `reload`, which + # means `unload` + `setup`. This one is available to be used together with + # `unregister`, which is undocumented too. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#146 + def unload; end + + # Says if the given constant path would be unloaded on reload. This + # predicate returns `false` if reloading is disabled. + # + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader.rb#319 + def unloadable_cpath?(cpath); end + + # Returns an array with the constant paths that would be unloaded on reload. + # This predicate returns an empty array if reloading is disabled. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#327 + def unloadable_cpaths; end + + # This is a dangerous method. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#335 + def unregister; end + + private + + # source://zeitwerk//lib/zeitwerk/loader.rb#491 + def autoload_file(cref, file); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader.rb#544 + def autoload_path_set_by_me_for?(cref); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#462 + def autoload_subdir(cref, subdir); end + + # We keep track of autoloaded directories to remove them from the registry + # at the end of eager loading. + # + # Files are removed as they are autoloaded, but directories need to wait due + # to concurrency (see why in Zeitwerk::Loader::Callbacks#on_dir_autoloaded). + # + # source://zeitwerk//lib/zeitwerk/loader.rb#42 + def autoloaded_dirs; end + + # Maps absolute paths for which an autoload has been set ---and not + # executed--- to their corresponding Zeitwerk::Cref object. + # + # "/Users/fxn/blog/app/models/user.rb" => #, + # "/Users/fxn/blog/app/models/hotel/pricing.rb" => #, + # ... + # + # source://zeitwerk//lib/zeitwerk/loader.rb#32 + def autoloads; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#523 + def define_autoload(cref, abspath); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#444 + def define_autoloads_for_dir(dir, parent); end + + # Returns the value of attribute dirs_autoload_monitor. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#97 + def dirs_autoload_monitor; end + + # Returns the value of attribute mutex. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#93 + def mutex; end + + # Maps namespace constant paths to their respective directories. + # + # For example, given this mapping: + # + # "Admin" => [ + # "/Users/fxn/blog/app/controllers/admin", + # "/Users/fxn/blog/app/models/admin", + # ... + # ] + # + # when `Admin` gets defined we know that it plays the role of a namespace + # and that its children are spread over those directories. We'll visit them + # to set up the corresponding autoloads. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#78 + def namespace_dirs; end + + # `dir` is the directory that would have autovivified a namespace. `file` is + # the file where we've found the namespace is explicitly defined. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#512 + def promote_namespace_from_implicit_to_explicit(dir:, file:, cref:); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#558 + def raise_if_conflicting_directory(dir); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#553 + def register_explicit_namespace(cpath); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#582 + def run_on_unload_callbacks(cpath, value, abspath); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#344 + def shadowed_file?(file); end + + # A shadowed file is a file managed by this loader that is ignored when + # setting autoloads because its matching constant is already taken. + # + # This private set is populated as we descend. For example, if the loader + # has only scanned the top-level, `shadowed_files` does not have shadowed + # files that may exist deep in the project tree yet. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#89 + def shadowed_files; end + + # Stores metadata needed for unloading. Its entries look like this: + # + # "Admin::Role" => [ + # ".../admin/role.rb", + # # + # ] + # + # The cpath as key helps implementing unloadable_cpath? The file name is + # stored in order to be able to delete it from $LOADED_FEATURES, and the + # cref is used to remove the constant from the parent class or module. + # + # If reloading is enabled, this hash is filled as constants are autoloaded + # or eager loaded. Otherwise, the collection remains empty. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#60 + def to_unload; end + + # source://zeitwerk//lib/zeitwerk/loader.rb#589 + def unload_autoload(cref); end + + # source://zeitwerk//lib/zeitwerk/loader.rb#595 + def unload_cref(cref); end + + class << self + # Returns an array with the absolute paths of the root directories of all + # registered loaders. This is a read-only collection. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#438 + def all_dirs; end + + # Returns the value of attribute default_logger. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#354 + def default_logger; end + + # Sets the attribute default_logger + # + # @param value the value to set the attribute default_logger to. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#354 + def default_logger=(_arg0); end + + # Broadcasts `eager_load` to all loaders. Those that have not been setup + # are skipped. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#410 + def eager_load_all; end + + # Broadcasts `eager_load_namespace` to all loaders. Those that have not + # been setup are skipped. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#424 + def eager_load_namespace(mod); end + + # This is a shortcut for + # + # require "zeitwerk" + # + # loader = Zeitwerk::Loader.new + # loader.tag = File.basename(__FILE__, ".rb") + # loader.inflector = Zeitwerk::GemInflector.new(__FILE__) + # loader.push_dir(__dir__) + # + # except that this method returns the same object in subsequent calls from + # the same file, in the unlikely case the gem wants to be able to reload. + # + # This method returns a subclass of Zeitwerk::Loader, but the exact type + # is private, client code can only rely on the interface. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#372 + def for_gem(warn_on_extra_files: T.unsafe(nil)); end + + # This is a shortcut for + # + # require "zeitwerk" + # + # loader = Zeitwerk::Loader.new + # loader.tag = namespace.name + "-" + File.basename(__FILE__, ".rb") + # loader.inflector = Zeitwerk::GemInflector.new(__FILE__) + # loader.push_dir(__dir__, namespace: namespace) + # + # except that this method returns the same object in subsequent calls from + # the same file, in the unlikely case the gem wants to be able to reload. + # + # This method returns a subclass of Zeitwerk::Loader, but the exact type + # is private, client code can only rely on the interface. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#393 + def for_gem_extension(namespace); end + end +end + +# source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#3 +module Zeitwerk::Loader::Callbacks + include ::Zeitwerk::RealModName + extend ::Zeitwerk::Internal + + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 + def __on_dir_autoloaded(dir); end + + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 + def __on_file_autoloaded(file); end + + # Invoked when a class or module is created or reopened, either from the + # tracer or from module autovivification. If the namespace has matching + # subdirectories, we descend into them now. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#80 + def on_namespace_loaded(namespace); end + + private + + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 + def on_dir_autoloaded(dir); end + + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 + def on_file_autoloaded(file); end + + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#91 + def run_on_load_callbacks(cpath, value, abspath); end +end + +# source://zeitwerk//lib/zeitwerk/loader/config.rb#6 +module Zeitwerk::Loader::Config + include ::Zeitwerk::RealModName + extend ::Zeitwerk::Internal + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#86 + def initialize; end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#296 + def __ignores?(abspath); end + + def __roots; end + + # Configure directories or glob patterns to be collapsed. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#216 + def collapse(*glob_patterns); end + + # If `namespaces` is falsey (default), returns an array with the absolute + # paths of the root directories as strings. If truthy, returns a hash table + # instead. Keys are the absolute paths of the root directories as strings, + # values are their corresponding namespaces, class or module objects. + # + # If `ignored` is falsey (default), ignored root directories are filtered out. + # + # These are read-only collections, please add to them with `push_dir`. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#156 + def dirs(namespaces: T.unsafe(nil), ignored: T.unsafe(nil)); end + + # Let eager load ignore the given files or directories. The constants defined + # in those files are still autoloadable. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#198 + def do_not_eager_load(*paths); end + + # You need to call this method before setup in order to be able to reload. + # There is no way to undo this, either you want to reload or you don't. + # + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#177 + def enable_reloading; end + + # Configure files, directories, or glob patterns to be totally ignored. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#205 + def ignore(*glob_patterns); end + + # Returns the value of attribute inflector. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#11 + def inflector; end + + # Sets the attribute inflector + # + # @param value the value to set the attribute inflector to. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#11 + def inflector=(_arg0); end + + # Logs to `$stdout`, handy shortcut for debugging. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#288 + def log!; end + + # Returns the value of attribute logger. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#14 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#14 + def logger=(_arg0); end + + # Configure a block to be invoked once a certain constant path is loaded. + # Supports multiple callbacks, and if there are many, they are executed in + # the order in which they were defined. + # + # loader.on_load("SomeApiClient") do |klass, _abspath| + # klass.endpoint = "https://api.dev" + # end + # + # Can also be configured for any constant loaded: + # + # loader.on_load do |cpath, value, abspath| + # # ... + # end + # + # @raise [TypeError] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#252 + def on_load(cpath = T.unsafe(nil), &block); end + + # Configure a block to be called after setup and on each reload. + # If setup was already done, the block runs immediately. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#228 + def on_setup(&block); end + + # Configure a block to be invoked right before a certain constant is removed. + # Supports multiple callbacks, and if there are many, they are executed in the + # order in which they were defined. + # + # loader.on_unload("Country") do |klass, _abspath| + # klass.clear_cache + # end + # + # Can also be configured for any removed constant: + # + # loader.on_unload do |cpath, value, abspath| + # # ... + # end + # + # @raise [TypeError] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#277 + def on_unload(cpath = T.unsafe(nil), &block); end + + # Pushes `path` to the list of root directories. + # + # Raises `Zeitwerk::Error` if `path` does not exist, or if another loader in + # the same process already manages that directory or one of its ascendants or + # descendants. + # + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#111 + def push_dir(path, namespace: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#190 + def reloading_enabled?; end + + # Returns the loader's tag. + # + # Implemented as a method instead of via attr_reader for symmetry with the + # writer below. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#135 + def tag; end + + # Sets a tag for the loader, useful for logging. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#142 + def tag=(tag); end + + private + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#314 + def actual_roots; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#339 + def collapse?(dir); end + + # The actual collection of absolute directory names at the time the collapse + # glob patterns were expanded. Computed on setup, and recomputed on reload. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#57 + def collapse_dirs; end + + # Absolute paths of directories or glob patterns to be collapsed. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#50 + def collapse_glob_patterns; end + + # Absolute paths of files or directories not to be eager loaded. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#63 + def eager_load_exclusions; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#326 + def excluded_from_eager_load?(abspath); end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#349 + def expand_glob_patterns(glob_patterns); end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#344 + def expand_paths(paths); end + + # Absolute paths of files, directories, or glob patterns to be totally + # ignored. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#36 + def ignored_glob_patterns; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#309 + def ignored_path?(abspath); end + + # The actual collection of absolute file and directory names at the time the + # ignored glob patterns were expanded. Computed on setup, and recomputed on + # reload. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#44 + def ignored_paths; end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#296 + def ignores?(abspath); end + + # User-oriented callbacks to be fired when a constant is loaded. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#76 + def on_load_callbacks; end + + # User-oriented callbacks to be fired on setup and on reload. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#69 + def on_setup_callbacks; end + + # User-oriented callbacks to be fired before constants are removed. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#83 + def on_unload_callbacks; end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#361 + def recompute_collapse_dirs; end + + # source://zeitwerk//lib/zeitwerk/loader/config.rb#356 + def recompute_ignored_paths; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#321 + def root_dir?(dir); end + + # Absolute paths of the root directories, mapped to their respective root namespaces: + # + # "/Users/fxn/blog/app/channels" => Object, + # "/Users/fxn/blog/app/adapters" => ActiveJob::QueueAdapters, + # ... + # + # Stored in a hash to preserve order, easily handle duplicates, and have a + # fast lookup by directory. + # + # This is a private collection maintained by the loader. The public + # interface for it is `push_dir` and `dirs`. + # + # source://zeitwerk//lib/zeitwerk/loader/config.rb#29 + def roots; end +end + +# source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#1 +module Zeitwerk::Loader::EagerLoad + # Eager loads all files in the root directories, recursively. Files do not + # need to be in `$LOAD_PATH`, absolute file names are used. Ignored and + # shadowed files are not eager loaded. You can opt-out specifically in + # specific files and directories with `do_not_eager_load`, and that can be + # overridden passing `force: true`. + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#9 + def eager_load(force: T.unsafe(nil)); end + + # @raise [Zeitwerk::SetupRequired] + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#32 + def eager_load_dir(path); end + + # @raise [Zeitwerk::SetupRequired] + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#74 + def eager_load_namespace(mod); end + + # Loads the given Ruby file. + # + # Raises if the argument is ignored, shadowed, or not managed by the receiver. + # + # The method is implemented as `constantize` for files, in a sense, to be able + # to descend orderly and make sure the file is loadable. + # + # @raise [Zeitwerk::Error] + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#116 + def load_file(path); end + + private + + # The caller is responsible for making sure `namespace` is the namespace that + # corresponds to `dir`. + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#160 + def actual_eager_load_dir(dir, namespace, force: T.unsafe(nil)); end + + # In order to invoke this method, the caller has to ensure `child` is a + # strict namespace descendant of `root_namespace`. + # + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#193 + def eager_load_child_namespace(child, child_name, root_dir, root_namespace); end +end + +# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#3 +module Zeitwerk::Loader::Helpers + private + + # @raise [Zeitwerk::NameError] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#110 + def cname_for(basename, abspath); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#85 + def dir?(path); end + + # Looks for a Ruby file using breadth-first search. This type of search is + # important to list as less directories as possible and return fast in the + # common case in which there are Ruby files. + # + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#56 + def has_at_least_one_ruby_file?(dir); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#90 + def hidden?(basename); end + + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#7 + def log(message); end + + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#15 + def ls(dir); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#80 + def ruby?(path); end + + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#95 + def walk_up(abspath); end +end + +# --- Inflection -------------------------------------------------------------------------------- +# +# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#105 +module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end + +# source://zeitwerk//lib/zeitwerk/loader.rb#21 +Zeitwerk::Loader::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://zeitwerk//lib/zeitwerk/error.rb#13 +class Zeitwerk::NameError < ::NameError; end + +# source://zeitwerk//lib/zeitwerk/null_inflector.rb#1 +class Zeitwerk::NullInflector + # source://zeitwerk//lib/zeitwerk/null_inflector.rb#2 + def camelize(basename, _abspath); end +end + +# source://zeitwerk//lib/zeitwerk/real_mod_name.rb#3 +module Zeitwerk::RealModName + # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#14 + def real_mod_name(mod); end +end + +# source://zeitwerk//lib/zeitwerk/real_mod_name.rb#4 +Zeitwerk::RealModName::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) + +# source://zeitwerk//lib/zeitwerk/registry.rb#4 +module Zeitwerk::Registry + class << self + # Maps absolute paths to the loaders responsible for them. + # + # This information is used by our decorated `Kernel#require` to be able to + # invoke callbacks and autovivify modules. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#26 + def autoloads; end + + # Registers gem loaders to let `for_gem` be idempotent in case of reload. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#17 + def gem_loaders_by_root_file; end + + # @private + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/registry.rb#113 + def inception?(cpath, registered_by_loader = T.unsafe(nil)); end + + # This hash table addresses an edge case in which an autoload is ignored. + # + # For example, let's suppose we want to autoload in a gem like this: + # + # # lib/my_gem.rb + # loader = Zeitwerk::Loader.new + # loader.push_dir(__dir__) + # loader.setup + # + # module MyGem + # end + # + # if you require "my_gem", as Bundler would do, this happens while setting + # up autoloads: + # + # 1. Object.autoload?(:MyGem) returns `nil` because the autoload for + # the constant is issued by Zeitwerk while the same file is being + # required. + # 2. The constant `MyGem` is undefined while setup runs. + # + # Therefore, a directory `lib/my_gem` would autovivify a module according to + # the existing information. But that would be wrong. + # + # To overcome this fundamental limitation, we keep track of the constant + # paths that are in this situation ---in the example above, "MyGem"--- and + # take this collection into account for the autovivification logic. + # + # Note that you cannot generally address this by moving the setup code + # below the constant definition, because we want libraries to be able to + # use managed constants in the module body: + # + # module MyGem + # include MyConcern + # end + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#65 + def inceptions; end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#124 + def loader_for(path); end + + # This method returns always a loader, the same instance for the same root + # file. That is how Zeitwerk::Loader.for_gem is idempotent. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#89 + def loader_for_gem(root_file, namespace:, warn_on_extra_files:); end + + # Keeps track of all loaders. Useful to broadcast messages and to prevent + # them from being garbage collected. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#11 + def loaders; end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#130 + def on_unload(loader); end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#95 + def register_autoload(loader, abspath); end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#107 + def register_inception(cpath, abspath, loader); end + + # Registers a loader. + # + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#71 + def register_loader(loader); end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#101 + def unregister_autoload(abspath); end + + # @private + # + # source://zeitwerk//lib/zeitwerk/registry.rb#77 + def unregister_loader(loader); end + end +end + +# source://zeitwerk//lib/zeitwerk/error.rb#7 +class Zeitwerk::ReloadingDisabledError < ::Zeitwerk::Error + # @return [ReloadingDisabledError] a new instance of ReloadingDisabledError + # + # source://zeitwerk//lib/zeitwerk/error.rb#8 + def initialize; end +end + +# source://zeitwerk//lib/zeitwerk/error.rb#16 +class Zeitwerk::SetupRequired < ::Zeitwerk::Error + # @return [SetupRequired] a new instance of SetupRequired + # + # source://zeitwerk//lib/zeitwerk/error.rb#17 + def initialize; end +end + +# source://zeitwerk//lib/zeitwerk/version.rb#4 +Zeitwerk::VERSION = T.let(T.unsafe(nil), String) diff --git a/apps/govquests-api/rails_app/sorbet/rbi/todo.rbi b/apps/govquests-api/rails_app/sorbet/rbi/todo.rbi new file mode 100644 index 0000000..327a84b --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/rbi/todo.rbi @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for unresolved constants. +# Please instead update this file by running `bin/tapioca todo`. + +# typed: false + +module ClientAuthentication::Configuration::Authentication::AccountRegistered; end +module ClientAuthentication::CreateTest::Authentication::RegisterAccount; end +module Configuration::Govquests::Configuration; end +module ReadModelHandlerTest::PublicOffer::Product; end diff --git a/apps/govquests-api/rails_app/sorbet/tapioca/config.yml b/apps/govquests-api/rails_app/sorbet/tapioca/config.yml new file mode 100644 index 0000000..886ae58 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/tapioca/config.yml @@ -0,0 +1,13 @@ +gem: + # Add your `gem` command parameters here: + # + # exclude: + # - gem_name + # doc: true + # workers: 5 +dsl: + # Add your `dsl` command parameters here: + # + # exclude: + # - SomeGeneratorName + # workers: 5 diff --git a/apps/govquests-api/rails_app/sorbet/tapioca/require.rb b/apps/govquests-api/rails_app/sorbet/tapioca/require.rb new file mode 100644 index 0000000..80f31f8 --- /dev/null +++ b/apps/govquests-api/rails_app/sorbet/tapioca/require.rb @@ -0,0 +1,4 @@ +# typed: true +# frozen_string_literal: true + +# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list)